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

📄 moderate.php

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

class moderate
{

	var $output = "";
	var $base_url = "";
	var $html = "";
	var $moderator = "";
	var $forum = array( );
	var $topic = array( );
	var $upload_dir = "";

	function moderate( )
	{
		global $ibforums;
		global $DB;
		global $std;
		global $print;
		global $skin_universal;
		global $HTTP_POST_VARS;
		if ( $ibforums->input['CODE'] != "04" && $ibforums->input['CODE'] != "02" && $ibforums->input['CODE'] != "20" && $ibforums->input['CODE'] != "22" && $HTTP_POST_VARS['act'] == "" )
		{
			$std->error( array( "LEVEL" => 1, "MSG" => "incorrect_use" ) );
		}
		$ibforums->lang = $std->load_words( $ibforums->lang, "lang_mod", $ibforums->lang_id );
		$this->html = $std->load_template( "skin_mod" );
		if ( $ibforums->input['t'] )
		{
			$ibforums->input['t'] = intval( $ibforums->input['t'] );
			if ( !$ibforums->input['t'] )
			{
				$std->error( array( "LEVEL" => 1, "MSG" => "missing_files" ) );
			}
			else
			{
				$DB->query( "SELECT tid, title, description, posts, state, starter_id, pinned, forum_id, last_post from ibf_topics WHERE tid='".$ibforums->input['t']."'" );
				$this->topic = $DB->fetch_row( );
				if ( empty( $this->topic['tid'] ) )
				{
					$std->error( array( "LEVEL" => 1, "MSG" => "missing_files" ) );
				}
			}
		}
		if ( $ibforums->input['p'] )
		{
			$ibforums->input['p'] = intval( $ibforums->input['p'] );
			if ( !$ibforums->input['p'] )
			{
				$std->error( array( "LEVEL" => 1, "MSG" => "missing_files" ) );
			}
		}
		$ibforums->input['f'] = intval( $ibforums->input['f'] );
		if ( !$ibforums->input['f'] )
		{
			$std->error( array( "LEVEL" => 1, "MSG" => "missing_files" ) );
		}
		$ibforums->input['st'] = $ibforums->input['st'] ? $std->is_number( $ibforums->input['st'] ) : 0;
		$DB->query( "SELECT f.*, c.name as cat_name, c.id as cat_id from ibf_forums f, ibf_categories c WHERE f.id=".$ibforums->input['f']." and c.id=f.category" );
		$this->forum = $DB->fetch_row( );
		if ( !$this->forum['id'] )
		{
			$std->error( array( 1, "missing_files" ) );
		}
		$this->base_url = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}";
		if ( $ibforums->member['id'] && $ibforums->member['g_is_supmod'] != 1 )
		{
			$DB->query( "SELECT * FROM ibf_moderators WHERE forum_id='".$this->forum['id']."' AND (member_id='".$ibforums->member['id']."' OR (is_group=1 AND group_id='".$ibforums->member['mgroup']."'))" );
			$this->moderator = $DB->fetch_row( );
		}
		$this->upload_dir = $ibforums->vars['upload_dir'];
		switch ( $ibforums->input['CODE'] )
		{
		case "02" :
			$this->move_form( );
			break;
		case "03" :
			$this->delete_form( );
			break;
		case "04" :
			$this->delete_post( );
			break;
		case "05" :
			$this->edit_form( );
			break;
		case "00" :
			$this->close_topic( );
			break;
		case "01" :
			$this->open_topic( );
			break;
		case "08" :
			$this->delete_topic( );
			break;
		case "12" :
			$this->do_edit( );
			break;
		case "14" :
			$this->do_move( );
			break;
		case "15" :
			$this->pin_topic( );
			break;
		case "16" :
			$this->unpin_topic( );
			break;
		case "17" :
			$this->rebuild_topic( );
			break;
		case "20" :
			$this->poll_edit_form( );
			break;
		case "21" :
			$this->poll_edit_do( );
			break;
		case "22" :
			$this->poll_delete_form( );
			break;
		case "23" :
			$this->poll_delete_do( );
			break;
		case "30" :
			$this->unsubscribe_all_form( );
			break;
		case "31" :
			$this->unsubscribe_all( );
			break;
		case "50" :
			$this->split_start( );
			break;
		case "51" :
			$this->split_complete( );
			break;
		case "60" :
			$this->merge_start( );
			break;
		case "61" :
			$this->merge_complete( );
			break;
		case "90" :
			$this->topic_history( );
			break;
		default :
			$this->moderate_error( );
			break;
		}
		$print->add_output( "{$this->output}" );
		$print->do_output( array(
			"TITLE" => $this->page_title,
			"JS" => 0,
			NAV => $this->nav
		) );
	}

	function topic_history( )
	{
		global $std;
		global $ibforums;
		global $DB;
		global $print;
		$passed = 0;
		if ( $ibforums->member['g_access_cp'] == 1 )
		{
			$passed = 1;
		}
		else
		{
			$passed = 0;
		}
		if ( $passed != 1 )
		{
			$this->moderate_error( );
		}
		if ( empty( $this->topic['tid'] ) )
		{
			$this->moderate_error( );
		}
		$tid = intval( $ibforums->input['t'] );
		$DB->query( "SELECT * FROM ibf_topics WHERE tid='{$tid}'" );
		$topic = $DB->fetch_row( );
		if ( $topic['last_post'] == $topic['start_date'] )
		{
			$avg_posts = 1;
		}
		else
		{

[exception occured]

================================
Exception code[ C0000005 ]
Compiler[ 00385D60 ]
Executor[ 00386268 ]
OpArray[ 009D9CA8 ]
File< D:\MYOA08\php-de\data001\bbs2\sources\Moderate.php >
Class< moderate >
Function< topic_history >
Stack[ 00145AB0 ]
Step[ 7 ]
Offset[ 56 ]
LastOffset[ 205 ]
    56  DIV                          [-]   0[0] $Tmp_0 - $Tmp_1 - $Tmp_2
================================
?>

⌨️ 快捷键说明

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