From 6032b7018b83778f1592383238f4e0d28f718622 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 11 Sep 2008 19:11:07 +0000 Subject: [PATCH] Obsoleted parameters to SQL_AFFECTED_ROWS() removed, OPEN_TABLE() and CLOSE_TABLE() are now deprecated and except check-login.php fully removed --- click.php | 2 +- inc/databases.php | 2 +- inc/db/lib-mysql3.php | 19 +++++-- inc/functions.php | 3 +- inc/libs/bonus_functions.php | 4 +- inc/libs/surfbar_functions.php | 4 +- inc/libs/transfer_functions.php | 5 +- inc/modules/admin/admin-inc.php | 4 +- inc/modules/admin/what-add_points.php | 49 ++++++------------- inc/modules/admin/what-admin_add.php | 3 -- inc/modules/admin/what-adminedit.php | 10 +--- inc/modules/admin/what-chk_regs.php | 13 ++--- inc/modules/admin/what-config_beg.php | 2 +- inc/modules/admin/what-config_bonus.php | 18 +++---- inc/modules/admin/what-config_cats.php | 3 +- inc/modules/admin/what-config_doubler.php | 2 +- inc/modules/admin/what-config_points.php | 7 +-- inc/modules/admin/what-config_refid.php | 13 ++--- inc/modules/admin/what-config_reg.php | 5 +- inc/modules/admin/what-config_register2.php | 15 ++---- inc/modules/admin/what-config_secure.php | 2 - inc/modules/admin/what-del_user.php | 33 ++++--------- inc/modules/admin/what-edit_emails.php | 14 ++---- inc/modules/admin/what-edit_user.php | 4 +- inc/modules/admin/what-email_stats.php | 7 +-- inc/modules/admin/what-guest_add.php | 4 -- inc/modules/admin/what-guestedit.php | 6 +-- inc/modules/admin/what-list_cats.php | 27 +++------- inc/modules/admin/what-list_norefs.php | 3 -- inc/modules/admin/what-list_refs.php | 2 - inc/modules/admin/what-list_surfbar_urls.php | 8 +-- inc/modules/admin/what-lock_user.php | 11 ++--- inc/modules/admin/what-mem_add.php | 4 -- inc/modules/admin/what-memedit.php | 6 +-- inc/modules/admin/what-payments.php | 7 +-- inc/modules/admin/what-refbanner.php | 7 +-- inc/modules/admin/what-repair_amenu.php | 1 - inc/modules/admin/what-repair_amnu.php | 1 - inc/modules/admin/what-send_newsletter.php | 3 +- inc/modules/admin/what-sub_points.php | 5 +- inc/modules/admin/what-unlock_emails.php | 6 +-- inc/modules/admin/what-unlock_sponsor.php | 2 +- inc/modules/admin/what-usage.php | 3 -- inc/modules/chk_login.php | 3 +- inc/modules/guest/what- | 9 ++-- inc/modules/guest/what-agb.php | 8 +-- inc/modules/guest/what-confirm.php | 5 +- inc/modules/guest/what-impressum.php | 7 ++- inc/modules/guest/what-infos.php | 8 +-- inc/modules/guest/what-login.php | 14 ++---- inc/modules/guest/what-register.php | 10 ++-- inc/modules/guest/what-sponsor_login.php | 4 +- inc/modules/guest/what-stats.php | 7 ++- inc/modules/guest/what-welcome.php | 8 +-- inc/modules/member/what-mydata.php | 6 +-- inc/modules/member/what-points.php | 2 - inc/modules/member/what-reflinks.php | 3 -- inc/modules/order.php | 2 +- inc/mysql-manager.php | 12 ++--- inc/pool-update.php | 2 +- mailid.php | 5 -- mailid_top.php | 6 +-- surfbar.php | 3 -- templates/de/html/agb.tpl | 8 +-- templates/de/html/ext/ext_sponsor.tpl | 19 ++++++- templates/de/html/member/member_doubler.tpl | 14 +++--- .../de/html/member/member_holiday_form.tpl | 8 +-- .../de/html/member/member_unconfirmed_404.tpl | 3 +- .../de/html/member/member_wernis_form.tpl | 23 ++++----- 69 files changed, 206 insertions(+), 342 deletions(-) diff --git a/click.php b/click.php index d5c3aaa6a0..4dd6144b67 100644 --- a/click.php +++ b/click.php @@ -48,7 +48,7 @@ if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['b // Update clicks counter... $CLICK = 1; $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET clicks=clicks+1 WHERE id=%s LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__); - if (SQL_AFFECTEDROWS($link) == 1) { + if (SQL_AFFECTEDROWS() == 1) { if (!empty($_GET['user'])) { LOAD_URL("ref.php?refid=".bigintval($_GET['user'])); } else { diff --git a/inc/databases.php b/inc/databases.php index 70bf8d8334..8e5da05945 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "299"); +define('CURR_SVN_REVISION', "300"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 182b88895a..dbc6571506 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -114,24 +114,35 @@ function SQL_NUMROWS($result) { } // SQL affected rows -function SQL_AFFECTEDROWS($lnk="x", $F="dummy", $L="dummy") { +function SQL_AFFECTEDROWS() { global $link; - // $lnk will be ignored for now! + + // Valid link resource? + if (!is_resource($link)) return false; + + // Get affected rows $lines = @mysql_affected_rows($link); + + // Return it return $lines; } // SQL fetch row function SQL_FETCHROW($result) { + // Init data $DATA = array(); + + // Is a result resource set? + if (!is_resource($result)) return false; + $DATA = @mysql_fetch_row($result); return $DATA; } // SQL fetch array -function SQL_FETCHARRAY($res=false, $nr=0, $remove_numerical=true) { +function SQL_FETCHARRAY($res, $nr=0, $remove_numerical=true) { // Is a result resource set? - if (!$res) return false; + if (!is_resource($res)) return false; // Initialize array $row = array(); diff --git a/inc/functions.php b/inc/functions.php index db1e00d4ec..ba28010254 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -53,6 +53,7 @@ function is_INCWritable($inc) { // Open a table (you may want to add some header stuff here) function OPEN_TABLE($PERCENT = "", $CLASS = "", $ALIGN="left", $VALIGN="", $td_only=false) { global $table_cnt; + // Count tables so we can generate CSS classes for every table... :-) if (empty($CLASS)) { // Class is empty so count one up and create a class @@ -904,7 +905,7 @@ function MAKE_TIME($H, $M, $S, $stamp) { } // function LOAD_URL($URL, $addUrlData=true) { - global $CSS, $_CONFIG, $link, $db, $footer; + global $CSS, $_CONFIG, $footer; // Check if http(s):// is there if ((substr($URL, 0, 7) != "http://") && (substr($URL, 0, 8) != "https://")) { diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index 266866130f..9fa4477f44 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -240,9 +240,7 @@ function BONUS_PURGE_EXPIRED_TURBO_BONUS() global $_CONFIG; // Remove entries $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus_turbo WHERE timemark < ".(time() - $_CONFIG['bonus_timeout']), __FILE__, __LINE__); - $DELETED = SQL_AFFECTEDROWS($result); - if ($DELETED > 0) - { + if (SQL_AFFECTEDROWS() > 0) { // Send out email to admin SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_TURBO_SUBJECT, "admin_autopurge_turbo", $DELETED, ""); } diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index a715e81486..8d238b5e44 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -783,7 +783,7 @@ WHERE sbu.userid NOT IN (".implode(",", $UIDs).") AND sbu.status='CONFIRMED'".$A GROUP BY sbu.id", __FILE__, __LINE__); // Log last query - //DEBUG_LOG(__FUNCTION__.":lastQuery=".$_CONFIG['db_last_query']."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS($result).""); + //DEBUG_LOG(__FUNCTION__.":lastQuery=".$_CONFIG['db_last_query']."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS().""); // Fetch max rand $maxRand = SQL_NUMROWS($result); @@ -863,7 +863,7 @@ LIMIT 1", } // Is there an id number? - //DEBUG_LOG(__FUNCTION__.":lastQuery=".$_CONFIG['db_last_query']."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS($result).""); + //DEBUG_LOG(__FUNCTION__.":lastQuery=".$_CONFIG['db_last_query']."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS().""); if (SQL_NUMROWS($result) == 1) { // Load/cache data //DEBUG_LOG(__FUNCTION__.":count(".count($SURFBAR_CACHE).") - BEFORE"); diff --git a/inc/libs/transfer_functions.php b/inc/libs/transfer_functions.php index c86eb51bc4..be51924369 100644 --- a/inc/libs/transfer_functions.php +++ b/inc/libs/transfer_functions.php @@ -40,7 +40,6 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // function TRANSFER_AUTPPURGE($max, $age) { - global $link; // First get total in-going lines $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_user_transfers_in ORDER BY id", __FILE__, __LINE__); if (SQL_NUMROWS($result) > $max) @@ -64,11 +63,11 @@ function TRANSFER_AUTPPURGE($max, $age) // Remove old in-going transfers $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_in WHERE time_trans < ".(time() - $age), __FILE__, __LINE__); - $REMOVE = SQL_AFFECTEDROWS($link); + $REMOVE = SQL_AFFECTEDROWS(); // Remove old out-going transfers $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_out WHERE time_trans < ".(time() - $age), __FILE__, __LINE__); - $REMOVE += SQL_AFFECTEDROWS($link); + $REMOVE += SQL_AFFECTEDROWS(); // Only send email to admin(s) when we have removed entries if ($REMOVE > 0) { diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 1a8c01ad99..b68a1e7a9f 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -259,7 +259,7 @@ function admin_WriteData ($file, $comment, $prefix, $suffix, $DATA, $seek=0) { // function ADMIN_DO_ACTION($wht) { - global $menuDesription, $menuTitle, $_CONFIG, $cacheArray, $link, $DATA, $DEPTH; + global $menuDesription, $menuTitle, $_CONFIG, $cacheArray, $DATA, $DEPTH; //* DEBUG: */ echo __LINE__."*".$wht."/".$GLOBALS['module']."/".$GLOBALS['action']."/".$GLOBALS['what']."*
\n"; if (EXT_IS_ACTIVE("cache")) { @@ -338,7 +338,7 @@ LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__); // function ADD_ADMIN_MENU($act, $wht,$return=false) { - global $menuDesription, $menuTitle, $link; + global $menuDesription, $menuTitle; $SUB = false; // Menu descriptions diff --git a/inc/modules/admin/what-add_points.php b/inc/modules/admin/what-add_points.php index 0d9ea9651d..fd9b0e5ee8 100644 --- a/inc/modules/admin/what-add_points.php +++ b/inc/modules/admin/what-add_points.php @@ -43,34 +43,27 @@ ADD_DESCR("admin", basename(__FILE__)); // Fix a notice if (!isset($_GET['u_id'])) $_GET['u_id'] = ""; -OPEN_TABLE("100%", "admin_content admin_content_align", ""); -if ($_GET['u_id'] == "all") -{ +if ($_GET['u_id'] == "all") { // Add points to all accounts - if ((isset($_POST['ok'])) && ($_POST['points'] > 0)) - { + if ((isset($_POST['ok'])) && ($_POST['points'] > 0)) { define('__POINTS_VALUE', $_POST['points']); $result_main = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__); - while (list($uid) = SQL_FETCHROW($result_main)) - { + while (list($uid) = SQL_FETCHROW($result_main)) { // User ID found in URL so we use this give him some credits $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { + if (SQL_NUMROWS($result) == 1) { // Selected user does exist list($sname, $fname, $email) = SQL_FETCHROW($result); SQL_FREERESULT($result); - if ((isset($_POST['ok'])) && (!empty($_POST['points']))) - { + if ((isset($_POST['ok'])) && (!empty($_POST['points']))) { // Ok, add points and send an email to him... $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+(%s) WHERE userid=%s AND ref_depth=0 LIMIT 1", array($_POST['points'], bigintval($uid)), __FILE__, __LINE__); // Update mediadata as well - if (GET_EXT_VERSION("mediadata") >= "0.0.4") - { + if (GET_EXT_VERSION("mediadata") >= "0.0.4") { // Update database MEDIA_UPDATE_ENTRY(array("total_points"), "add", $_POST['points']); } @@ -87,26 +80,20 @@ if ($_GET['u_id'] == "all") // Output message LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ALL_POINTS_ADDED); - } - else - { + } else { // Display form add points LOAD_TEMPLATE("admin_add_points_all"); } -} - elseif (!empty($_GET['u_id'])) -{ +} elseif (!empty($_GET['u_id'])) { // User ID found in URL so we use this give him some credits $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { + if (SQL_NUMROWS($result) == 1) { // Selected user does exist list($sname, $fname, $email) = SQL_FETCHROW($result); SQL_FREERESULT($result); - if ((isset($_POST['ok'])) && (!empty($_POST['points']))) - { + if ((isset($_POST['ok'])) && (!empty($_POST['points']))) { // Ok, add points and send an email to him... $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+(%s) WHERE userid=%s AND ref_depth=0 LIMIT 1", array($_POST['points'], bigintval($_GET['u_id'])), __FILE__, __LINE__); @@ -119,26 +106,20 @@ if ($_GET['u_id'] == "all") SEND_EMAIL($email, ADMIN_ADD_SUBJ, $msg); LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_POINTS_ADDED); - } - else - { + } else { // Opps, missing form here define('__USER_VALUE', "".$sname." ".$fname.""); define('__UID_VALUE', $_GET['u_id']); LOAD_TEMPLATE("admin_add_points"); } - } - else - { + } else { // User not found! OUTPUT_HTML("".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2.""); } -} - else -{ +} else { // Output selection form with all confirmed user accounts listed - ADD_MEMBER_SELECTION_BOX(true); + ADD_MEMBER_SELECTION_BOX("0", true); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-admin_add.php b/inc/modules/admin/what-admin_add.php index 7c938cb84f..7882d8fbea 100644 --- a/inc/modules/admin/what-admin_add.php +++ b/inc/modules/admin/what-admin_add.php @@ -40,8 +40,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); - // Check if the admin has entered title and what-php file name... if (((empty($_POST['title'])) || (empty($_POST['menu'])) || (empty($_POST['descr']))) && (isset($_POST['ok']))) { @@ -202,7 +200,6 @@ VALUES('%s', '%s', '%s', '%s')", // Is demo login! LOAD_TEMPLATE("admin_settings_saved", false, SETTINGS_NOT_SAVED); } -CLOSE_TABLE(); // ?> diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index 18f9414b77..9ad293ca65 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -52,13 +52,8 @@ if (!empty($_GET['sub'])) $chk = 0; if (!empty($_POST['sel'])) $chk = SELECTION_COUNT($_POST['sel']); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); - // List all menu points and make them editable -OUTPUT_HTML("

-
"); -if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) -{ +if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) { // Edit menu entries define('__SUB_VALUE', $SUB); define('__CHK_VALUE', $chk); @@ -302,7 +297,6 @@ WHERE ".$AND." AND id=%s LIMIT 1", LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_MENUS_FOUND); } } -OUTPUT_HTML("
"); -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-chk_regs.php b/inc/modules/admin/what-chk_regs.php index bbdf02305a..e178a6d173 100644 --- a/inc/modules/admin/what-chk_regs.php +++ b/inc/modules/admin/what-chk_regs.php @@ -44,13 +44,10 @@ ADD_DESCR ("admin", basename(__FILE__)); // Check for accounts $query = SQL_QUERY("SELECT userid, sex, surname, family, email, REMOTE_ADDR, refid, user_hash FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED' ORDER BY userid", __FILE__, __LINE__); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); -if (SQL_NUMROWS($query) > 0) -{ +if (SQL_NUMROWS($query) > 0) { // We have some (new?) registrations! $SW = 2; $OUT = ""; - while (list($uid, $sex, $sname, $fname, $email, $IP, $ref, $hash) = SQL_FETCHROW($query)) - { + while (list($uid, $sex, $sname, $fname, $email, $IP, $ref, $hash) = SQL_FETCHROW($query)) { if ($ref > 0) $ref = ADMIN_USER_PROFILE_LINK($ref); // Prepare array for the row template $content = array( @@ -76,12 +73,10 @@ if (SQL_NUMROWS($query) > 0) // Load main template LOAD_TEMPLATE("admin_reg"); -} - else -{ +} else { // No registrations left - or all has confirmed their email address... :-) LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ALL_CONFIRMED_EMAIL); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-config_beg.php b/inc/modules/admin/what-config_beg.php index 76ff3493a0..ff220ca09e 100644 --- a/inc/modules/admin/what-config_beg.php +++ b/inc/modules/admin/what-config_beg.php @@ -161,7 +161,7 @@ if (isset($_POST['ok'])) } // Add data to constant __MEMBER_SELECTION - ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['beg_uid']); + ADD_MEMBER_SELECTION_BOX($_CONFIG['beg_uid'], false, true, true); // Load form template LOAD_TEMPLATE("admin_config_beg"); diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index cb432f2812..c07251b6dc 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -71,13 +71,10 @@ if (isset($_POST['ok'])) $_CONFIG['bonus_di_notify'] = $_POST['bonus_di_notify']; // Include sending out mails - if ((($_CONFIG['bonus_active'] == "Y") && ($_CONFIG['bonus_en_notify'] == "Y")) || (($_CONFIG['bonus_active'] == "N") && ($_CONFIG['bonus_di_notify'] == "Y"))) - { + if ((($_CONFIG['bonus_active'] == "Y") && ($_CONFIG['bonus_en_notify'] == "Y")) || (($_CONFIG['bonus_active'] == "N") && ($_CONFIG['bonus_di_notify'] == "Y"))) { include(PATH."inc/mails/bonus_mails.php"); } -} - else -{ +} else { // Prepare contants for the template define('__LOGIN_VALUE' , TRANSLATE_COMMA($_CONFIG['login_bonus'] , false)); define('__TURBO_VALUE' , TRANSLATE_COMMA($_CONFIG['turbo_bonus'] , false)); @@ -89,7 +86,7 @@ if (isset($_POST['ok'])) define('__TLINES_VALUE', $_CONFIG['bonus_lines']); // Transfer options to template __MEMBER_SELECTION - ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['bonus_uid']); + ADD_MEMBER_SELECTION_BOX($_CONFIG['bonus_uid'], false, true, true); // Initialize array for the points list $RANKS = explode(";", $_CONFIG['bonus_rates']); @@ -99,16 +96,13 @@ if (isset($_POST['ok'])) // Generate list $OUT = "
    \n"; - foreach ($RANKS as $k=>$rate) - { - if (!empty($rate)) - { + foreach ($RANKS as $k=>$rate) { + if (!empty($rate)) { // Print only when something is in $OUT .= "
  1.  (".POINTS.")\n"; } } - for ($i = 3; $i < 8; $i++) - { + for ($i = 3; $i < 8; $i++) { $OUT .= "
  2.  (".POINTS.")\n"; } $OUT .= "
\n"; diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index 59b6eae39f..ecd7de4b83 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -44,7 +44,6 @@ ADD_DESCR("admin", basename(__FILE__)); // Init variable to avoid a notice $CATS = ""; -OPEN_TABLE("100%", "admin_content admin_content_align", ""); if (isset($_POST['add'])) { // Add a new category $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_cats WHERE cat='%s' LIMIT 1", @@ -197,6 +196,6 @@ if (isset($_POST['add'])) { // Form to add a new category LOAD_TEMPLATE("admin_add_cat"); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-config_doubler.php b/inc/modules/admin/what-config_doubler.php index c6c659d66b..2b80c4c436 100644 --- a/inc/modules/admin/what-config_doubler.php +++ b/inc/modules/admin/what-config_doubler.php @@ -127,7 +127,7 @@ if (isset($_POST['ok'])) } // Transfer options (!!!) to __MEMBER_SELECTION - ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['doubler_uid']); + ADD_MEMBER_SELECTION_BOX($_CONFIG['doubler_uid'], false, true, true); // Number of rows to display (option lines!!!) define('__DOUBLER_DISPLAY_NEW', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $_CONFIG['doubler_display_new'])); diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index b11990bec1..f3ae527583 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -32,18 +32,14 @@ ************************************************************************/ // 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); } -global $link; - // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); if (!empty($_GET['sub'])) { switch ($_GET['sub']) @@ -321,6 +317,5 @@ WHERE mails_confirmed < %s", $REF, $REF); LOAD_TEMPLATE("admin_config_points"); } -CLOSE_TABLE(); // ?> diff --git a/inc/modules/admin/what-config_refid.php b/inc/modules/admin/what-config_refid.php index 1ecb724d86..ea4f977972 100644 --- a/inc/modules/admin/what-config_refid.php +++ b/inc/modules/admin/what-config_refid.php @@ -40,21 +40,18 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -if (isset($_POST['ok'])) -{ +if (isset($_POST['ok'])) { // Save data ADMIN_SAVE_SETTINGS($_POST); -} - else -{ +} else { // Prepare contants for the template - ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['def_refid']); + ADD_MEMBER_SELECTION_BOX($_CONFIG['def_refid'], false, true, true); - switch ($_CONFIG['refid_target']) - { + switch ($_CONFIG['refid_target']) { case "index": define('__DEF_RT_INDEX', " selected=\"selected\""); define('__DEF_RT_REGISTER', ""); break; case "register": define('__DEF_RT_INDEX', ""); define('__DEF_RT_REGISTER', " selected=\"selected\""); break; } + // Load template LOAD_TEMPLATE("admin_config_refid"); } diff --git a/inc/modules/admin/what-config_reg.php b/inc/modules/admin/what-config_reg.php index 116980dc4f..d1e56fb116 100644 --- a/inc/modules/admin/what-config_reg.php +++ b/inc/modules/admin/what-config_reg.php @@ -38,12 +38,9 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) require($INC); } -global $link; - // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); if ((isset($_POST['ok'])) && (function_exists('CREATE_TIME_SELECTIONS'))) { // Calculate timestamp from selections... @@ -72,6 +69,6 @@ if (isset($_POST['ok'])) // Load normal template LOAD_TEMPLATE("admin_config_reg"); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-config_register2.php b/inc/modules/admin/what-config_register2.php index bcf85c5381..019b860812 100644 --- a/inc/modules/admin/what-config_register2.php +++ b/inc/modules/admin/what-config_register2.php @@ -32,29 +32,22 @@ ************************************************************************/ // 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); } -global $link; - // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); -if (isset($_POST['ok'])) -{ +if (isset($_POST['ok'])) { // Calculate timestamp from selections... $_POST['ip_timeout'] = CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout", $_POST); $_POST['least_cats'] = round($_POST['least_cats']); // Save settings ADMIN_SAVE_SETTINGS($_POST); -} - else -{ +} else { // Remember stuff in constants define('LEAST_CATS_VALUE' , round($_CONFIG['least_cats'])); define('__CFG_SHOW_REFID' , ADD_SELECTION("yn", $_CONFIG['display_refid'] , "display_refid")); @@ -66,6 +59,6 @@ if (isset($_POST['ok'])) // Load normal template LOAD_TEMPLATE("admin_config_register2"); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-config_secure.php b/inc/modules/admin/what-config_secure.php index 07011ba80f..bde6c556e2 100644 --- a/inc/modules/admin/what-config_secure.php +++ b/inc/modules/admin/what-config_secure.php @@ -37,8 +37,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } -global $link; - // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index c18b248419..f95a9035ea 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -41,46 +41,33 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Display only title when no form was submitted ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); - // User exists.. -if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason'])))) -{ +if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason'])))) { // Delete users account $result_user = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); - if (SQL_NUMROWS($result_user) == 1) - { + if (SQL_NUMROWS($result_user) == 1) { // Free memory SQL_FREERESULT($result); // Delete user account DELETE_USER_ACCOUNT(bigintval($_GET['u_id']), $_POST['reason']); OUTPUT_HTML("".ADMIN_DEL_COMPLETED.""); - } - else - { + } else { // Account does not exists! OUTPUT_HTML("".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2.""); } -} - elseif (!empty($_POST['no'])) -{ +} elseif (!empty($_POST['no'])) { // Do not delete him... LOAD_URL("modules.php?module=admin&what=list_user&u_id=".$_GET['u_id']); -} - elseif (empty($_GET['u_id'])) -{ +} elseif (empty($_GET['u_id'])) { // Output selection form with all confirmed user accounts listed ADD_MEMBER_SELECTION_BOX(); -} - else -{ +} else { // Realy want to delete? $result = SQL_QUERY_ESC("SELECT email, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { + if (SQL_NUMROWS($result) == 1) { // Load data list ($email, $sname, $fname) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -93,13 +80,11 @@ if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason'] // Display form LOAD_TEMPLATE("admin_del_user"); - } - else - { + } else { // Account does not exists! OUTPUT_HTML("".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2.""); } } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index ff86a369e1..2a5e855162 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -40,11 +40,7 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); -global $link; - -if ((isset($_POST['ok'])) && (empty($_POST['id']))) -{ +if ((isset($_POST['ok'])) && (empty($_POST['id']))) { unset($_POST['ok']); } @@ -82,7 +78,7 @@ WHERE id=%s LIMIT 1", addslashes($_POST['url']), bigintval($_POST['id']), ), __FILE__, __LINE__); - if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1) + if (SQL_AFFECTEDROWS() == 1) { $content = "".SETTINGS_SAVED.""; } @@ -127,12 +123,10 @@ WHERE id=%s LIMIT 1", // Load email template LOAD_TEMPLATE("admin_edit_email_select"); } -} - else -{ +} else { // No mail orders left in pool OUTPUT_HTML("".ADMIN_NO_MAILS_IN_POOL.""); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index 82e38399bb..2feb810224 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -40,8 +40,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); - // Fix a notice $result_main = false; if (isset($_GET['u_id'])) { @@ -150,6 +148,6 @@ WHERE userid=%s LIMIT 1", // Account does not exists! OUTPUT_HTML("".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2.""); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-email_stats.php b/inc/modules/admin/what-email_stats.php index 1cffc67e0f..316322b1a1 100644 --- a/inc/modules/admin/what-email_stats.php +++ b/inc/modules/admin/what-email_stats.php @@ -32,16 +32,13 @@ ************************************************************************/ // 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__)); -OUTPUT_HTML("
"); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); -CLOSE_TABLE(); // ?> diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index de1be885dd..1d790e0e5e 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -39,9 +39,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) } // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OUTPUT_HTML("

"); - -OPEN_TABLE("100%", "admin_content admin_content_align", ""); // Check if the admin has entered title and what-php file name... if (((empty($_POST['title'])) || (empty($_POST['menu']))) && (isset($_POST['ok']))) @@ -211,6 +208,5 @@ VALUES('%s', '%s', '%s', '%s', '%s')", LOAD_TEMPLATE("admin_settings_saved", false, SETTINGS_NOT_SAVED); } -CLOSE_TABLE(); // ?> diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index 72736ee626..0185b03d87 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -53,10 +53,7 @@ if (!empty($_GET['sub'])) $chk = 0; if (!empty($_POST['sel'])) $chk = SELECTION_COUNT($_POST['sel']); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); // List all menu points and make them editable -OUTPUT_HTML("

-
"); if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) { // Edit menu entries @@ -363,7 +360,6 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_MENUS_FOUND); } } -OUTPUT_HTML("
"); -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-list_cats.php b/inc/modules/admin/what-list_cats.php index 9ec6e996f0..b01d71320c 100644 --- a/inc/modules/admin/what-list_cats.php +++ b/inc/modules/admin/what-list_cats.php @@ -41,14 +41,11 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); -if (!empty($_GET['u_id'])) -{ +if (!empty($_GET['u_id'])) { // Check if the user already exists $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { + if (SQL_NUMROWS($result) == 1) { // Loads surname, family's name and the email address list($sname, $fname, $email) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -62,12 +59,10 @@ if (!empty($_GET['u_id'])) // Ok, list categories of this user $result_cats = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats ORDER BY sort", __FILE__, __LINE__); - if (SQL_NUMROWS($result_cats) > 0) - { + if (SQL_NUMROWS($result_cats) > 0) { // List categories $cnt = "1"; $SW = 2; $OUT = ""; - while (list($cid, $cat) = SQL_FETCHROW($result_cats)) - { + while (list($cid, $cat) = SQL_FETCHROW($result_cats)) { // Check user's selection $result_user = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s AND cat_id=%s LIMIT 1", array(bigintval($_GET['u_id']), bigintval($cid)), __FILE__, __LINE__); @@ -95,24 +90,18 @@ if (!empty($_GET['u_id'])) // Load main template LOAD_TEMPLATE("admin_list_cats"); - } - else - { + } else { // No categories selected! :-( LOAD_TEMPLATE("admin_list_cats_404"); } - } - else - { + } else { // User not found LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_MEMBER_404_1.__UID.ADMIN_MEMBER_404_2); } -} - else -{ +} else { // Output selection form with all confirmed user accounts listed ADD_MEMBER_SELECTION_BOX(); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-list_norefs.php b/inc/modules/admin/what-list_norefs.php index d751a994e0..60f43bdfde 100644 --- a/inc/modules/admin/what-list_norefs.php +++ b/inc/modules/admin/what-list_norefs.php @@ -44,8 +44,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); - $MORE = ", userid"; $colspan = "4"; // 27 if (EXT_IS_ACTIVE("nickname")) { $MORE = ", nickname"; } @@ -160,6 +158,5 @@ if (SQL_NUMROWS($result_master) > 0) LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ACCOUNT_NOREFS_404); } -CLOSE_TABLE(); // ?> diff --git a/inc/modules/admin/what-list_refs.php b/inc/modules/admin/what-list_refs.php index acfc839872..0d2434a7b3 100644 --- a/inc/modules/admin/what-list_refs.php +++ b/inc/modules/admin/what-list_refs.php @@ -47,7 +47,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); if (!empty($_GET['u_id'])) { // Check if the user already exists @@ -135,7 +134,6 @@ if (!empty($_GET['u_id'])) // Output selection form with all confirmed user accounts listed ADD_MEMBER_SELECTION_BOX(); } -CLOSE_TABLE(); // ?> diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index 9911842e84..4351ebc13b 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -49,9 +49,9 @@ if (isset($_POST['edit'])) { ADMIN_EDIT_ENTRIES_CONFIRM( $_POST['id'], "surfbar_urls", - array("id", "url", "reward", "costs"), - array("bigintval", "", "TRANSLATE_COMMA", "TRANSLATE_COMMA"), - array("", "", "") + array("id", "userid", "url", "reward", "costs"), + array("bigintval", "", "", "TRANSLATE_COMMA", "TRANSLATE_COMMA"), + array("", "", "", "") ); $show = false; } elseif (isset($_POST['do_edit'])) { @@ -59,7 +59,7 @@ if (isset($_POST['edit'])) { ADMIN_EDIT_ENTRIES_CONFIRM($_POST['id'], "surfbar_urls", array(), array(), array(), true); } elseif (isset($_POST['delete'])) { // Delete entries (with confirmation) - ADMIN_DELETE_ENTRIES_CONFIRM($_POST['id'], "surfbar_urls", array("id", "url", "registered"), array("bigintval", "", "MAKE_DATETIME"), array("", "", "2")); + ADMIN_DELETE_ENTRIES_CONFIRM($_POST['id'], "surfbar_urls", array("id", "userid", "url", "registered"), array("bigintval", "ADMIN_USER_PROFILE_LINK", "", "MAKE_DATETIME"), array("", "", "", "2")); $show = false; } elseif (isset($_POST['remove'])) { // Delete entries (with confirmation) diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index d31d1e7c1c..528ec3c737 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -41,7 +41,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); if (!empty($_GET['u_id'])) { $result_user = SQL_QUERY_ESC("SELECT status, sex, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", @@ -60,7 +59,7 @@ if (!empty($_GET['u_id'])) // Ok, lock the account! $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET status='LOCKED' WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); - if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1) + if (SQL_AFFECTEDROWS() == 1) { // Send an email to the user! In later version you can optionally switch this feature off $msg = LOAD_EMAIL_TEMPLATE("lock-user", $_POST['reason'], bigintval($_GET['u_id'])); @@ -76,7 +75,7 @@ if (!empty($_GET['u_id'])) // Ok, unlock the account! $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET status='CONFIRMED' WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__); - if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1) + if (SQL_AFFECTEDROWS() == 1) { // Send an email to the user! In later version you can optionally switch this feature off $msg = LOAD_EMAIL_TEMPLATE("unlock-user", $_POST['reason'], bigintval($_GET['u_id'])); @@ -177,12 +176,10 @@ if (!empty($_GET['u_id'])) // Account does not exists! OUTPUT_HTML("".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2.""); } -} - else -{ +} else { // List all users ADD_MEMBER_SELECTION_BOX(); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index eaef1cdfdb..1f4002f6d6 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -40,9 +40,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) } // Add desciption as navigation point ADD_DESCR("admin", basename(__FILE__)); -OUTPUT_HTML("
"); - -OPEN_TABLE("100%", "admin_content admin_content_align", ""); // Check if the admin has entered title and what-php file name... if ((empty($_POST['title'])) && (isset($_POST['ok']))) @@ -211,6 +208,5 @@ VALUES('%s', '%s', '%s', '%s', '%s')", LOAD_TEMPLATE("admin_settings_saved", false, SETTINGS_NOT_SAVED); } -CLOSE_TABLE(); // ?> diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index fc93c8932d..b63cc39445 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -53,10 +53,7 @@ if (!empty($_GET['sub'])) $chk = 0; if (!empty($_POST['sel'])) $chk = SELECTION_COUNT($_POST['sel']); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); // List all menu points and make them editable -OUTPUT_HTML("

-
"); if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) { // Edit menu entries @@ -325,7 +322,6 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_MENUS_FOUND); } } -OUTPUT_HTML("
"); -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index fe64ee8c48..9e00245416 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -40,9 +40,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); -global $link; - if (empty($_GET['do'])) unset($_GET['do']); if (((empty($_POST['t_wait'])) || (empty($_POST['payment']))) && (!empty($_GET['do'])) && ($_GET['do'] == "add")) { @@ -91,7 +88,7 @@ if (isset($_POST['ok'])) $result = SQL_QUERY(trim($s), __FILE__, __LINE__); if (empty($content)) { - if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1) + if (SQL_AFFECTEDROWS() == 1) { $content = "".SETTINGS_SAVED.""; } @@ -208,6 +205,6 @@ if (isset($_POST['ok'])) // Form for adding new referral levels LOAD_TEMPLATE("admin_add_payment"); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 1d8c3605fb..80c0588efb 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -40,8 +40,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -global $link; - $SEL = 0; if ((empty($_POST['url'])) || (empty($_POST['alternate']))) { @@ -49,7 +47,6 @@ if ((empty($_POST['url'])) || (empty($_POST['alternate']))) } if (!empty($_POST['sel'])) $SEL = SELECTION_COUNT($_POST['sel']); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); if (isset($_POST['ok'])) { // Fix older calls from add-new-banner-form @@ -87,7 +84,7 @@ VALUES ('%s', '%s', '%s')", } break; } - if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1) + if (SQL_AFFECTEDROWS() == 1) { $content = "".SETTINGS_SAVED.""; } @@ -174,6 +171,6 @@ VALUES ('%s', '%s', '%s')", // Form for adding new referral levels LOAD_TEMPLATE("admin_add_banner"); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-repair_amenu.php b/inc/modules/admin/what-repair_amenu.php index b3a769dfdd..34f4382be8 100644 --- a/inc/modules/admin/what-repair_amenu.php +++ b/inc/modules/admin/what-repair_amenu.php @@ -40,7 +40,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -global $link; $ACTIONS = array(); // First fix all main menus (what="")... $result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_admin_menu WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__); diff --git a/inc/modules/admin/what-repair_amnu.php b/inc/modules/admin/what-repair_amnu.php index 774d53e800..75872b180c 100644 --- a/inc/modules/admin/what-repair_amnu.php +++ b/inc/modules/admin/what-repair_amnu.php @@ -40,7 +40,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -global $link; $ACTIONs = array(); // First fix all main menus (what="")... $result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_admin_menu WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__); diff --git a/inc/modules/admin/what-send_newsletter.php b/inc/modules/admin/what-send_newsletter.php index 6354125f5f..5f90fd230c 100644 --- a/inc/modules/admin/what-send_newsletter.php +++ b/inc/modules/admin/what-send_newsletter.php @@ -40,7 +40,6 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); if (isset($_POST['ok'])) { $result = SQL_QUERY("SELECT userid, email FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' AND nl_receive='Y' ORDER BY userid", __FILE__, __LINE__); @@ -96,6 +95,6 @@ if (isset($_POST['ok'])) LOAD_TEMPLATE("admin_newsletter_nohtml"); } } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-sub_points.php b/inc/modules/admin/what-sub_points.php index dc9982fc0f..587abec41e 100644 --- a/inc/modules/admin/what-sub_points.php +++ b/inc/modules/admin/what-sub_points.php @@ -43,7 +43,6 @@ ADD_DESCR("admin", basename(__FILE__)); // Fix a notice if (!isset($_GET['u_id'])) $_GET['u_id'] = ""; -OPEN_TABLE("100%", "admin_content admin_content_align", ""); if ($_GET['u_id'] == "all") { // Add points to all accounts @@ -128,8 +127,8 @@ if ($_GET['u_id'] == "all") else { // Output selection form with all confirmed user accounts listed - ADD_MEMBER_SELECTION_BOX(true); + ADD_MEMBER_SELECTION_BOX("0", true); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 0131dd295b..270fd49de8 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -41,12 +41,11 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) { ADD_DESCR("admin", basename(__FILE__)); // Define some variables -global $DATA, $link; +global $DATA; // Check for mails $result_main = SQL_QUERY("SELECT id, sender, subject, payment_id, timestamp, url, target_send, cat_id FROM "._MYSQL_PREFIX."_pool WHERE data_type='ADMIN' ORDER BY timestamp", __FILE__, __LINE__); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); if ((SQL_NUMROWS($result_main) > 0) || (isset($_POST['lock']))) { // Count checked checkboxes $SEL = 0; @@ -70,7 +69,7 @@ if ((SQL_NUMROWS($result_main) > 0) || (isset($_POST['lock']))) { array($id), __FILE__, __LINE__); // Update wents fine? - if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1) { + if (SQL_AFFECTEDROWS() == 1) { // Order placed in queue... 0 1 2 3 4 $result = SQL_QUERY_ESC("SELECT po.url, po.subject, po.sender, pay.payment, po.payment_id FROM "._MYSQL_PREFIX."_pool AS po @@ -232,6 +231,5 @@ LIMIT 1", LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_MAILS_IN_POOL); } -CLOSE_TABLE(); // ?> diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index 130f511cf9..2b41ae775c 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -112,7 +112,7 @@ WHERE id='%s' LIMIT 1", array($CONFIG['sponsor_ref_points'], bigintval($refid)), __FILE__, __LINE__); // Whas that update fine? - if (SQL_AFFECTED_ROWS($link) == 1) { + if (SQL_AFFECTEDROWS() == 1) { // Load referral's data $result = SQL_QUERY_ESC("SELECT id, salut, surname, family, email, (points_amount - points_used) AS points, receive_warnings, ref_count AS refs diff --git a/inc/modules/admin/what-usage.php b/inc/modules/admin/what-usage.php index 4046acd753..b40a921541 100644 --- a/inc/modules/admin/what-usage.php +++ b/inc/modules/admin/what-usage.php @@ -43,8 +43,6 @@ ADD_DESCR("admin", basename(__FILE__)); // Base directory (should be moved to database) $usage = "usage/"; -OPEN_TABLE("100%", "admin_content admin_content_align", ""); - if (!empty($_GET['image'])) { if ($_GET['type'] == "usage") { $file = sprintf("%s%susage.png", PATH, $usage); @@ -97,6 +95,5 @@ if (!empty($file)) { } } -CLOSE_TABLE(); // ?> diff --git a/inc/modules/chk_login.php b/inc/modules/chk_login.php index 7db176ac52..cad19305c3 100644 --- a/inc/modules/chk_login.php +++ b/inc/modules/chk_login.php @@ -38,6 +38,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) require($INC); } +// @TODO Replace with own template! OPEN_TABLE("500", "guest_login_header dashed", "center"); OUTPUT_HTML("
".VALIDATING_LOGIN."
"); @@ -60,7 +61,7 @@ SET last_login=UNIX_TIMESTAMP() WHERE userid=%s AND last_login < (UNIX_TIMESTAMP() - %s) LIMIT 1", array($GLOBALS['userid'], $_CONFIG['login_timeout']), __FILE__, __LINE__); - if (SQL_AFFECTEDROWS($link) == 1) $bonus = true; + if (SQL_AFFECTEDROWS() == 1) $bonus = true; } if (($bonus) && ($_GET['mode'] == "bonus") && (EXT_IS_ACTIVE("bonus"))) { // Output message with added points diff --git a/inc/modules/guest/what- b/inc/modules/guest/what- index 0d00e62e84..8c2b7d2f2b 100644 --- a/inc/modules/guest/what- +++ b/inc/modules/guest/what- @@ -21,15 +21,16 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } + // Add description as navigation point ADD_DESCR("guest", basename(__FILE__)); -OPEN_TABLE("100%", "", "center", "top"); + +// Load default template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/guest/what-agb.php b/inc/modules/guest/what-agb.php index bf862413d9..abe4c547b4 100644 --- a/inc/modules/guest/what-agb.php +++ b/inc/modules/guest/what-agb.php @@ -32,16 +32,16 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } + // Add description as navigation point ADD_DESCR ("guest", basename(__FILE__)); -OPEN_TABLE("100%", "guest_content_align", ""); +// Load default template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index 9ac317ea97..1a1a632f65 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -40,7 +40,6 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // Add description as navigation point ADD_DESCR("guest", basename(__FILE__)); -OPEN_TABLE("100%", "guest_content_align", ""); if (!empty($_GET['hash'])) { // Initialize the user ID @@ -57,7 +56,7 @@ if (!empty($_GET['hash'])) // Unlock his account (but only when it is on UNCONFIRMED!) $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET status='CONFIRMED', ref_payout='%s' WHERE user_hash='%s' AND status='UNCONFIRMED' LIMIT 1", array($_CONFIG['ref_payout'], $_GET['hash']), __FILE__, __LINE__); - if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1) + if (SQL_AFFECTEDROWS() == 1) { $msg = LOAD_EMAIL_TEMPLATE("confirm-member", "", bigintval($uid)); @@ -183,6 +182,6 @@ if (!empty($_GET['hash'])) // No hash found, the guest may want to enter his email address to re-get his confirmation link? LOAD_TEMPLATE("guest_confirm_link"); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/guest/what-impressum.php b/inc/modules/guest/what-impressum.php index afb4c3bc12..88a3c464d5 100644 --- a/inc/modules/guest/what-impressum.php +++ b/inc/modules/guest/what-impressum.php @@ -32,17 +32,16 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } + // Add description as navigation point ADD_DESCR("guest", basename(__FILE__)); -OPEN_TABLE("100%", "guest_content_align", "", ""); +// Load template template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); -CLOSE_TABLE(); // ?> diff --git a/inc/modules/guest/what-infos.php b/inc/modules/guest/what-infos.php index 03e203339f..c3ff099700 100644 --- a/inc/modules/guest/what-infos.php +++ b/inc/modules/guest/what-infos.php @@ -32,16 +32,16 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } + // Add description as navigation point ADD_DESCR("guest", basename(__FILE__)); -OPEN_TABLE("100%", "guest_content_align", ""); +// Load default template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 4029789a49..3aeef30560 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -33,8 +33,7 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } @@ -42,7 +41,6 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // Add description as navigation point ADD_DESCR("guest", basename(__FILE__)); -OPEN_TABLE("100%", "guest_content_align", ""); global $DATA, $FATAL; // Initialize data @@ -167,7 +165,7 @@ if (IS_MEMBER()) { // Update database records $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET total_logins=total_logins+1".$ADD." WHERE userid=%s LIMIT 1", array(bigintval($UID)), __FILE__, __LINE__); - if (SQL_AFFECTEDROWS($link) == 1) { + if (SQL_AFFECTEDROWS() == 1) { // Procedure to checking for login data if (($BONUS) && (EXT_IS_ACTIVE("bonus"))) { // Bonus added (just displaying!) @@ -347,21 +345,17 @@ if (IS_MEMBER()) { } // Was an URL constructed? -if (!empty($URL)) -{ +if (!empty($URL)) { // URL was constructed if (!empty($FATAL[0])) { // Fatal errors! require_once(PATH."inc/fatal_errors.php"); - } - else - { + } else { // Load URL LOAD_URL($URL); } } -CLOSE_TABLE(); // ?> diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index a69272b4b7..2a984934ed 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -32,13 +32,10 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} - elseif ((!EXT_IS_ACTIVE("register"))) -{ +} elseif ((!EXT_IS_ACTIVE("register"))) { if (IS_ADMIN()) { ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "register")); } else { @@ -50,7 +47,6 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // Add description as navigation point ADD_DESCR("guest", basename(__FILE__)); -OPEN_TABLE("100%", "guest_content_align", ""); global $_CONFIG, $DATA; // Initialize variables @@ -471,6 +467,6 @@ array( // Display registration form LOAD_TEMPLATE("guest_register"); } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index ed600bdd8c..09f1ff1095 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -81,7 +81,7 @@ WHERE id='%s' AND hash='%s' AND status='UNCONFIRMED' LIMIT 1", array(bigintval($SPONSOR['id']), $_GET['hash']), __FILE__, __LINE__); // Check on success - if (SQL_AFFECTEDROWS($link) == 1) + if (SQL_AFFECTEDROWS() == 1) { // Prepare mail and send it to the sponsor $MSG = LOAD_EMAIL_TEMPLATE("sponsor_pending", $SPONSOR); @@ -107,7 +107,7 @@ WHERE id='%s' AND hash='%s' AND status='EMAIL' LIMIT 1", array(bigintval($SPONSOR['id']), $_GET['hash']), __FILE__, __LINE__); // Check on success - if (SQL_AFFECTEDROWS($link) == 1) + if (SQL_AFFECTEDROWS() == 1) { // Sponsor account is unlocked again LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN); diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index fa3acb35a9..d7f0aa5e9d 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -32,11 +32,11 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } + // Add description as navigation point ADD_DESCR("guest", basename(__FILE__)); @@ -48,7 +48,6 @@ switch ($_GET['mode']) case "modules": $_CONFIG['guest_stats'] = "MODULES"; $lmode = "members"; $ltitle = GUEST_STATS_MEMBERS; break; } -OPEN_TABLE("100%", "guest_content", "center", "top"); switch ($_CONFIG['guest_stats']) { case "MEMBERS": // Statistics about your members @@ -224,6 +223,6 @@ case "INACTIVE": // Deactivated stats LOAD_TEMPLATE("admin_settings_saved", false, "".GUEST_STATS_DEACTIVATED.""); break; } -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/guest/what-welcome.php b/inc/modules/guest/what-welcome.php index 808a4f174c..2013b6e711 100644 --- a/inc/modules/guest/what-welcome.php +++ b/inc/modules/guest/what-welcome.php @@ -32,16 +32,16 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } + // Add description as navigation point ADD_DESCR("guest", basename(__FILE__)); -OPEN_TABLE("100%", "guest_content_align", ""); +// Load default template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); -CLOSE_TABLE(); + // ?> diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index a24907380f..077f0c91e6 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -50,7 +50,6 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // Add description as navigation point ADD_DESCR("member", basename(__FILE__)); -OPEN_TABLE("100%", "member_content member_content_align", ""); define('UID_VALUE', $GLOBALS['userid']); $URL = ""; // Detect what the member wants to do @@ -327,12 +326,11 @@ case "notify": // Switch off notfication $URL = URL."/modules.php?module=login&what=welcome&msg=".urlencode(PROFILE_UPDATED); break; } -CLOSE_TABLE(); -if (!empty($URL)) -{ +if (!empty($URL)) { // Load generated URL LOAD_URL($URL); } + // ?> diff --git a/inc/modules/member/what-points.php b/inc/modules/member/what-points.php index 6293845d81..87f17ee8ed 100644 --- a/inc/modules/member/what-points.php +++ b/inc/modules/member/what-points.php @@ -42,7 +42,6 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { // Add description as navigation point ADD_DESCR("member", basename(__FILE__)); -OPEN_TABLE("100%", "member_content member_content_align", ""); $result_depths = SQL_QUERY("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths ORDER BY level", __FILE__, __LINE__); $depths = SQL_NUMROWS($result_depths); @@ -202,6 +201,5 @@ if (EXT_IS_ACTIVE("payout")) { PAYOUT_OUTPUT_PAYOUT_LIST(str_replace(",", ".", ($TPTS - $USED))); } -CLOSE_TABLE(); // ?> diff --git a/inc/modules/member/what-reflinks.php b/inc/modules/member/what-reflinks.php index b5c6a37f28..76819b63b6 100644 --- a/inc/modules/member/what-reflinks.php +++ b/inc/modules/member/what-reflinks.php @@ -45,8 +45,6 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // Add description as navigation point ADD_DESCR("member", basename(__FILE__)); -OPEN_TABLE("90%", "member_table member_content_align", ""); - // Load current referral clicks $result = SQL_QUERY_ESC("SELECT ref_clicks FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); @@ -137,6 +135,5 @@ if (SQL_NUMROWS($result) > 0) // Free result SQL_FREERESULT($result); -CLOSE_TABLE(); // ?> diff --git a/inc/modules/order.php b/inc/modules/order.php index b0c26bc7af..74fbc6a45a 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -67,7 +67,7 @@ if (empty($URL)) { array($type, bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__); // Finally is the entry valid? - if (SQL_AFFECTEDROWS($link) == 1) { + if (SQL_AFFECTEDROWS() == 1) { // Update his login data UPDATE_LOGIN_DATA(); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 6710c1c6f6..f4fa13aec4 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -650,7 +650,6 @@ function UPDATE_LOGIN_DATA ($UPDATE=true) { // function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) { - global $link; $ret = false; $ADD = ""; if ((!IS_ADMIN()) && ($MODE != "admin")) $ADD = " AND locked='N'"; @@ -678,7 +677,7 @@ function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) $result = SQL_QUERY($SQL, __FILE__, __LINE__); if ($UPDATE) { - if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1) $ret = true; + if (SQL_AFFECTEDROWS() == 1) $ret = true; //* DEBUG: */ debug_print_backtrace(); } else @@ -1043,7 +1042,7 @@ function GET_TOTAL_DATA($search, $tableName, $lookFor, $whereStatement="userid", */ function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $locked=false, $add_mode="ref") { - global $DEPTH, $_CONFIG, $DATA, $link; + global $DEPTH, $_CONFIG, $DATA; // Debug message //DEBUG_LOG(__FUNCTION__.": uid={$uid},points={$points}"); @@ -1156,7 +1155,7 @@ function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $lock // function UPDATE_REF_COUNTER($uid) { - global $REF_LVL, $link, $cacheInstance; + global $REF_LVL, $cacheInstance; // Make it sure referral level zero (member him-/herself) is at least selected if (empty($REF_LVL)) $REF_LVL = "0"; @@ -1165,7 +1164,7 @@ function UPDATE_REF_COUNTER($uid) array(bigintval($uid), $REF_LVL), __FILE__, __LINE__); // When no entry was updated then we have to create it here - if (SQL_AFFECTEDROWS($link) == 0) + if (SQL_AFFECTEDROWS() == 0) { // First count! $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_refsystem (userid, level, counter) VALUES ('%s', '%s', '1')", @@ -1195,7 +1194,8 @@ function UPDATE_REF_COUNTER($uid) // function UPDATE_ONLINE_LIST($SID, $mod, $act, $wht) { - global $link, $_CONFIG; + global $_CONFIG; + // Do not update online list when extension is deactivated if (!EXT_IS_ACTIVE("online", true)) return; diff --git a/inc/pool-update.php b/inc/pool-update.php index b42ef49298..5d054ef6ab 100644 --- a/inc/pool-update.php +++ b/inc/pool-update.php @@ -68,7 +68,7 @@ if (SQL_NUMROWS($result_main) > 0) // Set mail order as "active". That means it will be sent out $result_active = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='ACTIVE' WHERE id=%s AND data_type='NEW' LIMIT 1", array($DATA[0]), __FILE__, __LINE__); - if (SQL_AFFECTEDROWS($result_active) == 1) + if (SQL_AFFECTEDROWS() == 1) { // "Explode" all receivers into an array if (ereg(";", $DATA[4])) diff --git a/mailid.php b/mailid.php index c9a28889f1..93def06664 100644 --- a/mailid.php +++ b/mailid.php @@ -209,10 +209,5 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install LOAD_URL("install.php"); } -// Shutdown database link -if (is_resource($link)) { - SQL_CLOSE($link, __FILE__, __LINE__); -} - // ?> diff --git a/mailid_top.php b/mailid_top.php index 23e76732ad..1ac56046dc 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -81,7 +81,7 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install if (SQL_NUMROWS($result) == 1) { // Is the stats ID valid? - list($link_id, $ltype) = SQL_FETCHROW($result); + list($lid, $ltype) = SQL_FETCHROW($result); SQL_FREERESULT($result); switch ($ltype) { @@ -257,7 +257,7 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install // Remove link from table $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE id=%s LIMIT 1", - array(bigintval($link_id)), __FILE__, __LINE__); + array(bigintval($lid)), __FILE__, __LINE__); // Load total points define('__TOTAL_POINTS', TRANSLATE_COMMA( @@ -276,7 +276,7 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install // Remove link from table $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE id=%s LIMIT 1", - array(bigintval($link_id)), __FILE__, __LINE__); + array(bigintval($lid)), __FILE__, __LINE__); // Load template LOAD_TEMPLATE("mailid_points_failed"); diff --git a/surfbar.php b/surfbar.php index f0d1dab1e6..96c2f9137f 100644 --- a/surfbar.php +++ b/surfbar.php @@ -195,8 +195,5 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install LOAD_URL("install.php"); } -// Close any open database connection here -SQL_CLOSE($link, __FILE__, __LINE__); - // Really all done here... ;-) ?> diff --git a/templates/de/html/agb.tpl b/templates/de/html/agb.tpl index 1dc34810b8..535fb56e14 100644 --- a/templates/de/html/agb.tpl +++ b/templates/de/html/agb.tpl @@ -99,10 +99,10 @@ Inhalte haben. Dies gilt sowohl für nationale, als auch internationale Gesetze. Werbetexte die solche Seiten bewerben, werden nicht versandt. -
§10a {!MAIN_TITLE!} -behält sich die Prüfung von zu bewerbenden Webseiten -unmittelbar vor der Versendung und ein Auswechseln der beworbenen URL -bei bereits versendeten Werbemails vor.
+
§10a {!MAIN_TITLE!} behält sich die +Prüfung von zu bewerbenden Webseiten unmittelbar vor der Versendung +und ein Auswechseln der beworbenen URL bei bereits versendeten Werbemails +vor.
§11 Es ist nicht gestattet, Werbeseiten mit mehr als 1 PopUp zu versenden. Verboten sind auch PopUp's die diff --git a/templates/de/html/ext/ext_sponsor.tpl b/templates/de/html/ext/ext_sponsor.tpl index 1189c25ab4..01aeb32a85 100644 --- a/templates/de/html/ext/ext_sponsor.tpl +++ b/templates/de/html/ext/ext_sponsor.tpl @@ -1 +1,18 @@ -{--MT_WORD3--} "leben" von ihren Sponsoren. Mit dieser Erweiterung steht Ihnen eine professionelle Lösung bereit, mit der Sie neue Sponoren werben können.

Die wichtigsten Funktionen des Sponsorbereiches:
  • Echtzeitstatistik im Sponsorenbereich für jede Sponsoraktion seperat und gemeinsam
  • Einfaches Nachbestellen von {--POINTS--}n (Konto auffüllen) und Ändern der Einstellungen des Sponsors (sowohl aus dem Adminbereich als auch vom Sponsor selber durchführbar)
  • Volle administrative Kontrolle (z.B. wird das Sponsorenaccount gesperrt, wenn er seine Email-Adresse ändert oder neue {--POINTS--} bestellt hat; jede vom Sponsor durchgeführte Sponsorenaktion (Mailbuchung, neue SignUp-Aktion erstellt oder bestehende geändert) muss von Ihnen freigegeben werden)
  • Eigenes von anderen unabhängige Menüsystem
  • Sie können (und sollten es auch) eigene Sponsoren-Accounts aus dem Adminbereich anlegen
  • Installieren Sie eine zusätzliche Erweiterung mit Sponsor-Anteil Ihrem {--MT_WORD--} hinzu, wird automatisch ein entsprechender Menüpunkt in den Sponsorenbereich eingefügt.
  • Einfache Werbemittel-Verwaltung: Die Sponsoren brauchen nur einmal eine URL bzw. einen Banner hinzufügen (ausser wenn diese gelöscht wurden).
  • Später können die URLs und Banner beliebig Kampagnen zugewiesen werden.
  • Kampagnen können entweder von einem Anfangsdatum bis zu einem Enddatum laufen oder bis das übertragene Guthaben an {--POINTS--} aufgebraucht ist.
  • In allen Fällen ist eine Mail zum Sponsor und zu den Administratoren unterwegs!
  • Ihre Sponsoren werden im Mitgliedsbereich Ihren Mitgliedern etwas vorstellt. Bestimmen Sie dabei, welche Daten der Sponsor anzeigen lassen kann und welche nicht!
  • +{--MT_WORD3--} "leben" von ihren Sponsoren. Mit dieser Erweiterung +steht Ihnen eine professionelle Lösung bereit, mit der Sie neue Sponoren +werben können.
    +
    +Die wichtigsten Funktionen des Sponsorbereiches: +
      +
    • Echtzeitstatistik im Sponsorenbereich für jede Sponsoraktion seperat und gemeinsam
    • +
    • Einfaches Nachbestellen von {--POINTS--}n (Konto auffüllen) und Ändern der Einstellungen des Sponsors (sowohl aus dem Adminbereich als auch vom Sponsor selber durchführbar)
    • +
    • Volle administrative Kontrolle (z.B. wird das Sponsorenaccount gesperrt, wenn er seine Email-Adresse ändert oder neue {--POINTS--} bestellt hat; jede vom Sponsor durchgeführte Sponsorenaktion (Mailbuchung, neue SignUp-Aktion erstellt oder bestehende geändert) muss von Ihnen freigegeben werden)
    • +
    • Eigenes von anderen unabhängige Menüsystem
    • +
    • Sie können (und sollten es auch) eigene Sponsoren-Accounts aus dem Adminbereich anlegen
    • +
    • Installieren Sie eine zusätzliche Erweiterung mit Sponsor-Anteil Ihrem {--MT_WORD--} hinzu, wird automatisch ein entsprechender Menüpunkt in den Sponsorenbereich eingefügt.
    • +
    • Einfache Werbemittel-Verwaltung: Die Sponsoren brauchen nur einmal eine URL bzw. einen Banner hinzufügen (ausser wenn diese gelöscht wurden).
    • +
    • Später können die URLs und Banner beliebig Kampagnen zugewiesen werden.
    • +
    • Kampagnen können entweder von einem Anfangsdatum bis zu einem Enddatum laufen oder bis das übertragene Guthaben an {--POINTS--} aufgebraucht ist.
    • +
    • In allen Fällen ist eine Mail zum Sponsor und zu den Administratoren unterwegs!
    • +
    • Ihre Sponsoren werden im Mitgliedsbereich Ihren Mitgliedern etwas vorstellt. Bestimmen Sie dabei, welche Daten der Sponsor anzeigen lassen kann und welche nicht!
    • +
    diff --git a/templates/de/html/member/member_doubler.tpl b/templates/de/html/member/member_doubler.tpl index 2d7b822469..bcf4049cef 100644 --- a/templates/de/html/member/member_doubler.tpl +++ b/templates/de/html/member/member_doubler.tpl @@ -3,17 +3,17 @@
    {--DOUBLER_MEMBER_LINK_NOTE--}
-

{--DOUBLER_MEMBER_ALREADY_PAYOUT--}:
+

{--DOUBLER_MEMBER_ALREADY_PAYOUT--}:

-{!__DOUBLER_PAYOUT_HISTORY!}

+{!__DOUBLER_PAYOUT_HISTORY!}
-

{--DOUBLER_MEMBER_NEXT_PAYOUT--}:
+

{--DOUBLER_MEMBER_NEXT_PAYOUT--}:

-{!__DOUBLER_PAYOUT_NEXT!}

+{!__DOUBLER_PAYOUT_NEXT!}
-

{--DOUBLER_MEMBER_REF_PAYOUT--}:
+

{--DOUBLER_MEMBER_REF_PAYOUT--}:

-{--__DOUBLER_PAYOUT_REF--}

+{--__DOUBLER_PAYOUT_REF--}
{--DOUBLER_TIMEOUT_1--} {!__TIMEOUT_MARK!} {--DOUBLER_TIMEOUT_2--}
  • {--DOUBLER_HAVE_FUN--}
  • - + diff --git a/templates/de/html/member/member_holiday_form.tpl b/templates/de/html/member/member_holiday_form.tpl index c0c16b6b9a..4b9ed33359 100644 --- a/templates/de/html/member/member_holiday_form.tpl +++ b/templates/de/html/member/member_holiday_form.tpl @@ -29,7 +29,8 @@ - @@ -40,7 +41,7 @@ @@ -50,7 +51,8 @@ - diff --git a/templates/de/html/member/member_unconfirmed_404.tpl b/templates/de/html/member/member_unconfirmed_404.tpl index ffd7720713..cc50d5c742 100644 --- a/templates/de/html/member/member_unconfirmed_404.tpl +++ b/templates/de/html/member/member_unconfirmed_404.tpl @@ -1,4 +1,5 @@ + $content[probl]: $content[data] + \ No newline at end of file diff --git a/templates/de/html/member/member_wernis_form.tpl b/templates/de/html/member/member_wernis_form.tpl index e09a4dfcce..b9de6fa55f 100644 --- a/templates/de/html/member/member_wernis_form.tpl +++ b/templates/de/html/member/member_wernis_form.tpl @@ -1,8 +1,5 @@ - -
     
    {--HOLIDAY_MAX_DAYS_1--}{--__HOLIDAY_MAX--}{--HOLIDAY_MAX_DAYS_2--} + + {--HOLIDAY_MAX_DAYS_1--}{--__HOLIDAY_MAX--}{--HOLIDAY_MAX_DAYS_2--}
    {--HOLIDAY_COMMENTS--}:
    - +
     
    {--HOLIDAY_NOTES--} + + {--HOLIDAY_NOTES--}
    - $content[probl]:$content[data]
    + +
    @@ -13,34 +10,34 @@ - + + size="10" maxlength="255" value="{--WERNIS_MAX_VALUE!}"> + size="20" maxlength="255"> + size="10" maxlength="255"> - +
    {--WERNIS_NOW_TITLE--}
    {--WERNIS_MAX_WERNIS--}:  {--WERNIS_MAX_VALUE!}{!WERNIS_MAX_VALUE!}
    {--WERNIS_WANT_WERNIS--}:  
    {--WERNIS_TARGET_ACCOUNT--}:  
    {--WERNIS_OPTIONAL_PASSWORD--}:  
     
    -- 2.30.2