]> git.mxchange.org Git - mailer.git/commitdiff
* Dummy extension "yoomedia" added for Yoo! Media's API (Interface 2.0 supported)
authorRoland Häder <roland@mxchange.org>
Wed, 27 Aug 2008 21:59:32 +0000 (21:59 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 27 Aug 2008 21:59:32 +0000 (21:59 +0000)
* Generic proxy support with BASE64 encoded auth data added
* Configuration array now build with one line in extensions
* Session management now always loads before theme manager
* Setting of theme now works again
* Misc minor fixes

36 files changed:
.gitattributes
inc/extensions/ext-active.php
inc/extensions/ext-autopurge.php
inc/extensions/ext-beg.php
inc/extensions/ext-birthday.php
inc/extensions/ext-bonus.php
inc/extensions/ext-cache.php
inc/extensions/ext-doubler.php
inc/extensions/ext-holiday.php
inc/extensions/ext-maintenance.php
inc/extensions/ext-mediadata.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-order.php
inc/extensions/ext-register.php
inc/extensions/ext-rewrite.php
inc/extensions/ext-sponsor.php
inc/extensions/ext-sql_patches.php
inc/extensions/ext-top10.php
inc/extensions/ext-transfer.php
inc/extensions/ext-user.php
inc/extensions/ext-yoomedia.php [new file with mode: 0644]
inc/functions.php
inc/header.php
inc/language/de.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-config_proxy.php [new file with mode: 0644]
inc/modules/admin/what-config_title.php
inc/modules/admin/what-theme_edit.php
inc/modules/chk_login.php
inc/modules/guest/what-confirm.php
inc/modules/member/what-themes.php
inc/mysql-connect.php
inc/theme-manager.php
index.php
templates/de/html/admin/admin_config_proxy.tpl [new file with mode: 0644]
templates/de/html/ext/ext_yoomedia.tpl [new file with mode: 0644]

index 5d3e807debc2ebcf99740b0f3be2651895c3c784..918344fdb24022920f211d8d40e34ca10b5efeac 100644 (file)
@@ -127,6 +127,7 @@ inc/extensions/ext-top10.php -text
 inc/extensions/ext-transfer.php -text
 inc/extensions/ext-user.php -text
 inc/extensions/ext-wernis.php -text
+inc/extensions/ext-yoomedia.php -text
 inc/fatal_errors.php -text
 inc/footer.php -text
 inc/functions.php -text
@@ -275,6 +276,7 @@ inc/modules/admin/what-config_order.php -text
 inc/modules/admin/what-config_other.php -text
 inc/modules/admin/what-config_payouts.php -text
 inc/modules/admin/what-config_points.php -text
+inc/modules/admin/what-config_proxy.php -text
 inc/modules/admin/what-config_rallye_prices.php -text
 inc/modules/admin/what-config_refid.php -text
 inc/modules/admin/what-config_reg.php -text
@@ -763,6 +765,7 @@ templates/de/html/admin/admin_config_payouts_edit_row.tpl -text
 templates/de/html/admin/admin_config_payouts_row.tpl -text
 templates/de/html/admin/admin_config_point_settings.tpl -text
 templates/de/html/admin/admin_config_points.tpl -text
+templates/de/html/admin/admin_config_proxy.tpl -text
 templates/de/html/admin/admin_config_rallye_del.tpl -text
 templates/de/html/admin/admin_config_rallye_del_row.tpl -text
 templates/de/html/admin/admin_config_rallye_edit.tpl -text
@@ -1074,6 +1077,7 @@ templates/de/html/ext/ext_top10.tpl -text
 templates/de/html/ext/ext_transfer.tpl -text
 templates/de/html/ext/ext_user.tpl -text
 templates/de/html/ext/ext_wernis.tpl -text
+templates/de/html/ext/ext_yoomedia.tpl -text
 templates/de/html/fatal_footer.tpl -text
 templates/de/html/fatal_header.tpl -text
 templates/de/html/guest/.htaccess -text
index 0a385f601dc3dcc3ef9c01d82d32c03d82acff31..65da897408b462364ce3a429f5ef5750de50ee9c 100644 (file)
@@ -123,7 +123,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       $_CONFIG['active_limit'] = $dummy['active_limit']; // Only display X most active users for today
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
        break;
 }
index 2412b2acab6de1fc4e4615d90b6325c4aae15ee6..136d94b2f9377b000dba2d1bb4098359c25a9cff 100644 (file)
@@ -258,22 +258,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       // Transfer all to the $_CONFIG array...
-       $_CONFIG['ap_inactive']    = $dummy['autopurge_inactive'];    // Autopurge inactive accounts (yes/no)
-       $_CONFIG['ap_unconfirmed'] = $dummy['autopurge_unconfirmed']; // Autopurge unconfirmed accounts (yes/no)
-       $_CONFIG['ap_tasks']       = $dummy['autopurge_tasks'];       // Autopurge out-dated tasks (yes/no)
-       $_CONFIG['ap_in_mail']     = $dummy['ap_in_notify'];          // Send email to admin when purging inactive accounts (yes/no)
-       $_CONFIG['ap_un_mail']     = $dummy['ap_un_notify'];          // Send email to admin when purging unconfirmed accounts (yes/no)
-       $_CONFIG['ap_tasks_mail']  = $dummy['ap_tasks_notify'];       // Send email to admin when purging out-dated tasks (yes/no)
-       $_CONFIG['ap_in_since']    = $dummy['ap_inactive_since'];     // Timeout for confirmed accounts when they become inactive (seconds)
-       $_CONFIG['ap_in_time']     = $dummy['ap_inactive_time'];      // Timeout for inactive accounts when they are automatically deleted (seconds)
-       $_CONFIG['ap_un_time']     = $dummy['ap_unconfirmed_time'];   // Timeout for unconfirmed accounts when they are automatically deleted (seconds)
-       $_CONFIG['ap_tasks_time']  = $dummy['ap_tasks_time'];         // Timeout for out-dated tasks
-       $_CONFIG['ap_del_mails']   = $dummy['ap_del_mails'];          // Autopurge mails from deleted users?
-       $_CONFIG['ap_dm_notify']   = $dummy['ap_dm_notify'];          // Send email to admin when purging mails from deleted users (yes/no)
-       $_CONFIG['ap_dm_timeout']  = $dummy['ap_dm_timeout'];         // Timeout for mails from deleted users
-
-       // Save some RAM...
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
 
        // Do we have a daily-reset-run?
index 9f78549591e5fe881f98bd3a2905b952e5e9333c..eefd94b2c05d365048367d4f04142c405153ab42 100644 (file)
@@ -260,23 +260,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       $_CONFIG['beg_timeout']        = $dummy['beg_timeout'];        // Global timeout
-       $_CONFIG['beg_uid_timeout']    = $dummy['beg_uid_timeout'];    // Timeout for one userid
-       $_CONFIG['beg_ip_timeout']     = $dummy['beg_ip_timeout'];     // Timeout for one IP number
-       $_CONFIG['beg_points']         = $dummy['beg_points'];         // Minimum beggable points
-       $_CONFIG['beg_points_max']     = $dummy['beg_points_max'];     // Maximum beggable points
-       $_CONFIG['beg_uid']            = $dummy['beg_uid'];            // Account to subtract begged points from
-       $_CONFIG['beg_mode']           = $dummy['beg_mode'];           // Payment mode: direct or over referral system?
-       $_CONFIG['beg_month']          = $dummy['beg_month'];          // Current month
-       $_CONFIG['beg_ranks']          = $dummy['beg_ranks'];          // Maximum member who will win
-       $_CONFIG['beg_active']         = $dummy['beg_active'];         // Only active members can win?
-       $_CONFIG['beg_rallye']         = $dummy['beg_rallye'];         // Is the begging rallye activated?
-       $_CONFIG['beg_ral_en_notify']  = $dummy['beg_ral_en_notify'];  // Notify members on enabled rallye?
-       $_CONFIG['beg_ral_di_notify']  = $dummy['beg_ral_di_notify'];  // Notify members on disabled rallye?
-       $_CONFIG['beg_notify_bonus']   = $dummy['beg_notify_bonus'];   // When points are > 0 and bonus extension is installed, a bonus mail with this amount of points will be send instead of an enable-notification!
-       $_CONFIG['beg_new_mem_notify'] = $dummy['beg_new_mem_notify']; // Notify members on disabled rallye?
-       $_CONFIG['beg_notify_wait']    = $dummy['beg_notify_wait'];    // Time to wait in seconds for bonus mails
-       $_CONFIG['beg_include_own']    = $dummy['beg_include_own'];    // Include webmaster's own userid in rallye?
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
 
        // Remove old entries
index 418d0b33cfcbf9d5b7c9fb38073dd40796586b50..52654f0c97ee5e79c42d3817444f25ff6c1df826 100644 (file)
@@ -186,9 +186,7 @@ default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
 
        // Copy config to main array
-       $_CONFIG['birthday_points'] = $dummy['birthday_points'];
-       $_CONFIG['birthday_mode']   = $dummy['birthday_mode'];
-       $_CONFIG['birthday_active'] = $dummy['birthday_active'];
+       $_CONFIG = array_merge($_CONFIG, $dummy);
 
        // Save some RAM...
        unset($dummy);
index 06e52585f0c21118298cf545026447381c43c0dc..a2a027103806aa0e816faafd545e9272782bd2a5 100644 (file)
@@ -541,31 +541,7 @@ WHERE last_online < ".$mark." ORDER BY userid";
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       $_CONFIG['login_bonus']          = $dummy['login_bonus'];          // Bonus points for successfull logins
-       $_CONFIG['turbo_bonus']          = $dummy['turbo_bonus'];          // Bonus points for the fastest clicker, No. 1
-       $_CONFIG['bonus_rates']          = $dummy['turbo_rates'];          // Points for clicker no. 2 to x
-       $_CONFIG['bonus_ranks']          = $dummy['bonus_ranks'];          // Total ranks who can win
-       $_CONFIG['login_timeout']        = $dummy['login_timeout'];        // Time in seconds between two logins
-       $_CONFIG['bonus_month']          = $dummy['last_bonus_month'];     // Last month where click-bonus are "paid"
-       $_CONFIG['bonus_mode']           = $dummy['bonus_mode'];           // Mode for adding points for login/click bonus
-       $_CONFIG['bonus_uid']            = $dummy['bonus_uid'];            // Member account to take points from
-       $_CONFIG['bonus_lines']          = $dummy['bonus_lines'];          // Number of lines to display in show_bonus.php
-       $_CONFIG['bonus_timeout']        = $dummy['bonus_timeout'];        // Auto-Purge timeout for bonus lines in mxchange_bonus_turbo
-       $_CONFIG['bonus_order']          = $dummy['bonus_order'];          // Bonus points for ordering mails
-       $_CONFIG['bonus_ref']            = $dummy['bonus_ref'];            // Bonus points for "making" a referral
-       $_CONFIG['bonus_stats']          = $dummy['bonus_stats'];          // Bonus points for 100% clickrate in mail stats
-       $_CONFIG['bonus_active']         = $dummy['bonus_active'];         // De/activate bonus active rallye
-       $_CONFIG['bonus_order_yn']       = $dummy['bonus_order_yn'];       // Include order bonus in analysis?
-       $_CONFIG['bonus_ref_yn']         = $dummy['bonus_ref_yn'];         // Include referral bonus in analysis?
-       $_CONFIG['bonus_stats_yn']       = $dummy['bonus_stats_yn'];       // Include statistics bonus in analysis?
-       $_CONFIG['bonus_login_yn']       = $dummy['bonus_login_yn'];       // Include login bonus in analysis?
-       $_CONFIG['bonus_click_yn']       = $dummy['bonus_click_yn'];       // Include "mailid" bonus in analysis?
-       $_CONFIG['bonus_en_notify']      = $dummy['bonus_en_notify'];      // Notify members about enabled active rallye?
-       $_CONFIG['bonus_di_notify']      = $dummy['bonus_di_notify'];      // Notify members about disabled active rallye?
-       $_CONFIG['bonus_new_mem_notify'] = $dummy['bonus_new_mem_notify']; // Notify members about disabled active rallye?
-       $_CONFIG['bonus_notify_points']  = $dummy['bonus_notify_points'];  // Bonus points for the enable-notification mail? 0 = disable!
-       $_CONFIG['bonus_notify_wait']    = $dummy['bonus_notify_wait'];    // Time to wait in seconds for bonus mails
-       $_CONFIG['bonus_include_own']    = $dummy['bonus_include_own'];    // Include webmaster's own userid in active rallye?
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
 
        if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
index ad0f624a9b430eb7e167d306642b201b14557452..e76ac2bbf7c7f6360a997bbc7d2e01fc806d74eb 100644 (file)
@@ -185,20 +185,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-
-       // Load config and destroy dummy array
-       $_CONFIG['cache_update']   = $dummy['cache_update'];   // Last time the cache files are been re-created
-       $_CONFIG['cache_path']     = $dummy['cache_path'];     // Relative path for the cache files to 'inc/'
-       $_CONFIG['cache_tested']   = $dummy['cache_tested'];   // Says if cache path is tested or not
-       $_CONFIG['db_hits']        = $dummy['db_hits'];        // Counted hits on the database (all!)
-       $_CONFIG['cache_hits']     = $dummy['cache_hits'];     // Counted hits on the cache arrays in memory
-       $_CONFIG['cache_admins']   = $dummy['cache_admins'];   // Is the table '_admins' cacheable?
-       $_CONFIG['cache_acls']     = $dummy['cache_acls'];     // Is the table '_admins_acls' cacheable?
-       $_CONFIG['cache_exts']     = $dummy['cache_exts'];     // Is the table '_extensions' cacheable?
-       $_CONFIG['cache_config']   = $dummy['cache_config'];   // Is the table '_config' cacheable?
-       $_CONFIG['cache_modreg']   = $dummy['cache_modreg'];   // Is the table '_mod_reg' cacheable?
-       $_CONFIG['cache_refdepth'] = $dummy['cache_refdepth']; // Is the table '_refdepths' cacheable?
-       $_CONFIG['cache_refsys']   = $dummy['cache_refsys'];   // Is the table '_refsystem' cacheable?
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
 
        // Create instance on class
index 1ba8512590461627074b07c4832c3d68162e201d..9026ca8f1a7d45b7fbdc97194d99054b4f3c2440 100644 (file)
@@ -237,25 +237,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       $_CONFIG['doubler_charge']      = $dummy['doubler_charge'];
-       $_CONFIG['doubler_jackpot']     = $dummy['doubler_jackpot'];
-       $_CONFIG['doubler_own']         = $dummy['doubler_own'];
-       $_CONFIG['doubler_uid']         = $dummy['doubler_uid'];
-       $_CONFIG['doubler_points']      = $dummy['doubler_points'];
-       $_CONFIG['doubler_used']        = $dummy['doubler_used'];
-       $_CONFIG['doubler_send_mode']   = $dummy['doubler_send_mode'];
-       $_CONFIG['doubler_timeout']     = $dummy['doubler_timeout'];
-       $_CONFIG['doubler_display_new'] = $dummy['doubler_display_new'];
-       $_CONFIG['doubler_display_pay'] = $dummy['doubler_display_pay'];
-       $_CONFIG['doubler_display_old'] = $dummy['doubler_display_old'];
-       $_CONFIG['doubler_ref']         = $dummy['doubler_ref'];
-       $_CONFIG['doubler_min']         = $dummy['doubler_min'];
-       $_CONFIG['doubler_max']         = $dummy['doubler_max'];
-       $_CONFIG['doubler_left']        = $dummy['doubler_left'];
-       $_CONFIG['doubler_counter']     = $dummy['doubler_counter'];
-       $_CONFIG['doubler_max_sent']    = $dummy['doubler_max_sent'];
-       $_CONFIG['doubler_group_sent']  = $dummy['doubler_group_sent'];
-       $_CONFIG['doubler_sent_all']    = $dummy['doubler_sent_all'];
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
 
        if ((defined('__DAILY_RESET')) && ($_CONFIG['doubler_send_mode'] == "RESET"))
index b26919897f161afa340e5a6572f8e886be4bf0e4..8e121a3e08b9a7a250693baa23a743970ca03c91 100644 (file)
@@ -225,10 +225,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       // Copy data to config array
-       $_CONFIG['holiday_max']  = $dummy['holiday_max'];  // Maximum days for holiday
-       $_CONFIG['holiday_lock'] = $dummy['holiday_lock']; // Lock deactivation in member area for X seconds
-       $_CONFIG['holiday_mode'] = $dummy['holiday_mode']; // Mode for activating holiday
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
 
        // Do we have a daily-reset-run?
index 32e7bba2e37347779b0310b7b700451f75264a59..9fd371f7d31ddbf2a946cedc17d0556f7a7e900f 100644 (file)
@@ -111,7 +111,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       $_CONFIG['maintenance'] = $dummy['maintenance'];
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
        break;
 }
index b002b6cdcab4a0651928b2908545b42ddcd53081..fa8249d507fbff963aaccc36c0bf0cbef87af91a 100644 (file)
@@ -130,8 +130,7 @@ Bitte stellen Sie diesen derzeit manuell unter <A href=\"".URL."/modules.php?mod
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       $_CONFIG['mt_start'] = $dummy['mt_start'];
-       $_CONFIG['mt_stage'] = $dummy['mt_stage'];
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
        break;
 }
index 47153f507334ea1be9df33e7f8e7fec1e6f34eb3..0a3f6ce971bfd21165fffd456af7e395884af0c3 100644 (file)
@@ -151,8 +151,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       $_CONFIG['nl_charge']   = $dummy['nl_charge'];   // Charge for your members to switch off the newsletter
-       $_CONFIG['nl_month']    = $dummy['nl_month'];    // Last month of check interval
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
 
        // URL ends which are used to indentify the end of an URL or email link
index 16f7f737401e170587a2a6b504449b388f9f9b8c..ebd232bf7fa708b590e18d0ec1a3c7bd678c9d5f 100644 (file)
@@ -304,11 +304,7 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       $_CONFIG['order_min']           = $dummy['order_min'];           // Order at least X mails
-       $_CONFIG['order_max']           = $dummy['order_max_full'];      // Ordering mode: as much as possible or as much as the user want's to receive
-       $_CONFIG['order_select']        = $dummy['order_select'];        // Sorting mode for selecting users while looking some up for mail delivery
-       $_CONFIG['order_mode']          = $dummy['order_mode'];          // Ascending or descending sort order for above
-       $_CONFIG['repay_deleted_mails'] = $dummy['repay_deleted_mails']; // Wether repay points or send them to jackpot/shreder on mail order deletion
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
 
        // Do daily reset only when installed and extension version is at least 0.1.1
index 06604e03ae7ff09a37bf778336005652ec0278ec..faa89c02cf0bd22ef1e11ea15a3e216a207d4fa2 100644 (file)
@@ -324,8 +324,7 @@ PRIMARY KEY(id)
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       // Copy data to config array
-       $_CONFIG['register_default'] = $dummy['register_default']; // Is Yes/No the default selection in category selection?
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
        break;
 }
index 7152b16295cced9a93788143d37f7f4f47dbe8da..f162c6469ce2fb68177c88f824946be1952600ba 100644 (file)
@@ -137,7 +137,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       $_CONFIG['rewrite_skipped_mods'] = $dummy['rewrite_skip'];
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
        break;
 }
index d704b522b9564743fb46e48fd992d6b936c1fa37..cec77cc1da4740275c169e83171bc979defc159b 100644 (file)
@@ -298,7 +298,7 @@ PRIMARY KEY(id)
                //
                // Add default entries
                //
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_registry (ext_name, is_active, aid, stamp_added) VALUES ('sponsor', 'N', '".GET_ADMIN_ID($_COOKIE['admin_login'])."', '".time()."')";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_registry (ext_name, is_active, aid, stamp_added) VALUES ('sponsor', 'N', '".GET_ADMIN_ID(get_session('admin_login'))."', 'UNIX_TIMESTAMP()')";
                $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_action_convert (ext_name, conv_rate, conv_name) VALUES('sponsor', '10', 'Mails')";
                $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_paytypes (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Standart-Paket', 5, 1000.00000, '&euro;')";
                $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_sponsor_paytypes (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Spar-Paket', 1, 200.00000, '&euro;')";
index 294db45c190a7b158bebfe2a03ea439a6ca00b59..471300b250885254195ac2c197658f05a7dd9125 100644 (file)
@@ -38,13 +38,13 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF']))) {
 }
 
 // Version number
-$EXT_VERSION = "0.4.2";
+$EXT_VERSION = "0.4.3";
 
 // Auto-set extension version
 if (!isset($EXT_VER)) $EXT_VER = $EXT_VERSION;
 
 // Version history array (add more with , "0.1" and so on)
-$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2");
+$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3");
 
 switch ($EXT_LOAD_MODE)
 {
@@ -64,7 +64,9 @@ what='config_refid' OR
 what='config_title' OR
 what='sub_points' OR
 what='config_admin' OR
-what='list_norefs' LIMIT 12";
+what='config_proxy' OR
+what='list_norefs'
+LIMIT 13";
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_themes";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='themes' LIMIT 1";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE
@@ -524,6 +526,14 @@ PRIMARY KEY (id)
        case "0.4.2": // SQL queries for v0.4.2
                $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_online` ADD INDEX `admin_member` (`is_admin`, `is_member`)";
                break;
+
+       case "0.4.3": // SQL queries for v0.4.3
+               $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''";
+               $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_port` INT(5) NOT NULL DEFAULT '0'";
+               $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''";
+               $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('setup', 'config_proxy', 'Proxy-Einstellungen', 'Sollte Ihr Webserver sich hinter einem Proxy befinden, so k&ouml;nnen Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)";
+               break;
        }
        break;
 
@@ -532,39 +542,9 @@ default: // Do stuff when extension is loaded
 
        // When the sql_patches is not installed we cannot load it's configuration... *sigh*
        if (GET_EXT_VERSION("sql_patches") != '') {
-               $_CONFIG['ext_autopurge']     = $dummy['ext_autopurge'];
-               $_CONFIG['mails_page']        = $dummy['mails_page'];
-               $_CONFIG['index_home']        = $dummy['index_home'];
-               $_CONFIG['verbose_sql']       = $dummy['verbose_sql'];
-               $_CONFIG['middot']            = $dummy['menu_blur_spacer'];
-               $_CONFIG['reg_points_mode']   = $dummy['reg_points_mode'];
-               $_CONFIG['index_delay']       = $dummy['index_delay'];
-               $_CONFIG['index_cookie']      = $dummy['index_cookie'];
-               $_CONFIG['def_refid']         = $dummy['def_refid'];
-               $_CONFIG['refid_target']      = $dummy['refid_target'];
-               $_CONFIG['default_theme']     = $dummy['default_theme'];
-               $_CONFIG['title_decoration']  = $dummy['enable_title_deco'];
-               $_CONFIG['title_mod_show']    = $dummy['enable_mod_title'];
-               $_CONFIG['title_what_show']   = $dummy['enable_what_title'];
-               $_CONFIG['title_left']        = $dummy['title_left'];
-               $_CONFIG['title_middle']      = $dummy['title_middle'];
-               $_CONFIG['title_right']       = $dummy['title_right'];
-               $_CONFIG['mad_counter']       = $dummy['mad_count'];
-               $_CONFIG['last_mad']          = $dummy['mad_timestamp'];
-               $_CONFIG['css_php']           = $dummy['css_php'];
-               $_CONFIG['guest_menu']        = $dummy['guest_menu'];
-               $_CONFIG['member_menu']       = $dummy['member_menu'];
-               $_CONFIG['youre_here']        = $dummy['youre_here'];
-               $_CONFIG['img_type']          = $dummy['img_type'];
-               $_CONFIG['stats_limit']       = $dummy['stats_limit'];
-               $_CONFIG['admin_menu']        = $dummy['admin_menu'];
-               $_CONFIG['admin_menu_sorter'] = $dummy['admin_menu_sorter'];
-               $_CONFIG['salt_length']       = $dummy['salt_length'];
-               $_CONFIG['pass_scramble']     = trim($dummy['pass_scramble']);
-               $_CONFIG['file_hash']         = trim($dummy['file_hash']);
-               $_CONFIG['master_salt']       = trim($dummy['master_salt']);
                $_CONFIG['secret_key']        = "";
-               $_CONFIG['show_timings']      = $dummy['show_timings'];
+               //die("<pre>".print_r($dummy, true)."</pre>");
+               $_CONFIG = array_merge($_CONFIG, $dummy);
 
                // Read key from secret file
                if ((empty($_CONFIG['file_hash'])) || (empty($_CONFIG['master_salt'])) || (empty($_CONFIG['pass_scramble']))) {
@@ -600,10 +580,10 @@ default: // Do stuff when extension is loaded
        } else {
                // Set some lame ;-) default settings
                $_CONFIG['def_refid'] = 0;
-               $_CONFIG['title_decoration'] = 'N';
-               $_CONFIG['title_mod_show']   = 'Y';
-               $_CONFIG['title_middle']     = "-";
-               //$_CONFIG['verbose_sql']      = 'N';
+               $_CONFIG['enable_title_deco'] = 'N';
+               $_CONFIG['title_mod_show']    = 'Y';
+               $_CONFIG['title_middle']      = "-";
+               //$_CONFIG['verbose_sql']       = 'N';
                define('MT_WORD' , DEFAULT_MT_WORD );
                define('MT_WORD2', DEFAULT_MT_WORD2);
                define('POINTS'  , DEFAULT_POINTS);
index 19ac12ced016296e9672f3470afb324e3c554d5f..35c1590cbd9378a7d32b19218006b166dd3982b6 100644 (file)
@@ -143,7 +143,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       $_CONFIG['top10_max'] = $dummy['top10_max'];
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
        break;
 }
index 612671f595a089847dba35491dc547b72b9453ae..c99b7aa528268df6ce59b5c4dbfabd01b1b9380d 100644 (file)
@@ -284,18 +284,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       // Maximum of listed transfers for out- and in-transfers
-       $_CONFIG['transfer_max']     = $dummy['transfer_max'];
-       // Age in seconds
-       $_CONFIG['transfer_age']     = $dummy['transfer_age'];
-       // Lock timeout for member settings
-       $_CONFIG['transfer_timeout'] = $dummy['transfer_timeout'];
-       // Balance after points transfer
-       $_CONFIG['transfer_balance'] = $dummy['transfer_balance'];
-       // Length of touring code
-       $_CONFIG['transfer_code']    = $dummy['transfer_code'];
-       // Length of touring code
-       $_CONFIG['ap_transfer']      = $dummy['ap_transfer'];
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
 
        if ((defined('__DAILY_RESET')) && ($_CONFIG['ap_transfer'] == 'Y'))
index b0eb28ec9c3b350d68845ab68dd7c25614cc28f3..f96acbf5a7d212150a10bf44ecbf0d7673a3dbdf 100644 (file)
@@ -215,8 +215,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
-       $_CONFIG['user_limit'] = $dummy['user_limit'];
-       $_CONFIG['user_alpha'] = $dummy['user_alpha'];
+       $_CONFIG = array_merge($_CONFIG, $dummy);
        unset($dummy);
        break;
 }
diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php
new file mode 100644 (file)
index 0000000..b34984b
--- /dev/null
@@ -0,0 +1,98 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 08/27/2008 *
+ * ================                             Last change: 08/27/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-yoomedia.php                                 *
+ * -------------------------------------------------------------------- *
+ * Short description : Extension for contacting the API of Yoo!Media    *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Erweitertung zur Anbindung an die API von        *
+ *                     Yoo!Media                                        *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder          *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])))
+{
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.0";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+       $SQLs[] = "";
+
+       // Load CSS file?
+       $EXT_CSS = 'Y';
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+       // SQL commands to run
+       break;
+
+case "update": // Update an extension
+       switch ($EXT_VER)
+       {
+       case "0.0.1": // SQL queries for v0.0.1
+               $SQLs[] = "";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "";
+               break;
+       }
+       break;
+
+default: // Do stuff when extension is loaded
+       $DUMMY = LOAD_CONFIG("0");
+       unset($DUMMY);
+       break;
+}
+
+// Language file prefix
+$EXT_LANG_PREFIX = "yoomedia";
+
+// Extension is always active?
+$EXT_ALWAYS_ACTIVE = 'N';
+
+//
+?>
index f2806f6b648279ee09bbe01fa3165063fd4b8e6b..7462021a9d7bae989751a6eaee7f8b8ec45c0d61 100644 (file)
@@ -138,8 +138,16 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) {
 
                // Compile and run finished rendered HTML code
                while (strpos($OUTPUT, '{!') > 0) {
-                       $eval = "\$OUTPUT = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";";
-                       eval($eval);
+                       // Prepare the content and eval() it...
+                       $newContent = "";
+                       $eval = "\$newContent = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";";
+                       @eval($eval);
+
+                       if (empty($newContent)) {
+                               // Something went wrong!
+                               die("Evaluation error:<pre>".htmlentities($eval)."</pre>");
+                       }
+                       $OUTPUT = $newContent;
                }
 
                // Output code here, DO NOT REMOVE! ;-)
@@ -1650,6 +1658,16 @@ function ADD_EMAIL_NAV($PAGES, $offset, $show_form, $colspan, $return=false) {
 
 //
 function MXCHANGE_OPEN ($script) {
+       global $_CONFIG;
+       // Default is not to use proxy
+       $useProxy = true;
+
+       // Are proxy settins set?
+       if ((!empty($_CONFIG['proxy_host'])) && ($_CONFIG['proxy_port'] > 0)) {
+               // Then use it
+               $useProxy = true;
+       }
+
        //* DEBUG */ print("SCRIPT=".$script."<br />\n");
        // Compile the script name
        $script = COMPILE_CODE($script);
@@ -1663,7 +1681,7 @@ function MXCHANGE_OPEN ($script) {
                $extract = explode("/", $url);
                $url = $extract[0];
                // Done extracting the URL :)
-       }
+       } // END - if
 
        // Extract host name
        $host = str_replace("http://", "", $url);
@@ -1684,17 +1702,62 @@ function MXCHANGE_OPEN ($script) {
 
        // Open connection
        //* DEBUG */ die("SCRIPT=".$script."<br />\n");
-       $fp = @fsockopen($host, 80, $errno, $errdesc, 30);
-       if (!$fp) {
-               // Failed!
-               return array("", "", "");
+       if ($useProxy) {
+               $fp = @fsockopen(COMPILE_CODE($_CONFIG['proxy_host']), $_CONFIG['proxy_port'], $errno, $errdesc, 30);
+       } else {
+               $fp = @fsockopen($host, 80, $errno, $errdesc, 30);
        }
 
-       // Generate request header
-       $request  = "GET /".trim($script)." HTTP/1.0\r\n";
+       // Is there a link?
+       if (!is_resource($fp)) {
+               // Failed!
+               return array("", "", "");
+       } // END - if
+
+       // Do we use proxy?
+       if ($useProxy) {
+               // Generate CONNECT request header
+               $request  = "CONNECT ".$host.":80 HTTP/1.1\r\n";
+               $request .= "Host: ".$host."\r\n";
+
+               // Use login data to proxy? (username at least!)
+               if (!empty($_CONFIG['proxy_username'])) {
+                       // Add it as well
+                       $encodedAuth = base64_encode(COMPILE_CODE($_CONFIG['proxy_username']).":".COMPILE_CODE($_CONFIG['proxy_password']));
+                       $request .= "Proxy-Authorization: Basic ".$encodedAuth."\r\n";
+               } // END - if
+
+               // Add last new-line
+               $request .= "\r\n";
+               //* DEBUG: */ print("<strong>Request:</strong><pre>".$request."</pre>");
+
+               // Write request
+               fputs($fp, $request);
+
+               // Got response?
+               if (feof($fp)) {
+                       // No response received
+                       return array("", "", "");
+               } // END - if
+
+               // Read the first line
+               $resp = trim(fgets($fp, 10240));
+               $respArray = explode(" ", $resp);
+               if ((strtolower($respArray[0]) !== "http/1.0") || ($respArray[1] != "200")) {
+                       // Invalid response!
+                       return array("", "", "");
+               } // END - if
+       } // END - if
+       
+       // Generate GET request header
+       $request  = "GET /".trim($script)." HTTP/1.1\r\n";
        $request .= "Host: ".$host."\r\n";
        $request .= "Referer: ".URL."/admin.php\r\n";
-       $request .= "User-Agent: ".TITLE."/".FULL_VERSION."\r\n\r\n";
+       $request .= "User-Agent: ".TITLE."/".FULL_VERSION."\r\n";
+       $request .= "Content-Type: text/plain\r\n";
+       $request .= "Cache-Control: no-cache\r\n";
+       $request .= "Connection: Close\r\n\r\n";
+       //* DEBUG: */ print("<strong>Request:</strong><pre>".$request."</pre>");
 
        // Initialize array
        $response = array();
@@ -1705,16 +1768,25 @@ function MXCHANGE_OPEN ($script) {
        // Read response
        while(!feof($fp)) {
                $response[] = trim(fgets($fp, 1024));
-       }
+       } // END - while
 
        // Close socket
        fclose($fp);
 
+       //* DEBUG: */ print("<strong>Response:</strong><pre>".print_r($response, true)."</pre>");
+
+       // Proxy agent found?
+       if ((substr(strtolower($response[0]), 0, 11) == "proxy-agent") && ($useProxy)) {
+               // Proxy header detected, so remove two lines
+               array_shift($response);
+               array_shift($response);
+       } // END - if
+
        // Was the request successfull?
-       if ((!ereg("200 OK", $response[0])) && (empty($response[0]))) {
+       if ((!ereg("200 OK", $response[0])) || (empty($response[0]))) {
                // Not found / access forbidden
                $response = array("", "", "");
-       }
+       } // END - if
 
        // Return response
        return $response;
@@ -2082,6 +2154,7 @@ function DISPLAY_PARSING_TIME_FOOTER() {
 // Unset/set session variables
 function set_session ($var, $value) {
        global $CSS;
+
        // Abort in CSS mode here
        if ($CSS == 1) return true;
 
@@ -2099,6 +2172,9 @@ function set_session ($var, $value) {
                //* DEBUG: */ echo "SET:".$var."=".$value."<br />\n";
                $_SESSION[$var] =  $value;
                return session_register($var);
+       } elseif (!empty($value)) {
+               // Update session
+               $_SESSION[$var] = $value;
        }
 
        // Return always true if the session variable is already set.
@@ -2121,8 +2197,6 @@ function isSessionVariableSet($var) {
 
 // Returns wether the value of the session variable or NULL if not set
 function get_session($var) {
-       if (!isset($_SESSION)) session_start();
-
        // Default is not found! ;-)
        $value = null;
 
@@ -2137,21 +2211,20 @@ function get_session($var) {
 }
 
 //
-//////////////////////////////////////////////
-//                                          //
-// AUTOMATICALLY RE-GNERATED FUNCTIONS ONLY //
-//                                          //
-//////////////////////////////////////////////
+//////////////////////////////////////////////////
+//                                              //
+// AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
+//                                              //
+//////////////////////////////////////////////////
 //
-if (!function_exists('html_entity_decode'))
-{
+if (!function_exists('html_entity_decode')) {
        // Taken from documentation on www.php.net
-       function html_entity_decode($string)
-       {
+       function html_entity_decode($string) {
                $trans_tbl = get_html_translation_table(HTML_ENTITIES);
                $trans_tbl = array_flip($trans_tbl);
                return strtr($string, $trans_tbl);
        }
 }
+
 //
 ?>
index ce675dc08c85d344350414433699a87de0d858eb..704ffd2cff6da6418f266085c34ddab7f9e1b7e7 100644 (file)
@@ -51,20 +51,20 @@ if (($header != "1") && ($header != "2")) {
                // Add title decorations? (left)
                if (!defined('__PAGE_TITLE')) {
                        if ((count($_CONFIG) > 1) && (is_resource($link)) && (isset($db))) {
-                               if (($_CONFIG['title_decoration'] == 'Y') && (trim(!empty($_CONFIG['title_left'])))) $TITLE .= trim($_CONFIG['title_left'])." ";
+                               if (($_CONFIG['enable_title_deco'] == 'Y') && (trim(!empty($_CONFIG['title_left'])))) $TITLE .= trim($_CONFIG['title_left'])." ";
                                $TITLE .= MAIN_TITLE;
 
                                // Add title of module? (middle decoration will also be added!)
-                               if (($_CONFIG['title_mod_show'] == 'Y') || ((empty($GLOBALS['what'])) && (empty($GLOBALS['action']))) || ($GLOBALS['module'] == "admin")) $TITLE .= " ".trim($_CONFIG['title_middle'])." ".ADD_MODULE_TITLE($GLOBALS['module']);
+                               if (($_CONFIG['enable_mod_title'] == 'Y') || ((empty($GLOBALS['what'])) && (empty($GLOBALS['action']))) || ($GLOBALS['module'] == "admin")) $TITLE .= " ".trim($_CONFIG['title_middle'])." ".ADD_MODULE_TITLE($GLOBALS['module']);
 
                                // Add title from what file
                                $MODE = "";
                                if ($GLOBALS['module'] == "login") $MODE = "member";
                                 elseif ($GLOBALS['module'] == "index") $MODE = "guest";
-                               if ((!empty($MODE)) && (isset($_CONFIG['title_what_show'])) && ($_CONFIG['title_what_show'] == 'Y')) $TITLE .= " ".trim($_CONFIG['title_middle'])." ".GET_MOD_DESCR($MODE, $GLOBALS['what']);
+                               if ((!empty($MODE)) && (isset($_CONFIG['enable_what_title'])) && ($_CONFIG['enable_what_title'] == 'Y')) $TITLE .= " ".trim($_CONFIG['title_middle'])." ".GET_MOD_DESCR($MODE, $GLOBALS['what']);
 
                                // Add title decorations? (right)
-                               if (($_CONFIG['title_decoration'] == 'Y') && (!empty($_CONFIG['title_right']))) $TITLE .= " ".trim($_CONFIG['title_right']);
+                               if (($_CONFIG['enable_title_deco'] == 'Y') && (!empty($_CONFIG['title_right']))) $TITLE .= " ".trim($_CONFIG['title_right']);
 
                                // Remember title in constant for the template
                                define('__PAGE_TITLE', html_entity_decode($TITLE));
index 860316e7bf7cdd89e7cdc6e2ad70b00e6b9ad816..ad0650adb712a5d8ac7736544a0ad34c8af7c3b8 100644 (file)
@@ -1111,6 +1111,12 @@ define('ADMIN_NO_POINTS_REPAYED', "Die Mailbuchung hatte keine {!POINTS!} zum zu
 define('ADMIN_POINTS_SHREDDED', "Es wurden <u>%s</u> {!POINTS!} geschrettert.");
 define('EXTENSION_WARNING_EXT_INACTIVE', "Die Erweiterung <u>%s</u> ist nicht aktiv. Dies kann zu St&ouml;rungen f&uuml;hren.<br />\nBitte aktivieren Sie diese unter <em>Verschiedenes-&gt;Erweiterungen</em>.");
 define('EXTENSION_WARNING_USER_LIMIT', "Die Erweiterung <u>user</u> ist nicht aktiv. Die Anzahl User pro Seite wurde auf 100 gesetzt. Bitte aktivieren Sie diese unter <em>Verschiedenes-&gt;Erweiterungen</em>.");
+define('ADMIN_PROXY_SETTINGS_INVALID', "Ihre Proxy-Einstellungen scheinen ung&uuml;ltig zu sein!");
+define('ADMIN_EDIT_PROXY_SETTINGS', "Proxy-Einstellungen &auml;ndern");
+define('ADMIN_CONFIG_PROXY_HOST', "Hostname oder IP-Nummer:");
+define('ADMIN_CONFIG_PROXY_PORT', "Port-Nummer (z.B. 8085):");
+define('ADMIN_CONFIG_PROXY_USERNAME', "Benuztername (falls vorhanden):");
+define('ADMIN_CONFIG_PROXY_PASSWORD', "Passwort (falls vorhanden):");
 
 //
 ?>
index 684517c86dce8e038c187f0af65e8782ed0abb10..2fc9b17210f64f4a2e8239b30a437c47fc30c500 100644 (file)
@@ -837,5 +837,23 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $row, $columns = array(), $
                }
        }
 }
+// Checks proxy settins by fetching check-updates2.php from www.mxchange.org
+function ADMIN_TEST_PROXY_SETTINGS ($settingsArray) {
+       global $_CONFIG;
+       // By default they are invalid
+       $valid = false;
+
+       // Set temporary the new settings
+       $_CONFIG = array_merge($_CONFIG, $settingsArray);
+
+       // Now get the test URL
+       $content = MXCHANGE_OPEN("check-updates2.php");
+
+       // Is the first line with "200 OK"?
+       $valid = ereg("200 OK", $content[0]);
+
+       // Return result
+       return $valid;
+}
 //
 ?>
diff --git a/inc/modules/admin/what-config_proxy.php b/inc/modules/admin/what-config_proxy.php
new file mode 100644 (file)
index 0000000..75cd3f3
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 08/27/2008 *
+ * ================                             Last change: 08/27/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-config_proxy.php                            *
+ * -------------------------------------------------------------------- *
+ * Short description : Proxy settings                                   *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Proxy-Einstellungenent                           *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", basename(__FILE__));
+
+if (isset($_POST['ok'])) {
+       // Test proxy settings
+       if (ADMIN_TEST_PROXY_SETTINGS($_POST)) {
+               // Save configuration
+               ADMIN_SAVE_SETTINGS($_POST);
+       } else {
+               // Invalid!
+               LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_PROXY_SETTINGS_INVALID);
+       }
+} else {
+       // Prepare content
+       $content = array(
+               'proxy_host'     => $_CONFIG['proxy_host'],
+               'proxy_port'     => $_CONFIG['proxy_port'],
+               'proxy_username' => $_CONFIG['proxy_username'],
+               'proxy_password' => $_CONFIG['proxy_password'],
+       );
+
+       // Load template
+       LOAD_TEMPLATE("admin_config_proxy", false, $content);
+}
+
+//
+?>
index 322be77bf37ed96817d75256e2ba3c6045e8a8b8..85cf02ca9489f6e13f83c9ee3f3a7964dec270f1 100644 (file)
@@ -51,8 +51,8 @@ if (isset($_POST['ok']))
        define('__CFG_TITLE_LEFT'     , $_CONFIG['title_left']);
        define('__CFG_TITLE_MIDDLE'   , $_CONFIG['title_middle']);
        define('__CFG_TITLE_RIGHT'    , $_CONFIG['title_right']);
-       define('__CFG_TITLE_DECOS'    , ADD_SELECTION("yn", $_CONFIG['title_decoration'], "enable_title_deco"));
-       define('__CFG_TITLE_MOD_SHOW' , ADD_SELECTION("yn", $_CONFIG['title_mod_show']  , "enable_mod_title" ));
+       define('__CFG_TITLE_DECOS'    , ADD_SELECTION("yn", $_CONFIG['enable_title_deco'], "enable_title_deco"));
+       define('__CFG_TITLE_MOD_SHOW' , ADD_SELECTION("yn", $_CONFIG['enable_mod_title'] , "enable_mod_title" ));
        define('__CFG_TITLE_WHAT_SHOW', ADD_SELECTION("yn", $_CONFIG['title_what_show']  , "enable_what_title"));
 
        // Load template
index 15418d191cb147ff6d22b74768d46c1670caee25..f3557895ac852b753d9430adeef9cda149784464 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
+
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));
 
@@ -45,28 +45,20 @@ global $CurrTheme;
 // Check for selected themes
 $SEL = 0;
 if (!empty($_POST['sel'])) $SEL = SELECTION_COUNT($_POST['sel']);
-if ($SEL > 0)
-{
+if ($SEL > 0) {
        $OUT = "";
-       foreach ($_POST['sel'] as $id=>$sel)
-       {
+       foreach ($_POST['sel'] as $id=>$sel) {
                $SQL = "";
                // Shall I de-/activate or delete themes?
-               if (isset($_POST['status']))
-               {
+               if (isset($_POST['status'])) {
                        // Change status
-                       if ($_POST['active'][$id] == 'Y')
-                       {
+                       if ($_POST['active'][$id] == 'Y') {
                                $SQL = "UPDATE "._MYSQL_PREFIX."_themes SET theme_active='N' WHERE id='".$id."' LIMIT 1";
-                       }
-                        else
-                       {
+                       } else {
                                $SQL = "UPDATE "._MYSQL_PREFIX."_themes SET theme_active='Y' WHERE id='".$id."' LIMIT 1";
                        }
                        $OUT = ADMIN_THEMES_UPDATED;
-               }
-                elseif (isset($_POST['del']))
-               {
+               } elseif (isset($_POST['del'])) {
                        // Delete themes
                        $SQL = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_themes WHERE id='".$id."' LIMIT 1";
                        $OUT = ADMIN_THEMES_DELETED;
@@ -79,9 +71,13 @@ if ($SEL > 0)
        // Output generated?
        if (empty($OUT)) ADMIN_THEME_NO_OUTPUT;
 } elseif (!empty($_GET['default_theme'])) {
-       // Save theme
+       // Escape string from input
        $POST['default_theme'] = SQL_ESCAPE($_GET['default_theme']);
-       set_session("mxchange_theme", $POST['default_theme'], (time() + 60*60*24*365), COOKIE_PATH);
+
+       // Set session
+       set_session("mxchange_theme", $POST['default_theme']);
+
+       // Save theme
        ADMIN_SAVE_SETTINGS($POST);
 }
 
@@ -123,9 +119,7 @@ if (SQL_NUMROWS($result) > 0)
 
        // Free memory
        SQL_FREERESULT($result);
-}
- else
-{
+} else {
                // No themes found???
        $OUT .= "<TR>
   <TD colspan=\"7\" class=\"bottom2\" height=\"60\">
index 745fc31efd231e5b5c6ee861a8065265c8c17185..6ab20c0266fdff0b22fbfcca8eac3eac13e70913 100644 (file)
@@ -50,7 +50,7 @@ if (!empty($GLOBALS['userid']) && (isSessionVariableSet('u_hash')) && (isSession
        SQL_FREERESULT($result);
 
        // Change to new theme
-       set_session("mxchange_theme", $NewTheme, (time() + 60*60*24*365), COOKIE_PATH);
+       set_session("mxchange_theme", $NewTheme);
 
        $bonus = false;
        if ((GET_EXT_VERSION("sql_patches") >= "0.2.8") && (GET_EXT_VERSION("bonus") >= "0.2.1") && ($_CONFIG['bonus_login_yn'] == 'N') && ($_CONFIG['bonus_login_yn'] == 'Y')) {
index 40a1c513d55a1f925bc2d2b62aa0f5bb6fd826b7..4749ab6313fc3422c71ab73d26b4b9096441c7fd 100644 (file)
@@ -115,7 +115,7 @@ if (!empty($_GET['hash']))
                        // Account confirmed!
                        if (defined('LEAD_CODE_ENABLED') && defined('LEAD_EXPIRY_TIME')) {
                                // Set special lead cookie
-                               set_session("lead_uid", bigintval($uid), (time() + LEAD_EXPIRY_TIME), COOKIE_PATH);
+                               set_session("lead_uid", bigintval($uid));
 
                                // Lead-Code mode enabled
                                LOAD_URL("lead-confirm.php");
@@ -126,7 +126,7 @@ if (!empty($_GET['hash']))
                        }
                } elseif (defined('LEAD_CODE_ENABLED') && defined('LEAD_EXPIRY_TIME')) {
                        // Set special lead cookie
-                       set_session("lead_uid", bigintval($uid), (time() + LEAD_EXPIRY_TIME), COOKIE_PATH);
+                       set_session("lead_uid", bigintval($uid));
 
                        // Lead-Code mode enabled
                        LOAD_URL("lead-confirm.php");
index 87785380106e65320609deb7c294261cb8adb8bd..eb2c73ec184c85a4021b6e0225ca619d7b94018a 100644 (file)
@@ -55,7 +55,7 @@ if (!empty($_POST['member_theme']))
        $NewTheme = $_POST['member_theme'];
 
        // Change to new theme
-       set_session("mxchange_theme", $NewTheme, (time() + 60*60*24*365), COOKIE_PATH);
+       set_session("mxchange_theme", $NewTheme);
 
        // Theme saved!
        LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_THEME_SAVED);
index cdde847e5d1f4f67b4fceb07ef058115d10f2535..49b40d35824e07f7bd2e82a3526a1c4b43820c56 100644 (file)
@@ -48,9 +48,6 @@ require_once(PATH."inc/functions.php");  // Non-database functions
 require_once(PATH."inc/extensions.php");
 require_once(PATH."inc/language.php");
 
-// Load "databases" aka static arrays
-require_once(PATH."inc/databases.php");     // Several hard-coded databases (arrays, constants)
-
 // Check if the user setups his MySQL stuff...
 if ((empty($MySQL['login'])) && (!isBooleanConstantAndTrue('mxchange_installing')) && (!isset($_GET['installing'])) && (isBooleanConstantAndTrue('mxchange_installed'))) {
        // No login entered and outside installation mode
@@ -67,11 +64,6 @@ if ((empty($MySQL['login'])) && (!isBooleanConstantAndTrue('mxchange_installing'
        echo "<STRONG>".LANG_WARNING.":</STRONG> ".WARN_NULL_PASSWORD;
 }
 
-// Init configuration arrays
-$_CONFIG = array(
-       'code_length' => 0
-);
-
 // Check if this file is writeable or read-only and warn the user
 if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed'))) {
        // Check for write-permission for config.php and inc directory
@@ -130,15 +122,15 @@ LIMIT 1", __FILE__, __LINE__);
                                        // Load all extensions
                                        require_once(PATH."inc/load_extensions.php");
 
+                                       // Load "databases" aka static arrays
+                                       require_once(PATH."inc/databases.php");
+
                                        // Loading patching system is required here...
                                        require_once(PATH."inc/patch-system.php"); // Initialize patch system
 
                                        // Functions which are related to themes
                                        require_once(PATH."inc/theme-manager.php");
 
-                                       // Initialize session management
-                                       require_once(PATH."inc/session.php");
-
                                        // Load admin include file if he is admin
                                        if (IS_ADMIN()) {
                                                // Administrative functions
@@ -242,7 +234,6 @@ LIMIT 1", __FILE__, __LINE__);
        require_once(PATH."inc/databases.php");
        require_once(PATH."inc/theme-manager.php");
        require_once(PATH."inc/load_extensions.php");
-       require_once(PATH."inc/session.php");
 
        // Check if we are in installation routine
        $installPhp = basename($_SERVER['PHP_SELF']);
index f463d232337774b46a661166e748d46e9e9eae86..3eeee63dde45d33663d1891998663790ce9ef93d 100644 (file)
@@ -38,6 +38,9 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
        require($INC);
 }
 
+// Always make sure the session management is initialized first
+require_once(PATH."inc/session.php");
+
 //
 function GET_CURR_THEME() {
        global $INC_POOL, $_CONFIG, $CSS;
@@ -50,7 +53,7 @@ function GET_CURR_THEME() {
 
        if (!isSessionVariableSet('mxchange_theme')) {
                // Set default theme
-               set_session("mxchange_theme", $ret, (time() + 60*60*24*365), COOKIE_PATH);
+               set_session("mxchange_theme", $ret);
        } elseif ((isSessionVariableSet('mxchange_theme')) && (GET_EXT_VERSION("sql_patches") >= "0.1.4")) {
                // Get theme from cookie
                $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' LIMIT 1", array(get_session('mxchange_theme')), __FILE__, __LINE__);
@@ -68,17 +71,17 @@ function GET_CURR_THEME() {
                // Installation mode active
                if ((!empty($_GET['theme'])) && (file_exists($theme)) && (is_readable($theme))) {
                        // Set cookie from URL data
-                       set_session("mxchange_theme", $_GET['theme'], (time() + 60*60*24*365), COOKIE_PATH);
+                       set_session("mxchange_theme", $_GET['theme']);
                } elseif (file_exists(PATH."theme/".$_POST['theme']."/theme.php")) {
                        // Set cookie from posted data
-                       set_session("mxchange_theme", $_POST['theme'], (time() + 60*60*24*365), COOKIE_PATH);
+                       set_session("mxchange_theme", $_POST['theme']);
                }
 
                // Set return value
                $ret = get_session('mxchange_theme');
        } else {
                // Invalid design, reset cookie
-               set_session("mxchange_theme", $ret, (time() + 60*60*24*365), COOKIE_PATH);
+               set_session("mxchange_theme", $ret);
        }
 
        // Add (maybe) found theme.php file to inclusion list
@@ -149,7 +152,7 @@ if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $CurrTheme))
        $NewTheme = $_POST['new_theme'];
 
        // Change to new theme
-       set_session("mxchange_theme", $NewTheme, (time() + 60*60*24*365), COOKIE_PATH);
+       set_session("mxchange_theme", $NewTheme);
 
        // Remove current from array and set new
        $theme = PATH."theme/".$CurrTheme."/theme.php";
index 7f9ea32350949a485af38ee4f4c76995c73b5fe7..1af40fcdb50e6a8bed06c5538e6f04798266efb6 100644 (file)
--- a/index.php
+++ b/index.php
@@ -59,7 +59,7 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install
                // Is the index page configured for redirect pr not?
                if ($_CONFIG['index_cookie'] > 0) {
                        // Set cookie and remeber it for specified time
-                       set_session("visited", "true", (time() + $_CONFIG['index_cookie']), COOKIE_PATH);
+                       set_session("visited", "true");
                } elseif (isSessionVariableSet('visited')) {
                        // Remove cookie when admin set 0 in setup
                        set_session("visited", "");
diff --git a/templates/de/html/admin/admin_config_proxy.tpl b/templates/de/html/admin/admin_config_proxy.tpl
new file mode 100644 (file)
index 0000000..a64c02a
--- /dev/null
@@ -0,0 +1,51 @@
+<FORM action="{!URL!}/modules.php?module=admin&amp;what=config_proxy" method="POST">
+<TABLE border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed" width="500">
+       <TR>
+               <TD colspan="2" align="center" class="admin_title bottom2" height="30">
+               <STRONG>{--ADMIN_EDIT_PROXY_SETTINGS--}</STRONG></TD>
+       </TR>
+       <TR><TD colspan="2" class="seperator" height="5">&nbsp;</TD></TR>
+       <TR>
+               <TD align="right" style="padding-right:10px">
+                       {--ADMIN_CONFIG_PROXY_HOST--}
+               </TD>
+               <TD>
+                       <INPUT type="text" name="proxy_host" value="$content[proxy_host]" />
+               </TD>
+       </TR>
+       <TR><TD colspan="2" class="seperator" height="5">&nbsp;</TD></TR>
+       <TR>
+               <TD align="right" style="padding-right:10px">
+                       {--ADMIN_CONFIG_PROXY_PORT--}
+               </TD>
+               <TD>
+                       <INPUT type="text" name="proxy_port" value="$content[proxy_port]" />
+               </TD>
+       </TR>
+       <TR><TD colspan="2" class="seperator" height="5">&nbsp;</TD></TR>
+       <TR>
+               <TD align="right" style="padding-right:10px">
+                       {--ADMIN_CONFIG_PROXY_USERNAME--}
+               </TD>
+               <TD>
+                       <INPUT type="text" name="proxy_username" value="$content[proxy_username]" />
+               </TD>
+       </TR>
+       <TR><TD colspan="2" class="seperator" height="5">&nbsp;</TD></TR>
+       <TR>
+               <TD align="right" style="padding-right:10px">
+                       {--ADMIN_CONFIG_PROXY_PASSWORD--}
+               </TD>
+               <TD>
+                       <INPUT type="password" name="proxy_password" value="$content[proxy_password]" />
+               </TD>
+       </TR>
+       <TR><TD colspan="2" class="bottom2 seperator" height="5">&nbsp;</TD></TR>
+       <TR>
+               <TD colspan="2" align="center" class="admin_footer">
+                       <INPUT type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />&nbsp;*
+                       <INPUT type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" />
+               </TD>
+       </TR>
+</TABLE>
+</FORM>
diff --git a/templates/de/html/ext/ext_yoomedia.tpl b/templates/de/html/ext/ext_yoomedia.tpl
new file mode 100644 (file)
index 0000000..c455498
--- /dev/null
@@ -0,0 +1 @@
+Erweiterung zur Anbindung an die API (Interface 2.0!) von <a href="http://www.yoomedia.de?ref=1715" target="_blank" rel="external" title="Referral-Link, bitte ID stehen lassen!">Yoo!Media</a>.