很不错的php聊天室源码,提供给大家学习

源代码在线查看: dialog.php

软件大小: 147 K
上传用户: liangshuo800
关键词: php 源码
下载地址: 免注册下载 普通下载 VIP

相关代码

								session_start();
				include "include/query.php";
				include "include/functions.php";
				$mode = $_GET["mode"];
				$showWhy = true;
				switch($mode)
				{
					case msg_warn:
						$actionstr = "警告";
						break;
					case msg_kick:
						$actionstr = "踢出";
						$mode = msg_kick;
						break;
					case msg_lock:
						$actionstr = "封锁";
						$mode = msg_lock;
						break;
					case msg_unlock:
						$actionstr = "解锁";
						$mode = msg_unlock;
						break;
					case msg_bomb:
						$actionstr = "轰炸";
						$mode = msg_bomb;
						break;
					case msg_rank:
						$actionstr = "调级";
						$mode = msg_rank;
						break;
					case msg_ungrade:
						$actionstr = "禁升";
						$mode = msg_ungrade;
						break;
					case msg_grade:
						$actionstr = "允升";
						$mode = msg_grade;
						break;
					case msg_forbid:
						$actionstr = "禁用";
						$mode = msg_forbid;
						break;
					case msg_unforbid:
						$actionstr = "解禁";
						$mode = msg_unforbid;
						break;
					case msg_call:
						$actionstr = "呼叫";
						$mode = msg_call;
						break;
				}
				?>
				
				
				
				管理
				
				
				
				td
				{
					font-size:13px;
				}
				.t
				{
					border:1px solid black;
				}
				body{color:black;font-family:宋体;font-size:9pt;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px}
				
				
				function doAction(fm)
				{
					if(fm.why.value.replace(/\s/g,"")=="")
					{
						alert("请填写原因!");
						fm.why.focus();
						return false;
					}
					return true;
				}
				
				
												
				
					
				
				
					
						对象 
					
					
								if($mode==msg_unlock||$mode==msg_unforbid||$mode==msg_grade)
				{
					$db = new db_query;
					$db->connect();
					if($mode==msg_unlock)
					{
						echo "";
						echo "选择被系统封锁的IP";
						$lockedIPResult = $db->query("select `username`,`ip` from `lockedip` where `locktime` >= '".(time()-getConfig("lock_cantlogin_time")*60)."'");
						while($ipRow = $db->fetchArray($lockedIPResult))
						{
							echo "".$ipRow["username"]."(".$ipRow["ip"].")";
						}
						echo "";
					}
					if($mode==msg_unforbid)
					{
						echo "";
						echo "选择被禁用的名字";
						$nameResult = $db->query("select `username` from `members` where `forbid` = 1");
						while($nameRow = $db->fetchArray($nameResult))
						{
							echo "".$nameRow["username"]."";
						}
						echo "";
					}
					if($mode==msg_grade)
					{
						echo "";
						echo "选择被禁升级的名字";
						$nameResult = $db->query("select `username` from `members` where `upgrade` = 0");
						while($nameRow = $db->fetchArray($nameResult))
						{
							echo "".$nameRow["username"]."";
						}
						echo "";
					}
					$db->close();
				}
				else
				{
				?>
													}
				?>
					
				
				
					
								if($mode==msg_kick||$mode==msg_bomb||$mode==msg_lock||$mode==msg_warn||$mode==msg_ungrade)
				{
				?>
					
					原因
					骂人
					违法
					不雅
					捣乱
					刷屏
					
								}
				if($mode==msg_unlock)
				{
				?>
					
					原因
					知错
					保证
					网吧
					
								}
				if($mode==msg_rank)
				{
					$db = new db_query;
					$db->connect();
					$rank = $db->result($db->query("select `rank` from `members` where `username` = '{$_GET["username"]}'"),0,"rank");
					$db->close();
				?>
					
					原因
					热情
					楷模
					捣乱
					
					
								}
				if($mode==msg_forbid)
				{
					echo "禁用原因";
				}
				if($mode==msg_unforbid)
				{
					echo "解禁原因";
				}
				if($mode==msg_grade)
				{
					echo "允升原因";
				}
				if($mode==msg_call)
				{
					echo "呼叫内容";
					echo "document.title='呼叫聊友'";
				}
				?>
					
										 
				
								if($mode==msg_rank)
				{
				?>
				
					
					级别调整
					
					
					
								for($i=1;$i				{
					echo "{$i}\n";
				}
				?>
					级
										if($_SESSION["userrank"]>=getConfig("enable_view_grade"))
						echo "当前 {$rank} 级";
					?>
					
				
								}
				?>
				
					
					 
					
					
						  
					
				
				
				
				
							

相关资源