[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.89 KiB
MD5: 683fc0bdb6213688601aa7d5f5b553b1

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.                 if (strstr(strtoupper($line), strtoupper($configuration_key_lookup))) {
  258.                   $found_line= 'true';
  259.                   $found = 'true';
  260.                   $show_file .= "<br />Line #<strong>{$line_num}</strong> : " . htmlspecialchars($line) . "<br />\n";
  261.                 } else {
  262.                   if ($cnt_lines >= 5) {
  263. //                    $show_file .= ' .';
  264.                     $cnt_lines=0;
  265.                   }
  266.                 }
  267.               }
  268.             }
  269.             $show_file .= '</td></tr></table>' . "\n";
  270.  
  271.             // if there was a match, show lines
  272.             if ($found_line == 'true') {
  273.               echo $show_file . '<table><tr><td>&nbsp;</td></tr></table>';
  274.             } // show file
  275.           }
  276.  
  277.         $show_products_type_layout = 'false';
  278.         $show_configuration_info = 'false';
  279.  
  280.       // if no matches in either databases or selected language directory give an error
  281.       if ($found == 'false') {
  282.         $messageStack->add(ERROR_CONFIGURATION_KEY_NOT_FOUND . ' ' . $_POST['configuration_key'], 'caution');
  283.       } else {
  284.         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";
  285.       }
  286.       break;
  287.  
  288.  
  289.  
  290.  
  291. ////////////////////////////////////////////////
  292.     case ('locate_configuration_key'):
  293.       if ($_POST['configuration_key'] == '') {
  294.         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
  295.         zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
  296.       }
  297.       $found = 'false';
  298.       $language_files_group = $_POST['language_files'];
  299.  
  300.       $check_configure = $db->Execute("select * from " . TABLE_CONFIGURATION . " where configuration_key='" . $_POST['configuration_key'] . "'");
  301.       if ($check_configure->RecordCount() < 1) {
  302.         $check_configure = $db->Execute("select * from " . TABLE_PRODUCT_TYPE_LAYOUT . " where configuration_key='" . $_POST['configuration_key'] . "'");
  303.         if ($check_configure->RecordCount() < 1) {
  304.  
  305.         } else {
  306.           $show_products_type_layout = 'true';
  307.           $show_configuration_info = 'true';
  308.           $found = 'true';
  309.         }
  310.       } else {
  311.         $show_products_type_layout = 'false';
  312.         $show_configuration_info = 'true';
  313.         $found = 'true';
  314.       }
  315.  
  316.       // if no matches in either databases or selected language directory give an error
  317.       if ($found == 'false') {
  318.         $messageStack->add(ERROR_CONFIGURATION_KEY_NOT_FOUND . ' ' . $_POST['configuration_key'], 'caution');
  319.       } else {
  320.         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";
  321.       }
  322.       break;
  323.  
  324. ///////////////////////////////////////////
  325.  
  326.  
  327.     } // eof: action
  328.  
  329. ?>
  330. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  331. <html <?php echo HTML_PARAMS; ?>>
  332. <head>
  333. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  334. <title><?php echo TITLE; ?></title>
  335. <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  336. <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
  337. <script language="javascript" src="includes/menu.js"></script>
  338. <script language="javascript" src="includes/general.js"></script>
  339.  
  340. <script type="text/javascript">
  341.   <!--
  342.   function init()
  343.   {
  344.     cssjsmenu('navbar');
  345.     if (document.getElementById)
  346.     {
  347.       var kill = document.getElementById('hoverJS');
  348.       kill.disabled = true;
  349.     }
  350.   }
  351.   // -->
  352. </script>
  353. </head>
  354. <body onLoad="init()">
  355. <!-- header //-->
  356. <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  357. <!-- header_eof //-->
  358.  
  359. <!-- body //-->
  360. <table border="0" width="100%" cellspacing="2" cellpadding="2">
  361.   <tr>
  362. <!-- body_text //-->
  363.     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  364.       <tr>
  365.         <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  366.         <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  367.       </tr>
  368.  
  369. <?php
  370. if ($show_configuration_info == 'true') {
  371.   $show_configuration_info = 'false';
  372. ?>
  373.       <tr><td colspan="2">
  374.         <table border="3" cellspacing="4" cellpadding="4">
  375.           <tr class="infoBoxContent">
  376.             <td colspan="2" class="pageHeading" align="center"><?php echo TABLE_CONFIGURATION_TABLE; ?></td>
  377.           </tr>
  378.           <tr>
  379.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_KEY; ?></td>
  380.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_key']; ?></td>
  381.           </tr>
  382.           <tr>
  383.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_TITLE; ?></td>
  384.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_title']; ?></td>
  385.           </tr>
  386.           <tr>
  387.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_DESCRIPTION; ?></td>
  388.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_description']; ?></td>
  389.           </tr>
  390. <?php
  391.   if ($show_products_type_layout == 'true') {
  392.     $check_configure_group = $db->Execute("select * from " . TABLE_PRODUCT_TYPES . " where type_id='" . $check_configure->fields['product_type_id'] . "'");
  393.   } else {
  394.     $check_configure_group = $db->Execute("select * from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id='" . $check_configure->fields['configuration_group_id'] . "'");
  395.   }
  396. ?>
  397. <?php
  398.   if ($show_products_type_layout == 'true') {
  399. ?>
  400.           <tr>
  401.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_GROUP; ?></td>
  402.             <td class="dataTableHeadingContentWhois"><?php echo 'Product Type Layout'; ?></td>
  403.           </tr>
  404. <?php } else { ?>
  405.           <tr>
  406.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_VALUE; ?></td>
  407.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_value']; ?></td>
  408.           </tr>
  409.           <tr>
  410.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_GROUP; ?></td>
  411.             <td class="dataTableHeadingContentWhois">
  412.             <?php
  413.               if ($check_configure_group->fields['configuration_group_id'] == '6') {
  414.                 $id_note = TEXT_INFO_CONFIGURATION_HIDDEN;
  415.               } else {
  416.                 $id_note = '';
  417.               }
  418.               echo 'ID#' . $check_configure_group->fields['configuration_group_id'] . ' ' . $check_configure_group->fields['configuration_group_title'] . $id_note;
  419.             ?>
  420.             </td>
  421.           </tr>
  422. <?php } ?>
  423.           <tr>
  424.             <td class="main" align="right" valign="middle">
  425.               <?php
  426.                 if ($show_products_type_layout == 'false' and ($check_configure->fields['configuration_id'] != 0 and $check_configure->fields['configuration_group_id'] != 6)) {
  427.                   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>';
  428.                 } else {
  429.                   $page= '';
  430.                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_SHIPPING')) $page .= 'shipping';
  431.                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_PAYMENT')) $page .= 'payment';
  432.                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_ORDER_TOTAL')) $page .= 'ordertotal';
  433.  
  434.                   if ($show_products_type_layout == 'true') {
  435.                     echo '<a href="' . zen_href_link(FILENAME_PRODUCT_TYPES) . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>';
  436.                   } else {
  437.                     if ($page != '') {
  438.                       echo '<a href="' . zen_href_link(FILENAME_MODULES, 'set=' . $page) . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>';
  439.                     } else {
  440.                       echo TEXT_INFO_NO_EDIT_AVAILABLE . '<br />';
  441.                     }
  442.                   }
  443.                 }
  444.               ?>
  445.               </td>
  446.             <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>
  447.           </tr>
  448.         </table>
  449.       </td></tr>
  450. <?php
  451. } else {
  452. ?>
  453.  
  454. <!-- bof: reset admin_activity_log -->
  455.       <tr>
  456.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  457.           <tr>
  458.             <td class=<?php echo ($_SESSION['reset_admin_activity_log'] == true ? "alert" : "main"); ?> align="left" valign="top"><?php echo TEXT_INFO_ADMIN_ACTIVITY_LOG; ?></td>
  459.             <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>
  460.           </tr>
  461.         </table></td>
  462.       </tr>
  463. <!-- eof: reset admin_activity_log -->
  464.  
  465. <!-- bof: update all option values sort orders -->
  466.       <tr>
  467.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  468.           <tr>
  469.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_ATTRIBUTES_FEATURES_UPDATES; ?></td>
  470.             <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>
  471.           </tr>
  472.         </table></td>
  473.       </tr>
  474. <!-- eof: update all option values sort orders -->
  475.  
  476. <!-- bof: update all products price sorter -->
  477.       <tr>
  478.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  479.           <tr>
  480.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_PRODUCTS_PRICE_SORTER_UPDATE; ?></td>
  481.             <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>
  482.           </tr>
  483.         </table></td>
  484.       </tr>
  485. <!-- eof: update all products price sorter -->
  486.  
  487. <!-- bof: reset all counter to 0 -->
  488.       <tr>
  489.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  490.           <tr><form name = "update_counter" action="<?php echo zen_href_link(FILENAME_STORE_MANAGER, 'action=update_counter', 'NONSSL'); ?>" method="post">
  491.           <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  492.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_COUNTER_UPDATE; ?></td>
  493.             <td class="main" align="left" valign="bottom"><?php echo zen_draw_input_field('new_counter'); ?></td>
  494.             <td class="main" align="right" valign="middle"><?php echo zen_image_submit('button_reset.gif', IMAGE_RESET); ?></td>
  495.           </form></tr>
  496.         </table></td>
  497.       </tr>
  498. <!-- eof: reset all counter to 0 -->
  499.  
  500. <!-- bof: reset all products_viewed to 0 -->
  501.       <tr>
  502.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  503.           <tr>
  504.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_PRODUCTS_VIEWED_UPDATE; ?></td>
  505.             <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>
  506.           </tr>
  507.         </table></td>
  508.       </tr>
  509. <!-- eof: reset all products_viewed to 0 -->
  510.  
  511. <!-- bof: reset all products_ordered to 0 -->
  512.       <tr>
  513.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  514.           <tr>
  515.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_PRODUCTS_ORDERED_UPDATE; ?></td>
  516.             <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>
  517.           </tr>
  518.         </table></td>
  519.       </tr>
  520. <!-- eof: reset all products_ordered to 0 -->
  521.  
  522. <!-- bof: reset all master_categories_id -->
  523.       <tr>
  524.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  525.           <tr>
  526.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_MASTER_CATEGORIES_ID_UPDATE; ?></td>
  527.             <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>
  528.           </tr>
  529.         </table></td>
  530.       </tr>
  531. <!-- eof: reset all master_categories_id -->
  532.  
  533. <!-- bof: reset test order to new order number -->
  534.       <tr>
  535.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  536.           <tr><form name = "update_orders" action="<?php echo zen_href_link(FILENAME_STORE_MANAGER, 'action=update_orders_id', 'NONSSL'); ?>" method="post">
  537.           <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  538.             <td class="main" align="left" valign="top"><?php echo TEXT_ORDERS_ID_UPDATE; ?></td>
  539.             <td class="main" align="left" valign="bottom">
  540.               <?php echo TEXT_OLD_ORDERS_ID . '&nbsp;&nbsp;&nbsp;' . zen_draw_input_field('old_orders_id'); ?>
  541.               <br /><?php echo TEXT_NEW_ORDERS_ID . '&nbsp;' . zen_draw_input_field('new_orders_id'); ?>
  542.             </td>
  543.             <td class="main" align="right" valign="middle"><?php echo zen_image_submit('button_reset.gif', IMAGE_RESET); ?></td>
  544.           </form></tr>
  545.           <tr>
  546.             <td colspan="4" class="main" align="left" valign="top"><?php echo TEXT_INFO_ORDERS_ID_UPDATE; ?></td>
  547.           </tr>
  548.         </table></td>
  549.       </tr>
  550. <!-- eof: reset test order to new order number -->
  551.  
  552. <!-- bof: Locate a configuration constant KEY -->
  553.       <tr>
  554.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  555.           <tr>
  556.             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_CONFIGURATION_CONSTANT; ?></td>
  557.           </tr>
  558.  
  559.           <tr><form name = "locate_configure_key" action="<?php echo zen_href_link(FILENAME_STORE_MANAGER, 'action=locate_configuration_key', 'NONSSL'); ?>" method="post">
  560.           <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  561.             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key'); ?></td>
  562.             <td class="main" align="center" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
  563.             <td class="main" width="60%">&nbsp;</td>
  564.           </form></tr>
  565.           <tr>
  566.             <td colspan="3" class="main" align="left" valign="top"><?php echo TEXT_INFO_CONFIGURATION_UPDATE; ?></td>
  567.           </tr>
  568.         </table></td>
  569.       </tr>
  570. <!-- eof: Locate a configuration constant KEY -->
  571.  
  572. <!-- bof: Locate a configuration constant -->
  573.       <tr>
  574.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  575.           <tr>
  576.             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_CONFIGURATION_CONSTANT_FILES; ?></td>
  577.           </tr>
  578.  
  579.           <tr><form name = "locate_configure" action="<?php echo zen_href_link(FILENAME_STORE_MANAGER, 'action=locate_configuration', 'NONSSL'); ?>" method="post">
  580.           <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  581.             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY_FILES . '</strong>' . '<br />' . zen_draw_input_field('configuration_key'); ?></td>
  582.             <td class="main" align="left" valign="middle">
  583.               <?php
  584.                 $language_lookup = array(array('id' => '0', 'text' => TEXT_LANGUAGE_LOOKUP_NONE),
  585.                                               array('id' => '1', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_LANGUAGE),
  586.                                               array('id' => '2', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_CATALOG),
  587.                                               array('id' => '3', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_CATALOG_TEMPLATE),
  588.                                               array('id' => '4', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ADMIN),
  589.                                               array('id' => '5', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ADMIN_LANGUAGE)
  590.                                                     );
  591. //                                              array('id' => '6', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ALL)
  592.  
  593.                 echo '<strong>' . TEXT_LANGUAGE_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('language_files', $language_lookup, '0');
  594.               ?>
  595.             </td>
  596.             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
  597.           </form></tr>
  598.           <tr>
  599.             <td colspan="4" class="main" align="left" valign="top"><?php echo TEXT_INFO_CONFIGURATION_UPDATE_FILES; ?></td>
  600.           </tr>
  601.         </table></td>
  602.       </tr>
  603. <!-- eof: Locate a configuration constant -->
  604.  
  605. <!-- bof: database table-optimize -->
  606.       <tr>
  607.         <td colspan="2"><br /><br /><table border="0" cellspacing="0" cellpadding="2">
  608.           <tr>
  609.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_DATABASE_OPTIMIZE; ?></td>
  610.             <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>
  611.           </tr>
  612.         </table></td>
  613.       </tr>
  614. <!-- eof: database table-optimize -->
  615.  
  616.  
  617. <!-- bof: clean_debug_files -->
  618.       <tr>
  619.         <td colspan="2"><br /><br /><table border="0" cellspacing="0" cellpadding="2">
  620.           <tr>
  621.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_PURGE_DEBUG_LOG_FILES; ?></td>
  622.             <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>'; ?>
  623.           </tr>
  624.         </table></td>
  625.       </tr>
  626. <!-- eof: clean_debug_files -->
  627.  
  628. <?php
  629. } // eof configure
  630. ?>
  631.       <tr>
  632.         <td colspan="2"><?php echo '<br />' . zen_draw_separator('pixel_black.gif', '100%', '2'); ?></td>
  633.       </tr>
  634.  
  635.  
  636.     </table></td>
  637. <!-- body_text_eof //-->
  638.   </tr>
  639. </table>
  640. <!-- body_eof //-->
  641.  
  642. <!-- footer //-->
  643. <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
  644. <!-- footer_eof //-->
  645. </body>
  646. </html>
  647. <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


cron