<?php if (!_acl::isAllow('pages')) { die("Access denied"); } $Page = new Page(); // ---- center ---- unset($parsed_res); $tpl->Assign('h1', 'Страницы'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Страницы"; if (isset($_POST['smb']) && isset($_POST['ord'])) { $Page->Reorder($_POST); $tpl->Assign('msg', 'Сортировка выполнена успешно.'); } if (!$Page->PagesList(1)) { die('Ошибка при формировании списка страниц.'); } $tpl->Assign('list', $Page->list); $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_pages.tpl')); if (true == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html']; } // ---- right ----
<?php if (!_acl::isAllow('catalog')) { die("Access denied"); } $dbtree = new dbtree(_DB_PREFIX_ . 'category', 'category', $db); // ---- center ---- unset($parsed_res); // -------------------------------------------------------------------------------------- if (isset($GLOBALS['REQAR'][1]) && is_numeric($GLOBALS['REQAR'][1])) { $id_category = $GLOBALS['REQAR'][1]; } else { header('Location: ' . $GLOBALS['URL_base'] . '404/'); exit; } $category = $dbtree->Full(array('id_category', 'category_level', 'name', 'translit', 'art', 'pid', 'content', 'visible'), array('and' => array('id_category = ' . $id_category))); $tpl->Assign('h1', 'Редактирование тегов категории'); // $dbtree->Parents($id_category, array('id_category', 'name', 'category_level')); // if (!empty($dbtree->ERRORS_MES)) { // print_r($dbtree->ERRORS_MES);die(); // } $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Каталог"; $GLOBALS['IERA_LINKS'][$ii++]['url'] = $GLOBALS['URL_base'] . 'adm/cat/'; $GLOBALS['IERA_LINKS'][$ii]['title'] = "Редактирование тегов категории"; foreach ($dbtree->GetTagsLevelsList($id_category) as $k => $l) { $level[$l['tag_level']] = $l; $level[$l['tag_level']]['tags'] = $dbtree->GetTagsList($id_category, $l['tag_level']); } $tpl->Assign('level', $level); if (!isset($_POST['smb'])) {
<?php if (!_acl::isAllow('seotextformats')) { die("Access denied"); } $Seo = new Seo(); unset($parsed_res); $tpl->Assign('h1', 'Добавление формата сеотекста'); if (isset($_POST['smb'])) { if ($Seo->addSeotextFormats($_POST)) { $tpl->Assign('msg', 'Новый формат добавлен.'); unset($_POST); } else { $tpl->Assign('msg', 'Формат не добавлен.'); $tpl->Assign('errm', 1); } } if (!isset($_POST['smb'])) { $_POST['id'] = 0; } $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Формат сеотекстов"; $GLOBALS['IERA_LINKS'][$ii++]['url'] = $GLOBALS['URL_base'] . 'adm/seotextformats/'; $GLOBALS['IERA_LINKS'][$ii]['title'] = "Добавление формата сеотекста"; $tpl_center = $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_seotextformats_ae.tpl');
<?php ini_set("display_errors", 1); error_reporting(E_ALL); if (!_acl::isAllow('duplicates')) { die("Access denied"); } unset($parsed_res); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Дубли товаров"; $GLOBALS['IERA_LINKS'][$ii++]['url'] = '/adm/duplicates/'; $Products = new Products(); $list = $Products->GetDuplicateProducts(); // === === === subcats $tpl->Assign('list', $list); $parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_duplicates.tpl')); if (TRUE == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html']; }
<?php if (!_acl::isAllow('news')) { die("Access denied"); } $News = new News(); unset($parsed_res); $tpl->Assign('h1', 'Новости'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Новости"; if (isset($_POST['smb']) && isset($_POST['ord'])) { $News->Reorder($_POST); $tpl->Assign('msg', 'Сортировка выполнена успешно.'); } if ($News->NewsList(1)) { // die('Ошибка при формировании списка новостей.'); $tpl->Assign('list', $News->list); } $tpl_center .= $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_news.tpl');
<?php if (!_acl::isAllow('configs')) { die("Access denied"); } $ObjName = "Config"; ${$ObjName} = new Config(); // ---- center ---- unset($parsed_res); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Настройки"; $tpl->Assign('h1', $GLOBALS['IERA_LINKS'][$ii]['title']); if (isset($_POST['smb']) && isset($_POST['ord'])) { ${$ObjName}->Reorder($_POST); $tpl->Assign('msg', 'Сортировка выполнена успешно.'); } if (${$ObjName}->SetList()) { $tpl->Assign('list', ${$ObjName}->list); } $parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_config.tpl')); if (TRUE == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html']; } // ---- right ---- ?> S86 k_manager10@gmail.com
<?php if (!_acl::isAllow('moderation_edit_product')) { die("Access denied"); } unset($parsed_res); if (isset($GLOBALS['REQAR'][1]) && is_numeric($GLOBALS['REQAR'][1])) { $id = $GLOBALS['REQAR'][1]; } else { header('Location: /adm/404/'); exit; } $Unit = new Unit(); $Products = new Products(); $Images = new Images(); $Users = new Users(); $header = "Редактирование товара на модерации"; array_push($GLOBALS['IERA_LINKS'], array('url' => '/adm/product_moderation', 'title' => 'Товары на модерации')); array_push($GLOBALS['IERA_LINKS'], array('url' => '/adm/moderation_edit_product', 'title' => $header)); $tpl->Assign('units', $Unit->GetUnitsList()); if (isset($_POST['smb'])) { //Физическое удаление файлов if (isset($_POST['removed_images'])) { foreach ($_POST['removed_images'] as $k => $path) { if ($Products->CheckPhotosOnModeration($path)) { $Images->remove($GLOBALS['PATH_root'] . '..' . $path); } } } $Products->AddSupplierProduct($_POST); }
<?php if (!_acl::isAllow('remitters')) { die("Access denied"); } $ObjName = 'contragents'; ${$ObjName} = new Contragents(); unset($parsed_res); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Отправители"; $tpl->Assign('h1', $GLOBALS['IERA_LINKS'][$ii]['title']); if (${$ObjName}->SetRemittersList()) { $tpl->Assign('list', ${$ObjName}->list); } $parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_remitters.tpl')); if (TRUE == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html']; }
<?php if (!_acl::isAllow('slides')) { die("Access denied"); } $Slides = new Slides(); unset($parsed_res); $tpl->Assign('h1', 'Слайды'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Слайды"; if (isset($_GET['upload'])) { $upload_handler = new UploadHandler(array('download_via_php' => true, 'upload_dir' => $_SERVER['DOCUMENT_ROOT'] . '/images/slides/', 'upload_url' => $_SERVER['DOCUMENT_ROOT'] . '/images/slides/', 'user_dirs' => false, 'param_name' => 'img', 'accept_file_types' => '/\\.(gif|jpe?g|jpg|png)$/i')); exit(0); } $Slides->SlidesList(1); $tpl->Assign('list', $Slides->list); $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_slides.tpl')); if (true == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html']; }
<?php if (!_acl::isAllow('profilesedit')) { die('Access denied'); } if (!isset($GLOBALS['REQAR'][1]) || !is_numeric($GLOBALS['REQAR'][1])) { header('Location: ' . $GLOBALS['URL_base'] . '404/'); exit; } $header = 'Редактирование профиля'; $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = 'Профили пользователей'; $GLOBALS['IERA_LINKS'][$ii++]['url'] = $GLOBALS['URL_base'] . 'adm/profiles/'; $GLOBALS['IERA_LINKS'][$ii]['title'] = $header; $id = (int) $GLOBALS['REQAR'][1]; $Profiles = new Profiles(); if (isset($_POST['smb'])) { $Profiles->Update($_POST); } $Profiles->SetFieldsByID($id); foreach ($Profiles->fields as $key => $value) { $_POST[$key] = $value; } $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_profiles_ae.tpl')); if ($parsed_res['issuccess'] == true) { $tpl_center .= $parsed_res['html']; }
<?php if (!_acl::isAllow('parser')) { die('Access denied'); } unset($parsed_res); $header = 'Парсер сайтов'; $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = 'Каталог'; $GLOBALS['IERA_LINKS'][$ii++]['url'] = '/adm/cat/'; $GLOBALS['IERA_LINKS'][$ii]['title'] = $header; if (isset($_POST['parse'])) { if (!empty($_FILES) && is_uploaded_file($_FILES['urls']['tmp_name'])) { require $GLOBALS['PATH_sys'] . 'excel/Classes/PHPExcel/IOFactory.php'; $objPHPExcel = PHPExcel_IOFactory::load($_FILES['urls']['tmp_name']); $objPHPExcel->setActiveSheetIndex(0); $aSheet = $objPHPExcel->getActiveSheet(); //этот массив будет содержать массивы содержащие в себе значения ячеек каждой строки $array = array(); $ca = array('id', 'url', 'name'); //получим итератор строки и пройдемся по нему циклом foreach ($aSheet->getRowIterator() as $k => $row) { //получим итератор ячеек текущей строки $cellIterator = $row->getCellIterator(); $cellIterator->setIterateOnlyExistingCells(false); // Включить пустые ячейки //пройдемся циклом по ячейкам строки $item = array(); foreach ($cellIterator as $cell) { //заносим значения ячеек одной строки в отдельный массив array_push($item, $cell->getCalculatedValue());
<?php if (!_acl::isAllow('profiles')) { die('Access denied'); } $header = 'Профили пользователей'; $tpl->Assign('h1', $header); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = $header; $Profiles = new Profiles(); $Profiles->SetList(); $list = $Profiles->list; foreach ($list as &$profile) { $res = $Profiles->GetUsersByProfileId($profile['id_profile']); $profile['users_count'] = is_array($res) ? count($res) : 0; } $tpl->Assign('list', $list); $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_profiles.tpl')); if ($parsed_res['issuccess'] == true) { $tpl_center .= $parsed_res['html']; }
<?php if (!_acl::isAllow('catalog') || $_SESSION['member']['gid'] == _ACL_REMOTE_CONTENT_) { die("Access denied"); } $dbtree = new dbtree(_DB_PREFIX_ . 'category', 'category', $db); unset($parsed_res); $header = 'Каталог'; $tpl->Assign('h1', $header); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = $header; $GLOBALS['IERA_LINKS'][$ii++]['url'] = $GLOBALS['URL_base'] . 'adm/cat/'; $cat_arr = $dbtree->GetAllCats(array('id_category', 'category_level', 'name', 'translit', 'prom_id', 'pid', 'visible'), 1); if (!empty($cat_arr)) { foreach ($cat_arr as &$l1) { $level2 = $dbtree->GetAllSubCats($l1['id_category'], 'id_category', 'category_level', 'name', 'translit', 'prom_id', 'pid', 'visible'); foreach ($level2 as &$l2) { $level3 = $dbtree->GetAllSubCats($l2['id_category'], 'id_category', 'category_level', 'name', 'translit', 'prom_id', 'pid', 'visible'); foreach ($level3 as &$l3) { $level4 = $dbtree->GetAllSubCats($l3['id_category'], 'id_category', 'category_level', 'name', 'translit', 'prom_id', 'pid', 'visible'); $l3['subcats'] = $level4; } $l2['subcats'] = $level3; } $l1['subcats'] = $level2; } } $tpl->Assign('cat_arr', $cat_arr); $parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_cat.tpl')); if (TRUE == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html'];
<?php if (!_acl::isAllow('guestbook')) { die("Access denied"); } // ---- center ---- unset($parsed_res); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Комментарии из гостевой книги"; $tpl->Assign('h1', $GLOBALS['IERA_LINKS'][$ii]['title']); /*Pagination*/ if (isset($_GET['limit']) && is_numeric($_GET['limit'])) { $GLOBALS['Limit_db'] = $_GET['limit']; } if (isset($_GET['limit']) && $_GET['limit'] != 'all' || !isset($_GET['limit'])) { if (isset($_POST['page_nbr']) && is_numeric($_POST['page_nbr'])) { $_GET['page_id'] = $_POST['page_nbr']; } $cnt = count(G::GetInfoGuestBook()); $tpl->Assign('cnt', $cnt); $GLOBALS['paginator_html'] = G::NeedfulPages($cnt); $limit = ' LIMIT ' . $GLOBALS['Start'] . ',' . $GLOBALS['Limit_db']; } else { $GLOBALS['Limit_db'] = 0; $limit = ''; } $list = G::GetInfoGuestBook($limit); $tpl->Assign('list', $list); $parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_guestbook.tpl')); if (TRUE == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html'];
<?php if (G::IsLogged()) { header('Location: ' . $GLOBALS['URL_base']); exit; } $GLOBALS['__page_title'] = 'Вход'; $GLOBALS['MainTemplate'] = 'login.tpl'; $Page = new Page(); unset($parsed_res); if (isset($_POST['email']) && isset($_POST['passwd']) && $_POST['email'] && $_POST['passwd']) { $User = new Users(); if ($User->CheckUser($_POST)) { _acl::load($User->fields['gid']); if (_acl::isAllow('admin_panel')) { G::Login($User->fields); header('Location: ' . $GLOBALS['URL_base'] . 'adm/'); //$GLOBALS['URL_request'] exit; } else { $tpl->Assign('msg', 'Доступ запрещен.'); $tpl->Assign('errm', 1); } } else { $tpl->Assign('msg', 'Неверный email или пароль.'); $tpl->Assign('errm', 1); } unset($_POST); } $parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_login.tpl')); if (TRUE == $parsed_res['issuccess']) {
<?php if (!_acl::isAllow('posts')) { die("Access denied"); } $Post = new Post(); unset($parsed_res); $header = 'Статьи'; $tpl->Assign('h1', $header); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = $header; if (isset($_POST['smb']) && isset($_POST['ord'])) { $Post->Reorder($_POST); $tpl->Assign('msg', 'Сортировка выполнена успешно.'); } if ($Post->SetList(1)) { // die('Ошибка при формировании списка статей.'); $tpl->Assign('list', $Post->list); } $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_posts.tpl')); if ($parsed_res['issuccess'] == true) { $tpl_center .= $parsed_res['html']; }
<?php if (!_acl::isAllow('seotext')) { die("Access denied"); } $Seo = new Seo(); unset($parsed_res); $tpl->Assign('h1', 'Добавление Seo-текста'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Seo-текст"; $GLOBALS['IERA_LINKS'][$ii++]['url'] = $GLOBALS['URL_base'] . 'adm/seotext/'; $GLOBALS['IERA_LINKS'][$ii]['title'] = "Добавление Seo-текста"; if (isset($_POST['smb'])) { require_once $GLOBALS['PATH_block'] . 't_fnc.php'; // для ф-ции проверки формы list($err, $errm) = Seotext_form_validate(); if (!$err) { if ($id = $Seo->AddSeoText($_POST)) { $tpl->Assign('msg', 'Seo-текст добавлен.'); unset($_POST); } else { $tpl->Assign('msg', 'Seo-текст не добавлен.'); $tpl->Assign('errm', 1); } } else { // показываем все заново но с сообщениями об ошибках if (isset($_POST['date']) && !isset($errm['date'])) { list($d, $m, $y) = explode(".", trim($_POST['date'])); $_POST['date'] = mktime(0, 0, 0, $m, $d, $y); } $tpl->Assign('msg', 'Seo-текст не добавлен.');
<?php if (!_acl::isAllow('orders_category')) { die("Access denied"); } $Products = new Products(); unset($parsed_res); $header = 'Добавление категорий группе товаров'; $tpl->Assign('h1', $header); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = $header; if (isset($_SESSION['fill_category'])) { $tpl->Assign('product_list', $Products->getArrayProductsById($_SESSION['fill_category'])); } $categories = $Products->generateCategory(); $tpl->Assign('categories', $categories); $tpl_center .= $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_orders_category.tpl');
<?php if (!_acl::isAllow('product_moderation')) { die("Access denied"); } unset($parsed_res); $dbtree = new dbtree(_DB_PREFIX_ . 'category', 'category', $db); $Products = new Products(); $suppliers = new Suppliers(); $tpl->Assign('h1', 'Товары на модерации'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Товары на модерации"; $prods = $Products->GetProductsOnModeration(); $list = $suppl = array(); foreach ($prods as $prod) { if ($prod['moderation_status'] != 2) { $suppliers->SetFieldsById($prod['id_supplier']); $suppl[$prod['id_supplier']] = $suppliers->fields; $list[$prod['id_supplier']][] = $prod; } } // Формирование списка категорий для выпадающего списка $category = $Products->generateCategory(); $tpl->Assign('category', $category); $tpl->Assign('list', $list); $tpl->Assign('suppliers', $suppl); $tpl_center .= $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_moderation.tpl');
<?php if (!_acl::isAllow('pricelist')) { die("Access denied"); } $Products = new Products(); unset($parsed_res); $tpl->Assign('h1', 'Прайс-листы'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Прайс-листы"; if (isset($_POST['smb']) === true) { } $tpl->Assign('list', $Products->GetPricelistFullList()); $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_pricelist.tpl')); if (TRUE == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html']; }
/** * [UpdateDemandChart description] * @param [type] $graph [description] * @param boolean $mode [description] */ public function UpdateDemandChart($chart, $mode = false) { $id_chart = $chart['id_chart']; $where = "id_chart = " . $id_chart; if ($mode == true) { $arr['moderation'] = $chart['moderation']; // if ($chart['mode'] == 'opt') { // $where = "opt = ".$id_chart; // } } else { $arr['id_author'] = $_SESSION['member']['id_user']; $arr['id_category'] = $chart['id_category']; //$arr['name_user'] = $chart['name_user']; $arr['comment'] = $chart['text']; $arr['moderation'] = 0; if (_acl::isAllow('admin_panel')) { $arr['moderation'] = 1; } $arr['opt'] = 0; if ($chart['opt'] == 1) { $arr['opt'] = $chart['opt']; } foreach ($chart['values'] as $k => $val) { $k++; $arr['value_' . $k] = $val; } } $this->db->StartTrans(); if (!$this->db->Update(_DB_PREFIX_ . "chart", $arr, $where)) { $this->db->FailTrans(); return false; } $this->db->CompleteTrans(); return true; }
<?php if (!_acl::isAllow('permissions')) { die('Access denied'); } $header = 'Права доступа'; $tpl->Assign('h1', $header); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = $header; $current_id_profile = 0; if (isset($GLOBALS['REQAR'][1]) && is_numeric($GLOBALS['REQAR'][1])) { $current_id_profile = $GLOBALS['REQAR'][1]; } $Profiles = new Profiles(); $Profiles->SetList(); $profiles_list = $Profiles->list; $tpl->Assign('profiles_list', $profiles_list); $Profiles->SetFieldsById($current_id_profile); $tpl->Assign('current_profile', $Profiles->fields); $controllers = G::GetControllers($GLOBALS['PATH_contr']); foreach ($controllers as $val) { $list[] = preg_replace('/(?:edit|del|add)$/', '', $val); } $tpl->Assign('list', array_unique($list)); $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_permissions.tpl')); if ($parsed_res['issuccess'] == true) { $tpl_center .= $parsed_res['html']; }
<?php if (!_acl::isAllow('specifications')) { die("Access denied"); } $ObjName = "Specification"; ${$ObjName} = new Specification(); // ---- center ---- unset($parsed_res); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Характеристики"; $tpl->Assign('h1', $GLOBALS['IERA_LINKS'][$ii]['title']); if (isset($_POST['smb']) && isset($_POST['ord'])) { ${$ObjName}->Reorder($_POST); $tpl->Assign('msg', 'Сортировка выполнена успешно.'); } if (${$ObjName}->SetList()) { $tpl->Assign('list', ${$ObjName}->list); } $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_specification.tpl')); if (true == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html']; }
<?php if (!_acl::isAllow('product_report')) { die("Access denied"); } $Products = new Products(); unset($parsed_res); $tpl->Assign('h1', 'Отчет неадекватных товаров'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Отчет неадекватных товаров"; $arr = false; if (isset($_POST['smb'])) { unset($_GET); if ($_POST['filter_target_date'] !== '') { $arr['target_date'] = mysql_real_escape_string($_POST['filter_target_date']); list($d, $m, $y) = explode(".", trim($arr['target_date'])); $arr['target_date'] = mktime(0, 0, 0, $m, $d, $y); } if ($_POST['filter_id_order'] !== '') { $arr['id_order'] = mysql_real_escape_string($_POST['filter_id_order']); } if ($_POST['id_order_status'] !== '0') { $arr['id_order_status'] = mysql_real_escape_string($_POST['id_order_status']); } if ($_POST['filter_contragent_name'] !== '') { $arr['contragent_name'] = mysql_real_escape_string($_POST['filter_contragent_name']); } if ($_POST['filter_customer_name'] !== '') { $arr['customer_name'] = mysql_real_escape_string($_POST['filter_customer_name']); } } else {
<?php if (!_acl::isAllow('orders')) { die("Access denied"); } $Order = new Orders(); unset($parsed_res); $tpl->Assign('h1', 'Заказы'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Заказы"; $arr = false; if (isset($_GET['smb'])) { // unset($_GET); if (isset($_GET['filter_target_date']) && $_GET['filter_target_date'] !== '') { $arr['creation_date'] = $_GET['filter_target_date']; list($d, $m, $y) = explode(".", trim($arr['creation_date'])); $arr['creation_date'] = mktime(0, 0, 0, $m, $d, $y); } if (isset($_GET['filter_id_order']) && $_GET['filter_id_order'] !== '') { $arr['id_order'] = $_GET['filter_id_order']; } if (isset($_GET['id_order_status']) && $_GET['id_order_status'] !== '0') { $arr['id_order_status'] = $_GET['id_order_status']; } if (isset($_GET['filter_contragent_name']) && $_GET['filter_contragent_name'] !== '') { $arr['ca.name_c'] = $_GET['filter_contragent_name']; } if (isset($_GET['filter_email']) && $_GET['filter_email'] !== '') { $arr['u.email'] = $_GET['filter_email']; } if (isset($_GET['filter_customer_name']) && $_GET['filter_customer_name'] !== '') {
<?php if (!_acl::isAllow('segmentations')) { die("Access denied"); } $segmentation = new Segmentation(); // // ---- center ---- unset($parsed_res); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Сегментации"; $tpl->Assign('h1', $GLOBALS['IERA_LINKS'][$ii]['title']); $tpl->Assign('list_types', $segmentation->GetSegmentationType()); $tpl->Assign('list', $segmentation->GetSegmentation()); $parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_segmentations.tpl')); if (TRUE == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html']; }
<?php if (!_acl::isAllow('product')) { die("Access denied"); } // ---- center ---- unset($parsed_res); if (isset($GLOBALS['REQAR'][1]) && is_numeric($GLOBALS['REQAR'][1])) { $id_product = $GLOBALS['REQAR'][1]; } else { header('Location: ' . $GLOBALS['URL_base'] . '404/'); exit; } $Products = new Products(); $tpl->Assign('h1', 'Удаление товара'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Каталог"; $GLOBALS['IERA_LINKS'][$ii++]['url'] = $GLOBALS['URL_base'] . 'adm/cat/'; $GLOBALS['IERA_LINKS'][$ii]['title'] = "Удаление товара"; if (!($res = $Products->DelProduct($id_product))) { die('Ошибка при удалении товара.'); } $tpl->Assign('msg', 'Товар удален.'); $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_message.tpl')); if ($parsed_res['issuccess'] == true) { $tpl_center .= $parsed_res['html']; } // ---- right ----
<?php if (!_acl::isAllow('supplier_prov')) { die("Access denied"); } $Order = new Orders(); // ---- center ---- unset($parsed_res); $tpl->Assign('h1', 'Позиции по поставщикам'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Позиции по поставщикам"; $arr = false; //$Order->Suplir_prov(); $order_statuses = $Order->Suplir_prov($arr); $tpl->Assign('list1', $order_statuses); $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_suplir_prov.tpl')); if (true == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html']; } // ---- right ----
<?php if (!_acl::isAllow('users')) { die("Access denied"); } $User = new Users(); $Supplier = new Suppliers(); // ---- center ---- unset($parsed_res); if (isset($GLOBALS['REQAR'][1]) && is_numeric($GLOBALS['REQAR'][1])) { $id_user = $GLOBALS['REQAR'][1]; } else { header('Location: ' . $GLOBALS['URL_base'] . '404/'); exit; } $tpl->Assign('h1', 'Удаление поставщика склада'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Пользователи"; $GLOBALS['IERA_LINKS'][$ii++]['url'] = $GLOBALS['URL_base'] . 'adm/users/'; $GLOBALS['IERA_LINKS'][$ii]['title'] = "Удаление поставщика склада"; if (!$Supplier->RemoveWarehouse($id_user)) { die('Ошибка при удалении поставщика склада.'); } else { header('Location: ' . $GLOBALS['URL_base'] . 'adm/warehouses/?success=true'); exit; } $tpl->Assign('msg', 'Поставщик удален.'); $parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_message.tpl')); if (TRUE == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html']; }
<?php if (!_acl::isAllow('wishes')) { die("Access denied"); } $Wishes = new Wishes(); // ---- center ---- unset($parsed_res); $tpl->Assign('h1', 'Пожелания и предложения'); $ii = count($GLOBALS['IERA_LINKS']); $GLOBALS['IERA_LINKS'][$ii]['title'] = "Пожелания и предложения"; $WishesList = $Wishes->GetWishesList(true); if (!empty($WishesList)) { $tpl->Assign('wishes', $WishesList); } // Отправка ответа if (isset($_POST['sub_wis'])) { $arr['author'] = $_SESSION['member']['id_user']; $arr['author_name'] = $_SESSION['member']['name']; $arr['id_reply'] = $_POST['id_reply']; $arr['author_email'] = $_POST['feedback_authors_email']; $text = nl2br($_POST['feedback_text'], false); $arr['text_wishes'] = stripslashes($text); $arr['visible'] = 1; $Wishes->AddWishes($arr); header('Location: ' . _base_url . '/wishes/'); exit; } $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_wishes.tpl')); if (TRUE == $parsed_res['issuccess']) { $tpl_center .= $parsed_res['html'];