/** * gets the extra params from the page post or get * * @param $baseName * @param $terminator * @param $lookInGet * @param $lookInPost */ function getExtraParamsArr($baseName, $terminator, $lookInGet = true, $lookInPost = true) { // init an array for $retVal = array(); // are we looking at the post variables if ($lookInPost) { // for each value in the post variables foreach (array_keys($_POST) as $item) { // is our base string there $pos = strpos($item, $terminator); // is this a match if ($pos !== false) { $pos += strlen($terminator); $retVal[] = array("ID" => substr($item, $pos), "val" => $_POST[$item]); } } } // are we looking at the get variables if ($lookInGet) { // for each value in the post variables foreach (array_keys($_GET) as $item) { // is our base string there $pos = strpos($item, $terminator); // is this a match if ($pos !== false) { $retVal[] = array("ID" => substr($item, $pos + 1), "val" => _POST($item)); } } } // return to the caller return $retVal; }
public function render_editor($node) { $page = dynamic_cast($node, 'Page'); $data = array(); if (_POST('action') == 'save') { $this->def_save_node($data, $page); } $this->fill_def_form_data($data, $page); $avail_types = array('text' => Loc::get('page/type/text'), 'transfer' => Loc::get('page/type/transfer'), 'redirect' => Loc::get('page/type/redirect')); $data['rows'][] = array('id' => 'page_type', 'label' => Loc::get('page/label/page-type'), 'type' => 'dropdown', 'value' => $page->page_type, 'options' => $avail_types); $data['auto_submit'] = array('page_type'); switch ($page->page_type) { case 'transfer': $data['rows'][] = array('id' => 'transfer_path', 'label' => Loc::get('page/label/transfer-path'), 'type' => 'text', 'value' => $page->transfer_path); break; case 'redirect': $data['rows'][] = array('id' => 'redirect_url', 'label' => 'URL', 'type' => 'text', 'value' => $page->redirect_url); break; default: $data['rows'][] = array('id' => 'use_html_editor', 'label' => Loc::get('page/label/use-html-editor'), 'type' => 'checkbox', 'value' => $page->use_html_editor); $data['rows'][] = array('id' => 'content', 'label' => Loc::get('page/label/content'), 'type' => $page->use_html_editor ? 'editor' : 'textarea', 'value' => $page->content); $data['auto_submit'][] = 'use_html_editor'; break; } return $this->render_form($data); }
protected function on_remove_submit($action) { $name = preg_replace("/[^A-Za-z0-9_\\-\\.]/", '', trim(_POST('name'))); if (strlen($name) && @file_exists(PUB_BASE . $this->type . '/' . $name)) { @unlink(PUB_BASE . $this->type . '/' . $name); } }
protected function check_login() { if (User::is_empty_users()) { return; } if (!_SESSION('logged', false) || _SESSION('logged_ip') != $_SERVER['REMOTE_ADDR']) { $this->vars['error'] = ''; if (_POST('enter')) { $username = strtolower(trim(_POST('data'))); $pwd_hash = User::password_to_hash(trim(_POST('value'))); $user = strlen($username) ? Node::get_by_model_path('User', $username) : null; if ($user != null && $user->pwd_hash == $pwd_hash) { $_SESSION['logged'] = true; $_SESSION['logged_ip'] = $_SERVER['REMOTE_ADDR']; $this->redirect($_SERVER['REQUEST_URI']); return; } else { $this->vars['error'] = Loc::get('cms/admin/invalid-login-or-password'); } } $this->template_name = dirname(__FILE__) . '/login.tpl'; $this->_flow = PAGE_FLOW_RENDER; return; } }
function Render() { $vars = array(); $vars['img'] = $this->img; $vars['code'] = _POST('code'); $vars['code_error'] = $this->codeError; $tpl = new Template(); echo $tpl->Process(BASE_PATH . 'remove.tpl', $vars); }
public function render_editor($node) { $node = dynamic_cast($node, 'CustomList'); $data = array(); if (_POST('action') == 'save') { $this->def_save_node($data, $node); } $this->fill_def_form_data($data, $node); return $this->render_form($data); }
public function render_editor($node) { $node = dynamic_cast($node, 'Settings'); $data = array(); if (_POST('action') == 'save') { $this->def_save_node($data, $node, BaseAdminModule::UPDATE_TYPE_NONE); } $this->fill_def_form_data($data, $node, null, BaseAdminModule::PATH_TYPE_HIDDEN_ALL); return $this->render_form($data); }
public static function init() { if (!empty($_POST['json'])) { if (get_magic_quotes_gpc()) { $_POST['json'] = stripslashes($_POST['json']); } $_POST = json_decode($_POST['json'], true); } self::$session = _POST('session', array()); self::$pagination = _POST('pagination', array('page' => 1, 'count' => 10)); }
public function render_editor($node) { $node = dynamic_cast($node, 'CustomListItem'); $avail_fields = $node->parent_node->get_avail_fields(); $data = array(); if (_POST('action') == 'save') { foreach ($avail_fields as $name => $label) { $node->set_attr("f_{$name}", _POST("f_{$name}")); } $this->def_save_node($data, $node); } $this->fill_def_form_data($data, $node, null, BaseAdminModule::PATH_TYPE_NAME); foreach ($avail_fields as $name => $label) { $data['rows'][] = array('id' => "f_{$name}", 'label' => $label, 'type' => 'textarea', 'rows' => 4, 'value' => $node->attr("f_{$name}")); } return $this->render_form($data); }
function s_ajax_page_on_init() { if (!InPOST('__s_ajax_method')) { return; } $aj_method = _POST('__s_ajax_method'); if (array_key_exists(AJ_INIT, $this->_events)) { foreach ($this->_events[AJ_INIT] as $method) { $res = call_user_func(array($this, $method), $aj_method); if ($this->_flow != PAGE_FLOW_NORMAL) { if (isset($res)) { echo "fail:{$res}"; } $this->s_ajax_page_save_log(); return; } } } $this->_flow = PAGE_FLOW_BREAK; $method = "aj_{$aj_method}"; if (!method_exists($this, $method)) { echo "fail:method {$method} not found"; $this->s_ajax_page_save_log(); return; } $args_array = SJson::deserialize(_POST('__s_ajax_args')); if (!is_array($args_array)) { echo "fail:fail to deserialize arguments"; $this->s_ajax_page_save_log(); return; } try { $res = call_user_func_array(array($this, $method), $args_array); } catch (Exception $ex) { echo 'fail:', $ex->getMessage(); $this->s_ajax_page_save_log(); return; } echo 'succ:'; if (isset($res)) { echo SJson::serialize($res); } $this->s_ajax_page_save_log(); exit; }
public function render_editor($node) { $node = dynamic_cast($node, 'User'); $data = array(); if (_POST('action') == 'save') { // TODO: сделать астоматическую чекалку на основе полей 'validate' в $data['rows'] if (strlen(_POST('_img_data')) && strlen(_POST('_chb_data')) && _POST('_img_data') != _POST('_chb_data')) { $data['errors']['_chb_data'] = Loc::get('user/should-be-same-as-password'); } if ((!isset($data['errors']) || !count($data['errors'])) && strlen(_POST('_img_data'))) { $node->pwd_hash = User::password_to_hash(_POST('_img_data')); $data['extra']['update_tree'] = true; } $this->def_save_node($data, $node); } $this->fill_def_form_data($data, $node, Loc::get('user/label/login'), BaseAdminModule::PATH_TYPE_NAME); if (!strlen($node->pwd_hash)) { $data['rows'][] = array('type' => 'html', 'value' => '<span class="err-row">' . Loc::get('user/empty-password') . '</span>'); } $data['rows'][] = array('id' => '_img_data', 'label' => Loc::get('user/label/password'), 'type' => 'password'); $data['rows'][] = array('id' => '_chb_data', 'label' => Loc::get('user/label/confirm-password'), 'type' => 'password', 'validate' => array(array('SValidators.compare', '_img_data'))); return $this->render_form($data); }
// подгружаем настройки из БД, получаем заполненый класс $cfg include_once "../../../inc/functions.php"; // загружаем функции include_once "../../../inc/login.php"; // загружаем функции $page = _GET('page'); $limit = _GET('rows'); $sidx = _GET('sidx'); $sord = _GET('sord'); $oper = _POST('oper'); $id = _POST('id'); $sname = _POST('sname'); $host = _POST('host'); $basename = _POST('basename'); $username = _POST('username'); $pass = _POST('pass'); if ($oper == '') { //создадим структуру модуля.. $sql = "CREATE TABLE IF NOT EXISTS `zabbix_mod_cfg` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `sname` varchar(50) NOT NULL,\n `host` varchar(50) NOT NULL,\n `basename` varchar(50) NOT NULL,\n `username` varchar(50) NOT NULL,\n `pass` varchar(50) NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1"; $result = $sqlcn->ExecuteSQL($sql); if (!$sidx) { $sidx = 1; } $result = $sqlcn->ExecuteSQL("SELECT COUNT(*) AS count FROM zabbix_mod_cfg"); $row = mysqli_fetch_array($result); $count = $row['count']; if ($count > 0) { $total_pages = ceil($count / $limit); } else { $total_pages = 0; }
// загружаем функции include_once "../../../inc/login.php"; // загружаем функции $page = _GET('page'); $limit = _GET('rows'); $sidx = _GET('sidx'); $sord = _GET('sord'); $oper = _POST('oper'); $id = _POST('id'); $sname = _POST('sname'); $host = _POST('host'); $path = _POST('path'); $comment = _POST('comment'); $ftplogin = _POST('ftplogin'); $ftppass = _POST('ftppass'); $monurl = _POST('monurl'); $sql = "CREATE TABLE IF NOT EXISTS `astra_servers` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `name` varchar(100) NOT NULL,\n `ip` bigint(20) NOT NULL,\n `comment` varchar(200) NOT NULL,\n `path` varchar(100) NOT NULL,\n `ftplogin` varchar(50) NOT NULL,\n `ftppass` varchar(50) NOT NULL,\n PRIMARY KEY (`id`)\n)"; $result = $sqlcn->ExecuteSQL($sql); $sql = "CREATE TABLE IF NOT EXISTS `astra_info` (\n `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Уникальный идентификатор',\n `astra_id` int(11) NOT NULL COMMENT 'Сервер астры',\n `tbody` text NOT NULL COMMENT 'Текст сообщения',\n `pic_file` varchar(100) NOT NULL COMMENT 'Картинка',\n `muz_file` varchar(100) NOT NULL COMMENT 'Звуковое сопровождение',\n `tframe` int(11) NOT NULL COMMENT 'Время показа кадра',\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1"; $result = $sqlcn->ExecuteSQL($sql); $result = $sqlcn->ExecuteSQL($sql); $sql = "ALTER TABLE `astra_servers` ADD `monurl` VARCHAR( 255 ) NOT NULL ;"; $result = $sqlcn->ExecuteSQL($sql); if ($oper == '') { if (!$sidx) { $sidx = 1; } $result = $sqlcn->ExecuteSQL("SELECT COUNT(*) AS count FROM astra_servers"); $row = mysqli_fetch_array($result); $count = $row['count']; if ($count > 0) {
* 2319 Est.Tower Van Palace * No.2 Guandongdian South Street * Beijing , China * * U.S. Office: * One Park Place, Elmira College, NY, 14901, USA * * QQ Group: 329673575 * BBS: bbs.ecmobile.cn * Fax: +86-10-6561-5510 * Mail: info@geek-zoo.com */ define('INIT_NO_USERS', true); require EC_PATH . '/includes/init.php'; GZ_Api::authSession(); include_once EC_PATH . '/includes/lib_transaction.php'; $address_id = _POST('address_id', 0); if (empty($address_id)) { GZ_Api::outPut(101); } $sql = "SELECT * FROM " . $GLOBALS['ecs']->table('user_address') . " WHERE address_id = '{$address_id}'"; $arr = $GLOBALS['db']->getRow($sql); if (empty($arr)) { GZ_Api::outPut(8); } /* 保存到session */ $_SESSION['flow_consignee'] = stripslashes_deep($arr); $address = array('address_id' => $address_id); $sql = "UPDATE " . $GLOBALS['ecs']->table('users') . " SET address_id = '{$address_id}' WHERE user_id = '{$_SESSION['user_id']}'"; $res = $GLOBALS['db']->query($sql); GZ_Api::outPut(array());
* _/_/_/ _/_/_/ _/_/_/ _/ _/ _/_/_/_/_/ _/_/ _/_/ * * * Copyright 2013-2014, Geek Zoo Studio * http://www.ecmobile.cn/license.html * * HQ China: * 2319 Est.Tower Van Palace * No.2 Guandongdian South Street * Beijing , China * * U.S. Office: * One Park Place, Elmira College, NY, 14901, USA * * QQ Group: 329673575 * BBS: bbs.ecmobile.cn * Fax: +86-10-6561-5510 * Mail: info@geek-zoo.com */ define('INIT_NO_USERS', true); require EC_PATH . '/includes/init.php'; GZ_Api::authSession(); include_once EC_PATH . '/includes/lib_transaction.php'; include_once EC_PATH . '/includes/lib_order.php'; $user_id = $_SESSION['user_id']; $order_id = _POST('order_id', 0); if (cancel_order($order_id, $user_id)) { GZ_Api::outPut(array()); } else { GZ_Api::outPut(8); }
* * U.S. Office: * One Park Place, Elmira College, NY, 14901, USA * * QQ Group: 329673575 * BBS: bbs.ecmobile.cn * Fax: +86-10-6561-5510 * Mail: info@geek-zoo.com */ require EC_PATH . '/includes/init.php'; include_once EC_PATH . '/includes/lib_order.php'; include_once EC_PATH . '/includes/lib_passport.php'; $username = _POST('name'); $password = _POST('password'); $email = _POST('email'); $fileld = _POST('fileld', array()); if ($_CFG['shop_reg_closed']) { GZ_Api::outPut(11); } $other = array(); $filelds = array(); foreach ($fileld as $val) { $filelds[$val['id']] = $val['value']; } $other['msn'] = isset($filelds[1]) ? $filelds[1] : ''; $other['qq'] = isset($filelds[2]) ? $filelds[2] : ''; $other['office_phone'] = isset($filelds[3]) ? $filelds[3] : ''; $other['home_phone'] = isset($filelds[4]) ? $filelds[4] : ''; $other['mobile_phone'] = isset($filelds[5]) ? $filelds[5] : ''; if (register($username, $password, $email, $other) === false) { GZ_Api::outPut(11);
include_once "../../../inc/config.php"; // подгружаем настройки из БД, получаем заполненый класс $cfg include_once "../../../inc/functions.php"; // загружаем функции include_once "../../../inc/login.php"; // загружаем функции $page = _GET('page'); $limit = _GET('rows'); $sidx = _GET('sidx'); $sord = _GET('sord'); $oper = _POST('oper'); $id = _POST('id'); $name = _POST('name'); $chanel_id = _POST('chanel_id'); $astra_id = _GET('astra_id'); $group_id = _POST('group_id'); if ($oper == '') { if (!$sidx) { $sidx = 1; } $result = $sqlcn->ExecuteSQL("SELECT COUNT(*) AS count FROM astra_chanels where astra_id='{$astra_id}'"); //echo "SELECT COUNT(*) AS count FROM astra_mon where astra_id='$astra_id'"; $row = mysqli_fetch_array($result); $count = $row['count']; if ($count > 0) { $total_pages = ceil($count / $limit); } else { $total_pages = 0; } if ($page > $total_pages) { $page = $total_pages;
if ($orgid == "") { $err[] = "Не выбрана организация!"; } $login = _POST("login"); if ($login == "") { $err[] = "Не задан логин!"; } $pass = _POST("pass"); if ($pass == "") { $err[] = "Не задан пароль!"; } $email = _POST("email"); if ($email == "") { $err[] = "Не задан E-mail!"; } $mode = _POST("mode"); if ($mode == "") { $err[] = "Не задан режим!"; } if (!preg_match("/^[a-zA-Z0-9\\._-]+@[a-zA-Z0-9\\._-]+\\.[a-zA-Z]{2,4}\$/", $email)) { $err[] = "Не верно указан E-mail"; } if ($step == "add") { if (DoubleLogin($login) != 0) { $err[] = "Такой логин уже есть в базе!"; } if (DoubleEmail($email) != 0) { $err[] = "Такой E-mail уже есть в базе!"; } } // Закончили всяческие проверки
* Beijing , China * * U.S. Office: * One Park Place, Elmira College, NY, 14901, USA * * QQ Group: 329673575 * BBS: bbs.ecmobile.cn * Fax: +86-10-6561-5510 * Mail: info@geek-zoo.com */ require EC_PATH . '/includes/init.php'; // define('DEBUG_MODE', 1); // define('INIT_NO_SMARTY', true); // $smarty = new GZ_Smarty('search'); $data = array(); $cat_id = _POST('category_id', 0); $children = get_children($cat_id); $cat = get_cat_info($cat_id); // 获得分类的相关信息 if ($cat['grade'] == 0 && $cat['parent_id'] != 0) { $cat['grade'] = get_parent_grade($cat_id); //如果当前分类级别为空,取最近的上级分类 } if ($cat['grade'] > 1) { $sql = "SELECT min(g.shop_price) AS min, max(g.shop_price) as max " . " FROM " . $ecs->table('goods') . " AS g " . " WHERE ({$children} OR " . get_extension_goods($children) . ') AND g.is_delete = 0 AND g.is_on_sale = 1 AND g.is_alone_sale = 1 '; //获得当前分类下商品价格的最大值、最小值 $row = $db->getRow($sql); // 取得价格分级最小单位级数,比如,千元商品最小以100为级数 $price_grade = 0.0001; for ($i = -2; $i <= log10($row['max']); $i++) { $price_grade *= 10;
* * HQ China: * 2319 Est.Tower Van Palace * No.2 Guandongdian South Street * Beijing , China * * U.S. Office: * One Park Place, Elmira College, NY, 14901, USA * * QQ Group: 329673575 * BBS: bbs.ecmobile.cn * Fax: +86-10-6561-5510 * Mail: info@geek-zoo.com */ require EC_PATH . '/includes/init.php'; $goods_id = _POST('goods_id', 0); if (!$goods_id) { GZ_Api::outPut(101); } $page_size = GZ_Api::$pagination['count']; $page = GZ_Api::$pagination['page']; //0评论的是商品,1评论的是文章 $out = GZ_assign_comment($goods_id, 0, $page, $page_size); GZ_Api::outPut($out['comments'], $out['pager']); /** * 查询评论内容 * * @access public * @params integer $id * @params integer $type * @params integer $page
* BBS: bbs.ecmobile.cn * Fax: +86-10-6561-5510 * Mail: info@geek-zoo.com */ define('INIT_NO_USERS', true); require EC_PATH . '/includes/init.php'; GZ_Api::authSession(); $user_id = $_SESSION['user_id']; require_once EC_PATH . '/languages/' . $_CFG['lang'] . '/user.php'; include_once EC_PATH . '/includes/lib_order.php'; include_once EC_PATH . '/includes/lib_transaction.php'; include_once EC_PATH . '/includes/lib_clips.php'; include_once EC_PATH . '/includes/lib_payment.php'; $page_parm = GZ_Api::$pagination; $page = $page_parm['page']; $type = _POST('type', 'await_pay'); //await_pay 待付款 //await_ship 待发货 //shipped 待收货 //finished 历史订单 if (!in_array($type, array('await_pay', 'await_ship', 'shipped', 'finished', 'unconfirmed'))) { GZ_Api::outPut(101); } $record_count = $db->getOne("SELECT COUNT(*) FROM " . $ecs->table('order_info') . " WHERE user_id = '{$user_id}'" . GZ_order_query_sql($type)); // $order_all = $db->getAll("SELECT * FROM ".$ecs->table('order_info')." WHERE user_id='$user_id'"); // foreach ($order_all[0] as $key => $val) { // if ($order_all[0][$key] == $order_all[1][$key]) { // unset($order_all[0][$key]); // unset($order_all[1][$key]); // } // }
* * Copyright 2013-2014, Geek Zoo Studio * http://www.ecmobile.cn/license.html * * HQ China: * 2319 Est.Tower Van Palace * No.2 Guandongdian South Street * Beijing , China * * U.S. Office: * One Park Place, Elmira College, NY, 14901, USA * * QQ Group: 329673575 * BBS: bbs.ecmobile.cn * Fax: +86-10-6561-5510 * Mail: info@geek-zoo.com */ define('INIT_NO_USERS', true); require EC_PATH . '/includes/init.php'; GZ_Api::authSession(); include_once EC_PATH . '/includes/lib_transaction.php'; include_once ROOT_PATH . 'languages/' . $_CFG['lang'] . '/shopping_flow.php'; $address = _POST('address', array()); $address['address_id'] = _POST('address_id', 0); if (empty($address['address_id'])) { GZ_Api::outPut(101); } unset($address['id']); $address['user_id'] = $_SESSION['user_id']; $a = update_address($address); GZ_Api::outPut(array());
// подгружаем настройки из БД, получаем заполненый класс $cfg include_once "../../../inc/functions.php"; // загружаем функции include_once "../../../inc/login.php"; // загружаем функции $page = _GET('page'); $limit = _GET('rows'); $sidx = _GET('sidx'); $sord = _GET('sord'); $oper = _POST('oper'); $groupid = _GET('groupid'); if ($groupid == "") { $groupid = _POST('groupid'); } $id = _POST('id'); $name = _POST('name'); // если выбрана группа, то обрабатываем, иначе ничего //echo "!$groupid!"; if ($oper == '') { if (!$sidx) { $sidx = 1; } $result = $sqlcn->ExecuteSQL("SELECT COUNT(*) AS count FROM group_param"); $row = mysqli_fetch_array($result); $count = $row['count']; if ($count > 0) { $total_pages = ceil($count / $limit); } else { $total_pages = 0; } if ($page > $total_pages) {
smtpmail($myrow[email], $title, $txt); } } } $step = _GET("step"); $id = _GET("id"); $title = _POST("title"); if ($title == "") { $err[] = "Нет заголовка!"; } $bodytxt = _POST("bodytxt"); if ($bodytxt == "") { $err[] = "Нет пояснения!"; } $status = _POST("status"); $bpshema = _POST("bpshema"); // Добавляем родимую if ($step == "add") { if (count($err) == 0) { $sql = "INSERT INTO bp_xml (id,userid,title,bodytxt,status,dt,node,xml) VALUES (NULL,'{$user->id}','{$title}','{$bodytxt}','{$status}',now(),1,'{$bpshema}')"; $result = $sqlcn->ExecuteSQL($sql); if ($result == '') { die('Не смог добавить БП!: ' . mysqli_error($sqlcn->idsqlconnection)); } // если стартуем процесс, то добавляем участников процесса if ($status == 1) { $zxxx = new Tbp(); $zxxx->GetLast(); $zxxx->SetNodeToBase(1); } }
include_once "../../../inc/connect.php"; // соеденяемся с БД, получаем $mysql_base_id include_once "../../../inc/config.php"; // подгружаем настройки из БД, получаем заполненый класс $cfg include_once "../../../inc/functions.php"; // загружаем функции include_once "../../../inc/login.php"; // загружаем функции $page = _GET('page'); $limit = _GET('rows'); $sidx = _GET('sidx'); $sord = _GET('sord'); $oper = _POST('oper'); $id = _POST('id'); $name = _POST('name'); $active = _POST('active'); if ($oper == 'del') { $result = $sqlcn->ExecuteSQL("SELECT * FROM config_common WHERE id='{$id}'") or die("Не могу выбрать список модулей!" . mysqli_error($sqlcn->idsqlconnection)); while ($row = mysqli_fetch_array($result)) { $modname = $row['nameparam']; $str1 = explode("_", $modname); $mc = 'modulecomment_' . $str1[1]; $result2 = $sqlcn->ExecuteSQL("DELETE FROM config_common WHERE nameparam='{$mc}'") or die("Не могу выбрать список комментарие!" . mysqli_error($sqlcn->idsqlconnection)); $mcopy = 'modulecopy_' . $str1[1]; $result2 = $sqlcn->ExecuteSQL("DELETE FROM config_common WHERE nameparam='{$mcopy}'") or die("Не могу выбрать список авторов!" . mysqli_error($sqlcn->idsqlconnection)); } $result = $sqlcn->ExecuteSQL("DELETE FROM config_common WHERE id='{$id}'") or die("Не могу выбрать список модулей!" . mysqli_error($sqlcn->idsqlconnection)); } if ($oper == 'edit') { $SQL = "UPDATE config_common SET valueparam='{$active}' WHERE id='{$id}'"; $result = $sqlcn->ExecuteSQL($SQL) or die("Не могу обновить данные по модулю!" . mysqli_error($sqlcn->idsqlconnection));
//new answer to be added $new_answers[] = $answer; } } } if (count($new_answers) && _POST('modify') && is_numeric(_POST('modify'))) { //new answers to be added do_insert($new_answers, 'vcn_answers'); } //add answers to question if (!_POST('modify') || !is_numeric(_POST('modify'))) { do_insert($answers, 'vcn_answers'); } //delete answers if (_POST('deletes')) { do_delete(explode(',', trim(_POST('deletes'), ',')), 'vcn_answers', 'id'); //delete old answers } } //delete question if (_GET('del')) { delete_qdata(_GET('del')); } //data if (_GET('edit')) { $data['result'] = get(_GET('edit')); //get question answers if (!count($data['result'])) { show_error('Not found', 'Không tồn tại dữ liệu.'); } }
* * * Copyright 2013-2014, Geek Zoo Studio * http://www.ecmobile.cn/license.html * * HQ China: * 2319 Est.Tower Van Palace * No.2 Guandongdian South Street * Beijing , China * * U.S. Office: * One Park Place, Elmira College, NY, 14901, USA * * QQ Group: 329673575 * BBS: bbs.ecmobile.cn * Fax: +86-10-6561-5510 * Mail: info@geek-zoo.com */ define('INIT_NO_USERS', true); require EC_PATH . '/includes/init.php'; GZ_Api::authSession(); include_once EC_PATH . '/includes/lib_transaction.php'; include_once ROOT_PATH . 'languages/' . $_CFG['lang'] . '/shopping_flow.php'; $address = _POST('address', array()); $address['address_id'] = $address['id']; unset($address['id']); $address['user_id'] = $_SESSION['user_id']; $address['defalut'] = 1; $address['default'] = 1; $a = update_address($address); GZ_Api::outPut(array());
case 'delete': include_once EC_PATH . '/includes/lib_clips.php'; $collection_id = _POST('rec_id', 0); if (!$collection_id) { GZ_Api::outPut(101); } if ($collection_id > 0) { $db->query('DELETE FROM ' . $ecs->table('collect_goods') . " WHERE rec_id='{$collection_id}' AND user_id =" . $_SESSION['user_id']); } GZ_Api::outPut(array()); break; case 'list': include_once EC_PATH . '/includes/lib_clips.php'; $page = GZ_Api::$pagination; $user_id = $_SESSION['user_id']; $rec_id = _POST('rec_id', 0); $add = ''; if ($rec_id) { $add = " AND rec_id < {$rec_id} "; } $record_count = $db->getOne("SELECT COUNT(*) FROM " . $ecs->table('collect_goods') . " WHERE user_id='{$user_id}' {$add}"); $smarty->assign('goods_list', GZ_get_collection_goods($user_id, $page['count'], $page['page'], $rec_id)); $smarty->assign('url', $ecs->url()); $smarty->assign('user_id', $user_id); $data = array(); foreach ($smarty->_var['goods_list'] as $key => $value) { $temp = API_DATA("SIMPLEGOODS", $value); $temp['rec_id'] = $value['rec_id']; $data[] = $temp; } $pager = get_pager('collection', array(), $record_count, $page['page'], $page['count']);
// загружаем классы работы с профилем пользователя // загружаем все что нужно для работы движка include_once "../../../inc/connect.php"; // соеденяемся с БД, получаем $mysql_base_id include_once "../../../inc/config.php"; // подгружаем настройки из БД, получаем заполненый класс $cfg include_once "../../../inc/functions.php"; // загружаем функции include_once "../../../inc/login.php"; // загружаем функции $oper = _POST('oper'); $number = _POST('number'); $color1 = _POST('color1'); $color2 = _POST('color2'); $module_id = _GET('module_id'); $id = _POST('id'); $page = _GET('page'); $limit = _GET('rows'); $sidx = _GET('sidx'); $sord = _GET('sord'); if ($oper == '') { if (!$sidx) { $sidx = 1; } $sql = "SELECT COUNT(*) AS count FROM lib_cable_lines where id_calble_module='{$module_id}'"; //echo "!$sql!"; $result = $sqlcn->ExecuteSQL($sql) or die("Не могу выбрать количество записей!" . mysqli_error($sqlcn->idsqlconnection)); $row = mysqli_fetch_array($result); $count = $row['count']; //echo "$count!!"; $responce = new stdClass();
* _/_/_/ _/_/_/ _/_/_/ _/ _/ _/_/_/_/_/ _/_/ _/_/ * * * Copyright 2013-2014, Geek Zoo Studio * http://www.ecmobile.cn/license.html * * HQ China: * 2319 Est.Tower Van Palace * No.2 Guandongdian South Street * Beijing , China * * U.S. Office: * One Park Place, Elmira College, NY, 14901, USA * * QQ Group: 329673575 * BBS: bbs.ecmobile.cn * Fax: +86-10-6561-5510 * Mail: info@geek-zoo.com */ require EC_PATH . '/includes/init.php'; include_once EC_PATH . '/includes/lib_order.php'; $name = _POST('name'); $password = _POST('password'); if (!$user->login($name, $password)) { GZ_Api::outPut(6); } $user_info = GZ_user_info($_SESSION['user_id']); $out = array('session' => array('sid' => SESS_ID . $GLOBALS['sess']->gen_session_key(SESS_ID), 'uid' => $_SESSION['user_id']), 'user' => $user_info); update_user_info(); recalculate_price(); GZ_Api::outPut($out);