public function set_status()
 {
     $redempte_id = intval($_REQUEST["redempte_id"]);
     $status = intval($_REQUEST["status"]);
     $earn_money = strim($_REQUEST["earn_money"]);
     $fee = strim($_REQUEST["fee"]);
     $pay_type = intval($_REQUEST["pay_type"]);
     $organiser_fee = strim($_REQUEST["organiser_fee"]);
     $web_type = 1;
     $result = deal_redempte($redempte_id, $status, $earn_money, $fee, $organiser_fee, $pay_type, $web_type);
     //修改状态
     if ($result["status"] != 1) {
         ajax_return($result);
     }
     B('FilterString');
     $data = array();
     $data["id"] = intval($_REQUEST["id"]);
     $data["status"] = intval($_REQUEST["status"]);
     $data["update_date"] = to_date(TIME_UTC, "Y-m-d");
     $log_info = M(MODULE_NAME)->where("id=" . intval($data['id']))->getField("name") . "更新状态,";
     // 更新数据
     $list = M(MODULE_NAME)->save($data);
     if (false !== $list) {
         //成功提示
         save_log($log_info . L("UPDATE_SUCCESS"), 1);
         //$this->success(L("UPDATE_SUCCESS"));
     } else {
         //错误提示
         save_log($log_info . L("UPDATE_FAILED"), 0);
         //$this->error(L("UPDATE_FAILED"),0,$log_info.L("UPDATE_FAILED"));
     }
     ajax_return($result);
 }
Esempio n. 2
0
 public function uc_buyed_deal_cancel()
 {
     if (!$GLOBALS['user_info']) {
         app_redirect(url("user#login"));
     }
     $redempte_id = intval($_REQUEST["redempte_id"]);
     $redempte_info = $GLOBALS["db"]->getRow("select * from " . DB_PREFIX . "licai_redempte where id =" . $redempte_id . " and status=0 and user_id =" . $GLOBALS["user_info"]["id"]);
     if (!$redempte_info) {
         $result["status"] = 0;
         $reuslt["info"] = "操作失败,请重试";
         ajax_return($result);
     }
     $status = 3;
     $earn_money = 0;
     $fee = 0;
     $organiser_fee = 0;
     $pay_type = 0;
     $web_type = 0;
     $result = deal_redempte($redempte_id, $status, $earn_money, $fee, $organiser_fee, $pay_type, $web_type);
     $result["jump"] = url("licai#uc_expire_lc");
     ajax_return($result);
 }