Location: PHPKode > projects > Web Task Manager with Email/SMS Voting > Calendar/cal_catview.php
<div class="box" style="width:406;">
	<!-- overLIB (c) Erik Bosrup -->			
<div id="overDiv" style="position:relative; left:5; visibility:hidden; z-index:1000;">
<script language="JavaScript" src="overlib.js" type="text/JavaScript"><!-- overLIB (c) Erik Bosrup --></script> 

<script language="JavaScript" type="text/JavaScript">
		new menu (MENU_ITEMS, MENU_POS);
</script></div>
            <div class="content" style="width:398;">
            <?php
##########################################################################
#  Please refer to the README file for licensing and contact information.
# 
#  This file has been updated for version 0.8.20071118 
# 
#  If you like this application, do support me in its development 
#  by sending any contributions at www.calendarix.com.
#
#
#  Copyright © 2002-2007 Vincent Hor
##########################################################################

require ('cal_config.inc.php');
include_once ("cal_popupheader.inc.php");
include_once ("cal_utils.php") ;


$catview = $_GET['catview'];
// <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
?>

<html>
<head>
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <title>Groups View</title>
 <link href="themes/<?php echo $theme.'.css'?>" rel="stylesheet" type="text/css" >
</head>
<body>

<?php
if (!isset($_GET['catop']))
  $catop = "";
else
  $catop = $_GET['catop'];

if ($catop == "viewcat"){
  $catview = $_POST['gocat'];

  echo "<script language=\"JavaScript\" type=\"text/JavaScript\">\n" ;
  echo "var gotourl = top.opener.window.location.href ;\n" ;
  echo "if (top.opener.window.location.href.indexOf(\"#\")!=-1) gotourl = gotourl.substr(0,gotourl.length-1);\n" ;
  echo "if (gotourl.indexOf(\"?\")==-1) { \n" ;
  echo "  top.opener.window.location.href = gotourl + '?catview=".$catview."' ; } \n" ;
  echo "else if (gotourl.indexOf(\"catview\")!=-1) { \n" ;
  echo "  if (gotourl.substr(gotourl.indexOf(\"catview\")+9,1)!='&') {\n" ;
  echo "  gotourl = gotourl.substr(0,gotourl.indexOf(\"catview\")+7)+\"=$catview\"+gotourl.substr(gotourl.indexOf(\"catview\")+10,gotourl.length) ; }\n" ;
  echo "  else \n" ;
  echo "  gotourl = gotourl.substr(0,gotourl.indexOf(\"catview\")+7)+\"=$catview\"+gotourl.substr(gotourl.indexOf(\"catview\")+9,gotourl.length) ;\n" ;
  echo "top.opener.window.location.href = gotourl; }\n" ;
  echo "else { \n";
  echo "top.opener.window.location.href = gotourl + '&catview=".$catview."';";
  echo " }\n" ;    
  echo "window.close();\n" ;
  echo "</script>\n" ;

}

if ($eventcatfilter==1) {

 $query = "select user_id from calendar_users where username = '".$_SESSION["login"]."'";
 $result = mysql_query($query);
 $rows = mysql_num_rows($result);
 $row = mysql_fetch_object($result);
 $userid=$row->user_id;
 
  echo "<div class=normalfont>\n" ;
  echo "<form action=\"cal_catview.php?catop=viewcat\" method=post>\n";
  echo "<b>Please choose the group to view events for: </b>&nbsp;" ;
  $query = "select * from groupusers inner join groups on groupusers.groupid = groups.groupid where groupusers.userid = ".$userid;
  $result = mysql_query($query);

  // get the category names 
  echo "<select name=gocat>";
  echo "<option value=0" ;
  if ($catview==0) echo " selected " ;
  echo ">All Groups\n";

  while ($row = mysql_fetch_object($result))
  {
    echo "<option value=".$row->GroupID;
    if ($catview==$row->GroupID) echo " selected " ;
    echo ">".stripslashes($row->GroupName)."\n";
  }
  echo "</select>";

echo "<br/>\n";
echo "<div align=center><input type=submit value=\"".translate("View")."\">" ;
echo "&nbsp; &nbsp;<input type=button value=\"".translate("Close")."\" onClick=\"Javascript:window.close();\">\n" ;
echo "</div>\n" ;
echo "</form></div>" ;

}
else echo "<br/><div class=titlefont>".translate("disabled").".</div>" ;

?>

</body>
</html>
Return current item: Web Task Manager with Email/SMS Voting