// 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 {
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);
}
// 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();
// 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
}
//
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://")) {
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, "");
}
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);
}
// 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");
//
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)
// 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) {
//
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']."*<br />\n";
if (EXT_IS_ACTIVE("cache"))
{
//
function ADD_ADMIN_MENU($act, $wht,$return=false)
{
- global $menuDesription, $menuTitle, $link;
+ global $menuDesription, $menuTitle;
$SUB = false;
// Menu descriptions
// 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']);
}
// 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__);
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', "<A href=\"".CREATE_EMAIL_LINK($email, "user_data")."\">".$sname." ".$fname."</A>");
define('__UID_VALUE', $_GET['u_id']);
LOAD_TEMPLATE("admin_add_points");
}
- }
- else
- {
+ } else {
// User not found!
OUTPUT_HTML("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
}
-}
- else
-{
+} else {
// Output selection form with all confirmed user accounts listed
- ADD_MEMBER_SELECTION_BOX(true);
+ ADD_MEMBER_SELECTION_BOX("0", true);
}
-CLOSE_TABLE();
+
//
?>
// 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'])))
{
// Is demo login!
LOAD_TEMPLATE("admin_settings_saved", false, SETTINGS_NOT_SAVED);
}
-CLOSE_TABLE();
//
?>
$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("<br /><br /></FONT>
-<DIV align=\"center\">");
-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);
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_MENUS_FOUND);
}
}
-OUTPUT_HTML("</DIV>");
-CLOSE_TABLE();
+
//
?>
// 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(
// 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();
+
//
?>
}
// 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");
$_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));
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']);
// Generate list
$OUT = "<OL start=\"2\">\n";
- foreach ($RANKS as $k=>$rate)
- {
- if (!empty($rate))
- {
+ foreach ($RANKS as $k=>$rate) {
+ if (!empty($rate)) {
// Print only when something is in
$OUT .= " <LI><INPUT type=\"text\" name=\"rate[".($k + 2)."]\" class=\"admin_normal\" size=\"4\" maxlength=\"7\" value=\"".$rate."\"> <FONT class=\"admin_notes\">(".POINTS.")</FONT?</LI>\n";
}
}
- for ($i = 3; $i < 8; $i++)
- {
+ for ($i = 3; $i < 8; $i++) {
$OUT .= " <LI><INPUT type=\"text\" name=\"rate[".($k + $i)."]\" class=\"admin_normal\" size=\"4\" maxlength=\"7\"> <FONT class=\"admin_notes\">(".POINTS.")</FONT?</LI>\n";
}
$OUT .= "</OL>\n";
// 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",
// Form to add a new category
LOAD_TEMPLATE("admin_add_cat");
}
-CLOSE_TABLE();
+
//
?>
}
// 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']));
************************************************************************/
// 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'])
LOAD_TEMPLATE("admin_config_points");
}
-CLOSE_TABLE();
//
?>
// 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");
}
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...
// Load normal template
LOAD_TEMPLATE("admin_config_reg");
}
-CLOSE_TABLE();
+
//
?>
************************************************************************/
// 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"));
// Load normal template
LOAD_TEMPLATE("admin_config_register2");
}
-CLOSE_TABLE();
+
//
?>
$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__));
// 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("<STRONG class=\"admin_green\">".ADMIN_DEL_COMPLETED."</STRONG>");
- }
- else
- {
+ } else {
// Account does not exists!
OUTPUT_HTML("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
}
-}
- 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);
// Display form
LOAD_TEMPLATE("admin_del_user");
- }
- else
- {
+ } else {
// Account does not exists!
OUTPUT_HTML("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
}
}
-CLOSE_TABLE();
+
//
?>
// 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']);
}
addslashes($_POST['url']),
bigintval($_POST['id']),
), __FILE__, __LINE__);
- if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1)
+ if (SQL_AFFECTEDROWS() == 1)
{
$content = "<SPAN class=\"admin_done\">".SETTINGS_SAVED."</SPAN>";
}
// Load email template
LOAD_TEMPLATE("admin_edit_email_select");
}
-}
- else
-{
+} else {
// No mail orders left in pool
OUTPUT_HTML("<SPAN class=\"admin_failed\">".ADMIN_NO_MAILS_IN_POOL."</SPAN>");
}
-CLOSE_TABLE();
+
//
?>
// 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'])) {
// Account does not exists!
OUTPUT_HTML("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
}
-CLOSE_TABLE();
+
//
?>
************************************************************************/
// 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("</FONT><br />");
-OPEN_TABLE("100%", "admin_content admin_content_align", "");
-CLOSE_TABLE();
//
?>
}
// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
-OUTPUT_HTML("</FONT><br />");
-
-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'])))
LOAD_TEMPLATE("admin_settings_saved", false, SETTINGS_NOT_SAVED);
}
-CLOSE_TABLE();
//
?>
$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("<br /><br /></FONT>
-<DIV align=\"center\">");
if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
{
// Edit menu entries
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_MENUS_FOUND);
}
}
-OUTPUT_HTML("</DIV>");
-CLOSE_TABLE();
+
//
?>
// 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);
// 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__);
// 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();
+
//
?>
// 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"; }
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ACCOUNT_NOREFS_404);
}
-CLOSE_TABLE();
//
?>
// 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
// Output selection form with all confirmed user accounts listed
ADD_MEMBER_SELECTION_BOX();
}
-CLOSE_TABLE();
//
?>
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'])) {
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)
// 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",
// 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']));
// 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']));
// Account does not exists!
OUTPUT_HTML("<STRONG class=\"admin_failed\">".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."</STRONG>");
}
-}
- else
-{
+} else {
// List all users
ADD_MEMBER_SELECTION_BOX();
}
-CLOSE_TABLE();
+
//
?>
}
// Add desciption as navigation point
ADD_DESCR("admin", basename(__FILE__));
-OUTPUT_HTML("</FONT><br />");
-
-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'])))
LOAD_TEMPLATE("admin_settings_saved", false, SETTINGS_NOT_SAVED);
}
-CLOSE_TABLE();
//
?>
$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("<br /><br /></FONT>
-<DIV align=\"center\">");
if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
{
// Edit menu entries
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_MENUS_FOUND);
}
}
-OUTPUT_HTML("</DIV>");
-CLOSE_TABLE();
+
//
?>
// 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"))
{
$result = SQL_QUERY(trim($s), __FILE__, __LINE__);
if (empty($content))
{
- if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1)
+ if (SQL_AFFECTEDROWS() == 1)
{
$content = "<SPAN class=\"admin_done\">".SETTINGS_SAVED."</SPAN>";
}
// Form for adding new referral levels
LOAD_TEMPLATE("admin_add_payment");
}
-CLOSE_TABLE();
+
//
?>
// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
-global $link;
-
$SEL = 0;
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
}
break;
}
- if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1)
+ if (SQL_AFFECTEDROWS() == 1)
{
$content = "<SPAN class=\"admin_done\">".SETTINGS_SAVED."</SPAN>";
}
// Form for adding new referral levels
LOAD_TEMPLATE("admin_add_banner");
}
-CLOSE_TABLE();
+
//
?>
// 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__);
// 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__);
// 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__);
LOAD_TEMPLATE("admin_newsletter_nohtml");
}
}
-CLOSE_TABLE();
+
//
?>
// 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
else
{
// Output selection form with all confirmed user accounts listed
- ADD_MEMBER_SELECTION_BOX(true);
+ ADD_MEMBER_SELECTION_BOX("0", true);
}
-CLOSE_TABLE();
+
//
?>
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;
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
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_MAILS_IN_POOL);
}
-CLOSE_TABLE();
//
?>
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
// 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);
}
}
-CLOSE_TABLE();
//
?>
require($INC);
}
+// @TODO Replace with own template!
OPEN_TABLE("500", "guest_login_header dashed", "center");
OUTPUT_HTML("<br /><STRONG>".VALIDATING_LOGIN."</STRONG><br />");
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
************************************************************************/
// 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();
+
//
?>
************************************************************************/
// 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();
+
//
?>
// Add description as navigation point
ADD_DESCR("guest", basename(__FILE__));
-OPEN_TABLE("100%", "guest_content_align", "");
if (!empty($_GET['hash']))
{
// Initialize the user ID
// 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));
// 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();
+
//
?>
************************************************************************/
// 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();
//
?>
************************************************************************/
// 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();
+
//
?>
************************************************************************/
// 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", "");
global $DATA, $FATAL;
// Initialize data
// 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!)
}
// 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();
//
?>
************************************************************************/
// 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 {
// Add description as navigation point
ADD_DESCR("guest", basename(__FILE__));
-OPEN_TABLE("100%", "guest_content_align", "");
global $_CONFIG, $DATA;
// Initialize variables
// Display registration form
LOAD_TEMPLATE("guest_register");
}
-CLOSE_TABLE();
+
//
?>
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);
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);
************************************************************************/
// 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__));
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
LOAD_TEMPLATE("admin_settings_saved", false, "<STRONG>".GUEST_STATS_DEACTIVATED."</STRONG>");
break;
}
-CLOSE_TABLE();
+
//
?>
************************************************************************/
// 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();
+
//
?>
// 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
$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);
}
+
//
?>
// 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);
PAYOUT_OUTPUT_PAYOUT_LIST(str_replace(",", ".", ($TPTS - $USED)));
}
-CLOSE_TABLE();
//
?>
// 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__);
// Free result
SQL_FREERESULT($result);
-CLOSE_TABLE();
//
?>
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();
//
function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false)
{
- global $link;
$ret = false;
$ADD = "";
if ((!IS_ADMIN()) && ($MODE != "admin")) $ADD = " AND locked='N'";
$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
*/
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}");
//
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";
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')",
//
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;
// 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]))
LOAD_URL("install.php");
}
-// Shutdown database link
-if (is_resource($link)) {
- SQL_CLOSE($link, __FILE__, __LINE__);
-}
-
//
?>
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)
{
// 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(
// 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");
LOAD_URL("install.php");
}
-// Close any open database connection here
-SQL_CLOSE($link, __FILE__, __LINE__);
-
// Really all done here... ;-)
?>
internationale Gesetze. Werbetexte die solche Seiten bewerben, werden
nicht versandt.</div>
-<div class="agb_para">§10a </font><font size="2">{!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.</div>
+<div class="agb_para">§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.</div>
<div class="agb_para">§11 Es ist nicht gestattet, Werbeseiten
mit mehr als 1 PopUp zu versenden. Verboten sind auch PopUp's die
-{--MT_WORD3--} "leben" von ihren Sponsoren. Mit dieser Erweiterung steht Ihnen eine professionelle Lösung bereit, mit der Sie neue Sponoren werben können.<br /><br />Die wichtigsten Funktionen des Sponsorbereiches:<UL><LI>Echtzeitstatistik im Sponsorenbereich für jede Sponsoraktion seperat und gemeinsam</LI>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)</LI><LI>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)</LI><LI>Eigenes von anderen unabhängige Menüsystem</LI><LI>Sie können (und sollten es auch) eigene Sponsoren-Accounts aus dem Adminbereich anlegen</LI><LI>Installieren Sie eine zusätzliche Erweiterung mit Sponsor-Anteil Ihrem {--MT_WORD--} hinzu, wird automatisch ein entsprechender Menüpunkt in den Sponsorenbereich eingefügt.</LI><LI>Einfache Werbemittel-Verwaltung: Die Sponsoren brauchen nur einmal eine URL bzw. einen Banner hinzufügen (ausser wenn diese gelöscht wurden).</LI><LI>Später können die URLs und Banner beliebig Kampagnen zugewiesen werden.</LI><LI>Kampagnen können entweder von einem Anfangsdatum bis zu einem Enddatum laufen oder bis das übertragene Guthaben an {--POINTS--} aufgebraucht ist.</LI><LI>In allen Fällen ist eine Mail zum Sponsor und zu den Administratoren unterwegs!</LI><LI>Ihre Sponsoren werden im Mitgliedsbereich Ihren Mitgliedern etwas vorstellt. Bestimmen Sie dabei, welche Daten der Sponsor anzeigen lassen kann und welche nicht!</LI></OL>
+{--MT_WORD3--} "leben" von ihren Sponsoren. Mit dieser Erweiterung
+steht Ihnen eine professionelle Lösung bereit, mit der Sie neue Sponoren
+werben können.<br />
+<br />
+Die wichtigsten Funktionen des Sponsorbereiches:
+<ul>
+<li>Echtzeitstatistik im Sponsorenbereich für jede Sponsoraktion seperat und gemeinsam</li>
+<li>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)</li>
+<li>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)</li>
+<li>Eigenes von anderen unabhängige Menüsystem</li>
+<li>Sie können (und sollten es auch) eigene Sponsoren-Accounts aus dem Adminbereich anlegen</li>
+<li>Installieren Sie eine zusätzliche Erweiterung mit Sponsor-Anteil Ihrem {--MT_WORD--} hinzu, wird automatisch ein entsprechender Menüpunkt in den Sponsorenbereich eingefügt.</li>
+<li>Einfache Werbemittel-Verwaltung: Die Sponsoren brauchen nur einmal eine URL bzw. einen Banner hinzufügen (ausser wenn diese gelöscht wurden).</li>
+<li>Später können die URLs und Banner beliebig Kampagnen zugewiesen werden.</li>
+<li>Kampagnen können entweder von einem Anfangsdatum bis zu einem Enddatum laufen oder bis das übertragene Guthaben an {--POINTS--} aufgebraucht ist.</li>
+<li>In allen Fällen ist eine Mail zum Sponsor und zu den Administratoren unterwegs!</li>
+<li>Ihre Sponsoren werden im Mitgliedsbereich Ihren Mitgliedern etwas vorstellt. Bestimmen Sie dabei, welche Daten der Sponsor anzeigen lassen kann und welche nicht!</li>
+</ul>
<br />
{--DOUBLER_MEMBER_LINK_NOTE--}</DIV>
-<P align="center"><STRONG class="big">{--DOUBLER_MEMBER_ALREADY_PAYOUT--}:</STRONG><br />
+<div align="center"><STRONG class="big">{--DOUBLER_MEMBER_ALREADY_PAYOUT--}:</STRONG><br />
<br />
-{!__DOUBLER_PAYOUT_HISTORY!}</P>
+{!__DOUBLER_PAYOUT_HISTORY!}</div>
-<P align="center"><STRONG class="big">{--DOUBLER_MEMBER_NEXT_PAYOUT--}:</STRONG><br />
+<div align="center"><STRONG class="big">{--DOUBLER_MEMBER_NEXT_PAYOUT--}:</STRONG><br />
<br />
-{!__DOUBLER_PAYOUT_NEXT!}</P>
+{!__DOUBLER_PAYOUT_NEXT!}</div>
-<P align="center"><STRONG class="big">{--DOUBLER_MEMBER_REF_PAYOUT--}:</STRONG><br />
+<div align="center"><STRONG class="big">{--DOUBLER_MEMBER_REF_PAYOUT--}:</STRONG><br />
<br />
-{--__DOUBLER_PAYOUT_REF--}</P>
+{--__DOUBLER_PAYOUT_REF--}</div>
<DIV align="center">
<TABLE border="0" cellspacing="0" cellpadding="0"
<LI>{--DOUBLER_TIMEOUT_1--} <STRONG>{!__TIMEOUT_MARK!}</STRONG>
{--DOUBLER_TIMEOUT_2--}</LI>
<LI>{--DOUBLER_HAVE_FUN--}</LI>
- </OL>
+ </UL>
</TD>
</TR>
<TR>
<TD colspan="3" class="seperator" height="5"> </TD>
</TR>
<TR>
- <TD colspan="3" align="center"><FONT class="member_note">{--HOLIDAY_MAX_DAYS_1--}<STRONG>{--__HOLIDAY_MAX--}</STRONG>{--HOLIDAY_MAX_DAYS_2--}
+ <TD colspan="3" align="center">
+ <SPAN class="member_note">{--HOLIDAY_MAX_DAYS_1--}<STRONG>{--__HOLIDAY_MAX--}</STRONG>{--HOLIDAY_MAX_DAYS_2--}</SPAN>
</TD>
</TR>
<TR>
</TR>
<TR>
<TD colspan="3" align="center">{--HOLIDAY_COMMENTS--}:<br />
- <TEXTAREA name="comments" class="member_normal" cols="50" rows="6"></TEXTAREA>
+ <TEXTAREA name="comments" class="member_normal" cols="50" rows="6"></TEXTAREA>
</TD>
</TR>
<TR>
<TD colspan="3" class="seperator" height="5"> </TD>
</TR>
<TR>
- <TD colspan="3" align="center"><FONT class="member_note">{--HOLIDAY_NOTES--}</FONT>
+ <TD colspan="3" align="center">
+ <SPAN class="member_note">{--HOLIDAY_NOTES--}</SPAN>
</TD>
</TR>
<TR>
<TR>
<TD align="center" class="switch_sw$content[sw] top" colspan="6">
- <B class="member_failed large">$content[probl]:</STRONG>$content[data] </TD>
+ <STRONG class="member_failed large">$content[probl]:</STRONG> $content[data]
+ </TD>
</TR>
\ No newline at end of file
-<FORM
- action="{!URL!}/modules.php?module=login&what=wernis&wernis=$_GET[wernis]"
- method="POST" style="margin-bottom: 0px">
-<TABLE border="0" cellspacing="0" cellpadding="0" width="440"
- class="member_table dashed">
+<FORM action="{!URL!}/modules.php?module=login&what=wernis&wernis=$_GET[wernis]" method="POST" style="margin-bottom: 0px">
+<TABLE border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed">
<TR>
<TD colspan="3" align="center" class="member_title2 bottom2"
height="30"><STRONG>{--WERNIS_NOW_TITLE--}</STRONG></TD>
<TR>
<TD height="25" align="right">{--WERNIS_MAX_WERNIS--}:</TD>
<TD class="seperator" width="10"> </TD>
- <TD><STRONG>{--WERNIS_MAX_VALUE!}</STRONG></TD>
+ <TD><STRONG>{!WERNIS_MAX_VALUE!}</STRONG></TD>
</TR>
<TR>
<TD height="25" align="right">{--WERNIS_WANT_WERNIS--}:</TD>
<TD class="seperator" width="10"> </TD>
<TD><INPUT type="text" name="wernis" class="member_normal"
- size="10" maxlength="255" value="{--WERNIS_MAX_VALUE!}"></STRONG></TD>
+ size="10" maxlength="255" value="{--WERNIS_MAX_VALUE!}"></TD>
</TR>
<TR>
<TD height="25" align="right">{--WERNIS_TARGET_ACCOUNT--}:</TD>
<TD class="seperator" width="10"> </TD>
<TD><INPUT type="text" name="account" class="member_normal"
- size="20" maxlength="255"></STRONG></TD>
+ size="20" maxlength="255"></TD>
</TR>
<TR>
<TD height="25" align="right">{--WERNIS_OPTIONAL_PASSWORD--}:</TD>
<TD class="seperator" width="10"> </TD>
<TD><INPUT type="password" name="pass" class="member_normal"
- size="10" maxlength="255"></STRONG></TD>
+ size="10" maxlength="255"></TD>
</TR>
<TR>
<TD colspan="3" height="3" class="seperator bottom2"> </TD>
</TR>
<TR>
- <TD colspan="3" align="center" class="member_footer"><INPUT
- type="reset" class="member_reset" value="{--CLEAR_FORM--}"> * <INPUT
- type="submit" name="ok" class="member_submit"
- value="{--WERNIS_SEND_NOW--}"></TD>
+ <TD colspan="3" align="center" class="member_footer">
+ <INPUT type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> *
+ <INPUT type="submit" name="ok" class="member_submit" value="{--WERNIS_SEND_NOW--}" />
+ </TD>
</TR>
</TABLE>
</FORM>