<?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\"> ";
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&checkbox_order_status_";
echo CONF_NEW_ORDER_STATUS;
echo "=1&dpt=custord&sub=new_orders&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&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&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&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&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&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&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&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&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&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&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&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&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&sub=setting&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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=&first_name=&last_name=&email=&groupID=0&fActState=-1&dpt=custord&sub=custlist&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&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&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&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&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']."&";
}
echo "change_category='+document.getElementById('parent').value+'&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 " ";
}
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( "\"", """, $n );
echo "\" style=\"width: 400px;\" class=\"textp\"> ";
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( "\"", """, $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\"> </td><td><img src=\"data/admin/plus.gif\" alt=\"\" style=\"cursor: pointer\" onclick=\"document.getElementById('MainForm').submit()\"></td><td> ";
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 " <a href=\"#\" onclick=\"confirmDeletep('".QUESTION_DELETE_PICTURE."','".ADMIN_FILE."?categoryID=".$_GET['categoryID']."&picture_remove=yes&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']."&";
}
echo "removeto_category='+document.getElementById('removeto').value+'&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 " ";
}
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> | <a\r\n";
if ( isset( $_GET['categoryID'] ) )
{
echo "href=\"".ADMIN_FILE."?dpt=catalog&sub=products_categories&categoryID=".$_GET['categoryID']."\"";
}
else if ( isset( $_GET['catslct'] ) )
{
echo "href=\"".ADMIN_FILE."?dpt=catalog&sub=products_categories&categoryID=".$_GET['catslct']."\"";
}
else
{
echo "href=\"".ADMIN_FILE."?dpt=catalog&sub=products_categories&categoryID=1\"";
}
echo " class=\"inl\">";
echo CANCEL_BUTTON;
echo "</a>\r\n";
if ( isset( $_GET['categoryID'] ) )
{
echo " | <a href=\"#\" class=\"inl\" onClick=\"confirmDeletep('".QUESTION_DELETE_CONFIRMATION."','".ADMIN_FILE."?categoryID=".str_replace( "\"", "", $_GET['categoryID'] )."&del=1&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\"> ";
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\"> ";
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\"> ";
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> | <a\r\n";
if ( isset( $_GET['categoryID'] ) )
{
echo "href=\"".ADMIN_FILE."?dpt=catalog&sub=products_categories&categoryID=".$_GET['categoryID']."\"";
}
else
{
echo "href=\"".ADMIN_FILE."?dpt=catalog&sub=products_categories&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 " | <a href=\"#\" class=\"inl\" onClick=\"confirmDeletep('".QUESTION_DELETE_CONFIRMATION."','".ADMIN_FILE."?categoryID=".str_replace( "\"", "", $_GET['categoryID'] )."&del=1&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\"> ";
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&checkbox_order_status_";
echo CONF_NEW_ORDER_STATUS;
echo "=1&dpt=custord&sub=new_orders&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&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&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&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&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&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&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&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&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&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&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&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&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&sub=setting&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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&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=&first_name=&last_name=&email=&groupID=0&fActState=-1&dpt=custord&sub=custlist&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&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&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&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&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 "&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 " ";
}
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'> ";
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 " ".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( "\"", """, $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%\"> </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> | ";
if ( $codep == 1 )
{
$wer = $_GET['categoryID'];
echo "<a href=\"".ADMIN_FILE.( "?categoryID=".$wer."&stepback=1&eaction=prod\" class=\"inl\">" ).CANCEL_BUTTON."</a>";
}
else
{
$wer = $_GET['productID'];
echo "<a href=\"".ADMIN_FILE.( "?productID=".$wer."&stepback=1&eaction=prod\" class=\"inl\">" ).CANCEL_BUTTON."</a>";
}
if ( $_GET['productID'] )
{
echo " | <a href=\"#\" onClick=\"confirmDeletep('".QUESTION_DELETE_CONFIRMATION."','".ADMIN_FILE."?productID=".$_GET['productID']."&delete=1&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\"> </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\"> </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&thumbnail=".$picture['photoID']."&productID=".$_GET['productID']."&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&enlarged=".$picture['photoID']."&productID=".$_GET['productID']."&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 "&photoID=";
echo $picture['photoID'];
echo "&delete_pictures=1&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( "\"", """, $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 "&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 "&remove_from_app_cat=";
echo $app_cat['categoryID'];
echo "&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 " ";
}
echo $cats[$i]['name'];
echo "</option>";
}
echo "</select> </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> | ";
if ( $codep == 1 )
{
$wer = $_GET['categoryID'];
echo "<a href=\"".ADMIN_FILE."?categoryID=".$wer."&stepback=1&eaction=prod\" class=\"inl\">".CANCEL_BUTTON."</a>";
}
else
{
$wer = $_GET['productID'];
echo "<a href=\"".ADMIN_FILE."?productID=".$wer."&stepback=1&eaction=prod\" class=\"inl\">".CANCEL_BUTTON."</a>";
}
if ( $_GET['productID'] )
{
echo " | <a href=\"#\" onClick=\"confirmDeletep('".QUESTION_DELETE_CONFIRMATION."','".ADMIN_FILE."?productID=".$_GET['productID']."&delete=1&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'] : "" ) );
}
}
}
?>