"attachments/design/big", "../attachments/design/mini"=>"attachments/design/mini", "cache"=>"admin/cache", "debug/xls"=>"admin/debug/xls" ); $tmp=""; foreach($arr_path as $path_real => $path_title){ $tmp.="{\"title\":\"".$path_title."\",\"priv\":"; if(new_is_writeable($path_real)==1){ $tmp.="\"y\""; }else{ $tmp.="\"n\""; } $tmp.="},"; } $json_data.=substr($tmp,0,-1)."],"; //授权信息 $license=read_file("../license.lic"); $arr_lic=ifor_edt_client_decode_new($license); $lic_client_num=($arr_lic[6]!="9")?$arr_lic[2]:"不限制"; $lic_date=($arr_lic[5]!="9")?"截止".substr($arr_lic[3],0,4)."年".substr($arr_lic[3],4,2)."月".substr($arr_lic[3],6,2)."日":"不限制"; //已用店铺数 $tmp=get_db_msg("select count(*) 'num' from ".$table_pre."client where face='4' and order_num>0 and available='y'"); $lic_client_used=$tmp["num"]; $json_data.="\"lic_title\":\"".iconv("GB2312","UTF-8",$arr_lic[1])."\",\"lic_client_num\":\"".$lic_client_num."\",\"lic_client_used\":\"".$lic_client_used."\",\"lic_date\":\"".$lic_date."\","; //客户表数量 $tmp=get_db_msg("select count(*) 'num' from ".$table_pre."client"); $client_num=$tmp["num"]; //款号表数量 $tmp=get_db_msg("select count(*) 'num' from ".$table_pre."kh"); $kh_num=$tmp["num"]; //订单表数量 $tmp=get_db_msg("select sum(num) 'js',sum(jsje) 'je' from ".$table_pre."order where ka<>'y' and _key='".$_key."'"); $order_js=$tmp["js"]; $order_je=$tmp["je"]; //数据库量 $tables=mysql_list_tables($dbname); $table_num=@mysql_numrows($tables); $data_num=0; for($i=0;$i<$table_num;$i++){ $tname=mysql_tablename($tables,$i); $partten="/_view_/i"; if(!preg_match($partten,$tname) && $tname!=$table_pre."pic"){ $tmp=get_db_msg("select count(*) 'num' from ".$tname); $data_num+=$tmp["num"]; } } $json_data.="\"client_num\":\"".$client_num."\",\"kh_num\":\"".$kh_num."\",\"order_js\":\"".$order_js."\",\"order_je\":\"".deel_je_show(deel_num($order_je))."\",\"data_num\":\"".deel_je_show($data_num)."\","; //取得日志 $json_data.="\"log_info\":["; $q="select * from ".$table_pre."log order by add_date desc limit 0,20"; $r=$db->query($q); $tmp=""; $i=1; while($m=$db->fetch_array($r)){ $m_user=get_db_msg("select username from ".$table_pre."user where id='".$m["uid"]."'"); $tmp.="{\"bh\":\"".$i."\",\"username\":\"".$m_user["username"]."\",\"ip\":\"".$m["ip"]."\",\"add_date\":\"".date("Y年m月d日 H:i",$m["add_date"])."\",\"action\":\"".$m["action"]."\"},"; $i++; } $json_data.=substr($tmp,0,-1)."],"; break; } $json_data=substr($json_data,0,-1)."}"; echo $json_data; ?>