当前位置: 首页>>代码示例>>PHP>>正文


PHP db_factory::execute方法代码示例

本文整理汇总了PHP中db_factory::execute方法的典型用法代码示例。如果您正苦于以下问题:PHP db_factory::execute方法的具体用法?PHP db_factory::execute怎么用?PHP db_factory::execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在db_factory的用法示例。


在下文中一共展示了db_factory::execute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: process_report

 public function process_report($op_result, $type)
 {
     global $_lang;
     $trans_name = $this->get_transrights_name($this->_report_type);
     $op_result = $this->op_result_format($op_result);
     if ($op_result['action']) {
         if ($op_result['product_remove'] == 1) {
             $res = db_factory::execute(sprintf(" update %switkey_service set service_status='3' where service_id='%d'", TABLEPRE, $this->_obj_info['origin_id']));
             $this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']);
             $this->change_status($this->_report_id, '4', $op_result, $op_result['process_result']);
             $res and kekezu::admin_show_msg($trans_name . $_lang['deal_success'], "index.php?do=trans&view=report&type={$type}", "3", '', 'success') or kekezu::admin_show_msg($trans_name . $_lang['deal_fail'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", '', 'warning');
         }
         if ($op_result['product_remove'] == 2) {
             $this->process_notify('nopass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']);
             $res = $this->change_status($this->_report_id, '3', $op_result, $op_result, $op_result['reply']);
             $res and kekezu::admin_show_msg($trans_name . $_lang['deal_success'], "index.php?do=trans&view=rights&type={$type}", "3", '', 'success') or kekezu::admin_show_msg($trans_name . $_lang['deal_fail'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", '', 'warning');
         }
         if ($op_result['product_remove'] == 3) {
             $this->disablePeople();
             $this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']);
             $res = $this->change_status($this->_report_id, '4', $op_result, $op_result['process_result']);
             $res and kekezu::admin_show_msg($trans_name . $_lang['deal_success'], "index.php?do=trans&view=rights&type={$type}", "3", '', 'success') or kekezu::admin_show_msg($trans_name . $_lang['deal_fail'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", '', 'warning');
         }
     }
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:25,代码来源:service_report_class.php

示例2: delFields

 public function delFields()
 {
     if ($this->isFieldsExsits()) {
         db_factory::execute("ALTER TABLE " . $this->_tbname . " DROP " . $this->_tbfield);
         return true;
     }
     return false;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:8,代码来源:CustomFields.php

示例3: service_end_time

 public function service_end_time()
 {
     $service_list = db_factory::query(sprintf(" select * from %switkey_service where service_status=2 and  overdue_type!='forever' and exist_time < %d and model_id = 7 ", TABLEPRE, time()));
     if (is_array($service_list)) {
         foreach ($service_list as $k => $v) {
             db_factory::execute(sprintf("update %switkey_service set service_status=3 where service_id=%d", TABLEPRE, $v['service_id']));
         }
     }
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:9,代码来源:service_time_class.php

示例4: del_comment

 function del_comment($comment_id, $obj_id, $is_reply = false)
 {
     $res = db_factory::execute(sprintf("delete from %switkey_comment where comment_id='%d' or p_id='%d'", TABLEPRE, $comment_id, $comment_id));
     if (!$is_reply) {
         if ($this->_comment_type == 'task') {
             $res and $res = db_factory::execute(sprintf(" update %switkey_task set leave_num =ifnull(leave_num,0)-1 where task_id='%d'", TABLEPRE, $obj_id));
         } elseif ($this->_comment_type == 'service') {
             $res and $res = db_factory::execute(sprintf(" update %switkey_service set leave_num =ifnull(leave_num,0)-1 where service_id='%d'", TABLEPRE, $obj_id));
         }
     }
     return $res;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:12,代码来源:keke_comment_class.php

示例5: process_report

 public function process_report($op_result, $type)
 {
     global $_lang;
     $trans_name = $this->get_transrights_name($this->_report_type);
     $op_result['result'] = $op_result['process_result'];
     $op_result = $this->op_result_format($op_result);
     if ($op_result['action']) {
         switch ($op_result['task']) {
             case 1:
                 $this->_task_obj->dispose_task_return();
                 $this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']);
                 $res = $this->change_status($this->_report_id, '4', $op_result, $op_result['process_result']);
                 break;
             case 2:
                 $arrBids = db_factory::query("select * from " . TABLEPRE . "witkey_task_work where work_status=4");
                 if (is_array($arrBids)) {
                     foreach ($arrBids as $k => $v) {
                         db_factory::execute(sprintf("update %switkey_task_work set work_status = 0 where work_id = '%d'", TABLEPRE, $v['work_id']));
                         db_factory::execute(sprintf(" update %switkey_space set accepted_num = accepted_num-1 where uid = '%d'", TABLEPRE, $v['uid']));
                     }
                 }
                 $this->_task_obj->auto_choose();
                 $this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']);
                 $res = $this->change_status($this->_report_id, '4', $op_result, $op_result['process_result']);
                 break;
             case 3:
                 $this->process_notify('nopass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result'], $op_result['reply']);
                 $res = $this->change_status($this->_report_id, '3', $op_result, $op_result, $op_result['process_result']);
                 break;
             case 4:
                 $res = $this->shield_work($this->_obj_info['obj_id']);
                 $this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']);
                 $res = $this->change_status($this->_report_id, '4', $op_result, $op_result['process_result']);
                 break;
             case 5:
                 $this->cancel_bid($this->_obj_info['obj_id']);
                 $this->_task_obj->auto_choose();
                 $this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']);
                 $res = $this->change_status($this->_report_id, '4', $op_result, $op_result['process_result']);
                 break;
             case 6:
                 $this->disablePeople();
                 $this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']);
                 $res = $this->change_status($this->_report_id, '4', $op_result, $op_result['process_result']);
                 $res and kekezu::admin_show_msg($trans_name . $_lang['deal_success'], "index.php?do=trans&view=rights&type={$type}", "3", '', 'success') or kekezu::admin_show_msg($trans_name . $_lang['deal_fail'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", '', 'warning');
         }
         if ($res) {
             kekezu::admin_show_msg($trans_name . $_lang['deal_success'], "index.php?do=trans&view=report&type={$type}", "3", "", "success");
         } else {
             kekezu::admin_show_msg($trans_name . $_lang['deal_fail'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", "", "warning");
         }
     }
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:53,代码来源:sreward_report_class.php

示例6: reset_set_password

function reset_set_password($user_info)
{
    $code = kekezu::randomkeys(6);
    $user_code = md5($code);
    $slt = kekezu::randomkeys(6);
    $user_seccode = keke_user_class::get_password($code, $slt);
    $sql = "update %switkey_member set password = '%s' , rand_code = '%s' where uid=%d";
    $sql = sprintf($sql, TABLEPRE, $user_code, $slt, $user_info['uid']);
    $res = db_factory::execute($sql);
    $sql = "update %switkey_space set  password = '%s' , sec_code = '%s' where uid=%d";
    $sql = sprintf($sql, TABLEPRE, $user_code, $user_seccode, $user_info['uid']);
    db_factory::execute($sql);
    $pass_info['code'] = $pass_info['sec_code'] = $code;
    keke_user_class::user_edit($user_info['username'], '', $code, '', 1);
    return $pass_info;
}
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:16,代码来源:retrieve.bak.php

示例7: order_charge

 function order_charge()
 {
     global $_K;
     $order_id = $this->_order_id;
     $sid = $this->_obj_id;
     $uid = $this->_uid;
     $user_info = $this->_userinfo;
     $order_info = db_factory::get_one(sprintf(" select order_status,order_uid,order_username,seller_uid,seller_username from %switkey_order where order_id='%d'", TABLEPRE, $order_id));
     $url = $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=2&order_id=" . $order_id;
     $s_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=1&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>";
     $b_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=2&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>";
     if ($order_info['order_status'] == 'wait') {
         $service_info = keke_shop_class::get_service_info($sid);
         $service_status = db_factory::get_count(sprintf(" select service_status from %switkey_service where service_id='%d'", TABLEPRE, $sid));
         if ($service_status == '2') {
             $data = array(':service_id' => $service_info['service_id'], ':title' => $service_info['title']);
             keke_finance_class::init_mem('buy_service', $data);
             $this->_total_fee > 0 and $res = keke_finance_class::cash_out($uid, $this->_total_fee, 'buy_service', '0', 'service', $order_id);
             if ($res) {
                 db_factory::execute(sprintf(" update %switkey_order set order_status='ok' where order_id='%d'", TABLEPRE, $order_id));
                 $v_arr = array('用户名' => $order_info['order_username'], '网站名称' => $kekezu->_sys_config['website_name'], '用户' => $_lang['you'], '动作' => $_lang['haved_confirm_pay'], '订单编号' => $order_id, '订单链接' => $b_order_link);
                 keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_confirm_pay'], $v_arr);
                 $v_arr = array('用户名' => $order_info['order_username'], '网站名称' => $kekezu->_sys_config['website_name'], '用户' => $order_info['order_username'], '动作' => $_lang['haved_confirm_pay'], '订单编号' => $order_id, '订单链接' => $s_order_link);
                 keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_confirm_pay'], $v_arr);
                 $notice = $_lang['goods_pay_success'];
                 $type = 'success';
             } else {
                 $notice = $_lang['goods_pay_fail'];
                 $type = 'warning';
             }
         } else {
             db_factory::execute(sprintf(" update %switkey_order set order_status='close' where order_id='%d'", TABLEPRE, $order_id));
             $v_arr = array('用户名' => $order_info['seller_username'], '网站名称' => $kekezu->_sys_config['website_name'], "用户" => $_lang['system'], '动作' => $_lang['stop_your_order_and_your_cash_return'], '订单编号' => $order_id, '订单链接' => $s_order_link);
             keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_close'], $v_arr);
             $v_arr = array('用户名' => $order_info['order_username'], '网站名称' => $kekezu->_sys_config['website_name'], "用户" => $_lang['system'], '动作' => $_lang['stop_your_order_and_your_cash_return'], '订单编号' => $order_id, '订单链接' => $b_order_link);
             keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_close'], $v_arr);
             $notice = $_lang['goods_pay_fail'];
             $type = 'warning';
         }
     } else {
         $notice = $_lang['goods_pay_success'];
         $type = 'success';
     }
     return pay_return_fac_class::struct_response($_lang['operate_notice'], $notice, $url, $type);
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:45,代码来源:goods_pay_return_class.php

示例8: add_auth

 public function add_auth($data, $file_name = '')
 {
     global $kekezu, $user_info, $_lang;
     $data = $this->format_auth_apply($data);
     $auth_info = $this->get_user_auth_info($user_info[uid]);
     if ($auth_info) {
         $success = $this->_tab_obj->save($data, array($this->_primary_key => $auth_info[$this->_primary_key]));
         $this->set_auth_record_status($user_info['uid'], '0');
         db_factory::execute(sprintf(" update %switkey_space set user_type='2' where uid='%d'", TABLEPRE, $auth_info[uid]));
     } else {
         $success = $this->_tab_obj->save($data);
     }
     if ($success) {
         $data['start_time'] == $data['end_time'] and $end_time = $data['end_time'] or $end_time = 0;
         $this->add_auth_record($data['uid'], $data['username'], $this->_auth_code, $end_time);
         return true;
     }
     return false;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:19,代码来源:keke_auth_enterprise_class.php

示例9: add_auth

 public function add_auth($data, $is_jump = true)
 {
     global $kekezu, $user_info, $_lang;
     $data = $this->format_auth_apply($data);
     $arrAuthInfo = $this->get_user_auth_info($user_info[uid]);
     if ($arrAuthInfo) {
         $success = $this->_tab_obj->save($data, array($this->_primary_key => $arrAuthInfo[$this->_primary_key]));
         $this->set_auth_record_status($user_info['uid'], '0');
     } else {
         $success = $this->_tab_obj->save($data);
     }
     if ($success) {
         db_factory::execute(sprintf(" update %switkey_space set truename='%s',idcard='%s' where uid ='%d'", TABLEPRE, $data[realname], $data[id_card], $data[uid]));
         $data['cash'] > 0 and keke_finance_class::cash_out($data['uid'], $data['cash'], $this->_auth_name, $data['cash'], $this->_auth_name, $success);
         $data['start_time'] == $data['end_time'] and $end_time = $data['end_time'] or $end_time = 0;
         $this->add_auth_record($data['uid'], $data['username'], $this->_auth_code, $end_time);
         return true;
     }
     return false;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:20,代码来源:keke_auth_realname_class.php

示例10: task_agreement_freeze

 public function task_agreement_freeze()
 {
     global $model_list, $_K, $_lang;
     $config = unserialize($model_list[1]['config']);
     $sql = " select a.agree_id,a.agree_status,a.seller_status,a.buyer_status,a.seller_uid,a.buyer_uid,a.task_id,a.on_time,b.task_title from %switkey_agreement a left join %switkey_task b on a.task_id=b.task_id where\n\t\t\t\ta.model_id=1  and b.task_status=6 and a.on_time<'%d'";
     $agree_list = db_factory::query(sprintf($sql, TABLEPRE, TABLEPRE, time() - intval($config['agree_complete_time']) * 24 * 3600));
     if (!empty($agree_list)) {
         $msg_obj = new keke_msg_class();
         foreach ($agree_list as $k => $v) {
             $ginfo = kekezu::get_user_info($v['seller_uid']);
             $winfo = kekezu::get_user_info($v['buyer_uid']);
             db_factory::execute(sprintf(" update %switkey_task set task_status=13 where task_id='%d'", TABLEPRE, $v['task_id']));
             db_factory::execute(sprintf(" update %switkey_agreement set agree_status=5 where agree_id='%d'", TABLEPRE, $v['agree_id']));
             $url = "<a href=\"" . $_K['siteurl'] . '/index.php?do=task&id=' . $v['task_id'] . "\">" . $v['task_title'] . "</a>";
             $v1 = array('动作' => $_lang['agree_g_ac'], '原因' => '由于超时未完成交付已被系统冻结,请尽快联系客服,由客服介入处理', '任务标题' => $url);
             $v2 = array('动作' => $_lang['agree_w_ac'], '原因' => '由于超时未完成交付已被系统冻结,请尽快联系客服,由客服介入处理', '任务标题' => $url);
             $msg_obj->send_message($ginfo['uid'], $ginfo['username'], "task_freeze", '协议交付超时冻结通知', $v1, $ginfo['email'], $ginfo['mobile']);
             $msg_obj->send_message($winfo['uid'], $winfo['username'], "task_freeze", '协议交付超时冻结通知', $v2, $winfo['email'], $winfo['mobile']);
         }
     }
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:21,代码来源:sreward_time_class.php

示例11: user_charge

 private function user_charge()
 {
     global $_K;
     global $_lang;
     $uid = $this->_uid;
     $order_id = $this->_order_id;
     $order_id = keke_order_class::update_order_charge($this->_out_trade_no, $this->_total_fee);
     $order_info = db_factory::get_one(sprintf(" select order_status,order_type from %switkey_order_charge where order_id='%d' and uid='%d'", TABLEPRE, $order_id, $uid));
     if ($order_info['order_status'] == 'wait') {
         db_factory::execute(sprintf(" update %switkey_order_charge set order_status='ok' where order_id='%d'", TABLEPRE, $order_id));
         $res = keke_finance_class::cash_in($uid, $this->_total_fee, $order_info['order_type'], $this->_charge_type, 'user_charge', $order_id);
         $v_arr = array($_lang['recharge_account'] => $this->_total_fee);
         keke_shop_class::notify_user($this->_uid, $this->_username, "pay_success", $_lang['online_recharge_success'], $v_arr, 2);
     } else {
         $res = true;
     }
     if ($res) {
         return $this->struct_response($_lang['operate_notice'], $_lang['online_recharge_success'], $url, 'success');
     } else {
         return $this->struct_response($_lang['operate_notice'], $_lang['online_recharge_fail'], $url, 'warning');
     }
 }
开发者ID:pengfeiaaa,项目名称:web,代码行数:22,代码来源:pay_return_fac_class.php

示例12: alipayjs_success_notify

 public function alipayjs_success_notify($detail_arr, $status = true)
 {
     global $_lang, $_K;
     $ids = implode(",", array_keys($detail_arr));
     $info = kekezu::get_table_data("withdraw_id,uid,username,withdraw_status,withdraw_cash,pay_username,pay_account", "witkey_withdraw", " withdraw_id in ({$ids})", "", "", "", "withdraw_id");
     foreach ($detail_arr as $k => $v) {
         if ($info[$k]['withdraw_status'] == 1) {
             switch ($v['status']) {
                 case "S":
                     $fee = $info[$k]['withdraw_cash'] - keke_finance_class::get_to_cash($info[$k]['withdraw_cash']);
                     $res = db_factory::execute(sprintf(" update %switkey_withdraw set withdraw_status='2',fee=%.2f where withdraw_id ='%d'", TABLEPRE, $fee, $k));
                     $arr = array($_lang['sitename'] => $_K['sitename'], $_lang['tx_cash'] => $v['fee']);
                     keke_msg_class::notify_user($info[$k]['uid'], $info[$k]['username'], 'draw_success', $_lang['tx_success'], $arr, 2);
                     break;
                 case "F":
                     $res = db_factory::execute(sprintf(" update %switkey_withdraw set withdraw_status='3' where withdraw_id ='%d'", TABLEPRE, $k));
                     $v_arr = array('网站名称' => $_K['sitename'], '提现方式' => $pay_way[$withdraw_info[0]['pay_type']], '失败原因' => '未注明原因', '帐户' => $withdraw_info[0]['pay_account'], '提现金额' => $v['withdraw_cash']);
                     keke_msg_class::notify_user($info[$k]['uid'], $info[$k]['username'], 'withdraw_fail', $_lang['tx_fail'], $v_arr, 2);
                     break;
             }
         }
     }
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:23,代码来源:pay_batch_fac_class.php

示例13: add_auth

 public function add_auth($email, $file_name = '')
 {
     global $_K, $user_info, $_lang;
     $data['email'] = $email;
     $data = $this->format_auth_apply($data);
     $data['email'] or kekezu::show_msg($this->auth_lang() . $_lang['apply_submit_fail'], $_SERVER['HTTP_REFERER'], 3, $this->auth_lang() . $_lang['apply_fail_and_info_fail'], 'warning');
     $data['auth_time'] = time();
     $arrAuthInfo = $this->get_user_auth_info($user_info[uid]);
     if ($arrAuthInfo) {
         $success = $this->_tab_obj->save($data, array($this->_primary_key => $arrAuthInfo[$this->_primary_key]));
         $success and $success = $arrAuthInfo[$this->_primary_key];
         $this->set_auth_record_status($user_info['uid'], '0');
     } else {
         $success = $this->_tab_obj->save($data);
     }
     if ($success) {
         if ($this->send_mail($success, $data)) {
             $data['start_time'] == $data['end_time'] and $end_time = $data['end_time'] or $end_time = 0;
             db_factory::execute(" update " . TABLEPRE . "witkey_space set email = '{$data['email']}' where uid = '{$data['uid']}'");
             db_factory::execute(" update " . TABLEPRE . "witkey_member set email = '{$data['email']}' where uid = '{$data['uid']}'");
             return $this->add_auth_record($data['uid'], $data['username'], $this->_auth_code, $end_time);
         }
     }
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:24,代码来源:keke_auth_email_class.php

示例14: update_fina_order

 public static function update_fina_order($fina_id, $order_id)
 {
     return db_factory::execute(sprintf(" update %switkey_finance set order_id = '%d' where fina_id = '%d'", TABLEPRE, $order_id, $fina_id));
 }
开发者ID:pengfeiaaa,项目名称:web,代码行数:4,代码来源:keke_order_class.php

示例15: set_relation_status

 function set_relation_status($relation_id, $status)
 {
     return db_factory::execute(" update " . TABLEPRE . "witkey_prom_relation set relation_status ='{$status}' where relation_id ='{$relation_id}'");
 }
开发者ID:pengfeiaaa,项目名称:web,代码行数:4,代码来源:keke_prom_class.php


注:本文中的db_factory::execute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。