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

Zen Cart 源代码 modules.php




下载文件

文件名: modules.php
文件类型: PHP文件
文件大小: 21.98 KiB
MD5: 9a8b368e142beafb0907406f65c68771

modules.php - 关闭高亮
  1. <?php
  2. /**
  3.  * @package admin
  4.  * @copyright Copyright 2003-2012 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 Aug 28 17:40:54 2012 -0400 Modified in v1.5.1 $
  8.  */
  9.  
  10.   require('includes/application_top.php');
  11.   if (file_exists(DIR_FS_CATALOG . 'includes/classes/dbencdata.php')) require_once(DIR_FS_CATALOG . 'includes/classes/dbencdata.php');
  12.  
  13.   $set = (isset($_GET['set']) ? $_GET['set'] : (isset($_POST['set']) ? $_POST['set'] : ''));
  14.  
  15.   $is_ssl_protected = (substr(HTTP_SERVER, 0, 5) == 'https') ? TRUE : FALSE;
  16.  
  17.   if (zen_not_null($set)) {
  18.     switch ($set) {
  19.       case 'shipping':
  20.         $module_type = 'shipping';
  21.         $module_directory = DIR_FS_CATALOG_MODULES . 'shipping/';
  22.         $module_key = 'MODULE_SHIPPING_INSTALLED';
  23.         define('HEADING_TITLE', HEADING_TITLE_MODULES_SHIPPING);
  24.         $shipping_errors = '';
  25.         if (zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == 'NONE' or zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == '') {
  26.           $shipping_errors .= '<br />' . ERROR_SHIPPING_ORIGIN_ZIP;
  27.         }
  28.         if (zen_get_configuration_key_value('ORDER_WEIGHT_ZERO_STATUS') == '1' and !defined('MODULE_SHIPPING_FREESHIPPER_STATUS')) {
  29.           $shipping_errors .= '<br />' . ERROR_ORDER_WEIGHT_ZERO_STATUS;
  30.         }
  31.         if (defined('MODULE_SHIPPING_USPS_STATUS') and (MODULE_SHIPPING_USPS_USERID=='NONE' or MODULE_SHIPPING_USPS_SERVER == 'test')) {
  32.           $shipping_errors .= '<br />' . ERROR_USPS_STATUS;
  33.         }
  34.         if ($shipping_errors != '') {
  35.           $messageStack->add(ERROR_SHIPPING_CONFIGURATION . $shipping_errors, 'caution');
  36.         }
  37.         break;
  38.       case 'ordertotal':
  39.         $module_type = 'order_total';
  40.         $module_directory = DIR_FS_CATALOG_MODULES . 'order_total/';
  41.         $module_key = 'MODULE_ORDER_TOTAL_INSTALLED';
  42.         define('HEADING_TITLE', HEADING_TITLE_MODULES_ORDER_TOTAL);
  43.         break;
  44.       case 'payment':
  45.       default:
  46.         $module_type = 'payment';
  47.         $module_directory = DIR_FS_CATALOG_MODULES . 'payment/';
  48.         $module_key = 'MODULE_PAYMENT_INSTALLED';
  49.         define('HEADING_TITLE', HEADING_TITLE_MODULES_PAYMENT);
  50.         break;
  51.     }
  52.   }
  53.  
  54.   $action = (isset($_GET['action']) ? $_GET['action'] : '');
  55.  
  56.   if (zen_not_null($action)) {
  57.     $admname = '{' . preg_replace('/[^\d\w]/', '*', zen_get_admin_name()) . '[' . (int)$_SESSION['admin_id'] . ']}';
  58.     switch ($action) {
  59.       case 'save':
  60.         if (!$is_ssl_protected && in_array($class, array('paypaldp', 'linkpoint_api', 'authorizenet_aim', 'authorizenet_echeck'))) break;
  61.         while (list($key, $value) = each($_POST['configuration'])) {
  62.           if (is_array( $value ) ) {
  63.             $value = implode( ", ", $value);
  64.             $value = preg_replace ("/, --none--/", "", $value);
  65.           }
  66.           if (function_exists('dbenc_encrypt') && function_exists('dbenc_is_encrypted_value_key') && dbenc_is_encrypted_value_key($key)) {
  67.             $value = dbenc_encrypt($value);
  68.           }
  69.  
  70.           $db->Execute("update " . TABLE_CONFIGURATION . "
  71.                        set configuration_value = '" . zen_db_input($value) . "'
  72.                        where configuration_key = '" . zen_db_input($key) . "'");
  73.         }
  74.         $configuration_query = 'select configuration_key as cfgkey, configuration_value as cfgvalue
  75.                                from ' . TABLE_CONFIGURATION;
  76.         $configuration = $db->Execute($configuration_query);
  77.         $msg = sprintf(TEXT_EMAIL_MESSAGE_ADMIN_SETTINGS_CHANGED, preg_replace('/[^\d\w]/', '*', $_GET['module']), $admname);
  78.         zen_mail(STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER_EMAIL_ADDRESS, TEXT_EMAIL_SUBJECT_ADMIN_SETTINGS_CHANGED, $msg, STORE_NAME, EMAIL_FROM, array('EMAIL_MESSAGE_HTML'=>$msg), 'admin_settings_changed');
  79.         zen_redirect(zen_href_link(FILENAME_MODULES, 'set=' . $set . ($_GET['module'] != '' ? '&module=' . $_GET['module'] : ''), 'NONSSL'));
  80.         break;
  81.       case 'install':
  82.         $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
  83.         $class = basename($_POST['module']);
  84.         if (!$is_ssl_protected && in_array($class, array('paypaldp', 'linkpoint_api', 'authorizenet_aim', 'authorizenet_echeck'))) break;
  85.         if (file_exists($module_directory . $class . $file_extension)) {
  86.           $configuration_query = 'select configuration_key as cfgkey, configuration_value as cfgvalue
  87.                                  from ' . TABLE_CONFIGURATION;
  88.           $configuration = $db->Execute($configuration_query);
  89.           include($module_directory . $class . $file_extension);
  90.           $module = new $class;
  91.           $msg = sprintf(TEXT_EMAIL_MESSAGE_ADMIN_MODULE_INSTALLED, preg_replace('/[^\d\w]/', '*', $_POST['module']), $admname);
  92.           zen_mail(STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER_EMAIL_ADDRESS, TEXT_EMAIL_SUBJECT_ADMIN_SETTINGS_CHANGED, $msg, STORE_NAME, EMAIL_FROM, array('EMAIL_MESSAGE_HTML'=>$msg), 'admin_settings_changed');
  93.           $result = $module->install();
  94.         }
  95.         if ($result != 'failed') {
  96.           zen_redirect(zen_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class . '&action=edit', 'NONSSL'));
  97.         }
  98.        break;
  99.       case 'removeconfirm':
  100.         $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
  101.         $class = basename($_POST['module']);
  102.         if (file_exists($module_directory . $class . $file_extension)) {
  103.           $configuration_query = 'select configuration_key as cfgkey, configuration_value as cfgvalue
  104.                                  from ' . TABLE_CONFIGURATION;
  105.           $configuration = $db->Execute($configuration_query);
  106.           include($module_directory . $class . $file_extension);
  107.           $module = new $class;
  108.           $msg = sprintf(TEXT_EMAIL_MESSAGE_ADMIN_MODULE_REMOVED, preg_replace('/[^\d\w]/', '*', $_POST['module']), $admname);
  109.           zen_mail(STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER_EMAIL_ADDRESS, TEXT_EMAIL_SUBJECT_ADMIN_SETTINGS_CHANGED, $msg, STORE_NAME, EMAIL_FROM, array('EMAIL_MESSAGE_HTML'=>$msg), 'admin_settings_changed');
  110.           $result = $module->remove();
  111.         }
  112.         zen_redirect(zen_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class, 'NONSSL'));
  113.        break;
  114.     }
  115.   }
  116. ?>
  117. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  118. <html <?php echo HTML_PARAMS; ?>>
  119. <head>
  120. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  121. <title><?php echo TITLE; ?></title>
  122. <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  123. <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
  124. <script language="javascript" src="includes/menu.js"></script>
  125. <script language="javascript" src="includes/general.js"></script>
  126. <script type="text/javascript">
  127.   <!--
  128.   function init()
  129.   {
  130.     cssjsmenu('navbar');
  131.     if (document.getElementById)
  132.     {
  133.       var kill = document.getElementById('hoverJS');
  134.       kill.disabled = true;
  135.     }
  136.   }
  137.   // -->
  138. </script>
  139. </head>
  140. <body onLoad="init()">
  141. <!-- header //-->
  142. <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  143. <!-- header_eof //-->
  144.  
  145. <!-- body //-->
  146. <table border="0" width="100%" cellspacing="2" cellpadding="2">
  147.   <tr>
  148. <!-- body_text //-->
  149.     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  150.       <tr>
  151.         <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  152.           <tr>
  153.             <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  154.             <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  155.           </tr>
  156.         </table></td>
  157.       </tr>
  158.       <tr>
  159.         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  160.           <tr>
  161.             <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  162.               <tr class="dataTableHeadingRow">
  163.                 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_MODULES; ?></td>
  164.                 <td class="dataTableHeadingContent">&nbsp;</td>
  165.                 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SORT_ORDER; ?></td>
  166. <?php
  167.   if ($set == 'payment') {
  168. ?>
  169.                 <td class="dataTableHeadingContent" align="center" width="100"><?php echo TABLE_HEADING_ORDERS_STATUS; ?></td>
  170. <?php } ?>
  171.                 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
  172.               </tr>
  173. <?php
  174.   $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
  175.   $directory_array = array();
  176.   if ($dir = @dir($module_directory)) {
  177.     while ($file = $dir->read()) {
  178.       if (!is_dir($module_directory . $file)) {
  179.         if (substr($file, strrpos($file, '.')) == $file_extension) {
  180.           $directory_array[] = $file;
  181.         }
  182.       }
  183.     }
  184.     sort($directory_array);
  185.     $dir->close();
  186.   }
  187.  
  188.   $installed_modules = array();
  189.   for ($i=0, $n=sizeof($directory_array); $i<$n; $i++) {
  190.     $file = $directory_array[$i];
  191.     if (file_exists(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/modules/' . $module_type . '/' . $file)) {
  192.       include(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/modules/' . $module_type . '/' . $file);
  193.       include($module_directory . $file);
  194.       $class = substr($file, 0, strrpos($file, '.'));
  195.       if (zen_class_exists($class)) {
  196.         $module = new $class;
  197.         if ($module->check() > 0) {
  198.           if ($module->sort_order > 0) {
  199.             if ($installed_modules[$module->sort_order] != '') {
  200.               $zc_valid = false;
  201.             }
  202.             $installed_modules[$module->sort_order] = $file;
  203.           } else {
  204.             $installed_modules[] = $file;
  205.           }
  206.         }
  207.         if ((!isset($_GET['module']) || (isset($_GET['module']) && ($_GET['module'] == $class))) && !isset($mInfo)) {
  208.           $module_info = array('code' => $module->code,
  209.                                'title' => $module->title,
  210.                                'description' => $module->description,
  211.                                'status' => $module->check());
  212.           $module_keys = $module->keys();
  213.           $keys_extra = array();
  214.           for ($j=0, $k=sizeof($module_keys); $j<$k; $j++) {
  215.             $key_value = $db->Execute("select configuration_title, configuration_value, configuration_key,
  216.                                          configuration_description, use_function, set_function
  217.                                          from " . TABLE_CONFIGURATION . "
  218.                                          where configuration_key = '" . zen_db_input($module_keys[$j]) . "'");
  219.  
  220.             $keys_extra[$module_keys[$j]]['title'] = $key_value->fields['configuration_title'];
  221.             $keys_extra[$module_keys[$j]]['value'] = $key_value->fields['configuration_value'];
  222.             $keys_extra[$module_keys[$j]]['description'] = $key_value->fields['configuration_description'];
  223.             $keys_extra[$module_keys[$j]]['use_function'] = $key_value->fields['use_function'];
  224.             $keys_extra[$module_keys[$j]]['set_function'] = $key_value->fields['set_function'];
  225.           }
  226.           $module_info['keys'] = $keys_extra;
  227.           $mInfo = new objectInfo($module_info);
  228.         }
  229.         if (isset($mInfo) && is_object($mInfo) && ($class == $mInfo->code) ) {
  230.           if ($module->check() > 0) {
  231.             echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class . '&action=edit', 'NONSSL') . '\'">' . "\n";
  232.           } else {
  233.             echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n";
  234.           }
  235.         } else {
  236.           echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class, 'NONSSL') . '\'">' . "\n";
  237.         }
  238. //print_r($module) . '<br><BR>';
  239. //echo (!empty($module->enabled) ? 'ENABLED' : 'NOT ENABLED') . ' vs ' . (is_numeric($module->sort_order) ? 'ON' : 'OFF') . '<BR><BR>' ;
  240. ?>
  241.                 <td class="dataTableContent"><?php echo $module->title; ?></td>
  242.                 <td class="dataTableContent"><?php echo (strstr($module->code, 'paypal') ? 'PayPal' : $module->code); ?></td>
  243.                 <td class="dataTableContent" align="right">
  244.                   <?php if (is_numeric($module->sort_order)) echo $module->sort_order; ?>
  245.                   <?php
  246.                     // show current status
  247.                     if ($set == 'payment' || $set == 'shipping') {
  248.                       echo '&nbsp;' . ((!empty($module->enabled) && is_numeric($module->sort_order)) ? zen_image(DIR_WS_IMAGES . 'icon_status_green.gif') : ((empty($module->enabled) && is_numeric($module->sort_order)) ? zen_image(DIR_WS_IMAGES . 'icon_status_yellow.gif') : zen_image(DIR_WS_IMAGES . 'icon_status_red.gif')));
  249.                     } else {
  250.                       echo '&nbsp;' . (is_numeric($module->sort_order) ? zen_image(DIR_WS_IMAGES . 'icon_status_green.gif') : zen_image(DIR_WS_IMAGES . 'icon_status_red.gif'));
  251.                     }
  252.                   ?>
  253.                 </td>
  254. <?php
  255.   if ($set == 'payment') {
  256.     $orders_status_name = $db->Execute("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id='" . (int)$module->order_status . "' and language_id='" . (int)$_SESSION['languages_id'] . "'");
  257. ?>
  258.                 <td class="dataTableContent" align="left">&nbsp;&nbsp;&nbsp;<?php echo (is_numeric($module->sort_order) ? (($orders_status_name->fields['orders_status_id'] < 1) ? TEXT_DEFAULT : $orders_status_name->fields['orders_status_name']) : ''); ?>&nbsp;&nbsp;&nbsp;</td>
  259. <?php } ?>
  260.                 <td class="dataTableContent" align="right"><?php if (isset($mInfo) && is_object($mInfo) && ($class == $mInfo->code) ) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . zen_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class, 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
  261.               </tr>
  262. <?php
  263.       }
  264.     } else {
  265.       echo ERROR_MODULE_FILE_NOT_FOUND . DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/modules/' . $module_type . '/' . $file . '<br />';
  266.     }
  267.   }
  268.   ksort($installed_modules);
  269.   $check = $db->Execute("select configuration_value
  270.                         from " . TABLE_CONFIGURATION . "
  271.                         where configuration_key = '" . zen_db_input($module_key) . "'");
  272.  
  273.   if ($check->RecordCount() > 0) {
  274.     if ($check->fields['configuration_value'] != implode(';', $installed_modules)) {
  275.       $db->Execute("update " . TABLE_CONFIGURATION . "
  276.                    set configuration_value = '" . zen_db_input(implode(';', $installed_modules)) . "', last_modified = now()
  277.                    where configuration_key = '" . zen_db_input($module_key) . "'");
  278.     }
  279.   } else {
  280.     $db->Execute("insert into " . TABLE_CONFIGURATION . "
  281.                (configuration_title, configuration_key, configuration_value,
  282.                 configuration_description, configuration_group_id, sort_order, date_added)
  283.                 values ('Installed Modules', '" . zen_db_input($module_key) . "', '" . zen_db_input(implode(';', $installed_modules)) . "',
  284.                         'This is automatically updated. No need to edit.', '6', '0', now())");
  285.   }
  286.   if (isset($zc_valid) && $zc_valid == false) {
  287.     echo '<span class="alert">' . WARNING_MODULES_SORT_ORDER . '</span>';
  288.   }
  289. ?>
  290.               <tr>
  291.                 <td colspan="3" class="smallText"><?php echo TEXT_MODULE_DIRECTORY . ' ' . $module_directory; ?></td>
  292.               </tr>
  293.             </table></td>
  294. <?php
  295.   $heading = array();
  296.   $contents = array();
  297.   switch ($action) {
  298.     case 'remove':
  299.       $heading[] = array('text' => '<b>' . $mInfo->title . '</b>');
  300.  
  301.       $contents = array('form' => zen_draw_form('module_delete', FILENAME_MODULES, '&action=removeconfirm'));
  302.       $contents[] = array('text' => '<input type="hidden" name="set" value="' . (isset($_GET['set']) ? $_GET['set'] : "") . '" />');
  303.       $contents[] = array('text' => '<input type="hidden" name="module" value="' . (isset($_GET['module']) ? $_GET['module'] : "") . '"/>');
  304.       $contents[] = array('text' => TEXT_DELETE_INTRO);
  305.  
  306.       $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_remove.gif', IMAGE_DELETE, 'name="removeButton"') . ' <a href="' . zen_href_link(FILENAME_MODULES, 'set=' . $set . ($_GET['module'] != '' ? '&module=' . $_GET['module'] : ''), 'NONSSL') . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL, 'name="cancelButton"') . '</a>');
  307.       break;
  308.     case 'edit':
  309.       if (!$is_ssl_protected && in_array($_GET['module'], array('paypaldp', 'linkpoint_api', 'authorizenet_aim', 'authorizenet_echeck'))) break;
  310.       $keys = '';
  311.       reset($mInfo->keys);
  312.       while (list($key, $value) = each($mInfo->keys)) {
  313.         $keys .= '<b>' . $value['title'] . '</b><br>' . $value['description'] . '<br>';
  314.         if ($value['set_function']) {
  315.           eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
  316.         } else {
  317.           $keys .= zen_draw_input_field('configuration[' . $key . ']', htmlspecialchars($value['value'], ENT_COMPAT, CHARSET, TRUE));
  318.         }
  319.         $keys .= '<br><br>';
  320.       }
  321.       $keys = substr($keys, 0, strrpos($keys, '<br><br>'));
  322.       $heading[] = array('text' => '<b>' . $mInfo->title . '</b>');
  323.       $contents = array('form' => zen_draw_form('modules', FILENAME_MODULES, 'set=' . $set . ($_GET['module'] != '' ? '&module=' . $_GET['module'] : '') . '&action=save', 'post', '', true));
  324.       if (ADMIN_CONFIGURATION_KEY_ON == 1) {
  325.         $contents[] = array('text' => '<strong>Key: ' . $mInfo->code . '</strong><br />');
  326.       }
  327.       $contents[] = array('text' => $keys);
  328.       $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_update.gif', IMAGE_UPDATE, 'name="saveButton"') . ' <a href="' . zen_href_link(FILENAME_MODULES, 'set=' . $set . ($_GET['module'] != '' ? '&module=' . $_GET['module'] : ''), 'NONSSL') . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL, 'name="cancelButton"') . '</a>');
  329.       break;
  330.     default:
  331.       $heading[] = array('text' => '<b>' . $mInfo->title . '</b>');
  332.  
  333.       if ($mInfo->status == '1') {
  334.         $keys = '';
  335.         reset($mInfo->keys);
  336.         while (list(, $value) = each($mInfo->keys)) {
  337.           $keys .= '<b>' . $value['title'] . '</b><br>';
  338.           if ($value['use_function']) {
  339.             $use_function = $value['use_function'];
  340.             if (preg_match('/->/', $use_function)) {
  341.               $class_method = explode('->', $use_function);
  342.               if (!is_object(${$class_method[0]})) {
  343.                 include(DIR_WS_CLASSES . $class_method[0] . '.php');
  344.                 ${$class_method[0]} = new $class_method[0]();
  345.               }
  346.               $keys .= zen_call_function($class_method[1], $value['value'], ${$class_method[0]});
  347.             } else {
  348.               $keys .= zen_call_function($use_function, $value['value']);
  349.             }
  350.           } else {
  351.             $keys .= $value['value'];
  352.           }
  353.           $keys .= '<br><br>';
  354.         }
  355.  
  356.         if (ADMIN_CONFIGURATION_KEY_ON == 1) {
  357.           $contents[] = array('text' => '<strong>Key: ' . $mInfo->code . '</strong><br />');
  358.         }
  359.         $keys = substr($keys, 0, strrpos($keys, '<br><br>'));
  360.         if (!(!$is_ssl_protected && in_array($mInfo->code, array('paypaldp', 'linkpoint_api', 'authorizenet_aim', 'authorizenet_echeck')))) {
  361.           $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_MODULES, 'set=' . $set . (isset($_GET['module']) ? '&module=' . $_GET['module'] : '') . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT, 'name="editButton"') . '</a>');
  362.         } else {
  363.           $contents[] = array('align' => 'center', 'text' => TEXT_WARNING_SSL_EDIT);
  364.         }
  365.         $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $mInfo->code . '&action=remove', 'NONSSL') . '">' . zen_image_button('button_module_remove.gif', IMAGE_MODULE_REMOVE, 'name="removeButton"') . '</a>');
  366.         $contents[] = array('text' => '<br>' . $mInfo->description);
  367.         $contents[] = array('text' => '<br>' . $keys);
  368.       } else {
  369.         if (!(!$is_ssl_protected && in_array($mInfo->code, array('paypaldp', 'linkpoint_api', 'authorizenet_aim', 'authorizenet_echeck')))) {
  370.           $contents[] = array('align' => 'center', 'text' => zen_draw_form('install_module', FILENAME_MODULES, 'set=' . $set . '&action=install') . '<input type="hidden" name="module" value="' . $mInfo->code . '" />' . zen_image_submit('button_module_install.gif', IMAGE_MODULE_INSTALL, 'name="installButton"') . '</form>');
  371.         } else {
  372.           $contents[] = array('align' => 'center', 'text' => TEXT_WARNING_SSL_INSTALL);
  373.         }
  374.         $contents[] = array('text' => '<br>' . $mInfo->description);
  375.       }
  376.       break;
  377.   }
  378.   if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
  379.     echo '            <td width="25%" valign="top">' . "\n";
  380.     $box = new box;
  381.     echo $box->infoBox($heading, $contents);
  382.     echo '            </td>' . "\n";
  383.   }
  384. ?>
  385.           </tr>
  386.         </table></td>
  387.       </tr>
  388.     </table></td>
  389. <!-- body_text_eof //-->
  390.   </tr>
  391. </table>
  392. <!-- body_eof //-->
  393. <!-- footer //-->
  394. <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
  395. <!-- footer_eof //-->
  396. <br>
  397. </body>
  398. </html>
  399. <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


cron