[TEP-COMMIT] [CVS admin] update to the template structure

anonymous-OfajU3CKLf1/[email protected] 22 Jul 2004 23:29:32 -0000
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
Commit in admin/admin on MAIN

modules.php +44 -236 1.48 -> 1.49

templates/pages/modules.php +180 added 1.1

+224 -236

1 added + 1 modified, total 2 files

update to the template structure

----------

admin /admin

modules.php 1.48 -> 1.49

diff -u -r1.48 -r1.49
--- modules.php 2004/04/16 14:02:09 1.48
+++ modules.php 2004/07/22 23:29:30 1.49
@@ -5,59 +5,80 @@

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

- Copyright (c) 2003 osCommerce

+ Copyright (c) 2004 osCommerce

Released under the GNU General Public License
*/

require('includes/application_top.php');

- $set = (isset($HTTP_GET_VARS['set']) ? $HTTP_GET_VARS['set'] : '');

+ $selected_box = 'modules';

- if (tep_not_null($set)) {

+ $set = (isset($_GET['set']) ? $_GET['set'] : '');
+
+ $action = (isset($_GET['action']) ? $_GET['action'] : '');
+
+ $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
+
+ if (!empty($set)) {

switch ($set) {
case 'shipping':
$module_type = 'shipping';

- $module_directory = DIR_FS_CATALOG_MODULES . 'shipping/';

$module_key = 'MODULE_SHIPPING_INSTALLED';
define('HEADING_TITLE', HEADING_TITLE_MODULES_SHIPPING);
break;
case 'ordertotal':
$module_type = 'order_total';

- $module_directory = DIR_FS_CATALOG_MODULES . 'order_total/';

$module_key = 'MODULE_ORDER_TOTAL_INSTALLED';
define('HEADING_TITLE', HEADING_TITLE_MODULES_ORDER_TOTAL);
break;
case 'payment':
default:
$module_type = 'payment';

- $module_directory = DIR_FS_CATALOG_MODULES . 'payment/';

$module_key = 'MODULE_PAYMENT_INSTALLED';
define('HEADING_TITLE', HEADING_TITLE_MODULES_PAYMENT);
break;
}
}

-
- $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

- if (tep_not_null($action)) {

+ if (!empty($action)) {

switch ($action) {
case 'save':

- while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {
- tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
- }

+ if (isset($_POST['configuration']) && is_array($_POST['configuration'])) {
+ $error = false;

- osC_Cache::clear('configuration');

+ $osC_Database->startTransaction();
+
+ foreach ($_POST['configuration'] as $key => $value) {
+ $Qupdate = $osC_Database->query('update :table_configuration set configuration_value = :configuration_value where configuration_key = :configuration_key');
+ $Qupdate->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qupdate->bindValue(':configuration_value', $value);
+ $Qupdate->bindValue(':configuration_key', $key);
+ $Qupdate->execute();
+
+ if ($osC_Database->isError()) {
+ $error = true;
+ break;
+ }
+ }
+
+ if ($error === false) {
+ $osC_Database->commitTransaction();

- tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));

+ osC_Cache::clear('configuration');
+ } else {
+ $osC_Database->rollbackTransaction();
+ }
+ }
+
+ tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $_GET['module']));

break;
case 'install':
case 'remove':

- $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
- $class = basename($HTTP_GET_VARS['module']);
- if (file_exists($module_directory . $class . $file_extension)) {
- include($module_directory . $class . $file_extension);
- $module = new $class;

+ if (file_exists('../includes/modules/' . $module_type . '/' . $_GET['module'] . $file_extension)) {
+ include('../includes/languages/' . $osC_Session->value('language') . '/modules/' . $module_type . '/' . $_GET['module'] . $file_extension);
+ include('../includes/modules/' . $module_type . '/' . $_GET['module'] . $file_extension);
+ $module = new $_GET['module'];

if ($action == 'install') {
$module->install();
} elseif ($action == 'remove') {

@@ -67,227 +88,14 @@

osC_Cache::clear('configuration');

- tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class));

+ tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $_GET['module']));

break;
}
}

-?>
-<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html <?php echo HTML_PARAMS; ?>>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
-<title><?php echo TITLE; ?></title>
-<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
-<script language="javascript" src="includes/general.js"></script>
-</head>
-<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
-<!-- header //-->
-<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
-<!-- header_eof //-->
-
-<!-- body //-->
-<table border="0" width="100%" cellspacing="2" cellpadding="2">
- <tr>
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
-<!-- left_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
-<!-- left_navigation_eof //-->
- </table></td>
-<!-- body_text //-->
- <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
- <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr class="dataTableHeadingRow">
- <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_MODULES; ?></td>
- <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SORT_ORDER; ?></td>
- <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
- </tr>
-<?php
- $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
- $directory_array = array();
- if ($dir = @dir($module_directory)) {
- while ($file = $dir->read()) {
- if (!is_dir($module_directory . $file)) {
- if (substr($file, strrpos($file, '.')) == $file_extension) {
- $directory_array[] = $file;
- }
- }
- }
- sort($directory_array);
- $dir->close();
- }

- $installed_modules = array();
- for ($i=0, $n=sizeof($directory_array); $i<$n; $i++) {
- $file = $directory_array[$i];
-
- include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/' . $module_type . '/' . $file);
- include($module_directory . $file);
-
- $class = substr($file, 0, strrpos($file, '.'));
- if (tep_class_exists($class)) {
- $module = new $class;
- if ($module->check() > 0) {
- if ($module->sort_order > 0) {
- $installed_modules[$module->sort_order] = $file;
- } else {
- $installed_modules[] = $file;
- }
- }

+ $page_contents = 'modules.php';

- if ((!isset($HTTP_GET_VARS['module']) || (isset($HTTP_GET_VARS['module']) && ($HTTP_GET_VARS['module'] == $class))) && !isset($mInfo)) {
- $module_info = array('code' => $module->code,
- 'title' => $module->title,
- 'description' => $module->description,
- 'status' => $module->check());
-
- $module_keys = $module->keys();
-
- $keys_extra = array();
- for ($j=0, $k=sizeof($module_keys); $j<$k; $j++) {
- $key_value_query = tep_db_query("select configuration_title, configuration_value, configuration_description, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $module_keys[$j] . "'");
- $key_value = tep_db_fetch_array($key_value_query);
-
- $keys_extra[$module_keys[$j]]['title'] = $key_value['configuration_title'];
- $keys_extra[$module_keys[$j]]['value'] = $key_value['configuration_value'];
- $keys_extra[$module_keys[$j]]['description'] = $key_value['configuration_description'];
- $keys_extra[$module_keys[$j]]['use_function'] = $key_value['use_function'];
- $keys_extra[$module_keys[$j]]['set_function'] = $key_value['set_function'];
- }

+ require('templates/default.php');

- $module_info['keys'] = $keys_extra;
-
- $mInfo = new objectInfo($module_info);
- }
-
- if (isset($mInfo) && is_object($mInfo) && ($class == $mInfo->code) ) {
- if ($module->check() > 0) {
- echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class . '&action=edit') . '\'">' . "\n";
- } else {
- echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n";
- }
- } else {
- echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class) . '\'">' . "\n";
- }
-?>
- <td class="dataTableContent"><?php echo $module->title; ?></td>
- <td class="dataTableContent" align="right"><?php if (is_numeric($module->sort_order)) echo $module->sort_order; ?></td>
- <td class="dataTableContent" align="right"><?php if (isset($mInfo) && is_object($mInfo) && ($class == $mInfo->code) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
- </tr>
-<?php
- }
- }
-
- ksort($installed_modules);
- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = '" . $module_key . "'");
- if (tep_db_num_rows($check_query)) {
- $check = tep_db_fetch_array($check_query);
- if ($check['configuration_value'] != implode(';', $installed_modules)) {
- tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . implode(';', $installed_modules) . "', last_modified = now() where configuration_key = '" . $module_key . "'");
- }
- } else {
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Installed Modules', '" . $module_key . "', '" . implode(';', $installed_modules) . "', 'This is automatically updated. No need to edit.', '6', '0', now())");
- }
-?>
- <tr>
- <td colspan="3" class="smallText"><?php echo TEXT_MODULE_DIRECTORY . ' ' . $module_directory; ?></td>
- </tr>
- </table></td>
-<?php
- $heading = array();
- $contents = array();
-
- switch ($action) {
- case 'edit':
- $keys = '';
- reset($mInfo->keys);
- while (list($key, $value) = each($mInfo->keys)) {
- $keys .= '<b>' . $value['title'] . '</b><br>' . $value['description'] . '<br>';
-
- if ($value['set_function']) {
- eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
- } else {
- $keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
- }
- $keys .= '<br><br>';
- }
- $keys = substr($keys, 0, strrpos($keys, '<br><br>'));
-
- $heading[] = array('text' => '<b>' . $mInfo->title . '</b>');
-
- $contents = array('form' => tep_draw_form('modules', FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module'] . '&action=save'));
- $contents[] = array('text' => $keys);
- $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
- break;
- default:
- $heading[] = array('text' => '<b>' . $mInfo->title . '</b>');
-
- if ($mInfo->status == '1') {
- $keys = '';
- reset($mInfo->keys);
- while (list(, $value) = each($mInfo->keys)) {
- $keys .= '<b>' . $value['title'] . '</b><br>';
- if ($value['use_function']) {
- $use_function = $value['use_function'];
- if (ereg('->', $use_function)) {
- $class_method = explode('->', $use_function);
- if (!is_object(${$class_method[0]})) {
- include(DIR_WS_CLASSES . $class_method[0] . '.php');
- ${$class_method[0]} = new $class_method[0]();
- }
- $keys .= tep_call_function($class_method[1], $value['value'], ${$class_method[0]});
- } else {
- $keys .= tep_call_function($use_function, $value['value']);
- }
- } else {
- $keys .= $value['value'];
- }
- $keys .= '<br><br>';
- }
- $keys = substr($keys, 0, strrpos($keys, '<br><br>'));
-
- $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $mInfo->code . '&action=remove') . '">' . tep_image_button('button_module_remove.gif', IMAGE_MODULE_REMOVE) . '</a> <a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . (isset($HTTP_GET_VARS['module']) ? '&module=' . $HTTP_GET_VARS['module'] : '') . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
- $contents[] = array('text' => '<br>' . $mInfo->description);
- $contents[] = array('text' => '<br>' . $keys);
- } else {
- $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $mInfo->code . '&action=install') . '">' . tep_image_button('button_module_install.gif', IMAGE_MODULE_INSTALL) . '</a>');
- $contents[] = array('text' => '<br>' . $mInfo->description);
- }
- break;
- }
-
- if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
- echo ' <td width="25%" valign="top">' . "\n";
-
- $box = new box;
- echo $box->infoBox($heading, $contents);
-
- echo ' </td>' . "\n";
- }

+ require('includes/application_bottom.php');

?>

- </tr>
- </table></td>
- </tr>
- </table></td>
-<!-- body_text_eof //-->
- </tr>
-</table>
-<!-- body_eof //-->
-
-<!-- footer //-->
-<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
-<!-- footer_eof //-->
-<br>
-</body>
-</html>
-<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

----------

admin /admin /templates /pages

modules.php added at 1.1

diff -N modules.php
--- /dev/null Fri Jul 23 01:29:26 2004
+++ /tmp/cvsAAAUjayLd Fri Jul 23 01:29:31 2004
@@ -0,0 +1,180 @@

+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+ $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
+
+ $directory_array = array();
+ if ($dir = @dir('../includes/modules/' . $module_type)) {
+ while ($file = $dir->read()) {
+ if (!is_dir('../includes/modules/' . $module_type . '/' . $file)) {
+ if (substr($file, strrpos($file, '.')) == $file_extension) {
+ $directory_array[] = $file;
+ }
+ }
+ }
+ sort($directory_array);
+ $dir->close();
+ }
+?>
+
+<h1><?php echo HEADING_TITLE; ?></h1>
+
+<div id="infoBox_mDefault" <?php if (!empty($action)) { echo 'style="display: none;"'; } ?>>
+ <table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo TABLE_HEADING_MODULES; ?></th>
+ <th><?php echo TABLE_HEADING_SORT_ORDER; ?></th>
+ <th><?php echo TABLE_HEADING_STATUS; ?></th>
+ <th><?php echo TABLE_HEADING_ACTION; ?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+ $installed_modules = array();
+ foreach ($directory_array as $file) {
+ include('../includes/languages/' . $osC_Session->value('language') . '/modules/' . $module_type . '/' . $file);
+ include('../includes/modules/' . $module_type . '/' . $file);
+
+ $class = substr($file, 0, strrpos($file, '.'));
+ if (class_exists($class)) {
+ $module = new $class;
+ if ($module->check() > 0) {
+ if (($module->sort_order > 0) && !isset($installed_modules[$module->sort_order])) {
+ $installed_modules[$module->sort_order] = $file;
+ } else {
+ $installed_modules[] = $file;
+ }
+ }
+
+ if (!isset($mInfo) && (!isset($_GET['module']) || (isset($_GET['module']) && ($_GET['module'] == $class)))) {
+ $module_info = array('code' => $module->code,
+ 'title' => $module->title,
+ 'description' => $module->description,
+ 'installed' => ($module->check() ? true : false),
+ 'status' => $module->enabled);
+
+ $module_keys = $module->keys();
+
+ $keys_extra = array();
+ foreach ($module_keys as $key) {
+ $key_value_query = tep_db_query("select configuration_title, configuration_value, configuration_description, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $key . "'");
+ $key_value = tep_db_fetch_array($key_value_query);
+
+ $keys_extra[$key]['title'] = $key_value['configuration_title'];
+ $keys_extra[$key]['value'] = $key_value['configuration_value'];
+ $keys_extra[$key]['description'] = $key_value['configuration_description'];
+ $keys_extra[$key]['use_function'] = $key_value['use_function'];
+ $keys_extra[$key]['set_function'] = $key_value['set_function'];
+ }
+
+ $module_info['keys'] = $keys_extra;
+
+ $mInfo = new objectInfo($module_info);
+ }
+
+ if (isset($mInfo) && ($class == $mInfo->code) ) {
+ echo ' <tr class="selected">' . "\n";
+ } else {
+ echo ' <tr onMouseOver="rowOverEffect(this);" onMouseOut="rowOutEffect(this);" onClick="document.location.href=\'' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class) . '\';">' . "\n";
+ }
+?>
+ <td><?php echo $module->title; ?></td>
+ <td><?php if (isset($module->sort_order) && is_numeric($module->sort_order)) echo $module->sort_order; ?></td>
+ <td align="center"><?php echo tep_image('templates/' . $template . '/images/icons/' . (($module->check() > 0) ? ($module->enabled ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif') : 'checkbox.gif')); ?></td>
+ <td align="right">
+<?php
+ if (isset($mInfo) && ($class == $mInfo->code)) {
+ if ($mInfo->installed === true) {
+ echo '<a href="#" onClick="toggleInfoBox(\'mUninstall\');">' . tep_image('templates/' . $template . '/images/icons/16x16/stop.png', IMAGE_MODULE_REMOVE, '16', '16') . '</a>&nbsp;' .
+ '<a href="#" onClick="toggleInfoBox(\'mEdit\');">' . tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . '</a>';
+ } else {
+ echo '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class . '&action=install') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/play.png', IMAGE_MODULE_INSTALL, '16', '16') . '</a>&nbsp;' .
+ tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '16', '16');
+ }
+ } else {
+ if (($module->check() > 0) && $module->enabled === true) {
+ echo '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class . '&action=mUninstall') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/stop.png', IMAGE_MODULE_REMOVE, '16', '16') . '</a>&nbsp;' .
+ '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class . '&action=mEdit') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . '</a>';
+ } else {
+ echo '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class . '&action=install') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/play.png', IMAGE_MODULE_INSTALL, '16', '16') . '</a>&nbsp;' .
+ tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '16', '16');
+ }
+ }
+?>
+ </td>
+ </tr>
+<?php
+ }
+ }
+
+ ksort($installed_modules);
+ if (constant($module_key) != implode(';', $installed_modules)) {
+ $Qupdate = $osC_Database->query('update :table_configuration set configuration_value = :configuration_value, last_modified = now() where configuration_key = :configuration_key');
+ $Qupdate->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qupdate->bindValue(':configuration_value', implode(';', $installed_modules));
+ $Qupdate->bindValue(':configuration_key', $module_key);
+ $Qupdate->execute();
+
+ if ($Qupdate->affectedRows()) {
+ osC_Cache::clear('configuration');
+ }
+ }
+?>
+ </tbody>
+ </table>
+
+ <p><?php echo TEXT_MODULE_DIRECTORY . ' ' . realpath(dirname(__FILE__) . '/../../../includes/modules/' . $module_type); ?></p>
+</div>
+
+<?php
+ if (isset($mInfo)) {
+?>
+
+<div id="infoBox_mUninstall" <?php if ($action != 'mUninstall') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/stop.png', IMAGE_MODULE_REMOVE, '16', '16') . ' ' . $mInfo->title; ?></div>
+ <div class="infoBoxContent">
+ <p><?php echo INFO_MODULE_UNINSTALL_INTRO; ?></p>
+ <p align="center"><?php echo '<input type="button" value="' . IMAGE_MODULE_REMOVE . '" class="operationButton" onClick="document.location.href=\'' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $mInfo->code . '&action=remove') . '\';"> <input type="button" value="' . IMAGE_CANCEL . '" class="operationButton" onClick="toggleInfoBox(\'mDefault\');">'; ?></p>
+ </div>
+</div>
+
+<div id="infoBox_mEdit" <?php if ($action != 'mEdit') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . ' ' . $mInfo->title; ?></div>
+ <div class="infoBoxContent">
+ <?php echo tep_draw_form('mEdit', FILENAME_MODULES, 'set=' . $set . '&module=' . $mInfo->code . '&action=save'); ?>
+
+<?php
+ $keys = '';
+ foreach ($mInfo->keys as $key => $value) {
+ $keys .= '<b>' . $value['title'] . '</b><br>' . $value['description'] . '<br>';
+
+ if ($value['set_function']) {
+ eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
+ } else {
+ $keys .= osc_draw_input_field('configuration[' . $key . ']', $value['value']);
+ }
+ $keys .= '<br><br>';
+ }
+ $keys = substr($keys, 0, strrpos($keys, '<br><br>'));
+?>
+ <p><?php echo $keys; ?></p>
+
+ <p align="center"><?php echo '<input type="submit" value="' . IMAGE_SAVE . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'mDefault\');" class="operationButton">'; ?></p>
+
+ </form>
+ </div>
+</div>
+
+<?php
+ }
+?>

CVSspam 0.2.8

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click