[TEP-COMMIT] [CVS admin] update to the template structure
anonymous-OfajU3CKLf1/[email protected] 22 Jul 2004 23:30:43 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit in admin/admin on MAIN
services.php +83 -252 1.1 -> 1.2
templates/pages/services.php +160 added 1.1
+243 -252
1 added + 1 modified, total 2 files
update to the template structure
----------
admin /admin
services.php 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- services.php 2004/04/13 08:19:16 1.1
+++ services.php 2004/07/22 23:30:41 1.2
@@ -5,63 +5,101 @@
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');
- $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
+ $selected_box = 'configuration';
+ $action = (isset($_GET['action']) ? $_GET['action'] : '');
+
$installed = explode(';', MODULE_SERVICES_INSTALLED);
$file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
- if (tep_not_null($action)) {
+ if (!empty($action)) {
switch ($action) {
case 'save':
- foreach ($HTTP_POST_VARS['configuration'] as $key => $value) {
- tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
- }
+ if (isset($_POST['configuration' ]) && is_array($_POST['configuration']) && (sizeof($_POST['configuration']) > 0)) {
+ $osC_Database->startTransaction();
+
+ $error = false;
+ $modified = false;
+
+ foreach ($_POST['configuration'] as $key => $value) {
+ $Qsu = $osC_Database->query('update :table_configuration set configuration_value = :configuration_value where configuration_key = :configuration_key');
+ $Qsu->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qsu->bindValue(':configuration_value', $value);
+ $Qsu->bindvalue(':configuration_key', $key);
+ $Qsu->execute();
+
+ if ($Qsu->affectedRows() && ($modified === false)) {
+ $modified = true;
+ }
+
+ if ($osC_Database->isError()) {
+ $error = true;
+ break;
+ }
+ }
+
+ if (($modified === true) && ($error === false)) {
+ $osC_Database->commitTransaction();
+
+ osC_Cache::clear('configuration');
- osC_Cache::clear('configuration');
+ $messageStack->add_session(SUCCESS_DB_ROWS_UPDATED, 'success');
+ } else {
+ $osC_Database->rollbackTransaction();
+
+ $messageStack->add_session(WARNING_DB_ROWS_NOT_UPDATED, 'warning');
+ }
+ }
- tep_redirect(tep_href_link(FILENAME_SERVICES, 'service=' . $HTTP_GET_VARS['service']));
+ tep_redirect(tep_href_link(FILENAME_SERVICES, 'service=' . $_GET['service']));
break;
case 'remove':
- $service = tep_db_prepare_input($HTTP_GET_VARS['service']);
-
- if (($key = array_search($service, $installed)) !== false) {
- include(DIR_FS_CATALOG_MODULES . '/services/' . $service . $file_extension);
- $class = 'osC_Services_' . $service;
+ if (($key = array_search($_GET['service'], $installed)) !== false) {
+ include('../includes/modules/services/' . $_GET['service'] . $file_extension);
+ $class = 'osC_Services_' . $_GET['service'];
$module = new $class;
$module->remove();
unset($installed[$key]);
- tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . implode(';', $installed) . "' where configuration_key = 'MODULE_SERVICES_INSTALLED'");
+ $Qsu = $osC_Database->query('update :table_configuration set configuration_value = :configuration_value where configuration_key = :configuration_key');
+ $Qsu->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qsu->bindValue(':configuration_value', implode(';', $installed));
+ $Qsu->bindValue(':configuration_key', 'MODULE_SERVICES_INSTALLED');
+ $Qsu->execute();
- osC_Cache::clear('configuration');
+ if ($Qsu->affectedRows()) {
+ osC_Cache::clear('configuration');
+
+ $messageStack->add_session(SUCCESS_DB_ROWS_UPDATED, 'success');
+ } else {
+ $messageStack->add_session(WARNING_DB_ROWS_NOT_UPDATED, 'warning');
+ }
}
- tep_redirect(tep_href_link(FILENAME_SERVICES, 'service=' . $HTTP_GET_VARS['service']));
+ tep_redirect(tep_href_link(FILENAME_SERVICES, 'service=' . $_GET['service']));
break;
case 'install':
- $service = tep_db_prepare_input($HTTP_GET_VARS['service']);
-
- if (array_search($service, $installed) === false) {
- include(DIR_FS_CATALOG_MODULES . '/services/' . $service . $file_extension);
- $class = 'osC_Services_' . $service;
+ if (array_search($_GET['service'], $installed) === false) {
+ include('../includes/modules/services/' . $_GET['service'] . $file_extension);
+ $class = 'osC_Services_' . $_GET['service'];
$module = new $class;
$module->install();
if (isset($module->depends)) {
if (is_string($module->depends) && (($key = array_search($module->depends, $installed)) !== false)) {
if (isset($installed[$key+1])) {
- array_splice($installed, $key+1, 0, $service);
+ array_splice($installed, $key+1, 0, $_GET['service']);
} else {
- $installed[] = $service;
+ $installed[] = $_GET['service'];
}
} elseif (is_array($module->depends)) {
foreach ($module->depends as $depends_module) {
@@ -73,17 +111,17 @@
}
if (isset($array_position)) {
- array_splice($installed, $array_position+1, 0, $service);
+ array_splice($installed, $array_position+1, 0, $_GET['service']);
} else {
- $installed[] = $service;
+ $installed[] = $_GET['service'];
}
}
} elseif (isset($module->preceeds)) {
if (is_string($module->preceeds)) {
if ((($key = array_search($module->preceeds, $installed)) !== false)) {
- array_splice($installed, $key, 0, $service);
+ array_splice($installed, $key, 0, $_GET['service']);
} else {
- $installed[] = $service;
+ $installed[] = $_GET['service'];
}
} elseif (is_array($module->preceeds)) {
foreach ($module->preceeds as $preceeds_module) {
@@ -95,245 +133,38 @@
}
if (isset($array_position)) {
- array_splice($installed, $array_position, 0, $service);
+ array_splice($installed, $array_position, 0, $_GET['service']);
} else {
- $installed[] = $service;
+ $installed[] = $_GET['service'];
}
}
} else {
- $installed[] = $service;
+ $installed[] = $_GET['service'];
}
-
- tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . implode(';', $installed) . "' where configuration_key = 'MODULE_SERVICES_INSTALLED'");
- osC_Cache::clear('configuration');
- }
+ $Qsu = $osC_Database->query('update :table_configuration set configuration_value = :configuration_value where configuration_key = :configuration_key');
+ $Qsu->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qsu->bindValue(':configuration_value', implode(';', $installed));
+ $Qsu->bindValue(':configuration_key', 'MODULE_SERVICES_INSTALLED');
+ $Qsu->execute();
- tep_redirect(tep_href_link(FILENAME_SERVICES, 'service=' . $HTTP_GET_VARS['service']));
- break;
- }
- }
+ if ($Qsu->affectedRows()) {
+ osC_Cache::clear('configuration');
- $directory_array = array();
- if ($dir = @dir(DIR_FS_CATALOG_MODULES . '/services/')) {
- 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();
- }
-?>
-<!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" onload="SetFocus();">
-<!-- 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_SERVICES; ?></td>
- <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td>
- <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
- </tr>
-<?php
- foreach ($directory_array as $service_module) {
- include(DIR_FS_CATALOG_MODULES . '/services/' . $service_module);
- $class_code = substr($service_module, 0, strrpos($service_module, '.'));
- $class = 'osC_Services_' . $class_code;
- $module = new $class;
-
- if ((!isset($HTTP_GET_VARS['service']) || (isset($HTTP_GET_VARS['service']) && ($HTTP_GET_VARS['service'] == $class_code))) && !isset($sInfo)) {
- $module_info = array('code' => $class_code,
- 'title' => $module->title,
- 'description' => $module->description,
- 'status' => in_array($class_code, $installed),
- 'uninstallable' => $module->uninstallable,
- 'preceeds' => $module->preceeds);
-
- $module_keys = $module->keys();
- $keys_extra = array();
-
- if (is_array($module_keys) && (sizeof($module_keys) > 0)) {
- 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;
-
- $sInfo = new objectInfo($module_info);
- }
-
- if (isset($sInfo) && is_object($sInfo) && ($class_code == $sInfo->code) ) {
- echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n";
- } else {
- echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n";
- }
-?>
- <td class="dataTableContent" onclick="document.location.href='<?php echo tep_href_link(FILENAME_SERVICES, 'service=' . $class_code); ?>'"><?php echo (isset($module->title) ? $module->title : $class_code); ?></td>
- <td class="dataTableContent" align="center">
-<?php
- if (in_array($class_code, $installed)) {
- echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' ' . ($module->uninstallable ? tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) : tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', 10, 10));
- } else {
- echo tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . ' ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
- }
-?>
- </td>
- <td class="dataTableContent" align="right"><?php if (isset($sInfo) && is_object($sInfo) && ($class_code == $sInfo->code)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_SERVICES, 'service=' . $class_code) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
- </tr>
-<?php
- }
-?>
- <tr>
- <td colspan="3" class="smallText"><?php echo TEXT_MODULE_DIRECTORY . ' ' . DIR_FS_CATALOG_MODULES . 'services/'; ?></td>
- </tr>
- </table></td>
-<?php
- $heading = array();
- $contents = array();
-
- switch ($action) {
- case 'edit':
- $keys = '';
- foreach ($sInfo->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 .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
- }
- $keys .= '<br><br>';
- }
- $keys = substr($keys, 0, strrpos($keys, '<br><br>'));
-
- $heading[] = array('text' => '<b>' . $sInfo->title . '</b>');
-
- $contents = array('form' => tep_draw_form('modules', FILENAME_SERVICES, '&service=' . $HTTP_GET_VARS['service'] . '&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_SERVICES, 'service=' . $HTTP_GET_VARS['service']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
- break;
- default:
- if (isset($sInfo) && is_object($sInfo)) {
- $heading[] = array('text' => '<b>' . $sInfo->title . '</b>');
-
- $keys = '';
- if ($sInfo->uninstallable || (sizeof($sInfo->keys > 0))) {
- if ($sInfo->status) {
- $contents[] = array('align' => 'center', 'text' => ($sInfo->uninstallable ? '<a href="' . tep_href_link(FILENAME_SERVICES, 'service=' . $sInfo->code . '&action=remove') . '">' . tep_image_button('button_module_remove.gif', IMAGE_MODULE_REMOVE) . '</a>' : '') . ((sizeof($sInfo->keys) > 0) ? ' <a href="' . tep_href_link(FILENAME_SERVICES, 'service=' . $sInfo->code . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>' : ''));
-
- if (sizeof($sInfo->keys) > 0) {
- $keys = '<br>';
-
- foreach ($sInfo->keys as $value) {
- $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('includes/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>'));
- }
+ $messageStack->add_session(SUCCESS_DB_ROWS_UPDATED, 'success');
} else {
- $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_SERVICES, 'service=' . $sInfo->code . '&action=install') . '">' . tep_image_button('button_module_install.gif', IMAGE_MODULE_INSTALL) . '</a>');
+ $messageStack->add_session(WARNING_DB_ROWS_NOT_UPDATED, 'warning');
}
}
-
- $contents[] = array('text' => $sInfo->description);
-
- if (!empty($sInfo->preceeds)) {
- $preceeds_string = '<u>Preceeds</u><br>';
- if (is_string($sInfo->preceeds)) {
- $preceeds_string .= $sInfo->preceeds;
- } else {
- foreach ($sInfo->preceeds as $preceeds) {
- $preceeds_string .= $preceeds . '<br>';
- }
- }
-
- $contents[] = array('text' => $preceeds_string);
- }
-
- $contents[] = array('text' => $keys);
- }
- break;
+ tep_redirect(tep_href_link(FILENAME_SERVICES, 'service=' . $_GET['service']));
+ break;
+ }
}
- if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
- echo ' <td width="25%" valign="top">' . "\n";
+ $page_contents = 'services.php';
- $box = new box;
- echo $box->infoBox($heading, $contents);
+ require('templates/default.php');
- 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
services.php added at 1.1
diff -N services.php
--- /dev/null Fri Jul 23 01:30:41 2004
+++ /tmp/cvsAAAKqaWef Fri Jul 23 01:30:41 2004
@@ -0,0 +1,160 @@
+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+ $directory_array = array();
+ if ($dir = @dir('../includes/modules/services/')) {
+ while ($file = $dir->read()) {
+ if (!is_dir('../includes/modules/services/' . $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_sDefault" <?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_SERVICES; ?></th>
+ <th><?php echo TABLE_HEADING_ACTION; ?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+ foreach ($directory_array as $service_module) {
+ include('../includes/modules/services/' . $service_module);
+ $class_code = substr($service_module, 0, strrpos($service_module, '.'));
+ $class = 'osC_Services_' . $class_code;
+ $module = new $class();
+
+ $module_keys = $module->keys();
+
+ if (!isset($sInfo) && (!isset($_GET['service']) || (isset($_GET['service']) && ($_GET['service'] == $class_code)))) {
+ $module_info = array('code' => $class_code,
+ 'title' => $module->title,
+ 'description' => $module->description,
+ 'status' => in_array($class_code, $installed),
+ 'uninstallable' => $module->uninstallable,
+ 'preceeds' => $module->preceeds,
+ 'keys' => array());
+
+ if (is_array($module_keys) && (sizeof($module_keys) > 0)) {
+ $Qsm = $osC_Database->query('select configuration_title, configuration_key, configuration_value, configuration_description, use_function, set_function from :table_configuration where configuration_key in (:configuration_key)');
+ $Qsm->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qsm->bindRaw(':configuration_key', "'" . implode("', '", $module_keys) . "'");
+ $Qsm->execute();
+
+ while ($Qsm->next()) {
+ $module_info['keys'][$Qsm->value('configuration_key')] = array('title' => $Qsm->value('configuration_title'),
+ 'value' => $Qsm->value('configuration_value'),
+ 'description' => $Qsm->value('configuration_description'),
+ 'use_function' => $Qsm->value('use_function'),
+ 'set_function' => $Qsm->value('set_function'));
+ }
+ }
+
+ $sInfo = new objectInfo($module_info);
+ }
+
+ if (isset($sInfo) && ($class_code == $sInfo->code) ) {
+ echo ' <tr class="selected" title="' . $module->description . '">' . "\n";
+ } else {
+ echo ' <tr onMouseOver="rowOverEffect(this);" onMouseOut="rowOutEffect(this);" onClick="document.location.href=\'' . tep_href_link(FILENAME_SERVICES, 'service=' . $class_code) . '\';" title="' . $module->description . '">' . "\n";
+ }
+?>
+ <td><?php echo (isset($module->title) ? $module->title : $class_code); ?></td>
+ <td align="right">
+<?php
+ if (in_array($class_code, $installed) === false) {
+ echo '<a href="' . tep_href_link(FILENAME_SERVICES, 'service=' . $class_code . '&action=install') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/play.png', IMAGE_MODULE_INSTALL, '16', '16') . '</a> ';
+ } elseif ($module->uninstallable) {
+ if (isset($sInfo) && ($class_code == $sInfo->code) ) {
+ echo '<a href="#" onClick="toggleInfoBox(\'sUninstall\');">' . tep_image('templates/' . $template . '/images/icons/16x16/stop.png', IMAGE_MODULE_REMOVE, '16', '16') . '</a> ';
+ } else {
+ echo '<a href="' . tep_href_link(FILENAME_SERVICES, 'service=' . $class_code . '&action=sDelete') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/stop.png', IMAGE_MODULE_REMOVE, '16', '16') . '</a> ';
+ }
+ } else {
+ echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '16', '16') . ' ';
+ }
+
+ if (is_array($module_keys) && (sizeof($module_keys) > 0)) {
+ if (isset($sInfo) && ($class_code == $sInfo->code) ) {
+ echo '<a href="#" onClick="toggleInfoBox(\'sEdit\');">' . tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . '</a>';
+ } else {
+ echo '<a href="' . tep_href_link(FILENAME_SERVICES, 'service=' . $class_code . '&action=sEdit') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . '</a>';
+ }
+ } else {
+ echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '16', '16');
+ }
+?>
+ </td>
+ </tr>
+<?php
+ }
+?>
+ </tbody>
+ </table>
+
+ <p class="smallText"><?php echo TEXT_MODULE_DIRECTORY . ' ' . realpath(dirname(__FILE__) . '/../../../includes/modules/services/'); ?></p>
+</div>
+
+<?php
+ if (isset($sInfo)) {
+?>
+
+<div id="infoBox_sUninstall" <?php if ($action != 'sDelete') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/stop.png', IMAGE_MODULE_REMOVE, '16', '16') . ' ' . $sInfo->title; ?></div>
+ <div class="infoBoxContent">
+ <p><?php echo TEXT_UNINSTALL_INTRO; ?></p>
+ <p><?php echo '<b>' . $sInfo->title . '</b>'; ?></p>
+ <p align="center"><?php echo '<input type="button" value="' . IMAGE_MODULE_REMOVE . '" onClick="document.location.href=\'' . tep_href_link(FILENAME_SERVICES, 'service=' . $sInfo->code . '&action=remove') . '\';" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'sDefault\');" class="operationButton">'; ?></p>
+ </div>
+</div>
+
+<div id="infoBox_sEdit" <?php if ($action != 'sEdit') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . ' ' . $sInfo->title; ?></div>
+ <div class="infoBoxContent">
+ <?php echo tep_draw_form('sEdit', FILENAME_SERVICES, 'service=' . $_GET['service'] . '&action=save'); ?>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+<?php
+ foreach ($sInfo->keys as $key => $value) {
+ if (isset($value['set_function']) && !empty($value['set_function'])) {
+ eval('$value_field = ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
+ } else {
+ $value_field = osc_draw_input_field('configuration[' . $key . ']', $value['value']);
+ }
+?>
+ <tr>
+ <td class="smallText" width="40%" valign="top"><?php echo '<b>' . $value['title'] . '</b><br>' . $value['description']; ?></td>
+ <td class="smallText" width="60%" valign="top"><?php echo $value_field; ?></td>
+ </tr>
+<?php
+ }
+?>
+ </table>
+
+ <p align="center"><?php echo '<input type="submit" value="' . IMAGE_UPDATE . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'sDefault\');" 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