[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.58 KiB
MD5: 959bff97ac4cd36c65bad24406a1196d

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


cron