📄 album_set.php
字号:
<?php
require_once( "inc/global.inc" );
require_once( "inc/EverDatabase.inc" );
require_once( "inc/common.inc" );
require_once( "inc/auth.php" );
session_cache_limiter( "private, must-revalidate" );
session_start( );
include_once( "inc/album_set.inc" );
include_once( "general/album/inc/function_picture.inc" );
include_once( "inc/utility.php" );
$step = isset( $_REQUEST['step'] ) ? ereg( "^1|2|3|4|5|6\$", $_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 && !( $res = dml_getcategory( $nd, $nodata, $error, $parr ) ) && $nodata === false )
{
$term = false;
break;
}
if ( $step == 2 )
{
$result = array( );
if ( ( $result = dml_getcategorynum( &$nd, &$nodata, &$error, &$parr ) ) && $nodata === false )
{
$term = false;
break;
}
}
if ( $step == 3 )
{
$parr['usr'] = $_SESSION['LOGIN_USER_ID'];
$parr['title'] = $_REQUEST['title'];
if ( 1000 <= trim( $_REQUEST['max_space'] ) )
{
$parr['max_space'] = 1000;
}
else
{
$parr['max_space'] = $_REQUEST['max_space'];
}
$parr['to_id'] = $_REQUEST['TO_ID'];
$parr['copy_to_id'] = $_REQUEST['COPY_TO_ID'];
if ( !dml_setcategory( $nd, $nodata, &$error, $parr ) )
{
$term = false;
break;
}
}
if ( $step == 4 )
{
$parr['pid'] = $_REQUEST['pid'];
if ( !( $result = dml_checkalbumsubject( &$nd, &$nodata, &$error, &$parr ) ) && $nodata === false )
{
$term = false;
break;
}
if ( $result[0]['CPID'] <= 0 && !dml_delcategory( $nd, $nodata, $error, $parr ) )
{
$term = false;
break;
}
}
if ( $step == 5 )
{
$parr['pid'] = $_REQUEST['pid'];
if ( !( $res = dml_getcategoryinfo( $nd, $nodata, $error, $parr ) ) )
{
$term = false;
break;
}
else
{
$path = $_SERVER['DOCUMENT_ROOT'];
$dir = $path."attachment/album/".$res[0]['PID'];
$filespace = number_format( dirsize( $dir ) / 1024 / 1024, 2 );
}
}
if ( !( $step == 6 ) )
{
break;
}
$parr['pid'] = $_REQUEST['pid'];
$parr['title'] = $_REQUEST['title'];
if ( 1000 <= trim( $_REQUEST['max_space'] ) )
{
$parr['max_space'] = 1000;
}
else
{
$parr['max_space'] = $_REQUEST['max_space'];
}
$parr['manager'] = $_REQUEST['TO_ID'];
$parr['browse'] = $_REQUEST['COPY_TO_ID'];
if ( dml_modifycategoryinfo( $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 )
{
$fa['fh'] = "tpl/general/album/album_set_1.html";
include( $fa['fh'] );
}
if ( $step == 2 )
{
if ( $result[0]['CNUM'] < 7 )
{
$fa['fh'] = "tpl/general/album/album_set_2.html";
}
else
{
$fa['fh'] = "tpl/general/album/album_set_2_1.html";
}
include( $fa['fh'] );
}
if ( $step == 3 )
{
$fa['fh'] = "tpl/general/album/album_set_3.html";
include( $fa['fh'] );
}
if ( $step == 4 )
{
$fa['fh'] = "tpl/general/album/album_set_4.html";
include( $fa['fh'] );
}
if ( $step == 5 )
{
$fa['fh'] = "tpl/general/album/album_set_5.html";
include( $fa['fh'] );
}
if ( !( $step == 6 ) )
{
break;
}
$fa['fh'] = "tpl/general/album/album_set_6.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 + -