Error!
Unable to determine the page link!
Function used:
zen_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')');
}
if ($connection == 'NONSSL') {
$link = HTTP_SERVER . DIR_WS_ADMIN;
} elseif ($connection == 'SSL') {
if (ENABLE_SSL_ADMIN == 'true') {
$link = HTTPS_SERVER . DIR_WS_HTTPS_ADMIN;
} else {
$link = HTTP_SERVER . DIR_WS_ADMIN;
}
} else {
die('
Error!
Unable to determine connection method on a link!
Known methods: NONSSL SSL
Function used:
zen_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')');
}
if (!strstr($page, '.php')) $page .= '.php';
if ($parameters == '') {
$link = $link . $page;
$separator = '?';
} else {
$link = $link . $page . '?' . $parameters;
$separator = '&';
}
while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ( ($add_session_id == true) && ($session_started == true) ) {
if (defined('SID') && zen_not_null(SID)) {
$sid = SID;
} elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL_ADMIN == 'true') ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
//die($connection);
if ($http_domain != $https_domain) {
$sid = zen_session_name() . '=' . zen_session_id();
}
}
}
if (isset($sid)) {
$link .= $separator . $sid;
}
return $link;
}
function zen_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
global $seo_urls;
$href_link = null;
if(isset($seo_urls)) {
$href_link = $seo_urls->href_link($page, $parameters, $connection);
}
if($href_link === null) {
$href_link = original_zen_catalog_href_link($page, $parameters, $connection);
}
return $href_link;
}
function original_zen_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
if ($connection == 'NONSSL') {
$link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
} elseif ($connection == 'SSL') {
if (ENABLE_SSL_CATALOG == 'true') {
$link = HTTPS_CATALOG_SERVER . DIR_WS_HTTPS_CATALOG;
} else {
$link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
}
} else {
die('
Error!
Unable to determine connection method on a link!
Known methods: NONSSL SSL
Function used:
zen_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')');
}
if ($parameters == '') {
$link .= 'index.php?main_page='. $page;
} else {
$link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters);
}
while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
return $link;
}
////
// The HTML image wrapper function
function zen_image($src, $alt = '', $width = '', $height = '', $params = '') {
$image = '
Execute("select distinct zone_country_id
from " . TABLE_ZONES . "
order by zone_country_id");
$num_country = 1;
$output_string = '';
while (!$countries->EOF) {
if ($num_country == 1) {
$output_string .= ' if (' . $country . ' == "' . $countries->fields['zone_country_id'] . '") {' . "\n";
} else {
$output_string .= ' } else if (' . $country . ' == "' . $countries->fields['zone_country_id'] . '") {' . "\n";
}
$states = $db->Execute("select zone_name, zone_id
from " . TABLE_ZONES . "
where zone_country_id = '" . $countries->fields['zone_country_id'] . "'
order by zone_name");
$num_state = 1;
while (!$states->EOF) {
if ($num_state == '1') $output_string .= ' ' . $form . '.' . $field . '.options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n";
$output_string .= ' ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option("' . $states->fields['zone_name'] . '", "' . $states->fields['zone_id'] . '");' . "\n";
$num_state++;
$states->MoveNext();
}
$num_country++;
$countries->MoveNext();
$output_string .= ' hideStateField(' . $form . ');' . "\n" ;
}
$output_string .= ' } else {' . "\n" .
' ' . $form . '.' . $field . '.options[0] = new Option("' . TYPE_BELOW . '", "");' . "\n" .
' showStateField(' . $form . ');' . "\n" .
' }' . "\n";
return $output_string;
}
////
// javascript to dynamically update the states/provinces list when the country is changed
// TABLES: zones
function zen_js_billing_zone_list($country, $form, $field) {
global $db;
$countries = $db->Execute("select distinct zone_country_id
from " . TABLE_ZONES . "
order by zone_country_id");
$num_country = 1;
$output_string = '';
while (!$countries->EOF) {
if ($num_country == 1) {
$output_string .= ' if (' . $country . ' == "' . $countries->fields['zone_country_id'] . '") {' . "\n";
} else {
$output_string .= ' } else if (' . $country . ' == "' . $countries->fields['zone_country_id'] . '") {' . "\n";
}
$states = $db->Execute("select zone_name, zone_id
from " . TABLE_ZONES . "
where zone_country_id = '" . $countries->fields['zone_country_id'] . "'
order by zone_name");
$num_state = 1;
while (!$states->EOF) {
if ($num_state == '1') $output_string .= ' ' . $form . '.' . $field . '.options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n";
$output_string .= ' ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option("' . $states->fields['zone_name'] . '", "' . $states->fields['zone_id'] . '");' . "\n";
$num_state++;
$states->MoveNext();
}
$num_country++;
$countries->MoveNext();
$output_string .= ' hideBillingStateField(' . $form . ');' . "\n" ;
}
$output_string .= ' } else {' . "\n" .
' ' . $form . '.' . $field . '.options[0] = new Option("' . TYPE_BELOW . '", "");' . "\n" .
' showBillingStateField(' . $form . ');' . "\n" .
' }' . "\n";
return $output_string;
}
////
// Output a form
function zen_draw_form($name, $action, $parameters = '', $method = 'post', $params = '', $usessl = 'false') {
$form = '';
return $form;
}
////
// Output a form input field
function zen_draw_input_field($name, $value = '~*~*#', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {
$field = '', $field);
} elseif ($text != '~*~*#' && zen_not_null($text)) {
$field = str_replace('>', '>', $field);
$field .= $text;
}
$field .= '';
return $field;
}
////
// Output a form hidden field
function zen_draw_hidden_field($name, $value = '', $parameters = '') {
$field = ' '"', '\'' => ''', '<' => '<', '>' => '>')) . '' . "\n";
}
$field .= '' . "\n";
if ($required == true) $field .= TEXT_FIELD_REQUIRED;
return $field;
}
////
// Hide form elements
function zen_hide_session_id() {
global $session_started;
if ( ($session_started == true) && defined('SID') && zen_not_null(SID) ) {
return zen_draw_hidden_field(zen_session_name(), zen_session_id());
}
}
?>