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

📄 search_pub_file.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
📖 第 1 页 / 共 2 页
字号:
		{
			$new_priv = 1;
		}
		if ( find_id( $manage_user, $_SESSION['LOGIN_USER_ID'] ) )
		{
			$manage_priv = 1;
		}
		if ( find_id( $down_user, $_SESSION['LOGIN_USER_ID'] ) )
		{
			$down_priv = 1;
		}
		$attachment_id = $row['ATTACHMENT_ID'];
		$attachment_name = $row['ATTACHMENT_NAME'];
		$doc_size = strlen( $row['SUBJECT'] ) + strlen( $row['CONTENT'] );
		$attachment_id_array = explode( ",", $attachment_id );
		$attachment_name_array = explode( "*", $attachment_name );
		$i = 0;
		for ( ;	$i < count( $attachment_id_array );	++$i	)
		{
			$doc_size += attach_size( $attachment_id_array[$i], $attachment_name_array[$i] );
		}
		if ( $doc_size <= 1024 )
		{
			$doc_size_str = "<span style=\"color:#000000;font-size:9px\">".$doc_size."B</span>";
		}
		if ( 1024 < $doc_size )
		{
			$doc_size_str = "<span style=\"color:#000000;font-size:9px\">".round( $doc_size / 1024, 2 )."K</span>";
		}
		if ( 1048576 <= $doc_size )
		{
			$doc_size_str = "<span style=\"color:#000000;font-size:9px\">".round( $doc_size / 1048576, 2 )."M</span>";
		}
		if ( $attachment_id != "" )
		{
			unset( $at_img_title );
			$at_nm_count = sizeof( $attachment_name_array );
			$at_nm_amount = 0;
			while ( list( $key, $var ) = each( $attachment_name_array ) )
			{
				++$at_nm_amount;
				if ( $var != "" )
				{
					$am_size = attach_size( $attachment_id_array[$key], $attachment_name_array[$key] );
					if ( $am_size <= 1024 )
					{
						$am_size_str = "<span style=\"color:#000000;font-size:9px\">".$am_size."B</span>";
					}
					if ( 1024 < $am_size )
					{
						$am_size_str = "<span style=\"color:#000000;font-size:9px\">".round( $am_size / 1024, 2 )."K</span>";
					}
					if ( 1048576 <= $am_size )
					{
						$am_size_str = "<span style=\"color:#000000;font-size:9px\">".round( $am_size / 1048576, 2 )."M</span>";
					}
					$fileicon = getfilesuffixicon( $var );
					$imgicon = "<img src='".$fileicon."' align='center' bolder=0> ";
					$filesuffix = getfilesuffix( $var );
					if ( 28 < strlen( $var ) )
					{
						$subvar = substrgb( $var, 28, "..." ).".".$filesuffix;
					}
					else
					{
						$subvar = substrgb( $var, 28, "..." );
					}
					$ehash = $attachment_id_array[$key] * 3 + 2;
					$ename = urlencode( $attachment_name_array[$key] );
					if ( isofficeoffile( $var ) )
					{
						$js_cnt = $doc_count.$at_nm_amount;
						++$doc_office;
						$strvar = "\t\t\t\t\t  <a href=\"#\" id=\"fnid{$js_cnt}\"  onmouseover=\"MM_showMenu(window.mm_menu_{$js_cnt},80,0,null,'fnid{$js_cnt}');\" \r\n\t\t\t\t\t\t\t  onmouseout=\"MM_startTimeout();\" style=\"text-decoration:underline\">{$subvar}</a> {$am_size_str}";
						$str_down = "location='/inc/attach.php?ATTACHMENT_ID={$ehash}&ATTACHMENT_NAME={$ename}'";
						$str_view = " window.open('/iWebOffice/DocumentEdit.php?RecordID={$content_id}&EditType=0&UserName={$_SESSION['LOGIN_USER_ID']};&ATTACHMENT_ID={$ehash}&ATTACHMENT_NAME={$ename}',null,'menubar=0,toolbar=0,status=1,scrollbars=1,resizable=1')";
						$str_edit = " window.open('/iWebOffice/DocumentEdit.php?RecordID={$content_id}&EditType=2&UserName={$_SESSION['LOGIN_USER_ID']};&ATTACHMENT_ID={$ehash}&ATTACHMENT_NAME={$ename}',null,'menubar=0,toolbar=0,status=1,scrollbars=1,resizable=1')";
						$str_js .= "\t\t\t\t\t\t  window.mm_menu_{$js_cnt} = new Menu(\"root\",45,20,\"\",12,\"#000000\",\"#FFFFFF\",\"#CCCCCC\",\"#777777\",\"left\",\"middle\",8,-1,1000,-5,7,true,true,true,0,true,true);";
						if ( $down_priv == 1 )
						{
							$str_js .= "\t\t\t\t\t\t  mm_menu_{$js_cnt}.addMenuItem(\"下载 \",\"{$str_down}\");";
						}
						$str_js .= "\t\t\t\t\t\t  mm_menu_{$js_cnt}.addMenuItem(\"阅读\",\"{$str_view}\");";
						if ( $manage_priv == 1 )
						{
							$str_js .= "\t\t\t\t\t\t  mm_menu_{$js_cnt}.addMenuItem(\"编辑\",\"{$str_edit}\");";
						}
						$str_js .= "\t\t\t\t\t\t  mm_menu_{$js_cnt}.hideOnMouseOut=true;\r\n\t\t\t\t\t\t  mm_menu_{$js_cnt}.bgColor='#777777';";
					}
					else if ( $down_priv == 1 )
					{
						$strvar = "<a href=\"/inc/attach.php?ATTACHMENT_ID={$ehash}&ATTACHMENT_NAME={$ename}\">".$subvar."</a> {$am_size_str}";
					}
					else
					{
						$strvar = "<span style='color:#666666' title='没有此附件的下载权限,可以联系管理员设置权限。'>".$subvar."</span>";
					}
					if ( $at_nm_amount == $at_nm_count )
					{
						$at_img_title .= $imgicon.$strvar;
					}
					else
					{
						$at_img_title .= $imgicon.$strvar."<br>";
					}
				}
			}
			$attachment_str = $at_img_title;
		}
		else
		{
			$attachment_str = "";
		}
		reset( $arflst );
		$ii = 0;
		for ( ;	$ii < count( $arflst['id'] );	++$ii	)
		{
			if ( $arflst['id'][$ii] == $sort_id )
			{
				$arflst['id'][$ii];
				$sort_name = $arflst['name'][$ii];
			}
		}
		unset( $array_fsort_s );
		$arflstone = getdirbysortid( &$array_fsort_s, $sort_id );
		unset( $sort_name_title );
		$i = count( $arflstone['id'] );
		for ( ;	0 < $i;	--$i	)
		{
			$sort_name_title .= " - ".$arflstone['name'][$i - 1];
		}
		if ( $_REQUEST['doc'] == "mydoc" )
		{
			$sort_name_title = "个人文件柜".$sort_name_title;
		}
		else
		{
			$sort_name_title = "公共文件柜".$sort_name_title;
		}
		if ( $doc_count % 2 == 1 )
		{
			$TableLine = "TableLine1";
		}
		else
		{
			$TableLine = "TableLine2";
		}
		echo "  <tr class=\"";
		echo $TableLine;
		echo "\">\r\n    <td nowrap >";
		$flink = "read.php";
		echo "<a href=\"/general/file_folder/";
		echo $flink;
		echo "?SORT_ID=";
		echo $sort_id;
		echo "&CONTENT_ID=";
		echo $content_id;
		echo "&PAGE_START=1\" title=\"";
		echo $content;
		echo "\">\r\n      ";
		echo $subject;
		echo "      </a>";
		echo $shareflag;
		echo "</td>\r\n    <td nowrap >";
		echo "<s";
		echo "pan title=\"";
		echo $sort_name_title;
		echo "\">\r\n      ";
		echo $sort_name;
		echo "      </span></td>\r\n    <td nowrap >";
		echo $attachment_str;
		echo "</td>\r\n    <td nowrap >";
		echo $date_str;
		echo "</td>\r\n    <td nowrap >";
		echo $doc_size_str;
		echo "</td>\r\n    <td nowrap >";
		if ( $manage_priv == 1 )
		{
			echo "<a href=\"/general/file_folder/edit.php?manage_priv=";
			echo $manage_priv;
			echo "&hid=hid&doc=";
			echo $_REQUEST['doc'];
			echo "&FILE_SORT=1&SORT_ID=";
			echo $sort_id;
			echo "&CONTENT_ID=";
			echo $content_id;
			echo "&PAGE_START=1&keyword=";
			echo $_REQUEST['keyword'];
			echo "&sens=";
			echo $_REQUEST['sens'];
			echo "&order=";
			echo $_REQUEST['order'];
			echo "\">编辑</a>&nbsp; <a href=\"javascript:delete_content(";
			echo $content_id;
			echo ",";
			echo $sort_id;
			echo ");\"> 删除</a> ";
		}
		echo "</td>\r\n  </tr>\r\n  ";
	}
	$str_js .= "mm_menu_{$js_cnt}.writeMenus();";
	echo "</table>\r\n";
	echo "<s";
	echo "cript>\r\nfunction mmLoadMenus() {\r\n";
	if ( $doc_office )
	{
		echo $str_js;
	}
	echo "}\r\n</SCRIPT>\r\n";
	echo "<S";
	echo "CRIPT language=JavaScript1.2>mmLoadMenus();</SCRIPT>\r\n<table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr class=\"TableLine2\">\r\n    <td width=\"83%\" align=\"right\">";
	disp( "sens=".$_REQUEST['sens']."&keyword=".$_REQUEST['keyword']."&doc=".$_REQUEST['doc']."&order=".$_REQUEST['order']."" );
	echo "</td>\r\n  </tr>\r\n</table>\r\n</body>\r\n</html>\r\n";
	echo "<s";
	echo "cript>\r\nfunction delete_content(CONTENT_ID,SORT_ID)\r\n{\r\n  msg=\"确定要删除该文件吗?这将不可恢复!\";\r\n  if(window.confirm(msg))\r\n  {\r\n    URL=\"/general/file_folder/delete.php?del=del&doc=";
	echo $_REQUEST['doc'];
	echo "&FILE_SORT=2&SORT_ID=\"+ SORT_ID +\"&PAGE_START=1&CONTENT_ID=\" + CONTENT_ID+\"&cur_page=";
	echo $cur_page;
	echo "&keyword=";
	echo $_REQUEST['keyword'];
	echo "&sens=";
	echo $_REQUEST['sens'];
	echo "&order=";
	echo $_REQUEST['order'];
	echo "\";\r\n\twindow.location=URL;\r\n  }\r\n}\r\n</script>";
}
?>

⌨️ 快捷键说明

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