/* Decoded by unphp.net */ ?> isStarted('sefu') && ((substr($page,0,7) != 'http://') && substr($page,0,8) != 'https://')) { $use_full_address = true; } if(((basename($page) == FILENAME_CHECKOUT || basename($page) == FILENAME_ACCOUNT) || $connection=='SSL') && (ENABLE_SSL === true)){ if ($request_type == 'SSL') { $link = ($use_full_address === false) ? '' : HTTPS_SERVER . DIR_WS_STORE_SSL; } else { $link = HTTPS_SERVER . DIR_WS_STORE_SSL; } } elseif($connection=='AUTO'){ if ( ($request_type == 'SSL') && (ENABLE_SSL === true) && ($page == null)) { $link = HTTPS_SERVER . DIR_WS_STORE_SSL; } else { $link = HTTP_SERVER . DIR_WS_STORE; } } else { if ($request_type == 'NONSSL') { $link = ($use_full_address === false) ? '' : HTTP_SERVER . DIR_WS_STORE; } else { $link = HTTP_SERVER . DIR_WS_STORE; } } $link .= $page; if (!empty($parameters)) { $link .= '?' . mxp_output_string($parameters); $separator = '&'; } else { $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) && $MxpSession->hasStarted() && (SERVICE_SESSION_FORCE_COOKIE_USAGE == '-1') ) { if (!mxp_empty(SID)) { $_sid = SID; } elseif ( (($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL === true)) || (($request_type == 'SSL') && ($connection != 'SSL')) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = $MxpSession->getName() . '=' . $MxpSession->getID(); } } } if (isset($_sid)) { $link .= $separator . mxp_output_string($_sid); } while (strstr($link, '&&')) { $link = str_replace('&&', '&', $link); } if ( ($search_engine_safe === true) && isset($MxpServices) && $MxpServices->isStarted('sefu')) { $link = str_replace(array('?', '&', '='), array('/', '/', ','), $link); } else { if (strpos($link, '&') !== false) { $link = str_replace('&', '&', $link); } } return $link; } function mxp_link_object($link, $object, $parameters = null, $new_window = true) { if(defined('MXP_IN_ADMIN') && MXP_IN_ADMIN && isset($_SESSION['admin']) && MxpAdministration_Templates::getTemplateWindow($_SESSION['admin']['id']) && $new_window){ return '' . $object . ''; } if(defined('MXP_IN_ADMIN') && MXP_IN_ADMIN && isset($_SESSION['admin']) && MxpAdministration_Templates::getTemplateWindow($_SESSION['admin']['id'])){ return '' . $object . ''; } else{ return '' . $object . ''; } } function mxp_icon($image, $title = null, $group = null, $parameters = null, $deep_image = null, $type_image= 'png', $force_type=false) { global $MxpLanguage, $MxpTemplate; if($type_image == 'gif')$type_image = 'png'; if ( is_null($title) ) { $title = $MxpLanguage->get('icon_' . substr($image, 0, strpos($image, '.'))); } if($type_image=='png' && (((int)$group==64 || (int)$group==72) || (defined('MXP_IN_ADMIN') && MXP_IN_ADMIN))){ if($group == null){ $group = '16'; } if((int)$group <= 32 && $deep_image == null){ $deep_image = 'hot'; } if($deep_image == null){ $deep_image = 'normal'; } $src = HTTP_MAXPHO_SERVER . 'icons/png/' . $deep_image . '/' . $group . '/' . $image . '_' . $group . '.png'; } elseif ( (!defined('MXP_IN_ADMIN')) && $force_type ) { if($group == null){ $group = '16'; } $src = HTTP_MAXPHO_SERVER . 'icons/' . $type_image . '/normal' . '/' . $group . '/' . $image . '_' . $group . '.' . $type_image; } elseif ( (!defined('MXP_IN_ADMIN')) ) { if($group == null){ $group = '16'; } $src = HTTP_MAXPHO_SERVER . 'icons/png/normal' . '/' . $group . '/' . $image . '_' . $group . '.png'; } else{ $src = HTTP_MAXPHO_SERVER . 'icons/png/' . $image . '.png'; } $image = ''; return $image; //return mxp_image('templates/' . $MxpTemplate->getCode() . '/images/icons/' . (!empty($group) ? $group . '/' : null) . $image, $title, null, null, $parameters); } function mxp_icon_raw($image, $group = '16', $type_image = 'normal', $ext_image = 'png') { global $MxpTemplate; if($ext_image == 'gif')$ext_image = 'png'; //return 'templates/' . $MxpTemplate->getCode() . '/images/icons/' . (!empty($group) ? $group . '/' : null) . $image; if($ext_image === 'png') return HTTP_MAXPHO_SERVER . 'icons/png/' . $type_image . '/' . $group . '/' . $image . '_' . $group . '.'.$ext_image; return HTTP_MAXPHO_SERVER . 'icons/gif/' . $image . '.'.$ext_image; } function mxp_image($image, $title = null, $width = 0, $height = 0, $parameters = null) { global $request_type; if ( (empty($image) || ($image == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == '-1') ) { return false; } if (!is_numeric($width)) { $width = 0; } if (!is_numeric($height)) { $height = 0; } //the follow function check if $image is now present in https, if yes do nothing, else copy it. $image = mxp_check_ssl_image($image); $image = ' 0) { $image .= ' width="' . (int)$width . '"'; } if ($height > 0) { $image .= ' height="' . (int)$height . '"'; } if (!empty($parameters)) { $image .= ' ' . $parameters; } $image .= ' />'; return $image; } function mxp_draw_image_submit_button($image, $title = null, $parameters = null, $onclick=null) { global $MxpLanguage, $niceforms; //$image_submit = '' . mxp_image(DIR_WS_IMAGES . 'forms/images/'.$niceforms.'/button_right.png', null, null, null, 'class="buttonImg"'); return $image_submit; } function mxp_draw_image_button($image, $title = null, $parameters = null, $destination_form = null, $type='submit', $events='') { global $MxpLanguage, $niceforms; $result = ($destination_form != null)? (mxp_draw_form($title, $destination_form, 'get')) : ''; $result .= mxp_image(DIR_WS_IMAGES . 'forms/images/'.$niceforms.'/button_left.png', null, null, null, 'class="buttonImg"') . '' . mxp_image(DIR_WS_IMAGES . 'forms/images/'.$niceforms.'/button_right.png', null, null, null, 'class="buttonImg"'); $result .= ($destination_form != null)? '' : ''; return $result; } function mxp_draw_input_field( $name, $value = null, $parameters = null, $override = true, $type = 'text', $rand = '' ) { global $niceforms; if ( !is_bool($override) ) { $override = true; } if ( $override===true ) { if ( strpos($name, '[') !== false ) { $name_string = substr($name, 0, strpos($name, '[')); $name_key = substr($name, strpos($name, '[') + 1, strlen($name) - (strpos($name, '[') + 2)); if ( isset($_GET[$name_string][$name_key]) ) { $value = $_GET[$name_string][$name_key]; } elseif ( isset($_POST[$name_string][$name_key]) ) { $value = $_POST[$name_string][$name_key]; } } else { if ( isset($_GET[$name]) ) { $value = $_GET[$name]; } elseif ( isset($_POST[$name]) ) { $value = $_POST[$name]; } } } if (!in_array($type, array('text', 'password', 'file'))) { $type = 'text'; } if(!defined('MXP_IN_ADMIN') && isset($niceforms) && $niceforms!="" && $type!="file"){ $field = mxp_image(DIR_WS_IMAGES . 'forms/images/'.$niceforms.'/input_left.png', null, null, null, 'class="inputCorner"') . 'get('maximum_file_upload_size')), mxp_output_string($upload_max_filesize)); } } return $field; } function mxp_draw_selection_field($name, $type, $values, $default = null, $parameters = null, $separator = ' ') { if (!is_array($values)) { $values = array($values); } if ( strpos($name, '[') !== false ) { $name_string = substr($name, 0, strpos($name, '[')); if ( isset($_GET[$name_string]) ) { $default = $_GET[$name_string]; } elseif ( isset($_POST[$name_string]) ) { $default = $_POST[$name_string]; } } else { if ( isset($_GET[$name]) ) { $default = $_GET[$name]; } elseif ( isset($_POST[$name]) ) { $default = $_POST[$name]; } } $field = ''; $counter = 0; foreach ($values as $key => $value) { $counter++; if (is_array($value)) { $selection_value = $value['id']; $selection_text = ' ' . $value['text']; } else { $selection_value = $value; $selection_text = ''; } $field .= ' 1 ? $counter : '') . '"'; } if (trim($selection_value) != '') { $field .= ' value="' . mxp_output_string($selection_value) . '"'; } if ((is_bool($default) && $default === true) || ((is_string($default) && (trim($default) == trim($selection_value))) || (is_array($default) && in_array(trim($selection_value), $default)))) { $field .= ' checked="checked"'; } if (!empty($parameters)) { $field .= ' ' . $parameters; } $field .= ' />'; if (!empty($selection_text)) { $field .= ''; } $field .= $separator; } if (!empty($field)) { $field = substr($field, 0, strlen($field)-strlen($separator)); } return $field; } function mxp_draw_selection_field_2nd($name, $type, $values, $default = null, $parameters = null, $separator = ' ') { if (!is_array($values)) { $values = array($values); } if ( strpos($name, '[') !== false ) { $name_string = substr($name, 0, strpos($name, '[')); if ( isset($_GET[$name_string]) ) { $default = $_GET[$name_string]; } elseif ( isset($_POST[$name_string]) ) { $default = $_POST[$name_string]; } } else { if ( isset($_GET[$name]) ) { $default = $_GET[$name]; } elseif ( isset($_POST[$name]) ) { $default = $_POST[$name]; } } $field = ''; $counter = 0; foreach ($values as $key => $value) { $counter++; if (is_array($value)) { $selection_value = $value['id']; $selection_text = ' ' . $value['text']; } else { $selection_value = $value; $selection_text = ''; } if (!empty($selection_text)) { $field .= '