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

📄 saveconfig.php

📁 很不错的php聊天室源码,提供给大家学习
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php
session_start();
include "../include/query.php";
include "../include/const.php";
$w = $_GET["w"];
if($_SESSION["administrator"]=="")
{
	header("location:../notice.php?id=".admin_only);
	exit;
}
if($w=="main")
{
	$db = new db_query;
	$db->connect();
	$chatroom_name = $_POST["chatroom_name"];
	$chatroom_admin = $_POST["chatroom_admin"];
	$chatroom_adminpassword = $_POST["chatroom_adminpassword"];
	$chatroom_adminpassword_old = $_POST["chatroom_adminpassword_old"];
	$chatroom_maxonline = $_POST["chatroom_maxonline"];
	$chatroom_adminemail = $_POST["chatroom_adminemail"];
	$chatroom_affiche = $_POST["chatroom_affiche"];
	$chatroom_welcome = $_POST["chatroom_welcome"];
	$message_kick = $_POST["message_kick"];
	$message_bomb = $_POST["message_bomb"];
	$message_lock = $_POST["message_lock"];
	$message_login = $_POST["message_login"];
	$message_logout = $_POST["message_logout"];
	$message_leave = $_POST["message_leave"];
	$message_warn = $_POST["message_warn"];
	$message_changeroom = $_POST["message_changeroom"];
	$style_inputsayframe_background_color = $_POST["style_inputsayframe_background_color"];
	$style_inputsayframe_background_image = $_POST["style_inputsayframe_background_image"];
	$style_titleframe_background_color = $_POST["style_titleframe_background_color"];
	$style_titleframe_background_image = $_POST["style_titleframe_background_image"];
	$style_onlinelistframe_background_color = $_POST["style_onlinelistframe_background_color"];
	$style_onlinelistframe_background_image = $_POST["style_onlinelistframe_background_image"];
	$style_showmessageframe_background_color = $_POST["style_showmessageframe_background_color"];
	$style_showmessageframe_background_image = $_POST["style_showmessageframe_background_image"];
	$refresh_interval = $_POST["refresh_interval"];
	$say_maxlength = $_POST["say_maxlength"];
	$chatroom_default_split = $_POST["chatroom_default_split"];
	$notice_show_time = $_POST["notice_show_time"];
	$say_filter = $_POST["say_filter"];
	$say_enable_filter = $_POST["say_enable_filter"];
	$savecents_interval = $_POST["savecents_interval"];
	$kick_cantlogin_time = $_POST["kick_cantlogin_time"];
	$lock_cantlogin_time = $_POST["lock_cantlogin_time"];
	$enable_title = $_POST["enable_title"];
	$enable_picture = $_POST["enable_picture"];
	$img_verify = $_POST["img_verify"];
	$grade2_cents = $_POST["grade2_cents"];
	$grade3_cents = $_POST["grade3_cents"];
	$grade4_cents = $_POST["grade4_cents"];
	$grade5_cents = $_POST["grade5_cents"];
	$grade6_cents = $_POST["grade6_cents"];
	$grade7_cents = $_POST["grade7_cents"];
	$grade8_cents = $_POST["grade8_cents"];
	$grade9_cents = $_POST["grade9_cents"];
	$grade10_cents = $_POST["grade10_cents"];
	$enable_title = $_POST["enable_title"];
	$enable_picture = $_POST["enable_picture"];
	$enable_warn = $_POST["enable_warn"];
	$enable_kick = $_POST["enable_kick"];
	$enable_bomb = $_POST["enable_bomb"];
	$enable_lock = $_POST["enable_lock"];
	$enable_grade = $_POST["enable_grade"];
	$enable_unlock = $_POST["enable_unlock"];
	$enable_nolimit_grade = $_POST["enable_nolimit_grade"];
	$max_nosay_time = $_POST["max_nosay_time"];
	$enable_view_sysinfo = $_POST["enable_view_sysinfo"];
	$enable_view_userinfo = $_POST["enable_view_userinfo"];
	$enable_view_loginip = $_POST["enable_view_loginip"];
	$enable_view_grade = $_POST["enable_view_grade"];
	$enable_view_nameattrib = $_POST["enable_view_nameattrib"];
	$loginpage_affiche = $_POST["loginpage_affiche"];
	$log_pagesize = $_POST["log_pagesize"];
	$title_interval = $_POST["title_interval"];
	$optimize_time = $_POST["optimize_time"];
	$max_message_number = $_POST["max_message_number"];
	$chatroom_is_closed = $_POST["chatroom_is_closed"];
	$why_close = $_POST["why_close"];
	$name_max_length = $_POST["name_max_length"];
	$name_min_length = $_POST["name_min_length"];
	$password_min_length = $_POST["password_min_length"];
	$chatroom_admin_pic_verify = $_POST["chatroom_admin_pic_verify"];
	$enable_auto_clear_logs = $_POST["enable_auto_clear_logs"];
	$enable_auto_grade = $_POST["enable_auto_grade"];
	$enable_unauto_grade = $_POST["enable_unauto_grade"];
	$message_warning_out = $_POST["message_warning_out"];
	$warning_out_number = $_POST["warning_out_number"];
	$message_unlock = $_POST["message_unlock"];
	$enable_viewlog_grade = $_POST["enable_viewlog_grade"];
	$enable_viewlog_login = $_POST["enable_viewlog_login"];
	$enable_viewlog_name = $_POST["enable_viewlog_name"];
	$enable_viewlog_error = $_POST["enable_viewlog_error"];
	$enable_viewlog_manage = $_POST["enable_viewlog_manage"];
	$enable_delete_guestbook = $_POST["enable_delete_guestbook"];
	$enable_write_guestbook = $_POST["enable_write_guestbook"];
	$enable_deleteself_guestbook = $_POST["enable_deleteself_guestbook"];
	$guestbook_affiche = $_POST["guestbook_affiche"];
	$write_guestbook_interval = $_POST["write_guestbook_interval"];
	$enable_call = $_POST["enable_call"];
	$page_bgcolor = $_POST["page_bgcolor"];
	$taxis_pagesize = $_POST["taxis_pagesize"];
	$guestbook_pagesize = $_POST["guestbook_pagesize"];
	//change password
	if($chatroom_adminpassword!="")
	{
		$password = $db->result($db->query("select `value` from `config` where `name` = 'chatroom_adminpassword'"),0,"value");
		if(md5($chatroom_adminpassword_old)==$password)
		{
			$chatroom_adminpassword = md5($chatroom_adminpassword);
			$db->query("update `config` set `value` ='{$chatroom_adminpassword}' where `name` = 'chatroom_adminpassword'");
		}
		else
		{
			header("location:../notice.php?id=".admin_password_wrong);
			exit;
		}
	}
	$db->query("update `config` set `value` = '{$chatroom_name}' where `name`= 'chatroom_name'");
	$db->query("update `config` set `value` = '{$chatroom_admin}' where `name` = 'chatroom_admin'");
	$db->query("update `config` set `value` = '{$chatroom_maxonline}' where `name` = 'chatroom_maxonline'");
	$db->query("update `config` set `value` = '{$chatroom_adminemail}' where `name` = 'chatroom_adminemail'");
	$db->query("update `config` set `value` = '{$chatroom_affiche}' where `name` = 'chatroom_affiche'");
	$db->query("update `config` set `value` = '{$chatroom_welcome}' where `name` = 'chatroom_welcome'");
	$db->query("update `config` set `value` = '{$message_kick}' where `name` = 'message_kick'");
	$db->query("update `config` set `value` = '{$message_warn}' where `name` = 'message_warn'");
	$db->query("update `config` set `value` = '{$message_bomb}' where `name` = 'message_bomb'");
	$db->query("update `config` set `value` = '{$message_lock}' where `name` = 'message_lock'");
	$db->query("update `config` set `value` = '{$message_login}' where `name` = 'message_login'");
	$db->query("update `config` set `value` = '{$message_logout}' where `name` = 'message_logout'");
	$db->query("update `config` set `value` = '{$message_leave}' where `name` = 'message_leave'");
	$db->query("update `config` set `value` = '{$message_changeroom}' where `name` = 'message_changeroom'");
	$db->query("update `config` set `value` = '{$style_inputsayframe_background_color}' where `name` = 'style_inputsayframe_background_color'");
	$db->query("update `config` set `value` = '{$style_inputsayframe_background_image}' where `name` = 'style_inputsayframe_background_image'");
	$db->query("update `config` set `value` = '{$style_titleframe_background_color}' where `name` = 'style_titleframe_background_color'");
	$db->query("update `config` set `value` = '{$style_titleframe_background_image}' where `name` = 'style_titleframe_background_image'");
	$db->query("update `config` set `value` = '{$style_onlinelistframe_background_color}' where `name` = 'style_onlinelistframe_background_color'");
	$db->query("update `config` set `value` = '{$style_onlinelistframe_background_image}' where `name` = 'style_onlinelistframe_background_image'");
	$db->query("update `config` set `value` = '{$style_showmessageframe_background_color}' where `name` = 'style_showmessageframe_background_color'");
	$db->query("update `config` set `value` = '{$style_showmessageframe_background_image}' where `name` = 'style_showmessageframe_background_image'");
	$db->query("update `config` set `value` = '{$refresh_interval}' where `name` = 'refresh_interval'");
	$db->query("update `config` set `value` = '{$say_maxlength}' where `name` = 'say_maxlength'");
	$db->query("update `config` set `value` = '{$chatroom_default_split}' where `name` = 'chatroom_default_split'");
	$db->query("update `config` set `value` = '{$notice_show_time}' where `name` = 'notice_show_time'");
	$db->query("update `config` set `value` = '{$say_filter}' where `name` = 'say_filter'");
	$db->query("update `config` set `value` = '{$say_enable_filter}' where `name` = 'say_enable_filter'");
	$db->query("update `config` set `value` = '{$savecents_interval}' where `name` = 'savecents_interval'");
	$db->query("update `config` set `value` = '{$kick_cantlogin_time}' where `name` = 'kick_cantlogin_time'");
	$db->query("update `config` set `value` = '{$lock_cantlogin_time}' where `name` = 'lock_cantlogin_time'");
	$db->query("update `config` set `value` = '{$enable_title}' where `name` = 'enable_title'");
	$db->query("update `config` set `value` = '{$enable_picture}' where `name` = 'enable_picture'");
	$db->query("update `config` set `value` = '{$img_verify}' where `name` = 'img_verify'");
	$db->query("update `config` set `value` = '{$grade2_cents}' where `name` = 'grade2_cents'");
	$db->query("update `config` set `value` = '{$grade3_cents}' where `name` = 'grade3_cents'");
	$db->query("update `config` set `value` = '{$grade4_cents}' where `name` = 'grade4_cents'");
	$db->query("update `config` set `value` = '{$grade5_cents}' where `name` = 'grade5_cents'");
	$db->query("update `config` set `value` = '{$grade6_cents}' where `name` = 'grade6_cents'");
	$db->query("update `config` set `value` = '{$grade7_cents}' where `name` = 'grade7_cents'");
	$db->query("update `config` set `value` = '{$grade8_cents}' where `name` = 'grade8_cents'");
	$db->query("update `config` set `value` = '{$grade9_cents}' where `name` = 'grade9_cents'");
	$db->query("update `config` set `value` = '{$grade10_cents}' where `name` = 'grade10_cents'");
	$db->query("update `config` set `value` = '{$enable_title}' where `name` = 'enable_title'");
	$db->query("update `config` set `value` = '{$enable_picture}' where `name` = 'enable_picture'");
	$db->query("update `config` set `value` = '{$enable_warn}' where `name` = 'enable_warn'");
	$db->query("update `config` set `value` = '{$enable_kick}' where `name` = 'enable_kick'");
	$db->query("update `config` set `value` = '{$enable_bomb}' where `name` = 'enable_bomb'");
	$db->query("update `config` set `value` = '{$enable_lock}' where `name` = 'enable_lock'");
	$db->query("update `config` set `value` = '{$enable_unlock}' where `name` = 'enable_unlock'");
	$db->query("update `config` set `value` = '{$enable_grade}' where `name` = 'enable_grade'");
	$db->query("update `config` set `value` = '{$enable_nolimit_grade}' where `name` = 'enable_nolimit_grade'");
	$db->query("update `config` set `value` = '{$max_nosay_time}' where `name` = 'max_nosay_time'");
	$db->query("update `config` set `value` = '{$enable_view_sysinfo}' where `name` = 'enable_view_sysinfo'");
	$db->query("update `config` set `value` = '{$enable_view_userinfo}' where `name` = 'enable_view_userinfo'");
	$db->query("update `config` set `value` = '{$enable_view_grade}' where `name` = 'enable_view_grade'");
	$db->query("update `config` set `value` = '{$enable_view_loginip}' where `name` = 'enable_view_loginip'");
	$db->query("update `config` set `value` = '{$enable_view_nameattrib}' where `name` = 'enable_view_nameattrib'");
	$db->query("update `config` set	`value` = '{$loginpage_affiche}' where `name` = 'loginpage_affiche'");
	$db->query("update `config` set	`value` = '{$log_pagesize}' where `name` = 'log_pagesize'");
	$db->query("update `config` set	`value` = '{$log_clear_interval}' where `name` = 'log_clear_interval'");
	$db->query("update `config` set	`value` = '{$title_interval}' where `name` = 'title_interval'");
	$db->query("update `config` set	`value` = '{$optimize_time}' where `name` = 'optimize_time'");
	$db->query("update `config` set	`value` = '{$max_message_number}' where `name` = 'max_message_number'");
	$db->query("update `config` set	`value` = '{$chatroom_is_closed}' where `name` = 'chatroom_is_closed'");
	$db->query("update `config` set	`value` = '{$why_close}' where `name` = 'why_close'");
	$db->query("update `config` set	`value` = '{$name_min_length}' where `name` = 'name_min_length'");
	$db->query("update `config` set	`value` = '{$name_max_length}' where `name` = 'name_max_length'");
	$db->query("update `config` set	`value` = '{$password_min_length}' where `name` = 'password_min_length'");
	$db->query("update `config` set	`value` = '{$chatroom_admin_pic_verify}' where `name` = 'chatroom_admin_pic_verify'");
	$db->query("update `config` set	`value` = '{$enable_auto_clear_logs}' where `name` = 'enable_auto_clear_logs'");
	$db->query("update `config` set	`value` = '{$enable_unauto_grade}' where `name` = 'enable_unauto_grade'");
	$db->query("update `config` set	`value` = '{$enable_auto_grade}' where `name` = 'enable_auto_grade'");
	$db->query("update `config` set	`value` = '{$warning_out_number}' where `name` = 'warning_out_number'");
	$db->query("update `config` set	`value` = '{$message_warning_out}' where `name` = 'message_warning_out'");
	$db->query("update `config` set	`value` = '{$message_unlock}' where `name` = 'message_unlock'");
	$db->query("update `config` set	`value` = '{$enable_viewlog_name}' where `name` = 'enable_viewlog_name'");
	$db->query("update `config` set	`value` = '{$enable_viewlog_login}' where `name` = 'enable_viewlog_login'");
	$db->query("update `config` set	`value` = '{$enable_viewlog_error}' where `name` = 'enable_viewlog_error'");
	$db->query("update `config` set	`value` = '{$enable_viewlog_manage}' where `name` = 'enable_viewlog_manage'");
	$db->query("update `config` set	`value` = '{$enable_viewlog_grade}' where `name` = 'enable_viewlog_grade'");
	$db->query("update `config` set	`value` = '{$enable_write_guestbook}' where `name` = 'enable_write_guestbook'");
	$db->query("update `config` set	`value` = '{$enable_delete_guestbook}' where `name` = 'enable_delete_guestbook'");
	$db->query("update `config` set	`value` = '{$enable_deleteself_guestbook}' where `name` = 'enable_deleteself_guestbook'");
	$db->query("update `config` set	`value` = '{$guestbook_affiche}' where `name` = 'guestbook_affiche'");
	$db->query("update `config` set	`value` = '{$write_guestbook_interval}' where `name` = 'write_guestbook_interval'");
	$db->query("update `config` set	`value` = '{$enable_call}' where `name` = 'enable_call'");
	$db->query("update `config` set	`value` = '{$page_bgcolor}' where `name` = 'page_bgcolor'");
	$db->query("update `config` set	`value` = '{$guestbook_pagesize}' where `name` = 'guestbook_pagesize'");
	$db->query("update `config` set	`value` = '{$taxis_pagesize}' where `name` = 'taxis_pagesize'");

	header("location:../notice.php?id=".success);
	$db->close();
	exit;
}
if($_GET["w"]=="rooms")
{
	$db = new db_query;
	$db->connect();
	switch($_POST["act"])
	{
		case "add":

⌨️ 快捷键说明

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