ZenCart_Documentation  1.5.0
http://www.collinsharper.com
C:/xampp/htdocs/zen-cart/admin/developers_tool_kit.php
Go to the documentation of this file.
00001 <?php
00010   require('includes/application_top.php');
00011 
00012   require(DIR_WS_CLASSES . 'currencies.php');
00013   $currencies = new currencies();
00014 
00015   $languages = zen_get_languages();
00016 
00017   $configuration_key_lookup = zen_db_prepare_input($_POST['configuration_key'], false);
00018   if (isset($_GET['configuration_key_lookup']) && $_GET['configuration_key_lookup'] != '') {
00019     $configuration_key_lookup = zen_db_prepare_input(strtoupper($_GET['configuration_key_lookup']), false);
00020     $_POST['configuration_key'] = strtoupper($_GET['configuration_key_lookup']);
00021     $_POST['zv_files'] = 1;
00022     $_POST['zv_filestype'] = $_POST['zv_filestype'];
00023     $_POST['case_sensitive'] = $_POST['case_sensitive'];
00024   }
00025 
00026   function getDirList ($dirName, $filetypes = 1) {
00027     global $directory_array, $sub_dir_files;
00028 // add directory name to the sub_dir_files list;
00029     $sub_dir_files[] = $dirName;
00030     $d = @dir($dirName);
00031     $file_extension = '.php';
00032     if ($d) {
00033       while($entry = $d->read()) {
00034         if ($entry != "." && $entry != "..") {
00035           if (is_dir($dirName."/".$entry)) {
00036             if ($entry == 'CVS') {
00037             // skip
00038             } else {
00039               getDirList($dirName."/".$entry);
00040             }
00041           } else {
00042             if (preg_match('/\\' . $file_extension . '$/', $entry) > 0) {
00043 //echo 'I AM HERE 2 ' . $dirName."/".$entry . '<br>';
00044 //            $directory_array[] .= $dirName."/".$entry;
00045             } else {
00046 //echo 'I AM HERE 3 ' . $dirName."/".$entry . '<br>';
00047             }
00048           }
00049         }
00050       }
00051       $d->close();
00052       unset($d);
00053     }
00054 
00055     return $sub_dir_files;
00056   }
00057 
00058   function zen_display_files($include_root = false, $filetypesincluded = 1) {
00059     global $check_directory, $found, $configuration_key_lookup;
00060     global $db;
00061     $directory_array = array();
00062     for ($i = 0, $n = sizeof($check_directory); $i < $n; $i++) {
00063 //echo 'I SEE ' . $check_directory[$i] . '<br>';
00064 
00065       $dir_check = $check_directory[$i];
00066 
00067       switch($filetypesincluded) {
00068         case(1):
00069           $file_extensions = array('.php');
00070           break;
00071         case(2):
00072           $file_extensions = array('.php', '.css');
00073           break;
00074         case(3):
00075           $file_extensions = array('.css');
00076           break;
00077         case(4):
00078           $file_extensions = array('.html', '.txt');
00079           break;
00080         case(5):
00081           $file_extensions = array('.js');
00082           break;
00083         default:
00084           $file_extensions = array('.php', '.css');
00085           break;
00086       }
00087 
00088       if ($dir = @dir($dir_check)) {
00089         while ($file = $dir->read()) {
00090           if (!is_dir($dir_check . $file)) {
00091             foreach($file_extensions as $extension) {
00092               if (preg_match('/\\' . $extension . '$/', $file) > 0) {
00093                 $directory_array[] = $dir_check . $file;
00094               }
00095             }
00096           }
00097         }
00098         if (sizeof($directory_array)) {
00099           sort($directory_array);
00100         }
00101         $dir->close();
00102         unset($dir);
00103       }
00104     }
00105 
00106     if ($include_root == true) {
00107       $original_array = $directory_array;
00108       $root_array = array();
00109 // if not html/txt
00110     if ($filetypesincluded != 3 && $filetypesincluded != 4 && $filetypesincluded != 5) {
00111       $root_array[] = DIR_FS_CATALOG . 'index.php';
00112       $root_array[] = DIR_FS_CATALOG . 'ipn_main_handler.php';
00113       $root_array[] = DIR_FS_CATALOG . 'page_not_found.php';
00114     }
00115 
00116       $root_array[] = DIR_FS_CATALOG . 'nddbc.html';
00117       $new_array = array_merge($root_array, $original_array);
00118       $directory_array = $new_array;
00119     }
00120 
00121 // show path and filename
00122     if (strtoupper($configuration_key_lookup) == $configuration_key_lookup) {
00123       while (strstr($configuration_key_lookup, '"')) $configuration_key_lookup = str_replace('"', '', $configuration_key_lookup);
00124       while (strstr($configuration_key_lookup, "'")) $configuration_key_lookup = str_replace("'", '', $configuration_key_lookup);
00125 
00126       // if appears to be a constant ask about configuration table
00127       $check_database = true;
00128       $sql = "select * from " . TABLE_CONFIGURATION . " where configuration_key=:zcconfigkey:";
00129       $sql = $db->BindVars($sql, ':zcconfigkey:', strtoupper($configuration_key_lookup), 'string');
00130       $check_configure = $db->Execute($sql);
00131       if ($check_configure->RecordCount() < 1) {
00132         $sql = "select * from " . TABLE_PRODUCT_TYPE_LAYOUT . " where configuration_key=:zcconfigkey:";
00133         $sql = $db->BindVars($sql, ':zcconfigkey:', strtoupper($configuration_key_lookup), 'string');
00134         $check_configure = $db->Execute($sql);
00135       }
00136       if ($check_configure->RecordCount() >= 1) {
00137         $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=' . $configuration_key_lookup) . '">' . $configuration_key_lookup . '</a><br /><br />';
00138       } else {
00139         // do nothing
00140       }
00141     } else {
00142       // don't ask about configuration table
00143     }
00144 //die('I SEE ' . $check_configure->RecordCount() . ' vs ' . $check_database);
00145     echo '<table border="0" width="100%" cellspacing="2" cellpadding="1" align="center">' . "\n";
00146     if (isset($check_database ) && ($check_database == true && $check_configure->RecordCount() >= 1)) {
00147       // only ask if found
00148       echo '<tr><td>' . $links . '</td></tr>';
00149     }
00150     echo '<tr class="infoBoxContent"><td class="dataTableHeadingContent">' . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . TEXT_INFO_SEARCHING . sizeof($directory_array) . TEXT_INFO_FILES_FOR . $configuration_key_lookup . '</td></tr></table>' . "\n\n";
00151     echo '<tr><td>&nbsp;</td></tr>';
00152 
00153 // check all files located
00154     $file_cnt = 0;
00155     $cnt_found=0;
00156     for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) {
00157     // build file content of matching lines
00158       $file_cnt++;
00159       $file = $directory_array[$i];
00160 //echo 'I SEE ' . $directory_array[$i] . '<br>';
00161       // clean path name
00162       while (strstr($file, '//')) $file = str_replace('//', '/', $file);
00163 
00164       $show_file = '';
00165       if (file_exists($file)) {
00166         $show_file .= "\n" . '<table border="2" width="95%" cellspacing="2" cellpadding="1" align="center"><tr><td class="main">' . "\n";
00167         $show_file .= '<tr class="infoBoxContent"><td class="dataTableHeadingContent">';
00168         $show_file .= '<strong>' . $file . '</strong>';
00169         $show_file .= '</td></tr>';
00170         $show_file .= '<tr><td class="main">';
00171 
00172         // put file into an array to be scanned
00173         $lines = file($file);
00174         $found_line = 'false';
00175         // loop through the array, show line and line numbers
00176         $cnt_lines = 0;
00177         foreach ($lines as $line_num => $line) {
00178           $cnt_lines++;
00179           if (isset($_POST['case_sensitive']) && $_POST['case_sensitive']) {
00180             $check_case = strstr($line, $configuration_key_lookup);
00181           } else {
00182             $check_case = strstr(strtoupper($line), strtoupper($configuration_key_lookup));
00183           }
00184           if ($check_case) {
00185             $found_line= 'true';
00186             $found = 'true';
00187             $cnt_found++;
00188             $show_file .= "<br />Line #<strong>{$line_num}</strong> : " ;
00189             //prevent db pwd from being displayed, for sake of security
00190             $show_file .= (substr_count($line,"'DB_SERVER_PASSWORD'")) ? '***HIDDEN***' : htmlspecialchars($line, ENT_QUOTES, CHARSET);
00191             $show_file .= "<br />\n";
00192           } else {
00193             if ($cnt_lines >= 5) {
00194 //            $show_file .= ' .';
00195               $cnt_lines=0;
00196             }
00197           }
00198         }
00199       }
00200       $show_file .= '</td></tr></table>' . "\n";
00201 
00202       // if there was a match, show lines
00203       if ($found_line == 'true') {
00204         echo $show_file . '<table><tr><td>&nbsp;</td></tr></table>';
00205       } // show file
00206     }
00207     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>';
00208   } // zen_display_files
00209 
00210 
00211   $products_filter = (isset($_GET['products_filter']) ? $_GET['products_filter'] : (isset($products_filter) ? $products_filter : ''));
00212 
00213   $action = (isset($_GET['action']) ? $_GET['action'] : '');
00214   // don't do any 'action' if clicked on the Check for Updates button
00215   if (isset($_GET['vcheck']) && $_GET['vcheck']=='yes') $action = '';
00216 
00217   $current_category_id = (isset($_GET['current_category_id']) ? (int)$_GET['current_category_id'] : (int)$current_category_id);
00218   $found= 'true';
00219 
00220   switch($action) {
00221     case ('locate_configuration'):
00222       if ($configuration_key_lookup == '') {
00223         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
00224         zen_redirect(zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT));
00225       }
00226       $found = 'false';
00227       $zv_files_group = $_POST['zv_files'];
00228 
00229       $sql = "select * from " . TABLE_CONFIGURATION . " where configuration_key=:zcconfigkey:";
00230       $sql = $db->BindVars($sql, ':zcconfigkey:', $_POST['configuration_key'], 'string');
00231       $check_configure = $db->Execute($sql);
00232       if ($check_configure->RecordCount() < 1) {
00233         $sql = "select * from " . TABLE_PRODUCT_TYPE_LAYOUT . " where configuration_key=:zcconfigkey:";
00234         $sql = $db->BindVars($sql, ':zcconfigkey:', $_POST['configuration_key'], 'string');
00235         $check_configure = $db->Execute($sql);
00236         if ($check_configure->RecordCount() < 1) {
00237           // build filenames to search
00238           switch ($zv_files_group) {
00239             case (0): // none
00240               $filename_listing = '';
00241               break;
00242             case (1): // all english.php files
00243               $check_directory = array();
00244               $check_directory[] = DIR_FS_CATALOG_LANGUAGES;
00245               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/';
00246               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $template_dir . '/' . $_SESSION['language'] . '/';
00247               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/' . $template_dir . '/';
00248               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/extra_definitions/';
00249               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/extra_definitions/' . $template_dir . '/';
00250               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/payment/';
00251               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/shipping/';
00252               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/order_total/';
00253               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language']. '/modules/product_types/';
00254               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES;
00255               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/';
00256               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/newsletters/';
00257               break;
00258             case (2): // all catalog /language/*.php
00259               $check_directory = array();
00260               $check_directory[] = DIR_FS_CATALOG_LANGUAGES;
00261               break;
00262             case (3): // all catalog /language/english/*.php
00263               $check_directory = array();
00264               $check_directory[] = DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/';
00265               break;
00266             case (4): // all admin /language/*.php
00267               $check_directory = array();
00268               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES;
00269               break;
00270             case (5): // all admin /language/english/*.php
00271               // set directories and files names
00272               $check_directory = array();
00273               $check_directory[] = DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/';
00274               break;
00275             } // eof: switch
00276 
00277               // Check for new databases and filename in extra_datafiles directory
00278 
00279               zen_display_files();
00280 
00281         } else {
00282           $show_products_type_layout = 'true';
00283           $show_configuration_info = 'true';
00284           $found = 'true';
00285         }
00286       } else {
00287         $show_products_type_layout = 'false';
00288         $show_configuration_info = 'true';
00289         $found = 'true';
00290       }
00291 
00292       break;
00293 
00294     case ('locate_function'):
00295       if ($configuration_key_lookup == '') {
00296         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
00297         zen_redirect(zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT));
00298       }
00299       $found = 'false';
00300       $zv_files_group = $_POST['zv_files'];
00301 
00302           // build filenames to search
00303           switch ($zv_files_group) {
00304             case (0): // none
00305               $filename_listing = '';
00306               break;
00307             case (1): // all admin/catalog function files
00308               $check_directory = array();
00309               $check_directory[] = DIR_FS_CATALOG . DIR_WS_FUNCTIONS;
00310               $check_directory[] = DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'extra_functions/';
00311               $check_directory[] = DIR_FS_ADMIN . DIR_WS_FUNCTIONS;
00312               $check_directory[] = DIR_FS_ADMIN . DIR_WS_FUNCTIONS . 'extra_functions/';
00313               break;
00314             case (2): // all catalog function files
00315               $check_directory = array();
00316               $check_directory[] = DIR_FS_CATALOG . DIR_WS_FUNCTIONS;
00317               $check_directory[] = DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'extra_functions/';
00318               break;
00319             case (3): // all admin function files
00320               $check_directory = array();
00321               $check_directory[] = DIR_FS_ADMIN . DIR_WS_FUNCTIONS;
00322               $check_directory[] = DIR_FS_ADMIN . DIR_WS_FUNCTIONS . 'extra_functions/';
00323               break;
00324             } // eof: switch
00325 
00326               // Check for new databases and filename in extra_datafiles directory
00327 
00328               zen_display_files();
00329 
00330       break;
00331 
00332     case ('locate_class'):
00333       if ($configuration_key_lookup == '') {
00334         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
00335         zen_redirect(zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT));
00336       }
00337       $found = 'false';
00338       $zv_files_group = $_POST['zv_files'];
00339 
00340           // build filenames to search
00341           switch ($zv_files_group) {
00342             case (0): // none
00343               $filename_listing = '';
00344               break;
00345             case (1): // all admin/catalog classes files
00346               $check_directory = array();
00347               $check_directory[] = DIR_FS_CATALOG . DIR_WS_CLASSES;
00348               $check_directory[] = DIR_FS_ADMIN . DIR_WS_CLASSES;
00349               break;
00350             case (2): // all catalog classes files
00351               $check_directory = array();
00352               $check_directory[] = DIR_FS_CATALOG . DIR_WS_CLASSES;
00353               break;
00354             case (3): // all admin function files
00355               $check_directory = array();
00356               $check_directory[] = DIR_FS_ADMIN . DIR_WS_CLASSES;
00357               break;
00358             } // eof: switch
00359 
00360               // Check for new databases and filename in extra_datafiles directory
00361 
00362               zen_display_files();
00363 
00364       break;
00365 
00366     case ('locate_template'):
00367       if ($configuration_key_lookup == '') {
00368         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
00369         zen_redirect(zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT));
00370       }
00371       $found = 'false';
00372       $zv_files_group = $_POST['zv_files'];
00373 
00374           // build filenames to search
00375           switch ($zv_files_group) {
00376             case (0): // none
00377               $filename_listing = '';
00378               break;
00379             case (1): // all template files
00380               $check_directory = array();
00381               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . 'template_default/templates' . '/';
00382               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . 'template_default/sideboxes' . '/';
00383               $check_directory[] = DIR_FS_CATALOG_MODULES;
00384               $check_directory[] = DIR_FS_CATALOG_MODULES . 'sideboxes/';
00385 
00386               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . $template_dir . '/templates' . '/';
00387               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . $template_dir . '/sideboxes' . '/';
00388 
00389               $sub_dir_files = array();
00390               getDirList(DIR_FS_CATALOG_MODULES . 'pages');
00391 
00392               $check_dir = array_merge($check_directory, $sub_dir_files);
00393               for ($i = 0, $n = sizeof($check_dir); $i < $n; $i++) {
00394                 $check_directory[] = $check_dir[$i] . '/';
00395               }
00396 
00397               break;
00398             case (2): // all /templates files
00399               $check_directory = array();
00400               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . 'template_default/templates' . '/';
00401               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . $template_dir . '/templates' . '/';
00402               break;
00403             case (3): // all sideboxes files
00404               $check_directory = array();
00405               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . 'template_default/sideboxes' . '/';
00406               $check_directory[] = DIR_FS_CATALOG_MODULES . 'sideboxes/';
00407               $check_directory[] = DIR_FS_CATALOG_TEMPLATES . $template_dir . '/sideboxes' . '/';
00408               break;
00409             case (4): // all /pages files
00410               $check_directory = array();
00411               //$check_directory[] = DIR_FS_CATALOG_MODULES . 'pages/';
00412               $sub_dir_files = array();
00413               getDirList(DIR_FS_CATALOG_MODULES . 'pages');
00414 
00415               $check_dir = array_merge($check_directory, $sub_dir_files);
00416               for ($i = 0, $n = sizeof($check_dir); $i < $n; $i++) {
00417                 $check_directory[] = $check_dir[$i] . '/';
00418               }
00419 
00420               break;
00421             } // eof: switch
00422 
00423               // Check for new databases and filename in extra_datafiles directory
00424 
00425               zen_display_files();
00426 
00427       break;
00428 
00429 
00431     case ('locate_all_files'):
00432       $zv_check_root = false;
00433       if ($configuration_key_lookup == '') {
00434         $messageStack->add_session(ERROR_CONFIGURATION_KEY_NOT_ENTERED, 'caution');
00435         zen_redirect(zen_href_link(FILENAME_DEVELOPERS_TOOL_KIT));
00436       }
00437       $found = 'false';
00438       $zv_files_group = $_POST['zv_files'];
00439       $zv_filestype_group = $_POST['zv_filestype'];
00440 //echo 'settings: ' . '$zv_files_group: ' . $zv_files_group . '$zv_filestype_group: ' . $zv_filestype_group . '<br>';
00441 //echo 'Who am I template ' . $template_dir . ' sess lang ' . $_SESSION['language'];
00442       switch ($zv_files_group) {
00443         case (0): // none
00444           $filename_listing = '';
00445           break;
00446         case (1): // all
00447           $zv_check_root = true;
00448           $filename_listing = '';
00449 
00450           $check_directory = array();
00451 
00452 // get includes
00453           $sub_dir_files = array();
00454           getDirList(DIR_FS_CATALOG . DIR_WS_INCLUDES, $zv_filestype_group);
00455           $sub_dir_files_catalog = $sub_dir_files;
00456 
00457 // get email
00458           $sub_dir_files = array();
00459           getDirList(DIR_FS_EMAIL_TEMPLATES, $zv_filestype_group);
00460           $sub_dir_files_email = $sub_dir_files;
00461 
00462 // get admin
00463           $sub_dir_files = array();
00464           getDirList(DIR_FS_ADMIN, $zv_filestype_group);
00465           $sub_dir_files_admin= $sub_dir_files;
00466 
00467           $check_dir = array_merge($sub_dir_files_catalog, $sub_dir_files_email, $sub_dir_files_admin);
00468           for ($i = 0, $n = sizeof($check_dir); $i < $n; $i++) {
00469             $check_directory[] = $check_dir[$i] . '/';
00470           }
00471           break;
00472 
00473         case (2): // all catalog
00474           $zv_check_root = true;
00475           $filename_listing = '';
00476 
00477           $check_directory = array();
00478 
00479           $sub_dir_files = array();
00480           getDirList(DIR_FS_CATALOG . DIR_WS_INCLUDES, $zv_filestype_group);
00481           $sub_dir_files_catalog = $sub_dir_files;
00482 
00483 // get email
00484           $sub_dir_files = array();
00485           getDirList(DIR_FS_EMAIL_TEMPLATES, $zv_filestype_group);
00486           $sub_dir_files_email = $sub_dir_files;
00487 
00488           $check_dir = array_merge($sub_dir_files_catalog, $sub_dir_files_email);
00489           for ($i = 0, $n = sizeof($check_dir); $i < $n; $i++) {
00490             $zv_add_dir= str_replace('//', '/', $check_dir[$i] . '/');
00491             if (strstr($zv_add_dir, DIR_WS_ADMIN) == '') {
00492               $check_directory[] = $zv_add_dir;
00493             }
00494           }
00495           break;
00496 
00497         case (3): // all admin
00498           $zv_check_root = false;
00499           $filename_listing = '';
00500 
00501           $check_directory = array();
00502 
00503           $sub_dir_files = array();
00504           getDirList(DIR_FS_ADMIN, $zv_filestype_group);
00505           $sub_dir_files_admin = $sub_dir_files;
00506 
00507           $check_dir = array_merge($sub_dir_files_admin);
00508           for ($i = 0, $n = sizeof($check_dir); $i < $n; $i++) {
00509             $check_directory[] = $check_dir[$i] . '/';
00510           }
00511           break;
00512         }
00513           zen_display_files($zv_check_root, $zv_filestype_group);
00514 
00515       break;
00516     } // eof: action
00517 
00518     // if no matches in either databases or selected language directory give an error
00519     if ($found == 'false') {
00520       $messageStack->add(ERROR_CONFIGURATION_KEY_NOT_FOUND . ' ' . $configuration_key_lookup, 'caution');
00521     } elseif ($action != '') {
00522       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";
00523     }
00524 
00525 ?>
00526 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
00527 <html <?php echo HTML_PARAMS; ?>>
00528 <head>
00529 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
00530 <title><?php echo TITLE; ?></title>
00531 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
00532 <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
00533 <script language="javascript" src="includes/menu.js"></script>
00534 <script language="javascript" src="includes/general.js"></script>
00535 
00536 <script type="text/javascript">
00537   <!--
00538   function init()
00539   {
00540     cssjsmenu('navbar');
00541     if (document.getElementById)
00542     {
00543       var kill = document.getElementById('hoverJS');
00544       kill.disabled = true;
00545     }
00546   }
00547   // -->
00548 </script>
00549 </head>
00550 <body onLoad="init()">
00551 <!-- header //-->
00552 <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
00553 <!-- header_eof //-->
00554 
00555 <!-- body //-->
00556 <table border="0" width="100%" cellspacing="2" cellpadding="2">
00557   <tr>
00558 <!-- body_text //-->
00559     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
00560       <tr>
00561         <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
00562         <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
00563       </tr>
00564 
00565 <?php
00566 if (isset($show_configuration_info) && $show_configuration_info == 'true') {
00567   $show_configuration_info = 'false';
00568 ?>
00569       <tr><td colspan="2">
00570         <table border="3" cellspacing="4" cellpadding="4">
00571           <tr class="infoBoxContent">
00572             <td colspan="2" class="pageHeading" align="center"><?php echo TABLE_CONFIGURATION_TABLE; ?></td>
00573           </tr>
00574           <tr>
00575             <td class="infoBoxHeading"><?php echo TABLE_TITLE_KEY; ?></td>
00576             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_key']; ?></td>
00577           </tr>
00578           <tr>
00579             <td class="infoBoxHeading"><?php echo TABLE_TITLE_TITLE; ?></td>
00580             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_title']; ?></td>
00581           </tr>
00582           <tr>
00583             <td class="infoBoxHeading"><?php echo TABLE_TITLE_DESCRIPTION; ?></td>
00584             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_description']; ?></td>
00585           </tr>
00586 <?php
00587   if ($show_products_type_layout == 'true') {
00588     $check_configure_group = $db->Execute("select * from " . TABLE_PRODUCT_TYPES . " where type_id='" . (int)$check_configure->fields['product_type_id'] . "'");
00589   } else {
00590     $check_configure_group = $db->Execute("select * from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id='" . (int)$check_configure->fields['configuration_group_id'] . "'");
00591   }
00592 ?>
00593 
00594 <?php
00595   if ($show_products_type_layout == 'true') {
00596 ?>
00597           <tr>
00598             <td class="infoBoxHeading"><?php echo TABLE_TITLE_GROUP; ?></td>
00599             <td class="dataTableHeadingContentWhois"><?php echo 'Product Type Layout'; ?></td>
00600           </tr>
00601 <?php } else { ?>
00602           <tr>
00603             <td class="infoBoxHeading"><?php echo TABLE_TITLE_VALUE; ?></td>
00604             <td class="dataTableHeadingContentWhois"><?php echo $check_configure->fields['configuration_value']; ?></td>
00605           </tr>
00606           <tr>
00607             <td class="infoBoxHeading"><?php echo TABLE_TITLE_GROUP; ?></td>
00608             <td class="dataTableHeadingContentWhois">
00609             <?php
00610               if ($check_configure_group->fields['configuration_group_id'] == '6') {
00611                 $id_note = TEXT_INFO_CONFIGURATION_HIDDEN;
00612               } else {
00613                 $id_note = '';
00614               }
00615               echo 'ID#' . $check_configure_group->fields['configuration_group_id'] . ' ' . $check_configure_group->fields['configuration_group_title'] . $id_note;
00616             ?>
00617             </td>
00618           </tr>
00619 <?php } ?>
00620           <tr>
00621             <td class="main" align="center" valign="middle">
00622               <?php
00623                 if ($show_products_type_layout == 'false' and ($check_configure->fields['configuration_id'] != 0 and $check_configure->fields['configuration_group_id'] != 6)) {
00624                   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>';
00625                 } else {
00626                   $page= '';
00627                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_SHIPPING')) $page .= 'shipping';
00628                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_PAYMENT')) $page .= 'payment';
00629                   if (strstr($check_configure->fields['configuration_key'], 'MODULE_ORDER_TOTAL')) $page .= 'ordertotal';
00630 
00631                   if ($show_products_type_layout == 'true') {
00632                     echo '<a href="' . zen_href_link(FILENAME_PRODUCT_TYPES) . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>';
00633                   } else {
00634                     if ($page != '') {
00635                       echo '<a href="' . zen_href_link(FILENAME_MODULES, 'set=' . $page) . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>';
00636                     } else {
00637                       echo TEXT_INFO_NO_EDIT_AVAILABLE . '<br />';
00638                     }
00639                   }
00640                 }
00641               ?>
00642               </td>
00643             <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>
00644           </tr>
00645           <tr class="infoBoxContent">
00646             <td colspan="2" class="pageHeading" align="center">
00647 <?php
00648       $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=' . $configuration_key_lookup . '&zv_files=1') . '">' . $configuration_key_lookup . '</a><br />';
00649       echo $links;
00650 ?>
00651             </td>
00652           </tr>
00653         </table>
00654       </td></tr>
00655 <?php
00656 } else {
00657 ?>
00658 
00659 <?php
00660 // disabled and here for an example
00661 if (false) {
00662 ?>
00663 <!-- bof: update all products price sorter -->
00664       <tr>
00665         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
00666           <tr>
00667             <td class="main" align="left" valign="top"><?php echo TEXT_INFO_PRODUCTS_PRICE_SORTER_UPDATE; ?></td>
00668             <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>
00669           </tr>
00670         </table></td>
00671       </tr>
00672 <!-- eof: update all products price sorter -->
00673 <?php } ?>
00674 
00675 <!-- bof: Locate a configuration constant -->
00676       <tr>
00677         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
00678           <tr>
00679             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_CONFIGURATION_CONSTANT; ?></td>
00680           </tr>
00681 
00682           <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']); ?>
00683             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key', '', ' size="40" '); ?></td>
00684             <td class="main" align="left" valign="middle">
00685               <?php
00686                 $za_lookup = array(array('id' => '0', 'text' => TEXT_LOOKUP_NONE),
00687                                               array('id' => '1', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_LANGUAGE),
00688                                               array('id' => '2', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_CATALOG),
00689                                               array('id' => '3', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_CATALOG_TEMPLATE),
00690                                               array('id' => '4', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ADMIN),
00691                                               array('id' => '5', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ADMIN_LANGUAGE)
00692                                                     );
00693 //                                              array('id' => '6', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ALL)
00694 
00695                 echo '<strong>' . TEXT_LANGUAGE_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_files', $za_lookup, '0');
00696               ?>
00697             </td>
00698             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
00699           </form></tr>
00700           <tr>
00701             <td colspan="4" class="main" align="left" valign="top"><?php echo TEXT_INFO_CONFIGURATION_UPDATE; ?></td>
00702           </tr>
00703         </table></td>
00704       </tr>
00705 <!-- eof: Locate a configuration constant -->
00706 
00707 
00708 <!-- bof: Locate a function -->
00709       <tr>
00710         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
00711           <tr>
00712             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_FUNCTION_CONSTANT; ?></td>
00713           </tr>
00714 
00715           <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']); ?>
00716             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key', '', ' size="40" '); ?></td>
00717             <td class="main" align="left" valign="middle">
00718               <?php
00719                 $za_lookup = array(array('id' => '0', 'text' => TEXT_LOOKUP_NONE),
00720                                               array('id' => '1', 'text' => TEXT_FUNCTION_LOOKUP_CURRENT),
00721                                               array('id' => '2', 'text' => TEXT_FUNCTION_LOOKUP_CURRENT_CATALOG),
00722                                               array('id' => '3', 'text' => TEXT_FUNCTION_LOOKUP_CURRENT_ADMIN)
00723                                                     );
00724 //                                              array('id' => '6', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ALL)
00725 
00726                 echo '<strong>' . TEXT_FUNCTION_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_files', $za_lookup, '0');
00727               ?>
00728             </td>
00729             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
00730           </form></tr>
00731           <tr>
00732             <td colspan="4" class="main" align="left" valign="top"><?php echo TEXT_INFO_CONFIGURATION_UPDATE; ?></td>
00733           </tr>
00734         </table></td>
00735       </tr>
00736 <!-- eof: Locate a function -->
00737 
00738 <!-- bof: Locate a class -->
00739       <tr>
00740         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
00741           <tr>
00742             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_CLASS_CONSTANT; ?></td>
00743           </tr>
00744 
00745           <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']); ?>
00746             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key', '', ' size="40" '); ?></td>
00747             <td class="main" align="left" valign="middle">
00748               <?php
00749                 $za_lookup = array(array('id' => '0', 'text' => TEXT_LOOKUP_NONE),
00750                                               array('id' => '1', 'text' => TEXT_CLASS_LOOKUP_CURRENT),
00751                                               array('id' => '2', 'text' => TEXT_CLASS_LOOKUP_CURRENT_CATALOG),
00752                                               array('id' => '3', 'text' => TEXT_CLASS_LOOKUP_CURRENT_ADMIN)
00753                                                     );
00754 //                                              array('id' => '6', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ALL)
00755 
00756                 echo '<strong>' . TEXT_CLASS_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_files', $za_lookup, '0');
00757               ?>
00758             </td>
00759             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
00760           </form></tr>
00761           <tr>
00762             <td colspan="4" class="main" align="left" valign="top"><?php echo TEXT_INFO_CONFIGURATION_UPDATE; ?></td>
00763           </tr>
00764         </table></td>
00765       </tr>
00766 <!-- eof: Locate a class -->
00767 
00768 <!-- bof: Locate a template files -->
00769       <tr>
00770         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
00771           <tr>
00772             <td colspan="3" class="main" align="left" valign="middle"><?php echo TEXT_TEMPLATE_CONSTANT; ?></td>
00773           </tr>
00774 
00775           <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']); ?>
00776             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key', '', ' size="40" '); ?></td>
00777             <td class="main" align="left" valign="middle">
00778               <?php
00779                 $za_lookup = array(array('id' => '0', 'text' => TEXT_LOOKUP_NONE),
00780                                               array('id' => '1', 'text' => TEXT_TEMPLATE_LOOKUP_CURRENT),
00781                                               array('id' => '2', 'text' => TEXT_TEMPLATE_LOOKUP_CURRENT_TEMPLATES),
00782                                               array('id' => '3', 'text' => TEXT_TEMPLATE_LOOKUP_CURRENT_SIDEBOXES),
00783                                               array('id' => '4', 'text' => TEXT_TEMPLATE_LOOKUP_CURRENT_PAGES)
00784                                                     );
00785 //                                              array('id' => '6', 'text' => TEXT_LANGUAGE_LOOKUP_CURRENT_ALL)
00786 
00787                 echo '<strong>' . TEXT_TEMPLATE_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_files', $za_lookup, '0');
00788               ?>
00789             </td>
00790             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
00791           </form></tr>
00792           <tr>
00793             <td colspan="4" class="main" align="left" valign="top"><?php echo TEXT_INFO_CONFIGURATION_UPDATE; ?></td>
00794           </tr>
00795         </table></td>
00796       </tr>
00797 <!-- eof: Locate template Files -->
00798 
00799 
00800 <!-- bof: Locate all files -->
00801       <tr>
00802         <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
00803           <tr>
00804             <td colspan="4" class="main" align="left" valign="middle"><?php echo TEXT_ALL_FILES_CONSTANT; ?></td>
00805           </tr>
00806 
00807           <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']); ?>
00808             <td class="main" align="left" valign="bottom"><?php echo '<strong>' . TEXT_CONFIGURATION_KEY . '</strong>' . '<br />' . zen_draw_input_field('configuration_key', '', ' size="40" '); ?></td>
00809             <td class="main" align="left" valign="middle">
00810               <?php
00811                 $za_lookup = array(array('id' => '0', 'text' => TEXT_LOOKUP_NONE),
00812                                               array('id' => '1', 'text' => TEXT_ALL_FILES_LOOKUP_CURRENT),
00813                                               array('id' => '2', 'text' => TEXT_ALL_FILES_LOOKUP_CURRENT_CATALOG),
00814                                               array('id' => '3', 'text' => TEXT_ALL_FILES_LOOKUP_CURRENT_ADMIN)
00815                                                     );
00816 
00817                 echo '<strong>' . TEXT_ALL_FILES_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_files', $za_lookup, '0');
00818               ?>
00819             </td>
00820             <td class="main" align="left" valign="middle">
00821               <?php
00822                 $za_lookup_filetype = array(
00823                                               array('id' => '1', 'text' => TEXT_ALL_FILES_LOOKUP_PHP),
00824                                               array('id' => '2', 'text' => TEXT_ALL_FILES_LOOKUP_PHPCSS),
00825                                               array('id' => '3', 'text' => TEXT_ALL_FILES_LOOKUP_CSS),
00826                                               array('id' => '4', 'text' => TEXT_ALL_FILES_LOOKUP_HTMLTXT),
00827                                               array('id' => '5', 'text' => TEXT_ALL_FILES_LOOKUP_JS)
00828                                                     );
00829 
00830                 echo '<strong>' . TEXT_ALL_FILESTYPE_LOOKUPS . '</strong>' . '<br />' . zen_draw_pull_down_menu('zv_filestype', $za_lookup_filetype, '0');
00831                 echo '<strong>' . TEXT_CASE_SENSITIVE . '</strong>' . zen_draw_checkbox_field('case_sensitive', true);
00832               ?>
00833             </td>
00834             <td class="main" align="right" valign="bottom"><?php echo zen_image_submit('button_search.gif', IMAGE_SEARCH); ?></td>
00835           </form></tr>
00836           <tr>
00837             <td colspan="4" class="main" align="left" valign="top"><?php echo TEXT_INFO_CONFIGURATION_UPDATE; ?></td>
00838           </tr>
00839         </table></td>
00840       </tr>
00841 <!-- eof: Locate all files -->
00842 
00843 <?php
00844 } // eof configure
00845 ?>
00846       <tr>
00847         <td colspan="2"><?php echo '<br />' . zen_draw_separator('pixel_black.gif', '100%', '2'); ?></td>
00848       </tr>
00849 
00850 
00851     </table></td>
00852 <!-- body_text_eof //-->
00853   </tr>
00854 </table>
00855 <!-- body_eof //-->
00856 
00857 <!-- footer //-->
00858 <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
00859 <!-- footer_eof //-->
00860 </body>
00861 </html>
00862 <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
 All Data Structures Namespaces Files Functions Variables Enumerations