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

📄 ad_settings.php

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

class ad_settings
{

	var $base_url;

	function ad_settings( )
	{
		global $IN;
		global $INFO;
		global $DB;
		global $SKIN;
		global $ADMIN;
		global $std;
		global $MEMBER;
		global $GROUP;
		$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
		foreach ( $tmp_in as $k => $v )
		{
		}
		switch ( $IN['code'] )
		{
		case "phpinfo" :
			phpinfo( );
			exit( );
		case "cookie" :
			$this->cookie( );
			break;
		case "docookie" :
			$this->save_config( array( "cookie_domain", "cookie_id", "cookie_path" ) );
			break;
		case "secure" :
			$this->secure( );
			break;
		case "dosecure" :
			$this->save_config( array( "reg_antispam", "disable_admin_anon", "disable_online_ip", "disable_reportpost", "allow_dynamic_img", "session_expiration", "match_browser", "allow_dup_email", "allow_images", "force_login", "no_reg", "allow_flash", "new_reg_notify", "use_mail_form", "flood_control", "allow_online_list", "allow_online_guest", "reg_auth_type" ) );
			break;
		case "post" :
			$this->post( );
			break;
		case "dopost" :
			$this->save_config( array( "poll_tags", "guest_name_pre", "guest_name_suf", "max_w_flash", "max_h_flash", "hot_topic", "display_max_topics", "display_max_posts", "max_emos", "max_images", "emo_per_row", "etfilter_punct", "etfilter_shout", "strip_quotes", "max_post_length", "show_img_upload", "pre_polls", "pre_moved", "pre_pinned", "img_ext", "show_lastv_T", "show_lastv_P", "show_lastv_M" ) );
			break;
		case "avatars" :
			$this->avatars( );
			break;
		case "doavatars" :
			$this->save_config( array( "subs_autoprune", "topicpage_contents", "postpage_contents", "allow_skins", "max_sig_length", "sig_allow_ibc", "sig_allow_html", "avatar_ext", "avatar_url", "avup_size_max", "avatars_on", "avatar_dims", "avatar_def", "gallery_size", "max_location_length", "max_interest_length", "post_titlechange", "guests_ava", "guests_img", "guests_sig" ) );
			break;
		case "dates" :
			$this->dates( );
			break;
		case "dodates" :
			$this->save_config( array( "time_offset", "clock_short", "clock_joined", "clock_lastvisit", "clock_long", "time_adjust" ) );
			break;
		case "calendar" :
			$this->calendar( );
			break;
		case "docalendar" :
			$this->save_config( array( "show_calendar", "calendar_limit", "year_limit", "start_year" ) );
			break;
		case "cpu" :
			$this->cpu( );
			break;
		case "docpu" :
			$this->save_config( array( "min_search_word", "short_forum_jump", "no_au_forum", "no_au_topic", "au_cutoff", "load_limit", "show_active", "show_birthdays", "show_totals", "allow_search", "search_post_cut", "show_user_posted", "nocache" ) );
			break;
		case "email" :
			$this->email( );
			break;
		case "doemail" :
			$this->save_config( array( "email_in", "email_out", "mail_method", "smtp_host", "smtp_port", "smtp_user", "smtp_pass" ) );
			break;
		case "url" :
			$this->url( );
			break;
		case "dourl" :
			$this->save_config( array( "number_format", "html_dir", "safe_mode_skins", "board_name", "board_url", "home_name", "home_url", "disable_gzip", "html_url", "upload_url", "upload_dir", "print_headers", "header_redirect", "debug_level", "sql_debug" ) );
			break;
		case "pm" :
			$this->pm( );
			break;
		case "dopm" :
			$this->save_config( array( "show_max_msg_list", "msg_allow_code", "msg_allow_html" ) );
			break;
		case "news" :
			$this->news( );
			break;
		case "donews" :
			$this->save_config( array( "news_forum_id", "index_news_link" ) );
			break;
		case "coppa" :
			$this->coppa( );
			break;
		case "docoppa" :
			$this->save_config( array( "use_coppa", "coppa_fax", "coppa_address" ) );
			break;
		case "board" :
			$this->board( );
			break;
		case "doboard" :
			$this->save_config( array( "board_offline", "offline_msg" ) );
			break;
		case "bw" :
			$this->badword( );
			break;
		case "bw_add" :
			$this->add_badword( );
			break;
		case "bw_remove" :
			$this->remove_badword( );
			break;
		case "bw_edit" :
			$this->edit_badword( );
			break;
		case "bw_doedit" :
			$this->doedit_badword( );
			break;
		case "emo" :
			$this->emoticons( );
			break;
		case "emo_add" :
			$this->add_emoticons( );
			break;
		case "emo_remove" :
			$this->remove_emoticons( );
			break;
		case "emo_edit" :
			$this->edit_emoticons( );
			break;
		case "emo_doedit" :
			$this->doedit_emoticons( );
			break;
		case "emo_upload" :
			$this->upload_emoticon( );
		case "count" :
			$this->countstats( );
			break;
		case "docount" :
			$this->docount( );
			break;
		default :
			$this->cookie( );
			break;
		}
	}

	function coppa( )
	{
		global $IN;
		global $INFO;
		global $DB;
		global $SKIN;
		global $ADMIN;
		global $std;
		global $MEMBER;
		global $GROUP;
		$this->common_header( "docoppa", "COPPA 设置", "你可以修改下面的参数设置。请注意:如果使用 [<a href=\"http://www.ftc.gov/opa/1999/9910/childfinal.htm\" target=\"_blank\">COPPA</a>] - (国际儿童网络保护法),那么如果注册用户年龄小于13岁,就必须经过父母书面(传真或电子邮件)同意才能正式成为注册会员。" );
		$ADMIN->html .= $SKIN->add_td_row( array(
			"<b>是否使用 COPPA 注册系统?</b>",
			$SKIN->form_yes_no( "use_coppa", $INFO['use_coppa'] )
		) );
		$ADMIN->html .= $SKIN->add_td_row( array(
			"<b>接收 COPPA 表单的传真号码:</b>",
			$SKIN->form_input( "coppa_fax", $form_array, $INFO['coppa_fax'] )
		) );
		$ADMIN->html .= $SKIN->add_td_row( array(
			"<b>接收 COPPA 表单的邮件地址:</b>",
			$SKIN->form_textarea( "coppa_address", $INFO['coppa_address'] )
		) );
		$this->common_footer( );
	}

	function docount( )
	{
		global $IN;
		global $INFO;
		global $DB;
		global $SKIN;
		global $ADMIN;
		global $std;
		global $MEMBER;
		global $GROUP;
		if ( !$IN['posts'] && !$IN['members'] && !$IN['lastreg'] )
		{
			$ADMIN->error( "没有刷新统计数据!" );
		}
		$stats = array( );
		if ( $IN['posts'] )
		{
			$DB->query( "SELECT COUNT(pid) as posts FROM ibf_posts WHERE queued <> 1" );
			$r = $DB->fetch_row( );
			$stats['TOTAL_REPLIES'] = $r['posts'];
			$stats['TOTAL_REPLIES'] < 1 ? 0 : $stats['TOTAL_REPLIES'];
			$DB->query( "SELECT COUNT(tid) as topics FROM ibf_topics WHERE approved = 1" );
			$r = $DB->fetch_row( );
			$stats['TOTAL_TOPICS'] = $r['topics'];
			$stats['TOTAL_TOPICS'] < 1 ? 0 : $stats['TOTAL_TOPICS'];
			$stats['TOTAL_REPLIES'] -= $stats['TOTAL_TOPICS'];
		}
		if ( $IN['members'] )
		{
			$DB->query( "SELECT COUNT(id) as members from ibf_members WHERE mgroup <> '".$INFO['auth_group']."'" );
			$r = $DB->fetch_row( );
			$stats['MEM_COUNT'] = $r['members'];
			--$stats['MEM_COUNT'];
			$stats['MEM_COUNT'] < 1 ? 0 : $stats['MEM_COUNT'];
		}
		if ( $IN['lastreg'] )
		{
			$DB->query( "SELECT id, name FROM ibf_members WHERE mgroup <> '".$INFO['auth_group']."' ORDER BY id DESC LIMIT 0,1" );
			$r = $DB->fetch_row( );
			$stats['LAST_MEM_NAME'] = $r['name'];
			$stats['LAST_MEM_ID'] = $r['id'];
		}
		if ( $IN['online'] )
		{
			$stats['MOST_DATE'] = time( );
			$stats['MOST_COUNT'] = 1;
		}
		if ( 0 < count( $stats ) )
		{
			$db_string = $DB->compile_db_update_string( $stats );
			$DB->query( "UPDATE ibf_stats SET {$db_string}" );
		}
		else
		{
			$ADMIN->error( "没有刷新任何数据!" );
		}
		$ADMIN->done_screen( "统计数据已经刷新", "管理中心首页", "act=index" );
	}

	function countstats( )
	{
		global $IN;
		global $INFO;
		global $DB;
		global $SKIN;
		global $ADMIN;
		global $std;
		global $MEMBER;
		global $GROUP;
		$ADMIN->page_detail = "请根据提示设置统计数据刷新的参数。";
		$ADMIN->page_title = "刷新统计数据";
		$ADMIN->html .= $SKIN->start_form( array(
			1 => array( "code", "docount" ),
			2 => array( "act", "op" )
		) );
		$SKIN->td_header[] = array( "统计内容", "70%" );
		$SKIN->td_header[] = array( "选项", "30%" );
		$ADMIN->html .= $SKIN->start_table( "刷新统计数据" );
		$ADMIN->html .= $SKIN->add_td_row( array(
			"重置主题发表和回复统计数据?",
			$SKIN->form_dropdown( "posts", array(
				0 => array( 1, "是" ),
				1 => array( 0, "否" )
			) )
		) );
		$ADMIN->html .= $SKIN->add_td_row( array(
			"重置注册用户统计数据?",
			$SKIN->form_dropdown( "members", array(
				0 => array( 1, "是" ),
				1 => array( 0, "否" )
			) )
		) );
		$ADMIN->html .= $SKIN->add_td_row( array(
			"重置最后注册用户数据?",
			$SKIN->form_dropdown( "lastreg", array(
				0 => array( 1, "是" ),
				1 => array( 0, "否" )
			) )
		) );
		$ADMIN->html .= $SKIN->add_td_row( array(
			"重置在线峰值统计数据?",
			$SKIN->form_dropdown( "online", array(
				0 => array( 0, "否" ),
				1 => array( 1, "是" )
			) )
		) );
		$ADMIN->html .= $SKIN->end_form( "重置这些统计数据" );
		$ADMIN->html .= $SKIN->end_table( );
		$ADMIN->output( );
	}

	function calendar( )
	{
		global $IN;
		global $INFO;
		global $DB;
		global $SKIN;
		global $ADMIN;
		global $std;
		global $MEMBER;
		global $GROUP;
		$this->common_header( "docalendar", "日历事件设置", "你可以修改下面的参数设置" );
		$INFO['start_year'] = isset( $INFO['start_year'] ) ? $INFO['start_year'] : 2001;
		$INFO['year_limit'] = isset( $INFO['year_limit'] ) ? $INFO['year_limit'] : 5;
		$ADMIN->html .= $SKIN->add_td_row( array(
			"<b>是否显示即将来临的事件?</b><br>选择是否在论坛首页统计部分显示即将来临的事件。",
			$SKIN->form_yes_no( "show_calendar", $INFO['show_calendar'] )
		) );
		$ADMIN->html .= $SKIN->add_td_row( array(
			"<b>显示即将来临事件的天数:</b><br>如果即将来临事件选项没有打开,本选项将不起作用!",
			$SKIN->form_input( "calendar_limit", $INFO['calendar_limit'] )
		) );
		$ADMIN->html .= $SKIN->add_td_row( array(
			"<b>日历事件页面中开始年份:</b><br>如果论坛日历事件选项没有打开,本选项将不起作用!",
			$SKIN->form_input( "start_year", $INFO['start_year'] )
		) );
		$ADMIN->html .= $SKIN->add_td_row( array(
			"<b>日历事件页面中结束年份:</b><br>如果论坛日历事件选项没有打开,本选项将不起作用!<br>例如:开始年份2002,如果填5,那么结束年份为2007",
			$SKIN->form_input( "year_limit", $INFO['year_limit'] )
		) );
		$this->common_footer( );
	}

	function board( )
	{
		global $IN;
		global $INFO;
		global $DB;

⌨️ 快捷键说明

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