[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 源代码 developers_tool_kit.php

Zen Cart 源代码 developers_tool_kit.php




下载文件

文件名: developers_tool_kit.php
文件类型: PHP文件
文件大小: 47.65 KiB
MD5: 92fb4e9dc4b629f6a403b7cc2b129be0

developers_tool_kit.php - 关闭高亮
  1. <?php
  2. /**
  3.  * @package admin
  4.  * @copyright Copyright 2003-2014 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 GIT: $Id: Author: DrByte  Tue Jun 3 2014 -0500 Modified in v1.5.3 $
  8.  */
  9.  
  10.   require('includes/application_top.php');
  11.  
  12.   $configuration_key_lookup = (isset($_POST['configuration_key'])) ? zen_db_prepare_input($_POST['configuration_key'], false) : '';
  13.   if (isset($_GET['configuration_key_lookup']) && $_GET['configuration_key_lookup'] != '') {
  14.     $configuration_key_lookup = zen_db_prepare_input(strtoupper($_GET['configuration_key_lookup']), false);
  15.     $_POST['configuration_key'] = strtoupper($_GET['configuration_key_lookup']);
  16.     $_POST['zv_files'] = 1;
  17.     $_POST['zv_filestype'] = $_POST['zv_filestype'];
  18.     $_POST['case_sensitive'] = $_POST['case_sensitive'];
  19.   }
  20.  
  21.   function getDirList ($dirName, $filetypes = 1) {
  22.     global $directory_array, $sub_dir_files;
  23. // add directory name to the sub_dir_files list;
  24.     $sub_dir_files[] = $dirName;
  25.     $d = @dir($dirName);
  26.     $file_extension = '.php';
  27.     if ($d) {
  28.       while($entry = $d->read()) {
  29.         if ($entry != "." && $entry != "..") {
  30.           if (is_dir($dirName."/".$entry)) {
  31.             if ($entry == 'CVS') {
  32.             // skip
  33.             } else {
  34.               getDirList($dirName."/".$entry);
  35.             }
  36.           } else {
  37.             if (preg_match('/\\' . $file_extension . '$/', $entry) > 0) {
  38. //echo 'I AM HERE 2 ' . $dirName."/".$entry . '<br>';
  39. //            $directory_array[] .= $dirName."/".$entry;
  40.             } else {
  41. //echo 'I AM HERE 3 ' . $dirName."/".$entry . '<br>';
  42.             }
  43.           }
  44.         }
  45.       }
  46.       $d->close();
  47.       unset($d);
  48.     }
  49.  
  50.     return $sub_dir_files;
  51.   }
  52.  
  53.   function zen_display_files($include_root = false, $filetypesincluded = 1) {
  54.     global $check_directory, $found, $configuration_key_lookup;
  55.     global $db;
  56.     $directory_array = array();
  57.     for ($i = 0, $n = sizeof($check_directory); $i < $n; $i++) {
  58. //echo 'I SEE ' . $check_directory[$i] . '<br>';
  59.  
  60.       $dir_check = $check_directory[$i];
  61.  
  62.       switch($filetypesincluded) {
  63.         case(1):
  64.           $file_extensions = array('.php');
  65.           break;
  66.         case(2):
  67.           $file_extensions = array('.php', '.css');
  68.           break;
  69.         case(3):
  70.           $file_extensions = array('.css');
  71.           break;
  72.         case(4):
  73.           $file_extensions = array('.html', '.txt');
  74.           break;
  75.         case(5):
  76.           $file_extensions = array('.js');
  77.           break;
  78.         default:
  79.           $file_extensions = array('.php', '.css');
  80.           break;
  81.       }
  82.  
  83.       if ($dir = @dir($dir_check)) {
  84.         while ($file = $dir->read()) {
  85.           if (!is_dir($dir_check . $file)) {
  86.             foreach($file_extensions as $extension) {
  87.               if (preg_match('/\\' . $extension . '$/', $file) > 0) {
  88.                 $directory_array[] = $dir_check . $file;
  89.               }
  90.             }
  91.           }
  92.         }
  93.         if (sizeof($directory_array)) {
  94.           sort($directory_array);
  95.         }
  96.         $dir->close();
  97.         unset($dir);
  98.       }
  99.     }
  100.  
  101.     if ($include_root == true) {
  102.       $original_array = $directory_array;
  103.       $root_array = array();
  104. // if not html/txt
  105.     if ($filetypesincluded != 3 && $filetypesincluded != 4 && $filetypesincluded != 5) {
  106.       $root_array[] = DIR_FS_CATALOG . 'index.php';
  107.       $root_array[] = DIR_FS_CATALOG . 'ipn_main_handler.php';
  108.       $root_array[] = DIR_FS_CATALOG . 'page_not_found.php';
  109.     }
  110.  
  111.       $root_array[] = DIR_FS_CATALOG . 'nddbc.html';
  112.       $new_array = array_merge($root_array, $original_array);
  113.       $directory_array = $new_array;
  114.     }
  115.  
  116. // show path and filename
  117.     if (strtoupper($configuration_key_lookup) == $configuration_key_lookup) {
  118.  
  119. //      $configuration_key_lookup = str_replace(array('"', "'"), '', $configuration_key_lookup);
  120.  
  121.       // if appears to be a constant ask about configuration table
  122.       $check_database = true;
  123.       $sql = "select * from " . TABLE_CONFIGURATION . " where configuration_key=:zcconfigkey:";
  124.       $sql = $db->BindVars($sql, ':zcconfigkey:', strtoupper($configuration_key_lookup), 'string');
  125.       $check_configure = $db->Execute($sql);
  126.       if ($check_configure->RecordCount() < 1) {
  127.         $sql = "select * from " . TABLE_PRODUCT_TYPE_LAYOUT . " where configuration_key=:zcconfigkey:";
  128.         $sql = $db->BindVars($sql, ':zcconfigkey:', strtoupper($configuration_key_lookup), 'string');
  129.         $check_configure = $db->Execute($sql);
  130.       }
  131.       if ($check_configure->RecordCount() >= 1) {
  132.         $links = '<strong><span class="alert">' . TEXT_SEARCH_DATABASE_TABLES . '</span></strong> ' . '<a href="' . zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, 'action=' . 'locate_configuration' . '&configuration_key_lookup=' . zen_output_string_protected($configuration_key_lookup)) . '">' . zen_output_string_protected($configuration_key_lookup) . '</a><br /><br />';
  133.       } else {
  134.         // do nothing
  135.       }
  136.     } else {
  137.       // don't ask about configuration table
  138.     }
  139. //die('I SEE ' . $check_configure->RecordCount() . ' vs ' . $check_database);
  140.     echo '<table border="0" width="100%" cellspacing="2" cellpadding="1" align="center">' . "\n";
  141.     if (isset($check_database ) && ($check_database == true && $check_configure->RecordCount() >= 1)) {
  142.       // only ask if found
  143.       echo '<tr><td>' . $links . '</td></tr>';
  144.     }
  145.     echo '<tr class="infoBoxContent"><td class="dataTableHeadingContent">' . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . TEXT_INFO_SEARCHING . sizeof($directory_array) . TEXT_INFO_FILES_FOR . zen_output_string_protected($configuration_key_lookup) . '</td></tr></table>' . "\n\n";
  146.     echo '<tr><td>&nbsp;</td></tr>';
  147.  
  148. // check all files located
  149.     $file_cnt = 0;
  150.     $cnt_found=0;
  151.     for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) {
  152.     // build file content of matching lines
  153.       $file_cnt++;
  154.       $file = $directory_array[$i];
  155. //echo 'I SEE ' . $directory_array[$i] . '<br>';
  156.       // clean path name
  157.       $file = preg_replace('~/+~', '/', $file);
  158.  
  159.       $show_file = '';
  160.       if (file_exists($file)) {
  161.         $show_file .= "\n" . '<table border="2" width="95%" cellspacing="2" cellpadding="1" align="center"><tr><td class="main">' . "\n";
  162.         $show_file .= '<tr class="infoBoxContent"><td class="dataTableHeadingContent">';
  163.         $show_file .= '<strong>' . $file . '</strong>';
  164.         $show_file .= '</td></tr>';
  165.         $show_file .= '<tr><td class="main">';
  166.  
  167.         // put file into an array to be scanned
  168.         $lines = file($file);
  169.         $found_line = 'false';
  170.         // loop through the array, show line and line numbers
  171.         $cnt_lines = 0;
  172.         foreach ($lines as $line_num => $line) {
  173.           $cnt_lines++;
  174.           if (isset($_POST['case_sensitive']) && $_POST['case_sensitive']) {
  175.             $check_case = strstr($line, $configuration_key_lookup);
  176.           } else {
  177.           // BOM by zen-cart.cn
  178.             $check_case = strstr(GBcase($line,"upper"), GBcase($configuration_key_lookup,"upper"));
  179.           // EOM by zen-cart.cn
  180.           }
  181.           if ($check_case) {
  182.             $found_line= 'true';
  183.             $found = 'true';
  184.             $cnt_found++;
  185.             $line_numpos = $line_num + 1;
  186.             $show_file .= "<br />Line #<strong>{$line_numpos}</strong> : " ;
  187.             //prevent db pwd from being displayed, for sake of security
  188.             $show_file .= (substr_count($line,"'DB_SERVER_PASSWORD'")) ? '***HIDDEN***' : htmlspecialchars($line, ENT_QUOTES, CHARSET);
  189.             $show_file .= "<br />\n";
  190.           } else {
  191.             if ($cnt_lines >= 5) {
  192. //            $show_file .= ' .';
  193.               $cnt_lines=0;
  194.             }
  195.           }
  196.         }
  197.       }
  198.       $show_file .= '</td></tr></table>' . "\n";
  199.  
  200.       // if there was a match, show lines
  201.       if ($found_line == 'true') {
  202.         echo $show_file . '<table><tr><td>&nbsp;</td></tr></table>';
  203.       } // show file
  204.     }
  205.     echo '<table border="0" width="100%" cellspacing="2" cellpadding="1" align="center"><tr class="infoBoxContent"><td class="dataTableHeadingContent">' . TEXT_INFO_MATCHES_FOUND . $cnt_found . '</td></tr></table>';
  206.   } // zen_display_files
  207.  
  208.   /* ==================================================================== */
  209.  
  210.   $action = (isset($_GET['action']) ? $_GET['action'] : '');
  211.   // don't do any 'action' if clicked on the Check for Updates button
  212.   if (isset($_GET['vcheck']) && $_GET['vcheck']=='yes') $action = '';
  213.  
  214.   $found= 'true';
  215.  
  216.   $search = (isset($_POST['search']) ? $_POST['search'] : '');
  217.   $flags =  (isset($_GET['v']) ? '&v=' : '') . (isset($_GET['s']) ? '&s=' . preg_replace('/[^a-z]/', '', $_GET['s']) : '');
  218.  
  219.   switch($action) {
  220.     case ('search_config_keys'):
  221.       // credits Benjamin Bellamy, torvista
  222.       $search_type = (isset($_GET['t']) && $_GET['t'] == 'all') ? 'all' : 'keyword';
  223.       if ($search_type == 'all') $search = '';
  224.       // The request that returns the configuration keys:
  225.       // Product-Type info is limited to products_type=1 (general)
  226.       $sql="(select configuration_id, configuration_key, c.configuration_group_id as configuration_group_id, configuration_group_title, configuration_title, configuration_description, (case when use_function = 'zen_cfg_password_display' then '********' else configuration_value end) as configuration_value, 'conf' as src
  227.         from " . TABLE_CONFIGURATION . " as c, " . TABLE_CONFIGURATION_GROUP . " as g
  228.         where c.configuration_group_id=g.configuration_group_id :cfgAndClause: " . (!isset($_GET['v']) ? ' and g.visible=1 ' : '') . " order by configuration_title, configuration_group_id)
  229.         union
  230.        (select configuration_id, configuration_key, p.product_type_id as configuration_group_id, type_name as configuration_group_title, configuration_title, configuration_description, configuration_value, 'type' as src
  231.         from ". TABLE_PRODUCT_TYPE_LAYOUT . " as p, " . TABLE_PRODUCT_TYPES . " as t
  232.         where p.product_type_id=t.type_id :typeRestriction: :ptypeAndClause: order by configuration_title, configuration_group_id)";
  233.       $searchClause = $cfgKeySearch = '';
  234.       // add search criteria
  235.       if (zen_not_null($search) && $search_type != 'all') {
  236.         $searchClause = "and (configuration_title like '%:search:%' or configuration_description like '%:search:%' :cfgKeySearch:)";
  237.         // support configuration_key constants
  238.         $cfgKeySearch = " or configuration_key = :zcconfigkey:";
  239.         if (strtoupper($search) == $search && preg_match('/^(%?).*(%?)$/', $search)) $cfgKeySearch = " or configuration_key like :zcconfigkey: ";
  240.       }
  241.       $cfgAndClause = $searchClause;
  242.       $ptypeAndClause = $searchClause;
  243.       $sql = $db->bindVars($sql, ':cfgAndClause:', $cfgAndClause, 'passthru');
  244.       $sql = $db->bindVars($sql, ':ptypeAndClause:', $ptypeAndClause, 'passthru');
  245.       $sql = $db->bindVars($sql, ':typeRestriction:', ' and t.type_id=1 ', 'passthru');
  246.       $sql = $db->BindVars($sql, ':cfgKeySearch:', $cfgKeySearch, 'passthru');
  247.       $sql = $db->BindVars($sql, ':zcconfigkey:', str_replace('_', '\_', strtoupper($search)), 'string');
  248.       $sql = $db->bindVars($sql, ':search:', $search, 'noquotestring');
  249.       if (isset($_GET['s']) && $_GET['s'] == 'k') $sql .= ' order by configuration_key';
  250.       // if nothing submitted to search for, force no results
  251.       if ($search_type != 'all' && $search == '') {
  252.         $sql = 'SELECT * from ' . TABLE_CONFIGURATION . ' where 2=3';
  253.       }
  254.       $keySearchResults = $db->Execute($sql);
  255.       if ($keySearchResults->RecordCount() == 0) {
  256.         $messageStack->add(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
  257.       }
  258.       break;
  259.  
  260.     case ('locate_configuration'):
  261.       if ($configuration_key_lookup == '') {
  262.         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
  263.         zen_redirect(zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT));
  264.       }
  265.       $found = 'false';
  266.       $zv_files_group = $_POST['zv_files'];
  267.  
  268.       $sql = "select *, (case when use_function = 'zen_cfg_password_display' then '********' else configuration_value end) as configuration_value from " . TABLE_CONFIGURATION . " where configuration_key=:zcconfigkey:";
  269.       $sql = $db->BindVars($sql, ':zcconfigkey:', $_POST['configuration_key'], 'string');
  270.       $check_configure = $db->Execute($sql);
  271.       if ($check_configure->RecordCount() < 1) {
  272.         $sql = "select * from " . TABLE_PRODUCT_TYPE_LAYOUT . " where configuration_key=:zcconfigkey:";
  273.         $sql = $db->BindVars($sql, ':zcconfigkey:', $_POST['configuration_key'], 'string');
  274.         $check_configure = $db->Execute($sql);
  275.         if ($check_configure->RecordCount() < 1) {
  276.           // build filenames to search
  277.           switch ($zv_files_group) {
  278.             case (0): // none
  279.               $filename_listing = '';
  280.               break;
  281.             case (1): // all english.php files
  282.               $check_directory = array();
  283.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES;
  284.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/';
  285.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $template_dir . '/' . $_SESSION['language'] . '/';
  286.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/' . $template_dir . '/';
  287.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/extra_definitions/';
  288.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/extra_definitions/' . $template_dir . '/';
  289.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/payment/';
  290.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/shipping/';
  291.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/order_total/';
  292.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/product_types/';
  293.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES;
  294.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/';
  295.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/newsletters/';
  296.               break;
  297.             case (2): // all catalog /language/*.php
  298.               $check_directory = array();
  299.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES;
  300.               break;
  301.             case (3): // all catalog /language/english/*.php
  302.               $check_directory = array();
  303.               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/';
  304.               break;
  305.             case (4): // all admin /language/*.php
  306.               $check_directory = array();
  307.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES;
  308.               break;
  309.             case (5): // all admin /language/english/*.php
  310.               // set directories and files names
  311.               $check_directory = array();
  312.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/';
  313.               break;
  314.             } // eof: switch
  315.  
  316.               // Check for new databases and filename in extra_datafiles directory
  317.  
  318.               zen_display_files();
  319.  
  320.         } else {
  321.           $show_products_type_layout = 'true';
  322.           $show_configuration_info = 'true';
  323.           $found = 'true';
  324.         }
  325.       } else {
  326.         $show_products_type_layout = 'false';
  327.         $show_configuration_info = 'true';
  328.         $found = 'true';
  329.       }
  330.  
  331.       break;
  332.  
  333.     case ('locate_function'):
  334.       if ($configuration_key_lookup == '') {
  335.         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
  336.         zen_redirect(zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT));
  337.       }
  338.       $found = 'false';
  339.       $zv_files_group = $_POST['zv_files'];
  340.  
  341.           // build filenames to search
  342.           switch ($zv_files_group) {
  343.             case (0): // none
  344.               $filename_listing = '';
  345.               break;
  346.             case (1): // all admin/catalog function files
  347.               $check_directory = array();
  348.               $check_directory[] = DIR_FS_CATALOG . DIR_WS_FUNCTIONS;
  349.               $check_directory[] = DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'extra_functions/';
  350.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_FUNCTIONS;
  351.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_FUNCTIONS . 'extra_functions/';
  352.               break;
  353.             case (2): // all catalog function files
  354.               $check_directory = array();
  355.               $check_directory[] = DIR_FS_CATALOG . DIR_WS_FUNCTIONS;
  356.               $check_directory[] = DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'extra_functions/';
  357.               break;
  358.             case (3): // all admin function files
  359.               $check_directory = array();
  360.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_FUNCTIONS;
  361.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_FUNCTIONS . 'extra_functions/';
  362.               break;
  363.             } // eof: switch
  364.  
  365.               // Check for new databases and filename in extra_datafiles directory
  366.  
  367.               zen_display_files();
  368.  
  369.       break;
  370.  
  371.     case ('locate_class'):
  372.       if ($configuration_key_lookup == '') {
  373.         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
  374.         zen_redirect(zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT));
  375.       }
  376.       $found = 'false';
  377.       $zv_files_group = $_POST['zv_files'];
  378.  
  379.           // build filenames to search
  380.           switch ($zv_files_group) {
  381.             case (0): // none
  382.               $filename_listing = '';
  383.               break;
  384.             case (1): // all admin/catalog classes files
  385.               $check_directory = array();
  386.               $check_directory[] = DIR_FS_CATALOG . DIR_WS_CLASSES;
  387.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_CLASSES;
  388.               break;
  389.             case (2): // all catalog classes files
  390.               $check_directory = array();
  391.               $check_directory[] = DIR_FS_CATALOG . DIR_WS_CLASSES;
  392.               break;
  393.             case (3): // all admin function files
  394.               $check_directory = array();
  395.               $check_directory[] = DIR_FS_ADMIN . DIR_WS_CLASSES;
  396.               break;
  397.             } // eof: switch
  398.  
  399.               // Check for new databases and filename in extra_datafiles directory
  400.  
  401.               zen_display_files();
  402.  
  403.       break;
  404.  
  405.     case ('locate_template'):
  406.       if ($configuration_key_lookup == '') {
  407.         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
  408.         zen_redirect(zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT));
  409.       }
  410.       $found = 'false';
  411.       $zv_files_group = $_POST['zv_files'];
  412.  
  413.           // build filenames to search
  414.           switch ($zv_files_group) {
  415.             case (0): // none
  416.               $filename_listing = '';
  417.               break;
  418.             case (1): // all template files
  419.               $check_directory = array();
  420.               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . 'template_default/templates' . '/';
  421.               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . 'template_default/sideboxes' . '/';
  422.               $check_directory[] = DIR_FS_CATALOG_MODULES;
  423.               $check_directory[] = DIR_FS_CATALOG_MODULES . 'sideboxes/';
  424.  
  425.               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . $template_dir . '/templates' . '/';
  426.               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . $template_dir . '/sideboxes' . '/';
  427.  
  428.               $sub_dir_files = array();
  429.               getDirList(DIR_FS_CATALOG_MODULES . 'pages');
  430.  
  431.               $check_dir = array_merge($check_directory, $sub_dir_files);
  432.               for ($i = 0, $n = sizeof($check_dir); $i < $n; $i++) {
  433.                 $check_directory[] = $check_dir[$i] . '/';
  434.               }
  435.  
  436.               break;
  437.             case (2): // all /templates files
  438.               $check_directory = array();
  439.               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . 'template_default/templates' . '/';
  440.               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . $template_dir . '/templates' . '/';
  441.               break;
  442.             case (3): // all sideboxes files
  443.               $check_directory = array();
  444.               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . 'template_default/sideboxes' . '/';
  445.               $check_directory[] = DIR_FS_CATALOG_MODULES . 'sideboxes/';
  446.               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . $template_dir . '/sideboxes' . '/';
  447.               break;
  448.             case (4): // all /pages files
  449.               $check_directory = array();
  450.               //$check_directory[] = DIR_FS_CATALOG_MODULES . 'pages/';
  451.               $sub_dir_files = array();
  452.               getDirList(DIR_FS_CATALOG_MODULES . 'pages');
  453.  
  454.               $check_dir = array_merge($check_directory, $sub_dir_files);
  455.               for ($i = 0, $n = sizeof($check_dir); $i < $n; $i++) {
  456.                 $check_directory[] = $check_dir[$i] . '/';
  457.               }
  458.  
  459.               break;
  460.             } // eof: switch
  461.  
  462.               // Check for new databases and filename in extra_datafiles directory
  463.  
  464.               zen_display_files();
  465.  
  466.       break;
  467.  
  468.  
  469. /// all files
  470.     case ('locate_all_files'):
  471.       $zv_check_root = false;
  472.       if ($configuration_key_lookup == '') {
  473.         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
  474.         zen_redirect(zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT));
  475.       }
  476.       $found = 'false';
  477.       $zv_files_group = $_POST['zv_files'];
  478.       $zv_filestype_group = $_POST['zv_filestype'];
  479. //echo 'settings: ' . '$zv_files_group: ' . $zv_files_group . '$zv_filestype_group: ' . $zv_filestype_group . '<br>';
  480. //echo 'Who am I template ' . $template_dir . ' sess lang ' . $_SESSION['language'];
  481.       switch ($zv_files_group) {
  482.         case (0): // none
  483.           $filename_listing = '';
  484.           break;
  485.         case (1): // all
  486.           $zv_check_root = true;
  487.           $filename_listing = '';
  488.  
  489.           $check_directory = array();
  490.  
  491. // get includes
  492.           $sub_dir_files = array();
  493.           getDirList(DIR_FS_CATALOG . DIR_WS_INCLUDES, $zv_filestype_group);
  494.           $sub_dir_files_catalog = $sub_dir_files;
  495.  
  496. // get email
  497.           $sub_dir_files = array();
  498.           getDirList(DIR_FS_EMAIL_TEMPLATES, $zv_filestype_group);
  499.           $sub_dir_files_email = $sub_dir_files;
  500.  
  501. // get admin
  502.           $sub_dir_files = array();
  503.           getDirList(DIR_FS_ADMIN, $zv_filestype_group);
  504.           $sub_dir_files_admin= $sub_dir_files;
  505.  
  506.           $check_dir = array_merge($sub_dir_files_catalog, $sub_dir_files_email, $sub_dir_files_admin);
  507.           for ($i = 0, $n = sizeof($check_dir); $i < $n; $i++) {
  508.             $check_directory[] = $check_dir[$i] . '/';
  509.           }
  510.           break;
  511.  
  512.         case (2): // all catalog
  513.           $zv_check_root = true;
  514.           $filename_listing = '';
  515.  
  516.           $check_directory = array();
  517.  
  518.           $sub_dir_files = array();
  519.           getDirList(DIR_FS_CATALOG . DIR_WS_INCLUDES, $zv_filestype_group);
  520.           $sub_dir_files_catalog = $sub_dir_files;
  521.  
  522. // get email
  523.           $sub_dir_files = array();
  524.           getDirList(DIR_FS_EMAIL_TEMPLATES, $zv_filestype_group);
  525.           $sub_dir_files_email = $sub_dir_files;
  526.  
  527.           $check_dir = array_merge($sub_dir_files_catalog, $sub_dir_files_email);
  528.           for ($i = 0, $n = sizeof($check_dir); $i < $n; $i++) {
  529.             $zv_add_dir= str_replace('//', '/', $check_dir[$i] . '/');
  530.             if (strstr($zv_add_dir, DIR_WS_ADMIN) == '') {
  531.               $check_directory[] = $zv_add_dir;
  532.             }
  533.           }
  534.           break;
  535.  
  536.         case (3): // all admin
  537.           $zv_check_root = false;
  538.           $filename_listing = '';
  539.  
  540.           $check_directory = array();
  541.  
  542.           $sub_dir_files = array();
  543.           getDirList(DIR_FS_ADMIN, $zv_filestype_group);
  544.           $sub_dir_files_admin = $sub_dir_files;
  545.  
  546.           $check_dir = array_merge($sub_dir_files_admin);
  547.           for ($i = 0, $n = sizeof($check_dir); $i < $n; $i++) {
  548.             $check_directory[] = $check_dir[$i] . '/';
  549.           }
  550.           break;
  551.         }
  552.           zen_display_files($zv_check_root, $zv_filestype_group);
  553.  
  554.       break;
  555.     } // eof: action
  556.  
  557.     // if no matches in either databases or selected language directory give an error
  558.     if ($found == 'false') {
  559.       $messageStack->add(ERROR_CONFIGURATION_KEY_NOT_FOUND . ' ' . zen_output_string_protected($configuration_key_lookup), 'caution');
  560.     } elseif (substr($action, 0, 7) == 'locate_') {
  561.       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";
  562.     }
  563.  
  564. ?>
  565. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  566. <html <?php echo HTML_PARAMS; ?>>
  567. <head>
  568. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  569. <title><?php echo TITLE; ?></title>
  570. <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  571. <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
  572. <script language="javascript" src="includes/menu.js"></script>
  573. <script language="javascript" src="includes/general.js"></script>
  574.  
  575. <script type="text/javascript">
  576.   <!--
  577.   function init()
  578.   {
  579.     cssjsmenu('navbar');
  580.     if (document.getElementById)
  581.     {
  582.       var kill = document.getElementById('hoverJS');
  583.       kill.disabled = true;
  584.     }
  585.   }
  586.   // -->
  587. </script>
  588. <style>.dataTableGroupChange {border-top: 2px solid black;}</style>
  589. </head>
  590. <body onLoad="init()">
  591. <!-- header //-->
  592. <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  593. <!-- header_eof //-->
  594.  
  595. <!-- body //-->
  596. <table border="0" width="100%" cellspacing="2" cellpadding="2">
  597.   <tr>
  598. <!-- body_text //-->
  599.     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  600.       <tr>
  601.         <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  602.         <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  603.       </tr>
  604.  
  605. <?php
  606. if (isset($show_configuration_info) && $show_configuration_info == 'true') {
  607.   $show_configuration_info = 'false';
  608. ?>
  609.       <tr><td colspan="2">
  610.         <table border="3" cellspacing="4" cellpadding="4">
  611.           <tr class="infoBoxContent">
  612.             <td colspan="2" class="pageHeading" align="center"><?php echo TABLE_CONFIGURATION_TABLE; ?></td>
  613.           </tr>
  614.           <tr>
  615.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_KEY; ?></td>
  616.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_key']; ?></td>
  617.           </tr>
  618.           <tr>
  619.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_TITLE; ?></td>
  620.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_title']; ?></td>
  621.           </tr>
  622.           <tr>
  623.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_DESCRIPTION; ?></td>
  624.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_description']; ?></td>
  625.           </tr>
  626. <?php
  627.   if ($show_products_type_layout == 'true') {
  628.     $check_configure_group = $db->Execute("select * from " . TABLE_PRODUCT_TYPES . " where type_id='" . (int)$check_configure->fields['product_type_id'] . "'");
  629.   } else {
  630.     $check_configure_group = $db->Execute("select * from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id='" . (int)$check_configure->fields['configuration_group_id'] . "'");
  631.   }
  632. ?>
  633.  
  634. <?php
  635.   if ($show_products_type_layout == 'true') {
  636. ?>
  637.           <tr>
  638.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_GROUP; ?></td>
  639.             <td class="dataTableHeadingContentWhois"><?php echo 'Product Type Layout'; ?></td>
  640.           </tr>
  641. <?php } else { ?>
  642.           <tr>
  643.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_VALUE; ?></td>
  644.             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_value']; ?></td>
  645.           </tr>
  646.           <tr>
  647.             <td class="infoBoxHeading"><?php echo TABLE_TITLE_GROUP; ?></td>
  648.             <td class="dataTableHeadingContentWhois">
  649.             <?php
  650.               $id_note = '';
  651.               if (isset($check_configure_group->fields['visible']) && $check_configure_group->fields['visible'] == '0') {
  652.                 $id_note = TEXT_INFO_CONFIGURATION_HIDDEN;
  653.               }
  654.               echo 'ID#' . $check_configure_group->fields['configuration_group_id'] . ' ' . $check_configure_group->fields['configuration_group_title'] . $id_note;
  655.             ?>
  656.             </td>
  657.           </tr>
  658. <?php } ?>
  659.           <tr>
  660.             <td class="main" align="center" valign="middle">
  661.               <?php
  662.                 if ($show_products_type_layout == 'false' and ($check_configure->fields['configuration_id'] != 0 and $check_configure_group->fields['visible'] != 0)) {
  663.                   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>';
  664.                 } else {
  665.                   $page= '';
  666.                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_SHIPPING')) $page .= 'shipping';
  667.                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_PAYMENT')) $page .= 'payment';
  668.                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_ORDER_TOTAL')) $page .= 'ordertotal';
  669.  
  670.                   if ($show_products_type_layout == 'true') {
  671.                     echo '<a href="' . zen_href_link(FILENAME_PRODUCT_TYPES) . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>';
  672.                   } else {
  673.                     if ($page != '') {
  674.                       echo '<a href="' . zen_href_link(FILENAME_MODULES, 'set=' . $page) . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>';
  675.                     } else {
  676.                       echo TEXT_INFO_NO_EDIT_AVAILABLE . '<br />';
  677.                     }
  678.                   }
  679.                 }
  680.               ?>
  681.               </td>
  682.             <td class="main" align="center" valign="middle"><?php echo '<a href="' . zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
  683.           </tr>
  684.           <tr class="infoBoxContent">
  685.             <td colspan="2" class="pageHeading" align="center">
  686. <?php
  687.       $links = '<br /><strong><span class="alert">' . TEXT_SEARCH_ALL_FILES . '</span></strong> ' . '<a href="' . zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, 'action=' . 'locate_all_files' . '&configuration_key_lookup=' . zen_output_string_protected($configuration_key_lookup) . '&zv_files=1') . '">' . zen_output_string_protected($configuration_key_lookup) . '</a><br />';
  688.       echo $links;
  689. ?>
  690.             </td>
  691.           </tr>
  692.         </table>
  693.       </td></tr>
  694. <?php
  695. } else {
  696. ?>
  697.  
  698. <?php
  699. // disabled and here for an example
  700. if (false) {
  701. ?>
  702. <!-- bof: update all products price sorter -->
  703.       <tr>
  704.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  705.           <tr>
  706.             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_PRODUCTS_PRICE_SORTER_UPDATE; ?></td>
  707.             <td class="main" align="right" valign="middle"><?php echo '<a href="' . zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, 'action=update_all_products_price_sorter') . '">' . zen_image_button('button_update.gif', IMAGE_UPDATE) . '</a>'; ?></td>
  708.           </tr>
  709.         </table></td>
  710.       </tr>
  711. <!-- eof: update all products price sorter -->
  712. <?php } ?>
  713.  
  714. <!-- bof: Locate a configuration constant -->
  715.       <tr>
  716.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  717.           <tr>
  718.             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_CONFIGURATION_CONSTANT; ?></td>
  719.           </tr>
  720.  
  721.           <tr><form name = "locate_configure" action="<?php echo zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, 'action=locate_configuration', 'NONSSL'); ?>" method="post"><?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  722.             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key', '', ' size="40" '); ?></td>
  723.             <td class="main" align="left" valign="middle">
  724.               <?php
  725.                 $za_lookup = array(array('id' => '0', 'text' => TEXT_LOOKUP_NONE),
  726.                                               array('id' => '1', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_LANGUAGE),
  727.                                               array('id' => '2', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_CATALOG),
  728.                                               array('id' => '3', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_CATALOG_TEMPLATE),
  729.                                               array('id' => '4', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ADMIN),
  730.                                               array('id' => '5', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ADMIN_LANGUAGE)
  731.                                                     );
  732. //                                              array('id' => '6', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ALL)
  733.  
  734.                 echo '<strong>' . TEXT_LANGUAGE_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_files', $za_lookup, '0');
  735.               ?>
  736.             </td>
  737.             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
  738.           </form></tr>
  739.           <tr>
  740.             <td colspan="4" class="main" align="left" valign="top"><?php echo TEXT_INFO_CONFIGURATION_UPDATE; ?></td>
  741.           </tr>
  742.         </table></td>
  743.       </tr>
  744. <!-- eof: Locate a configuration constant -->
  745.  
  746.  
  747. <!-- bof: search configuration keys -->
  748.       <tr>
  749.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  750.           <tr>
  751.             <td class="main" align="left" valign="middle"><?php echo SEARCH_CFG_KEYS_HEADING_TITLE; ?></td>
  752.           </tr>
  753.           <tr><form name="search_keys" action="<?php echo zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, 'action=search_config_keys' . $flags); ?>" method="post"><?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  754.             <td class="main" align="left" valign="bottom"><?php echo SEARCH_CFG_KEYS_SEARCH_BOX_TEXT . '<br />' . zen_draw_input_field('search', zen_output_string_protected($search), ' size="40" placeholder="' . SEARCH_CFG_KEYS_FORM_PLACEHOLDER . '"');?>
  755.             <input type="submit" value="<?php echo SEARCH_CFG_KEYS_FORM_BUTTON_SEARCH_SORTED_BY_GROUP;?>" title="<?php echo SEARCH_CFG_KEYS_FORM_BUTTON_SEARCH_SORTED_BY_GROUP;?>">
  756.             <input type="button" value="<?php echo SEARCH_CFG_KEYS_FORM_BUTTON_SEARCH_SORTED_BY_KEY;?>" onClick="document.search_keys.action='<?php echo zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, 'action=search_config_keys&s=k' . $flags) ?>';document.search_keys.submit();" title="<?php echo SEARCH_CFG_KEYS_FORM_BUTTON_SEARCH_SORTED_BY_KEY;?>">
  757.             <input type="button" value="<?php echo SEARCH_CFG_KEYS_FORM_BUTTON_VIEW_ALL;?>" onClick="document.search_keys.action='<?php echo zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, 'action=search_config_keys&t=all' . $flags) ?>';document.search_keys.submit();" title="<?php echo SEARCH_CFG_KEYS_FORM_BUTTON_VIEW_ALL;?>">
  758.             <input type="button" value="<?php echo SEARCH_CFG_KEYS_FORM_BUTTON_RESET;?>" onClick="document.search_keys.action='<?php echo zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, '') ?>';document.search_keys.submit();" title="<?php echo SEARCH_CFG_KEYS_FORM_BUTTON_RESET;?>">
  759.             </td>
  760.           </form>
  761.           </tr>
  762. <?php
  763. if ($action == 'search_config_keys') {
  764. ?>
  765.           <tr>
  766.             <td class="main" align="left" valign="middle"><?php echo ($keySearchResults->RecordCount() > 0) ? $keySearchResults->RecordCount() . ' ' .SEARCH_CFG_KEYS_FOUND_KEYS : SEARCH_CFG_KEYS_NOT_FOUND_KEYS; ?></td>
  767.           </tr>
  768. <?php } ?>
  769.         </table>
  770. <?php
  771.   if ($action == 'search_config_keys' && $keySearchResults->RecordCount() > 0)
  772.   {
  773.     $last_group = $keySearchResults->fields['configuration_group_id'];
  774.     $groupChanged = FALSE;
  775. ?>
  776.     <table width="100%" cellspacing="2" cellpadding="3" style="padding:5px 10px;">
  777.       <tr class="dataTableHeadingRow">
  778.         <td class="dataTableHeadingContent"><?php echo SEARCH_CFG_KEYS_TABLE_SECTION; ?></td>
  779.         <td class="dataTableHeadingContent" align="center"><?php echo SEARCH_CFG_KEYS_TABLE_GROUP; ?></td>
  780.         <td class="dataTableHeadingContent"><?php echo SEARCH_CFG_KEYS_TABLE_TITLE; ?></td>
  781.         <td class="dataTableHeadingContent"><?php echo SEARCH_CFG_KEYS_TABLE_DESCRIPTION; ?></td>
  782.         <td class="dataTableHeadingContent"><?php echo SEARCH_CFG_KEYS_TABLE_KEY_NAME; ?></td>
  783.         <td class="dataTableHeadingContent"><?php echo SEARCH_CFG_KEYS_TABLE_VALUE; ?></td>
  784.         <td class="dataTableHeadingContent" align="center"><?php echo SEARCH_CFG_KEYS_TABLE_EDIT; ?></td>
  785.       </tr>
  786. <?php
  787.     while (!$keySearchResults->EOF)
  788.     {
  789.       if($keySearchResults->fields['src']=='type')
  790.       {
  791.         $section = 'Product Types';
  792.         $editlink = zen_href_link(FILENAME_PRODUCT_TYPES, 'ptID=' .  $keySearchResults->fields['configuration_group_id'] . '&amp;cID=' . $keySearchResults->fields['configuration_id'] . '&amp;action=layout_edit');
  793.         $viewlink = zen_href_link(FILENAME_PRODUCT_TYPES, 'ptID=' .  $keySearchResults->fields['configuration_group_id'] . '&amp;cID=' . $keySearchResults->fields['configuration_id'] . '&amp;action=layout');
  794.       }
  795.       else if($keySearchResults->fields['src']=='conf')
  796.       {
  797.         $section = 'Configuration';
  798.         $editlink = zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $keySearchResults->fields['configuration_group_id'] . '&amp;cID=' . $keySearchResults->fields['configuration_id'] . '&amp;action=edit');
  799.         $viewlink = zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $keySearchResults->fields['configuration_group_id'] . '&amp;cID=' . $keySearchResults->fields['configuration_id']);
  800.       }
  801.       else
  802.       {
  803.         $editlink = "";
  804.         $viewlink = "";
  805.       }
  806.       if (!strpos($flags, 's=k') && $last_group != $keySearchResults->fields['configuration_group_id']) $groupChanged = TRUE;
  807.       $last_group = $keySearchResults->fields['configuration_group_id'];
  808.       $tdClass = 'dataTableContent' . ($groupChanged ? ' dataTableGroupChange' : '');
  809. ?>
  810.       <tr class="dataTableRow" valign="top">
  811.         <td class="<?php echo $tdClass;?>"><?php echo $section;?></td>
  812.         <td class="<?php echo $tdClass;?>" align="center"><?php echo $keySearchResults->fields['configuration_group_title'];?></td>
  813.         <td class="<?php echo $tdClass;?>"><?php echo $keySearchResults->fields['configuration_title'];?></td>
  814.  
  815.         <td class="<?php echo $tdClass;?>"><?php echo $keySearchResults->fields['configuration_description'];?> &nbsp;</td>
  816.         <td class="<?php echo $tdClass;?>"><?php echo $keySearchResults->fields['configuration_key'];?></td>
  817.         <td class="<?php echo $tdClass;?>"><?php echo $keySearchResults->fields['configuration_value']; // implode("<br />\n", preg_split("/[\s,.]+/", $configuration->fields['configuration_value']))?></td>
  818.         <td class="<?php echo $tdClass;?>" align="center" onclick="document.location.href='<?php echo $viewlink;?>'"><a href="<?php echo $editlink;?>"><?php echo zen_image(DIR_WS_IMAGES . 'icon_edit.gif', IMAGE_EDIT);?></a></td>
  819.       </tr>
  820. <?php
  821.       $groupChanged = FALSE;
  822.       $keySearchResults->MoveNext();
  823.     }
  824. ?>
  825.     </table>
  826. <?php
  827.   }
  828. ?>
  829.         </td>
  830.       </tr>
  831. <!-- eof: search configuration keys -->
  832.  
  833.  
  834. <!-- bof: Locate a function -->
  835.       <tr>
  836.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  837.           <tr>
  838.             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_FUNCTION_CONSTANT; ?></td>
  839.           </tr>
  840.  
  841.           <tr><form name = "locate_function" action="<?php echo zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, 'action=locate_function', 'NONSSL'); ?>" method="post"><?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  842.             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key', '', ' size="40" '); ?></td>
  843.             <td class="main" align="left" valign="middle">
  844.               <?php
  845.                 $za_lookup = array(array('id' => '1', 'text' => TEXT_FUNCTION_LOOKUP_CURRENT),
  846.                                               array('id' => '2', 'text' => TEXT_FUNCTION_LOOKUP_CURRENT_CATALOG),
  847.                                               array('id' => '3', 'text' => TEXT_FUNCTION_LOOKUP_CURRENT_ADMIN)
  848.                                                     );
  849.  
  850.                 echo '<strong>' . TEXT_FUNCTION_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_files', $za_lookup, 1);
  851.               ?>
  852.             </td>
  853.             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
  854.           </form></tr>
  855.         </table></td>
  856.       </tr>
  857. <!-- eof: Locate a function -->
  858.  
  859. <!-- bof: Locate a class -->
  860.       <tr>
  861.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  862.           <tr>
  863.             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_CLASS_CONSTANT; ?></td>
  864.           </tr>
  865.  
  866.           <tr><form name = "locate_class" action="<?php echo zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, 'action=locate_class', 'NONSSL'); ?>" method="post"><?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  867.             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key', '', ' size="40" '); ?></td>
  868.             <td class="main" align="left" valign="middle">
  869.               <?php
  870.                 $za_lookup = array(array('id' => '1', 'text' => TEXT_CLASS_LOOKUP_CURRENT),
  871.                                               array('id' => '2', 'text' => TEXT_CLASS_LOOKUP_CURRENT_CATALOG),
  872.                                               array('id' => '3', 'text' => TEXT_CLASS_LOOKUP_CURRENT_ADMIN)
  873.                                                     );
  874.  
  875.                 echo '<strong>' . TEXT_CLASS_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_files', $za_lookup, 1);
  876.               ?>
  877.             </td>
  878.             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
  879.           </form></tr>
  880.         </table></td>
  881.       </tr>
  882. <!-- eof: Locate a class -->
  883.  
  884. <!-- bof: Locate template files -->
  885.       <tr>
  886.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  887.           <tr>
  888.             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_TEMPLATE_CONSTANT; ?></td>
  889.           </tr>
  890.  
  891.           <tr><form name = "locate_template" action="<?php echo zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, 'action=locate_template', 'NONSSL'); ?>" method="post"><?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  892.             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key', '', ' size="40" '); ?></td>
  893.             <td class="main" align="left" valign="middle">
  894.               <?php
  895.                 $za_lookup = array(array('id' => '1', 'text' => TEXT_TEMPLATE_LOOKUP_CURRENT),
  896.                                               array('id' => '2', 'text' => TEXT_TEMPLATE_LOOKUP_CURRENT_TEMPLATES),
  897.                                               array('id' => '3', 'text' => TEXT_TEMPLATE_LOOKUP_CURRENT_SIDEBOXES),
  898.                                               array('id' => '4', 'text' => TEXT_TEMPLATE_LOOKUP_CURRENT_PAGES)
  899.                                                     );
  900.  
  901.                 echo '<strong>' . TEXT_TEMPLATE_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_files', $za_lookup, 1);
  902.               ?>
  903.             </td>
  904.             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
  905.           </form></tr>
  906.         </table></td>
  907.       </tr>
  908. <!-- eof: Locate template Files -->
  909.  
  910.  
  911. <!-- bof: Locate all files -->
  912.       <tr>
  913.         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
  914.           <tr>
  915.             <td colspan="4" class="main" align="left" valign="middle"><?php echo TEXT_ALL_FILES_CONSTANT; ?></td>
  916.           </tr>
  917.  
  918.           <tr><form name = "locate_all_files" action="<?php echo zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT, 'action=locate_all_files', 'NONSSL'); ?>" method="post"><?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
  919.             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key', '', ' size="40" '); ?></td>
  920.             <td class="main" align="left" valign="middle">
  921.               <?php
  922.                 $za_lookup = array(array('id' => '1', 'text' => TEXT_ALL_FILES_LOOKUP_CURRENT),
  923.                                               array('id' => '2', 'text' => TEXT_ALL_FILES_LOOKUP_CURRENT_CATALOG),
  924.                                               array('id' => '3', 'text' => TEXT_ALL_FILES_LOOKUP_CURRENT_ADMIN)
  925.                                                     );
  926.  
  927.                 echo '<strong>' . TEXT_ALL_FILES_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_files', $za_lookup, 1);
  928.               ?>
  929.             </td>
  930.             <td class="main" align="left" valign="middle">
  931.               <?php
  932.                 $za_lookup_filetype = array(
  933.                                               array('id' => '1', 'text' => TEXT_ALL_FILES_LOOKUP_PHP),
  934.                                               array('id' => '2', 'text' => TEXT_ALL_FILES_LOOKUP_PHPCSS),
  935.                                               array('id' => '3', 'text' => TEXT_ALL_FILES_LOOKUP_CSS),
  936.                                               array('id' => '4', 'text' => TEXT_ALL_FILES_LOOKUP_HTMLTXT),
  937.                                               array('id' => '5', 'text' => TEXT_ALL_FILES_LOOKUP_JS)
  938.                                                     );
  939.  
  940.                 echo '<strong>' . TEXT_ALL_FILESTYPE_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_filestype', $za_lookup_filetype, 1);
  941.                 echo '<label for="locate-cs">' . TEXT_CASE_SENSITIVE . ' </label>' . zen_draw_checkbox_field('case_sensitive', true, false, '', 'id="locate-cs"');
  942.               ?>
  943.             </td>
  944.             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
  945.           </form></tr>
  946.         </table></td>
  947.       </tr>
  948. <!-- eof: Locate all files -->
  949.  
  950. <?php
  951. } // eof configure
  952. ?>
  953.       <tr>
  954.         <td colspan="2"><?php echo '<br />' . zen_draw_separator('pixel_black.gif', '100%', '2'); ?></td>
  955.       </tr>
  956.  
  957.  
  958.     </table></td>
  959. <!-- body_text_eof //-->
  960.   </tr>
  961. </table>
  962. <!-- body_eof //-->
  963.  
  964. <!-- footer //-->
  965. <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
  966. <!-- footer_eof //-->
  967. </body>
  968. </html>
  969. <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


cron