[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 store_manager.php

Zen Cart 源代码 store_manager.php




下载文件

文件名: store_manager.php
文件类型: PHP文件
文件大小: 30.94 KiB
MD5: 762618163ed8a83718c0806383745d3c

store_manager.php - 关闭高亮
  1. <?php
  2. /**
  3.  * @package admin
  4.  * @copyright Copyright 2003-2009 Zen Cart Development Team
  5.  * @copyright Portions Copyright 2003 osCommerce
  6.  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  7.  * @version $Id: store_manager.php 17906 2010-10-09 21:52:17Z wilt $
  8.  */
  9.  
  10.   require('includes/application_top.php');
  11.  
  12.   require(DIR_WS_CLASSES . 'currencies.php');
  13.   $currencies = new currencies();
  14.  
  15.   $languages = zen_get_languages();
  16.  
  17.   $products_filter = (isset($_GET['products_filter']) ? $_GET['products_filter'] : $products_filter);
  18.  
  19.   $action = (isset($_GET['action']) ? $_GET['action'] : '');
  20.  
  21.   $current_category_id = (isset($_GET['current_category_id']) ? $_GET['current_category_id'] : $current_category_id);
  22.  
  23.   $configuration_key_lookup = zen_db_prepare_input($_POST['configuration_key']);
  24.  
  25.   zen_set_time_limit(600);
  26.   switch($action) {
  27.  
  28. // clean out the admin_activity_log
  29.     case 'clean_admin_activity_log':
  30.       $db->Execute("delete from " . TABLE_ADMIN_ACTIVITY_LOG);
  31.       $db->Execute("optimize table " . TABLE_ADMIN_ACTIVITY_LOG);
  32.       $messageStack->add_session(SUCCESS_CLEAN_ADMIN_ACTIVITY_LOG, 'success');
  33.       unset($_SESSION['reset_admin_activity_log']);
  34.       zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  35.     break;
  36. // update all products in catalog
  37.     case ('update_all_products_attributes_sort_order'):
  38.       $all_products_attributes= $db->Execute("select p.products_id, pa.products_attributes_id from " .
  39.       TABLE_PRODUCTS . " p, " .
  40.       TABLE_PRODUCTS_ATTRIBUTES . " pa " . "
  41.      where p.products_id= pa.products_id"
  42.       );
  43.       while (!$all_products_attributes->EOF) {
  44.         $count++;
  45.         $product_id_updated .= ' - ' . $all_products_attributes->fields['products_id'] . ':' . $all_products_attributes->fields['products_attributes_id'];
  46.         zen_update_attributes_products_option_values_sort_order($all_products_attributes->fields['products_id']);
  47.         $all_products_attributes->MoveNext();
  48.       }
  49.       $messageStack->add_session(SUCCESS_PRODUCT_UPDATE_SORT_ALL, 'success');
  50.       $action='';
  51.       zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  52.       break;
  53.  
  54.     case ('update_all_products_price_sorter'):
  55.     // reset products_price_sorter for searches etc.
  56.     $sql = "select products_id from " . TABLE_PRODUCTS;
  57.     $update_prices = $db->Execute($sql);
  58.  
  59.     while (!$update_prices->EOF) {
  60.       zen_update_products_price_sorter($update_prices->fields['products_id']);
  61.       $update_prices->MoveNext();
  62.     }
  63.     $messageStack->add_session(SUCCESS_PRODUCT_UPDATE_PRODUCTS_PRICE_SORTER, 'success');
  64.     $action='';
  65.     zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  66.     break;
  67.  
  68.     case ('update_all_products_viewed'):
  69.     // reset products_viewed to 0
  70.     $sql = "update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed= '0'";
  71.     $update_viewed = $db->Execute($sql);
  72.  
  73.     $messageStack->add_session(SUCCESS_PRODUCT_UPDATE_PRODUCTS_VIEWED, 'success');
  74.     $action='';
  75.     zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  76.     break;
  77.  
  78.     case ('update_all_products_ordered'):
  79.     // reset products_ordered to 0
  80.     $sql = "update " . TABLE_PRODUCTS . " set products_ordered= '0'";
  81.     $update_viewed = $db->Execute($sql);
  82.  
  83.     $messageStack->add_session(SUCCESS_PRODUCT_UPDATE_PRODUCTS_ORDERED, 'success');
  84.     $action='';
  85.     zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  86.     break;
  87.  
  88.     case ('update_counter'):
  89.     // reset products_viewed to 0
  90.     $sql = "update " . TABLE_COUNTER . " set counter= '" . (int)$_POST['new_counter'] . "'";
  91.     $update_counter = $db->Execute($sql);
  92.  
  93.     $messageStack->add_session(SUCCESS_UPDATE_COUNTER . (int)$_POST['new_counter'], 'success');
  94.     $action='';
  95.     zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  96.     break;
  97.  
  98.     case ('optimize_db'):
  99.     // clean out unused space in database
  100.     $sql = "SHOW TABLE STATUS FROM `" . DB_DATABASE ."`";
  101.     $tables = $db->Execute($sql);
  102.     while(!$tables->EOF) {
  103.       $db->Execute("OPTIMIZE TABLE `" . $tables->fields['Name'] . "`");
  104.       $i++;
  105.       $tables->MoveNext();
  106.     }
  107.     $messageStack->add_session(SUCCESS_DB_OPTIMIZE . ' ' . $i, 'success');
  108.     $action='';
  109.     zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  110.     break;
  111.  
  112. // clean out old DEBUG logfiles
  113.     case 'clean_debug_files':
  114.       $purgeFolder = rtrim(DIR_FS_SQL_CACHE, '/');
  115.       $dir = dir($purgeFolder);
  116.       while ($file = $dir->read()) {
  117.         if ( ($file != '.') && ($file != '..') && substr($file, 0, 1) != '.') {
  118.           if (preg_match('/^(myDEBUG-|AIM_Debug_|SIM_Debug_|FirstData_Debug_|Linkpoint_Debug_|Paypal|paypal|ipn_|zcInstall).*\.log$/', $file)) {
  119.             if (is_writeable($purgeFolder . '/' . $file)) {
  120.               zen_remove($purgeFolder . '/' . $file);
  121.             }
  122.           }
  123.         }
  124.       }
  125.       $dir->close();
  126.       unset($dir);
  127.       $messageStack->add_session(SUCCESS_CLEAN_DEBUG_FILES, 'success');
  128.       zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  129.     break;
  130.  
  131.     case ('update_all_master_categories_id'):
  132.     // reset products master categories ID
  133.  
  134.     $sql = "select products_id from " . TABLE_PRODUCTS;
  135.     $check_products = $db->Execute($sql);
  136.     while (!$check_products->EOF) {
  137.  
  138.       $sql = "select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id='" . $check_products->fields['products_id'] . "'";
  139.       $check_category = $db->Execute($sql);
  140.  
  141.       $sql = "update " . TABLE_PRODUCTS . " set master_categories_id='" . $check_category->fields['categories_id'] . "' where products_id='" . $check_products->fields['products_id'] . "'";
  142.       $update_viewed = $db->Execute($sql);
  143.  
  144.       $check_products->MoveNext();
  145.     }
  146.  
  147.     $messageStack->add_session(SUCCESS_UPDATE_ALL_MASTER_CATEGORIES_ID, 'success');
  148.     $action='';
  149.     zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  150.     break;
  151.  
  152.     case ('update_orders_id'):
  153.       $old_orders_id = zen_db_prepare_input((int)$_POST['old_orders_id']);
  154.       $new_orders_id = zen_db_prepare_input((int)$_POST['new_orders_id']);
  155.  
  156.       $db->Execute("update " . TABLE_ORDERS . " set orders_id='" . $new_orders_id . "' where orders_id='" . $old_orders_id . "'");
  157.       $db->Execute("update " . TABLE_ORDERS_PRODUCTS . " set orders_id='" . $new_orders_id . "' where orders_id='" . $old_orders_id . "'");
  158.       $db->Execute("update " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " set orders_id='" . $new_orders_id . "' where orders_id='" . $old_orders_id . "'");
  159.       $db->Execute("update " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " set orders_id='" . $new_orders_id . "' where orders_id='" . $old_orders_id . "'");
  160.       $db->Execute("update " . TABLE_ORDERS_STATUS_HISTORY . " set orders_id='" . $new_orders_id . "' where orders_id='" . $old_orders_id . "'");
  161.       $db->Execute("update " . TABLE_ORDERS_TOTAL . " set orders_id='" . $new_orders_id . "' where orders_id='" . $old_orders_id . "'");
  162.     break;
  163.  
  164.     case ('locate_configuration'):
  165.       if ($_POST['configuration_key'] == '') {
  166.         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
  167.         zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  168.       }
  169.       $found = 'false';
  170.       $language_files_group = $_POST['language_files'];
  171.  
  172.           // build filenames to search
  173.           switch ($language_files_group) {
  174.             case (0): // none
  175.               $filename_listing = '';
  176.               break;
  177.             case (1): // all english.php files
  178.               $check_directory = array();
  179.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/';
  180.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $template_dir . '/' . $_SESSION['language'] . '/';
  181.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/' . $template_dir . '/';
  182.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/extra_definitions/';
  183.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/extra_definitions/' . $template_dir . '/';
  184.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/payment/';
  185.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/shipping/';
  186.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/order_total/';
  187.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/product_types/';
  188.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/';
  189.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/newsletters/';
  190.               break;
  191.             case (2): // all catalog /language/*.php
  192.               $check_directory = array();
  193.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES;
  194.               break;
  195.             case (3): // all catalog /language/english/*.php
  196.               $check_directory = array();
  197.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/';
  198.               break;
  199.             case (4): // all admin /language/*.php
  200.               $check_directory = array();
  201.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES;
  202.               break;
  203.             case (5): // all admin /language/english/*.php
  204.               // set directories and files names
  205.               $check_directory = array();
  206.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/';
  207.               break;
  208.             } // eof: switch
  209.  
  210.               // Check for new databases and filename in extra_datafiles directory
  211.  
  212.               for ($i = 0, $n = sizeof($check_directory); $i < $n; $i++) {
  213. //echo 'I SEE ' . $check_directory[$i] . '<br>';
  214.               $dir_check = $check_directory[$i];
  215.               $file_extension = '.php';
  216.  
  217.               if ($dir = @dir($dir_check)) {
  218.                 while ($file = $dir->read()) {
  219.                   if (!is_dir($dir_check . $file)) {
  220.                     if (substr($file, strrpos($file, '.')) == $file_extension) {
  221.                       $directory_array[] = $dir_check . $file;
  222.                     }
  223.                   }
  224.                 }
  225.                 if (sizeof($directory_array)) {
  226.                   sort($directory_array);
  227.                 }
  228.                 $dir->close();
  229.               }
  230.               }
  231.  
  232. // show path and filename
  233.           echo '<table border="0" width="100%" cellspacing="2" cellpadding="1" align="center">' . "\n";
  234.           echo '<tr><td>&nbsp;</td></tr>';
  235.           echo '<tr class="infoBoxContent"><td class="dataTableHeadingContent">' . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . 'Searching ' . sizeof($directory_array) . ' files ...' . '</td></tr></table>' . "\n\n";
  236.           echo '<tr><td>&nbsp;</td></tr>';
  237.  
  238. // check all files located
  239.           $file_cnt = 0;
  240.           for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) {
  241.             // build file content of matching lines
  242.             $file_cnt++;
  243.             $file = $directory_array[$i];
  244.             $show_file = '';
  245.             if (file_exists($file)) {
  246.               $show_file .= "\n" . '<table border="2" width="95%" cellspacing="2" cellpadding="1" align="center"><tr><td class="main">' . "\n";
  247.               $show_file .= '<tr class="infoBoxContent"><td class="dataTableHeadingContent">';
  248.               $show_file .= '<strong>' . $file . '</strong>';
  249.               $show_file .= '</td></tr>';
  250.               $show_file .= '<tr><td class="main">';
  251.               // put file into an array to be scanned
  252.               $lines = file($file);
  253.               $found_line = 'false';
  254.               // loop through the array, show line and line numbers
  255.               foreach ($lines as $line_num => $line) {
  256.                 $cnt_lines++;
  257. // BOM by zen-cart.cn
  258.                 if (strstr(GBcase($line,"upper"), GBcase($configuration_key_lookup,"upper"))) {
  259. // EOM by zen-cart.cn
  260.                   $found_line= 'true';
  261.                   $found = 'true';
  262.                   $show_file .= "<br />Line #<strong>{$line_num}</strong> : " . htmlspecialchars($line) . "<br />\n";
  263.                 } else {
  264.                   if ($cnt_lines >= 5) {
  265. //                    $show_file .= ' .';
  266.                     $cnt_lines=0;
  267.                   }
  268.                 }
  269.               }
  270.             }
  271.             $show_file .= '</td></tr></table>' . "\n";
  272.  
  273.             // if there was a match, show lines
  274.             if ($found_line == 'true') {
  275.               echo $show_file . '<table><tr><td>&nbsp;</td></tr></table>';
  276.             } // show file
  277.           }
  278.  
  279.         $show_products_type_layout = 'false';
  280.         $show_configuration_info = 'false';
  281.  
  282.       // if no matches in either databases or selected language directory give an error
  283.       if ($found == 'false') {
  284.         $messageStack->add(ERROR_CONFIGURATION_KEY_NOT_FOUND . ' ' . $_POST['configuration_key'], 'caution');
  285.       } else {
  286.         echo '<table width="90%" align="center"><tr><td>' . zen_draw_separator('pixel_black.gif', '100%', '2') . '</td></tr><tr><td>&nbsp;</td></tr></table>' . "\n";
  287.       }
  288.       break;
  289.  
  290.  
  291.  
  292.  
  293. ////////////////////////////////////////////////
  294.     case ('locate_configuration_key'):
  295.       if ($_POST['configuration_key'] == '') {
  296.         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
  297.         zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  298.       }
  299.       $found = 'false';
  300.       $language_files_group = $_POST['language_files'];
  301.  
  302.       $check_configure = $db->Execute("select * from " . TABLE_CONFIGURATION . " where configuration_key='" . $_POST['configuration_key'] . "'");
  303.       if ($check_configure->RecordCount() < 1) {
  304.         $check_configure = $db->Execute("select * from " . TABLE_PRODUCT_TYPE_LAYOUT . " where configuration_key='" . $_POST['configuration_key'] . "'");
  305.         if ($check_configure->RecordCount() < 1) {
  306.  
  307.         } else {
  308.           $show_products_type_layout = 'true';
  309.           $show_configuration_info = 'true';
  310.           $found = 'true';
  311.         }
  312.       } else {
  313.         $show_products_type_layout = 'false';
  314.         $show_configuration_info = 'true';
  315.         $found = 'true';
  316.       }
  317.  
  318.       // if no matches in either databases or selected language directory give an error
  319.       if ($found == 'false') {
  320.         $messageStack->add(ERROR_CONFIGURATION_KEY_NOT_FOUND . ' ' . $_POST['configuration_key'], 'caution');
  321.       } else {
  322.         echo '<table width="90%" align="center"><tr><td>' . zen_draw_separator('pixel_black.gif', '100%', '2') . '</td></tr><tr><td>&nbsp;</td></tr></table>' . "\n";
  323.       }
  324.       break;
  325.  
  326. ///////////////////////////////////////////
  327.  
  328.  
  329.     } // eof: action
  330.  
  331. ?>
  332. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  333. <html <?php echo HTML_PARAMS; ?>>
  334. <head>
  335. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  336. <title><?php echo TITLE; ?></title>
  337. <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  338. <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
  339. <script language="javascript" src="includes/menu.js"></script>
  340. <script language="javascript" src="includes/general.js"></script>
  341.  
  342. <script type="text/javascript">
  343.   <!--
  344.   function init()
  345.   {
  346.     cssjsmenu('navbar');
  347.     if (document.getElementById)
  348.     {
  349.       var kill = document.getElementById('hoverJS');
  350.       kill.disabled = true;
  351.     }
  352.   }
  353.   // -->
  354. </script>
  355. </head>
  356. <body onLoad="init()">
  357. <!-- header //-->
  358. <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  359. <!-- header_eof //-->
  360.  
  361. <!-- body //-->
  362. <table border="0" width="100%" cellspacing="2" cellpadding="2">
  363.   <tr>
  364. <!-- body_text //-->
  365.     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  366.       <tr>
  367.         <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  368.         <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  369.       </tr>
  370.  
  371. <?php
  372. if ($show_configuration_info == 'true') {
  373.   $show_configuration_info = 'false';
  374. ?>
  375.       <tr><td colspan="2">
  376.         <table border="3" cellspacing="4" cellpadding="4">
  377.           <tr class="infoBoxContent">
  378.             <td colspan="2" class="pageHeading" align="center"><?php echo TABLE_CONFIGURATION_TABLE; ?></td>
  379.           </tr>
  380.           <tr>
  381.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_KEY; ?></td>
  382.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_key']; ?></td>
  383.           </tr>
  384.           <tr>
  385.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_TITLE; ?></td>
  386.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_title']; ?></td>
  387.           </tr>
  388.           <tr>
  389.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_DESCRIPTION; ?></td>
  390.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_description']; ?></td>
  391.           </tr>
  392. <?php
  393.   if ($show_products_type_layout == 'true') {
  394.     $check_configure_group = $db->Execute("select * from " . TABLE_PRODUCT_TYPES . " where type_id='" . $check_configure->fields['product_type_id'] . "'");
  395.   } else {
  396.     $check_configure_group = $db->Execute("select * from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id='" . $check_configure->fields['configuration_group_id'] . "'");
  397.   }
  398. ?>
  399. <?php
  400.   if ($show_products_type_layout == 'true') {
  401. ?>
  402.           <tr>
  403.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_GROUP; ?></td>
  404.             <td class="dataTableHeadingContentWhois"><?php echo 'Product Type Layout'; ?></td>
  405.           </tr>
  406. <?php } else { ?>
  407.           <tr>
  408.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_VALUE; ?></td>
  409.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_value']; ?></td>
  410.           </tr>
  411.           <tr>
  412.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_GROUP; ?></td>
  413.             <td class="dataTableHeadingContentWhois">
  414.             <?php
  415.               if ($check_configure_group->fields['configuration_group_id'] == '6') {
  416.                 $id_note = TEXT_INFO_CONFIGURATION_HIDDEN;
  417.               } else {
  418.                 $id_note = '';
  419.               }
  420.               echo 'ID#' . $check_configure_group->fields['configuration_group_id'] . ' ' . $check_configure_group->fields['configuration_group_title'] . $id_note;
  421.             ?>
  422.             </td>
  423.           </tr>
  424. <?php } ?>
  425.           <tr>
  426.             <td class="main" align="right" valign="middle">
  427.               <?php
  428.                 if ($show_products_type_layout == 'false' and ($check_configure->fields['configuration_id'] != 0 and $check_configure->fields['configuration_group_id'] != 6)) {
  429.                   echo '<a href="' . zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $check_configure_group->fields['configuration_group_id'] . '&cID=' . $check_configure->fields['configuration_id']) . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>';
  430.                 } else {
  431.                   $page= '';
  432.                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_SHIPPING')) $page .= 'shipping';
  433.                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_PAYMENT')) $page .= 'payment';
  434.                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_ORDER_TOTAL')) $page .= 'ordertotal';
  435.  
  436.                   if ($show_products_type_layout == 'true') {
  437.                     echo '<a href="' . zen_href_link(FILENAME_PRODUCT_TYPES) . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>';
  438.                   } else {
  439.                     if ($page != '') {
  440.                       echo '<a href="' . zen_href_link(FILENAME_MODULES, 'set=' . $page) . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>';
  441.                     } else {
  442.                       echo TEXT_INFO_NO_EDIT_AVAILABLE . '<br />';
  443.                     }
  444.                   }
  445.                 }
  446.               ?>
  447.               </td>
  448.             <td class="main" align="center" valign="middle"><?php echo '<a href="' . zen_href_link(FILENAME_STORE_MANAGER) . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>
  449.           </tr>
  450.         </table>
  451.       </td></tr>
  452. <?php
  453. } else {
  454. ?>
  455.  
  456. <!-- bof: reset admin_activity_log -->
  457.       <tr>
  458.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  459.           <tr>
  460.             <td class=<?php echo ($_SESSION['reset_admin_activity_log'] == true ? "alert" : "main"); ?> align="left" valign="top"><?php echo TEXT_INFO_ADMIN_ACTIVITY_LOG; ?></td>
  461.             <td class="main" align="right" valign="middle"><?php echo '<a href="' . zen_href_link(FILENAME_STORE_MANAGER, 'action=clean_admin_activity_log') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>
  462.           </tr>
  463.         </table></td>
  464.       </tr>
  465. <!-- eof: reset admin_activity_log -->
  466.  
  467. <!-- bof: update all option values sort orders -->
  468.       <tr>
  469.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  470.           <tr>
  471.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_ATTRIBUTES_FEATURES_UPDATES; ?></td>
  472.             <td class="main" align="right" valign="middle"><?php echo '<a href="' . zen_href_link(FILENAME_STORE_MANAGER, 'action=update_all_products_attributes_sort_order') . '">' . zen_image_button('button_update.gif', IMAGE_UPDATE) . '</a>'; ?></td>
  473.           </tr>
  474.         </table></td>
  475.       </tr>
  476. <!-- eof: update all option values sort orders -->
  477.  
  478. <!-- bof: update all products price sorter -->
  479.       <tr>
  480.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  481.           <tr>
  482.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_PRODUCTS_PRICE_SORTER_UPDATE; ?></td>
  483.             <td class="main" align="right" valign="middle"><?php echo '<a href="' . zen_href_link(FILENAME_STORE_MANAGER, 'action=update_all_products_price_sorter') . '">' . zen_image_button('button_update.gif', IMAGE_UPDATE) . '</a>'; ?></td>
  484.           </tr>
  485.         </table></td>
  486.       </tr>
  487. <!-- eof: update all products price sorter -->
  488.  
  489. <!-- bof: reset all counter to 0 -->
  490.       <tr>
  491.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  492.           <tr><form name = "update_counter" action="<?php echo zen_href_link(FILENAME_STORE_MANAGER, 'action=update_counter', 'NONSSL'); ?>" method="post">
  493.           <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  494.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_COUNTER_UPDATE; ?></td>
  495.             <td class="main" align="left" valign="bottom"><?php echo zen_draw_input_field('new_counter'); ?></td>
  496.             <td class="main" align="right" valign="middle"><?php echo zen_image_submit('button_reset.gif', IMAGE_RESET); ?></td>
  497.           </form></tr>
  498.         </table></td>
  499.       </tr>
  500. <!-- eof: reset all counter to 0 -->
  501.  
  502. <!-- bof: reset all products_viewed to 0 -->
  503.       <tr>
  504.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  505.           <tr>
  506.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_PRODUCTS_VIEWED_UPDATE; ?></td>
  507.             <td class="main" align="right" valign="middle"><?php echo '<a href="' . zen_href_link(FILENAME_STORE_MANAGER, 'action=update_all_products_viewed') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>
  508.           </tr>
  509.         </table></td>
  510.       </tr>
  511. <!-- eof: reset all products_viewed to 0 -->
  512.  
  513. <!-- bof: reset all products_ordered to 0 -->
  514.       <tr>
  515.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  516.           <tr>
  517.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_PRODUCTS_ORDERED_UPDATE; ?></td>
  518.             <td class="main" align="right" valign="middle"><?php echo '<a href="' . zen_href_link(FILENAME_STORE_MANAGER, 'action=update_all_products_ordered') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>
  519.           </tr>
  520.         </table></td>
  521.       </tr>
  522. <!-- eof: reset all products_ordered to 0 -->
  523.  
  524. <!-- bof: reset all master_categories_id -->
  525.       <tr>
  526.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  527.           <tr>
  528.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_MASTER_CATEGORIES_ID_UPDATE; ?></td>
  529.             <td class="main" align="right" valign="middle"><?php echo '<a href="' . zen_href_link(FILENAME_STORE_MANAGER, 'action=update_all_master_categories_id') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>
  530.           </tr>
  531.         </table></td>
  532.       </tr>
  533. <!-- eof: reset all master_categories_id -->
  534.  
  535. <!-- bof: reset test order to new order number -->
  536.       <tr>
  537.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  538.           <tr><form name = "update_orders" action="<?php echo zen_href_link(FILENAME_STORE_MANAGER, 'action=update_orders_id', 'NONSSL'); ?>" method="post">
  539.           <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  540.             <td class="main" align="left" valign="top"><?php echo TEXT_ORDERS_ID_UPDATE; ?></td>
  541.             <td class="main" align="left" valign="bottom">
  542.               <?php echo TEXT_OLD_ORDERS_ID . '&nbsp;&nbsp;&nbsp;' . zen_draw_input_field('old_orders_id'); ?>
  543.               <br /><?php echo TEXT_NEW_ORDERS_ID . '&nbsp;' . zen_draw_input_field('new_orders_id'); ?>
  544.             </td>
  545.             <td class="main" align="right" valign="middle"><?php echo zen_image_submit('button_reset.gif', IMAGE_RESET); ?></td>
  546.           </form></tr>
  547.           <tr>
  548.             <td colspan="4" class="main" align="left" valign="top"><?php echo TEXT_INFO_ORDERS_ID_UPDATE; ?></td>
  549.           </tr>
  550.         </table></td>
  551.       </tr>
  552. <!-- eof: reset test order to new order number -->
  553.  
  554. <!-- bof: Locate a configuration constant KEY -->
  555.       <tr>
  556.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  557.           <tr>
  558.             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_CONFIGURATION_CONSTANT; ?></td>
  559.           </tr>
  560.  
  561.           <tr><form name = "locate_configure_key" action="<?php echo zen_href_link(FILENAME_STORE_MANAGER, 'action=locate_configuration_key', 'NONSSL'); ?>" method="post">
  562.           <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  563.             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key'); ?></td>
  564.             <td class="main" align="center" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
  565.             <td class="main" width="60%">&nbsp;</td>
  566.           </form></tr>
  567.           <tr>
  568.             <td colspan="3" class="main" align="left" valign="top"><?php echo TEXT_INFO_CONFIGURATION_UPDATE; ?></td>
  569.           </tr>
  570.         </table></td>
  571.       </tr>
  572. <!-- eof: Locate a configuration constant KEY -->
  573.  
  574. <!-- bof: Locate a configuration constant -->
  575.       <tr>
  576.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  577.           <tr>
  578.             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_CONFIGURATION_CONSTANT_FILES; ?></td>
  579.           </tr>
  580.  
  581.           <tr><form name = "locate_configure" action="<?php echo zen_href_link(FILENAME_STORE_MANAGER, 'action=locate_configuration', 'NONSSL'); ?>" method="post">
  582.           <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  583.             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY_FILES . '</strong>' . '<br />' . zen_draw_input_field('configuration_key'); ?></td>
  584.             <td class="main" align="left" valign="middle">
  585.               <?php
  586.                 $language_lookup = array(array('id' => '0', 'text' => TEXT_LANGUAGE_LOOKUP_NONE),
  587.                                               array('id' => '1', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_LANGUAGE),
  588.                                               array('id' => '2', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_CATALOG),
  589.                                               array('id' => '3', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_CATALOG_TEMPLATE),
  590.                                               array('id' => '4', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ADMIN),
  591.                                               array('id' => '5', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ADMIN_LANGUAGE)
  592.                                                     );
  593. //                                              array('id' => '6', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ALL)
  594.  
  595.                 echo '<strong>' . TEXT_LANGUAGE_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('language_files', $language_lookup, '0');
  596.               ?>
  597.             </td>
  598.             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
  599.           </form></tr>
  600.           <tr>
  601.             <td colspan="4" class="main" align="left" valign="top"><?php echo TEXT_INFO_CONFIGURATION_UPDATE_FILES; ?></td>
  602.           </tr>
  603.         </table></td>
  604.       </tr>
  605. <!-- eof: Locate a configuration constant -->
  606.  
  607. <!-- bof: database table-optimize -->
  608.       <tr>
  609.         <td colspan="2"><br /><br /><table border="0" cellspacing="0" cellpadding="2">
  610.           <tr>
  611.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_DATABASE_OPTIMIZE; ?></td>
  612.             <td class="main" align="right" valign="middle"><?php echo '<a href="' . zen_href_link(FILENAME_STORE_MANAGER, 'action=optimize_db') . '">' . zen_image_button('button_confirm.gif', IMAGE_UPDATE) . '</a>'; ?></td>
  613.           </tr>
  614.         </table></td>
  615.       </tr>
  616. <!-- eof: database table-optimize -->
  617.  
  618.  
  619. <!-- bof: clean_debug_files -->
  620.       <tr>
  621.         <td colspan="2"><br /><br /><table border="0" cellspacing="0" cellpadding="2">
  622.           <tr>
  623.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_PURGE_DEBUG_LOG_FILES; ?></td>
  624.             <td class="main" align="right" valign="middle"><?php echo zen_draw_form('clean_debug_files', FILENAME_STORE_MANAGER, 'action=clean_debug_files', 'post') . zen_image_submit('button_confirm.gif', IMAGE_UPDATE) . '</form>'; ?>
  625.           </tr>
  626.         </table></td>
  627.       </tr>
  628. <!-- eof: clean_debug_files -->
  629.  
  630. <?php
  631. } // eof configure
  632. ?>
  633.       <tr>
  634.         <td colspan="2"><?php echo '<br />' . zen_draw_separator('pixel_black.gif', '100%', '2'); ?></td>
  635.       </tr>
  636.  
  637.  
  638.     </table></td>
  639. <!-- body_text_eof //-->
  640.   </tr>
  641. </table>
  642. <!-- body_eof //-->
  643.  
  644. <!-- footer //-->
  645. <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
  646. <!-- footer_eof //-->
  647. </body>
  648. </html>
  649. <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


cron