【php开源代码栏目提醒】:网学会员为广大网友收集整理了,video.php,希望对大家有所帮助!
<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/
if ( !defined( "IN_SUPEV" ) || !defined( "IN_ADMINCP" ) )
{
exit( "Access Denied" );
}
include_once( LANG_PATH."./admincp/video.php" );
include_once( LANG_PATH."./admincp/global.php" );
$cids = 0;
$categorylist = array( );
$tabid = isset( $tabid ) ? $tabid : 0;
check_val( array( "vid_start", "vid_end", "author", "tags", "ip", "ctime_before", "ctime_after", "times_start", "times_end", "pushs_start", "pushs_end", "subs_start", "subs_end", "favs_start", "favs_end", "views_start", "views_end", "grades_start", "grades_end", "isorig", "isup", "readaccess", "utime_before", "utime_after", "ipublish" ), "", $selected_ );
$sql = "SELECT cid, subject FROM {$tablepre}categories ORDER BY displayorder";
$query = $db->query( $sql );
$categorylist[0] = "鍏ㄩ儴";
while ( $category = $db->fetch_array( $query ) )
{
$categorylist[$category['cid']] = $category['subject'];
}
$op_categorylist = array( );
foreach ( $categorylist as $key => $val )
{
$op_categorylist[$key] = model_optitem( $val );
}
$op_categorylist[0] = array( );
$infotypeidlist = array( );
$sql = "SELECT infotypeid, subject FROM {$tablepre}infotypes ";
$query = $db->query( $sql );
$infotypeidlist[0] = "鍏ㄩ儴";
while ( $infotypeid = $db->fetch_array( $query ) )
{
$infotypeidlist[$infotypeid['infotypeid']] = $infotypeid['subject'];
}
$op_infotypeidlist = array( );
foreach ( $infotypeidlist as $key => $val )
{
$op_infotypeidlist[$key] = model_optitem( $val );
}
$op_infotypeidlist[0] = array( );
if ( !empty( $selected_['cid'] ) )
{
$cidadd = array(
"cids" => "cid='".$selected_['cid']."'",
"and" => " AND ",
"v" => "v.",
"p" => "p."
);
}
else
{
$cidadd = $cids ? array(
"cids" => "cid IN ({$cids})",
"and" => " AND ",
"v" => "v.",
"p" => "p."
) : array( );
}
if ( !empty( $selected_['infotypeid'] ) )
{
$selected_sql['infotypeid'] = " and infotypeid='".$selected_['infotypeid']."' ";
}
if ( !empty( $selected_['subject'] ) )
{
$selected_sql['subject'] = " and (subject like '".$selected_['subject']."%' or subject like '%".$selected_['subject']."' or subject like '%".$selected_['subject']."%') ";
}
if ( empty( $publish ) )
{
$publish = 1;
$tabid = 0;
}
if ( $action == "video_list" )
{
$uitable = new ui_table_class( );
$uitable->name = "瑙嗛绠$悊";
if ( submitcheck( "action_submit" ) && is_array( $ridarray ) )
{
foreach ( $ridarray as $val )
{
$vidarr[] = intval( $val );
}
$vid_sql = implodeids( $vidarr );
if ( $operation == "op_publish" && !empty( $op_publish ) && $op_publish != "del" )
{
if ( !$confirmed )
{
}
$sql = "SELECT * FROM {$tablepre}videos WHERE vid IN ({$vid_sql})";
$query = $db->query( $sql );
$author = array( );
$authorid_arr = array( );
$author_arr = array( );
while ( $video = $db->fetch_array( $query ) )
{
$authorid_arr[] = $video['authorid'];
$author_arr[] = $video['author'];
}
$sql = "UPDATE {$tablepre}videos SET publish='".$op_publish."' WHERE vid IN ({$vid_sql})";
$db->query( $sql );
$author = array(
"authorid_arr" => $authorid_arr,
"author_arr" => $author_arr
);
$credits = array(
"publish" => $settings['credit_rule']['publishvideo'],
"delete" => $settings['credit_rule']['videodeleted']
);
$direction = array(
"from" => $publish,
"to" => $op_publish
);
credits_manage( $author, $credits, $direction, "videos" );
}
else if ( $operation == "del" )
{
$settings_video_set_utf8 = iconv_utf8( $settings['video_set'] );
include_once( SUPEV_ROOT."./api/insenz.php" );
$videoAccount = new videoclient_videoservice( INSENZ_APPID, $settings_video_set_utf8['siteId'], $settings_video_set_utf8['site