//********************************************* 删除·当前活动,返回json case "del_action": //只有未审核的活动和未发布的活动才能删除,删除 $aid = $_POST['aid']; //get该活动的id if ($_SESSION['usnamese'] == "") { $arry["id"] = 114; //返回代号,未登录:114, $arry["msg"] = "请登录后再从行操作"; //返回信息 } else { //已登录 //$oldsun=Getlmnameseo('num','shiyong',"id=$aid"); $syn = Getlmname('num,shiyongtype', "shiyong", "id={$aid}"); $oldsun = $syn['num']; $count = GetDel('shiyong', $aid, "create_user_id=" . $create_user_id['id']); if ($count > 0) { if ($syn['shiyongtype'] == 1) { $sql = "update user set sy_sum=sy_sum+{$oldsun} where name='" . $_SESSION['usnamese'] . "'"; } if ($syn['shiyongtype'] == 2) { $sql = "update user set hs_sum=hs_sum+{$oldsun} where name='" . $_SESSION['usnamese'] . "'"; } mysql_query($sql); $arry['id'] = 212; //删除成功 $arry['msg'] = "删除成功"; } else { $arry['id'] = 0; //删除失败 $arry['msg'] = "删除失败请稍后再试";
*/ $do = isset($_GET["do"]) ? $_GET["do"] : "form_task"; switch ($do) { //********************************************* 删除·当前活动,返回json case "del_action": //只有未审核的活动和未发布的活动才能删除,删除 $aid = $_POST['aid']; //get该活动的id if ($_SESSION['usnamese'] == "") { $arry["id"] = 114; //返回代号,未登录:114, $arry["msg"] = "请登录后再从行操作"; //返回信息 } else { //已登录 $count = GetDel('duihuan', $aid, "create_user_id=" . $create_user_id['id']); if ($count > 0) { $arry['id'] = 212; //删除成功 $arry['msg'] = "删除成功"; } else { $arry['id'] = 0; //删除失败 $arry['msg'] = "删除失败请稍后再试"; } } echo json_encode($arry); exit; //********************************************* 发布(开始)·当前活动,返回json //********************************************* 发布(开始)·当前活动,返回json case "begin_action":
if ($_SESSION['usnamese'] == "") { $arry['id'] = 114; //未登录 $arry['msg'] = "请先登录再进行操作"; echo json_encode($arry); exit; } $row_sy = Getlmname('id', 'user_shiyong', "id='" . $aid . "' and userid = '" . $usxx['id'] . "' and status = 1 "); if (!$row_sy['id']) { $arry['id'] = 0; // $arry['msg'] = "非法操作"; echo json_encode($arry); exit; } $count = GetDel('user_shiyong', $aid, "userid=" . $usxx['id']); if ($count > 0) { $arry['id'] = 212; //删除成功 $arry['msg'] = "删除成功"; echo json_encode($arry); exit; } else { $arry['id'] = 0; //删除失败 $arry['msg'] = "删除失败请稍后再试"; echo json_encode($arry); exit; } //*********************************************使用积分直接试用 //*********************************************使用积分直接试用
*/ $do = isset($_GET["do"]) ? $_GET["do"] : "form_task"; switch ($do) { //********************************************* 删除·当前活动,返回json case "del_action": //只有未审核的活动和未发布的活动才能删除,删除 $aid = $_POST['aid']; //get该活动的id if ($_SESSION['usnamese'] == "") { $arry["id"] = 114; //返回代号,未登录:114, $arry["msg"] = "请登录后再从行操作"; //返回信息 } else { //已登录 $count = GetDel('gift', $aid, "create_user_id=" . $create_user_id['id']); if ($count > 0) { $arry['id'] = 212; //删除成功 $arry['msg'] = "删除成功"; } else { $arry['id'] = 0; //删除失败 $arry['msg'] = "删除失败请稍后再试"; } } echo json_encode($arry); exit; //********************************************* 发布(开始)·当前活动,返回json //********************************************* 发布(开始)·当前活动,返回json case "begin_action":