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

📄 4.php

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

function is_priview2( $str, $priview )
{
	$str_array = explode( ",", $str );
	$priview = explode( ",", $priview );
	$i = 0;
	for ( ;	$i < sizeof( $priview );	++$i	)
	{
		if ( in_array( $str_array[$i], $priview ) )
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}

include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/calendar.inc.php" );
$connection = openconnection( );
$strlink = $_SERVER['PHP_SELF'];
if ( strpos( $strlink, "block_02.php" ) === false )
{
	$isimg = true;
}
$sql = "SELECT UP.FUNC_ID_STR FROM user AS U,user_priv AS UP WHERE U.USER_ID='".$_SESSION['LOGIN_USER_ID']."' AND U.USER_PRIV=UP.USER_PRIV";
$cursor = exequery( $connection, $sql );
if ( $row = mysql_fetch_array( $cursor ) )
{
	$u_priv = $row['FUNC_ID_STR'];
}
if ( $isimg == true )
{
	$imgurl01 = "background=\"/theme/4/bg_mt_line_.gif\"";
	$imgurl02 = "background=\"/theme/1/newsbg.gif\"";
	$imgurl04 = "";
	$strimg = "<img src=\"/theme/1/gray_up_arrow.gif\" width=\"30\" height=\"22\" border=\"0\" id=\"imgarrow02\" title=\"展开/收缩\"  onClick=\"ControlContent02();\" style=\"cursor:hand\">";
	$td04width = "30";
	$tdbgcolor = "#EBEBEB";
	$fontstyle = "a";
	$jscontrolu = "/theme/1/gray_up_arrow.gif";
	$jscontrold = "/theme/1/gray_down_arrow.gif";
}
else
{
	$imgurl01 = "background=\"/theme/1/darkheadleft.gif\"";
	$imgurl02 = "background=\"/theme/1/darkheadbg.gif\"";
	$imgurl04 = "/theme/1/darkheadbg.gif\"";
	$strimg = "<img src=\"/theme/1/black_up_arrow.gif\" width=\"19\" height=\"28\" border=\"0\" id=\"imgarrow02\" title=\"展开/收缩\" onClick=\"ControlContent02();\" style=\"cursor:hand\">";
	$td04width = "19";
	$tdbgcolor = "#ABABAB";
	$fontstyle = "b";
	$jscontrolu = "/theme/1/black_up_arrow.gif";
	$jscontrold = "/theme/1/black_down_arrow.gif";
}
echo "<s";
echo "cript>\r\n<!--\r\nfunction ControlContent02(){\r\n    if (contentid02.style.display == 'none'){\r\n\t    contentid02.style.display = '';\r\n\t\timgarrow02.src = '";
echo $jscontrolu;
echo "';\r\n\t}\r\n    else {\r\n\t    contentid02.style.display = 'none';\r\n\t\timgarrow02.src = '";
echo $jscontrold;
echo "';\r\n\t}\t\r\n\r\n}\r\n-->\r\n</script>\r\n\r\n<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"/theme/1/newsbg.gif\" align=\"center\">\r\n  <tr>\r\n    <td width=\"88\" ";
echo $imgurl01;
echo "><table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n        <tr>\r\n          <td width=\"15%\">&nbsp;</td>\r\n          <td height=\"18\">";
if ( !is_priview2( "27,", $u_priv ) )
{
	echo "<span style=\"font:bold;\">常务安排</span>";
}
else
{
	echo "<a href=\"../calendar/tplan.php\" target=\"main\" class=\"".$fontstyle."\">常务安排</a>";
}
echo "</td>\r\n        </tr>\r\n      </table></td>\r\n    <td ";
echo $imgurl02;
echo ">&nbsp;</td>\r\n    <td width=\"";
echo $td04width;
echo "\" align=\"right\" ";
echo $imgurl04;
echo ">";
echo $strimg;
echo "</td>\r\n  </tr>\r\n</table>\r\n<div class=\"small\">\r\n  <table width=\"100%\" id=\"contentid02\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"darkbord\">\r\n    <!-------------------- 今日日程 ----------------------->\r\n    ";
echo "<s";
echo "cript>\r\nfunction my_note(CAL_ID)\r\n{\r\n  my_left=document.body.scrollLeft+event.clientX-event.offsetX-50;\r\n  my_top=document.body.scrollTop+event.clientY-event.offsetY+150;\r\n  window.open(\"/general/calendar/arrange/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\nfunct";
echo "ion my_note1(AFF_ID)\r\n{\r\n  my_left=document.body.scrollLeft+event.clientX-event.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=180,status=0,toolbar=no,menubar=no,location=no,scrollbars=auto,top=\"+ my_top +\",left=\"+ my_left +\",resizable=no\");\r\n}\r\n</script>\r\n";
if ( !is_priview2( "27,", $u_priv ) )
{
	echo "<tr><td>";
	message( "", "无权查看此栏目!" );
	echo "</td></tr>\r\n<tr><td bgcolor=\"";
	echo $tdbgcolor;
	echo "\" height=\"1\"></td></tr>\r\n";
}
else
{
	$CUR_DATE = date( "Y-m-d", time( ) );
	$query = "SELECT * from CALENDAR where USER_ID='{$LOGIN_USER_ID}' and to_days(CAL_TIME)=to_days('{$CUR_DATE}') order by CAL_TIME";
	$cursor = exequery( $connection, $query );
	$CAL_COUNT = 0;
	$i = 1;
	while ( $ROW = mysql_fetch_array( $cursor ) )
	{
		++$CAL_COUNT;
		$CAL_ID = $ROW['CAL_ID'];
		$CAL_TIME = $ROW['CAL_TIME'];
		$END_TIME = $ROW['END_TIME'];
		$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 );
		$CONTENT = $ROW['CONTENT'];
		$CONTENT = str_replace( "<", "&lt", $CONTENT );
		$CONTENT = str_replace( ">", "&gt", $CONTENT );
		$CONTENT = stripslashes( $CONTENT );
		echo "    <tr height=\"20\">\r\n      <td width=\"2%\">&nbsp;</td>\r\n      <td>";
		echo $CAL_TIME;
		echo "        -\r\n        ";
		echo $END_TIME;
		echo "        <a href=\"#\" onclick=\"javascript:my_note(";
		echo $CAL_ID;
		echo ");\">\r\n        ";
		echo $CONTENT;
		echo "        </a></td>\r\n    </tr>\r\n    <tr>\r\n      <td colspan=\"2\" bgcolor=\"";
		echo $tdbgcolor;
		echo "\" height=\"1\"></td>\r\n    </tr>\r\n    ";
		if ( 3 < $CAL_COUNT )
		{
			break;
		}
	}
	$CUR_TIME = date( "Y-m-d H:i:s", time( ) );
	$connection = openconnection( );
	$query = "SELECT * from AFFAIR where USER_ID='{$LOGIN_USER_ID}' and BEGIN_TIME<='{$CUR_TIME}' order by REMIND_TIME";
	$count = 0;
	$cursor = exequery( $connection, $query );
	while ( $ROW = mysql_fetch_array( $cursor ) )
	{
		++$count;
		$AFF_ID = $ROW['AFF_ID'];
		$USER_ID = $ROW['USER_ID'];
		$TYPE = $ROW['TYPE'];
		$REMIND_DATE = $ROW['REMIND_DATE'];
		$REMIND_TIME = $ROW['REMIND_TIME'];
		$CONTENT = $ROW['CONTENT'];
		$FLAG = 0;
		if ( $TYPE == "2" )
		{
			$FLAG = 1;
		}
		else if ( $TYPE == "3" && date( "w", time( ) ) == $REMIND_DATE )
		{
			$FLAG = 1;
		}
		else if ( $TYPE == "4" && date( "j", time( ) ) == $REMIND_DATE )
		{
			$FLAG = 1;
		}
		else if ( $TYPE == "5" )
		{
			$REMIND_ARR = explode( "-", $REMIND_DATE );
			$REMIND_DATE_MON = $REMIND_ARR[0];
			$REMIND_DATE_DAY = $REMIND_ARR[1];
			if ( date( "n", time( ) ) == $REMIND_DATE_MON && date( "j", time( ) ) == $REMIND_DATE_DAY )
			{
				$FLAG = 1;
			}
		}
		if ( $FLAG == 1 )
		{
			echo "    <tr height=\"20\">\r\n      <td width=\"2%\">&nbsp;</td>\r\n      <td>";
			echo substr( $REMIND_TIME, 0, 5 );
			echo "        <a href=\"#\" onclick=\"javascript:my_note1(";
			echo $AFF_ID;
			echo ");\">\r\n        ";
			echo $CONTENT;
			echo "        </a></td>\r\n    </tr>\r\n    <tr>\r\n      <td colspan=\"4\" bgcolor=\"";
			echo $tdbgcolor;
			echo "\" height=\"1\"></td>\r\n    </tr>\r\n    ";
		}
		if ( 3 < $count )
		{
			break;
		}
	}
	if ( $CAL_COUNT == 0 )
	{
		echo "<tr height=20><td width='5%'>&nbsp;</td><td>";
		echo "暂无常务安排";
		echo "</td></tr>";
		echo "    <tr>\r\n      <td colspan=\"4\" bgcolor=\"";
		echo $tdbgcolor;
		echo "\"></td>\r\n    </tr>\r\n    \r\n    ";
	}
}
echo "  </table>\r\n</div>\r\n<br>\r\n";
?>

⌨️ 快捷键说明

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