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

📄 tplan.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
字号:
<?php

function gettypestr( $n )
{
	switch ( $n )
	{
	case 1 :
		$str = "工作";
		break;
	case 2 :
		$str = "个人";
		break;
	default :
		$str = " 工作";
	}
	return $str;
}

function getaffiretypestr( $n )
{
	switch ( $n )
	{
	case 2 :
		$str = "每日";
		break;
	case 3 :
		$str = "每周";
		break;
	case 4 :
		$str = "每月";
		break;
	case 5 :
		$str = "每年";
		break;
	default :
		$str = "每天";
	}
	return $str;
}

function getdatestr( $type, $n )
{
	if ( $type == 3 )
	{
		switch ( $n )
		{
		case 0 :
			$str = "每日";
			break;
		case 1 :
			$str = "周一";
			break;
		case 2 :
			$str = "周二";
			break;
		case 3 :
			$str = "周三";
			break;
		case 4 :
			$str = "周四";
			break;
		case 5 :
			$str = "周五";
			break;
		case 6 :
			$str = "周六";
			break;
		default :
			$str = "周日";
		}
	}
	if ( $type == 4 )
	{
		$str = $n."号";
	}
	if ( $type == 5 )
	{
		$str = date( "n月j号", strtotime( "2006-".$n ) );
	}
	return $str;
}

include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/calendar.inc.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 "tyle type=\"text/css\">\r\n<!--\r\n.kal-td-row{\r\ncursor:hand;\r\n    color: #666666;\r\n    font-family: Arial;\r\n    font-size: 9pt;\r\n    background-color: #EAEBEC;\r\n\tfont-weight: bold;\r\n    width: 60px;\r\n    height:30px;\r\n    text-align: center;\r\n\tborder: 1px solid #EAEBEC;\r\n}\r\n.kal-td-hover{\r\ncursor:hand;\r\n    color: #666666;\r\n    font-family: Arial;\r\n    font-size: 9pt;\r\n\tfont-weight: bold;\r\n    width: 60";
echo "px;\r\n    height:30px;\r\n    text-align: center;\r\n\tborder: 1px solid #868585;\r\n\tbackground-color: #DBD8D8;\r\n}\r\n\r\n.kal-td {\r\n/*cursor:hand;*/\r\n    color: #666666;\r\n    font-family: Arial;\r\n    font-size: 9pt;\r\n    background-color: #EAEBEC;\r\n\tfont-weight: bold;\r\n    width: 60px;\r\n    height:30px;\r\n    text-align: center;\r\n\tborder: 1px solid #EAEBEC;\r\n}\r\n\r\n.kal-td2 {\r\n    color: #666666;\r\n    font-fam";
echo "ily: Arial;\r\n    font-size: 9pt;\r\n    background-color: #F1E5E5;\r\n\tfont-weight: bold;\r\n    width: 60px;\r\n    height:30px;\r\n    text-align: center;\r\n\tborder: 1px solid #F1E5E5;\r\n}\r\n\r\n.kal-td3 {\r\n    color: #666666;\r\n    font-family: Arial;\r\n    font-size: 9pt;\r\n    background-color: #F1E5E5;\r\n\tfont-weight: bold;\r\n    width: 60px;\r\n    height:30px;\r\n    text-align: center;\r\n\tborder: 1px solid #FF000";
echo "0;\r\n}\r\n\r\n.kal-title{\r\n\tbackground-image: url(\"/theme/1/bgwebhead.gif\");\r\n\theight: 25px;\r\n\t/*font-weight: bold;*/\r\n\ttext-align: center;\r\n}\r\n.kal-foot{\r\n    color: #333333;\r\n    font-family: Arial;\r\n    font-size: 9pt;\r\n    height:30px;\r\n    text-align: center;\r\n}\r\n\r\n.arrow {\r\n\tFONT-FAMILY: webdings\r\n}\r\n\r\n.table001 { BACKGROUND: #D3E5FA; color: #000000;height: 22px; font-weight: bold;}\r\n-->\r\n</style>";
echo " \r\n\r\n";
echo "<s";
echo "cript>\r\nmy_top=50;\r\nmy_left=50;\r\nfunction my_note(CAL_ID)\r\n{\r\n  my_top+=25;\r\n  my_left+=15;\r\n\r\n  window.open(\"/general/calendar/arrange/note.php?CAL_ID=\"+CAL_ID,\"note_win\"+CAL_ID,\"height=170,width=250,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=\"+ my_top +\",left=\"+ my_left +\",resizable=no\");\r\n}\r\n\r\nfunction my_note2(AFF_ID)\r\n{\r\n  my_left=document.body.scrollLeft+event.clientX-even";
echo "t.offsetX-50;\r\n  my_top=document.body.scrollTop+event.clientY-event.offsetY+150;\r\n\r\n  window.open(\"/general/calendar/affair/note.php?AFF_ID=\"+AFF_ID,\"note_win\"+AFF_ID,\"height=170,width=250,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=\"+ my_top +\",left=\"+ my_left +\",resizable=no\");\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n<table border=\"0\" width=\"100%\" cellspac";
echo "ing=\"1\"  cellpadding=\"0\">\r\n   <tr class=\"tablehead1\">\r\n    <td ><img src=\"/images/menu/calendar.gif\"  align=\"absmiddle\"> 今日常务\r\n    </td>\r\n  </tr>\r\n  <tr class=\"tablehead2\"><td>\r\n  <a href=\"arrange/\" ><img src=\"/images/button/calarrange.gif\" border=\"0\" title=\"日程安排\"></a>\r\n  <a href=\"affair/\" ><img src=\"/images/button/calaffair.gif\" border=\"0\" title=\"日常事务\"></a>\r\n  </td></tr>\r\n</table>\r\n\r\n<DIV id=overDiv s";
echo "tyle=\"Z-INDEX: 3; LEFT: 0px; VISIBILITY: hidden; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 0px; BORDER-BOTTOM-STYLE: none\"></DIV>\r\n";
echo "<s";
echo "cript src=\"/inc/viewlayer_02.js\"></script>\r\n\r\n  \r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n  <tr>\r\n    <td width=\"40%\" valign=\"top\" class=\"TableLine1\">\r\n\t";
$ap_kdr = new ap_kdr( );
$ap_kdr->kalendar( $_GET['month'], $_GET['year'] );
echo "\t<br>\r\n\t\t";
if ( $month == "" )
{
	$month = date( "m", time( ) );
}
if ( 12 < $month )
{
	$month = 1;
}
if ( $month < 1 )
{
	$month = 12;
}
$sql = "\r\n\t        SELECT USER_ID,USER_NAME,DATE_FORMAT(BIRTHDAY,'%m-%d') AS birthdate FROM user\r\n\t\t\t   WHERE MONTH(BIRTHDAY)='".abs( $month )."'\r\n\t\t\t   AND MONTH(BIRTHDAY)>0\r\n\t         ";
$rs = exequery( $connection, $sql );
$b_count = 0;
while ( $rowb = mysql_fetch_array( $rs ) )
{
	$birtharray[$b_count][user_name] = $rowb['USER_NAME'];
	$birtharray[$b_count][birthday] = $rowb['birthdate'];
	++$b_count;
}
if ( 0 < $b_count )
{
	echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n<tr>\r\n<td class=\"tablehead1\">";
	echo abs( $month );
	echo "月份生日名单</td>\r\n</tr>\r\n<tr>\r\n  <td style=\"line-height:20px\">";
	if ( is_array( $birtharray ) )
	{
		while ( list( $key, $var ) = each( $birtharray ) )
		{
			echo $var['user_name'];
			echo "&nbsp;";
			echo "<span style=color:333333;font-size:10px;>(";
			echo $var['birthday'];
			echo ")</span>";
			echo "<br>";
		}
	}
	echo "</td>\r\n</tr>\r\n</table>\r\n";
}
echo "\r\n\t</td>\r\n    <td valign=\"top\" class=\"tableLine1\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n      <tr>\r\n        <td height=\"200\" valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n          <tr>\r\n            <td>";
echo "<s";
echo "trong>日程安排</strong></td>\r\n            </tr>\r\n          \r\n        </table>\r\n          <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n          <tr class=\"tableheader\">\r\n            <td width=\"20%\">时间段</td>\r\n            <td>内容</td>\r\n            <td width=\"10%\">类型</td>\r\n            <td width=\"13%\">状态</td>\r\n          </tr>\r\n\t\t  ";
$year = $year != "" ? $year : date( "Y" );
$month = $month != "" ? $month : date( "m" );
$day = $day != "" ? $day : date( "d" );
$sql = "\r\n\t\t          SELECT * FROM calendar \r\n\t\t\t\t    WHERE TO_DAYS(CAL_TIME)=TO_DAYS('".$year."-".$month."-".$day."')\r\n\t\t\t\t\tAND USER_ID='".$_SESSION['LOGIN_USER_ID']."' \r\n\t\t\t\t\tORDER BY DATE_FORMAT(CAL_TIME,'%H:%i') ASC\r\n\t\t  \r\n\t\t           ";
$rs = exequery( $connection, $sql );
$c_count = 0;
while ( $row = mysql_fetch_array( $rs ) )
{
	++$c_count;
	$cur_time = date( "Y-m-d H:i:s" );
	$cal_time = $row['CAL_TIME'];
	$end_time = $row['END_TIME'];
	$timerange = date( "H:i", strtotime( $cal_time ) )." - ".date( "H:i", strtotime( $end_time ) );
	$content = substrgb( $row['CONTENT'], 34, "..." );
	$cal_id = $row['CAL_ID'];
	$cal_type_str = gettypestr( $row['CAL_TYPE'] );
	if ( new_compare_time( $cur_time, $cal_time, $end_time ) == 1 )
	{
		$status = "<font color='#FF0000'>过期</span>";
	}
	else if ( new_compare_time( $cur_time, $cal_time, $end_time ) == -1 )
	{
		$status = "<font color='#0000AA'>未至</span>";
	}
	else if ( new_compare_time( $cur_time, $cal_time, $end_time ) == 0 )
	{
		$status = "<font color='#336600'>进行中</span>";
	}
	if ( $c_count % 2 == 1 )
	{
		$trclass = "tableline2";
	}
	else
	{
		$trclass = "tableline1";
	}
	echo "          <tr class=\"";
	echo $trclass;
	echo "\">\r\n            <td>";
	echo "<s";
	echo "pan style=\"color:333333;font-size:10px\">";
	echo $timerange;
	echo "</span></td>\r\n            <td><a href=\"#\" onClick=\"my_note(";
	echo $cal_id;
	echo ");\">";
	echo $content;
	echo "</a></td>\r\n            <td>";
	echo $cal_type_str;
	echo "</td>\r\n            <td>";
	echo $status;
	echo "</td>\r\n          </tr>\r\n\t\t  ";
}
echo "        </table></td>\r\n        </tr>\r\n      <tr>\r\n        <td height=\"200\" valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n          <tr>\r\n            <td>";
echo "<s";
echo "trong>日常事务</strong></td>\r\n          </tr>\r\n        </table>\r\n          <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n            <tr class=\"tableheader\">\r\n              <td width=\"20%\">提醒时间</td>\r\n              <td>内容</td>\r\n              <td width=\"10%\">类型</td>\r\n              <td width=\"13%\">日期</td>\r\n            </tr>\r\n            ";
$year = $year != "" ? $year : date( "Y" );
$month = $month != "" ? $month : date( "m" );
$day = $day != "" ? $day : date( "d" );
$week = date( "w", strtotime( $year."-".$month."-".$day ) );
$sql = "\r\n\t\t          SELECT * FROM affair \r\n\t\t\t\t    WHERE TO_DAYS(BEGIN_TIME)<=TO_DAYS('".$year."-".$month."-".$day."')\r\n\t\t\t\t\tAND (TYPE=2 \r\n\t\t\t\t\t\tOR (TYPE=3 AND REMIND_DATE='".$week."')\r\n\t\t\t\t\t\tOR (TYPE=4 AND REMIND_DATE='".$day."') \r\n\t\t\t\t\t\tOR (TYPE=5 AND REMIND_DATE='".abs( $month )."-".abs( $day )."'))\r\n\t\t\t\t\tAND USER_ID='".$_SESSION['LOGIN_USER_ID']."' \r\n\t\t\t\t\tORDER BY REMIND_TIME ASC\r\n\t\t  \r\n\t\t           ";
$rs = exequery( $connection, $sql );
$a_count = 0;
while ( $row = mysql_fetch_array( $rs ) )
{
	++$a_count;
	$remind_time = $row['REMIND_TIME'];
	$content = substrgb( $row['CONTENT'], 34, "..." );
	$aff_id = $row['AFF_ID'];
	$type_str = getaffiretypestr( $row['TYPE'] );
	$remind_date = $row['REMIND_DATE'];
	$remind_date_str = getdatestr( $row['TYPE'], $remind_date );
	if ( $a_count % 2 == 1 )
	{
		$trclass = "tableline2";
	}
	else
	{
		$trclass = "tableline1";
	}
	echo "            <tr class=\"";
	echo $trclass;
	echo "\">\r\n              <td>";
	echo "<s";
	echo "pan style=\"color:333333;font-size:10px\">\r\n                ";
	echo $remind_time;
	echo "              </span></td>\r\n              <td><a href=\"#\" onClick=\"my_note2(";
	echo $aff_id;
	echo ");\">\r\n                ";
	echo $content;
	echo "              </a></td>\r\n              <td>";
	echo $type_str;
	echo "</td>\r\n              <td>";
	echo $remind_date_str;
	echo "</td>\r\n            </tr>\r\n            ";
}
echo "          </table></td>\r\n        </tr>\r\n    </table></td>\r\n  </tr>\r\n</table>\r\n</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

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