require $GLOBALS['PATH_sys'] . 'db_c.php'; require $GLOBALS['PATH_sys'] . 'dbtree_c.php'; require $GLOBALS['PATH_sys'] . 'paginator_c.php'; require $GLOBALS['PATH_sys'] . 'acl_c.php'; require $GLOBALS['PATH_sys'] . 'mailer_c.php'; require $GLOBALS['PATH_sys'] . 'status_c.php'; require $GLOBALS['PATH_sys'] . 'images_c.php'; require $GLOBALS['PATH_sys'] . 'sfYaml.php'; require $GLOBALS['PATH_sys'] . 'sfYamlParser.php'; // including configuration file // require(_root.'config.php'); // connection to mysql server if (phpversion() >= 5.6) { $db = new mysqlPDO($GLOBALS['DB']['HOST'], $GLOBALS['DB']['USER'], $GLOBALS['DB']['PASSWORD'], $GLOBALS['DB']['NAME']); } else { $db = new mysqlDb($GLOBALS['DB']['HOST'], $GLOBALS['DB']['USER'], $GLOBALS['DB']['PASSWORD'], $GLOBALS['DB']['NAME']); } $GLOBALS['db'] =& $db; $sql = "SELECT * FROM " . _DB_PREFIX_ . "profiles"; $profiles = $db->GetArray($sql); $admin_controllers = G::GetControllers(str_replace('~core', 'adm' . DIRSEP . 'core', $GLOBALS['PATH_contr'])); foreach ($profiles as $profile) { define('_ACL_' . strtoupper($profile['name']) . '_', $profile['id_profile']); } // $ACL_PERMS = array( // // default rights // 'rights' => $admin_controllers, // // groups // 'groups' => $profiles // ); G::ToGlobals(array('ACL_PERMS' => array('rights' => array('admin_panel', 'anonim_cab', 'catalog', 'configs', 'contragent_cab', 'customer_cab', 'diler_cab', 'duplicates', 'locations', 'manager_cab', 'manufacturers', 'moderation_edit_product', 'news', 'orders', 'pages', 'posts', 'pricelist', 'product', 'product_moderation', 'product_report', 'remitters', 'slides', 'specifications', 'supplier_cab', 'units', 'wishes', 'segmentations', 'supplier_prov', 'monitoring', 'seotext', 'orders_category', 'order', 'guestbook', 'graphics', 'users', 'customers', 'contragents', 'suppliers'), 'groups' => array(0 => array('name' => 'guest', 'caption' => 'Все', 'permissions' => 0), 1 => array('name' => 'admin', 'caption' => 'Администратор', 'permissions' => 1), 2 => array('name' => 'moderator', 'caption' => 'Администратор наполнения', 'permissions' => array('admin_panel', 'catalog', 'product', 'news', 'product_report', 'product_moderation', 'moderation_edit_product', 'pages', 'pageedit', 'slides', 'duplicates', 'specifications', 'units', 'wishes', 'segmentations', 'pricelist', 'supplier_prov', 'orders_category', 'monitoring', 'guestbook', 'graphics', 'suppliers')), 3 => array('name' => 'supplier', 'caption' => 'Поставщик', 'permissions' => array('supplier_cab')), 4 => array('name' => 'contragent', 'caption' => 'Контрагент', 'permissions' => array('contragent_cab')), 5 => array('name' => 'customer', 'caption' => 'Покупатель', 'permissions' => array('customer_cab')), 6 => array('name' => 'manager', 'caption' => 'Менеджер', 'permissions' => array('manager_cab')), 7 => array('name' => 'diler', 'caption' => 'Дилер', 'permissions' => array('diler_cab')), 8 => array('name' => 'anonim', 'caption' => 'Покупатель аноним', 'permissions' => array('anonim_cab')), 9 => array('name' => 'SEO_optimizator', 'caption' => 'СЕО - оптимизатор', 'permissions' => array('admin_panel', 'pages', 'pageedit', 'news', 'catalog', 'product', 'product_moderation', 'moderation_edit_product', 'slides', 'duplicates', 'specifications', 'units', 'wishes', 'segmentations', 'product_report', 'monitoring', 'seotext', 'orders_category', 'order', 'guestbook', 'graphics')), 10 => array('name' => 'm_diler', 'caption' => 'M-Дилер', 'permissions' => array('m_diler_cab')), 11 => array('name' => 'terminal', 'caption' => 'Терминальный клиент', 'permissions' => array('terminal_cab')), 12 => array('name' => 'supplier_manager', 'caption' => 'Менеджер поставщиков', 'permissions' => array('supplier_manager_cab')), 13 => array('name' => 'photographer', 'caption' => 'Фотограф', 'permissions' => array('admin_panel', 'catalog', 'product', 'news', 'product_report', 'product_moderation', 'moderation_edit_product', 'pages', 'pageedit', 'slides', 'duplicates', 'specifications', 'units', 'wishes', 'segmentations', 'pricelist', 'supplier_prov')), 14 => array('name' => 'remote_content', 'caption' => 'Удаленный контент-менеджер', 'permissions' => array('admin_panel', 'catalog', 'product'))))));
<?php require '/home/xtorg/x-torg.com/www/~core/sys/db_c.php'; require '/home/xtorg/x-torg.com/www/~core/sys/dbtree_c.php'; require '/home/xtorg/x-torg.com/www/~core/sys/pages_c.php'; require '/home/xtorg/x-torg.com/www/~core/sys/acl_c.php'; require '/home/xtorg/x-torg.com/www/~core/model/products_c.php'; $GLOBALS['DOMAIN'] = '179053.xtorg.web.hosting-test.net'; $GLOBALS['DB']['HOST'] = "xtorg.mysql.ukraine.com.ua"; $GLOBALS['DB']['NAME'] = "xtorg_db"; $GLOBALS['DB']['USER'] = "******"; $GLOBALS['DB']['PASSWORD'] = "******"; define('_DB_PREFIX_', "xt_"); $db = new mysqlDb($GLOBALS['DB']['HOST'], $GLOBALS['DB']['USER'], $GLOBALS['DB']['PASSWORD'], $GLOBALS['DB']['NAME']); $GLOBALS['db'] =& $db; $Products = new Products(); $db->StartTrans(); $Products->Re_null(); $db->CompleteTrans();
require $GLOBALS['PATH_sys'] . 'db_c.php'; require $GLOBALS['PATH_sys'] . 'dbtree_c.php'; require $GLOBALS['PATH_sys'] . 'paginator_c.php'; require $GLOBALS['PATH_sys'] . 'acl_c.php'; require $GLOBALS['PATH_sys'] . 'mailer_c.php'; require $GLOBALS['PATH_sys'] . 'sfYaml.php'; require $GLOBALS['PATH_sys'] . 'sfYamlParser.php'; require $GLOBALS['PATH_sys'] . 'status_c.php'; require $GLOBALS['PATH_sys'] . 'images_c.php'; // including configuration file require _root . 'config.php'; // connection to mysql server if (phpversion() >= 5.6) { $db = new mysqlPDO($GLOBALS['DB']['HOST'], $GLOBALS['DB']['USER'], $GLOBALS['DB']['PASSWORD'], $GLOBALS['DB']['NAME']); } else { $db = new mysqlDb($GLOBALS['DB']['HOST'], $GLOBALS['DB']['USER'], $GLOBALS['DB']['PASSWORD'], $GLOBALS['DB']['NAME']); } $GLOBALS['db'] =& $db; $sql = "SELECT * FROM " . _DB_PREFIX_ . "profiles"; $profiles = $db->GetArray($sql); $admin_controllers = G::GetControllers(str_replace('~core', 'adm' . DIRSEP . 'core', $GLOBALS['PATH_contr'])); foreach ($profiles as &$profile) { define('_ACL_' . strtoupper($profile['name']) . '_', $profile['id_profile']); } G::ToGlobals(array('ACL_PERMS' => array('rights' => $admin_controllers, 'groups' => $profiles))); if (G::IsLogged()) { _acl::load($_SESSION['member']['gid']); } $unwatch = array('95.69.190.43', '178.150.144.143'); if (!in_array($_SESSION['client']['ip'], $unwatch) && strpos($_SESSION['client']['ip'], '192.168.0') !== 0) { $sql1 = "SELECT * FROM " . _DB_PREFIX_ . "ip_connections WHERE ip = '" . $_SESSION['client']['ip'] . "' AND sid = 1";