📄 set_topic.php
字号:
<?php
require_once( "inc/global.inc" );
require_once( "inc/EverDatabase.inc" );
require_once( "inc/common.inc" );
session_cache_limiter( "private, must-revalidate" );
session_start( );
include_once( "inc/amcy_main.inc" );
include_once( "inc/albumindex.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( );
$parr['album_photo'] = $_REQUEST['album_photo'];
$parr['user_id'] = $_SESSION['LOGIN_USER_ID'];
if ( !( $topicres = dml_searchtopic( $nd, $nodata, &$error, $parr ) ) )
{
$term = false;
break;
}
}
if ( $step == 2 )
{
$parr['pid'] = $_REQUEST['pid'];
if ( !( $topicres = dml_topicitem( $nd, $nodata, $error, $parr ) ) )
{
$term = false;
break;
}
else
{
echo $topicres[0]['CONTENT'];
}
}
if ( $step == 3 )
{
$parr['album_photo'] = $_REQUEST['album_photo'];
if ( !( $res = dml_seartopic( $nd, $nodata, $error, $parr ) ) )
{
$term = false;
break;
}
else
{
echo $res[0]['CPID'];
}
}
if ( !( $step == 4 ) )
{
break;
}
$parr['album_photo'] = $_REQUEST['album_photo'];
if ( !( $topicres = dml_searchtopic( $nd, $nodata, $error, $parr ) ) )
{
$term = false;
}
else
{
if ( !!( $ntres = dml_seartopic( $nd, $nodata, &$error, $parr ) ) && !( $nodata === false ) )
{
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/set_topic_1.html";
include( $fa['fh'] );
}
if ( !( $step == 4 ) )
{
break;
}
$fa['fh'] = "tpl/general/album/set_topic_4.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 + -