<?php 
  /**************************************************************************\
  * eGroupWare - Bookmarks                                                   *
  * http://www.egroupware.org                                                *
  * Based on Bookmarker Copyright (C) 1998  Padraic Renaghan                 *
  *                     http://www.renaghan.com/bookmarker                   *
  * --------------------------------------------                             *
  *  This program is free software; you can redistribute it and/or modify it *
  *  under the terms of the GNU General Public License as published by the   *
  *  Free Software Foundation; either version 2 of the License, or (at your  *
  *  option) any later version.                                              *
  \**************************************************************************/

  /* $Id: glist.wml 20014 2005-11-27 01:17:28Z milosch $ */
  
	include("../header.inc.php");
	header("Content-Type: text/vnd.wap.wml");
	print("<?xml version=\"1.0\"?>");
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
  "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
  <card>
<?php
	$query = "select subcategory.name as subcategory_name "
		. ", bookmark.name as bookmark_name, url "
		. "from bookmark, subcategory "
		. "where public_f = 'Y' "
		. "and category_id = 12 "
		. "and subcategory_id = subcategory.id "
		. "order by subcategory_name, bookmark_name ";
	$GLOBALS['egw']->db->query($query,__LINE__,__FILE__);
	if ($GLOBALS['egw']->db->Errno != 0)
	{
		print("<p>ERROR</p>");
	}

	while ($GLOBALS['egw']->db->next_record())
	{
		$subcategory = $GLOBALS['egw']->db->f("subcategory_name");
		$name        = $GLOBALS['egw']->db->f("bookmark_name");
		$url         = $GLOBALS['egw']->db->f("url");
		printf("<p><a href=\"%s\" title=\"%s\">%s</a></p>", $url, $url, $name);
	}
?>
  </card>
</wml>
<?php $GLOBALS['egw']->common->phpgw_footer(); ?>
