⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.php

📁 极限网络智能办公系统—MYOA26—100%—源程序。
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
echo "\r\n<html>\r\n<head>\r\n<title>日程安排</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n\r\n";
echo "<s";
echo "cript>\r\nmy_top=50;\r\nmy_left=50;\r\n\r\nfunction my_note(CAL_ID)\r\n{\r\n  my_top+=25;\r\n  my_left+=15;\r\n\r\n  window.open(\"note.php?CAL_ID=\"+CAL_ID,\"note_win\"+CAL_ID,\"height=170,width=180,status=0,toolbar=no,menubar=no,location=no,scrollbars=auto,top=\"+ my_top +\",left=\"+ my_left +\",resizable=no\");\r\n}\r\n\r\nfunction My_Submit()\r\n{\r\n  document.form1.submit();\r\n}\r\n\r\nfunction set_year(op)\r\n{\r\n  if(op==-1 && documen";
echo "t.form1.YEAR.selectedIndex==0)\r\n     return;\r\n  if(op==1 && document.form1.YEAR.selectedIndex==(document.form1.YEAR.options.length-1))\r\n     return;\r\n  document.form1.YEAR.selectedIndex=document.form1.YEAR.selectedIndex+op;\r\n\r\n  My_Submit();\r\n}\r\n\r\nfunction set_mon(op)\r\n{\r\n  if(op==-1 && document.form1.MONTH.selectedIndex==0)\r\n     return;\r\n  if(op==1 && document.form1.MONTH.selectedIndex==(documen";
echo "t.form1.MONTH.options.length-1))\r\n     return;\r\n  document.form1.MONTH.selectedIndex=document.form1.MONTH.selectedIndex+op;\r\n\r\n  My_Submit();\r\n}\r\n\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n  <tr>\r\n    <td class=\"Big\"><img src=\"/images/menu/calendar.gif\" WIDTH=\"22\" HEIGHT=\"20\" align=\"absmiddle\">";
echo "<s";
echo "pan class=\"big3\"> 日程安排</span>\r\n    </td>\r\n  </tr>\r\n</table>\r\n\r\n";
$CUR_YEAR = date( "Y" );
$CUR_MON = date( "m" );
$CUR_DAY = date( "d" );
$DATE = 1;
$DAY = 1;
if ( !$YEAR )
{
	$YEAR = $CUR_YEAR;
}
if ( !$MONTH )
{
	$MONTH = $CUR_MON;
}
while ( checkdate( $MONTH, $DATE, $YEAR ) )
{
	++$DATE;
}
$connection = openconnection( );
$query = "SELECT * from CALENDAR where USER_ID='{$LOGIN_USER_ID}' and year(CAL_TIME)={$YEAR} and month(CAL_TIME)={$MONTH} order by CAL_TIME";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	$CAL_ID = $ROW['CAL_ID'];
	$CAL_TIME = $ROW['CAL_TIME'];
	$END_TIME = $ROW['END_TIME'];
	$CAL_TYPE = $ROW['CAL_TYPE'];
	$CONTENT = $ROW['CONTENT'];
	$CONTENT = str_replace( "<", "&lt", $CONTENT );
	$CONTENT = str_replace( ">", "&gt", $CONTENT );
	$CONTENT = stripslashes( $CONTENT );
	$CAL_DAY = strtok( $CAL_TIME, "-" );
	$CAL_DAY = strtok( "-" );
	$CAL_DAY = strtok( " " );
	if ( substr( $CAL_DAY, 0, 1 ) == "0" )
	{
		$CAL_DAY = substr( $CAL_DAY, -1 );
	}
	$CAL_TIME = strtok( $CAL_TIME, " " );
	$CAL_TIME = strtok( " " );
	$CAL_TIME = substr( $CAL_TIME, 0, 5 );
	$END_TIME = strtok( $END_TIME, " " );
	$END_TIME = strtok( " " );
	$END_TIME = substr( $END_TIME, 0, 5 );
	switch ( $CAL_TYPE )
	{
	case "1" :
		$CAL_TYPE = "工作";
		break;
	case "2" :
		$CAL_TYPE = "个人";
	}
	$CAL_ARRAY[$CAL_DAY] .= "{$CAL_TIME}-{$END_TIME}<br><b>".$CAL_TYPE."</b>:<a href='#' onclick='javascript:my_note({$CAL_ID});'>{$CONTENT}</a><br><br>";
}
echo "\r\n <div align=\"center\" class=\"Big1\">\r\n  <form action=\"index.php\"  method=\"post\" name=\"form1\">\r\n        \r\n<!-------------- 年 ------------>\r\n        <input type=\"button\" value=\"〈\" class=\"BigButton\" title=\"上一年\" onclick=\"set_year(-1);\">";
echo "<s";
echo "elect name=\"YEAR\" class=\"BigSelect\" onchange=\"My_Submit();\">\r\n";
$I = 2000;
for ( ;	$I <= 2015;	++$I	)
{
	echo "          <option value=\"";
	echo $I;
	echo "\" ";
	if ( $I == $YEAR )
	{
		echo "selected";
	}
	echo ">";
	echo $I;
	echo "</option>\r\n";
}
echo "        </select><input type=\"button\" value=\"〉\" class=\"BigButton\" title=\"下一年\" onclick=\"set_year(1);\"> <b>年</b>\r\n\r\n<!-------------- 月 ------------>\r\n        <input type=\"button\" value=\"〈\" class=\"BigButton\" title=\"上一月\" onclick=\"set_mon(-1);\">";
echo "<s";
echo "elect name=\"MONTH\" class=\"BigSelect\" onchange=\"My_Submit();\">\r\n";
$I = 1;
for ( ;	$I <= 12;	++$I	)
{
	if ( $I < 10 )
	{
		$I = "0".$I;
	}
	echo "          <option value=\"";
	echo $I;
	echo "\" ";
	if ( $I == $MONTH )
	{
		echo "selected";
	}
	echo ">";
	echo $I;
	echo "</option>\r\n";
}
echo "        </select><input type=\"button\" value=\"〉\" class=\"BigButton\" title=\"下一月\" onclick=\"set_mon(1);\"> <b>月</b>\r\n   &nbsp;&nbsp;<input type=\"button\" value=\"本月\" class=\"BigButton\" title=\"本月\" onclick=\"location='index.php?YEAR=";
echo $CUR_YEAR;
echo "&MONTH=";
echo $CUR_MONTH;
echo "'\">        \r\n  </form>\r\n </div>\r\n\r\n  <table width=\"100%\" border=\"0\" cellspacing=\"1\" class=\"small\" bgcolor=\"#000000\" cellpadding=\"3\" align=\"center\">\r\n    <tr align=\"center\" class=\"TableHeader\">\r\n      <td bgcolor=\"#FFCCFF\" width=\"10%\"><b>日</b></td>\r\n      <td width=\"15%\"><b>一</b></td>\r\n      <td width=\"15%\"><b>二</b></td>\r\n      <td width=\"15%\"><b>三</b></td>\r\n      <td width=\"15%\"><b>四</b></td>\r\n      <td width=\"15%\"><b";
echo ">五</b></td>\r\n      <td bgcolor=\"#CCFFCC\" width=\"10%\"><b>六</b></td>\r\n    </tr>\r\n";
while ( $DAY < $DATE )
{
	if ( $DAY == $CUR_DAY && $YEAR == $CUR_YEAR && $MONTH == $CUR_MON )
	{
		$DAY_COLOR = "TableContent";
	}
	else
	{
		$DAY_COLOR = "TableData";
	}
	$WEEK = date( "w", mktime( 0, 0, 0, $MONTH, $DAY, $YEAR ) );
	if ( $WEEK == 0 || $DAY == 1 )
	{
		echo "   <tr>\r\n";
	}
	if ( $DAY == 1 )
	{
		$I = 0;
		for ( ;	$I < $WEEK;	++$I	)
		{
			echo "     <td class=\"TableData\" valign=\"top\">&nbsp</td>\r\n";
		}
	}
	echo "     <td class=\"";
	echo $DAY_COLOR;
	echo "\" valign=\"top\">\r\n       <div align=center style=\"font-size: 18pt;font-family:sans-serif\"><b><a href=\"manage?YEAR=";
	echo $YEAR;
	echo "&MONTH=";
	echo $MONTH;
	echo "&DAY=";
	echo $DAY;
	echo "\">";
	echo $DAY;
	echo "</a></b></div>\r\n       ";
	echo $CAL_ARRAY[$DAY];
	echo "     </td>\r\n";
	if ( $WEEK == 6 )
	{
		echo "   </tr>\r\n";
	}
	++$DAY;
}
if ( $WEEK != 6 )
{
	$I = $WEEK;
	for ( ;	$I < 6;	++$I	)
	{
		echo "     <td class=\"TableData\">&nbsp</td>\r\n";
	}
	echo "   </tr>\r\n";
}
$CUR_MONTH = $MONTH;
$query = "SELECT USER_NAME,BIRTHDAY from USER order by USER_NAME ASC";
$cursor = exequery( $connection, $query );
$PERSON_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	$USER_NAME = $ROW['USER_NAME'];
	$BIRTHDAY = $ROW['BIRTHDAY'];
	$MON = substr( $BIRTHDAY, 5, 2 );
	$DATA = substr( $BIRTHDAY, 5, 5 );
	if ( $MON != $CUR_MONTH || $BIRTHDAY == "1900-01-01 00:00:00" || $BIRTHDAY == "0000-00-00 00:00:00" )
	{
	}
	else
	{
		$PERSON_STR .= $USER_NAME."(".$DATA.")&nbsp&nbsp&nbsp&nbsp";
		++$PERSON_COUNT;
	}
}
if ( 0 < $PERSON_COUNT )
{
	echo "\r\n      <tr class=\"TableData\">\r\n      <td style=\"color:#46A718\" align=\"center\"><b>本月生日:</b></td>\r\n      <td colspan=\"20\">\r\n      <marquee style=\"color:#FF6600;\" behavior=scroll scrollamount=3 scrolldelay=120 onmouseover='this.stop()' onmouseout='this.start()' border=0>\r\n      ";
	echo $PERSON_STR;
	echo "      </marquee>\r\n      </td>\r\n      </tr>\r\n";
}
echo "      </table>\r\n\r\n</body>\r\n</html>\r\n\r\n";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -