ShopCMS - 1 часть

Статус
В этой теме нельзя размещать новые ответы.
x.x.x

PHP:
 <?php
#####################################
# ShopCMS: Скрипт интернет-магазина
# Copyright (c) by ADGroup
# http://shopcms.ru
#####################################

function gmts(){
 list($usec, $sec) = explode(" ", microtime());
 return ((float)$usec + (float)$sec);
}
function set_cookie($name_cookie, $value_cookie = "", $expires_cookie = "", $secure_cookie = false, $path_cookie = "", $domain_cookie = "", $httponly_cookie = false ){
 header("Set-Cookie: ".rawurlencode($name_cookie)."=".rawurlencode($value_cookie)
                                                     .(empty($expires_cookie) ? "" : "; expires=".gmdate("D, d-M-Y H:i:s", $expires_cookie)." GMT")
                                                     .(empty($path_cookie) ? "" : "; path=".$path_cookie)
                                                     .(empty($domain_cookie) ? "" : "; domain=".$domain_cookie)
                                                     .(!$secure_cookie ? "" : "; secure")
                                                     .(!$httponly_cookie ? "" : "; HttpOnly"), false);
}

define('SECURITY_STOP_MSG', 'License not found!');
define('SECURITY_NOLIC_MSG', 'Invalid license!');
define('ERROR_DB_INIT', 'Database connection problem!');
$sc_1 = gmts();
$sc_4 = 0;
$sc_8 = 0;
$gmc = 1;

if(!in_array(getenv('HTTP_HOST'), array("127.0.0.1", "localhost"))){
 if(file_exists("core/config/license.txt")){
  if(!in_array(md5(strtr($_SERVER['HTTP_HOST'], array("www." => ""))."sNLYnT"), explode("dlv1b", trim(file_get_contents("core/config/license.txt"))))){
   exit(SECURITY_NOLIC_MSG);
  }
 }else{
  exit(SECURITY_STOP_MSG);
 }
}

include("core/config/init.php");
include("core/includes/database/mysql.php");
 
$far_1 = array("core/config/connect.inc.php"
              ,"core/config/language_list.php"
              ,"core/classes/class.ajax.php"
              ,"core/classes/class.kcaptcha.php"
              ,"core/classes/class.virtual.paymentmodule.php"
              ,"core/classes/class.virtual.shippingratecalculator.php"
              ,"core/classes/class.xml2array.php");
  
$far_2 = glob("core/functions/*.php");
$far = array_merge($far_1,$far_2);
 
$cfar = count($far);
if(file_exists("core/cache/fcache.php")){
 include("core/cache/fcache.php");
}else{
 for($n=0; $n<$cfar; $n++){
  include($far[$n]);
 }
}
define('PATH_DELIMITER', isWindows() ? ';' : ':');

$_POST = xStripSlashesGPC($_POST);
$_GET = xStripSlashesGPC($_GET);
$_COOKIE = xStripSlashesGPC($_COOKIE);

if(!db_connect(DB_HOST, DB_USER, DB_PASS)){
 exit(ERROR_DB_INIT);
}
if(!db_select_db(DB_NAME)){
 exit(db_error());
}

settingDefineConstants();
  
include("core/config/headers.php");
include("core/config/error_handler.php");
  
define('SECURITY_EXPIRE', 60 * 60 * CONF_SECURITY_EXPIRE);
session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc");
session_set_cookie_params(SECURITY_EXPIRE);
session_start();
if(isset($_COOKIE['PHPSESSID'])){
 if(0 < SECURITY_EXPIRE){
  set_cookie("PHPSESSID", $_COOKIE['PHPSESSID'], time() + SECURITY_EXPIRE);
 }else{
  set_cookie("PHPSESSID", $_COOKIE['PHPSESSID']);
 }
}

//select a new language?
if(isset($_POST['lang'])){
 $_SESSION['current_language'] = $_POST['lang'];
}

//current language session variable
if(!isset($_SESSION['current_language']) || $_SESSION['current_language'] < 0 || count($lang_list) < $_SESSION['current_language']){
 $_SESSION['current_language'] = 0; //set default language
}

//include a language file
if(isset($lang_list[$_SESSION['current_language']]) && file_exists("core/languages/".$lang_list[$_SESSION['current_language']]->filename)){
 //include current language file
 include("core/languages/".$lang_list[$_SESSION['current_language']]->filename);
}else{
 exit("<font color=red><b>ERROR: Couldn't find language file!</b></font>");
}

if(isset($_GET['do'])){
 if(in_array($_GET['do'], array("captcha", "cart", "rss", "compare", "yandex", "invoice_jur", "invoice_phys", "stat", "get_file"))){
  include("core/includes/processor/".$_GET['do'].".php");
 }else{
  header("HTTP/1.0 404 Not Found");
  header("HTTP/1.1 404 Not Found");
  header("Status: 404 Not Found");
  exit(ERROR_404_HTML);
 }
}else{
 //init Smarty
 require("core/smarty/smarty.class.php");
 $smarty = new Smarty; //core smarty object
 $smarty_mail = new Smarty; //for e-mails

 if((integer)CONF_SMARTY_FORCE_COMPILE){ //this forces Smarty to recompile design each time someone runs index.php
  $smarty->force_compile = true;
  $smarty_mail->force_compile = true;
 }

 $relaccess = checklogin();

 //# of selected currency
 $current_currency = isset($_SESSION['current_currency']) ? $_SESSION['current_currency'] : CONF_DEFAULT_CURRENCY;
 $smarty->assign("current_currency", $current_currency);
 $q = db_query("select code, currency_value, where2show, currency_iso_3, Name, roundval from ".CURRENCY_TYPES_TABLE." where CID=".(integer)$current_currency);
 if($row = db_fetch_row($q)){
  $smarty->assign("currency_name", $row[0]);
  $selected_currency_details = $row; //for show_price() function
 }else{ //no currency found. In this case check is there any currency type in the database
  $q = db_query("select code, currency_value, where2show, roundval from ".CURRENCY_TYPES_TABLE);
  if($row = db_fetch_row($q)){
   $smarty->assign("currency_name", $row[0]);
   $selected_currency_details = $row; //for show_price() function
  }
 }
 $smarty->assign("currency_roundval", $selected_currency_details["roundval"]);
 
 //set $categoryID
 if(isset($_GET['categoryID']) || isset($_POST['categoryID'])){
  $categoryID = isset($_GET['categoryID']) ? $_GET['categoryID'] : $_POST['categoryID'];
  $categoryID = (integer)$categoryID;
 }
 // else $categoryID = 1;
 // set $productID
 if(isset($_GET['productID']) || isset($_POST['productID'])){
  $productID = isset($_GET['productID']) ? $_GET['productID'] : $_POST['productID'];
  $productID = (integer)$productID;
 }
 // ------------------------------------------------------------------------------------------------
 //and different vars...
 $register = isset($_POST['register'], $_GET['register']) ? $_GET['register'] : $_POST['register'];
 $update_details = isset($_POST['update_details'], $_GET['update_details']) ? $_GET['update_details'] : $_POST['update_details'];
 $order = isset($_POST['order'], $_GET['order']) ? $_GET['order'] : $_POST['order'];
 $order_without_billing_address = isset($_POST['order_without_billing_address'], $_GET['order_without_billing_address']) ? $_GET['order_without_billing_address'] : $_POST['order_without_billing_address'];
 $check_order = isset($_POST['check_order'], $_GET['check_order']) ? $_GET['check_order'] : $_POST['check_order'];
 $proceed_ordering = isset($_POST['proceed_ordering'], $_GET['proceed_ordering']) ? $_GET['proceed_ordering'] : $_POST['proceed_ordering'];
 $update_customer_info = isset($_POST['update_customer_info'], $_GET['update_customer_info']) ? $_GET['update_customer_info'] : $_POST['update_customer_info'];
 $show_aux_page = isset($_POST['show_aux_page'], $_GET['show_aux_page']) ? $_GET['show_aux_page'] : $_POST['show_aux_page'];

 if(isset($_GET['visit_history']) || isset($_POST['visit_history'])){
  $visit_history = 1;
 }
 if(isset($_GET['order_history']) || isset($_POST['order_history'])){
  $order_history = 1;
 }
 if(isset($_GET['address_book']) || isset($_POST['address_book'])){
  $address_book = 1;
 }

 $address_editor = isset($_POST['address_editor'], $_GET['address_editor']) ? $_GET['address_editor'] : $_POST['address_editor'];
 $add_new_address = isset($_POST['add_new_address'], $_GET['add_new_address']) ? $_GET['add_new_address'] : $_POST['add_new_address'];
 $contact_info = isset($_POST['contact_info'], $_GET['contact_info']) ? $_GET['contact_info'] : $_POST['contact_info'];

 if(isset($_GET['comparison_products']) || isset($_POST['comparison_products'])){
  $comparison_products = 1;
 }
 if(isset($_GET['register_authorization']) || isset($_POST['register_authorization'])){
  $register_authorization = 1;
 }
 if(isset($_GET['page_not_found']) || isset($_POST['page_not_found'])){
  $page_not_found = 1;
 }
 if(isset($_GET['news']) || isset($_POST['news'])){
  $news = 1;
 }
 if(isset($_GET['quick_register'])){
  $quick_register = 1;
 }
 if(isset($_GET['order2_shipping_quick'])){
  $order2_shipping_quick = 1;
 }
 if(isset($_GET['order3_billing_quick'])){
  $order3_billing_quick = 1;
 }
 if(isset($_GET['order2_shipping']) || isset($_POST['order2_shipping'])){
  $order2_shipping = 1;
 }
 if(isset($_GET['order3_billing']) || isset($_POST['order3_billing'])){
  $order3_billing = 1;
 }
 if(isset($_GET['change_address']) || isset($_POST['change_address'])){
  $change_address = 1;
 }
 if(isset($_GET['order4_confirmation']) || isset($_POST['order4_confirmation'])){
  $order4_confirmation = 1;
 }
 if(isset($_GET['order4_confirmation_quick']) || isset($_POST['order4_confirmation_quick'])){
  $order4_confirmation_quick = 1;
 }

 $order_detailed = isset($_POST['order_detailed'], $_GET['order_detailed']) ? $_GET['order_detailed'] : $_POST['order_detailed'];
 $p_order_detailed = isset($_POST['p_order_detailed'], $_GET['p_order_detailed']) ? $_GET['p_order_detailed'] : $_POST['p_order_detailed'];
 // ------------------------------------------------------------------------------------------------
 if(!isset($_SESSION['vote_completed'])){
  $_SESSION['vote_completed'] = array();
 }

 //checking for proper $offset init
 $offset = isset($_GET['offset']) ? $_GET['offset'] : 0;
 if($offset < 0 || $offset % CONF_PRODUCTS_PER_PAGE){
  $offset = 0;
 }
 
 if(isset($productID)){ //to rollout categories navigation table
  $q = db_query("select categoryID FROM ".PRODUCTS_TABLE." WHERE productID=".(integer)$productID);
  $r = db_fetch_row($q);
  if($r){
   $categoryID = $r[0];
  }
 }

 if(isset($_POST['change_design'])){
  $_SESSION['CUSTOM_DESIGN'] = $_POST['change_design'];
 }

 if(isset($_SESSION['CUSTOM_DESIGN'])){
  $smarty->template_dir = "core/tpl/user/".$_SESSION['CUSTOM_DESIGN'];
  define('TPL', $_SESSION['CUSTOM_DESIGN']);
 }else{
  $smarty->template_dir = "core/tpl/user/".CONF_DEFAULT_TEMPLATE;
  define('TPL', CONF_DEFAULT_TEMPLATE);
 }

 $smarty_mail->template_dir = "core/tpl/email";

 //fetch currency types from database
 $q = db_query("select CID, Name, code, currency_value, where2show, roundval, currency_iso_3 from ".CURRENCY_TYPES_TABLE." order by sort_order");
 $currencies = array();
 while($row = db_fetch_row($q)){
  $currencies[] = $row;
 }

 $smarty->assign("currencies", $currencies);
 $smarty->assign("currencies_count", count($currencies));

 $smarty->assign("lang_list", $lang_list);

 if(isset($_SESSION["current_language"])){
  $smarty->assign("current_language", $_SESSION["current_language"]);
 }
 if(isset($_SESSION["log"])){
  $smarty->assign("log", $_SESSION["log"]);
 }
 // - following vars are used as hidden in the customer survey form
 if(isset($categoryID)){
  $smarty->assign("categoryID", $categoryID);
 }
 if(isset($productID)){
  $smarty->assign("productID", $productID);
 }
 if(isset($_GET["currency"])){
  $smarty->assign("currency", $_GET["currency"]);
 }
 if(isset($_GET["user_details"])){
  $smarty->assign("user_details", $_GET["user_details"]);
 }
 if(isset($_GET["aux_page"])){
  $smarty->assign("aux_page", $_GET["aux_page"]);
 }
 if(isset($_GET["show_price"])){
  $smarty->assign("show_price", $_GET["show_price"]);
 }
 if(isset($_GET["searchstring"])){
  $smarty->hassign("searchstring", $_GET["searchstring"]);
 }
 if(isset($register)){
  $smarty->assign("register", $register);
 }
 if(isset($order)){
  $smarty->assign("order", $order);
 }
 if(isset($check_order)){
  $smarty->assign("check_order", $check_order);
 }
 //set defualt main_content template to homepage
 $smarty->assign("main_content_template", "home.tpl.html");
 
 //catalog
 
 $q = db_query("select categoryID, name, products_count, products_count_admin, parent, picture, subcount FROM ".CATEGORIES_TABLE." ORDER BY sort_order, name");
 $fc = array(); //parents
 $mc = array(); //parents
 while($row = db_fetch_row($q)){
  $fc[(integer)$row["categoryID"]] = $row;
  $mc[(integer)$row["categoryID"]] = (integer)$row["parent"];
 }

 $cats = catGetCategoryCListMin();

 //include all .php files from core/includes/ dir or from cache
 if((integer)CONF_SMARTY_FORCE_COMPILE){
  if(file_exists("core/cache/incache.php")){
   unlink("core/cache/incache.php");
  }
  if(file_exists("core/cache/fcache.php")){
   unlink("core/cache/fcache.php");
  }
  $fls = glob("core/includes/*.php");
  $cfls = count($fls);
  for($zc=0; $zc<$cfls; $zc++){
   include($fls[$zc]);
  }
 }else{
  if(file_exists("core/cache/incache.php")){
   include("core/cache/incache.php");
  }else{
   ob_start();
   for($n=0; $n<$cfar; $n++){
    readfile($far[$n]);
   }
   $_res = ob_get_contents();
   ob_end_clean();
   $fh = fopen("core/cache/fcache.php", 'w');
   fwrite($fh, $_res);
   fclose($fh);
   unset($_res);
 
   $fls = glob("core/includes/*.php");
   $cfls = count($fls);
   ob_start();
   for($i=0; $i<$cfls; $i++){
    readfile($fls[$i]);
   }
   $_res = ob_get_contents();
   ob_end_clean();
   $fh = fopen("core/cache/incache.php", 'w');
   fwrite($fh, $_res);
   fclose($fh);
   unset($_res);
   include("core/cache/incache.php");
  }
 }
 
 //show admin a administrative mode link
 if(isset($_SESSION["log"]) && in_array(100, $relaccess)){
  $smarty->assign("isadmin", "yes");
  $adminislog = true;
 }else{
  $adminislog = false;
 }

 $exploerrors = "";

 if(file_exists("install.php")){
  $exploerrors.= WARNING_DELETE_INSTALL_PHP;
 }

 if(!is_writable("core/cache")){
  exit(WARNING_WRONG_CHMOD);
 }

 $RGLBLS = @ini_get('register_globals');
 if(strtolower($RGLBLS)=="on" || (integer)$RGLBLS==1){
  exit(WARNING_REGISTER_GLOBALS);
 }

 $smarty->assign("exploerrors", $exploerrors);
 
 $tmpb = array();
 foreach($leftb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html" ){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty -> get_template_vars("allow_products_search")){
     $vallb["state"] = false;
    }
   }else{
    $vallb["state"] = false;
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 
 $smarty->assign("left_blocks",$tmpb);
 $smarty->assign("countlb",count($tmpb));
 
 $tmpb = array();
 foreach($rightb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html"){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty -> get_template_vars("allow_products_search")){
     $vallb["state"] = false;
    }else{
     $vallb["state"] = false;
    }
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 $smarty->assign("right_blocks",$tmpb);
 $smarty->assign("countrb",count($tmpb));
 
 $tmpb = array();
 foreach($topb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif ($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html"){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty->get_template_vars("allow_products_search")){
     $vallb["state"] = false;
    }
   }else{
    $vallb["state"] = false;
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 $smarty->assign("top_blocks",$tmpb);
 $smarty->assign("counttb",count($tmpb));
 
 $tmpb = array();
 foreach($bottomb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html"){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty -> get_template_vars("allow_products_search")) $vallb["state"] = false;
   }else{
    $vallb["state"] = false;
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 $smarty->assign("bottom_blocks",$tmpb);
 $smarty->assign("countbb",count($tmpb));

 $sc_2 = getmicrotime();
 $sr_1 = $sc_2 - $sc_1 - $sc_8;
 
 //show Smarty output
 $smarty->display("index.tpl.html");

 if($adminislog && CONF_DISPLAY_INFO == 1){
  $sr3  = getmicrotime();
  $sr_2 = $sr3 - $sc_2;
  $sr_3 = $sr3 - $sc_1;
  $sr_1 = number_format(round($sr_1, 3), 3, '.', '');
  $sr_2 = number_format(round($sr_2, 3), 3, '.', '');
  $sr_3 = number_format(round($sr_3, 3), 3, '.', '');
  $sc_8 = number_format(round($sc_8, 3), 3, '.', '');
 
  $_SESSION['tgenexe']     = $sr_1;
  $_SESSION['tgencompile'] = $sr_2;
  $_SESSION['tgendb']      = $sc_8;
  $_SESSION['tgenall']     = $sr_3;
  $_SESSION['tgensql']     = $sc_4;
 }
}
?>
 
  • Нравится
Реакции: kvl
Проблема с дополнительными категориями

Здравствуйте! Извиняюсь если не в тему!
Возникла такая, очень серьезная, проблема ShopCMS:
я добавляю товар А в 1 категорию и в Допольнительных категориях добавляю еще в категорию 2 (здесь все отлично), но! при добавлении товара В в категорию 1 и в Допольнительных категориях еще в категорию 2, то этот товар В в категории 2 не отображается (В отображается только в 1-й, а во 2-й только товар А)!
И самое интересное - количество товаров отображается верно!
sample.jpg

вот, товары 9, 10, 11 выводится отказываются, а 7, 8 - выводятся
Такая проблема и в аминке, и на самом сайте
ЧТО ДЕЛАТЬ? ПОМОГИТЕ, ПОЖАЛУЙСТА!
 
PHP:
 <?php
#####################################
# ShopCMS: Скрипт интернет-магазина
# Copyright (c) by ADGroup
# http://shopcms.ru
#####################################
function gmts(){
 list($usec, $sec) = explode(" ", microtime());
 return ((float)$usec + (float)$sec);
}
function set_cookie($name_cookie, $value_cookie = "", $expires_cookie = "", $secure_cookie = false, $path_cookie = "", $domain_cookie = "", $httponly_cookie = false ){
 header("Set-Cookie: ".rawurlencode($name_cookie)."=".rawurlencode($value_cookie)
                                                     .(empty($expires_cookie) ? "" : "; expires=".gmdate("D, d-M-Y H:i:s", $expires_cookie)." GMT")
                                                     .(empty($path_cookie) ? "" : "; path=".$path_cookie)
                                                     .(empty($domain_cookie) ? "" : "; domain=".$domain_cookie)
                                                     .(!$secure_cookie ? "" : "; secure")
                                                     .(!$httponly_cookie ? "" : "; HttpOnly"), false);
}
define('SECURITY_STOP_MSG', 'License not found!');
define('SECURITY_NOLIC_MSG', 'Invalid license!');
define('ERROR_DB_INIT', 'Database connection problem!');
$sc_1 = gmts();
$sc_4 = 0;
$sc_8 = 0;
$gmc = 1;
if(!in_array(getenv('HTTP_HOST'), array("127.0.0.1", "localhost"))){
 if(file_exists("core/config/license.txt")){
  if(!in_array(md5(strtr($_SERVER['HTTP_HOST'], array("www." => ""))."sNLYnT"), explode("dlv1b", trim(file_get_contents("core/config/license.txt"))))){
   exit(SECURITY_NOLIC_MSG);
  }
 }else{
  exit(SECURITY_STOP_MSG);
 }
}
include("core/config/init.php");
include("core/includes/database/mysql.php");
$far_1 = array("core/config/connect.inc.php"
              ,"core/config/language_list.php"
              ,"core/classes/class.ajax.php"
              ,"core/classes/class.kcaptcha.php"
              ,"core/classes/class.virtual.paymentmodule.php"
              ,"core/classes/class.virtual.shippingratecalculator.php"
              ,"core/classes/class.xml2array.php");
$far_2 = glob("core/functions/*.php");
$far = array_merge($far_1,$far_2);
$cfar = count($far);
if(file_exists("core/cache/fcache.php")){
 include("core/cache/fcache.php");
}else{
 for($n=0; $n<$cfar; $n++){
  include($far[$n]);
 }
}
define('PATH_DELIMITER', isWindows() ? ';' : ':');
$_POST = xStripSlashesGPC($_POST);
$_GET = xStripSlashesGPC($_GET);
$_COOKIE = xStripSlashesGPC($_COOKIE);
if(!db_connect(DB_HOST, DB_USER, DB_PASS)){
 exit(ERROR_DB_INIT);
}
if(!db_select_db(DB_NAME)){
 exit(db_error());
}
settingDefineConstants();
include("core/config/headers.php");
include("core/config/error_handler.php");
define('SECURITY_EXPIRE', 60 * 60 * CONF_SECURITY_EXPIRE);
session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc");
session_set_cookie_params(SECURITY_EXPIRE);
session_start();
if(isset($_COOKIE['PHPSESSID'])){
 if(0 < SECURITY_EXPIRE){
  set_cookie("PHPSESSID", $_COOKIE['PHPSESSID'], time() + SECURITY_EXPIRE);
 }else{
  set_cookie("PHPSESSID", $_COOKIE['PHPSESSID']);
 }
}
//select a new language?
if(isset($_POST['lang'])){
 $_SESSION['current_language'] = $_POST['lang'];
}
//current language session variable
if(!isset($_SESSION['current_language']) || $_SESSION['current_language'] < 0 || count($lang_list) < $_SESSION['current_language']){
 $_SESSION['current_language'] = 0; //set default language
}
//include a language file
if(isset($lang_list[$_SESSION['current_language']]) && file_exists("core/languages/".$lang_list[$_SESSION['current_language']]->filename)){
 //include current language file
 include("core/languages/".$lang_list[$_SESSION['current_language']]->filename);
}else{
 exit("<font color=red><b>ERROR: Couldn't find language file!</b></font>");
}
if(isset($_GET['do'])){
 if(in_array($_GET['do'], array("captcha", "cart", "rss", "compare", "yandex", "invoice_jur", "invoice_phys", "stat", "get_file"))){
  include("core/includes/processor/".$_GET['do'].".php");
 }else{
  header("HTTP/1.0 404 Not Found");
  header("HTTP/1.1 404 Not Found");
  header("Status: 404 Not Found");
  exit(ERROR_404_HTML);
 }
}else{
 //init Smarty
 require("core/smarty/smarty.class.php");
 $smarty = new Smarty; //core smarty object
 $smarty_mail = new Smarty; //for e-mails
 if((integer)CONF_SMARTY_FORCE_COMPILE){ //this forces Smarty to recompile design each time someone runs index.php
  $smarty->force_compile = true;
  $smarty_mail->force_compile = true;
 }
 $relaccess = checklogin();
 //# of selected currency
 $current_currency = isset($_SESSION['current_currency']) ? $_SESSION['current_currency'] : CONF_DEFAULT_CURRENCY;
 $smarty->assign("current_currency", $current_currency);
 $q = db_query("select code, currency_value, where2show, currency_iso_3, Name, roundval from ".CURRENCY_TYPES_TABLE." where CID=".(integer)$current_currency);
 if($row = db_fetch_row($q)){
  $smarty->assign("currency_name", $row[0]);
  $selected_currency_details = $row; //for show_price() function
 }else{ //no currency found. In this case check is there any currency type in the database
  $q = db_query("select code, currency_value, where2show, roundval from ".CURRENCY_TYPES_TABLE);
  if($row = db_fetch_row($q)){
   $smarty->assign("currency_name", $row[0]);
   $selected_currency_details = $row; //for show_price() function
  }
 }
 $smarty->assign("currency_roundval", $selected_currency_details["roundval"]);
 //set $categoryID
 if(isset($_GET['categoryID']) || isset($_POST['categoryID'])){
  $categoryID = isset($_GET['categoryID']) ? $_GET['categoryID'] : $_POST['categoryID'];
  $categoryID = (integer)$categoryID;
 }
 // else $categoryID = 1;
 // set $productID
 if(isset($_GET['productID']) || isset($_POST['productID'])){
  $productID = isset($_GET['productID']) ? $_GET['productID'] : $_POST['productID'];
  $productID = (integer)$productID;
 }
 // ------------------------------------------------------------------------------------------------
 //and different vars...
 $register = isset($_POST['register'], $_GET['register']) ? $_GET['register'] : $_POST['register'];
 $update_details = isset($_POST['update_details'], $_GET['update_details']) ? $_GET['update_details'] : $_POST['update_details'];
 $order = isset($_POST['order'], $_GET['order']) ? $_GET['order'] : $_POST['order'];
 $order_without_billing_address = isset($_POST['order_without_billing_address'], $_GET['order_without_billing_address']) ? $_GET['order_without_billing_address'] : $_POST['order_without_billing_address'];
 $check_order = isset($_POST['check_order'], $_GET['check_order']) ? $_GET['check_order'] : $_POST['check_order'];
 $proceed_ordering = isset($_POST['proceed_ordering'], $_GET['proceed_ordering']) ? $_GET['proceed_ordering'] : $_POST['proceed_ordering'];
 $update_customer_info = isset($_POST['update_customer_info'], $_GET['update_customer_info']) ? $_GET['update_customer_info'] : $_POST['update_customer_info'];
 $show_aux_page = isset($_POST['show_aux_page'], $_GET['show_aux_page']) ? $_GET['show_aux_page'] : $_POST['show_aux_page'];
 if(isset($_GET['visit_history']) || isset($_POST['visit_history'])){
  $visit_history = 1;
 }
 if(isset($_GET['order_history']) || isset($_POST['order_history'])){
  $order_history = 1;
 }
 if(isset($_GET['address_book']) || isset($_POST['address_book'])){
  $address_book = 1;
 }
 $address_editor = isset($_POST['address_editor'], $_GET['address_editor']) ? $_GET['address_editor'] : $_POST['address_editor'];
 $add_new_address = isset($_POST['add_new_address'], $_GET['add_new_address']) ? $_GET['add_new_address'] : $_POST['add_new_address'];
 $contact_info = isset($_POST['contact_info'], $_GET['contact_info']) ? $_GET['contact_info'] : $_POST['contact_info'];
 if(isset($_GET['comparison_products']) || isset($_POST['comparison_products'])){
  $comparison_products = 1;
 }
 if(isset($_GET['register_authorization']) || isset($_POST['register_authorization'])){
  $register_authorization = 1;
 }
 if(isset($_GET['page_not_found']) || isset($_POST['page_not_found'])){
  $page_not_found = 1;
 }
 if(isset($_GET['news']) || isset($_POST['news'])){
  $news = 1;
 }
 if(isset($_GET['quick_register'])){
  $quick_register = 1;
 }
 if(isset($_GET['order2_shipping_quick'])){
  $order2_shipping_quick = 1;
 }
 if(isset($_GET['order3_billing_quick'])){
  $order3_billing_quick = 1;
 }
 if(isset($_GET['order2_shipping']) || isset($_POST['order2_shipping'])){
  $order2_shipping = 1;
 }
 if(isset($_GET['order3_billing']) || isset($_POST['order3_billing'])){
  $order3_billing = 1;
 }
 if(isset($_GET['change_address']) || isset($_POST['change_address'])){
  $change_address = 1;
 }
 if(isset($_GET['order4_confirmation']) || isset($_POST['order4_confirmation'])){
  $order4_confirmation = 1;
 }
 if(isset($_GET['order4_confirmation_quick']) || isset($_POST['order4_confirmation_quick'])){
  $order4_confirmation_quick = 1;
 }
 $order_detailed = isset($_POST['order_detailed'], $_GET['order_detailed']) ? $_GET['order_detailed'] : $_POST['order_detailed'];
 $p_order_detailed = isset($_POST['p_order_detailed'], $_GET['p_order_detailed']) ? $_GET['p_order_detailed'] : $_POST['p_order_detailed'];
 // ------------------------------------------------------------------------------------------------
 if(!isset($_SESSION['vote_completed'])){
  $_SESSION['vote_completed'] = array();
 }
 //checking for proper $offset init
 $offset = isset($_GET['offset']) ? $_GET['offset'] : 0;
 if($offset < 0 || $offset % CONF_PRODUCTS_PER_PAGE){
  $offset = 0;
 }
 if(isset($productID)){ //to rollout categories navigation table
  $q = db_query("select categoryID FROM ".PRODUCTS_TABLE." WHERE productID=".(integer)$productID);
  $r = db_fetch_row($q);
  if($r){
   $categoryID = $r[0];
  }
 }
 if(isset($_POST['change_design'])){
  $_SESSION['CUSTOM_DESIGN'] = $_POST['change_design'];
 }
 if(isset($_SESSION['CUSTOM_DESIGN'])){
  $smarty->template_dir = "core/tpl/user/".$_SESSION['CUSTOM_DESIGN'];
  define('TPL', $_SESSION['CUSTOM_DESIGN']);
 }else{
  $smarty->template_dir = "core/tpl/user/".CONF_DEFAULT_TEMPLATE;
  define('TPL', CONF_DEFAULT_TEMPLATE);
 }
 $smarty_mail->template_dir = "core/tpl/email";
 //fetch currency types from database
 $q = db_query("select CID, Name, code, currency_value, where2show, roundval, currency_iso_3 from ".CURRENCY_TYPES_TABLE." order by sort_order");
 $currencies = array();
 while($row = db_fetch_row($q)){
  $currencies[] = $row;
 }
 $smarty->assign("currencies", $currencies);
 $smarty->assign("currencies_count", count($currencies));
 $smarty->assign("lang_list", $lang_list);
 if(isset($_SESSION["current_language"])){
  $smarty->assign("current_language", $_SESSION["current_language"]);
 }
 if(isset($_SESSION["log"])){
  $smarty->assign("log", $_SESSION["log"]);
 }
 // - following vars are used as hidden in the customer survey form
 if(isset($categoryID)){
  $smarty->assign("categoryID", $categoryID);
 }
 if(isset($productID)){
  $smarty->assign("productID", $productID);
 }
 if(isset($_GET["currency"])){
  $smarty->assign("currency", $_GET["currency"]);
 }
 if(isset($_GET["user_details"])){
  $smarty->assign("user_details", $_GET["user_details"]);
 }
 if(isset($_GET["aux_page"])){
  $smarty->assign("aux_page", $_GET["aux_page"]);
 }
 if(isset($_GET["show_price"])){
  $smarty->assign("show_price", $_GET["show_price"]);
 }
 if(isset($_GET["searchstring"])){
  $smarty->hassign("searchstring", $_GET["searchstring"]);
 }
 if(isset($register)){
  $smarty->assign("register", $register);
 }
 if(isset($order)){
  $smarty->assign("order", $order);
 }
 if(isset($check_order)){
  $smarty->assign("check_order", $check_order);
 }
 //set defualt main_content template to homepage
 $smarty->assign("main_content_template", "home.tpl.html");
 //catalog
 $q = db_query("select categoryID, name, products_count, products_count_admin, parent, picture, subcount FROM ".CATEGORIES_TABLE." ORDER BY sort_order, name");
 $fc = array(); //parents
 $mc = array(); //parents
 while($row = db_fetch_row($q)){
  $fc[(integer)$row["categoryID"]] = $row;
  $mc[(integer)$row["categoryID"]] = (integer)$row["parent"];
 }
 $cats = catGetCategoryCListMin();
 //include all .php files from core/includes/ dir or from cache
 if((integer)CONF_SMARTY_FORCE_COMPILE){
  if(file_exists("core/cache/incache.php")){
   unlink("core/cache/incache.php");
  }
  if(file_exists("core/cache/fcache.php")){
   unlink("core/cache/fcache.php");
  }
  $fls = glob("core/includes/*.php");
  $cfls = count($fls);
  for($zc=0; $zc<$cfls; $zc++){
   include($fls[$zc]);
  }
 }else{
  if(file_exists("core/cache/incache.php")){
   include("core/cache/incache.php");
  }else{
   ob_start();
   for($n=0; $n<$cfar; $n++){
    readfile($far[$n]);
   }
   $_res = ob_get_contents();
   ob_end_clean();
   $fh = fopen("core/cache/fcache.php", 'w');
   fwrite($fh, $_res);
   fclose($fh);
   unset($_res);
   $fls = glob("core/includes/*.php");
   $cfls = count($fls);
   ob_start();
   for($i=0; $i<$cfls; $i++){
    readfile($fls[$i]);
   }
   $_res = ob_get_contents();
   ob_end_clean();
   $fh = fopen("core/cache/incache.php", 'w');
   fwrite($fh, $_res);
   fclose($fh);
   unset($_res);
   include("core/cache/incache.php");
  }
 }
 //show admin a administrative mode link
 if(isset($_SESSION["log"]) && in_array(100, $relaccess)){
  $smarty->assign("isadmin", "yes");
  $adminislog = true;
 }else{
  $adminislog = false;
 }
 $exploerrors = "";
 if(file_exists("install.php")){
  $exploerrors.= WARNING_DELETE_INSTALL_PHP;
 }
 if(!is_writable("core/cache")){
  exit(WARNING_WRONG_CHMOD);
 }
 $RGLBLS = @ini_get('register_globals');
 if(strtolower($RGLBLS)=="on" || (integer)$RGLBLS==1){
  exit(WARNING_REGISTER_GLOBALS);
 }
 $smarty->assign("exploerrors", $exploerrors);
 $tmpb = array();
 foreach($leftb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html" ){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty -> get_template_vars("allow_products_search")){
     $vallb["state"] = false;
    }
   }else{
    $vallb["state"] = false;
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 $smarty->assign("left_blocks",$tmpb);
 $smarty->assign("countlb",count($tmpb));
 $tmpb = array();
 foreach($rightb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html"){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty -> get_template_vars("allow_products_search")){
     $vallb["state"] = false;
    }else{
     $vallb["state"] = false;
    }
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 $smarty->assign("right_blocks",$tmpb);
 $smarty->assign("countrb",count($tmpb));
 $tmpb = array();
 foreach($topb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif ($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html"){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty->get_template_vars("allow_products_search")){
     $vallb["state"] = false;
    }
   }else{
    $vallb["state"] = false;
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 $smarty->assign("top_blocks",$tmpb);
 $smarty->assign("counttb",count($tmpb));
 $tmpb = array();
 foreach($bottomb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html"){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty -> get_template_vars("allow_products_search")) $vallb["state"] = false;
   }else{
    $vallb["state"] = false;
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 $smarty->assign("bottom_blocks",$tmpb);
 $smarty->assign("countbb",count($tmpb));
 $sc_2 = getmicrotime();
 $sr_1 = $sc_2 - $sc_1 - $sc_8;
 //show Smarty output
 $smarty->display("index.tpl.html");
 if($adminislog && CONF_DISPLAY_INFO == 1){
  $sr3  = getmicrotime();
  $sr_2 = $sr3 - $sc_2;
  $sr_3 = $sr3 - $sc_1;
  $sr_1 = number_format(round($sr_1, 3), 3, '.', '');
  $sr_2 = number_format(round($sr_2, 3), 3, '.', '');
  $sr_3 = number_format(round($sr_3, 3), 3, '.', '');
  $sc_8 = number_format(round($sc_8, 3), 3, '.', '');
  $_SESSION['tgenexe']     = $sr_1;
  $_SESSION['tgencompile'] = $sr_2;
  $_SESSION['tgendb']      = $sc_8;
  $_SESSION['tgenall']     = $sr_3;
  $_SESSION['tgensql']     = $sc_4;
 }
}
?>
Уважаемый Evgeniy Artemyev. Не будет ли Вам трудно, выложить еще 1 недостающий до полного счастья файлик: admin.php? Спасибо.
 
Уважаемый Evgeniy Artemyev. Не будет ли Вам трудно, выложить еще 1 недостающий до полного счастья файлик: admin.php? Спасибо.
Вот, вроде как нормальны файл admin.php. Если нет, Evgeniy Artemyev, подправте, пожалуйста...
PHP:
<?php
##################################### 
# ShopCMS: Скрипт интернет-магазина 
# Copyright (c) by ADGroup 
# http://shopcms.ru 
##################################### 
define( "SECURITY_STOP_MSG", "License not found!" );
define( "SECURITY_NOLIC_MSG", "Invalid license!" );
define( "ERROR_DB_INIT", "Database connection problem!" );
if ( file_exists( "core/config/license.txt" ) )
{
    if ( !in_array( md5( strtr( $_SERVER['HTTP_HOST'], array( "www." => "" ) )."sNLYnT" ), explode( "dlv1b", trim( file_get_contents( "core/config/license.txt" ) ) ) ) )
    {
        exit( SECURITY_NOLIC_MSG );
    }
}
else
{
    exit( SECURITY_STOP_MSG );
}
include( "core/config/init.php" );
include( "core/includes/database/mysql.php" );
$far_1 = array( "core/config/connect.inc.php", "core/config/language_list.php", "core/config/paths.inc.php", "core/classes/class.virtual.shippingratecalculator.php", "core/classes/class.virtual.paymentmodule.php", "core/classes/class.xmlnodex.php" );
$far_2 = glob( "core/functions/*.php" );
$far_3 = glob( "core/functions/admin/*.php" );
$far = array_merge( $far_1, $far_2, $far_3 );
$cfar = count( $far );
if ( file_exists( "core/cache/afcache.php" ) )
{
    include( "core/cache/afcache.php" );
}
else
{
    $n = 0;
    for ( ; $n < $cfar; ++$n )
    {
        include( $far[$n] );
    }
}
define( "PATH_DELIMITER", iswindows( ) ? ";" : ":" );
$GLOBALS['_POST'] = xstripslashesgpc( $_POST );
$GLOBALS['_GET'] = xstripslashesgpc( $_GET );
$GLOBALS['_COOKIE'] = xstripslashesgpc( $_COOKIE );
if ( !db_connect( DB_HOST, DB_USER, DB_PASS ) )
{
    exit( ERROR_DB_INIT );
}
if ( !db_select_db( DB_NAME ) )
{
    exit( db_error( ) );
}
settingdefineconstants( );
if ( ( integer )CONF_SMARTY_FORCE_COMPILE )
{
    if ( file_exists( "core/cache/afcache.php" ) )
    {
        unlink( "core/cache/afcache.php" );
    }
}
else
{
    ob_start( );
    $n = 0;
    for ( ; $n < $cfar; ++$n )
    {
        readfile( $far[$n] );
    }
    $_res = ob_get_contents( );
    ob_end_clean( );
    $fh = fopen( "core/cache/afcache.php", "w" );
    fwrite( $fh, $_res );
    fclose( $fh );
    unset( $_res );
}
include( "core/config/headers.php" );
include( "core/config/error_handler.php" );
define( "SECURITY_EXPIRE", 3600 * CONF_SECURITY_EXPIRE );
session_set_save_handler( "sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc" );
session_set_cookie_params( SECURITY_EXPIRE );
session_start( );
if ( isset( $_COOKIE['PHPSESSID'] ) )
{
    setcookie( "PHPSESSID", $_COOKIE['PHPSESSID'], time( ) + SECURITY_EXPIRE );
}
if ( !isset( $_SESSION['current_language'] ) || $_SESSION['current_language'] < 0 || count( $lang_list ) < $_SESSION['current_language'] )
{
    $GLOBALS['_SESSION']['current_language'] = 0;
}
if ( isset( $lang_list[$_SESSION['current_language']] ) && file_exists( "core/languages/".$lang_list[$_SESSION['current_language']]->filename ) )
{
    include( "core/languages/".$lang_list[$_SESSION['current_language']]->filename );
}
else
{
    exit( "<font color=red><b>ERROR: Couldn't find language file!</b></font>" );
}
if ( isset( $_GET['do'] ) )
{
    if ( in_array( $_GET['do'], array( "invoice", "configurator", "wishcat", "wishlist", "wishprod", "get_file" ) ) )
    {
        include( "core/includes/processor/".$_GET['do'].".php" );
    }
    else
    {
        header( "HTTP/1.0 404 Not Found" );
        header( "HTTP/1.1 404 Not Found" );
        header( "Status: 404 Not Found" );
        exit( ERROR_404_HTML );
    }
}
else
{
    $relaccess = checklogin( );
    if ( CONF_BACKEND_SAFEMODE != 1 && ( !isset( $_SESSION['log'] ) && !in_array( 100, $relaccess ) ) )
    {
        if ( isset( $_POST['user_login'], $_POST['user_pw'] ) )
        {
            if ( regauthenticate( $_POST['user_login'], $_POST['user_pw'] ) )
            {
                redirect( set_query( "&__tt=" ) );
            }
            exit( ERROR_FORBIDDEN );
        }
        else
        {
            exit( ERROR_FORBIDDEN );
        }
    }
    else
    {
        $eaction = isset( $_REQUEST['eaction'] ) ? $_REQUEST['eaction'] : "";
        switch ( $eaction )
        {
        case "cat" :
            if ( isset( $_SESSION['log'] ) )
            {
                $admintempname = $_SESSION['log'];
            }
            $q = db_query( "select count(*) from ".ORDERS_TABLE." WHERE statusID=".( integer )CONF_NEW_ORDER_STATUS );
            $n = db_fetch_row( $q );
            $new_orders_count = $n[0];
            $past = time( ) - CONF_ONLINE_EXPIRE * 60;
            $result = db_query( "select count(*) from ".ONLINE_TABLE." WHERE time > '".xescsql( $past )."'" );
            $u = db_fetch_row( $result );
            $online_users = $u[0];
            $q = db_query( "select categoryID, name, products_count, products_count_admin, parent, picture, subcount FROM ".CATEGORIES_TABLE." ORDER BY sort_order, name" );
            $fc = array( );
            $mc = array( );
            while ( $row = db_fetch_row( $q ) )
            {
                $fc[( integer )$row['categoryID']] = $row;
                $mc[( integer )$row['categoryID']] = ( integer )$row['parent'];
            }
            if ( isset( $_POST ) && 0 < count( $_POST ) && CONF_BACKEND_SAFEMODE )
            {
                if ( !isset( $_POST['must_delete'] ) )
                {
                    redirect( ADMIN_FILE."?safemode=yes&eaction=cat" );
                }
                else
                {
                    redirect( ADMIN_FILE."?safemode=yes&categoryID=".$_POST['must_delete']."&eaction=cat" );
                }
            }
            if ( isset( $_GET['picture_remove'] ) )
            {
                if ( CONF_BACKEND_SAFEMODE )
                {
                    redirect( ADMIN_FILE."?safemode=yes&categoryID=".$_GET['categoryID']."&eaction=cat" );
                }
                $q = db_query( "select picture FROM ".CATEGORIES_TABLE." WHERE categoryID=".( integer )$_GET['categoryID'] );
                $r = db_fetch_row( $q );
                if ( $r[0] && file_exists( "data/category/".$r[0] ) )
                {
                    unlink( "data/category/".$r[0] );
                }
                db_query( "update ".CATEGORIES_TABLE." SET picture='' WHERE categoryID=".( integer )$_GET['categoryID'] );
            }
            if ( isset( $_GET['categoryID'], $_GET['del'] ) )
            {
                if ( CONF_BACKEND_SAFEMODE )
                {
                    redirect( ADMIN_FILE."?safemode=yes&categoryID=".$_GET['categoryID']."&eaction=cat" );
                }
                catdeletecategory( $_GET['categoryID'] );
                if ( CONF_UPDATE_GCV == 1 )
                {
                    update_pscount( 1 );
                }
                redirect( ADMIN_FILE."?dpt=catalog&sub=products_categories&categoryID=1" );
            }
            if ( isset( $_POST['save'] ) && $_POST['name'] )
            {
                $allow_products_comparison = isset( $_POST['allow_products_comparison'] ) ? 1 : 0;
                $allow_products_search = isset( $_POST['allow_products_search'] ) ? 1 : 0;
                $show_subcategories_products = isset( $_POST['show_subcategories_products'] ) ? 1 : 0;
                if ( !isset( $_POST['must_delete'] ) )
                {
                    $q = db_query( "insert into ".CATEGORIES_TABLE." (name, parent, products_count, description, picture,  products_count_admin, sort_order, allow_products_comparison, allow_products_search, show_subcategories_products,  meta_description, meta_keywords, title )  VALUES ('".xtotext( trim( $_POST['name'] ) )."', ".( integer )$_POST['parent'].",0,'".xescsql( $_POST['desc'] )."','',0, ".( integer )$_POST['sort_order'].", ".$allow_products_comparison.", ".$allow_products_search.", ".$show_subcategories_products.", '".xtotext( trim( $_POST['meta_d'] ) )."', '".xtotext( trim( $_POST['meta_k'] ) )."', '".xtotext( trim( $_POST['title'] ) )."');" );
                    $pid = db_insert_id( "CATEGORIES_GEN" );
                }
                else
                {
                    if ( isset( $_POST['removeto'] ) && $_POST['removeto'] != "zero" )
                    {
                        db_query( "update ".PRODUCTS_TABLE." SET categoryID=".( integer )$_POST['removeto']." WHERE categoryID=".( integer )$_POST['must_delete'] );
                    }
                    if ( $_POST['must_delete'] != $_POST['parent'] )
                    {
                        if ( category_moves_to_its_subdirectories( $_POST['must_delete'], $_POST['parent'] ) )
                        {
                            $q = db_query( "select parent FROM ".CATEGORIES_TABLE." WHERE categoryID=".( integer )$_POST['must_delete'] );
                            $r = db_fetch_row( $q );
                            db_query( "update ".CATEGORIES_TABLE." SET parent=".( integer )$r[0]." WHERE parent=".( integer )$_POST['must_delete'] );
                            db_query( "update ".CATEGORIES_TABLE." SET name='".xtotext( trim( $_POST['name'] ) )."', description='".xescsql( $_POST['desc'] )."', parent=".( integer )$_POST['parent'].", sort_order = ".( integer )$_POST['sort_order'].", allow_products_comparison=".$allow_products_comparison." , allow_products_search=".$allow_products_search." , show_subcategories_products=".$show_subcategories_products." , meta_description='".xtotext( trim( $_POST['meta_d'] ) )."', meta_keywords='".xtotext( trim( $_POST['meta_k'] ) )."', title='".xtotext( trim( $_POST['title'] ) )."'  WHERE categoryID=".( integer )$_POST['must_delete'] );
                        }
                        else
                        {
                            db_query( "update ".CATEGORIES_TABLE." SET name='".xtotext( trim( $_POST['name'] ) )."', description='".xescsql( $_POST['desc'] )."', parent=".( integer )$_POST['parent'].", sort_order = ".( integer )$_POST['sort_order'].", allow_products_comparison=".$allow_products_comparison." , allow_products_search=".$allow_products_search." , show_subcategories_products=".$show_subcategories_products." , meta_description='".xtotext( trim( $_POST['meta_d'] ) )."', meta_keywords='".xtotext( trim( $_POST['meta_k'] ) )."', title='".xtotext( trim( $_POST['title'] ) )."' WHERE categoryID=".( integer )$_POST['must_delete'] );
                        }
                    }
                    $pid = ( integer )$_POST['must_delete'];
                }
                if ( CONF_UPDATE_GCV == 1 )
                {
                    update_pscount( 1 );
                }
                $categoryID = ( integer )$pid;
                schunsetoptionstosearch( $categoryID );
                $data = scanpostvariablewithid( array( "checkbox_param" ) );
                foreach ( $data as $optionID => $val )
                {
                    schunsetvariantstosearch( $categoryID, $optionID );
                    if ( isset( $_POST["select_arbitrarily_".$optionID] ) )
                    {
                        $set_arbitrarily = $_POST["select_arbitrarily_".$optionID];
                    }
                    else
                    {
                        $set_arbitrarily = 1;
                    }
                    schsetoptiontosearch( $categoryID, $optionID, $set_arbitrarily );
                    if ( $set_arbitrarily == 0 )
                    {
                        $variants = optgetoptionvalues( $optionID );
                        foreach ( $variants as $var )
                        {
                            if ( isset( $_POST["checkbox_variant_".$var['variantID']] ) )
                            {
                                schsetvarianttosearch( $categoryID, $optionID, $var['variantID'] );
                            }
                        }
                    }
                }
                if ( isset( $_FILES['picture'] ) && $_FILES['picture']['name'] && 0 < $_FILES['picture']['size'] )
                {
                    do
                    {
                        $q = db_query( "select picture FROM ".CATEGORIES_TABLE." WHERE categoryID=".( integer )$pid );
                        $row = db_fetch_row( $q );
                        $picture_name = str_replace( " ", "_", $_FILES['picture']['name'] );
                        $lastdot = strrpos( $picture_name, "." );
                        $ext = substr( $picture_name, $lastdot + 1 );
                        $filename = substr( time( ), -5, 5 );
                        $picture_name = $filename.".".$ext;
                        if ( $row[0] && file_exists( "data/category/".$row[0] ) )
                        {
                            unlink( "data/category/".$row[0] );
                        }
                        if ( file_exists( "data/category/".$picture_name ) )
                        {
                            $taskDone2 = false;
                            $i = 1;
                            for ( ; $i < 200 && $taskDone2 == false; ++$i )
                                {
                                    if ( !file_exists( "data/category/".$filename."_".$i.".".$ext ) )
                                    {
                                        if ( is_uploaded_file( $_FILES['picture']['tmp_name'] ) )
                                        {
                                            if ( move_uploaded_file( $_FILES['picture']['tmp_name'], "data/category/".$filename."_".$i.".".$ext ) )
                                            {
                                                setrightstouploadedfile( "data/category/".$filename."_".$i.".".$ext );
                                                db_query( "update ".CATEGORIES_TABLE." SET picture='".xescsql( $filename."_".$i.".".$ext )."'  WHERE categoryID=".( integer )$pid );
                                            }
                                            else
                                            {
                                                echo "<div align=\"center\"><span style=\"color: #BB0000\">".ERROR_FAILED_TO_UPLOAD_FILE."</span></div>\n";
                                                exit( );
                                            }
                                        }
                                        else
                                        {
                                            echo "<div align=\"center\"><span style=\"color: #BB0000\">".ERROR_FAILED_TO_UPLOAD_FILE."</span></div>\n";
                            exit( );                                      
                            $taskDone2 = true;
                                    }
                                    break;
                                }
                            } while ( 1 );
                        }
                        else
                        {
                    if ( is_uploaded_file( $_FILES['picture']['tmp_name'] ) )
                    {
                        if ( move_uploaded_file( $_FILES['picture']['tmp_name'], "data/category/".$picture_name ) )
                                {
                                    setrightstouploadedfile( "data/category/".$picture_name );
                                    db_query( "update ".CATEGORIES_TABLE." SET picture='".xescsql( $picture_name )."'  WHERE categoryID=".( integer )$pid );
                                }
                                else
                                {
                                    echo "<div align=\"center\"><span style=\"color: #BB0000\">".ERROR_FAILED_TO_UPLOAD_FILE."</span></div>\n";
                                    break;
                                    exit( );
                                }
                            }
                            else
                            {
                                echo "<div align=\"center\"><span style=\"color: #BB0000\">".ERROR_FAILED_TO_UPLOAD_FILE."</span></div>\n";
                                exit( );
                            }
                        }
                        redirect( ADMIN_FILE."?categoryID=".$pid."&eaction=cat" );
                    } while ( 0 );
                }
                redirect( ADMIN_FILE."?dpt=catalog&sub=products_categories&categoryID=".$pid."&expandCat=".$pid );
            }
            else
            {
                if ( isset( $_GET['categoryID'] ) )
                {
                    $row = catgetcategorybyid( $_GET['categoryID'] );
                    if ( !$row )
                    {
                        echo "<center><font color=BB0000>".ERROR_CANT_FIND_REQUIRED_PAGE."</font>\n<br><br>\n";
                        echo "</center>";
                        exit( );
                    }
                    else
                    {
                        $title = ADMIN_CAT_EDITN;
                        $n = $row['name'];
                        $t = $row['title'];
                        $d = html_spchars( $row['description'] );
                        $meta_d = $row['meta_description'];
                        $meta_k = $row['meta_keywords'];
                        $picture = $row['picture'];
                        $sort_order = $row['sort_order'];
                        $parent = $row['parent'];
                        $allow_products_comparison = $row['allow_products_comparison'];
                        $allow_products_search = $row['allow_products_search'];
                        $show_subcategories_products = $row['show_subcategories_products'];
                    }
                }
                else
                {
                    $title = ADMIN_CATEGORY_NEW;
                    $n = "";
                    $d = "";
                    $t = "";
                    $meta_d = "";
                    $meta_k = "";
                    $picture = "";
                    $sort_order = 0;
                    $allow_products_comparison = 1;
                    $allow_products_search = 1;
                    if ( isset( $_GET['catslct'] ) )
                    {
                        $parent = ( integer )$_GET['catslct'];
                    }
                    else
                    {
                        $parent = 1;
                    }
                    $show_subcategories_products = 1;
                }
                $options = _getoptions( );
                $showSelectParametrsTable = 0;
                if ( isset( $_GET['SelectParametrsHideTable_hidden'] ) )
                {
                    $showSelectParametrsTable = $_GET['SelectParametrsHideTable_hidden'];
                }
                echo "\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<html class=\"admin\">\r\n<head>\r\n<meta http-equiv=\"content-type\" content=\"text/html; charset={\$smarty.const.DEFAULT_CHARSET}\">\r\n<link rel=\"stylesheet\" href=\"data/admin/style.css\" type=\"text/css\">\r\n<link rel=\"icon\" href=\"data/admin/favicon.ico\" type=\"image/x-icon\">\r\n<link rel=\"shortcut icon\" href=\"data/admin/favicon.ico\" type=\"image/x-icon\">\r\n<title>";
                echo ADMIN_CATEGORY_TITLE;
                echo "</title>\r\n<script type=\"text/javascript\" src=\"data/admin/admin.js\"></script>\r\n</head>\r\n<body class=\"ibody\">\r\n  <table class=\"adn\">\r\n    <tr>\r\n      <td colspan=\"2\">\r\n        <table class=\"adn\">\r\n          <tr>\r\n            <td class=\"head\"><img src=\"data/admin/sep.gif\" alt=\"\"></td>\r\n            <td class=\"head toph\">&nbsp;&nbsp;";
                echo ADMIN_TMENU1;
                echo ": <b>";
                if ( CONF_BACKEND_SAFEMODE )
                {
                    echo "demo";
                }
                else
                {
                    echo $admintempname;
                }
                echo "</b></td>\r\n            <td class=\"head\"><img src=\"data/admin/sep2.gif\" alt=\"\"></td>\r\n            <td class=\"head toph\">";
                echo ADMIN_TMENU2;
                echo ": <b>";
                echo $online_users;
                echo "</b></td>\r\n            <td class=\"head\"><img src=\"data/admin/sep2.gif\" alt=\"\"></td>\r\n            <td class=\"head last toph\" width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?order_search_type=SearchByStatusID&amp;checkbox_order_status_";
                echo CONF_NEW_ORDER_STATUS;
                echo "=1&amp;dpt=custord&amp;sub=new_orders&amp;search=\">";
                echo ADMIN_TMENU3;
                echo ": <b>";
                echo $new_orders_count;
                echo "</b></a></td>\r\n            <td class=\"head\">\r\n              <table class=\"adw\">\r\n                <tr>\r\n                <td class=\"head last toph\"><a href=\"";
                echo ADMIN_FILE;
                echo "\">";
                echo ADMINISTRATE_LINK;
                echo "</a></td>\r\n                  <td class=\"head\"><img src=\"data/admin/sep2.gif\" alt=\"\"></td>\r\n                  <td class=\"head last toph\"><a href=\"index.php\">";
                echo ADMIN_BACK_TO_SHOP;
                echo "</a></td>\r\n                  <td class=\"head\"><img src=\"data/admin/sep2.gif\" alt=\"\"></td>\r\n                  <td class=\"head last toph2 toph\"><a href=\"index.php?logout=yes\">";
                echo ADMIN_LOGOUT_LINK;
                echo "</a></td>\r\n                </tr>\r\n              </table>\r\n            </td>\r\n          </tr>\r\n        </table>\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"indexb1\">\r\n<table class=\"adn\"><tr><td class=\"se\"></td></tr></table>\r\n<table width=\"186\" class=\"adw\" style=\"margin: auto;\">\r\n                               <tr>\r\n                                   <td class=\"head2\">\r\n                                       <table class=\"adn\">\r\n                                           <tr>\r\n                                               <td class=\"head4\" onclick=\"menuresetit('menu1')\">";
                echo ADMIN_CATALOG;
                echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu1')\" id=\"menu12\" style=\"cursor: pointer;\"></td>\r\n                                           </tr>\r\n                                       </table>\r\n                                   </td>\r\n                               </tr>\r\n                               <tr id='menu13' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=catalog&amp;sub=products_categories\">";
                echo ADMIN_CATEGORIES_PRODUCTS;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=catalog&amp;sub=dbsync\">";
                echo ADMIN_SYNCHRONIZE_TOOLS;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=catalog&amp;sub=extra\">";
                echo ADMIN_PRODUCT_OPTIONS;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=catalog&amp;sub=special\">";
                echo ADMIN_SPECIAL_OFFERS;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=catalog&amp;sub=excel_import\">";
                echo ADMIN_IMPORT_FROM_EXCEL;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=catalog&amp;sub=excel_export\">";
                echo ADMIN_EXPORT_TO_EXCEL;
                echo "</a></td></tr></table>\r\n</div></td>\r\n\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"se\"></td>\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"head2\">\r\n                                       <table class=\"adn\">\r\n                                           <tr>\r\n                                               <td class=\"head4\" onclick=\"menuresetit('menu2')\">";
                echo ADMIN_CUSTOMERS_AND_ORDERS;
                echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu2')\" id=\"menu22\" style=\"cursor: pointer;\"></td>\r\n                                           </tr>\r\n                                       </table>\r\n                                   </td>\r\n                               </tr>\r\n                               <tr id='menu23' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=custord&amp;sub=new_orders\">";
                echo ADMIN_NEW_ORDERS;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=custord&amp;sub=subscribers\">";
                echo ADMIN_NEWS_SUBSCRIBERS;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=custord&amp;sub=order_statuses\">";
                echo ADMIN_ORDER_STATUES;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=custord&amp;sub=reg_fields\">";
                echo ADMIN_CUSTOMER_REG_FIELDS;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=custord&amp;sub=discounts\">";
                echo ADMIN_DISCOUNT_MENU;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=custord&amp;sub=aux_pages\">";
                echo ADMIN_TX7;
                echo "</a></td></tr></table>\r\n</div></td>\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"se\"></td>\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"head2\">\r\n                                       <table class=\"adn\">\r\n                                           <tr>\r\n                                               <td class=\"head4\" onclick=\"menuresetit('menu3')\">";
                echo ADMIN_SETTINGS;
                echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu3')\" id=\"menu32\" style=\"cursor: pointer;\"></td>\r\n                                           </tr>\r\n                                       </table>\r\n                                   </td>\r\n                               </tr>\r\n                               <tr id='menu33' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=conf&amp;sub=setting&amp;settings_groupID=2\">";
                echo ADMIN_SETTINGS_GENERAL;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=conf&amp;sub=currencies\">";
                echo ADMIN_CURRENCY_TYPES;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=conf&amp;sub=shipping\">";
                echo ADMIN_STRING_SHIPPING_TYPE;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=conf&amp;sub=payment\">";
                echo ADMIN_STRING_PAYMENT_TYPE;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=conf&amp;sub=blocks_edit\">";
                echo ADMIN_TX20;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=conf&amp;sub=admin_edit\">";
                echo ADMIN_CONF_ADMINS;
                echo "</a></td></tr></table>\r\n</div></td>\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"se\"></td>\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"head2\">\r\n                                       <table class=\"adn\">\r\n                                           <tr>\r\n                                               <td class=\"head4\" onclick=\"menuresetit('menu4')\">";
                echo ADMIN_MODULES;
                echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu4')\" id=\"menu42\" style=\"cursor: pointer;\"></td>\r\n                                           </tr>\r\n                                       </table>\r\n                                   </td>\r\n                               </tr>\r\n                               <tr id='menu43' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=modules&amp;sub=news\">";
                echo ADMIN_NEWS;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=modules&amp;sub=survey\">";
                echo ADMIN_VOTING;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=modules&amp;sub=shipping\">";
                echo ADMIN_STRING_SHIPPING_MODULES;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=modules&amp;sub=payment\">";
                echo ADMIN_STRING_PAYMENT_MODULES;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=modules&amp;sub=linkexchange\">";
                echo ADMIN_STRING_MODULES_LINKEXCHANGE;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=modules&amp;sub=yandex\">";
                echo ADMIN_STRING_YANDEX;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=custord&amp;sub=affiliate\">";
                echo STRING_AFFILIATE_PROGRAM;
                echo "</a></td></tr></table>\r\n</div></td>\r\n\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"se\"></td>\r\n                               </tr>\r\n                                   <tr>\r\n                                       <td class=\"head2\">\r\n                                           <table class=\"adn\">\r\n                                               <tr>\r\n                                                   <td class=\"head4\" onclick=\"menuresetit('menu5')\">";
                echo ADMIN_REPORTS;
                echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu5')\" id=\"menu52\" style=\"cursor: pointer;\"></td>\r\n                                               </tr>\r\n                                           </table>\r\n                                       </td>\r\n                                   </tr>\r\n                                   <tr id='menu53' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=reports&amp;sub=category_viewed_times\">";
                echo ADMIN_CATEGORY_VIEWED_TIMES;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=reports&amp;sub=customer_log\">";
                echo ADMIN_CUSTOMER_LOG;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=reports&amp;sub=information\">";
                echo ADMIN_INFORMATION2;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=reports&amp;sub=coming\">";
                echo ADMIN_COMING;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=reports&amp;sub=security\">";
                echo ADMIN_SECURITY;
                echo "</a></td></tr></table>\r\n</div></td>\r\n                                   </tr>\r\n                               <tr>\r\n                                   <td class=\"se\"></td>\r\n                               </tr>\r\n                                <tr>\r\n                                       <td class=\"head2\">\r\n                                           <table class=\"adn\">\r\n                                               <tr>\r\n                                                   <td class=\"head4\" onclick=\"menuresetit('menu6')\">";
                echo ADMIN_LIST_ALL;
                echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu6')\" id=\"menu62\" style=\"cursor: pointer;\"></td>\r\n                                               </tr>\r\n                                           </table>\r\n                                       </td>\r\n                                   </tr>\r\n                                   <tr id='menu63' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?login=&amp;first_name=&amp;last_name=&amp;email=&amp;groupID=0&amp;fActState=-1&amp;dpt=custord&amp;sub=custlist&amp;search=Find\">";
                echo ADMIN_CUSTOMERS;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=custord&amp;sub=custgroup\">";
                echo ADMIN_CUSTGROUP;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=conf&amp;sub=countries\">";
                echo ADMIN_MENU_TOWNS;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=conf&amp;sub=zones\">";
                echo ADMIN_MENU_TAXEZ;
                echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
                echo ADMIN_FILE;
                echo "?dpt=catalog&amp;sub=discuss\">";
                echo ADMIN_DISCUSSIONS;
                echo "</a></td></tr></table>\r\n</div></td>\r\n</tr>\r\n</table>\r\n<script type=\"text/javascript\">\r\nmegamenu();\r\n</script>\r\n</td>\r\n<td valign=\"top\">\r\n<table class=\"adn\">\r\n  <tr>\r\n    <td class=\"zeb2 nbc\">\r\n      <table class=\"adn ggg\">\r\n         <tr>\r\n           <td>\r\n            <table class=\"adn\">\r\n              <tr>\r\n              <td class=\"nbc2\"><span class=\"titlecol\">";
                echo $title;
                echo "</span></td>\r\n<td align=\"right\" valign=\"middle\" id=\"preproc\"></td></tr>\r\n              <tr>\r\n               <td class=\"nbcl\" colspan=\"2\"></td>\r\n              </tr>\r\n            </table>\r\n           </td>\r\n         </tr>\r\n      </table>\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\" align=\"center\" class=\"zeb\">\r\n      <table class=\"adn\">\r\n        <tr>\r\n          <td align=\"left\">\r\n";
                if ( isset( $_GET['safemode'] ) )
                {
                    echo "<table class=\"adminw\"><tr><td align=\"left\"><table class=\"adn\"><tr><td><img src=\"data/admin/stop2.gif\" align=\"left\" class=\"stop\"></td><td class=\"splin\"><span class=\"error\">".ERROR_MODULE_ACCESS2."</span><br><br>".ERROR_MODULE_ACCESS_DES2."</td></tr></table></td></tr></table>\n";
                }
                echo "<form enctype=\"multipart/form-data\" action=\"";
                echo ADMIN_FILE;
                echo "?eaction=cat\"  method=post name='MainForm' id='MainForm'>\r\n<table class=\"adn\">\r\n<tr class=\"lineb\">\r\n<td align=\"left\">";
                echo ADMIN_SETTINGS_GENERAL_CAT;
                echo "</td></tr>\r\n<tr class=\"lins\">\r\n<td align=\"left\">";
                echo STRING_CATEGORY;
                echo ": <select name=\"parent\" id=\"parent\" ";
                if ( !CONF_FULLY_EXPAND_CATEGORIES_IN_ADMIN_MODE )
                {
                    echo " onChange=\"window.location='".ADMIN_FILE."?";
                    if ( isset( $_GET['categoryID'] ) )
                    {
                        echo "categoryID=".$_GET['categoryID']."&amp;";
                    }
                    echo "change_category='+document.getElementById('parent').value+'&amp;eaction=cat';\"";
                }
                echo ">\r\n                                <!--<option value=\"1\">";
                echo ADMIN_CATEGORY_ROOT;
                echo "</option>-->\r\n                                ";
                if ( CONF_FULLY_EXPAND_CATEGORIES_IN_ADMIN_MODE == 1 )
                {
                    echo "<option value=\"1\">".ADMIN_CATEGORY_ROOT."</option>";
                }
                $core_category = isset( $_GET['change_category'] ) ? ( integer )$_GET['change_category'] : $parent;
                if ( CONF_FULLY_EXPAND_CATEGORIES_IN_ADMIN_MODE == 0 )
                {
                    $cats = catgetcategorycompactclist( $core_category );
                }
                else
                {
                    $cats = catgetcategoryclist( );
                }
                $i = 0;
                for ( ; $i < count( $cats ); ++$i )
                {
                    echo "<option value=\"".$cats[$i]['categoryID']."\"";
                    if ( $core_category == $cats[$i]['categoryID'] )
                    {
                        echo " selected";
                    }
                    echo ">";
                    $j = 0;
                    for ( ; $j < $cats[$i]['level']; ++$j )
                    {
                        echo "&nbsp;&nbsp;";
                    }
                    echo $cats[$i]['name'];
                    echo "</option>";
                }
                echo "</select></td></tr>\r\n<tr class=\"lins\"><td align=\"left\">";
                echo ADMIN_CATEGORY_NAME;
                echo ": <input type=\"text\" name=\"name\" value=\"";
                echo str_replace( "\"", "&quot;", $n );
                echo "\" style=\"width: 400px;\" class=\"textp\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                echo ADMIN_SORT_ORDER;
                echo ": <input type=\"text\" name=\"sort_order\" value=\"";
                echo $sort_order;
                echo "\" class=\"textp\" size=\"10\"></td></tr>\r\n<tr class=\"lins\"><td align=\"left\">";
                echo ADMIN_PRODUCT_TITLE_PAGE;
                echo ": <input type=\"text\" name=\"title\" value=\"";
                echo str_replace( "\"", "&quot;", $t );
                echo "\" style=\"width: 590px;\" class=\"textp\"></td></tr>\r\n<tr class=\"lins\"><td align=\"left\"><table class=\"adw houp\"><tr><td align=\"center\">";
                echo STRING_PICTURE_CAT_NEW;
                echo ": <input type=\"file\" class=\"file\" name=\"picture\">&nbsp;&nbsp;&nbsp;</td><td><img src=\"data/admin/plus.gif\" alt=\"\" style=\"cursor: pointer\" onclick=\"document.getElementById('MainForm').submit()\"></td><td>&nbsp;&nbsp;&nbsp;";
                echo STRING_PICTURE_EXE;
                echo ":\r\n<script type=\"text/javascript\" src=\"data/admin/highslide.packed.js\"></script>\r\n<script type=\"text/javascript\">\r\n<!--\r\n    hs.graphicsDir = 'data/admin/';\r\n    hs.outlineType = 'rounded';\r\n\r\n    hs.restoreTitle = '";
                echo STRING_HS_RESTORETITLE;
                echo "';\r\n    hs.loadingText = '";
                echo STRING_HS_LOADINGTEXT;
                echo "';\r\n    hs.loadingTitle = '";
                echo STRING_HS_LOADINGTITLE;
                echo "';\r\n    hs.focusTitle = '";
                echo STRING_HS_FOCUSTITLE;
                echo "';\r\n    hs.fullExpandTitle = '";
                echo STRING_HS_FULLEXPANDTITLE;
                echo "';\r\n\r\n//-->\r\n</script>\r\n";
                if ( $picture != "" && file_exists( "data/category/".$picture ) )
                {
                    echo "<a href=\"data/category/".$picture."\" onclick=\"return hs.expand(this)\" class=\"inl\">".ADMIN_OPEN_IMAGE."</a>";
                    echo "&nbsp;&nbsp;&nbsp;<a href=\"#\" onclick=\"confirmDeletep('".QUESTION_DELETE_PICTURE."','".ADMIN_FILE."?categoryID=".$_GET['categoryID']."&amp;picture_remove=yes&amp;eaction=cat'); return false\" class=\"inl\">".DELETE_BUTTON."</a>\n";
                }
                else
                {
                    echo ADMIN_PICTURE_NOT_UPLOADED;
                }
                echo "</td></tr></table></td></tr>\r\n<tr class=\"lins\"><td align=\"left\">";
                echo ADMIN_ALLPROD_TO;
                echo ": <select name=\"removeto\" id=\"removeto\" ";
                if ( CONF_FULLY_EXPAND_CATEGORIES_IN_ADMIN_MODE == 0 )
                {
                    echo " onChange=\"window.location='".ADMIN_FILE."?";
                    if ( isset( $_GET['categoryID'] ) )
                    {
                        echo "categoryID=".$_GET['categoryID']."&amp;";
                    }
                    echo "removeto_category='+document.getElementById('removeto').value+'&amp;eaction=cat';\"";
                }
                echo ">\r\n                                <!--<option value=\"1\">";
                echo ADMIN_CATEGORY_ROOT;
                echo "</option>-->\r\n                                ";
                echo "<option value=\"zero\">".ADMIN_NOT_DEFINED_REM."</option>";
                if ( CONF_FULLY_EXPAND_CATEGORIES_IN_ADMIN_MODE == 1 )
                {
                    echo "<option value=\"1\">".ADMIN_CATEGORY_ROOT."</option>";
                }
                $zeroval = 0;
                $core_category = isset( $_GET['removeto_category'] ) ? ( integer )$_GET['removeto_category'] : $zeroval;
                if ( CONF_FULLY_EXPAND_CATEGORIES_IN_ADMIN_MODE == 0 )
                {
                    $cats = catgetcategorycompactclist( $core_category );
                }
                else
                {
                    $cats = catgetcategoryclist( );
                }
                $i = 0;
                for ( ; $i < count( $cats ); ++$i )
                {
                    echo "<option value=\"".$cats[$i]['categoryID']."\"";
                    if ( $core_category == $cats[$i]['categoryID'] )
                    {
                        echo " selected";
                    }
                    echo ">";
                    $j = 0;
                    for ( ; $j < $cats[$i]['level']; ++$j )
                    {
                        echo "&nbsp;&nbsp;";
                    }
                    echo $cats[$i]['name'];
                    echo "</option>";
                }
                echo "</select></td></tr></table>\r\n<table class=\"adn\"><tr><td class=\"separ\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr><tr><td class=\"se5\"></td></tr></table>\r\n<a href=\"#\" onclick=\"document.getElementById('MainForm').submit(); return false\" class=\"inl\">";
                echo SAVE_BUTTON;
                echo "</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a\r\n";
                if ( isset( $_GET['categoryID'] ) )
                {
                    echo "href=\"".ADMIN_FILE."?dpt=catalog&amp;sub=products_categories&amp;categoryID=".$_GET['categoryID']."\"";
                }
                else if ( isset( $_GET['catslct'] ) )
                {
                    echo "href=\"".ADMIN_FILE."?dpt=catalog&amp;sub=products_categories&amp;categoryID=".$_GET['catslct']."\"";
                }
                else
                {
                    echo "href=\"".ADMIN_FILE."?dpt=catalog&amp;sub=products_categories&amp;categoryID=1\"";
                }
                echo " class=\"inl\">";
                echo CANCEL_BUTTON;
                echo "</a>\r\n";
                if ( isset( $_GET['categoryID'] ) )
                {
                    echo "&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"#\" class=\"inl\" onClick=\"confirmDeletep('".QUESTION_DELETE_CONFIRMATION."','".ADMIN_FILE."?categoryID=".str_replace( "\"", "", $_GET['categoryID'] )."&amp;del=1&amp;eaction=cat'); return false\">".DELETE_BUTTON."</a>";
                }
                echo "<table class=\"adn\"><tr><td class=\"se6\"></td></tr></table>\r\n<table class=\"adn\">\r\n<tr class=\"lineb\">\r\n<td align=\"left\">";
                echo ADMIN_SETADD;
                echo "</td></tr>\r\n<tr class=\"lins\"><td align=\"left\">\r\n<table class=\"adn houp\">\r\n<tr><td align=\"left\"><input type=\"checkbox\" name=\"allow_products_comparison\" id=\"allow_products_comparison\" value='1'\r\n";
                if ( $allow_products_comparison == 1 )
                {
                    echo "checked\r\n";
                }
                echo "></td><td align=\"left\" width=\"100%\"><label for=\"allow_products_comparison\"> &nbsp;";
                echo ADMIN_ALLOW_PRODUCTS_COMPARISON;
                echo "</label></td></tr>\r\n<tr><td align=\"left\" valign=\"middle\" nowrap><input type=\"checkbox\" name=\"allow_products_search\" id=\"allow_products_search\"\r\nvalue='1'\r\n";
                if ( $allow_products_search == 1 )
                {
                    echo "checked\r\n";
                }
                echo "></td><td align=\"left\"><label for=\"allow_products_search\"> &nbsp;";
                echo ADMIN_ALLOW_SEARCH_IN_CATEGORY;
                echo "</label></td></tr>\r\n<tr><td align=\"left\" valign=\"middle\"><input type=\"checkbox\" name='show_subcategories_products' id=\"show_subcategories_products\" value='1'\r\n";
                if ( $show_subcategories_products == 1 )
                {
                    echo "checked\r\n";
                }
                echo "></td><td align=\"left\"><label for=\"show_subcategories_products\"> &nbsp;";
                echo ADMIN_SHOW_PRODUCT_IN_SUBCATEGORY;
                echo "</label></td></tr>\r\n</table></td></tr></table>\r\n<table class=\"adn\"><tr><td class=\"separ\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr><tr><td class=\"se6\"></td></tr></table>\r\n<table class=\"adn\">\r\n<tr class=\"lineb\">\r\n<td align=\"left\">";
                echo STRING_ADVANCED_SEACH_TITLE;
                echo "</td></tr>\r\n<tr class=\"lins\"><td align=left><a href=\"#\" class=\"inl\" onClick=\"SelectParametrsHideTable(); return false\">";
                echo ADMIN_SELECT_PARAMETRS;
                echo "</a>\r\n<br><br>";
                echo ADMIN_SELECT_PARAMETRS_PROMPT;
                echo "</td></tr></table>\r\n<table class=\"adn\"><tr><td class=\"separ\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr><tr><td class=\"se6\"></td></tr></table>\r\n<input type=\"hidden\" name='SelectParametrsHideTable_hidden' id='SelectParametrsHideTable_hidden' value='";
                echo $showSelectParametrsTable;
                echo "'>\r\n<script type=\"text/javascript\">\r\nfunction SelectParametrsHideTable()\r\n{\r\nvar wspl = document.getElementById('SelectParametrsTable').style.display;\r\nif ( wspl == 'none' )\r\n{\r\ndocument.getElementById('SelectParametrsTable').style.display = '';\r\ndocument.getElementById('SelectParametrsHideTable_hidden').value = 1;\r\n}\r\nelse\r\n{\r\ndocument.getElementById('SelectParametrsTable').style.display = 'none';\r\ndocument.getElementById('SelectParametrsHideTable_hidden').value = 0;\r\n}\r\n}\r\n</script>\r\n<table class='adn' id='SelectParametrsTable'>\r\n<tr class=\"lineb\">\r\n<td align=\"left\">";
                echo ADMIN_PAR;
                echo "</td></tr>\r\n<tr><td>\r\n<table class=\"adw\" style=\"margin: 4px 5px;\">\r\n";
                if ( 1 <= count( $options ) )
                {
                    foreach ( $options as $option )
                    {
                        echo "<tr><td align=\"center\" valign=\"middle\" class=\"cssel\"><input type=\"checkbox\"  name='checkbox_param_";
                        echo $option['optionID'];
                        echo "' id='checkbox_param_";
                        echo $option['optionID'];
                        echo "'\r\n";
                        if ( $option['isSet'] )
                        {
                            echo "checked\r\n";
                        }
                        echo "onclick='Checkbox_param_Change_";
                        echo $option['optionID'];
                        echo "()'></td><td colspan=\"3\" align=\"left\" valign=\"middle\" class=\"toph3\">";
                        echo $option['name'];
                        echo "</td></tr>\r\n";
                        if ( count( $option['variants'] ) != 0 )
                        {
                            echo "<tr><td></td>\r\n<td align=\"center\" valign=\"middle\" class=\"cssel\"><input type=\"radio\" name='select_arbitrarily_";
                            echo $option['optionID'];
                            echo "' id='select_arbitrarily1_";
                            echo $option['optionID'];
                            echo "'\r\n";
                            if ( $option['set_arbitrarily'] == 1 )
                            {
                                echo "checked\r\n";
                            }
                            echo "value='1' onclick='Select_arbitrarily_Change_";
                            echo $option['optionID'];
                            echo "()'></td><td colspan=\"2\" align=\"left\" valign=\"middle\" class=\"toph3\">";
                            echo ADMIN_SEARCH_IN_CATEGORY_PARAMETR_VALUE_ARBITRARILY;
                            echo "</td>\r\n</tr>\r\n<tr><td></td><td align=\"center\" valign=\"middle\" class=\"cssel\"><input type=\"radio\" name='select_arbitrarily_";
                            echo $option['optionID'];
                            echo "' id='select_arbitrarily2_";
                            echo $option['optionID'];
                            echo "'\r\n";
                            if ( $option['set_arbitrarily'] == 0 )
                            {
                                echo "checked\r\n";
                            }
                            echo "value='0' onclick='Select_arbitrarily_Change_";
                            echo $option['optionID'];
                            echo "()'></td><td colspan=\"2\" class=\"toph3\" align=\"left\" valign=\"middle\">";
                            echo ADMIN_SEARCH_IN_CATEGORY_PARAMETR_VALUE_SELECT_FROM_VALUES;
                            echo "</td>\r\n</tr>\r\n";
                            foreach ( $option['variants'] as $variant )
                            {
                                echo "<tr>\r\n<td></td>\r\n<td></td>\r\n<td align=\"center\" valign=\"middle\" class=\"cssel\"><input type=\"checkbox\" name='checkbox_variant_";
                                echo $variant['variantID'];
                                echo "' id='checkbox_variant_";
                                echo $variant['variantID'];
                                echo "'\r\n";
                                if ( $variant['isSet'] )
                                {
                                    echo "checked\r\n";
                                }
                                echo "></td><td class=\"toph3\" align=\"left\" valign=\"middle\" width=\"100%\">";
                                echo $variant['option_value'];
                                echo "</td></tr>\r\n";
                            }
                        }
                        echo "<tr><td>\r\n<script type=\"text/javascript\">\r\nfunction Checkbox_param_Change_";
                        echo $option['optionID'];
                        echo "()\r\n{\r\n_checked = document.getElementById('checkbox_param_";
                        echo $option['optionID'];
                        echo "').checked;\r\n";
                        if ( count( $option['variants'] ) != 0 )
                        {
                            echo "document.getElementById('select_arbitrarily1_";
                            echo $option['optionID'];
                            echo "').disabled =!_checked;\r\ndocument.getElementById('select_arbitrarily2_";
                            echo $option['optionID'];
                            echo "').disabled =!_checked;\r\n";
                        }
                        echo "Select_arbitrarily_Change_";
                        echo $option['optionID'];
                        echo "();\r\n}\r\nfunction Select_arbitrarily_Change_";
                        echo $option['optionID'];
                        echo "()\r\n{\r\n";
                        if ( count( $option['variants'] ) != 0 )
                        {
                            echo "_enabled = document.getElementById('select_arbitrarily2_";
                            echo $option['optionID'];
                            echo "').checked && document.getElementById('checkbox_param_";
                            echo $option['optionID'];
                            echo "').checked;\r\n";
                        }
                        foreach ( $option['variants'] as $variant )
                        {
                            echo "document.getElementById('checkbox_variant_";
                            echo $variant['variantID'];
                            echo "').disabled = !_enabled;\r\n";
                        }
                        echo "}\r\nCheckbox_param_Change_";
                        echo $option['optionID'];
                        echo "();\r\n</script></td></tr>\r\n";
                    }
                }
                else
                {
                    echo "<tr><td align=\"center\" height=\"20\">".ADMIN_NO_VALUES_CH."</td></tr>";
                }
                echo "</table><table class=\"adn\"><tr><td class=\"separ\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr><tr><td class=\"se6\"></td></tr></table></td></tr></table>\r\n\r\n<script type=\"text/javascript\">\r\n";
                if ( !$showSelectParametrsTable )
                {
                    echo "document.getElementById('SelectParametrsTable').style.display = 'none';\r\n";
                }
                echo "</script>\r\n<table class=\"adn\">\r\n<tr class=\"linsz\">\r\n<td align=\"left\"><span class=\"titlecol2\">";
                echo STRING_DESCRIPTION;
                echo "</span></td>\r\n</tr>\r\n<tr><td align=\"left\"><textarea name=\"desc\" class=\"admin\" id=\"myarea1\">";
                echo $d;
                echo "</textarea></td></tr>\r\n</table>\r\n";
                if ( CONF_EDITOR )
                {
                    echo "<script type=\"text/javascript\" src=\"fckeditor/fckeditor.js\"></script>\r\n<script type=\"text/javascript\" src=\"fckeditor/ckfinder/ckfinder.js\"></script>\r\n<script type=\"text/javascript\">\r\nwindow.onload = function()\r\n{\r\nvar oFCKeditor = new FCKeditor( 'myarea1',720,346) ;\r\n";
                    $dir1 = dirname( $_SERVER['PHP_SELF'] );
                    $sourcessrand = array( "//" => "/", "\\" => "/" );
                    $dir1 = strtr( $dir1, $sourcessrand );
                    if ( $dir1 != "/" )
                    {
                        $dir2 = "/";
                    }
                    else
                    {
                        $dir2 = "";
                    }
                    echo "oFCKeditor.BasePath = \"";
                    echo $dir1.$dir2;
                    echo "fckeditor/\" ;\r\noFCKeditor.ReplaceTextarea() ;\r\n}\r\n</script>\r\n";
                }
                echo "<table class=\"adn\"><tr><td class=\"se6\"></td></tr></table>\r\n<table class=\"adw\">\r\n<tr><td width=\"50%\">\r\n<table class=\"adn\">\r\n<tr class=\"linsz\">\r\n<td align=\"left\"><span class=\"titlecol2\">";
                echo ADMIN_PRODUCT_DESC2;
                echo "</span></td>\r\n</tr>\r\n<tr><td align=\"left\"><textarea name='meta_d' id=\"meta_d\" class=\"adminall\" style=\"margin-right: 38px;\">";
                echo $meta_d;
                echo "</textarea></td></tr>\r\n</table>\r\n</td>\r\n<td width=\"50%\">\r\n<table class=\"adn\">\r\n<tr class=\"linsz\">\r\n<td align=\"left\"><span class=\"titlecol2\">";
                echo ADMIN_PRODUCT_DESC3;
                echo "</span></td>\r\n</tr>\r\n<tr><td align=\"left\"><textarea name='meta_k' id=\"meta_k\" class=\"adminall\">";
                echo $meta_k;
                echo "</textarea></td></tr>\r\n</table>\r\n</td></tr></table>\r\n<table class=\"adn\"><tr><td class=\"se5\"></td></tr></table>\r\n<a href=\"#\" onclick=\"document.getElementById('MainForm').submit(); return false\" class=\"inl\">";
                echo SAVE_BUTTON;
                echo "</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a\r\n";
                if ( isset( $_GET['categoryID'] ) )
                {
                    echo "href=\"".ADMIN_FILE."?dpt=catalog&amp;sub=products_categories&amp;categoryID=".$_GET['categoryID']."\"";
                }
                else
                {
                    echo "href=\"".ADMIN_FILE."?dpt=catalog&amp;sub=products_categories&amp;categoryID=1\"";
                }
                echo " class=\"inl\">";
                echo CANCEL_BUTTON;
                echo "</a>\r\n";
                if ( isset( $_GET['categoryID'] ) )
                {
                    echo "<input type=\"hidden\" name=\"must_delete\" value=\"".str_replace( "\"", "", $_GET['categoryID'] )."\">";
                    echo "&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"#\" class=\"inl\" onClick=\"confirmDeletep('".QUESTION_DELETE_CONFIRMATION."','".ADMIN_FILE."?categoryID=".str_replace( "\"", "", $_GET['categoryID'] )."&amp;del=1&amp;eaction=cat'); return false\">".DELETE_BUTTON."</a>";
                }
                echo "<input type=\"hidden\" name=\"save\" value=\"yes\"></form></td></tr></table>\r\n<table class=\"adn\"><tr><td class=\"se6\"></td></tr></table>\r\n<table class=\"adn\"><tr><td class=\"help\"><span class=\"titlecol2\">";
                echo USEFUL_FOR_YOU;
                echo "</span><div class=\"helptext\">";
                echo NOTE31;
                echo "<br><br>";
                echo NOTE34;
                echo "</div></td>\r\n</tr>\r\n</table>\r\n<table class=\"adn\"><tr><td class=\"se8\"></td></tr></table>\r\n</td></tr></table></td></tr></table>\r\n</body>\r\n</html>\r\n";
            }
            break;
        case "prod" :
            @set_time_limit( 0 );
            if ( isset( $_SESSION['log'] ) )
            {
                $admintempname = $_SESSION['log'];
            }
            $q = db_query( "select count(*) from ".ORDERS_TABLE." WHERE statusID=".( integer )CONF_NEW_ORDER_STATUS );
            $n = db_fetch_row( $q );
            $new_orders_count = $n[0];
            $past = time( ) - CONF_ONLINE_EXPIRE * 60;
            $result = db_query( "select count(*) from ".ONLINE_TABLE." WHERE time > '".xescsql( $past )."'" );
            $u = db_fetch_row( $result );
            $online_users = $u[0];
            $q = db_query( "select categoryID, name, products_count, products_count_admin, parent, picture, subcount FROM ".CATEGORIES_TABLE." ORDER BY sort_order, name" );
            $fc = array( );
            $mc = array( );
            while ( $row = db_fetch_row( $q ) )
            {
                $fc[( integer )$row['categoryID']] = $row;
                $mc[( integer )$row['categoryID']] = ( integer )$row['parent'];
            }
            if ( array( ) )
            {
                if ( $_GET['productID'] != 0 )
                {
                    $stepmb = $_GET['productID'];
                    $q = db_query( "select categoryID from ".PRODUCTS_TABLE." where productID=".( integer )$stepmb );
                    $r = db_fetch_row( $q );
                    $categoryID = $r['categoryID'];
                }
                else if ( isset( $_GET['categoryID'] ) )
                {
                    $categoryID = $_GET['categoryID'];
                }
                else
                {
                    $categoryID = 1;
                }
                redirect( ADMIN_FILE."?dpt=catalog&sub=products_categories&categoryID=".$categoryID."&expandCat=".$categoryID );
            }
            $codep = 0;
            if ( isset( $_GET['categoryID'] ) )
            {
                $codep = 1;
            }
            if ( isset( $_GET['categoryID'] ) )
            {
                if ( isset( $_GET['delete'], $_GET['productID'] ) )
                {
                    $mpost = $_GET['productID'];
                    $q = db_query( "select categoryID from ".PRODUCTS_TABLE." where productID=".( integer )$mpost );
                    $r = db_fetch_row( $q );
                    $categoryID = $r['categoryID'];
                    if ( CONF_BACKEND_SAFEMODE )
                {
                    redirect( ADMIN_FILE."?safemode=yes&productID=".$_GET['productID']."&eaction=prod" );
                }
                deleteproduct( $_GET['productID'] );
                redirect( ADMIN_FILE."?dpt=catalog&sub=products_categories&categoryID=".$categoryID."&expandCat=".$categoryID );
                }
			}
            if ( !isset( $_GET['productID'] ) )
            {
                $GLOBALS['_GET']['productID'] = 0;
            }
            $productID = $_GET['productID'];
            if ( !isset( $_POST['eproduct_available_days'] ) )
            {
                $GLOBALS['_POST']['eproduct_available_days'] = 7;
            }
            if ( !isset( $_POST['eproduct_download_times'] ) )
            {
                $GLOBALS['_POST']['eproduct_download_times'] = 5;
            }
            if ( isset( $_POST['eproduct_download_times'] ) )
            {
                $GLOBALS['_POST']['eproduct_download_times'] = ( integer )$_POST['eproduct_download_times'];
            }
            if ( isset( $_POST['save_product'] ) || isset( $_POST['save_product_for_file'] ) )
            {
                if ( CONF_BACKEND_SAFEMODE )
                {
                    redirect( ADMIN_FILE."?safemode=yes&productID=".$_GET['productID']."&eaction=prod" );
                }
                if ( $_POST['save_product'] == 1 || $_POST['save_product_for_file'] == 1 )
                {
                    if ( $_GET['productID'] == 0 )
                    {
                        $productID = addproduct( $_POST['categoryID'], $_POST['name'], $_POST['price'], $_POST['description'], $_POST['in_stock'], $_POST['brief_description'], $_POST['list_price'], $_POST['product_code'], $_POST['sort_order'], isset( $_POST['ProductIsProgram'] ), "eproduct_filename", $_POST['eproduct_available_days'], $_POST['eproduct_download_times'], $_POST['weight'], $_POST['meta_description'], $_POST['meta_keywords'], isset( $_POST['free_shipping'] ), $_POST['min_order_amount'], $_POST['shipping_freight'], $_POST['tax_class'], $_POST['title'] );
                        $GLOBALS['_GET']['productID'] = $productID;
                        $updatedValues = scanpostvariablewithid( array( "option_value", "option_radio_type" ) );
                        configupdateoptionvalue( $productID, $updatedValues );
                    }
                    else
                    {
                        updateproduct( $productID, $_POST['categoryID'], $_POST['name'], $_POST['price'], $_POST['description'], $_POST['in_stock'], $_POST['rating'], $_POST['brief_description'], $_POST['list_price'], $_POST['product_code'], $_POST['sort_order'], isset( $_POST['ProductIsProgram'] ), "eproduct_filename", $_POST['eproduct_available_days'], $_POST['eproduct_download_times'], $_POST['weight'], $_POST['meta_description'], $_POST['meta_keywords'], isset( $_POST['free_shipping'] ), $_POST['min_order_amount'], $_POST['shipping_freight'], $_POST['tax_class'], $_POST['title'] );
                        $updatedValues = scanpostvariablewithid( array( "option_value", "option_radio_type" ) );
                        configupdateoptionvalue( $productID, $updatedValues );
                    }
                    if ( CONF_UPDATE_GCV == "1" )
                    {
                        update_pscount( 1 );
                    }
                    if ( !isset( $_POST['save_product_for_file'] ) && $_POST['save_product_for_file'] != 1 )
                    {
                        reloadopener( );
                    }
                }
            }
            if ( $_POST['save_spwc'] == 1 && $_POST['AddProductAndOpenConfigurator'] == 0 )
            {
                updateproduct( $productID, $_POST['categoryID'], $_POST['name'], $_POST['price'], $_POST['description'], $_POST['in_stock'], $_POST['rating'], $_POST['brief_description'], $_POST['list_price'], $_POST['product_code'], $_POST['sort_order'], isset( $_POST['ProductIsProgram'] ), "eproduct_filename", $_POST['eproduct_available_days'], $_POST['eproduct_download_times'], $_POST['weight'], $_POST['meta_description'], $_POST['meta_keywords'], isset( $_POST['free_shipping'] ), $_POST['min_order_amount'], $_POST['shipping_freight'], $_POST['tax_class'], $_POST['title'] );
                $updatedValues = scanpostvariablewithid( array( "option_value", "option_radio_type" ) );
                configupdateoptionvalue( $productID, $updatedValues );
            }
            if ( isset( $_POST['save_pictures'] ) )
            {
                if ( CONF_BACKEND_SAFEMODE )
                {
                    redirect( ADMIN_FILE."?safemode=yes&productID=".$_GET['productID']."&eaction=prod" );
                }
                if ( $_POST['save_pictures'] == 1 )
                {
                    if ( $_GET['productID'] == 0 )
                    {
                        $productID = addproduct( $_POST['categoryID'], $_POST['name'], $_POST['price'], $_POST['description'], $_POST['in_stock'], $_POST['brief_description'], $_POST['list_price'], $_POST['product_code'], $_POST['sort_order'], isset( $_POST['ProductIsProgram'] ), "eproduct_filename", $_POST['eproduct_available_days'], $_POST['eproduct_download_times'], $_POST['weight'], $_POST['meta_description'], $_POST['meta_keywords'], isset( $_POST['free_shipping'] ), $_POST['min_order_amount'], $_POST['shipping_freight'], $_POST['tax_class'], $_POST['title'] );
                        $GLOBALS['_GET']['productID'] = $productID;
                    }
                    else
                    {
                        updateproduct( $productID, $_POST['categoryID'], $_POST['name'], $_POST['price'], $_POST['description'], $_POST['in_stock'], $_POST['rating'], $_POST['brief_description'], $_POST['list_price'], $_POST['product_code'], $_POST['sort_order'], isset( $_POST['ProductIsProgram'] ), "eproduct_filename", $_POST['eproduct_available_days'], $_POST['eproduct_download_times'], $_POST['weight'], $_POST['meta_description'], $_POST['meta_keywords'], isset( $_POST['free_shipping'] ), $_POST['min_order_amount'], $_POST['shipping_freight'], $_POST['tax_class'], $_POST['title'] );
                        $updatedValues = scanpostvariablewithid( array( "option_value", "option_radio_type" ) );
                        configupdateoptionvalue( $productID, $updatedValues );
                    }
                    addnewpictures( $_GET['productID'], "new_filename", "new_thumbnail", "new_enlarged", $_POST['default_picture'] );
                    $updatedFileNames = scanpostvariablewithid( array( "filename", "thumbnail", "enlarged" ) );
                    updatepictures( $_GET['productID'], $updatedFileNames, $_POST['default_picture'] );
                    $updatedFileNames = scanfilesvariablewithid( array( "ufilenameu", "uthumbnailu", "uenlargedu" ) );
                    updatepicturesupload( $_GET['productID'], $updatedFileNames, $_POST['default_picture'] );
                    reloadopener3( $_GET['productID'] );
                }
            }
            if ( isset( $_GET['delete_pictures'] ) )
            {
                if ( CONF_BACKEND_SAFEMODE )
                {
                    redirect( ADMIN_FILE."?safemode=yes&productID=".$_GET['productID']."&eaction=prod" );
                }
                deletethreepictures( $_GET['photoID'] );
                reloadopener3( $_GET['productID'] );
            }
            if ( isset( $_GET['delete_one_picture'] ) )
            {
                if ( CONF_BACKEND_SAFEMODE )
                {
                    redirect( ADMIN_FILE."?safemode=yes&productID=".$_GET['productID']."&eaction=prod" );
                }
                if ( isset( $_GET['thumbnail'] ) )
                {
                    deletethumbnailpicture( $_GET['thumbnail'] );
                }
                if ( isset( $_GET['enlarged'] ) )
                {
                    deleteenlargedpicture( $_GET['enlarged'] );
                }
                reloadopener3( $_GET['productID'] );
            }
            if ( isset( $_GET['remove_from_app_cat'] ) )
            {
                if ( CONF_BACKEND_SAFEMODE )
                {
                    redirect( ADMIN_FILE."?safemode=yes&productID=".$_GET['productID']."&eaction=prod" );
                }
                catremoveproductfromappendedcategory( $_GET['productID'], $_GET['remove_from_app_cat'] );
                if ( CONF_UPDATE_GCV == "1" )
                {
                    update_pscount( 1 );
                }
            }
            if ( isset( $_POST['add_category'] ) )
            {
                if ( CONF_BACKEND_SAFEMODE )
                {
                    redirect( ADMIN_FILE."?safemode=yes&productID=".$_GET['productID']."&eaction=prod" );
                }
                if ( $_POST['add_category'] == 1 )
                {
                    if ( $_GET['productID'] == 0 )
                    {
                        $productID = addproduct( $_POST['categoryID'], $_POST['name'], $_POST['price'], $_POST['description'], $_POST['in_stock'], $_POST['brief_description'], $_POST['list_price'], $_POST['product_code'], $_POST['sort_order'], isset( $_POST['ProductIsProgram'] ), "eproduct_filename", $_POST['eproduct_available_days'], $_POST['eproduct_download_times'], $_POST['weight'], $_POST['meta_description'], $_POST['meta_keywords'], isset( $_POST['free_shipping'] ), $_POST['min_order_amount'], $_POST['shipping_freight'], $_POST['tax_class'], $_POST['title'] );
                        $GLOBALS['_GET']['productID'] = $productID;
                    }
                    else
                    {
                        updateproduct( $productID, $_POST['categoryID'], $_POST['name'], $_POST['price'], $_POST['description'], $_POST['in_stock'], $_POST['rating'], $_POST['brief_description'], $_POST['list_price'], $_POST['product_code'], $_POST['sort_order'], isset( $_POST['ProductIsProgram'] ), "eproduct_filename", $_POST['eproduct_available_days'], $_POST['eproduct_download_times'], $_POST['weight'], $_POST['meta_description'], $_POST['meta_keywords'], isset( $_POST['free_shipping'] ), $_POST['min_order_amount'], $_POST['shipping_freight'], $_POST['tax_class'], $_POST['title'] );
                        $updatedValues = scanpostvariablewithid( array( "option_value", "option_radio_type" ) );
                        configupdateoptionvalue( $productID, $updatedValues );
                    }
                    cataddproductintoappendedcategory( $_GET['productID'], $_POST['new_appended_category'] );
                    if ( CONF_UPDATE_GCV == "1" )
                    {
                        update_pscount( 1 );
                    }
                }
            }
            echo "\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<html class=\"admin\">\r\n<head>\r\n<meta http-equiv=\"content-type\" content=\"text/html; charset={\$smarty.const.DEFAULT_CHARSET}\">\r\n<link rel=\"stylesheet\" href=\"data/admin/style.css\" type=\"text/css\">\r\n<link rel=\"icon\" href=\"data/admin/favicon.ico\" type=\"image/x-icon\">\r\n<link rel=\"shortcut icon\" href=\"data/admin/favicon.ico\" type=\"image/x-icon\">\r\n<title>";
            echo ADMIN_PRODUCT_TITLE;
            echo "</title>\r\n\r\n        ";
            if ( isset( $_POST['AddProductAndOpenConfigurator'] ) && $_POST['AddProductAndOpenConfigurator'] == 1 )
            {
                if ( CONF_BACKEND_SAFEMODE )
                {
                    redirect( ADMIN_FILE."?safemode=yes&productID=".$_GET['productID']."&eaction=prod" );
                }
                $productID = addproduct( $_POST['categoryID'], $_POST['name'], $_POST['price'], $_POST['description'], $_POST['in_stock'], $_POST['brief_description'], $_POST['list_price'], $_POST['product_code'], $_POST['sort_order'], isset( $_POST['ProductIsProgram'] ), "eproduct_filename", $_POST['eproduct_available_days'], $_POST['eproduct_download_times'], $_POST['weight'], $_POST['meta_description'], $_POST['meta_keywords'], isset( $_POST['free_shipping'] ), $_POST['min_order_amount'], $_POST['shipping_freight'], $_POST['tax_class'], $_POST['title'] );
                $GLOBALS['_GET']['productID'] = $productID;
                $updatedValues = scanpostvariablewithid( array( "option_value", "option_radio_type" ) );
                configupdateoptionvalue( $productID, $updatedValues );
                openconfigurator( $_POST['optionID'], $productID );
            }
            if ( $_GET['productID'] != 0 )
            {
                $product = getproduct( $_GET['productID'] );
                $product['description'] = html_spchars( $product['description'] );
                $product['brief_description'] = html_spchars( $product['brief_description'] );
                if ( !$product['title'] )
                {
                    $product['title'] = "";
                }
                $title = ADMIN_PRODUCT_EDITN;
            }
            else
            {
                $product = array( );
                $title = ADMIN_PRODUCT_NEW;
                $cat = isset( $_GET['categoryID'] ) ? $_GET['categoryID'] : 0;
                $product['categoryID'] = $cat;
                $product['name'] = "";
                $product['title'] = "";
                $product['description'] = "";
                $product['customers_rating'] = "";
                $product['Price'] = 0;
                $product['picture'] = "";
                $product['in_stock'] = 0;
                $product['thumbnail'] = "";
                $product['big_picture'] = "";
                $product['brief_description'] = "";
                $product['list_price'] = 0;
                $product['product_code'] = "";
                $product['sort_order'] = 0;
                $product['date_added'] = null;
                $product['date_modified'] = null;
                $product['eproduct_filename'] = "";
                $product['eproduct_available_days'] = 7;
                $product['eproduct_download_times'] = 5;
                $product['weight'] = 0;
                $product['meta_description'] = "";
                $product['meta_keywords'] = "";
                $product['free_shipping'] = 0;
                $product['min_order_amount'] = 1;
                if ( CONF_DEFAULT_TAX_CLASS == 0 )
                {
                    $product['classID'] = "null";
                }
                else
                {
                    $product['classID'] = CONF_DEFAULT_TAX_CLASS;
                }
                $product['shipping_freight'] = 0;
            }
            $options = configgetproductoptionvalue( $_GET['productID'] );
            $picturies = getpictures( $_GET['productID'] );
            $appended_categories = catgetappendedcategoriestoproduct( $_GET['productID'] );
            echo "<script type=\"text/javascript\" src=\"data/admin/admin.js\"></script>\r\n<script type=\"text/javascript\">\r\n<!--\r\n\r\nfunction confstatus(where, togo)\r\n{\r\n        if (where.value !== \"\" && where.value !== null)\r\n        {\r\n        document.getElementById(togo).disabled = \"\";\r\n        }else{\r\n        document.getElementById(togo).disabled = \"disabled\";\r\n        }\r\n}\r\n\r\nfunction upd()\r\n{\r\ndocument.getElementById('save_product').value = 1;\r\n}\r\n\r\nfunction upd2()\r\n{\r\ndocument.getElementById('save_pictures').value = 1;\r\n}\r\n\r\nfunction upd3()\r\n{\r\ndocument.getElementById('add_category').value = 1;\r\n}\r\n\r\nfunction AddProductAndOpen_configurator(optionID)\r\n{\r\ndocument.getElementById('optionID').value = optionID;\r\ndocument.getElementById('AddProductAndOpenConfigurator').value = 1;\r\ndocument.getElementById('MainForm').submit();\r\n}\r\n\r\nfunction ProductIsProgramHandler()\r\n{\r\n                                        document.MainForm.eproduct_filename.disabled =\r\n                                                        !document.MainForm.ProductIsProgram.checked;\r\n                                        document.MainForm.eproduct_available_days.disabled =\r\n                                                        !document.MainForm.ProductIsProgram.checked;\r\n                                        document.MainForm.eproduct_download_times.disabled =\r\n                                                        !document.MainForm.ProductIsProgram.checked;\r\n}\r\n\r\n//-->\r\n</script>\r\n</head>\r\n<body class=\"ibody\">\r\n  <table class=\"adn\">\r\n    <tr>\r\n      <td colspan=\"2\">\r\n        <table class=\"adn\">\r\n          <tr>\r\n            <td class=\"head\"><img src=\"data/admin/sep.gif\" alt=\"\"></td>\r\n            <td class=\"head toph\">&nbsp;&nbsp;";
            echo ADMIN_TMENU1;
            echo ": <b>";
            if ( CONF_BACKEND_SAFEMODE )
            {
                echo "demo";
            }
            else
            {
                echo $admintempname;
            }
            echo "</b></td>\r\n            <td class=\"head\"><img src=\"data/admin/sep2.gif\" alt=\"\"></td>\r\n            <td class=\"head toph\">";
            echo ADMIN_TMENU2;
            echo ": <b>";
            echo $online_users;
            echo "</b></td>\r\n            <td class=\"head\"><img src=\"data/admin/sep2.gif\" alt=\"\"></td>\r\n            <td class=\"head last toph\" width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?order_search_type=SearchByStatusID&amp;checkbox_order_status_";
            echo CONF_NEW_ORDER_STATUS;
            echo "=1&amp;dpt=custord&amp;sub=new_orders&amp;search=\">";
            echo ADMIN_TMENU3;
            echo ": <b>";
            echo $new_orders_count;
            echo "</b></a></td>\r\n            <td class=\"head\">\r\n              <table class=\"adw\">\r\n                <tr>\r\n                <td class=\"head last toph\"><a href=\"";
            echo ADMIN_FILE;
            echo "\">";
            echo ADMINISTRATE_LINK;
            echo "</a></td>\r\n                  <td class=\"head\"><img src=\"data/admin/sep2.gif\" alt=\"\"></td>\r\n                  <td class=\"head last toph\"><a href=\"index.php\">";
            echo ADMIN_BACK_TO_SHOP;
            echo "</a></td>\r\n                  <td class=\"head\"><img src=\"data/admin/sep2.gif\" alt=\"\"></td>\r\n                  <td class=\"head last toph2 toph\"><a href=\"index.php?logout=yes\">";
            echo ADMIN_LOGOUT_LINK;
            echo "</a></td>\r\n                </tr>\r\n              </table>\r\n            </td>\r\n          </tr>\r\n        </table>\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"indexb1\">\r\n<table class=\"adn\"><tr><td class=\"se\"></td></tr></table>\r\n<table width=\"186\" class=\"adw\" style=\"margin: auto;\">\r\n                               <tr>\r\n                                   <td class=\"head2\">\r\n                                       <table class=\"adn\">\r\n                                           <tr>\r\n                                               <td class=\"head4\" onclick=\"menuresetit('menu1')\">";
            echo ADMIN_CATALOG;
            echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu1')\" id=\"menu12\" style=\"cursor: pointer;\"></td>\r\n                                           </tr>\r\n                                       </table>\r\n                                   </td>\r\n                               </tr>\r\n                               <tr id='menu13' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=catalog&amp;sub=products_categories\">";
            echo ADMIN_CATEGORIES_PRODUCTS;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=catalog&amp;sub=dbsync\">";
            echo ADMIN_SYNCHRONIZE_TOOLS;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=catalog&amp;sub=extra\">";
            echo ADMIN_PRODUCT_OPTIONS;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=catalog&amp;sub=special\">";
            echo ADMIN_SPECIAL_OFFERS;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=catalog&amp;sub=excel_import\">";
            echo ADMIN_IMPORT_FROM_EXCEL;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=catalog&amp;sub=excel_export\">";
            echo ADMIN_EXPORT_TO_EXCEL;
            echo "</a></td></tr></table>\r\n</div></td>\r\n\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"se\"></td>\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"head2\">\r\n                                       <table class=\"adn\">\r\n                                           <tr>\r\n                                               <td class=\"head4\" onclick=\"menuresetit('menu2')\">";
            echo ADMIN_CUSTOMERS_AND_ORDERS;
            echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu2')\" id=\"menu22\" style=\"cursor: pointer;\"></td>\r\n                                           </tr>\r\n                                       </table>\r\n                                   </td>\r\n                               </tr>\r\n                               <tr id='menu23' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=custord&amp;sub=new_orders\">";
            echo ADMIN_NEW_ORDERS;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=custord&amp;sub=subscribers\">";
            echo ADMIN_NEWS_SUBSCRIBERS;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=custord&amp;sub=order_statuses\">";
            echo ADMIN_ORDER_STATUES;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=custord&amp;sub=reg_fields\">";
            echo ADMIN_CUSTOMER_REG_FIELDS;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=custord&amp;sub=discounts\">";
            echo ADMIN_DISCOUNT_MENU;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=custord&amp;sub=aux_pages\">";
            echo ADMIN_TX7;
            echo "</a></td></tr></table>\r\n</div></td>\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"se\"></td>\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"head2\">\r\n                                       <table class=\"adn\">\r\n                                           <tr>\r\n                                               <td class=\"head4\" onclick=\"menuresetit('menu3')\">";
            echo ADMIN_SETTINGS;
            echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu3')\" id=\"menu32\" style=\"cursor: pointer;\"></td>\r\n                                           </tr>\r\n                                       </table>\r\n                                   </td>\r\n                               </tr>\r\n                               <tr id='menu33' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=conf&amp;sub=setting&amp;settings_groupID=2\">";
            echo ADMIN_SETTINGS_GENERAL;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=conf&amp;sub=currencies\">";
            echo ADMIN_CURRENCY_TYPES;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=conf&amp;sub=shipping\">";
            echo ADMIN_STRING_SHIPPING_TYPE;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=conf&amp;sub=payment\">";
            echo ADMIN_STRING_PAYMENT_TYPE;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=conf&amp;sub=blocks_edit\">";
            echo ADMIN_TX20;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=conf&amp;sub=admin_edit\">";
            echo ADMIN_CONF_ADMINS;
            echo "</a></td></tr></table>\r\n</div></td>\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"se\"></td>\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"head2\">\r\n                                       <table class=\"adn\">\r\n                                           <tr>\r\n                                               <td class=\"head4\" onclick=\"menuresetit('menu4')\">";
            echo ADMIN_MODULES;
            echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu4')\" id=\"menu42\" style=\"cursor: pointer;\"></td>\r\n                                           </tr>\r\n                                       </table>\r\n                                   </td>\r\n                               </tr>\r\n                               <tr id='menu43' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=modules&amp;sub=news\">";
            echo ADMIN_NEWS;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=modules&amp;sub=survey\">";
            echo ADMIN_VOTING;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=modules&amp;sub=shipping\">";
            echo ADMIN_STRING_SHIPPING_MODULES;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=modules&amp;sub=payment\">";
            echo ADMIN_STRING_PAYMENT_MODULES;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=modules&amp;sub=linkexchange\">";
            echo ADMIN_STRING_MODULES_LINKEXCHANGE;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=modules&amp;sub=yandex\">";
            echo ADMIN_STRING_YANDEX;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=custord&amp;sub=affiliate\">";
            echo STRING_AFFILIATE_PROGRAM;
            echo "</a></td></tr></table>\r\n</div></td>\r\n\r\n                               </tr>\r\n                               <tr>\r\n                                   <td class=\"se\"></td>\r\n                               </tr>\r\n                                   <tr>\r\n                                       <td class=\"head2\">\r\n                                           <table class=\"adn\">\r\n                                               <tr>\r\n                                                   <td class=\"head4\" onclick=\"menuresetit('menu5')\">";
            echo ADMIN_REPORTS;
            echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu5')\" id=\"menu52\" style=\"cursor: pointer;\"></td>\r\n                                               </tr>\r\n                                           </table>\r\n                                       </td>\r\n                                   </tr>\r\n                                   <tr id='menu53' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=reports&amp;sub=category_viewed_times\">";
            echo ADMIN_CATEGORY_VIEWED_TIMES;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=reports&amp;sub=customer_log\">";
            echo ADMIN_CUSTOMER_LOG;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=reports&amp;sub=information\">";
            echo ADMIN_INFORMATION2;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=reports&amp;sub=coming\">";
            echo ADMIN_COMING;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=reports&amp;sub=security\">";
            echo ADMIN_SECURITY;
            echo "</a></td></tr></table>\r\n</div></td>\r\n                                   </tr>\r\n                               <tr>\r\n                                   <td class=\"se\"></td>\r\n                               </tr>\r\n                                <tr>\r\n                                       <td class=\"head2\">\r\n                                           <table class=\"adn\">\r\n                                               <tr>\r\n                                                   <td class=\"head4\" onclick=\"menuresetit('menu6')\">";
            echo ADMIN_LIST_ALL;
            echo "</td>\r\n                                               <td align=\"right\" class=\"head7\"><img src=\"data/admin/004.gif\" alt=\"\" onclick=\"menuresetit('menu6')\" id=\"menu62\" style=\"cursor: pointer;\"></td>\r\n                                               </tr>\r\n                                           </table>\r\n                                       </td>\r\n                                   </tr>\r\n                                   <tr id='menu63' style=\"display: none\">\r\n<td>\r\n<div class=\"dvmenu\">\r\n<table class=\"adn\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?login=&amp;first_name=&amp;last_name=&amp;email=&amp;groupID=0&amp;fActState=-1&amp;dpt=custord&amp;sub=custlist&amp;search=Find\">";
            echo ADMIN_CUSTOMERS;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=custord&amp;sub=custgroup\">";
            echo ADMIN_CUSTGROUP;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=conf&amp;sub=countries\">";
            echo ADMIN_MENU_TOWNS;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=conf&amp;sub=zones\">";
            echo ADMIN_MENU_TAXEZ;
            echo "</a></td></tr></table>\r\n<table class=\"adn topj\"><tr><td><img src=\"data/admin/drs.gif\" alt=\"\"></td><td width=\"100%\"><a href=\"";
            echo ADMIN_FILE;
            echo "?dpt=catalog&amp;sub=discuss\">";
            echo ADMIN_DISCUSSIONS;
            echo "</a></td></tr></table>\r\n</div></td>\r\n</tr>\r\n</table>\r\n<script type=\"text/javascript\">\r\nmegamenu();\r\n</script>\r\n</td>\r\n<td valign=\"top\">\r\n<table class=\"adn\">\r\n  <tr>\r\n    <td class=\"zeb2 nbc\">\r\n      <table class=\"adn ggg\">\r\n         <tr>\r\n           <td>\r\n            <table class=\"adn\">\r\n              <tr>\r\n              <td class=\"nbc2\"><span class=\"titlecol\">";
            echo $title;
            echo "</span></td>\r\n<td align=\"right\" valign=\"middle\" id=\"preproc\"></td></tr>\r\n              <tr>\r\n               <td class=\"nbcl\" colspan=\"2\"></td>\r\n              </tr>\r\n            </table>\r\n           </td>\r\n         </tr>\r\n      </table>\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\" align=\"center\" class=\"zeb\">\r\n      <table class=\"adn\">\r\n        <tr>\r\n          <td align=\"left\">\r\n<form enctype=\"multipart/form-data\" action=\"";
            echo ADMIN_FILE;
            echo "?productID=";
            echo $_GET['productID'];
            echo "&amp;eaction=prod\" method=\"post\" name=\"MainForm\" id=\"MainForm\">\r\n";
            if ( isset( $_GET['safemode'] ) )
            {
                echo "<table class=\"adminw\"><tr><td align=\"left\"><table class=\"adn\"><tr><td><img src=\"data/admin/stop2.gif\" align=\"left\" class=\"stop\"></td><td class=\"splin\"><span class=\"error\">".ERROR_MODULE_ACCESS2."</span><br><br>".ERROR_MODULE_ACCESS_DES2."</td></tr></table></td></tr></table>\n";
            }
            if ( isset( $_GET['couldntToDelete'] ) )
            {
                echo "<script type=\"text/javascript\">alert('".COULD_NOT_DELETE_THIS_PRODUCT."\\n".ADMIN_ERR5."');</script>\n";
            }
            echo "<table class=\"adn\">\r\n<tr class=\"lineb\">\r\n<td align=\"left\">";
            echo ADMIN_SL3;
            echo "</td></tr>\r\n<tr class=\"lins\">\r\n<td align=\"left\">";
            echo ADMIN_CATEGORY_PARENT;
            echo ": <select name=\"categoryID\" >\r\n<option value=\"1\">";
            echo ADMIN_CATEGORY_ROOT;
            echo "</option>\r\n";
            $cats = catgetcategoryclist( );
            $i = 0;
            for ( ; $i < count( $cats ); ++$i )
            {
                echo "<option value=\"".$cats[$i]['categoryID']."\"";
                if ( $product['categoryID'] == $cats[$i]['categoryID'] )
                {
                    echo " selected";
                }
                echo ">";
                $j = 0;
                for ( ; $j < $cats[$i]['level']; ++$j )
                {
                    echo "&nbsp;&nbsp;&nbsp;";
                }
                echo $cats[$i]['name'];
                echo "</option>";
            }
            echo "</select></td></tr>\r\n<tr class=\"lins\"><td align=\"left\">";
            echo ADMIN_PRODUCT_NAME;
            echo ": <input type=\"text\" name=\"name\" value=\"";
            echo $product['name'];
            echo "\" style=\"width: 590px;\" class=\"textp\"></td></tr>\r\n<tr class=\"lins\"><td align=\"left\">";
            echo ADMIN_PRODUCT_TITLE_PAGE;
            echo ": <input type=\"text\" name=\"title\" value=\"";
            echo $product['title'];
            echo "\" style=\"width: 590px;\" class=\"textp\"><br><br><input type=checkbox name='free_shipping'\r\n                ";
            if ( $product['free_shipping'] )
            {
                echo "                        checked\r\n                ";
            }
            echo "                value='1'>&nbsp;&nbsp;";
            echo ADMIN_FREE_SHIPPING;
            echo "</td></tr>\r\n";
            if ( !is_null( $product['date_added'] ) )
            {
                echo "<tr class=\"lins\"><td align=\"left\">".ADMIN_DATE_ADDED_PR.": ";
                echo "<span style=\"color: #BB0000\">".$product['date_added']."</span>";
                if ( !is_null( $product['date_modified'] ) )
                {
                    echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".ADMIN_DATE_MODIFIED.": ";
                    echo "<span style=\"color: #BB0000\">".$product['date_modified']."</span>";
                }
                echo "</td></tr><tr><td class=\"se5\"></td></tr>";
            }
            echo "</table>\r\n\r\n<table class=\"adn\">\r\n<tr class=\"lineb\">\r\n<td align=\"left\" width=\"25%\">";
            echo ADMIN_EDIT_PROD_MN1;
            echo "</td>\r\n<td align=\"left\" width=\"25%\">";
            echo ADMIN_EDIT_PROD_MN2;
            echo "</td>\r\n<td align=\"left\" width=\"25%\">";
            echo ADMIN_EDIT_PROD_MN3;
            echo "</td>\r\n<td align=\"left\" width=\"25%\">";
            echo ADMIN_EDIT_PROD_MN5;
            echo "</td>\r\n</tr>\r\n<tr class=\"lins\"><td align=\"left\"><input type=\"text\" name=\"price\" value=\"";
            echo $product['Price'];
            echo "\" style=\"width: 100px;\" class=\"textp\"></td>\r\n<td align=\"left\"><input type=\"text\" name=\"list_price\" value=\"";
            echo $product['list_price'];
            echo "\" style=\"width: 100px;\" class=\"textp\"></td>\r\n<td align=\"left\"><input type=\"text\" name=\"product_code\" value=\"";
            echo str_replace( "\"", "&quot;", $product['product_code'] );
            echo "\" style=\"width: 100px;\" class=\"textp\"></td>\r\n<td align=\"left\"><input type=\"text\" name=\"shipping_freight\" value=\"";
            echo $product['shipping_freight'];
            echo "\" style=\"width: 100px;\" class=\"textp\"></td>\r\n</tr>\r\n</table>\r\n<table class=\"adn\">\r\n<tr class=\"lineb\">\r\n<td align=\"left\" width=\"25%\">";
            echo ADMIN_EDIT_PROD_MN4;
            echo "</td>\r\n<td align=\"left\" width=\"25%\">";
            echo ADMIN_EDIT_PROD_MN7;
            echo "</td>\r\n<td align=\"left\" width=\"25%\">";
            echo ADMIN_PRODUCT_WEIGHT;
            echo "</td>\r\n";
            if ( CONF_CHECKSTOCK == 1 )
            {
                echo "<td align=\"left\" width=\"25%\">";
                echo ADMIN_EDIT_PROD_MN6;
                echo "</td>\r\n";
            }
            else
            {
                echo "<td align=\"left\" width=\"25%\">&nbsp;</td>\r\n";
            }
            echo "</tr>\r\n<tr class=\"lins\"><td align=\"left\"><input type=\"text\" name=\"min_order_amount\" value=\"";
            echo $product['min_order_amount'];
            echo "\" style=\"width: 100px;\" class=\"textp\"></td>\r\n<td align=\"left\"><input type=\"text\" name=\"sort_order\" value=\"";
            echo $product['sort_order'];
            echo "\" style=\"width: 100px;\" class=\"textp\"></td>\r\n<td align=\"left\"><input type=\"text\" name=\"weight\" value=\"";
            echo $product['weight'];
            echo "\" style=\"width: 100px;\" class=\"textp\"></td>\r\n";
            if ( CONF_CHECKSTOCK == 1 )
            {
                echo "<td align=\"left\"><input type=\"text\" name='in_stock' value=\"";
                echo $product['in_stock'];
                echo "\" style=\"width: 100px;\" class=\"textp\"></td>\r\n";
            }
            else
            {
                echo "<td align=\"left\"><input type=\"hidden\" name='in_stock' value=\"";
                echo $product['in_stock'];
                echo "\"></td>\r\n";
            }
            echo "</tr></table>\r\n<table class=\"adn\"><tr><td class=\"separ\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr><tr><td class=\"se5\"></td></tr></table>\r\n<a href=\"#\" onclick=\"upd(),document.getElementById('MainForm').submit(); return false\" class=\"inl\">";
            echo SAVE_BUTTON;
            echo "</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
            if ( $codep == 1 )
            {
                $wer = $_GET['categoryID'];
                echo "<a href=\"".ADMIN_FILE.( "?categoryID=".$wer."&amp;stepback=1&amp;eaction=prod\" class=\"inl\">" ).CANCEL_BUTTON."</a>";
            }
            else
            {
                $wer = $_GET['productID'];
                echo "<a href=\"".ADMIN_FILE.( "?productID=".$wer."&amp;stepback=1&amp;eaction=prod\" class=\"inl\">" ).CANCEL_BUTTON."</a>";
            }
            if ( $_GET['productID'] )
            {
                echo "&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"#\" onClick=\"confirmDeletep('".QUESTION_DELETE_CONFIRMATION."','".ADMIN_FILE."?productID=".$_GET['productID']."&amp;delete=1&amp;eaction=prod'); return false\" class=\"inl\">".DELETE_BUTTON."</a>";
            }
            echo "<table class=\"adn\"><tr><td class=\"se6\"></td></tr></table>\r\n<table class=\"adn\"><tr class=\"lineb\"><td align=\"left\" colspan=\"6\">";
            echo ADMIN_DIGIT_PRODUCTS;
            echo "</td></tr>\r\n<tr class=\"lineb\">\r\n<td align=\"left\">&nbsp;</td>\r\n<td align=\"left\" width=\"25%\">";
            echo ADMIN_EPRODUCT_FILENAME;
            echo "</td>\r\n<td align=\"left\" width=\"25%\">";
            echo ADMIN_EPRODUCT_AVAILABLE_DAYS."(".ADMIN_DAYS.")";
            echo "</td>\r\n<td align=\"left\" width=\"25%\">";
            echo ADMIN_EPRODUCT_DOWNLOAD_TIMES;
            echo "</td>\r\n<td align=\"left\" width=\"25%\">";
            echo ADMIN_UPLOAD_PRODUCT_FILE;
            echo "</td>\r\n<td align=\"left\">&nbsp;</td>\r\n</tr>\r\n<tr class=\"lins\">\r\n<td align=\"center\" valign=\"middle\"><input type=checkbox name='ProductIsProgram'\r\n                                                        value='1'\r\n                                                        onclick='ProductIsProgramHandler();'\r\n                                                        ";
            if ( trim( $product['eproduct_filename'] ) != "" )
            {
                echo "                                                                checked\r\n                                                        ";
            }
            echo "                                                        ></td>\r\n<td align=\"left\" valign=\"middle\">\r\n                                        ";
            if ( file_exists( "core/files/".$product['eproduct_filename'] ) && $product['eproduct_filename'] != null )
            {
                echo "                                                ";
                echo $product['eproduct_filename'];
                echo "                                        ";
            }
            else
            {
                echo "                                                ";
                echo ADMIN_FILE_NOT_UPLOADED;
                echo "                                        ";
            }
            echo " </td>\r\n<td align=\"left\" valign=\"middle\">";
            $valueArray[] = 1;
            $valueArray[] = 2;
            $valueArray[] = 3;
            $valueArray[] = 4;
            $valueArray[] = 5;
            $valueArray[] = 7;
            $valueArray[] = 14;
            $valueArray[] = 30;
            $valueArray[] = 180;
            $valueArray[] = 365;
            echo "                                        <select name='eproduct_available_days'>\r\n                                                ";
            foreach ( $valueArray as $value )
            {
                echo "                                                        <option value='";
                echo $value;
                echo "'\r\n                                                        ";
                if ( $product['eproduct_available_days'] == $value )
                {
                    echo "                                                                        selected\r\n                                                        ";
                }
                echo "                                                        > ";
                echo $value;
                echo " </option>\r\n                                                ";
            }
            echo "                                        </select>\r\n                                </td>\r\n<td align=\"left\" valign=\"middle\"><input type=text name='eproduct_download_times'\r\n                                                value='";
            echo $product['eproduct_download_times'];
            echo "' class=\"textp\" >\r\n                                </td><td align=\"left\" valign=\"middle\"><input type='file' name='eproduct_filename' value='";
            echo $product['eproduct_filename'];
            echo "' class=\"file\" size=\"18\"></td>\r\n                                <td align=\"center\" valign=\"middle\"><img src=\"data/admin/plus.gif\" alt=\"\" style=\"cursor: pointer\" onclick=\"document.getElementById('save_product_for_file').value='1',document.getElementById('MainForm').submit()\"></td>\r\n                        </tr></table>\r\n<table class=\"adn\"><tr><td class=\"separ\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr><tr><td class=\"se6\"></td></tr></table>\r\n<script type=\"text/javascript\">ProductIsProgramHandler();</script>\r\n\r\n<input type=hidden name='tax_class' value='null'>\r\n<input type=hidden name='rating' value=\"";
            echo $product['customers_rating'];
            echo "\">\r\n\r\n<input type=hidden name='save_spwc' value='0' id='save_spwc'>\r\n<input type=hidden name='save_product_for_file' value='0' id='save_product_for_file'>\r\n<input type=hidden name='save_product' value='0' id='save_product'>\r\n<input type=hidden name='save_pictures' value='0' id='save_pictures'>\r\n<input type=hidden name='add_category' value='0' id='add_category'>\r\n<input type=hidden name='save_product_without_closing' value='0' id='spwc'>\r\n<input type=hidden name='AddProductAndOpenConfigurator' value='0' id='AddProductAndOpenConfigurator'>\r\n<input type=hidden name='optionID' value='0' id='optionID'>\r\n<table class=\"adn\">\r\n<tr class=\"linsz\">\r\n<td align=\"left\"><span class=\"titlecol2\">";
            echo ADMIN_PRODUCT_BRIEF_DESC;
            echo "</span></td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<textarea name=\"brief_description\" class=\"admin\" id=\"myarea1\">";
            echo $product['brief_description'];
            echo "</textarea></td></tr>\r\n</table>\r\n<table class=\"adn\"><tr><td class=\"se6\"></td></tr></table>\r\n<table class=\"adn\">\r\n<tr class=\"linsz\">\r\n<td align=\"left\"><span class=\"titlecol2\">";
            echo ADMIN_PRODUCT_DESC;
            echo "</span></td>\r\n</tr>\r\n<tr>\r\n<td><textarea name=\"description\" id=\"myarea2\" class=\"admin\">";
            echo $product['description'];
            echo "</textarea></td>\r\n</tr></table>\r\n<table class=\"adn\"><tr><td class=\"se6\"></td></tr></table>\r\n<table class=\"adw\">\r\n<tr><td width=\"50%\">\r\n<table class=\"adn\">\r\n<tr class=\"linsz\">\r\n<td align=\"left\"><span class=\"titlecol2\">";
            echo ADMIN_PRODUCT_DESC2;
            echo "</span></td>\r\n</tr>\r\n<tr><td align=\"left\"><textarea name='meta_description' id=\"meta_description\" class=\"adminall\" style=\"margin-right: 38px;\">";
            echo $product['meta_description'];
            echo "</textarea></td>\r\n</tr>\r\n</table>\r\n</td>\r\n<td width=\"50%\">\r\n<table class=\"adn\">\r\n<tr class=\"linsz\">\r\n<td align=\"left\"><span class=\"titlecol2\">";
            echo ADMIN_PRODUCT_DESC3;
            echo "</span></td>\r\n</tr>\r\n<tr><td align=\"left\"><textarea name='meta_keywords' id=\"meta_keywords\" class=\"adminall\">";
            echo $product['meta_keywords'];
            echo "</textarea></td></tr>\r\n</table>\r\n</td></tr></table>\r\n<table class=\"adn\"><tr><td class=\"se6\"></td></tr></table>\r\n<table class=\"adn\"><tr class=\"lineb\"><td align=\"left\" colspan=\"5\">";
            echo ADMIN_PHOTOS;
            echo "<script type=\"text/javascript\" src=\"data/admin/highslide.packed.js\"></script>\r\n<script type=\"text/javascript\">\r\n<!--\r\n    hs.graphicsDir = 'data/admin/';\r\n    hs.outlineType = 'rounded';\r\n\r\n    hs.restoreTitle = '";
            echo STRING_HS_RESTORETITLE;
            echo "';\r\n    hs.loadingText = '";
            echo STRING_HS_LOADINGTEXT;
            echo "';\r\n    hs.loadingTitle = '";
            echo STRING_HS_LOADINGTITLE;
            echo "';\r\n    hs.focusTitle = '";
            echo STRING_HS_FOCUSTITLE;
            echo "';\r\n    hs.fullExpandTitle = '";
            echo STRING_HS_FULLEXPANDTITLE;
            echo "';\r\n\r\n//-->\r\n</script>\r\n</td></tr>\r\n";
            if ( 1 <= count( $picturies ) )
            {
                echo "<tr class=\"lineb\">\r\n<td align=\"center\">";
                echo ADMIN_ON2;
                echo "</td>\r\n<td align=\"center\" width=\"32%\">";
                echo ADMIN_PRODUCT_SPPICTURE;
                echo "</td>\r\n<td align=\"center\" width=\"32%\">";
                echo ADMIN_PRODUCT_THUMBNAIL;
                echo "</td>\r\n<td align=\"center\" width=\"32%\">";
                echo ADMIN_PRODUCT_BIGPICTURE;
                echo "</td>\r\n<td align=\"center\">";
                echo ADMIN_ON3;
                echo "</td>\r\n</tr>\r\n";
                foreach ( $picturies as $picture )
                {
                    echo "<tr class=\"linsz\">";
                    if ( $picture['default_picture'] == 1 )
                    {
                        $default_picture_exists = true;
                        echo "<td align=\"center\" valign=\"middle\"><input type=radio name=default_picture value='".$picture['photoID']."' checked></td>\n";
                    }
                    else
                    {
                        echo "<td align=\"center\" valign=\"middle\"><input type=radio name=default_picture value='".$picture['photoID']."'></td>\n";
                    }
                    echo "<td align=\"center\" valign=\"middle\">\n";
                    echo "<input type=text name=filename_".$picture['photoID']." value='".$picture['filename']."' size=25 class=\"textp\"><br>\n";
                    if ( file_exists( "data/small/".$picture['filename'] ) && trim( $picture['filename'] ) != "" )
                    {
                        echo "<a href=\"data/small/".$picture['filename']."\" onclick=\"return hs.expand(this)\" style=\"text-decoration:none;\">".ADMIN_PHOTO_PREVIEW."</a>\n";
                    }
                    else
                    {
                        echo ADMIN_PICTURE_NOT_UPLOADED;
                    }
                    echo "</td>\n<td align=\"center\" valign=\"middle\">\n";
                    echo "<input type=text name=thumbnail_".$picture['photoID']." value='".$picture['thumbnail']."' size=25 class=\"textp\"><br>\n";
                    if ( file_exists( "data/medium/".$picture['thumbnail'] ) && trim( $picture['thumbnail'] ) != "" )
                    {
                        echo "<a href=\"data/medium/".$picture['thumbnail']."\" onclick=\"return hs.expand(this)\" style=\"text-decoration:none;\">".ADMIN_PHOTO_PREVIEW."</a>";
                        echo " / <a href=\"#\" onClick=\"confirmDeletep('".QUESTION_DELETE_PICTURE."', '".ADMIN_FILE."?delete_one_picture=1&amp;thumbnail=".$picture['photoID']."&amp;productID=".$_GET['productID']."&amp;eaction=prod'); return false\" style=\"text-decoration:none;\">".DELETE_BUTTON."</a>\n";
                    }
                    else
                    {
                        echo ADMIN_PICTURE_NOT_UPLOADED;
                    }
                    echo "</td>\n<td align=\"center\" valign=\"middle\">\n";
                    echo "<input type=text name=enlarged_".$picture['photoID']." value='".$picture['enlarged']."' size=25 class=\"textp\"><br>\n";
                    if ( file_exists( "data/big/".$picture['enlarged'] ) && trim( $picture['enlarged'] ) != "" )
                    {
                        echo "<a href=\"data/big/".$picture['enlarged']."\" onclick=\"return hs.expand(this)\" style=\"text-decoration:none;\">".ADMIN_PHOTO_PREVIEW."</a>";
                        echo " / <a href=\"#\" onClick=\"confirmDeletep('".QUESTION_DELETE_PICTURE."', '".ADMIN_FILE."?delete_one_picture=1&amp;enlarged=".$picture['photoID']."&amp;productID=".$_GET['productID']."&amp;eaction=prod'); return false\" style=\"text-decoration:none;\">".DELETE_BUTTON."</a>\n";
                    }
                    else
                    {
                        echo ADMIN_PICTURE_NOT_UPLOADED;
                    }
                    echo "</td>\n<td valign=middle align=center>\n<img src=\"data/admin/mines.gif\" style=\"cursor: pointer\" alt=\"\" onClick=\"confirmDeletep('";
                    echo QUESTION_DELETE_PICTURE;
                    echo "','";
                    echo ADMIN_FILE;
                    echo "?productID=";
                    echo $_GET['productID'];
                    echo "&amp;photoID=";
                    echo $picture['photoID'];
                    echo "&amp;delete_pictures=1&amp;eaction=prod')\"></td>\r\n";
                    echo "</tr><tr class=\"linsz\"><td></td> <td align=\"center\" valign=\"middle\"><input type=\"file\" name=\"ufilenameu_".$picture['photoID']."\" class=\"file\" size=\"13\"></td><td align=\"center\" valign=\"middle\"><input type=\"file\" name=\"uthumbnailu_".$picture['photoID']."\" class=\"file\" size=\"13\"></td><td align=\"center\" valign=\"middle\"><input type=\"file\" name=\"uenlargedu_".$picture['photoID']."\" class=\"file\" size=\"13\"></td> <td></td></tr><tr><td class=\"separ\" colspan=\"5\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr>\n";
                }
                echo "<tr><td class=\"se5\" colspan=\"5\"></td></tr><tr><td colspan=\"5\" align=\"left\"><a href=\"#\" onclick=\"upd2(),document.getElementById('MainForm').submit(); return false\" class=\"inl\">".SAVE_BUTTON."</a></td></tr>\n";
            }
            else
            {
                echo "<tr><td height=\"20\" valign=\"middle\" align=\"center\">".ADMIN_NO_PHOTO_NEW."</td></tr><tr><td class=\"separ\" colspan=\"5\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr>\n";
            }
            echo "</table>\r\n<table class=\"adn\"><tr><td class=\"se6\"></td></tr></table>\r\n<table class=\"adn\"><tr class=\"lineb\"><td align=\"left\" colspan=\"5\">";
            echo ADD_BUTTON26;
            echo "</td></tr>\r\n<tr class=\"lineb\">\r\n<td align=\"center\">";
            echo ADMIN_ON2;
            echo "</td>\r\n<td align=\"center\" width=\"32%\">";
            echo ADMIN_PRODUCT_SPPICTURE;
            echo "</td>\r\n<td align=\"center\" width=\"32%\">";
            echo ADMIN_PRODUCT_THUMBNAIL;
            echo "</td>\r\n<td align=\"center\" width=\"32%\">";
            echo ADMIN_PRODUCT_BIGPICTURE;
            echo "</td>\r\n<td align=\"center\">Add</td>\r\n</tr>\r\n<tr class=\"lins\">\r\n<td align=\"center\" valign=\"middle\"><input type=radio name=default_picture\r\n                                        ";
            if ( !isset( $default_picture_exists ) )
            {
                echo "                                                checked\r\n                                        ";
            }
            echo "                                                value=-1 >\r\n\r\n                                </td>\r\n                                <td align=\"center\" valign=\"middle\"><input id=\"pic1\" onchange=\"confstatus(this,'pic2'),confstatus(this,'pic3');\" type=\"file\" name=\"new_filename\" class=\"file\" size=\"13\"></td>\r\n                                <td align=\"center\" valign=\"middle\"><input disabled id=\"pic2\" type=\"file\" name=\"new_thumbnail\" class=\"file\" size=\"13\"></td>\r\n                                <td align=\"center\" valign=\"middle\"><input disabled id=\"pic3\" type=\"file\" name=\"new_enlarged\" class=\"file\" size=\"13\"></td>\r\n                                <td align=\"center\" valign=\"middle\"><img src=\"data/admin/plus.gif\" alt=\"\" style=\"cursor: pointer\" onclick=\"upd2(),document.getElementById('MainForm').submit()\"></td>\r\n                        </tr></table>\r\n<table class=\"adn\"><tr><td class=\"separ\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr><tr><td class=\"se6\"></td></tr></table>\r\n";
            if ( isset( $_GET['productID'] ) )
            {
                echo "<table class=\"adn\">\r\n<tr class=\"lineb\">\r\n<td align=\"left\">";
                echo ADMIN_PRODUCT_DESC4;
                echo "</td>\r\n</tr>\r\n";
                $q = db_query( "select count(*) FROM ".RELATED_PRODUCTS_TABLE." WHERE Owner=".( integer )$_GET['productID'] );
                $cnt = db_fetch_row( $q );
                if ( $cnt[0] == 0 )
                {
                    echo "<tr class=\"lins\"><td align=\"center\" height=\"20\">".STRING_EMPTY_CATEGORY3."</td></tr>";
                }
                else
                {
                    $q = db_query( "select productID FROM ".RELATED_PRODUCTS_TABLE." WHERE Owner=".( integer )$_GET['productID'] );
                    while ( $r = db_fetch_row( $q ) )
                    {
                        $p = db_query( "select productID, name FROM ".PRODUCTS_TABLE." WHERE productID=".( integer )$r[0] );
                        if ( $r1 = db_fetch_row( $p ) )
                        {
                            echo "<tr class=\"liney\"><td align=\"left\">";
                            echo $r1[1];
                            echo "</td></tr>";
                        }
                    }
                }
                echo "</table>\r\n<table class=\"adn\"><tr><td class=\"separ\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr><tr><td class=\"se5\"></td></tr></table>\r\n<a href=\"#\" onClick=\"open_window('";
                echo ADMIN_FILE;
                echo "?do=wishlist&owner=";
                echo $_GET['productID'];
                echo "',500,500); return false\" class=\"inl\">";
                echo EDIT_BUTTON;
                echo "</a>\r\n<table class=\"adn\"><tr><td class=\"se6\"></td></tr></table>\r\n";
            }
            echo "<script type=\"text/javascript\">\r\n                        function SetOptionValueTypeRadioButton( id, radioButtonState )\r\n                        {\r\n                                if ( radioButtonState == \"UN_DEFINED\" )\r\n                                        document.getElementById('option_radio_type_'+id+'_1').click();\r\n                                else if ( radioButtonState == \"ANY_VALUE\" )\r\n                                        document.getElementById('option_radio_type_'+id+'_2').click();\r\n                                else if ( radioButtonState == \"N_VALUES\" )\r\n                                       document.getElementById('option_radio_type_'+id+'_3').click();\r\n                        }\r\n\r\n                        function SetEnabledStateTextValueField( id, radioButtonState )\r\n                        {\r\n                                if ( radioButtonState == \"UN_DEFINED\" ||\r\n                                        radioButtonState == \"N_VALUES\" )\r\n                                {\r\n                                          document.getElementById('option_value_'+id).disabled=true;\r\n                                        document.getElementById('option_value_'+id).value=\"\";\r\n                                }\r\n                                else {\r\n                                       document.getElementById('option_value_'+id).disabled=false;\r\n                        }\r\n                        }\r\n</script>\r\n<table class=\"adn\">\r\n<tr class=\"lineb\">\r\n<td align=\"left\"colspan=\"3\">";
            echo ADMIN_EDITCHAR;
            echo "</td></tr>\r\n";
            if ( 1 <= count( $options ) )
            {
                foreach ( $options as $option )
                {
                    $option_row = $option['option_row'];
                    $value_row = $option['option_value'];
                    $ValueCount = $option['value_count'];
                    echo "<tr class=\"lineb\"><td align=\"left\" colspan=\"3\">";
                    echo $option_row['name'];
                    echo "</td></tr>\r\n<tr class=\"liney\">\r\n<td align=\"center\" valign=\"middle\"><input name='option_radio_type_";
                    echo $option_row['optionID'];
                    echo "' id='option_radio_type_";
                    echo $option_row['optionID'];
                    echo "_1' type='radio' value=\"UN_DEFINED\" onclick=\"SetEnabledStateTextValueField(";
                    echo $option_row['optionID'];
                    echo ", 'UN_DEFINED' )\"></td>\r\n<td align=\"center\" valign=\"middle\">----------</td>\r\n<td align=\"left\" valign=\"middle\" width=\"100%\">";
                    echo ADMIN_NOT_DEFINED;
                    echo "</td>\r\n</tr>\r\n<tr class=\"liney\">\r\n<td align=\"center\" valign=\"middle\"><input name='option_radio_type_";
                    echo $option_row['optionID'];
                    echo "' id='option_radio_type_";
                    echo $option_row['optionID'];
                    echo "_2' type='radio' value=\"ANY_VALUE\" onclick=\"SetEnabledStateTextValueField(";
                    echo $option_row['optionID'];
                    echo ", 'ANY_VALUE' )\"></td>\r\n<td align=\"center\" valign=\"middle\"><input type=\"text\" name='option_value_";
                    echo $option_row['optionID'];
                    echo "' id='option_value_";
                    echo $option_row['optionID'];
                    echo "' value='";
                    echo str_replace( "\"", "&quot;", $value_row['option_value'] );
                    echo "' class=\"textp\" style=\"width: 150px\"></td>\r\n<td align=\"left\" valign=\"middle\">";
                    echo ADMIN_ANY_VALUE;
                    echo "</td>\r\n</tr>\r\n<tr class=\"liney\">\r\n<td align=\"center\" valign=\"middle\"><input name='option_radio_type_";
                    echo $option_row['optionID'];
                    echo "' id='option_radio_type_";
                    echo $option_row['optionID'];
                    echo "_3' type='radio' value=\"N_VALUES\" onclick=\"SetEnabledStateTextValueField(";
                    echo $option_row['optionID'];
                    echo ", 'N_VALUES' )\"></td>\r\n<td align=\"center\" valign=\"middle\"><a href=\"#\" class=\"inl\" name=\"configurator_";
                    echo $option_row['optionID'];
                    echo "\" style=\"cursor: pointer\"\r\n";
                    if ( $_GET['productID'] != 0 )
                    {
                        echo " onclick=\"open_window('";
                        echo ADMIN_FILE;
                        echo "?do=configurator&optionID=";
                        echo $option_row['optionID'];
                        echo "&amp;productID=";
                        echo $_GET['productID'];
                        echo "',450,400); return false\"\r\n";
                    }
                    else
                    {
                        echo " onclick=\"AddProductAndOpen_configurator(";
                        echo $option_row['optionID'];
                        echo "); return false\"\r\n";
                    }
                    echo ">";
                    echo ADMIN_SELECT_SETTING;
                    echo "</a></td>\r\n<td align=\"left\" valign=\"middle\">";
                    echo ADMIN_SELECTING_FROM_VALUES;
                    echo " (";
                    echo $ValueCount;
                    echo " ";
                    echo ADMIN_VARIANTS;
                    echo ")\r\n<SCRIPT type=\"text/javascript\">\r\n";
                    if ( ( is_null( $value_row['option_value'] ) || $value_row['option_value'] == "" ) && $value_row['option_type'] == 0 )
                    {
                        echo "SetOptionValueTypeRadioButton( ".$option_row['optionID'].", 'UN_DEFINED' );";
                    }
                    else if ( $value_row['option_type'] == 0 )
                    {
                        echo "SetOptionValueTypeRadioButton( ".$option_row['optionID'].", 'ANY_VALUE' );";
                    }
                    else if ( $value_row['option_type'] == 1 )
                    {
                        echo "SetOptionValueTypeRadioButton( ".$option_row['optionID'].", 'N_VALUES' );";
                    }
                    echo "</script>\r\n</td>\r\n</tr>\r\n";
                }
            }
            else
            {
                echo "<tr><td height=\"20\" align=\"center\" valign=\"middle\">".ADMIN_NO_CHAR_NEW."</td></tr>";
            }
            echo "</table>\r\n<table class=\"adn\"><tr><td class=\"separ\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr><tr><td class=\"se6\"></td></tr></table>\r\n<table class=\"adn\">\r\n<tr class=\"lineb\">\r\n<td align=\"left\" colspan=\"2\">";
            echo ADMIN_CATSPLIT;
            echo "</td></tr><tr><td height=\"4\" colspan=\"2\"></td></tr>\r\n";
            if ( 1 <= count( $appended_categories ) )
            {
                foreach ( $appended_categories as $app_cat )
                {
                    echo "<tr>\r\n<td colspan=\"2\">\r\n<table class=\"adn\">\r\n<tr class=\"liney\">\r\n<td align=\"left\">";
                    echo $app_cat['category_way'];
                    echo "</td>\r\n<td align=\"right\"><img src=\"data/admin/mines.gif\" alt=\"\" style=\"cursor: pointer;\" onclick=\"confirmDeletep('";
                    echo QUESTION_DELETE_CONFIRMATION;
                    echo "','";
                    echo ADMIN_FILE;
                    echo "?productID=";
                    echo $_GET['productID'];
                    echo "&amp;remove_from_app_cat=";
                    echo $app_cat['categoryID'];
                    echo "&amp;eaction=prod')\"></td>\r\n</tr>\r\n</table>\r\n</td>\r\n</tr>\r\n";
                }
            }
            else
            {
                echo "<tr><td height=\"18\" align=\"center\" valign=\"middle\" colspan=\"2\">".ADMIN_NO_CAT_NEW."</td></tr>";
            }
            $cats = catgetcategoryclist( );
            if ( 1 <= count( $cats ) )
            {
                echo "<tr class=\"liney\"><td width=\"100%\" align=right><b>";
                echo ADD_BUTTON;
                echo ":</b> <select name='new_appended_category'>\r\n";
                $i = 0;
                for ( ; $i < count( $cats ); ++$i )
                {
                    echo "<option value=\"".$cats[$i]['categoryID']."\">";
                    $j = 0;
                    for ( ; $j < $cats[$i]['level']; ++$j )
                    {
                        echo "&nbsp;&nbsp;";
                    }
                    echo $cats[$i]['name'];
                    echo "</option>";
                }
                echo "</select>&nbsp;</td><td><img src=\"data/admin/ret.gif\" alt=\"\" style=\"cursor: pointer;\" onclick=\"upd3(),document.getElementById('MainForm').submit()\"></td></tr>\r\n";
            }
            echo "</table>\r\n<table class=\"adn\"><tr><td height=\"4\"></td></tr><tr><td class=\"separ\"><img src=\"data/admin/pixel.gif\" alt=\"\" class=\"sep\"></td></tr><tr><td class=\"se5\"></td></tr></table>\r\n<a href=\"#\" onclick=\"upd(),document.getElementById('MainForm').submit(); return false\" class=\"inl\">";
            echo SAVE_BUTTON;
            echo "</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
            if ( $codep == 1 )
            {
                $wer = $_GET['categoryID'];
                echo "<a href=\"".ADMIN_FILE."?categoryID=".$wer."&amp;stepback=1&amp;eaction=prod\" class=\"inl\">".CANCEL_BUTTON."</a>";
            }
            else
            {
                $wer = $_GET['productID'];
                echo "<a href=\"".ADMIN_FILE."?productID=".$wer."&amp;stepback=1&amp;eaction=prod\" class=\"inl\">".CANCEL_BUTTON."</a>";
            }
            if ( $_GET['productID'] )
            {
                echo "&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"#\" onClick=\"confirmDeletep('".QUESTION_DELETE_CONFIRMATION."','".ADMIN_FILE."?productID=".$_GET['productID']."&amp;delete=1&amp;eaction=prod'); return false\" class=\"inl\">".DELETE_BUTTON."</a>";
            }
            echo "</form>\r\n";
            if ( CONF_EDITOR )
            {
                echo "<script type=\"text/javascript\" src=\"fckeditor/fckeditor.js\"></script>\r\n<script type=\"text/javascript\" src=\"fckeditor/ckfinder/ckfinder.js\"></script>\r\n<script type=\"text/javascript\">\r\nwindow.onload = function()\r\n{\r\nvar oFCKeditor = new FCKeditor( 'myarea1',720,346) ;\r\n";
                $dir1 = dirname( $_SERVER['PHP_SELF'] );
                $sourcessrand = array( "//" => "/", "\\" => "/" );
                $dir1 = strtr( $dir1, $sourcessrand );
                if ( $dir1 != "/" )
                {
                    $dir2 = "/";
                }
                else
                {
                    $dir2 = "";
                }
                echo "oFCKeditor.BasePath = \"";
                echo $dir1.$dir2;
                echo "fckeditor/\" ;\r\noFCKeditor.ReplaceTextarea() ;\r\nvar oFCKeditor2 = new FCKeditor( 'myarea2',720,346) ;\r\noFCKeditor2.BasePath = \"";
                echo $dir1.$dir2;
                echo "fckeditor/\" ;\r\noFCKeditor2.ReplaceTextarea() ;\r\n}\r\n</script>\r\n";
            }
            echo "<table class=\"adn\"><tr><td class=\"se6\"></td></tr></table>\r\n<table class=\"adn\"><tr><td class=\"help\"><span class=\"titlecol2\">";
            echo USEFUL_FOR_YOU;
            echo "</span><div class=\"helptext\">";
            echo NOTE31;
            echo "<br>";
            echo NOTE339;
            echo "<br><br>";
            echo NOTE34;
            echo "<br><br>";
            echo NOTE342;
            echo "</div></td>\r\n</tr>\r\n</table>\r\n<table class=\"adn\"><tr><td class=\"se8\"></td></tr></table>\r\n</td></tr></table></td></tr></table> </td></tr></table>\r\n</body>\r\n</html>\r\n\r\n\r\n\r\n\r\n\r\n\r\n        ";
            break;
        default :
            do
            {
                require( "core/smarty/smarty.class.php" );
                $smarty = new smarty( );
                if ( ( integer )CONF_SMARTY_FORCE_COMPILE )
                {
                    $smarty->force_compile = true;
                }
                $smarty->template_dir = "core/tpl";
                if ( isset( $_GET['customerID'] ) )
                {
                    $GLOBALS['_GET']['customerID'] = ( integer )$_GET['customerID'];
                }
                if ( isset( $_GET['settings_groupID'] ) )
                {
                    $GLOBALS['_GET']['settings_groupID'] = ( integer )$_GET['settings_groupID'];
                }
                if ( isset( $_GET['orderID'] ) )
                {
                    $GLOBALS['_GET']['orderID'] = ( integer )$_GET['orderID'];
                }
                if ( isset( $_GET['answer'] ) )
                {
                    $GLOBALS['_GET']['answer'] = ( integer )$_GET['answer'];
                }
                if ( isset( $_GET['productID'] ) )
                {
                    $GLOBALS['_GET']['productID'] = ( integer )$_GET['productID'];
                }
                if ( isset( $_GET['categoryID'] ) )
                {
                    $GLOBALS['_GET']['categoryID'] = ( integer )$_GET['categoryID'];
                }
                if ( isset( $_GET['countryID'] ) )
                {
                    $GLOBALS['_GET']['countryID'] = ( integer )$_GET['countryID'];
                }
                if ( isset( $_GET['delete'] ) )
                {
                    $GLOBALS['_GET']['delete'] = ( integer )$_GET['delete'];
                }
                if ( isset( $_GET['setting_up'] ) )
                {
                    $GLOBALS['_GET']['setting_up'] = ( integer )$_GET['setting_up'];
                }
                function mark_as_selected( $m, $_obfuscate_8Aяя )
                {
                    $m = trim( $m );
                    if ( !strcmp( $m, $_obfuscate_8Aяя ) )
                    {
                        return " selected";
                    }
                    return "";
                }
                function get_notempty_elements_count( $_obfuscate_Jrp1 )
                {
                    $_obfuscate_FQяя = 0;
                    $_obfuscate_7wяя = 0;
                    for ( ; $_obfuscate_7wяя < count( $_obfuscate_Jrp1 ); ++$_obfuscate_7wяя )
                    {
                        if ( trim( $_obfuscate_Jrp1[$_obfuscate_7wяя] ) != "" )
                        {
                            ++$_obfuscate_FQяя;
                        }
                    }
                    return $_obfuscate_FQяя;
                }
                if ( !isset( $_GET['dpt'] ) )
                {
                    $dpt = isset( $_POST['dpt'] ) ? $_POST['dpt'] : "";
                }
                else
                {
                    $dpt = $_GET['dpt'];
                }
                if ( !isset( $_GET['sub'] ) )
                {
                    if ( isset( $_POST['sub'] ) )
                    {
                        $sub = $_POST['sub'];
                    }
                }
                else
                {
                    $sub = $_GET['sub'];
                }
                if ( isset( $_GET['safemode'] ) )
                {
                    $smarty->assign( "safemode", ADMIN_SAFEMODE_WARNING );
                }
                $smarty->assign( "admin_main_content_template", "default.tpl.html" );
                $smarty->assign( "current_dpt", $dpt );
                if ( isset( $_SESSION['log'] ) )
                {
                    $smarty->assign( "admintempname", $_SESSION['log'] );
                }
                $q = db_query( "select categoryID, name, products_count, products_count_admin, parent, picture, subcount FROM ".CATEGORIES_TABLE." ORDER BY sort_order, name" );
                $fc = array( );
                $mc = array( );
                while ( $row = db_fetch_row( $q ) )
                {
                    $fc[( integer )$row['categoryID']] = $row;
                    $mc[( integer )$row['categoryID']] = ( integer )$row['parent'];
                }
                $admin_departments = array( );
                $includes_dir = opendir( "core/includes/admin" );
                $file_count = 0;
                while ( ( $inc_file = readdir( $includes_dir ) ) != false )
                {
                    if ( strstr( $inc_file, ".php" ) )
                    {
                        include( "core/includes/admin/".$inc_file );
                        ++$file_count;
                    }
                }
                closedir( $includes_dir );
                if ( defined( "UPDATEDESIGND" ) )
                {
                    $path = "core/cache";
                    $handled = opendir( $path );
                    while ( false !== ( $file = readdir( $handled ) ) )
                    {
                        if ( !( $file != ".htaccess" ) && !( $file != "." ) && !( $file != ".." ) )
                        {
                            unlink( $path."/".$file );
                        }
                    }
                    closedir( $handled );
                }
                $q = db_query( "select count(*) from ".ORDERS_TABLE." WHERE statusID=".( integer )CONF_NEW_ORDER_STATUS );
                $n = db_fetch_row( $q );
                $smarty->assign( "new_orders_count", $n[0] );
                $past = time( ) - CONF_ONLINE_EXPIRE * 60;
                $result = db_query( "select count(*) from ".ONLINE_TABLE." WHERE time > '".xescsql( $past )."'" );
                $u = db_fetch_row( $result );
                $smarty->assign( "online_users", $u[0] );
                if ( isset( $sub ) )
                {
                    $smarty->assign( "current_sub", $sub );
                }
                $smarty->assign( "admin_departments", $admin_departments );
                $smarty->assign( "admin_departments_count", $file_count );
                $smarty->display( "admin/index.tpl.html" );
            } while ( !( isset( $_REQUEST['eaction'] ) ? $_REQUEST['eaction'] : "" ) );
        }
    }
}
?>
 
  • Нравится
Реакции: kvl
Эээээ братец, да тебе надо сперва видимо подружится с html и css и проект поставить локально, зачем-же тратить время и на ftp ковыряться.
P.S. вот тебе совет по поводу смены цвета в боковых колонках.
Во первых там и не цвет вообще, а бэкграундовый фон, если заметил. Если не заметил (в IE )подведи курсор туда и нажми "Сохранить фон как". Таким образом ты поймешь как называется фон. Дальше мысль ухватываешь, что с названием фона делать ? ПРАВИЛЬНО искать его по всем .css файлам которые используются в проекте. А как узнать какие CSS файлы используются в проекте ??? Да очень просто, посмотреть результирующий html который выплёвывает движок, когда загружаешь проект через браузер. Посмотри исходный код и сразу увидишь, какие .css используются, вот в них и ищи этот фон.
А чтоб легче было понимать что и как поставь дополнение к FireFox. Называется FireBug. Потом правой кнопкой щелкнешь на элементе. Выбрать Анализировать элемент. Дальше поймешь...

Добавлено через 29 минут
Кто и как решал проблему с выводом брендов. Заранее спасибо.
Где то раньше на форуме видел
Вот из почты выдрал
Код:
---Цитата (сообщение от AlexAntre)---
В ShopCMS не реализован очень нужный функционал, а именно "Производители".
Вот простое решение:
1. Способ.
Идем Администрирование -> Настройки -> Управление блоками -> *Добавить блок*
Название блока - "Производители".
Содержание блока:
HTML:
---------
<center>
<form action="index.php" method="get">
<select name="searchstring" onChange="this.form.submit();" size="1">
<option value="">- Производители -</option>
<option value="Sony">Sony</option>
<option value="Panasonic">Panasonic</option>
<option value="Akai">Akai</option>
</select>
</form>
</center>
---------
Где Sony, Panasonic, Akai и т.д. меняем на бренды которые нужны.
2. Способ.
Почти тоже самое.
Создайте файл, например brand.tpl.html
Выше указанный код вставьте в этот файл.
Идем Администрирование -> Настройки -> Управление блоками -> *Добавить блок из файла*
В выпадающем списке находим наш файл brand.tpl.html
Пишем в Название блока - "Производители".
Далее - Сохранить.
Первый способ удобен тем, что прямо из админки можно редактировать нужные бренды. НО! Если удалите этот блок, то его уже не будет.
Второй способ удобен тем, что если вы удалите блок из админки, файл блока не удаляется. Но редактировать нужно будет именно сам файл, а потом заливать его по ftp.
Для того чтобы эти блоки работали *названия брендов ОБЯЗАТЕЛЬНО должны присутствовать в Названиях товара или в Кратком описании товара или в Полном описании товара*.
Например:
"Название товара" - Межгрядочный крокодило-пугатель (Lacoste) В скобках (можно и без скобок) указываем производителя. Для поисковиков это есть ГУД.
Или в "Полное описание товара" - в конце описания добавлять: Производитель: ВАЗ corporation.
Данный код работает через фунцию поиска.
Пользуйтесь.
---Конец цитаты---
 
Народ, подскажите, как картинки товаров с другого хоста вставить.

Ну т.е. у меня сайт к примеру на _http://host1.ru ии надо чтобы все картинки у товаров товаров брались с _http://host2.ru/img/ ?
 
Ни кто не сталкивался с проблемой переноса скрипта на хостинг, после всех изменений пишет Database connection problem!
 
Ни кто не сталкивался с проблемой переноса скрипта на хостинг, после всех изменений пишет Database connection problem!
1.делаешь дамп базы с локальной копии через phpmyadmin
2.переносишь файлы из папки с магазином на хостинг
3. есть файлик в блокноте правиш, путь core/config/ connect.inc.php имя базы данных, пароль и т.д.
4. создаешь базу данных на хостинге через phpmyadmin
5. экспортируешь дамп базы в базу которую создал на хостинге
6. заработало!

Добавлено через 3 минуты
PHP:
 <?php
#####################################
# ShopCMS: Скрипт интернет-магазина
# Copyright (c) by ADGroup
# http://shopcms.ru
#####################################
function gmts(){
 list($usec, $sec) = explode(" ", microtime());
 return ((float)$usec + (float)$sec);
}
function set_cookie($name_cookie, $value_cookie = "", $expires_cookie = "", $secure_cookie = false, $path_cookie = "", $domain_cookie = "", $httponly_cookie = false ){
 header("Set-Cookie: ".rawurlencode($name_cookie)."=".rawurlencode($value_cookie)
                                                     .(empty($expires_cookie) ? "" : "; expires=".gmdate("D, d-M-Y H:i:s", $expires_cookie)." GMT")
                                                     .(empty($path_cookie) ? "" : "; path=".$path_cookie)
                                                     .(empty($domain_cookie) ? "" : "; domain=".$domain_cookie)
                                                     .(!$secure_cookie ? "" : "; secure")
                                                     .(!$httponly_cookie ? "" : "; HttpOnly"), false);
}
define('SECURITY_STOP_MSG', 'License not found!');
define('SECURITY_NOLIC_MSG', 'Invalid license!');
define('ERROR_DB_INIT', 'Database connection problem!');
$sc_1 = gmts();
$sc_4 = 0;
$sc_8 = 0;
$gmc = 1;
if(!in_array(getenv('HTTP_HOST'), array("127.0.0.1", "localhost"))){
 if(file_exists("core/config/license.txt")){
  if(!in_array(md5(strtr($_SERVER['HTTP_HOST'], array("www." => ""))."sNLYnT"), explode("dlv1b", trim(file_get_contents("core/config/license.txt"))))){
   exit(SECURITY_NOLIC_MSG);
  }
 }else{
  exit(SECURITY_STOP_MSG);
 }
}
include("core/config/init.php");
include("core/includes/database/mysql.php");
$far_1 = array("core/config/connect.inc.php"
              ,"core/config/language_list.php"
              ,"core/classes/class.ajax.php"
              ,"core/classes/class.kcaptcha.php"
              ,"core/classes/class.virtual.paymentmodule.php"
              ,"core/classes/class.virtual.shippingratecalculator.php"
              ,"core/classes/class.xml2array.php");
$far_2 = glob("core/functions/*.php");
$far = array_merge($far_1,$far_2);
$cfar = count($far);
if(file_exists("core/cache/fcache.php")){
 include("core/cache/fcache.php");
}else{
 for($n=0; $n<$cfar; $n++){
  include($far[$n]);
 }
}
define('PATH_DELIMITER', isWindows() ? ';' : ':');
$_POST = xStripSlashesGPC($_POST);
$_GET = xStripSlashesGPC($_GET);
$_COOKIE = xStripSlashesGPC($_COOKIE);
if(!db_connect(DB_HOST, DB_USER, DB_PASS)){
 exit(ERROR_DB_INIT);
}
if(!db_select_db(DB_NAME)){
 exit(db_error());
}
settingDefineConstants();
include("core/config/headers.php");
include("core/config/error_handler.php");
define('SECURITY_EXPIRE', 60 * 60 * CONF_SECURITY_EXPIRE);
session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc");
session_set_cookie_params(SECURITY_EXPIRE);
session_start();
if(isset($_COOKIE['PHPSESSID'])){
 if(0 < SECURITY_EXPIRE){
  set_cookie("PHPSESSID", $_COOKIE['PHPSESSID'], time() + SECURITY_EXPIRE);
 }else{
  set_cookie("PHPSESSID", $_COOKIE['PHPSESSID']);
 }
}
//select a new language?
if(isset($_POST['lang'])){
 $_SESSION['current_language'] = $_POST['lang'];
}
//current language session variable
if(!isset($_SESSION['current_language']) || $_SESSION['current_language'] < 0 || count($lang_list) < $_SESSION['current_language']){
 $_SESSION['current_language'] = 0; //set default language
}
//include a language file
if(isset($lang_list[$_SESSION['current_language']]) && file_exists("core/languages/".$lang_list[$_SESSION['current_language']]->filename)){
 //include current language file
 include("core/languages/".$lang_list[$_SESSION['current_language']]->filename);
}else{
 exit("<font color=red><b>ERROR: Couldn't find language file!</b></font>");
}
if(isset($_GET['do'])){
 if(in_array($_GET['do'], array("captcha", "cart", "rss", "compare", "yandex", "invoice_jur", "invoice_phys", "stat", "get_file"))){
  include("core/includes/processor/".$_GET['do'].".php");
 }else{
  header("HTTP/1.0 404 Not Found");
  header("HTTP/1.1 404 Not Found");
  header("Status: 404 Not Found");
  exit(ERROR_404_HTML);
 }
}else{
 //init Smarty
 require("core/smarty/smarty.class.php");
 $smarty = new Smarty; //core smarty object
 $smarty_mail = new Smarty; //for e-mails
 if((integer)CONF_SMARTY_FORCE_COMPILE){ //this forces Smarty to recompile design each time someone runs index.php
  $smarty->force_compile = true;
  $smarty_mail->force_compile = true;
 }
 $relaccess = checklogin();
 //# of selected currency
 $current_currency = isset($_SESSION['current_currency']) ? $_SESSION['current_currency'] : CONF_DEFAULT_CURRENCY;
 $smarty->assign("current_currency", $current_currency);
 $q = db_query("select code, currency_value, where2show, currency_iso_3, Name, roundval from ".CURRENCY_TYPES_TABLE." where CID=".(integer)$current_currency);
 if($row = db_fetch_row($q)){
  $smarty->assign("currency_name", $row[0]);
  $selected_currency_details = $row; //for show_price() function
 }else{ //no currency found. In this case check is there any currency type in the database
  $q = db_query("select code, currency_value, where2show, roundval from ".CURRENCY_TYPES_TABLE);
  if($row = db_fetch_row($q)){
   $smarty->assign("currency_name", $row[0]);
   $selected_currency_details = $row; //for show_price() function
  }
 }
 $smarty->assign("currency_roundval", $selected_currency_details["roundval"]);
 //set $categoryID
 if(isset($_GET['categoryID']) || isset($_POST['categoryID'])){
  $categoryID = isset($_GET['categoryID']) ? $_GET['categoryID'] : $_POST['categoryID'];
  $categoryID = (integer)$categoryID;
 }
 // else $categoryID = 1;
 // set $productID
 if(isset($_GET['productID']) || isset($_POST['productID'])){
  $productID = isset($_GET['productID']) ? $_GET['productID'] : $_POST['productID'];
  $productID = (integer)$productID;
 }
 // ------------------------------------------------------------------------------------------------
 //and different vars...
 $register = isset($_POST['register'], $_GET['register']) ? $_GET['register'] : $_POST['register'];
 $update_details = isset($_POST['update_details'], $_GET['update_details']) ? $_GET['update_details'] : $_POST['update_details'];
 $order = isset($_POST['order'], $_GET['order']) ? $_GET['order'] : $_POST['order'];
 $order_without_billing_address = isset($_POST['order_without_billing_address'], $_GET['order_without_billing_address']) ? $_GET['order_without_billing_address'] : $_POST['order_without_billing_address'];
 $check_order = isset($_POST['check_order'], $_GET['check_order']) ? $_GET['check_order'] : $_POST['check_order'];
 $proceed_ordering = isset($_POST['proceed_ordering'], $_GET['proceed_ordering']) ? $_GET['proceed_ordering'] : $_POST['proceed_ordering'];
 $update_customer_info = isset($_POST['update_customer_info'], $_GET['update_customer_info']) ? $_GET['update_customer_info'] : $_POST['update_customer_info'];
 $show_aux_page = isset($_POST['show_aux_page'], $_GET['show_aux_page']) ? $_GET['show_aux_page'] : $_POST['show_aux_page'];
 if(isset($_GET['visit_history']) || isset($_POST['visit_history'])){
  $visit_history = 1;
 }
 if(isset($_GET['order_history']) || isset($_POST['order_history'])){
  $order_history = 1;
 }
 if(isset($_GET['address_book']) || isset($_POST['address_book'])){
  $address_book = 1;
 }
 $address_editor = isset($_POST['address_editor'], $_GET['address_editor']) ? $_GET['address_editor'] : $_POST['address_editor'];
 $add_new_address = isset($_POST['add_new_address'], $_GET['add_new_address']) ? $_GET['add_new_address'] : $_POST['add_new_address'];
 $contact_info = isset($_POST['contact_info'], $_GET['contact_info']) ? $_GET['contact_info'] : $_POST['contact_info'];
 if(isset($_GET['comparison_products']) || isset($_POST['comparison_products'])){
  $comparison_products = 1;
 }
 if(isset($_GET['register_authorization']) || isset($_POST['register_authorization'])){
  $register_authorization = 1;
 }
 if(isset($_GET['page_not_found']) || isset($_POST['page_not_found'])){
  $page_not_found = 1;
 }
 if(isset($_GET['news']) || isset($_POST['news'])){
  $news = 1;
 }
 if(isset($_GET['quick_register'])){
  $quick_register = 1;
 }
 if(isset($_GET['order2_shipping_quick'])){
  $order2_shipping_quick = 1;
 }
 if(isset($_GET['order3_billing_quick'])){
  $order3_billing_quick = 1;
 }
 if(isset($_GET['order2_shipping']) || isset($_POST['order2_shipping'])){
  $order2_shipping = 1;
 }
 if(isset($_GET['order3_billing']) || isset($_POST['order3_billing'])){
  $order3_billing = 1;
 }
 if(isset($_GET['change_address']) || isset($_POST['change_address'])){
  $change_address = 1;
 }
 if(isset($_GET['order4_confirmation']) || isset($_POST['order4_confirmation'])){
  $order4_confirmation = 1;
 }
 if(isset($_GET['order4_confirmation_quick']) || isset($_POST['order4_confirmation_quick'])){
  $order4_confirmation_quick = 1;
 }
 $order_detailed = isset($_POST['order_detailed'], $_GET['order_detailed']) ? $_GET['order_detailed'] : $_POST['order_detailed'];
 $p_order_detailed = isset($_POST['p_order_detailed'], $_GET['p_order_detailed']) ? $_GET['p_order_detailed'] : $_POST['p_order_detailed'];
 // ------------------------------------------------------------------------------------------------
 if(!isset($_SESSION['vote_completed'])){
  $_SESSION['vote_completed'] = array();
 }
 //checking for proper $offset init
 $offset = isset($_GET['offset']) ? $_GET['offset'] : 0;
 if($offset < 0 || $offset % CONF_PRODUCTS_PER_PAGE){
  $offset = 0;
 }
 if(isset($productID)){ //to rollout categories navigation table
  $q = db_query("select categoryID FROM ".PRODUCTS_TABLE." WHERE productID=".(integer)$productID);
  $r = db_fetch_row($q);
  if($r){
   $categoryID = $r[0];
  }
 }
 if(isset($_POST['change_design'])){
  $_SESSION['CUSTOM_DESIGN'] = $_POST['change_design'];
 }
 if(isset($_SESSION['CUSTOM_DESIGN'])){
  $smarty->template_dir = "core/tpl/user/".$_SESSION['CUSTOM_DESIGN'];
  define('TPL', $_SESSION['CUSTOM_DESIGN']);
 }else{
  $smarty->template_dir = "core/tpl/user/".CONF_DEFAULT_TEMPLATE;
  define('TPL', CONF_DEFAULT_TEMPLATE);
 }
 $smarty_mail->template_dir = "core/tpl/email";
 //fetch currency types from database
 $q = db_query("select CID, Name, code, currency_value, where2show, roundval, currency_iso_3 from ".CURRENCY_TYPES_TABLE." order by sort_order");
 $currencies = array();
 while($row = db_fetch_row($q)){
  $currencies[] = $row;
 }
 $smarty->assign("currencies", $currencies);
 $smarty->assign("currencies_count", count($currencies));
 $smarty->assign("lang_list", $lang_list);
 if(isset($_SESSION["current_language"])){
  $smarty->assign("current_language", $_SESSION["current_language"]);
 }
 if(isset($_SESSION["log"])){
  $smarty->assign("log", $_SESSION["log"]);
 }
 // - following vars are used as hidden in the customer survey form
 if(isset($categoryID)){
  $smarty->assign("categoryID", $categoryID);
 }
 if(isset($productID)){
  $smarty->assign("productID", $productID);
 }
 if(isset($_GET["currency"])){
  $smarty->assign("currency", $_GET["currency"]);
 }
 if(isset($_GET["user_details"])){
  $smarty->assign("user_details", $_GET["user_details"]);
 }
 if(isset($_GET["aux_page"])){
  $smarty->assign("aux_page", $_GET["aux_page"]);
 }
 if(isset($_GET["show_price"])){
  $smarty->assign("show_price", $_GET["show_price"]);
 }
 if(isset($_GET["searchstring"])){
  $smarty->hassign("searchstring", $_GET["searchstring"]);
 }
 if(isset($register)){
  $smarty->assign("register", $register);
 }
 if(isset($order)){
  $smarty->assign("order", $order);
 }
 if(isset($check_order)){
  $smarty->assign("check_order", $check_order);
 }
 //set defualt main_content template to homepage
 $smarty->assign("main_content_template", "home.tpl.html");
 //catalog
 $q = db_query("select categoryID, name, products_count, products_count_admin, parent, picture, subcount FROM ".CATEGORIES_TABLE." ORDER BY sort_order, name");
 $fc = array(); //parents
 $mc = array(); //parents
 while($row = db_fetch_row($q)){
  $fc[(integer)$row["categoryID"]] = $row;
  $mc[(integer)$row["categoryID"]] = (integer)$row["parent"];
 }
 $cats = catGetCategoryCListMin();
 //include all .php files from core/includes/ dir or from cache
 if((integer)CONF_SMARTY_FORCE_COMPILE){
  if(file_exists("core/cache/incache.php")){
   unlink("core/cache/incache.php");
  }
  if(file_exists("core/cache/fcache.php")){
   unlink("core/cache/fcache.php");
  }
  $fls = glob("core/includes/*.php");
  $cfls = count($fls);
  for($zc=0; $zc<$cfls; $zc++){
   include($fls[$zc]);
  }
 }else{
  if(file_exists("core/cache/incache.php")){
   include("core/cache/incache.php");
  }else{
   ob_start();
   for($n=0; $n<$cfar; $n++){
    readfile($far[$n]);
   }
   $_res = ob_get_contents();
   ob_end_clean();
   $fh = fopen("core/cache/fcache.php", 'w');
   fwrite($fh, $_res);
   fclose($fh);
   unset($_res);
   $fls = glob("core/includes/*.php");
   $cfls = count($fls);
   ob_start();
   for($i=0; $i<$cfls; $i++){
    readfile($fls[$i]);
   }
   $_res = ob_get_contents();
   ob_end_clean();
   $fh = fopen("core/cache/incache.php", 'w');
   fwrite($fh, $_res);
   fclose($fh);
   unset($_res);
   include("core/cache/incache.php");
  }
 }
 //show admin a administrative mode link
 if(isset($_SESSION["log"]) && in_array(100, $relaccess)){
  $smarty->assign("isadmin", "yes");
  $adminislog = true;
 }else{
  $adminislog = false;
 }
 $exploerrors = "";
 if(file_exists("install.php")){
  $exploerrors.= WARNING_DELETE_INSTALL_PHP;
 }
 if(!is_writable("core/cache")){
  exit(WARNING_WRONG_CHMOD);
 }
 $RGLBLS = @ini_get('register_globals');
 if(strtolower($RGLBLS)=="on" || (integer)$RGLBLS==1){
  exit(WARNING_REGISTER_GLOBALS);
 }
 $smarty->assign("exploerrors", $exploerrors);
 $tmpb = array();
 foreach($leftb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html" ){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty -> get_template_vars("allow_products_search")){
     $vallb["state"] = false;
    }
   }else{
    $vallb["state"] = false;
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 $smarty->assign("left_blocks",$tmpb);
 $smarty->assign("countlb",count($tmpb));
 $tmpb = array();
 foreach($rightb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html"){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty -> get_template_vars("allow_products_search")){
     $vallb["state"] = false;
    }else{
     $vallb["state"] = false;
    }
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 $smarty->assign("right_blocks",$tmpb);
 $smarty->assign("countrb",count($tmpb));
 $tmpb = array();
 foreach($topb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif ($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html"){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty->get_template_vars("allow_products_search")){
     $vallb["state"] = false;
    }
   }else{
    $vallb["state"] = false;
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 $smarty->assign("top_blocks",$tmpb);
 $smarty->assign("counttb",count($tmpb));
 $tmpb = array();
 foreach($bottomb as $keylb => $vallb){
  if($vallb["which"] == 1){
   if(!in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) && !in_array($aux_page["aux_page_ID"], $vallb["dpages"]) && !in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = false;
   }
  }elseif($vallb["which"] == 2){
   if(in_array($smarty->get_template_vars("main_content_template"), $vallb["pages"]) || in_array($aux_page["aux_page_ID"], $vallb["dpages"]) || in_array($categoryID, $vallb["categories"]) || in_array($productID, $vallb["products"])){
    $vallb["state"] = false;
   }
   if(in_array($categoryID, $vallb["categories"]) && !in_array($productID, $vallb["products"]) && $smarty->get_template_vars("main_content_template") == "product_detailed.tpl.html"){
    $vallb["state"] = true;
   }
  }
  if($vallb["admin"] == 1 && !$adminislog){
   $vallb["state"] = false;
  }
  if($vallb["state"] == true && $vallb["url"] == "filter.tpl.html"){
   if($smarty->get_template_vars("main_content_template") == true){
    if($smarty->get_template_vars("categories_to_select")){
     $vallb["state"] = false;
    }
    if(!$categoryID){
     $vallb["state"] = false;
    }
    if(!$smarty -> get_template_vars("allow_products_search")) $vallb["state"] = false;
   }else{
    $vallb["state"] = false;
   }
  }
  if($vallb["state"] == true){
   $tmpb[] = $vallb;
  }
 }
 $smarty->assign("bottom_blocks",$tmpb);
 $smarty->assign("countbb",count($tmpb));
 $sc_2 = getmicrotime();
 $sr_1 = $sc_2 - $sc_1 - $sc_8;
 //show Smarty output
 $smarty->display("index.tpl.html");
 if($adminislog && CONF_DISPLAY_INFO == 1){
  $sr3  = getmicrotime();
  $sr_2 = $sr3 - $sc_2;
  $sr_3 = $sr3 - $sc_1;
  $sr_1 = number_format(round($sr_1, 3), 3, '.', '');
  $sr_2 = number_format(round($sr_2, 3), 3, '.', '');
  $sr_3 = number_format(round($sr_3, 3), 3, '.', '');
  $sc_8 = number_format(round($sc_8, 3), 3, '.', '');
  $_SESSION['tgenexe']     = $sr_1;
  $_SESSION['tgencompile'] = $sr_2;
  $_SESSION['tgendb']      = $sc_8;
  $_SESSION['tgenall']     = $sr_3;
  $_SESSION['tgensql']     = $sc_4;
 }
}
?>

выводит белый экран, заливаю в бинарном режиме версия 3.1
админ.пхп выложеный Вами работает на ура!
 
??? admin.php ???

1.делаешь дамп базы с локальной копии через phpmyadmin
2.переносишь файлы из папки с магазином на хостинг
3. есть файлик в блокноте правиш, путь core/config/ connect.inc.php имя базы данных, пароль и т.д.
4. создаешь базу данных на хостинге через phpmyadmin
5. экспортируешь дамп базы в базу которую создал на хостинге
6. заработало!
Добавлено через 3 минуты
выводит белый экран, заливаю в бинарном режиме версия 3.1
админ.пхп выложеный Вами работает на ура!
Извините, но Evgeniy Artemyev выкладывал index.php, а admin.php товарища sabotagnik работает не совсем корректно. Если у Вас есть в наличии vip admin.php, поделитесь пожалуйста. Спасибо!
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху