strtr($dird, $sourcessrandd); if ($dird != "/") $dirf = "/"; else $dirf = ""; $url = "http://".$_SERVER["HTTP_HOST"].$dird.$dirf; define('CONF_FULL_SHOP_URL', trim($url)); $q = db_query("select settings_constant_name, settings_value from ".SETTINGS_TABLE); while( $row = db_fetch_row($q) ) define($row["settings_constant_name"], $row["settings_value"] ); } function setting_CHECK_BOX($settingsID) { $q = db_query("select settings_constant_name from ". SETTINGS_TABLE." where settingsID=".(int)$settingsID); $row = db_fetch_row( $q ); $settings_constant_name = $row["settings_constant_name"]; if ( isset($_POST["save"]) ) _setSettingOptionValue( $settings_constant_name, isset($_POST["setting".$settings_constant_name])?1:0 ); $res = ""; } // ***************************************************************************** // Purpose same as setting_TEXT_BOX() except for it stores data in encrypted way // Inputs // $dataType = 0 - string // $dataType = 1 - float // $dataType = 2 - int // Remarks // Returns function setting_TEXT_BOX_SECURE($dataType, $settingsID) { $q = db_query("select settings_constant_name from ". SETTINGS_TABLE." where settingsID=".(int)$settingsID); $row = db_fetch_row( $q ); $settings_constant_name = $row["settings_constant_name"]; if ( isset($_POST["save"]) && isset($_POST["setting".$settings_constant_name]) ) { if ( $dataType == 0 ) $value = $_POST["setting".$settings_constant_name]; else if ( $dataType == 1 ) $value = (float)$_POST["setting".$settings_constant_name]; else if ( $dataType == 2 ) $value = (int)$_POST["setting".$settings_constant_name]; _setSettingOptionValue( $settings_constant_name, cryptCCNumberCrypt ( $value , NULL ) ); } return ""; } function setting_DATEFORMAT() { if ( isset($_POST["save"]) ) { if ( isset($_POST["setting_DATEFORMAT"]) ) { _setSettingOptionValue( "CONF_DATE_FORMAT", $_POST["setting_DATEFORMAT"] ); } } $res = ""; $currencies = currGetAllCurrencies(); $res = ""; return $res; } function settingCONF_TIMEZONE() { if ( isset($_POST["save"]) ) { if ( isset($_POST["settingCONF_TIMEZONE"]) ) { _setSettingOptionValue( "CONF_TIMEZONE", $_POST["settingCONF_TIMEZONE"] ); } } $selectedID = _getSettingOptionValue("CONF_TIMEZONE"); $res = ""; $res = ""; return $res; } function settingCONF_SELECT_CART_METHOD() { if ( isset($_POST["save"]) ) { _setSettingOptionValue( "CONF_CART_METHOD", $_POST["settingCONF_SELECT_CART_METHOD"] ); if ($_POST["settingCONF_SELECT_CART_METHOD"] == 1){ _setSettingOptionValue( "CONF_OPEN_SHOPPING_CART_IN_NEW_WINDOW", 1); }else{ _setSettingOptionValue( "CONF_OPEN_SHOPPING_CART_IN_NEW_WINDOW", 0); } } $res = ""; return $res; } function settingSELECT_USERTEMPLATE() { $res = ""; if ( isset($_SESSION["CUSTOM_DESIGN"])){ $selectedID = $_SESSION["CUSTOM_DESIGN"]; }else{ $selectedID = _getSettingOptionValue("CONF_DEFAULT_TEMPLATE"); } $themelist = array(); $handle = opendir('core/tpl/user/'); while ($file = readdir($handle)) { if ((!ereg("[.]",$file))) { $themelist[] = $file; } } closedir($handle); for ($i = 0; $i < count($themelist); $i++) { if ($themelist[$i] != "") { $res .= "