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); } } }
} } 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); } } }
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 ='******' where uid=%d", TABLEPRE, $pwd, $edituid)); } else { unset($fds['password']);
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='******'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(); } }
<?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'); }
$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>感谢您对客客专业威客系统的信任。如有特殊情况,请致电客服';
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; } }
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; } } }
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']; } } }
<?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'); } }
} 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);
} 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;
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]) {
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); }
$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) {
<?php $waterMark = db_factory::get_one('select * from ' . TABLEPRE . 'witkey_basic_config where k="watermark"'); $config = unserialize($waterMark['v']); if ($submit) { $data['switch'] = $switch; $data['hight'] = $hight; $data['width'] = $width; $data['img'] = $filepath1; $d = serialize($data); $res = db_factory::updatetable(TABLEPRE . 'witkey_basic_config', array('v' => $d), array('k' => 'watermark')); $res and kekezu::admin_show_msg('修改成功', 'index.php?do=watermark', 3, '', 'success'); } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do);
$time = time(); $obj_HotWords = new Keke_witkey_hotwords_class(); $obj_HotWords->setWords($words_add); $obj_HotWords->setTime(time()); $obj_HotWords->setCount($count_add); $obj_HotWords->create_keke_witkey_hotwords(); kekezu::admin_show_msg("添加成功", "index.php?do=tpl&view=hotwords", "3", "", "success"); } elseif ($ac == 'editlistorder') { $obj_HotWords = new Keke_witkey_hotwords_class(); $obj_HotWords->setWhere('id=' . $id); $obj_HotWords->setSort($sort); $obj_HotWords->edit_keke_witkey_hotwords(); } elseif ($ac == 'open') { db_factory::updatetable(TABLEPRE . "witkey_basic_config", array('v' => $status), array('k' => 'hot_words_status')); } elseif ($ac == 'handle') { db_factory::updatetable(TABLEPRE . "witkey_basic_config", array('v' => $status), array('k' => 'update_status')); } else { $w = " 1 = 1 "; $id and $w .= " and id = '{$id}'"; $title and $w .= " and words like '%{$title}%'"; if ($ord) { switch ($ord) { case 1: $w .= " order by id asc"; break; case 2: $w .= " order by id desc"; break; case 3: $w .= " order by count asc"; break;
defined('IN_KEKE') or exit('Access Denied'); $strUrl = 'index.php?do=user&view=account&op=password'; if (isset($formhash) && kekezu::submitcheck($formhash)) { $old_pass = kekezu::escape(trim($old_password)); $new_pass = kekezu::escape(trim($new_password)); $confirm_pass = kekezu::escape(trim($confirm_password)); if (md5($old_pass) != $gUserInfo['password']) { $title['errors']['old_password'] = '******'; kekezu::show_msg($title, NULL, NULL, NULL, 'error'); } if ($old_pass === $new_pass) { $title['errors']['new_password'] = '******'; kekezu::show_msg($title, NULL, NULL, NULL, 'error'); } if ($new_pass != $confirm_pass) { $title['errors']['confirm_password'] = '******'; kekezu::show_msg($title, NULL, NULL, NULL, 'error'); } $intRes1 = db_factory::updatetable(TABLEPRE . 'witkey_space', array('password' => md5($new_pass)), array('uid' => $gUid)); $intRes2 = db_factory::updatetable(TABLEPRE . 'witkey_member', array('password' => md5($new_pass)), array('uid' => $gUid)); $flag = keke_user_class::user_edit($gUserInfo['username'], $old_pass, $new_pass, '', 0) > 0 ? 1 : 0; if ($flag && $intRes1 === 1 && $intRes2 === 1) { kekezu::admin_system_log($_SESSION['username'] . '于' . date("Y-m-d H:i:s") . '修改了密码'); keke_msg_class::notify_user($gUserInfo['uid'], $gUserInfo['username'], 'update_password', '修改密码', array('新密码' => $new_pass, '网站名称' => $kekezu->_sys_config['website_name'], '用户名' => $gUserInfo['username']), 2); setcookie('rememberme', ''); unset($_SESSION, $_SESSION['uid'], $_SESSION['username']); unset($_COOKIE['rememberme']); session_destroy(); kekezu::show_msg('新密码已生效', 'index.php?do=login', NULL, NULL, 'ok'); } }
<?php $url = "index.php?do={$do}&view={$view}&target_id={$target_id}"; if (isset($stb_add)) { eval("\$arr=" . kekezu::k_stripslashes($position) . ";"); $position = serialize($arr); $insertsqlarr = array('name' => $name, 'code' => $code, 'description' => $description, 'targets' => $targets, 'position' => $position, 'ad_size' => $ad_size, 'ad_num' => $ad_num, 'sample_pic' => $sample_pic); if ($target_id) { $result = db_factory::updatetable("keke_witkey_ad_target", $insertsqlarr, array("target_id" => $target_id)); } else { $result = db_factory::inserttable('keke_witkey_ad_target', $insertsqlarr); } $result && kekezu::admin_show_msg($_lang['add_submit_success'], $url, 3, '', 'success'); } if ($target_id) { $target_arr = db_factory::get_one("select * from " . TABLEPRE . "witkey_ad_target where target_id='{$target_id}'"); $target_arr['position'] = var_export(unserialize($target_arr['position']), 1); } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);