This repository has been archived on 2026-06-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
EDT/iphone/module/client_pj.php
T
wsh5485 7e47ce238b chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
2025-06-15 13:04:37 +08:00

53 lines
1.8 KiB
PHP

<?php
if(THIS_IN!="edt_ipad")
exit("错误的访问!");
$msg_login=get_db_msg("select * from ".$table_pre."client where id='".$uid."'");
$upath=$msg_login["path"]."-".$uid;
header("Content-type: text/html;charset=utf-8");
$json_data="{";
$json_data.="\"uid\":\"".$msg_login["id"]."\",";
switch($_a){
case "save_pj":
$check=get_db_msg("select * from ".$table_pre."client_pj where cid='".$uid."' and khid='".$khid."'");
$remark=trim($remark);
if($check["id"]>0){
$sql_up="";
if($remark)
$sql_up.=" remark='".$remark."',";
if($race>0)
$sql_up.=" race='".$race."',";
$q="update ".$table_pre."client_pj set ".$sql_up."add_date='".time()."' where cid='".$uid."' and khid='".$khid."'";
}else{
$q="insert into ".$table_pre."client_pj (cid,khid,race,remark,add_date) values ('".$uid."','".$khid."','".$race."','".$remark."','".time()."')";
}
$db->query($q);
$db->query("delete from ".$table_pre."client_pj where race=0 and remark=''");
$json_data.="\"code\":1,";
$log_hd_num=$race;
break;
case "del_pj":
//删除评价
$tmp=get_db_msg("select race from ".$table_pre."client_pj where khid='".$khid."' and cid='".$uid."'");
$log_hd_num=$tmp["race"];
$q="delete from ".$table_pre."client_pj where khid='".$khid."' and cid='".$uid."'";
$db->query($q);
$json_data.="\"code\":1,";
break;
case "del_pj_race":
//删除评分
$tmp=get_db_msg("select race from ".$table_pre."client_pj where khid='".$khid."' and cid='".$uid."'");
$log_hd_num=$tmp["race"];
update_log_hd();
$q="update ".$table_pre."client_pj set race=0 where khid='".$khid."' and cid='".$uid."'";
$db->query($q);
$db->query("delete from ".$table_pre."client_pj where race=0 and remark=''");
$json_data.="\"code\":1,";
break;
default:
//
break;
}
$json_data=substr($json_data,0,-1)."}";
echo $json_data;
?>