/** * 广告分页查询 * position广告位置 * pageNo页码 * pageSize 显示个数 */ public function query() { $notes = "应用" . $this->client_id . ",调用Banners分页查询接口"; addLog("Banners/query", $_GET, $_POST, $notes); $arr = array('app_index' => 6007, 'app_finance' => 6008, 'app_carousel' => 6009, 'app_life' => 6010); $position = $this->_post('position', '', "位置参数必须"); if (!isset($arr[$position])) { $this->apiReturnErr("不支持的位置参数!"); } $position = $arr[$position]; $curpage = $this->_post('curpage', 0); $pagesize = $this->_post('pagesize', 10); $map = array('position' => $position); $order = " sort asc "; $page = array('curpage' => $curpage, 'size' => $pagesize); //分页 $result = apiCall(BannersApi::QUERY, array($map, $page, $order)); if ($result['status']) { $list = $result['info']['list']; $list = $this->convertImgUrl($list); $this->apiReturnSuc($list); } else { $this->apiReturnErr("没有相关数据!"); } }
public function index() { addLog("Token/index", $_GET, $_POST, ""); $grant_type = I('get.grant_type', ''); if (empty($grant_type)) { $grant_type = I('post.grant_type', ''); } if (empty($grant_type)) { $this->apiReturnSuc("无效的Token获取类型!"); } $client_id = I('get.client_id', ''); if (empty($client_id)) { $client_id = I('post.client_id', ''); } $client_secret = I('get.client_secret', ''); if (empty($client_secret)) { $client_secret = I('post.client_secret', ''); } if (empty($client_id) || empty($grant_type) || empty($client_secret)) { $this->ajaxReturn(array('code' => -1, 'data' => $grant_type . "参数缺失!" . $client_id), "json"); } $notes = $client_id . "调用接口"; $_POST['grant_type'] = $grant_type; $_POST['client_id'] = $client_id; $_POST['client_secret'] = $client_secret; unset($_GET['client_id']); unset($_GET['client_secret']); unset($_GET['grant_type']); addLog("Token/index", $_GET, $_POST, ""); $this->credentials($grant_type); }
function startProcess($db) { $businessComfirmUrl = Yii::app()->params['orderUrl'] . "update/order/business-confirm-order"; $time = time(); $formatTime = date('Y-m-d H:i:s', $time); try { //查找订单 $payTime = $time - 1800; $sql = "SELECT b.business_id,o.order_sn from " . get_tables('business_info') . " as b left join " . get_tables('order_info') . " as o on b.business_id=o.business_id WHERE b.express_type in (2, 11, 12) and o.order_status=1 and o.express_type > 0 and o.pay_time <= " . $payTime . " LIMIT 100"; $data = $db->createCommand($sql)->queryAll(); if (!empty($data)) { foreach ($data as $k => $v) { $post = ['business_id' => $v['business_id'], 'order_sn' => $v['order_sn'], 'user_id' => 1, 'user_name' => 'jiaoben', 'source' => 'autoStockUp']; $return = curlPost($businessComfirmUrl, $post); if ($return['code'] != 0) { addLog("data:" . json_encode($return, JSON_UNESCAPED_UNICODE) . '|time:' . $formatTime); echo $v['order_sn'] . ":fail" . "\r\n"; } else { echo $v['order_sn'] . ":success" . "\r\n"; } } echo "data update:" . count($data) . "\r\n"; } else { echo "no data \r\n"; } echo 'finish'; } catch (Exception $e) { $msg = "filename:autoStockUp|functionname:start_process|error:" . $e->getMessage() . "|time:" . $formatTime; echo $msg . "\r\n"; addLog($msg); } }
function hook_level_up($db, &$tpl, $player, $args = 0) { //No player data if ($args === 0 || LOGGED_IN == false) { return $args; } //Check if player has leveled up if ($args->exp >= $args->max_exp) { //Update the current player variable ($args) $args->exp = $args->exp - $args->max_exp; $args->level += 1; $args->stat_points += 2; $args->max_exp += 20; $args->max_energy += 1; $args->energy += 1; $args->hp += 5; $args->max_hp += 5; //Update the database $db->execute('UPDATE `<ezrpg>players` SET `exp`=?, `level`=level+1, `stat_points`=stat_points+2, `max_exp`=max_exp+20, `energy`=energy+1, `max_energy`=max_energy+1, `hp`=hp+5, `max_hp`=max_hp+5 WHERE `id`=?', array(intval($args->exp), intval($args->id))); //Add event log $msg = 'You have leveled up! You gained +2 stat points and +1 max energy!'; addLog(intval($args->id), $msg, $db); } return $args; }
function updatePrevisionStateWithDeliveryType($deliveryType) { global $country; $resultInfo = array(); $clothIds = ""; $query = "SELECT distinct(pc.clothId) as id, c.name, p.orderNumber\n\t\t\t\t\t\tFROM previsions p\n\t\t\t\t\t\tJOIN previsioncloth pc on p.id=pc.previsionId\n\t\t\t\t\t\tLEFT JOIN plotters pl on pl.previsionId = p.id\n\t\t\t\t\t\tJOIN cloths c on c.id=pc.clothId\n\t\t\t\t\t\twhere (p.designed=false or (p.designed=true and pl.id is not null))\n\t\t\t\t\t\tand (pl.cutted is null or pl.cutted=false)\n\t\t\t\t\t\tand p.state = '{$deliveryType}'\n\t\t\t\t\t\tand p.country = '{$country}'\n\t\t\t\t\t\torder by p.orderNumber, p.id, pc.clothId"; $result = mysql_query($query); foreach (fetch_array($result) as $cloth) { $clothResult = new stdClass(); $res = updatePrevisionState($cloth['id']); $clothResult->countModified = count($res->modifiedPrevisions); $clothResult->clothId = $cloth['id']; $clothResult->clothName = $cloth['name']; $clothResult->orderNumber = $cloth['orderNumber']; $clothIds .= $cloth['id'] . " / " . $cloth['orderNumber'] . ", "; array_push($resultInfo, $clothResult); } $obj->successful = true; $obj->method = "updatePrevisionStateWithDeliveryType({$deliveryType})"; $obj->resultInfo = $resultInfo; // log manual action of previ state update $log->type = "info.updatePrevisionStateWithDeliveryType({$deliveryType})"; $log->log = $clothIds; //implode(" == ", $resultInfo); $log->user = '******'; addLog($log); return $obj; }
/** * 登录接口 * @param string $username 用户名 * @param string $password 用户密码 * @param int|string $type 用户名类型 (1-用户名,2-邮箱,3-手机,4-UID) * @param string $from * @return int 登录成功-用户ID,登录失败-错误编号 */ public function login($username, $password, $type = '1', $from = '') { $result = apiCall(UserApi::LOGIN, array($username, $password, $type)); $notes = "[用户" . $username . ",类型:" . $type . "],调用登录接口"; addLog("/Account/login", "", "", $notes); return $result; }
/** * 产品 */ public function products() { $request = new SFProduct(); $carrier = 0; $result = $request->getProductList(1, 20, $carrier); if (!$result['status']) { addLog("products", $result, $_POST, "[getProductList]"); $this->error($result['info']); } $prodList = $result['info']['prodList']; $resultCode = $result['info']['resultCode']; $resultReason = $result['info']['resultReason']; if ($resultCode == '1000') { $this->assign('prod_list', $prodList); } else { addLog("products", $resultReason, $resultReason, "[getProductList result]"); $this->error($resultReason); } $request = new SFOrder(); $result = $request->queryBalance(); if ($result['status']) { $this->assign('channel', $result['info']); } $this->assign("appkey", $request->getAppKey()); $this->display(); }
/** * 流量购回调地址 */ public function index() { /* * {"channelOrderNo":"158581990641014538769441118","extraData":"", * "orderNo":"1453876701223039", * "orderStatus":"4","providerResultCode":"1", * "providerResultReason":"\u8ba2\u8d2d\u6210\u529f", * "resultCode":"1000","resultMessage":"\u6210\u529f", * "sign":"8194b64649a34e8619a74c76c5ef436e"}*/ addLog("Santi/callback", $_GET, $_POST, '[调试]三体回调地址'); // exit; $order_no = $this->_get('orderNo', '', '缺失orderNo参数'); $order_status = $this->_get('orderStatus', ''); $channel_order_no = $this->_get('channelOrderNo', ''); $result_code = $this->_get('resultCode', ''); $result_message = $this->_get('resultMessage', ''); $provider_result_code = $this->_get('providerResultCode', ''); $provider_result_reason = $this->_get('providerResultReason', ''); $extraData = $this->_get('extraData', ''); $sign = $this->_get('sign', '', '缺失sign参数'); $entity = array('order_no' => $order_no, 'order_status' => $order_status, 'channel_order_no' => $channel_order_no, 'result_code' => $result_code, 'result_message' => $result_message, 'provider_result_code' => $provider_result_code, 'provider_result_reason' => $provider_result_reason, 'extra_data' => $extraData, 'sign' => $sign, 'create_time' => time()); $update_entity = array('order_status' => $order_status); $result = apiCall(SantiCallbackApi::ADD, array($entity)); $result = apiCall(SantiOrderApi::SAVE, array(array('order_no' => $order_no), $update_entity)); if ($result['status']) { echo "SUCCESS"; } else { echo "FAIL"; } }
public function run($route) { global $routes; //Si la route n'est pas dans le tableau des routes - on en déduit qu'il s'agit d'une route à argument if (!in_array($route, $routes)) { $potentialRoute = []; $nbParamRoute = count(explode("/", $route)) - 1; //On vérifie les routes qui contiennent le même nombre de paramètre que la route récupérée foreach ($routes as $routeList => $controller) { $nb = count(explode("/", $routeList)) - 1; if ($nb === $nbParamRoute) { $potentialRoute[$routeList] = $controller; } } //On vérifie si les routes potentielles ont les mêmes données hors arguments, si non, non valable foreach ($potentialRoute as $routeString => $controller) { $routeExpl = explode("/", $route); $potExpl = explode("/", $routeString); foreach ($routeExpl as $key => $value) { if ($value !== $potExpl[$key] && strpos($potExpl[$key], "{") === FALSE) { unset($potentialRoute[$routeString]); } } } $road = array_keys($potentialRoute)[0]; $ArgRoad = explode("/", $road); $nbArgRoad = 0; foreach ($ArgRoad as $item) { if (strpos($item, "{") === FALSE && !empty($item)) { $nbArgRoad++; } } $ArgRoute = explode("/", $route); $route = $road; $args = []; for ($i = $nbArgRoad + 1; $i < count($ArgRoute); $i++) { $args[str_replace(["{", "}"], "", $ArgRoad[$i])] = $ArgRoute[$i]; } } if (!empty($routes[$route])) { $parts = explode(':', $routes[$route]); $controller_name = $parts[0] . 'Controller'; addLog($route); require_once '../src/controller/' . $controller_name . '.php'; $controller = new $controller_name(); if (!empty($args)) { return $controller->{$parts}[1]($args); } else { return $controller->{$parts}[1](); } } else { addErrorLog("No route for :" . $route, __FILE__); header("HTTP/1.0 404 Not Found"); require_once "../web/error/404.php"; throw new Exception('No route for : ' . $route); } }
function desactive_mach_serv($list_id, $packid) { global $l; $id_pack = found_id_pack_serv($packid); $sql_desactive = "delete from devices where hardware_id in "; $arg_desactive = mysql2_prepare($sql_desactive, array(), $list_id); $arg_desactive = mysql2_prepare($arg_desactive['SQL'] . " and name='DOWNLOAD' and IVALUE in ", $arg_desactive['ARG'], $id_pack); $res_active = mysql2_query_secure($arg_desactive['SQL'], $_SESSION['OCS']["writeServer"], $arg_desactive['ARG']); addLog($l->g(512), $l->g(876) . $packid . " => " . $list_id); }
function setUp() { addLog("\n\n====== Testcase: " . $this->getName() . " ======\n\n"); if (self::$skipAll) { $this->markTestSkipped('Skip all as critical case fails.'); } if (self::$isIT && self::$skipIT) { $this->markTestSkipped('Skip scenario test as sanity case fails.'); } }
/** * 查看收货地址 */ public function queryNoPaging() { $notes = "应用" . $this->client_id . ",调用Address查询接口"; addLog("Address/add", $_GET, $_POST, $notes); $map = array('uid' => I('uid')); $result = apiCall(AddressApi::QUERY_NO_PAGING, array($map)); if ($result['status']) { $this->apiReturnSuc($result['info']); } else { $this->apiReturnErr("查询失败"); } }
public function app() { $notes = "客户端" . $this->client_id . ",调用APP配置查询接口"; addLog("Config/app", $_GET, $_POST, $notes); $group = 6; //6是接口参数 $result = apiCall(ConfigApi::QUERY_NO_PAGING, array(array('group' => $group))); if (!$result['status']) { $this->apiReturnErr($result['info']); } $this->apiReturnSuc($this->simpleResult($result['info'])); }
/** * 广告分页查询 * position广告位置 * pageNo页码 * pageSize 显示个数 */ public function query() { $notes = "应用" . $this->client_id . ",调用Banners分页查询接口"; addLog("Banners/query", $_GET, $_POST, $notes); $postion = I('position', 18); $map = array('position' => $postion); $page = array('curpage' => I('pageNo', 0), 'size' => I('pageSize', 10)); //分页 $result = apiCall(BannersApi::QUERY, array($map, $page)); if ($result['status']) { $this->apiReturnSuc($result['info']['list']); } else { $this->apiReturnErr("暂无广告"); } }
/** * 不分页查询 * parentId 父项ID */ public function queryNoPaging() { $notes = "应用" . $this->client_id . ",调用数据字典不分页查询接口"; addLog("Datatree/queryNoPaging", $_GET, $_POST, $notes); $parentId = I('parentId', 0); if ($parentId == 0) { $this->apiReturnErr("父类ID不能为0或空"); } $map = array('parentId' => $parentId); $result = apiCall(DatatreeApi::QUERY_NO_PAGING, array($map)); if ($result['status']) { $this->apiReturnSuc($result['info']); } else { $this->apiReturnErr("暂无信息"); } }
/** * 商品详情展示 * pid 商品ID */ public function detail() { $notes = "应用" . $this->client_id . ",调用商品详情接口"; addLog("Product/detail", $_GET, $_POST, $notes); $pid = I('pid', 0); if ($pid == 0) { $this->apiReturnErr("请通过正常途径访问商品详情!"); } $map = array('id' => $pid); $result = apiCall(ProductApi::QUERY_NO_PAGING, array($map)); if ($result['status']) { $this->apiReturnSuc($result['info'][0]); } else { $this->apiReturnErr("不存在的商品ID"); } }
public function upload() { addLog("File/upload", $_GET, $_POST, $this->client_id . "调用文件上传接口!"); if (IS_POST) { $uid = $this->_post('uid', 0); $type = $this->_post('type', ''); if (!in_array($type, $this->Accept_Type)) { $this->apiReturnErr("文件类型不支持!"); } if ($uid <= 0) { $this->apiReturnErr("用户ID非法!"); } $result = apiCall(UserApi::GET_INFO, array($uid)); if (!$result['status']) { $this->apiReturnErr("用户ID不存在!"); } if (!isset($_FILES['image'])) { $this->apiReturnErr("文件对象必须为image!"); } $result['info'] = ""; //2.再上传到自己的服务器, //TODO:也可以上传到QINIU上 /* 返回标准数据 */ /* 调用文件上传组件上传文件 */ $Picture = D('UserPicture'); $extInfo = array('uid' => $uid, 'imgurl' => C('SITE_URL'), 'type' => $type); $info = $Picture->upload($_FILES, C('USER_PICTURE_UPLOAD'), $extInfo); /* 记录图片信息 */ if ($info) { $info['image']['imgurl'] = C('SITE_URL') . $info['image']['path']; if ($type == 'avatar') { //保存到用户信息表 $result = $this->saveToUserHead($uid, $info['image']['id']); $head = C('API_URL') . '/Picture/index?id=' . $info['image']['id']; $info['image']['api_img_url'] = $head; if ($result['status']) { $this->apiReturnSuc($info['image']); } else { $this->apiReturnErr($result['info']); } } } else { $this->apiReturnErr($Picture->getError()); } } }
public function index() { $grant_type = I('get.grant_type', ''); if (empty($grant_type)) { $grant_type = I('post.grant_type', ''); } if (empty($grant_type)) { $this->apiReturnSuc("无效的Token获取类型!"); } $client_id = I('get.client_id', ''); if (empty($client_id)) { $client_id = I('post.client_id', ''); } $notes = $client_id . "调用接口"; addLog('/Api/Token/index', serialize(I('get.')), serialize(I('post.')), $notes); $this->credentials($grant_type); }
/** * 分页类目查询 * parentId 父项ID * pageNo 页码 * pageSize 显示个数 */ public function query() { $notes = "应用" . $this->client_id . ",调用类目分页查询接口"; addLog("Category/query", $_GET, $_POST, $notes); $parent = I('parentId', 0); if ($parent == "") { $parent = 0; } $map = array('parent' => $parent); $page = array('curpage' => I('pageNo', 0), 'size' => I('pageSize', 10)); //分页 $result = apiCall(CategoryApi::QUERY, array($map, $page)); if ($result['status']) { $this->apiReturnSuc($result['info']['list']); } else { $this->apiReturnErr("暂无信息"); } }
/** * * @param type $uid * @param type $username * @param \uLogin $ulogin */ function appLogin($uid, $username, $ulogin){ $_SESSION['admin']['adminid'] = $uid; $_SESSION['admin']['username'] = $username; $_SESSION['admin']['is_logged'] = true; $db = new \DBConnection(); $adminModel = new \App\Model\Admin($db); $admin = $adminModel->getAdmin($uid); $_SESSION['admin']['refnum'] = $admin['ref']; $_SESSION['admin']['name'] = $admin['name']; $_SESSION['admin']['email'] = $admin['email']; $_SESSION['admin']['type'] = $admin['type']; addLog('Back-end', 'Login', ''.$admin['name'].' ('.$admin['ref'].')',''.$admin['name'].' ('.$admin['ref'].')','Successfully logged in'); if (isset($_SESSION['appRememberMeRequested']) && ($_SESSION['appRememberMeRequested'] === true)) { // Enable remember-me if ( !$ulogin->SetAutologin($username, true)) { echo "cannot enable autologin<br>"; } unset($_SESSION['appRememberMeRequested']); } else { // Disable remember-me if ( !$ulogin->SetAutologin($username, false)) { echo 'cannot disable autologin<br>'; } } page_header_simple(); echo '<img src="../images/lploader.gif" border="0"><br /><b>System is loading, please wait...</b>'; page_footer(); exit(); }
public function upload() { $notes = "应用" . $this->client_id . ",调用上传接口"; addLog("File/upload", $_GET, $_POST, $notes); if (IS_POST) { $uid = $this->_post('uid', 0); $type = $this->_post('type', ''); if (!in_array($type, $this->Accept_Type)) { $this->apiReturnErr("文件类型不支持!"); } if ($uid <= 0) { $this->apiReturnErr("用户ID非法!"); } $result = apiCall(UserApi::GET_INFO, array($uid)); if (!$result['status']) { $this->apiReturnErr("用户ID不存在!"); } // addWeixinLog($_FILES,"FILES"); if (!isset($_FILES['image'])) { $this->apiReturnErr("文件对象必须为image!"); } $result['info'] = ""; //2.再上传到自己的服务器, //TODO:也可以上传到QINIU上 /* 返回标准数据 */ /* 调用文件上传组件上传文件 */ $Picture = D('UserPicture'); $extInfo = array('uid' => $uid, 'imgurl' => C('SITE_URL'), 'type' => $type); $info = $Picture->upload($_FILES, C('USER_PICTURE_UPLOAD'), $extInfo); /* 记录图片信息 */ if ($info) { $info['image']['imgurl'] = C('SITE_URL') . $info['image']['path']; $this->apiReturnSuc($info['image']); } else { $this->apiReturnErr($Picture->getError()); } } }
public function info() { if (IS_GET) { $this->apiReturnErr("不支持GET请求!", $this->business_code . '03'); } $notes = "客户端" . $this->client_id . ",调用优惠码查询接口"; addLog("Coupon/info", $_GET, $_POST, $notes); $idcode = $this->_post('idcode', '', "优惠码缺失"); $map = array('IDCode' => $idcode); $result = apiCall(MemberConfigApi::GET_INFO, array($map)); if (!$result['status']) { $this->apiReturnErr($result['info'], $this->business_code . '01'); } if (is_null($result['info'])) { $this->apiReturnErr("优惠码不存在", $this->business_code . '02'); } $uid = $result['info']['uid']; $result = apiCall(UidMgroupApi::QUERY_WITH_UID, array($uid)); if (!$result['status']) { $this->apiReturnErr($result['info'], $this->business_code . '03'); } $this->apiReturnSuc($result['info']); }
/** * 用户信息更新 */ public function update() { $notes = "用户信息更新接口"; addLog("User/update", $_GET, $_POST, $notes); if (IS_POST) { $sex = $this->_post('sex', 0); $nickname = $this->_post('nickname', ''); $signature = $this->_post("signature", ''); $birthday = $this->_post('birthday', date('Y-M-d', time())); $height = $this->_post('height', 0); $weight = $this->_post('weight', 0); $target_weight = $this->_post('target_weight', 0); // $avatar_id = $this->_post('avatar_id',0); $uid = $this->_post('uid', 0); $entity = array('nickname' => $nickname, 'height' => $height, 'weight' => $weight, 'sex' => $sex, 'target_weight' => $target_weight, 'birthday' => $birthday, 'signature' => $signature, 'avatar_id' => 0); $result = apiCall(AccountApi::UPDATE, array($uid, $entity)); if ($result['status']) { $this->apiReturnSuc("操作成功!"); } else { LogRecord($result['info'], __FILE__ . __LINE__); $this->apiReturnErr($result['info']); } } }
foreach ($o_photos_creditset['Createalbum'] as $key => $value) { if ($value > 0) { $moneyname = $credit->cType[$key]; if ($value > $credit->get($winduid, $key)) { createfail($checkpwd, 'colony_moneylimit2'); Showmsg('colony_moneylimit2'); } } } //积分变动 $creditset = getCreditset($o_photos_creditset['Createalbum'], false); $credit->sets($winduid, $creditset, true); updateMemberid($winduid); } if ($creditlog = unserialize($o_photos_creditlog)) { addLog($creditlog['Createalbum'], $windid, $winduid, 'photos_Createalbum'); } /* if ($o_camoney) { require_once R_P.'require/credit.php'; if ($o_camoney > $credit->get($winduid,$o_moneytype)) { $moneyname = $credit->cType[$o_moneytype]; createfail($checkpwd,'colony_moneylimit2'); Showmsg('colony_moneylimit2'); } $credit->addLog('hack_cyalbum',array($o_moneytype => -$o_camoney),array( 'uid' => $winduid, 'username' => $windid, 'ip' => $onlineip, 'aname' => $aname ));
header("Content-type: text/html; charset=utf-8"); require_once './lib/mysql.func.php'; require_once './lib/common.func.php'; require_once './lib/Logs.php'; $invite_by = isset($_REQUEST['invite_by']) ? $_REQUEST['invite_by'] : ''; if ($_SERVER['REQUEST_METHOD'] == 'POST') { $action = isset($_POST[action]) ? $_POST[action] : ""; // account 显示为昵称, 默认为邮箱,资料页可以修改 $account = ""; //isset($_POST[account]) ? $_POST[account] : ""; $email = isset($_POST[email]) ? $_POST[email] : ""; $pwd = isset($_POST[pwd]) ? $_POST[pwd] : ""; $pwd = strtoupper(substr(md5($pwd), 8, 16)); // echo "$email"; //写日志调试 addLog("pwd = " . $pwd); // $taobao_account = isset($_POST[taobao_account]) ? $_POST[taobao_account] : ""; //邀请码就是邀请人ID,invite_by就够了 // $invite_code = ""; //isset($_POST[invite_code]) ? $_POST[invite_code] : ""; if ($invite_by == '') { $invite_by = 0; } //$invite_by = isset($_POST[invite_by]) ? $_POST[invite_by] : 0; //邮箱必须唯一,昵称可以随意 $query = ""; $query .= " select count(0) as email"; $query .= " from BS_User"; $query .= " where email = '{$email}'"; // echo $query; $msg = ""; $page = "";
if (isset($_POST['ans'])) { if (stristr($_POST['ans'], "easyone")) { if ($_SESSION['level'] == "7") { include_once "db.php"; $query = "update ihax set level = 8, timestamp = '" . time() . "' where username = '******'name'] . "'"; $result = mysqli_query($conn, $query); $_SESSION['level'] = "8"; } header('Location: imagine.php'); } else { header('Location: infection.php'); } include_once "log_function.inc.php"; $ip = $_SERVER['REMOTE_ADDR']; $text = $_SESSION['name'] . " " . $ip . " " . $_SESSION['level'] . " " . $_POST['ans']; addLog($text); } if (!isset($_SESSION['username'])) { header('Location:login.php'); } if ($_SESSION['level'] < 7) { header('Location:index.php'); } include_once "header.inc.php"; ?> <div id="details"> <div id="navlist"> <font style="font-family: horr2;font-size : 25px"> <ul>
<?php require_once('template.php'); if(!$_SESSION['admin']['is_logged']) { header('Location: index.php'); exit(); } $_SESSION['admin']['selected_tab']=6; page_header(); echo '<div class="mainHolder">'; if(isset($_POST['_submit'])) { OaWFile('../lang/english.php',$_POST['TAContent']); echo ' <div class="successHolder">'.getLang('hints_trans_front_success').'</div>'; addLog('Back-end','Front-end Settings',0,''.$_SESSION['admin']['name'].' ('.$_SESSION['admin']['refnum'].')','Translations edited'); } echo ' <div class="hintHolder ui-state-default"><b>'.getLang('hints_trans_front_title').':</b></div> <form name="test" method="POST"> <textarea name="TAContent">'.OaRFile('../lang/english.php').'</textarea> <br /> <input type="submit" name="_submit" value="'.getLang('sform_savebtn').'" class="submitBtn ui-state-default"> </form> </div>'; page_footer(); ?>
<?php // insert new user or update it if already exists include_once '../include/headers.php'; include_once '../include/dbutils.php'; include_once '../include/main.php'; db_connect(); include_once 'domain/logs.php'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { $request_payload = file_get_contents('php://input'); $log = json_decode($request_payload); if (isset($_GET['files'])) { $response = addFilesLog($log); } else { $response = addLog($log); } //return JSON array exit(json_encode($response)); }
$fixPostTotal=str_replace(',', '', $_POST['tr_total']); if ($row['user_balance']>=$fixPostTotal){ $tradeRef=hexdec(substr(uniqid(''), 4, 13))-505050505; $query='INSERT INTO transfers SET '.$mysql_fields.', tr_type=2, transfers_id="'.NID.'", tr_ref='.($tradeRef+0).', tr_system_date="'.date('Y-m-d H:i:s', CUSTOMTIME).'", tr_status=2, user_account_num='.($_SESSION['user']['user_account_num']+0).''; $db->rq($query); addLog('Front-end', 'Withdraw', ''.$_SESSION['user']['user_firstname'].' '.$_SESSION['user']['user_lastname'].' ('.$_SESSION['user']['user_account_num'].')', 0, 'Users request withdraw '.($tradeRef+0)); $db->close(); $success=true; $message=getLang('rw_sent'); }else{
function delete_tab($id_tab) { $info_fields_into_tab = find_all_field_by_tab($id_tab); if (isset($info_fields_into_tab) and $info_fields_into_tab != '') { $result = delete_field($info_fields_into_tab); } else { $result = true; } if ($result) { $id_tab = prepare_id($id_tab); if (is_array($id_tab)) { $sql_downloadwk_tab_values = "DELETE FROM downloadwk_tab_values WHERE ID in "; $downloadwk_tab_values = mysql2_prepare($sql_downloadwk_tab_values, array(), $id_tab); mysql2_query_secure($downloadwk_tab_values['SQL'], $_SESSION['OCS']["writeServer"], $downloadwk_tab_values['ARG']); addLog('DEL_WK_TELEDIFF', 'delete TAB (downloadwk_tab_values) => ' . mysql_affected_rows() . ' values'); } } }