add_session(ERROR_ADMIN_DEMO, 'caution'); zen_redirect(zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cID)); } $configuration_value = zen_db_prepare_input($_POST['configuration_value']); $cID = zen_db_prepare_input($_GET['cID']); $db->Execute("update " . TABLE_CONFIGURATION . " set configuration_value = '" . zen_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'"); $configuration_query = 'select configuration_key as cfgkey, configuration_value as cfgvalue from ' . TABLE_CONFIGURATION; $configuration = $db->Execute($configuration_query); // set the WARN_BEFORE_DOWN_FOR_MAINTENANCE to false if DOWN_FOR_MAINTENANCE = true if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'true') ) { $db->Execute("update " . TABLE_CONFIGURATION . " set configuration_value = 'false', last_modified = '" . NOW . "' where configuration_key = 'WARN_BEFORE_DOWN_FOR_MAINTENANCE'"); } $configuration_query = 'select configuration_key as cfgkey, configuration_value as cfgvalue from ' . TABLE_CONFIGURATION; $configuration = $db->Execute($configuration_query); zen_redirect(zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cID)); break; } } $gID = (isset($_GET['gID'])) ? $_GET['gID'] : 1; $_GET['gID'] = $gID; $cfg_group = $db->Execute("select configuration_group_title from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id = '" . (int)$gID . "'"); if ($gID == 7) { $shipping_errors = ''; if (zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == 'NONE' or zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == '') { $shipping_errors .= '
' . ERROR_SHIPPING_ORIGIN_ZIP; } if (zen_get_configuration_key_value('ORDER_WEIGHT_ZERO_STATUS') == '1' and !defined('MODULE_SHIPPING_FREESHIPPER_STATUS')) { $shipping_errors .= '
' . ERROR_ORDER_WEIGHT_ZERO_STATUS; } if (defined('MODULE_SHIPPING_USPS_STATUS') and (MODULE_SHIPPING_USPS_USERID=='NONE' or MODULE_SHIPPING_USPS_SERVER == 'test')) { $shipping_errors .= '
' . ERROR_USPS_STATUS; } if ($shipping_errors != '') { $messageStack->add(ERROR_SHIPPING_CONFIGURATION . $shipping_errors, 'caution'); } } ?> > <?php echo TITLE; ?>
fields['configuration_group_title']; ?>
'' . $cInfo->configuration_title . ''); if ($cInfo->set_function) { eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");'); } else { $value_field = zen_draw_input_field('configuration_value', $cInfo->configuration_value, 'size="60"'); } $contents = array('form' => zen_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save')); if (ADMIN_CONFIGURATION_KEY_ON == 1) { $contents[] = array('text' => 'Key: ' . $cInfo->configuration_key . '
'); } $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '
' . $cInfo->configuration_title . '
' . $cInfo->configuration_description . '
' . $value_field); $contents[] = array('align' => 'center', 'text' => '
' . zen_image_submit('button_update.gif', IMAGE_UPDATE) . ' ' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . ''); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '' . $cInfo->configuration_title . ''); if (ADMIN_CONFIGURATION_KEY_ON == 1) { $contents[] = array('text' => 'Key: ' . $cInfo->configuration_key . '
'); } $contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_edit.gif', IMAGE_EDIT) . ''); $contents[] = array('text' => '
' . $cInfo->configuration_description); $contents[] = array('text' => '
' . TEXT_INFO_DATE_ADDED . ' ' . zen_date_short($cInfo->date_added)); if (zen_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . zen_date_short($cInfo->last_modified)); } break; } if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) { echo ' ' . "\n"; } ?>
Execute("select configuration_id, configuration_title, configuration_value, configuration_key, use_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$gID . "' order by sort_order"); while (!$configuration->EOF) { if (zen_not_null($configuration->fields['use_function'])) { $use_function = $configuration->fields['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](); } $cfgValue = zen_call_function($class_method[1], $configuration->fields['configuration_value'], ${$class_method[0]}); } else { $cfgValue = zen_call_function($use_function, $configuration->fields['configuration_value']); } } else { $cfgValue = $configuration->fields['configuration_value']; } if ((!isset($_GET['cID']) || (isset($_GET['cID']) && ($_GET['cID'] == $configuration->fields['configuration_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { $cfg_extra = $db->Execute("select configuration_key, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_id = '" . (int)$configuration->fields['configuration_id'] . "'"); $cInfo_array = array_merge($configuration->fields, $cfg_extra->fields); $cInfo = new objectInfo($cInfo_array); } if ( (isset($cInfo) && is_object($cInfo)) && ($configuration->fields['configuration_id'] == $cInfo->configuration_id) ) { echo ' ' . "\n"; } else { echo ' ' . "\n"; } ?> MoveNext(); } ?>
 
fields['configuration_title']; ?> fields['configuration_id'] == $cInfo->configuration_id) ) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ''; } ?> 
' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo '