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

📄 amcy_list.php

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

require_once( "inc/global.inc" );
require_once( "inc/EverDatabase.inc" );
require_once( "inc/common.inc" );
require_once( "inc/utility.php" );
com_sesnstart( );
include_once( "inc/amcy_list.inc" );
include_once( "inc/albumindex.inc" );
include_once( "general/album/inc/function_picture.inc" );
$step = isset( $_REQUEST['step'] ) ? ereg( "^1|2|3|4\$", $_REQUEST['step'] ) ? $_REQUEST['step'] : 1 : 1;
$term = true;
$error = array( );
$error['title'] = "错误";
$error['code'] = "error";
while ( $term )
{
	if ( !isset( $nd ) || !is_object( $nd ) )
	{
		$nd = "";
		if ( !dml_opendb( $nd, $GLOBALEX['nd'], $GLOBALEX['db'] ) )
		{
			$term = false;
			$error['msg'] = "数据库连接失败,请与技术支持联系(Email:".$GLOBALEX['nd']['email'].")。";
			break;
		}
	}
	if ( $step == 1 )
	{
		$parr = array( );
		if ( $_REQUEST['ord'] != "" )
		{
			$parr['ord'] = $_REQUEST['ord'];
		}
		else
		{
			$parr['ord'] = "ASC";
		}
		$parr['pid'] = $_REQUEST['pid'];
		$parr['user_id'] = $_SESSION['LOGIN_USER_ID'];
		if ( !( $total_cnt = dml_getalbumnums( $nd, $nodata, &$error, $parr ) ) && $nodata === false )
		{
			$term = false;
			break;
		}
		$page_record = 15;
		if ( !isset( $_REQUEST['page_no'] ) || !is_numeric( $_REQUEST['page_no'] ) )
		{
			$page_no = 1;
		}
		else
		{
			$page_no = $_REQUEST['page_no'];
		}
		if ( $page_no < 1 )
		{
			$page_no = 1;
		}
		if ( $total_cnt % $page_record == 0 )
		{
			$page_total = $total_cnt / $page_record;
		}
		else
		{
			$page_total = floor( $total_cnt / $page_record ) + 1;
		}
		if ( $page_total <= $page_no )
		{
			$page_no = $page_total;
		}
		$parr['page_no'] = $page_no;
		$parr['page_record'] = $page_record;
		$result = array( );
		if ( !( $result = dml_getalbumlistpage( $nd, $nodata, &$error, $parr ) ) && $nodata === true )
		{
			$term = false;
			break;
		}
		if ( !( $roleres = dml_getalbumrole( $nd, $nodata, $error, $parr ) ) )
		{
			$term = false;
			break;
		}
		else
		{
			$i = 0;
			for ( ;	$i < count( $result );	++$i	)
			{
				$albumcategoryid[$i] = $result[$i]['PID'];
				$albumcategorytitle[$i] = $result[$i]['TITLE'];
				$flager[$i] = $result[$i]['FLAGOR'];
				$creadata[$i] = $result[$i]['CREATE_DATA'];
				$userres[$i] = $result[$i]['USER_NAME'];
			}
			$path = $_SERVER['DOCUMENT_ROOT'];
			$dir = $path."attachment/album/".$_REQUEST['pid'];
			$filespace = dirsize( $dir );
			if ( !( $s_res = dml_getgcategorymax_space( $nd, $nodata, $error, $parr ) ) && $nodata === true )
			{
				$term = false;
				break;
			}
			$max_space = $s_res[0]['MAX_SPACE'] * 1024 * 1024;
			if ( $max_space != 0 )
			{
				$s_space = "此类剩余空间".number_format( ( $max_space - $filespace ) / 1024 / 1024, 2 )."M";
			}
			else
			{
				$s_space = "此类无容量限制";
			}
		}
	}
	if ( $step == 2 )
	{
		$parr['user_id'] = $_SESSION['LOGIN_USER_ID'];
		if ( $_REQUEST['ord'] != "" )
		{
			$parr['ord'] = $_REQUEST['ord'];
		}
		else
		{
			$parr['ord'] = "ASC";
		}
		if ( !( $total_cnt = dml_getsharealbumnums( $nd, $nodata, &$error, $parr ) ) && $nodata === false )
		{
			$term = false;
			break;
		}
		$page_record = 15;
		if ( !isset( $_REQUEST['page_no'] ) || !is_numeric( $_REQUEST['page_no'] ) )
		{
			$page_no = 1;
		}
		else
		{
			$page_no = $_REQUEST['page_no'];
		}
		if ( $page_no < 1 )
		{
			$page_no = 1;
		}
		if ( $total_cnt % $page_record == 0 )
		{
			$page_total = $total_cnt / $page_record;
		}
		else
		{
			$page_total = floor( $total_cnt / $page_record ) + 1;
		}
		if ( $page_total <= $page_no )
		{
			$page_no = $page_total;
		}
		$parr['page_no'] = $page_no;
		$parr['page_record'] = $page_record;
		$result = array( );
		if ( !( $result = getsharealbumpage( $nd, $nodata, &$error, $parr ) ) && $nodata === true )
		{
			$term = false;
			break;
		}
	}
	if ( $step == 3 )
	{
		$result = array( );
		$parr['user_id'] = $_SESSION['LOGIN_USER_ID'];
		if ( $_REQUEST['ord'] != "" )
		{
			$parr['ord'] = $_REQUEST['ord'];
		}
		else
		{
			$parr['ord'] = "ASC";
		}
		if ( !( $total_cnt = dml_getallalbumnums( $nd, $nodata, &$error, $parr ) ) && $nodata === false )
		{
			$term = false;
			break;
		}
		$page_record = 15;
		if ( !isset( $_REQUEST['page_no'] ) || !is_numeric( $_REQUEST['page_no'] ) )
		{
			$page_no = 1;
		}
		else
		{
			$page_no = $_REQUEST['page_no'];
		}
		if ( $page_no < 1 )
		{
			$page_no = 1;
		}
		if ( $total_cnt % $page_record == 0 )
		{
			$page_total = $total_cnt / $page_record;
		}
		else
		{
			$page_total = floor( $total_cnt / $page_record ) + 1;
		}
		if ( $page_total <= $page_no )
		{
			$page_no = $page_total;
		}
		$parr['page_no'] = $page_no;
		$parr['page_record'] = $page_record;
		if ( !( $result = dml_getallalbumlistpage( $nd, $nodata, $error, $parr ) ) && $nodata === false )
		{
			$term = false;
			break;
		}
	}
	if ( !( $step == 4 ) )
	{
		break;
	}
	$parr['pid'] = $_REQUEST['pid'];
	$parr['userid'] = $_SESSION['LOGIN_USER_ID'];
	if ( setalbumflag( $nd, $nodata, &$error, $parr ) )
	{
		break;
	}
	$term = false;
	break;
}
if ( isset( $nd ) && is_object( $nd ) )
{
	@com_closedb( $nd, $term, $GLOBALEX['db'] );
}
$fa = array( );
while ( $term )
{
	if ( $step == 1 )
	{
		if ( $_REQUEST['ord'] != "" || $_REQUEST['page_no'] != "" )
		{
			$fa['fh'] = "tpl/general/album/amcy_list_1_1.html";
		}
		else
		{
			$fa['fh'] = "tpl/general/album/amcy_list_1.html";
		}
		include( $fa['fh'] );
	}
	if ( $step == 2 )
	{
		if ( $_REQUEST['ord'] != "" || $_REQUEST['page_no'] != "" )
		{
			$fa['fh'] = "tpl/general/album/amcy_list_2_1.html";
		}
		else
		{
			$fa['fh'] = "tpl/general/album/amcy_list_2.html";
		}
		include( $fa['fh'] );
	}
	if ( !( $step == 3 ) )
	{
		break;
	}
	if ( $_REQUEST['ord'] != "" || $_REQUEST['page_no'] != "" )
	{
		$fa['fh'] = "tpl/general/album/amcy_list_3_1.html";
	}
	else
	{
		$fa['fh'] = "tpl/general/album/amcy_list_3.html";
	}
	include( $fa['fh'] );
	break;
}
if ( !$term )
{
	$fa['fh_error'] = "tpl/error.html";
	include( $fa['fh_error'] );
}
?>

⌨️ 快捷键说明

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