本文整理汇总了PHP中db_factory::updatetable方法的典型用法代码示例。如果您正苦于以下问题:PHP db_factory::updatetable方法的具体用法?PHP db_factory::updatetable怎么用?PHP db_factory::updatetable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db_factory
的用法示例。
在下文中一共展示了db_factory::updatetable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set_prom_event_status
function set_prom_event_status($p_uid, $username, $event_id, $status)
{
global $_lang;
$prom_info = db_factory::get_one("select * from " . TABLEPRE . "witkey_prom_event where event_id = " . intval($event_id));
if ($prom_info) {
$P_info = kekezu::get_user_info($p_uid);
$arr[$_lang['txyhm']] = $username;
$arr[$_lang['tx_sj']] = $prom_info['event_desc'];
$arr[$_lang['tx_je']] = $prom_info['rake_cash'];
$res = db_factory::updatetable(TABLEPRE . 'witkey_prom_event', array('event_status' => intval($status)), array('event_id' => intval($event_id)));
if ($res) {
if ($status == 2) {
$title = $_lang['prom_msg_notice'];
$content = $_lang['you_prom_offline'] . $username . $_lang['complete_event_get_money_notice'];
}
$title && $content and keke_msg_class::notify_user($p_uid, $P_info['username'], 'prom_succes', $_lang['prom_success'], $arr, 2);
}
}
}
示例2: foreach
}
}
if ($msgConfigsTpl) {
foreach ($msgConfigsTpl as $k => $v) {
$insertsqlarr = array();
$insertsqlarr['content'] = $msgConfigsTpl[$k]['content'] ? str_replace(array('<p></p>', '<p><br/></p>', '<p><br /></p>'), array('', '', ''), htmlspecialchars_decode($msgConfigsTpl[$k]['content'])) : '';
$insertsqlarr['content'] = $msgConfigsTpl[$k]['content'] ? str_replace(array('task_id='), array('id='), $msgConfigsTpl[$k]['content']) : '';
if ($k == 'get_password') {
$insertsqlarr['mobile_content'] = $insertsqlarr['content'] ? str_replace(array('<p></p>', '<p><br/></p>', '<p><br /></p>'), array('', '', ''), htmlspecialchars_decode($insertsqlarr['content'])) : $insertsqlarr['content'];
} else {
$insertsqlarr['mobile_content'] = $msgConfigsTpl[$k]['mobile_content'] ? str_replace(array('<p></p>', '<p><br/></p>', '<p><br /></p>'), array('', '', ''), htmlspecialchars_decode($msgConfigsTpl[$k]['mobile_content'])) : $insertsqlarr['content'];
}
$insertsqlarr['k'] = $msgConfigsTpl[$k]['k'];
$insertsqlarr['obj'] = $msgConfigsTpl[$k]['obj'];
$insertsqlarr['desc'] = $msgConfigsTpl[$k]['desc'];
$insertsqlarr['prompt'] = $msgConfigsTpl[$k]['prompt'];
$insertsqlarr['v'] = 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}';
$insertsqlarr['on_time'] = $msgConfigsTpl[$k]['on_time'];
//$insertsqlarr['content'] = $msgConfigsTpl[$k]['content'];
$insertsqlarr['send_type'] = $msgConfigsTpl[$k]['send_type'];
//$insertsqlarr['mobile_content'] = $msgConfigsTpl[$k]['mobile_content'];
$insertsqlarr['mobile'] = 0;
if (!in_array($k, $smsListsKeys)) {
db_factory::inserttable(TABLEPRE . 'witkey_msg_config', $insertsqlarr);
} else {
$wheresqlarr = array();
$wheresqlarr['k'] = $k;
db_factory::updatetable(TABLEPRE . 'witkey_msg_config', $insertsqlarr, $wheresqlarr);
}
}
}
示例3: keke_register_class
if ($is_submit == 1) {
if (!$edituid) {
$regClass = new keke_register_class();
$result = $regClass->check_email(trim($fds['email']));
if ($result !== true) {
kekezu::admin_show_msg('操作提示', "index.php?do=user&view=add", 3, $result, 'warning');
}
$reg_uid = $reg_obj->user_register($fds['username'], $fds['password'], $fds['email'], null, false, $fds['password']);
unset($fds[repassword]);
$arrAddUserInfo = array();
$fds['truename'] and $arrAddUserInfo['truename'] = $fds['truename'];
$fds['phone'] and $arrAddUserInfo['phone'] = $fds['phone'];
$fds['indus_id'] and $arrAddUserInfo['indus_id'] = $fds['indus_id'];
$fds['indus_pid'] and $arrAddUserInfo['indus_pid'] = $fds['indus_pid'];
$fds['birthday'] and $arrAddUserInfo['birthday'] = $fds['birthday'];
!empty($arrAddUserInfo) and db_factory::updatetable(TABLEPRE . 'witkey_space', $arrAddUserInfo, array('uid' => $reg_uid));
is_null($fds['group_id']) or db_factory::execute(sprintf("update %switkey_space set group_id={$fds['group_id']} where uid={$reg_uid}", TABLEPRE));
kekezu::admin_system_log($_lang['add_member'] . $fds['username']);
kekezu::admin_show_msg($_lang['operate_notice'], "index.php?do=user&view=add", 3, $_lang['user_creat_success'], 'success');
} else {
$uinfo = kekezu::get_user_info($edituid);
if ($fds['password']) {
$slt = db_factory::get_count(sprintf("select rand_code from %switkey_member where uid = '%d'", TABLEPRE, $edituid));
$sec_code = keke_user_class::get_password($fds['password'], $slt);
$fds['sec_code'] = $sec_code;
$newpwd = $fds['password'];
$pwd = md5($fds['password']);
$fds[password] = $pwd;
db_factory::execute(sprintf("update %switkey_member set password ='%s' where uid=%d", TABLEPRE, $pwd, $edituid));
} else {
unset($fds['password']);
示例4: synlogin
function synlogin($get, $post)
{
global $_G;
if (!API_SYNLOGIN) {
return API_RETURN_FORBIDDEN;
}
header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
$cookietime = 31536000;
$_SESSION['uid'] = intval($get['uid']);
$_SESSION['username'] = $get['username'];
//最新登录时间
$userinfo = db_factory::get_one("select a.*,b.* from " . TABLEPRE . "witkey_space a left join " . TABLEPRE . "witkey_member b on a.uid = b.uid where a.uid = " . $_SESSION['uid'] . " and a.username='" . $_SESSION['username'] . "'");
if ($userinfo) {
db_factory::updatetable(TABLEPRE . 'witkey_space', array('last_login_time' => time()), array('uid' => $_SESSION['uid']));
$space_obj = new Keke_witkey_space_class();
$space_obj->setUid($_SESSION['uid']);
$space_obj->setLast_login_time(time());
$space_obj->edit_keke_witkey_space();
}
}
示例5: intval
<?php
$arrSellerInfo = db_factory::get_one(sprintf('select * from %s a left join %s b on a.uid = b.uid where a.uid =%s', TABLEPRE . 'witkey_space', TABLEPRE . 'witkey_shop', intval($id)));
if ($arrSellerInfo['shop_backstyle']) {
$arrBackgroudStyle = unserialize($arrSellerInfo['shop_backstyle']);
}
$arr = array();
if ($_R['a'] == 1) {
$arr['shop_background'] = "";
db_factory::updatetable(TABLEPRE . "witkey_shop", $arr, "uid=" . intval($_R['id']));
kekezu::show_msg('已清除', 'index.php?do=seller&id=' . intval($id), NULL, NULL, 'ok');
} elseif ($_R['a'] == 2) {
$arr['banner'] = "";
db_factory::updatetable(TABLEPRE . "witkey_shop", $arr, "uid=" . intval($_R['id']));
kekezu::show_msg('已清除', 'index.php?do=seller&id=' . intval($id), NULL, NULL, 'ok');
}
if (isset($formhash) && kekezu::submitcheck($formhash)) {
$shopObjT = keke_table_class::get_instance('witkey_shop');
$banner and $arrFields['banner'] = $banner;
$background and $arrFields['shop_background'] = $background;
$repeat and $arrBackgroudStyle['repeat'] = $repeat;
$position and $arrBackgroudStyle['position'] = $position;
is_array($arrBackgroudStyle) and $arrFields['shop_backstyle'] = serialize($arrBackgroudStyle);
$shopObjT->save($arrFields, array('uid' => intval($id)));
kekezu::show_msg('已保存', 'index.php?do=seller&id=' . intval($id), NULL, NULL, 'ok');
}
示例6: unset
$objMsgM->setUid($gUid);
$objMsgM->setUsername($username);
$objMsgM->setTo_uid($arrSpaceInfo['uid']);
$objMsgM->setTo_username($arrSpaceInfo['username']);
$objMsgM->setTitle(kekezu::str_filter(kekezu::escape($title)));
$objMsgM->setContent(kekezu::str_filter(kekezu::escape($content)));
$objMsgM->setOn_time(time());
$objMsgM->setType(3);
$objMsgM->create_keke_witkey_msg();
unset($objMsgM);
echo json_encode($arr);
die;
break;
}
if (isset($formhash) && kekezu::submitcheck($formhash)) {
$res = db_factory::updatetable(TABLEPRE . "witkey_task_work", array("hasyj" => 2, 'yjje' => floatval($account), 'yjtime' => time()), array("work_id" => $wid));
$objMsgM = new Keke_witkey_msg_class();
if (strtoupper(CHARSET) == 'GBK') {
$to_username = kekezu::utftogbk($to_username);
}
$arrSpaceInfo = kekezu::get_user_info($to_username, 1);
if (!$arrSpaceInfo) {
$tips['errors']['to_username'] = '用户不存在';
kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
}
if ($arrSpaceInfo['uid'] == $gUid) {
$tips['errors']['to_username'] = '无法给自己发送';
kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
}
$title = '稿件议价';
$content = '尊敬的' . $to_username . ':您的稿件被雇主入围,并向你发出了议价请求。订单详情:<a href="' . $url . '">' . $taskInfo['task_title'] . '</a><p>留言:' . $txt_content . '</p>感谢您对客客专业威客系统的信任。如有特殊情况,请致电客服';
示例7: create_task_order
public function create_task_order($task_id, $model_id, $release_info, $order_status = 'ok')
{
global $uid, $username;
global $_lang;
$oder_obj = new Keke_witkey_order_class();
$order_detail = new Keke_witkey_order_detail_class();
$task_cash = floatval($release_info['txt_task_cash']);
$att_cash = floatval($release_info['hdn_total_costs']);
$order_name = $release_info['txt_title'];
if ($att_cash > 0) {
$order_amount = $task_cash + $att_cash;
$model_id == 16 and $order_amount = $att_cash;
} else {
$order_amount = $task_cash;
$model_id == 16 and $order_amount = 0;
}
if ($model_id == 16) {
$config = $this->_task_config;
intval($config['examine']) == 2 and $status = 2 or $status = 1;
db_factory::updatetable(TABLEPRE . 'witkey_task', array('task_status' => $status), array('task_id' => $task_id));
}
$order_body = $_lang['pub_task'] . "<a href=\"index.php?do=task&id={$task_id}\">" . $order_name . "</a>";
$order_amount > 0 and $order_id = keke_order_class::create_order($model_id, $uid, $username, $order_name, $order_amount, $order_body, $order_status);
if ($order_id) {
$model_id == 16 and $task_cash = 0;
$task_cash > 0 and keke_order_class::create_order_detail($order_id, $release_info['txt_title'], 'task', intval($task_id), $task_cash);
if ($this->_task_obj->getTask_status() != 0) {
$this->_model_info['model_code'] == 'tender' and $site_profit = $task_cash;
$taskinfo = $this->_task_obj;
}
return $order_id;
}
}
示例8: dispose_order
public function dispose_order($order_id, $trust_response = false)
{
global $kekezu, $uid, $username, $_K;
global $_lang;
$response = array();
$task_config = $this->_task_config;
$task_info = $this->_task_info;
$url = $_K['siteurl'] . '/index.php?do=task&id=' . $this->_task_id;
$task_status = $this->_task_status;
$order_info = db_factory::get_one("select * from " . TABLEPRE . "witkey_order where order_id=" . intval($order_id));
$order_amount = $order_info['order_amount'];
if ($order_info['order_status'] == 'ok') {
$task_status == 1 && ($notice = $_lang['task_pay_success_and_wait_admin_audit']);
$task_status == 2 && ($notice = $_lang['task_pay_success_and_task_pub_success']);
return pay_return_fac_class::struct_response($_lang['operate_notice'], $notice, $url, 'success');
} else {
$arrOrderDetail = keke_order_class::get_order_detail($order_id);
foreach ($arrOrderDetail as $k => $v) {
if ($v['obj_type'] == 'task' && $v['detail_type'] == null) {
$data = array(':model_name' => $this->_model_name, ':task_id' => $this->_task_id, ':task_title' => $this->_task_title);
keke_finance_class::init_mem('pub_task', $data);
$res = keke_finance_class::cash_out($task_info['uid'], $v['price'], 'pub_task', 0, 'task', $this->_task_id);
}
if ($v['obj_type'] == 'task' && $v['detail_type']) {
PayitemClass::createPayitemRecord($v['detail_type'], $v['num'], $v['obj_type'], $v['obj_id']);
}
}
switch ($res == true) {
case "1":
$objProm = keke_prom_class::get_instance();
if ($objProm->is_meet_requirement("pub_task", $this->_task_id)) {
$objProm->create_prom_event("pub_task", $this->_guid, $task_info['task_id'], $task_info['task_cash']);
}
db_factory::updatetable(TABLEPRE . "witkey_order", array("order_status" => "ok"), array("order_id" => "{$order_id}"));
keke_order_class::update_fina_order($res, $order_id);
$consume = kekezu::get_cash_consume($task_info['task_cash']);
db_factory::execute(sprintf(" update %switkey_task set cash_cost='%s',credit_cost='%s' where task_id='%d'", TABLEPRE, $consume['cash'], $consume['credit'], $this->_task_id));
if ($task_info['task_cash'] < $task_config['audit_cash'] && !$this->_trust_mode) {
$this->set_task_status(1);
return pay_return_fac_class::struct_response($_lang['operate_notice'], $_lang['task_pay_success_and_wait_admin_audit'], $url, 'alert_right');
} else {
$this->set_task_status(2);
$feed_arr = array("feed_username" => array("content" => $task_info['username'], "url" => "index.php?do=seller&id={$task_info['uid']}"), "action" => array("content" => $_lang['pub_task'], "url" => ""), "event" => array("content" => "{$task_info['task_title']}", "url" => "index.php?do=task&id={$task_info['task_id']}", "cash" => $task_info['task_cash_coverage'] ? $task_info['task_cash_coverage'] : $task_info['task_cash'], "model_id" => "{$this->_model_id}"));
kekezu::save_feed($feed_arr, $task_info['uid'], $task_info['username'], 'pub_task', $task_info['task_id']);
$status_arr = self::get_task_status();
$url = '<a href="' . $_K['siteurl'] . '/index.php?do=task&id=' . $task_info['task_id'] . '" target="_blank">' . $task_info['task_title'] . '</a>';
$v = array('model_name' => $this->_model_name, 'task_id' => $task_info['task_id'], $_lang['task_title'] => $task_info['task_title'], $_lang['task_id'] => $task_info['task_id'], $_lang['task_link'] => $url, $_lang['task_status'] => $status_arr[2], '开始时间' => date('Y-m-d H:i:s', $task_info['start_time']), '投稿结束时间' => date('Y-m-d H:i:s', $task_info['sub_time']), '选稿结束时间' => date('Y-m-d H:i:s', $task_info['end_time']));
$this->notify_user("task_pub", '任务发布通知', $v, $notify_type = 1, $task_info['uid']);
return pay_return_fac_class::struct_response($_lang['operate_notice'], $_lang['task_pay_success_and_task_pub_success'], $url, 'alert_right');
}
break;
case "0":
$pay_url = $_K['siteurl'] . "/index.php?do=pay&order_id={$order_id}";
return pay_return_fac_class::struct_response($_lang['operate_notice'], $_lang['task_pay_error_and_please_repay'], $pay_url, 'alert_error');
break;
}
}
}
示例9: set_task_delay
public function set_task_delay($delay_day, $delay_cash, $trust_response = false)
{
global $kekezu, $user_info;
global $_lang;
$basic_config = $kekezu->_sys_config;
$task_info = $this->_task_info;
$delay_obj = new Keke_witkey_task_delay_class();
$task_obj = $this->_task_obj;
$mycredit = $this->_userinfo['credit'];
$mycash = $this->_userinfo['balance'];
$basic_config['credit_is_allow'] != 1 and $mycredit = '0';
if ($delay_cash > $mycredit + $mycash) {
$repay_cash = $delay_cash - $mycredit - $mycash;
return $_lang['your_account_balance_not_enough'];
} else {
$delay_obj->setDelay_cash($delay_cash);
$delay_obj->setOn_time(time());
$delay_obj->setDelay_status(1);
$delay_obj->setUid($this->_uid);
$delay_obj->setDelay_day($delay_day);
$delay_obj->setTask_id($this->_task_id);
$delay_id = $delay_obj->create_keke_witkey_task_delay();
if ($delay_id) {
$credit_cost = '0';
if ($basic_config['credit_is_allow'] == 1) {
$mycredit < $delay_cash and $credit_cost = $mycredit or $credit_cost = $delay_cash;
}
$credit_cost < $delay_cash and $cash_cost = $delay_cash - $credit_cost or $cash_cost = '0';
$data = array(':task_id' => $this->_task_id, ':task_title' => $this->_task_title);
keke_finance_class::init_mem('task_delay', $data);
$delay_cash > 0 and keke_finance_class::cash_out($this->_uid, $delay_cash, 'task_delay', $cash_cost * $this->_profit_rate, 'task', $this->_task_id);
$add_time = $delay_day * 24 * 3600;
$real_cash_add = $delay_cash * (100 - $this->_profit_rate) / 100;
db_factory::execute(sprintf(" update %switkey_task set end_time=end_time+'%s',sub_time=sub_time+'%s',is_delay =ifnull(is_delay,0)+1\n\t\t\t\t\t\t\t,credit_cost=credit_cost+'%s',cash_cost=cash_cost+'%s',real_cash=real_cash+'%s',task_cash=task_cash+'%s' where task_id='%d'", TABLEPRE, $add_time, $add_time, $credit_cost, $cash_cost, $real_cash_add, $delay_cash, $this->_task_id));
db_factory::updatetable(TABLEPRE . "witkey_order", array("order_amount" => $task_info['task_cash'] + $delay_cash), array("order_id" => $task_info['order_id']));
if ($this->_model_id == 3) {
$add_single = $delay_cash / intval($this->_task_info[work_count]);
db_factory::execute(sprintf("update %switkey_task set single_cash = single_cash+'%s' where task_id='%d'", TABLEPRE, $add_single, $this->_task_id));
}
if ($this->_model_code == 'mreward') {
mreward_task_class::task_delay($this->_task_id, $task_info['task_cash'], $delay_cash);
}
return true;
} else {
return $_lang['task_delay_fail'];
}
}
}
示例10: defined
<?php
defined('IN_KEKE') or exit('Access Denied');
if (isset($formhash) && kekezu::submitcheck($formhash)) {
$strOldCode = kekezu::escape(trim($old_code));
$strNewCode = kekezu::escape(trim($new_code));
$strConfirmCode = kekezu::escape(trim($confirm_code));
$strMd5Pwd = keke_user_class::get_password($strOldCode, $gUserInfo['rand_code']);
if ($strMd5Pwd != $gUserInfo['sec_code']) {
$title['errors']['old_code'] = '支付密码错误';
kekezu::show_msg($title, NULL, NULL, NULL, 'error');
}
if ($strNewCode == $strOldCode) {
$title['errors']['new_code'] = '新支付密码与当前支付密码相同';
kekezu::show_msg($title, NULL, NULL, NULL, 'error');
}
if ($strNewCode != $strConfirmCode) {
$title['errors']['confirm_password'] = '两次输入支付密码不一致';
kekezu::show_msg($title, NULL, NULL, NULL, 'error');
}
$strNewMd5Pwd = keke_user_class::get_password($strNewCode, $gUserInfo['rand_code']);
$intRes = db_factory::updatetable(TABLEPRE . 'witkey_space', array('sec_code' => $strNewMd5Pwd), array('uid' => $gUid));
if ($intRes) {
$message_obj = new keke_msg_class();
$message_obj->send_message($gUserInfo['uid'], $gUserInfo['username'], 'update_sec_code', '修改支付密码', array('支付密码' => $strNewCode), $gUserInfo['email'], $gUserInfo['mobile'], 2);
kekezu::admin_system_log($_SESSION['username'] . '于' . date("Y-m-d H:i:s") . '修改了支付密码');
kekezu::show_msg('新支付密码已生效', NULL, NULL, NULL, 'ok');
} else {
kekezu::show_msg('支付密码修改失败', NULL, NULL, NULL, 'fail');
}
}
示例11: unserialize
}
break;
case "disable":
$pay_api_obj = keke_table_class::get_instance("witkey_pay_api");
$payment_list = kekezu::get_table_data("*", "witkey_pay_api", "", '', '', '', 'payment');
$payment_config = $payment_list[$payname];
$pay_config = unserialize(stripslashes($payment_config['config']));
$pay_config['pay_status'] = 0;
$pay['config'] = serialize($pay_config);
$res = $pay_api_obj->save($pay, array("payment" => $payname));
$op = $ac;
$url = "index.php?do={$do}&view={$view}&op={$op}";
kekezu::empty_cache();
$res and kekezu::admin_show_msg($_lang['close_success'], $url, "3", '', 'success') or kekezu::admin_show_msg($_lang['close_faile'], $url, "3", '', 'warning');
break;
case "allow":
$payment_list = kekezu::get_table_data("*", "witkey_pay_api", "", '', '', '', 'payment');
$payment_config = $payment_list[$payname];
$pay_config = unserialize(stripslashes($payment_config['config']));
$pay_config['pay_status'] = 1;
$res = db_factory::updatetable(TABLEPRE . 'witkey_pay_api', array("config" => serialize($pay_config)), array("payment" => $payname));
$op = $ac;
$url = "index.php?do={$do}&view={$view}&op={$op}";
kekezu::admin_system_log("allow" . $payname);
kekezu::empty_cache();
$res and kekezu::admin_show_msg($_lang['open_success'], $url, "3", '', 'success') or kekezu::admin_show_msg($_lang['open_fail'], $url, "3", '', 'warning');
break;
default:
break;
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view);
示例12: switch
} else {
switch ($type) {
case 'task':
$arrTaskInfo = db_factory::get_one(sprintf("select * from %switkey_task where task_id='%d'", TABLEPRE, $id));
$modelInfo = $kekezu->_model_list[$arrTaskInfo['model_id']];
$className = $modelInfo['model_code'] . "_task_class";
if (intval($t) == 1) {
$arrOrderinfo = db_factory::get_one(sprintf("select order_id from %switkey_order_detail where obj_id=%d and obj_type = 'task' and detail_type is NULL", TABLEPRE, $id));
} else {
$arrOrderinfo = db_factory::get_one(sprintf("select order_id from %switkey_order_detail where obj_id=%d and obj_type = 'task'", TABLEPRE, $id));
}
$obj = new $className($arrTaskInfo);
$arrResult = $obj->dispose_order($arrOrderinfo['order_id']);
if (intval($t) == 1) {
$jumpUrl = 'index.php?do=task&id=' . $id;
db_factory::updatetable(TABLEPRE . 'witkey_task', array('task_status' => 6), array('task_id' => intval($id)));
$task_info = db_factory::get_one('select * from ' . TABLEPRE . 'witkey_task where task_id = ' . intval($id));
$work_info = db_factory::get_one('select * from ' . TABLEPRE . 'witkey_task_work where task_id = ' . intval($id) . ' and work_status=4');
$objYj = new yijia_task_class($task_info);
$objYj->create_agree_date($work_info);
} else {
$jumpUrl = 'index.php?do=pubtask&id=' . $arrTaskInfo['model_id'] . '&step=step4&taskId=' . $id . '&status=1';
}
kekezu::clearCache();
header('Location:' . $jumpUrl);
break;
case 'service':
if ($orderId) {
$arrServcie = db_factory::get_one("select * from " . TABLEPRE . "witkey_service where service_id=" . $id . "");
PayitemClass::payPayitemOrder($orderId);
$jumpUrl = 'index.php?do=pubgoods&id=' . $arrServcie['model_id'] . '&step=step3&serviceId=' . $id;
示例13: intval
kekezu::admin_check_role(30);
$t_obj = keke_table_class::get_instance("witkey_link");
$page and $page = intval($page) or $page = 1;
$slt_page_size and $slt_page_size = intval($slt_page_size) or $slt_page_size = 10;
$url = "index.php?do={$do}&view={$view}&page={$page}&slt_page_size={$slt_page_size}&txt_link_id={$txt_link_id}&txt_link_name={$txt_link_name}&ord[]={$ord['0']}&ord[]={$ord['1']}";
if ($ac == 'del') {
if ($link_id) {
$res = $t_obj->del("link_id", $link_id, $url);
kekezu::admin_system_log($_lang['links_delete'] . $link_id);
kekezu::admin_show_msg($_lang['delete_success'], $url, 3, '', 'success');
} else {
kekezu::admin_show_msg($_lang['delete_fail'], $url, 3, '', 'warning');
}
} elseif ($ac == 'editlistorder') {
if ($link_id) {
db_factory::updatetable(TABLEPRE . 'witkey_link', array('listorder' => $link), array('link_id' => $link_id));
}
} elseif (isset($sbt_action) && $sbt_action == $_lang['mulit_delete']) {
empty($ckb) and kekezu::admin_show_msg($_lang['choose_operate_item'], 'index.php?do=' . $do . '&view=' . $view, 3, '', 'warning');
$res = $t_obj->del("link_id", $ckb);
if ($res) {
kekezu::admin_system_log($_lang['links_delete'] . implode(",", $ckb));
kekezu::admin_show_msg($_lang['mulit_operate_success'], $url, 3, '', 'success');
} else {
kekezu::admin_show_msg($_lang['mulit_operate_fail'], $url, 3, '', 'warning');
}
} else {
$where = ' 1 = 1 ';
$txt_link_id and $where .= " and link_id = " . intval($txt_link_id);
$txt_link_name and $where .= " and link_name like '%" . $txt_link_name . "%'";
if ($ord[1]) {
示例14: htmlspecialchars
if (isset($ky)) {
$ky = htmlspecialchars($ky);
$ky = kekezu::escape($ky);
$arrHwStatus = db_factory::query("select v from " . TABLEPRE . "witkey_basic_config where k='hot_words_status'");
$arrUpdateStatus = db_factory::query("select v from " . TABLEPRE . "witkey_basic_config where k='update_status'");
$arrSearch = db_factory::query("select * from " . TABLEPRE . "witkey_hotwords where words = '{$ky}'");
if ($arrHwStatus[0]['v'] == 'open') {
if ($arrUpdateStatus[0]['v'] == 'auto') {
if (count($arrSearch)) {
db_factory::updatetable(TABLEPRE . "witkey_hotwords", array('count' => $arrSearch[0]['count'] + 1, 'time' => time()), array('words' => $arrSearch[0]['words']));
} else {
db_factory::inserttable(TABLEPRE . "witkey_hotwords", array('words' => $ky, 'time' => time(), 'auto' => '1'));
}
} else {
if (count($arrSearch)) {
db_factory::updatetable(TABLEPRE . "witkey_hotwords", array('count' => $arrSearch[0]['count'] + 1, 'time' => time()), array('words' => $arrSearch[0]['words'], 'auto' => '0'));
}
}
}
}
$arrPayitemConfig = keke_payitem_class::get_payitem_config(null, null, null, 'item_id');
$arrIndusAll = $kekezu->_indus_arr;
$arrModelLabel = array(0 => '未知', 1 => '单人', 2 => '多人', 3 => '计件', 4 => '招标', 5 => '订金', 6 => '文件', 7 => '服务');
$page and $intPage = intval($page);
$intPage = intval($intPage) ? $intPage : 1;
$intPagesize = intval($intPagesize) ? $intPagesize : 10;
$strSql = "select a.*,substring(payitem_time,instr(a.payitem_time,'top')+4+LENGTH('top'),10) as top_time\n\t\t from " . TABLEPRE . "witkey_service as a where ";
$strWhere = " service_status=2 ";
if (intval($i)) {
$strWhere .= " and a.indus_id = " . intval($i);
}
示例15: mysqli_get_server_info
$mysql_ver = mysqli_get_server_info($db->_mydb->_link);
}
$pars = array('ac' => 'run', 'sitename' => urlencode($basic_config['website_name']), 'siteurl' => htmlentities($basic_config['website_url']), 'charset' => $_K['charset'], 'version' => KEKE_VERSION, 'release' => KEKE_RELEASE, 'os' => PHP_OS, 'php' => $_SERVER['SERVER_SOFTWARE'], 'mysql' => $mysql_ver, 'browser' => urlencode($_SERVER['HTTP_USER_AGENT']), 'username' => urlencode($_SESSION['username']), 'email' => $basic_config['email'] ? $basic_config['email'] : 'noemail', 'p_name' => P_NAME);
$data = http_build_query($pars);
$lic = $_K['ci'];
$str_lic = kekezu::set_star($lic, 5, 5, '3', '*');
$verify = md5($data . $lic);
$notice = "http://www.kekezu.com/update.php?" . $data . "&lic=" . urlencode($lic) . "&verify=" . $verify;
$sys = array("ac" => "sysinfo", 'charset' => $_K['charset'], 'p_name' => P_NAME);
$sysinfo = "http://www.kekezu.com/news.php?" . http_build_query($sys);
if ($op == 'smsinterface') {
if ($s == 'close') {
db_factory::updatetable(TABLEPRE . 'witkey_basic_config', array('v' => 'close'), array('k' => 'sms_interface'));
db_factory::updatetable(TABLEPRE . 'witkey_auth_item', array('auth_open' => 0), array('auth_code' => 'mobile'));
} elseif ($s == 'open') {
db_factory::updatetable(TABLEPRE . 'witkey_basic_config', array('v' => 'open'), array('k' => 'sms_interface'));
}
}
$authOpen = db_factory::get_one('select auth_open from ' . TABLEPRE . 'witkey_auth_item where auth_code="mobile"');
if (isset($_POST) && !empty($_POST)) {
if ($_POST['sms_switch'] == 'close') {
unset($_POST['mobile_username']);
unset($_POST['mobile_password']);
}
foreach ($_POST as $k => $v) {
$config_basic_obj->setWhere("k = '{$k}'");
$config_basic_obj->setV(kekezu::k_input($v));
$res += $config_basic_obj->edit_keke_witkey_basic_config();
}
if ($_POST['credit_is_allow'] == 2) {
foreach ($model_list as $k => $v) {