From: quix0r Date: Sat, 7 Nov 2009 05:51:12 +0000 (+0000) Subject: Huge HTML/CSS rewrite (see forum) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=28658f05b4711aec4da763c659f340e543ce3573;p=mailer.git Huge HTML/CSS rewrite (see forum) --- diff --git a/.gitattributes b/.gitattributes index a9063bf777..35dc72c3f3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -993,6 +993,7 @@ templates/de/html/admin/admin_edit_cats_row.tpl -text templates/de/html/admin/admin_edit_email.tpl -text templates/de/html/admin/admin_edit_email_row.tpl -text templates/de/html/admin/admin_edit_email_select.tpl -text +templates/de/html/admin/admin_edit_networks.tpl -text templates/de/html/admin/admin_edit_networks_row.tpl -text templates/de/html/admin/admin_edit_payments.tpl -text templates/de/html/admin/admin_edit_payments_row.tpl -text @@ -1045,6 +1046,8 @@ templates/de/html/admin/admin_list_bonus_rows.tpl -text templates/de/html/admin/admin_list_cats.tpl -text templates/de/html/admin/admin_list_cats_404.tpl -text templates/de/html/admin/admin_list_cats_row.tpl -text +templates/de/html/admin/admin_list_chk_reg.tpl -text +templates/de/html/admin/admin_list_chk_reg_row.tpl -text templates/de/html/admin/admin_list_country.tpl -text templates/de/html/admin/admin_list_country_del_row.tpl -text templates/de/html/admin/admin_list_country_edit_row.tpl -text @@ -1635,6 +1638,7 @@ theme/business/css/install.css -text theme/business/css/register.css -text theme/business/css/sponsor.css -text theme/business/css/surfbar.css -text +theme/business/css/task.css -text theme/business/css/top10.css -text theme/business/css/transfer.css -text theme/business/css/uberwach.css -text @@ -1651,6 +1655,7 @@ theme/default/css/install.css -text theme/default/css/register.css -text theme/default/css/sponsor.css -text theme/default/css/surfbar.css -text +theme/default/css/task.css -text theme/default/css/top10.css -text theme/default/css/transfer.css -text theme/default/css/uberwach.css -text @@ -1662,13 +1667,12 @@ theme/desert/css/beg.css -text theme/desert/css/bonus.css -text theme/desert/css/doubler.css -text theme/desert/css/general.css -text -theme/desert/css/help.css -text theme/desert/css/imprint.css -text theme/desert/css/install.css -text -theme/desert/css/paidlinks.css -text theme/desert/css/register.css -text theme/desert/css/sponsor.css -text theme/desert/css/surfbar.css -text +theme/desert/css/task.css -text theme/desert/css/top10.css -text theme/desert/css/transfer.css -text theme/desert/css/uberwach.css -text diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index 3ea8b87b0b..8b2e70fceb 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -1141,7 +1141,7 @@ function addExtensionUpdateDependency ($updateDepends) { // Is the update depency empty? (NEED TO BE FIXED!) if (empty($updateDepends)) { // Please report this bug! - debug_report_bug("updateDepends is left empty!"); + debug_report_bug('updateDepends is left empty!'); } // END - if // Is it not yet added? diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 87376c17e7..19849d3e9c 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -73,7 +73,7 @@ PRIMARY KEY (id) // Maximum points to double addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000"); // Points left on users account after doubling - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_left2 BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000"); // Charge for doubling points which goes to the webmaster (shreddered in fact!) addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000"); // Referal percents diff --git a/inc/filters.php b/inc/filters.php index 20dae9fdb5..02e3efdfde 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -853,7 +853,7 @@ function FILTER_FLUSH_TEMPLATE_CACHE () { // Now flush all foreach ($GLOBALS['template_eval'] as $template=>$eval) { // Flush the cache (if not yet found) - flushTemplateCache($template, $eval); + //flushTemplateCache($template, $eval); } // END - if } // END - if } diff --git a/inc/functions.php b/inc/functions.php index 06c06212fc..c727a3bf64 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1341,7 +1341,7 @@ function bigintval ($num, $castValue = true) { function generateImageOrCode ($img_code, $headerSent = true) { // Is the code size oversized or shouldn't we display it? if ((strlen($img_code) > 6) || (empty($img_code)) || (getConfig('code_length') == '0')) { - // Stop execution of function here because of over-sized code length + // Stop2 execution of function here because of over-sized code length debug_report_bug('img_code ' . $img_code .' has invalid length. img_code()=' . strlen($img_code) . ' code_length=' . getConfig('code_length')); } elseif ($headerSent === false) { // Return an HTML code here @@ -1454,35 +1454,35 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = } else { // Generate table $OUT = "
\n"; - $OUT .= "\n"; + $OUT .= "
\n"; $OUT .= "\n"; if (ereg('Y', $display) || (empty($display))) { - $OUT .= " \n"; + $OUT .= " \n"; } if (ereg('M', $display) || (empty($display))) { - $OUT .= " \n"; + $OUT .= " \n"; } - if (ereg("W", $display) || (empty($display))) { - $OUT .= " \n"; + if (ereg('W', $display) || (empty($display))) { + $OUT .= " \n"; } - if (ereg("D", $display) || (empty($display))) { - $OUT .= " \n"; + if (ereg('D', $display) || (empty($display))) { + $OUT .= " \n"; } - if (ereg("h", $display) || (empty($display))) { - $OUT .= " \n"; + if (ereg('h', $display) || (empty($display))) { + $OUT .= " \n"; } if (ereg('m', $display) || (empty($display))) { - $OUT .= " \n"; + $OUT .= " \n"; } - if (ereg("s", $display) || (empty($display))) { - $OUT .= " \n"; + if (ereg('s', $display) || (empty($display))) { + $OUT .= " \n"; } $OUT .= "\n"; @@ -1498,7 +1498,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = } $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } if (ereg('M', $display) || (empty($display))) { @@ -1512,10 +1512,10 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = } $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } - if (ereg("W", $display) || (empty($display))) { + if (ereg('W', $display) || (empty($display))) { // Generate week selection $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } - if (ereg("D", $display) || (empty($display))) { + if (ereg('D', $display) || (empty($display))) { // Generate day selection $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } - if (ereg("h", $display) || (empty($display))) { + if (ereg('h', $display) || (empty($display))) { // Generate hour selection $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } if (ereg('m', $display) || (empty($display))) { @@ -1564,10 +1564,10 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = } $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } - if (ereg("s", $display) || (empty($display))) { + if (ereg('s', $display) || (empty($display))) { // Generate second selection $OUT .= " \n"; } else { - $OUT .= "\n"; + $OUT .= "\n"; } $OUT .= "\n"; $OUT .= "
{--_YEARS--}
{--_YEARS--}
{--_MONTHS--}
{--_MONTHS--}
{--_WEEKS--}
{--_WEEKS--}
{--_DAYS--}
{--_DAYS--}
{--_HOURS--}
{--_HOURS--}
{--_MINUTES--}
{--_MINUTES--}
{--_SECONDS--}
{--_SECONDS--}
\n"; @@ -2028,7 +2028,7 @@ function generateHash ($plainText, $salt = '') { // Do we miss an arry element here? if (!isConfigEntrySet('file_hash')) { - // Stop here + // Stop2 here debug_report_bug('Missing file_hash in ' . __FUNCTION__ . '.'); } // END - if @@ -2366,7 +2366,7 @@ function getThemeId ($name) { // Count up incrementStatsEntry('cache_hits'); - } elseif (getExtensionVersion('cache') != '0.1.8') { + } elseif (isExtensionInstalledAndNewer('cache', '0.1.8')) { // Check if current theme is already imported or not $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_path`='%s' LIMIT 1", array($name), __FUNCTION__, __LINE__); @@ -3227,7 +3227,7 @@ function shutdown () { addFatalMessage(__FILE__, __LINE__, getMessage('NO_DB_LINK_SHUTDOWN')); } - // Stop executing here + // Stop2 executing here exit; } diff --git a/inc/language/de.php b/inc/language/de.php index ade431ebb0..d12af9383f 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -103,10 +103,11 @@ addMessages(array( 'ADMIN_REGISTER_FAILED' => "Bei der Registrierung eines Admin-Accounts ist ein unerwarteter Fehler unterlaufen.", 'ADMIN_REGISTER_DONE' => "Das Admin-Account wurde soeben erstellt. Sie können sich nun mit den eingegeben Login-Daten einloggen.", 'ADMIN_CANNOT_COMPLETE' => "Kann die Regsitrierung des Admin-Accounts nicht abschliessen.", - 'ADMIN_LOGIN_NOW' => "Sie können sich nun in den Administratorbereich einloggen.
Geben Sie dazu Ihren Admin-Login (nicht Mitglied-Login!) und das Passwort dazu ein.", + 'ADMIN_LOGIN_TITLE' => "Einloggen zum Administrationsbereich", + 'ADMIN_LOGIN_NOW' => "Sie können sich nun in den Administratorbereich einloggen. Geben Sie Ihren Admin-Login und das Passwort dazu ein.", 'ENTER_ADMIN_LOGIN' => "Administrator-Login", 'ENTER_ADMIN_PASS' => "Passwort zum Admin-Account", - 'ADMIN_LOGIN_SUBMIT' => "Einloggen zum Admin-Bereich", + 'ADMIN_LOGIN_SUBMIT' => "Einloggen", 'WRONG_PASS' => "Falsches Passwort.", 'ADMIN_404' => "Administrator-Account %s wurde nicht gefunden.", 'ADMIN_LOGIN_FAILED' => "Einloggen in den Administrator-Bereich fehlgeschlagen.", @@ -757,7 +758,7 @@ addMessages(array( 'GUEST_STATS_MEMBERS' => "Statistiken über unsere Mitglieder", 'EDIT_REFBANNER' => "Werbebanner editieren", 'REQUEST_CONFIRM_LINK_TITLE' => "Bestätigungslink erneut anfordern", - 'GUEST_CONFIRM_LINK_NOTE' => "Sie haben Ihren Bestätigungslink verlegt? Kein Problem, hier können Sie ihn erneut anfordern. Geben Sie dazu einfach Ihre angemeldete eMail-Adresse an. Der Link wird Ihnen dann per Mail zugesandt.", + 'GUEST_CONFIRM_LINK_NOTE' => "Sie haben Ihren Bestätigungslink verlegt? Kein Problem, hier können Sie ihn erneut anfordern. Geben Sie einfach Ihre angemeldete eMail-Adresse an. Der Link wird Ihnen dann per Mail zugesandt.", 'REQUEST_CONFIRM_LINK' => "Erneut anfordern", 'LOGIN_ID_CONFIRMED' => "Sie haben bereits Ihre E-Mail Adresse bestätigt.", 'CONFIRM_LINK_SENT' => "Der Bestätigungslink wurde an Ihre E-Mail Adresse ausgesandt.", diff --git a/inc/language/network_de.php b/inc/language/network_de.php index 1ee9cc02d2..0e606e6cfa 100644 --- a/inc/language/network_de.php +++ b/inc/language/network_de.php @@ -48,31 +48,35 @@ addMessages(array( 'ADMIN_NETWORK_DO_404' => "Es wurde der Parameter 'do' nicht übermittelt.", 'ADMIN_NETWORK_FORM_NOT_SENT' => "Es wurde kein bekanntes Formular versendet.", 'ADMIN_NETWORK_NOTHING_FOUND' => "Es wurden keine Daten zum Editieren oder Löschen gefunden.", + // - Form titles + 'ADMIN_NETWORK_ADD_TITLE' => "Neues Werbenetzwerk hinzufügen - Allgemeine Daten", + 'ADMIN_NETWORK_EDIT_TITLE' => "Werbenetzwerk editieren - Allgemeine Daten", // - Link titles 'ADMIN_NETWORK_LIST_TYPES_LINK_TITLE' => "Weiter zu den Werbearten", 'ADMIN_NETWORK_LIST_PARAMS_LINK_TITLE' => "Weiter zu den Abfrageparametern", 'ADMIN_NETWORK_LIST_CODE_TYPES_LINK_TITLE' => "Weiter zu den Rückgabewerten", 'ADMIN_NETWORK_LIST_CODES_LINK_TITLE' => "Weiter zu den Fehlercodes", + // - Buttons + 'ADMIN_NETWORK_ADD' => "Allgemeine Daten anlegen", + 'ADMIN_NETWORK_EDIT' => "Editieren", + 'ADMIN_NETWORK_CHANGE' => "Daten ändern", + 'ADMIN_NETWORK_DELETE' => "Löschen", // - Sponsor networks 'ADMIN_NETWORK_NONE_SUPPORTED' => "Es sind noch keine Werbenetzwerke eingerichtet.", - 'ADMIN_NETWORK_ADD_TITLE' => "Neues Werbenetzwerk hinzufügen - Stammdaten", 'ADMIN_NETWORK_SHORT_NAME' => "Kurzname", 'ADMIN_NETWORK_TITLE' => "Linktitel", 'ADMIN_NETWORK_REFLINK' => "Referal-Link", 'ADMIN_NETWORK_DATA_SEPERATOR' => "Trennsymbol f. Daten", 'ADMIN_NETWORK_ROW_SEPERATOR' => "Trennzeichen f. Zeilen", 'ADMIN_NETWORK_REQUEST_TYPE' => "HTTP-Abfragetyp", - 'ADMIN_NETWORK_REQUEST_TYPE_GET' => "GET (Meistens richtig)", + 'ADMIN_NETWORK_REQUEST_TYPE_GET' => "GET (meistens richtig)", 'ADMIN_NETWORK_REQUEST_TYPE_POST' => "POST (mehr Datenschutz)", 'ADMIN_NETWORK_CHARSET' => "Zeichensatz", - 'ADMIN_NETWORK_ADD' => "Stammdaten anlegen", - 'ADMIN_NETWORK_EDIT' => "Stammdaten editieren", - 'ADMIN_NETWORK_DELETE' => "Stammdaten löschen", 'ADMIN_NETWORK_ADD_NOTE' => "Mehr Datenschutz bei POST-Abfragen bedeutet, dass die von den Internetanbietern betriebenen Caches (Proxy) die POST-Daten nicht mitloggen (so eine Art Kodex). Der Zeichensatz ist meistens ISO-8859-1 oder WINDOWS-1252.", - 'ADMIN_NETWORK_LIST_NOTE' => "Seien Sie mit dem Löschen und Editieren von Stammdaten sehr vorsichtig. Sie sollten hierzu Rücksprache im Forum halten.", + 'ADMIN_NETWORK_LIST_NOTE' => "Seien Sie mit dem Löschen und Editieren von Allgemeine Daten sehr vorsichtig. Sie sollten hierzu Rücksprache im Forum halten.", 'ADMIN_NETWORK_ALREADY_ADDED' => "Ein Werbenetzwerk mit dem Kurznamen %s existiert bereits.", 'ADMIN_NETWORK_DATA_NOT_ADDED' => "Das Werbenetzwerk mit dem Kurznamen %s wurde nicht hinzugefügt.", - 'ADMIN_NETWORK_ADDED_TITLE' => "Stammdaten hinzugefügt.", + 'ADMIN_NETWORK_ADDED_TITLE' => "Allgemeine Daten hinzugefügt.", 'ADMIN_NETWORK_SEPERATOR' => "Trennzeichen", 'ADMIN_NETWORK_DATA_SEPERATOR2' => "Daten", 'ADMIN_NETWORK_ROW_SEPERATOR2' => "Zeilen", diff --git a/inc/language/task_de.php b/inc/language/task_de.php index b3a8ccb054..c445fa17f0 100644 --- a/inc/language/task_de.php +++ b/inc/language/task_de.php @@ -47,7 +47,7 @@ addMessages(array( 'ADMIN_TASK_OVERVIEW_MEMBERS' => "Mitglieder-Übersicht", 'ADMIN_TASK_OVERVIEW_TASKS' => "Task-Übersicht", 'ADMIN_TASK_OVERVIEW_MAILS' => "Mail-Übersicht", - 'ADMIN_TASK_OVERVIEW_EXTRAS' => "Weiteres/Diverses", + 'ADMIN_TASK_OVERVIEW_EXTRAS' => "Weiteres / Diverses", 'ADMIN_TASK_CONFIRMED' => "Bestätigt", 'ADMIN_TASK_UNCONFIRMED' => "Unbestätigt", 'ADMIN_TASK_LOCKED' => "Gesperrt", diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index 28ce65d9b8..8255f64fdc 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -92,11 +92,11 @@ LIMIT ".$limit, __FUNCTION__, __LINE__); // Prepare data for the row template $content = array( - 'userid' => $content['userid'], - 'rid' => $content['refid'], - 'points' => translateComma($content['points']), - 'stamp' => generateDateTime($content['timemark'], $DT_MODE), - 'sw' => $SW, + 'userid' => $content['userid'], + 'rid' => $content['refid'], + 'points' => translateComma($content['points']), + 'timemark' => generateDateTime($content['timemark'], $DT_MODE), + 'sw' => $SW, ); // Load template and switch color diff --git a/inc/libs/holiday_functions.php b/inc/libs/holiday_functions.php index a14fa0d6e3..65e2b40b33 100644 --- a/inc/libs/holiday_functions.php +++ b/inc/libs/holiday_functions.php @@ -60,7 +60,7 @@ ORDER BY // Process all found entries while ($content = SQL_FETCHARRAY($result_stop)) { - // Stop holiday + // Stop2 holiday addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s LIMIT 1", array(bigintval($content['userid'])), __FUNCTION__, __LINE__, false)); diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index af436aff7b..818af211e3 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { // Processes an admin form function doAdminNetworkProcessForm () { // Form really sent? - if ((!isFormSent()) && (!isPostRequestElementSet('edit')) && (!isPostRequestElementSet('del'))) { + if ((!isFormSent()) && (!isPostRequestElementSet('edit')) && (!isPostRequestElementSet('del')) && (!isPostRequestElementSet('change')) && (!isPostRequestElementSet('remove'))) { // Abort here loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_FORM_NOT_SENT')); return; @@ -173,7 +173,12 @@ function doAdminNetworkProcessHandlenetworkForm () { $networkData['sw'] = $SW; // Make selection box for network_request_type - $networkData['network_request_type'] = addSelectionBox('network_request_type', $networkData['network_request_type'], '', 0, 'admin_select'); + $networkData['network_request_type'] = generateOptionList( + '/ARRAY/', + array('GET','POST'), + array(getMessage('ADMIN_NETWORK_REQUEST_TYPE_GET'), getMessage('ADMIN_NETWORK_REQUEST_TYPE_POST')), + $networkData['network_request_type'] + ); // Add row template and switch color $OUT .= loadTemplate('admin_edit_networks_row', true, $networkData); diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index d550d625e2..753f0060ad 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -906,7 +906,7 @@ WHERE `userid` NOT IN (".implode(', ', $UIDs['userid']).") AND `status`='%s'", // Check wether the user is allowed to book more URLs function SURFBAR_IF_USER_BOOK_MORE_URLS ($userid = '0') { // Is this admin and userid is zero or does the user has some URLs left to book? - return ((($userid == '0') && (isAdmin())) || (SURFBAR_GET_TOTAL_USER_URLS($userid, '', array("REJECTED")) < getConfig('surfbar_max_order'))); + return ((($userid == '0') && (isAdmin())) || (SURFBAR_GET_TOTAL_USER_URLS($userid, '', array('REJECTED')) < getConfig('surfbar_max_order'))); } // Get total amount of URLs of given status for current user @@ -1508,7 +1508,7 @@ function SURFBAR_GET_ARRAY_FROM_STATUS ($status) { } // Reload to configured stop page -function SURFBAR_RELOAD_TO_STOP_PAGE ($page="stop") { +function SURFBAR_RELOAD_TO_STOP_PAGE ($page = 'stop') { // Internal or external? if ((getConfig('surfbar_pause_mode') == 'INTERNAL') || (getConfig('surfbar_pause_url') == '')) { // Reload to internal page diff --git a/inc/modules/admin.php b/inc/modules/admin.php index 78705e7aff..806035c74a 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { loadIncludeOnce('inc/modules/admin/admin-inc.php'); // Fix "deleted" cookies in PHP4 (PHP5 does remove them, PHP4 sets them to deleted!) -fixDeletedCookies(array('admin_login', 'admin_md5', 'admin_last', 'admin_to')); +fixDeletedCookies(array('admin_login', 'admin_md5', 'admin_last')); // Init return value $ret = 'init'; @@ -186,9 +186,9 @@ if (!isAdminRegistered()) { // Output reset password form loadTemplate('admin_send_reset_link'); } -} elseif ((!isSessionVariableSet('admin_login')) || (!isSessionVariableSet('admin_md5')) || (!isSessionVariableSet('admin_last')) || (!isSessionVariableSet('admin_to')) || ((getSession('admin_last') + bigintval(getSession('admin_to')) * 3600 * 24) < time())) { +} elseif ((!isSessionVariableSet('admin_login')) || (!isSessionVariableSet('admin_md5')) || (!isSessionVariableSet('admin_last'))) { // At leat one administrator account was created - if ((isSessionVariableSet('admin_login')) && (isSessionVariableSet('admin_md5')) && (isSessionVariableSet('admin_last')) && (isSessionVariableSet('admin_to'))) { + if ((isSessionVariableSet('admin_login')) && (isSessionVariableSet('admin_md5')) && (isSessionVariableSet('admin_last'))) { // Timeout for last login, we have to logout first! redirectToUrl('modules.php?module=admin&logout=1'); } // END - if diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index ec8bb508a9..dd3f27a8ee 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -210,8 +210,6 @@ function doAdminLogin ($adminLogin, $passHash) { setSession('admin_login', $adminLogin) ) && ( setSession('admin_last', time()) - ) && ( - setSession('admin_to', bigintval(postRequestElement('timeout'))) )); } diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index d2d02ed497..da819b4e75 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -332,6 +332,8 @@ LIMIT 1", 'pid' => $pid, 'tid' => $tid, ); + + // Load template $OUT .= loadTemplate('admin_payout_overview_form', true, $content); } else { // Problem obtaining payout id @@ -347,7 +349,7 @@ LIMIT 1", if (isExtensionActive('wernis')) { // Extension is installed so let him send a notification to the user $result_pay = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_wernis` WHERE `userid`=%s AND wernis_timestamp=%s LIMIT 1", - array(bigintval($userid), bigintval($created)), __FILE__, __LINE__); + array(bigintval($userid), bigintval($created)), __FILE__, __LINE__); list($pid) = SQL_FETCHROW($result_pay); SQL_FREERESULT($result_pay); diff --git a/inc/modules/admin/what-chk_regs.php b/inc/modules/admin/what-chk_regs.php index d4af53b263..be8452bcf7 100644 --- a/inc/modules/admin/what-chk_regs.php +++ b/inc/modules/admin/what-chk_regs.php @@ -62,26 +62,26 @@ if (SQL_NUMROWS($result) > 0) { if ($content['refid'] > 0) $content['refid'] = generateUserProfileLink($content['refid']); // Prepare array for the row template - // @TODO Rewritings: surname->surname,family->family,ip->REMOTE_ADDR,ref->refid,hash->user_hash in template + // @TODO Rewritings: ip->REMOTE_ADDR,hash->user_hash in template $content = array( - 'sw' => $SW, - 'gender' => translateGender($content['gender']), - 'surname' => $content['surname'], + 'sw' => $SW, + 'gender' => translateGender($content['gender']), + 'surname' => $content['surname'], 'family' => $content['family'], - 'email' => "".$content['email']."", - 'ip' => $content['REMOTE_ADDR'], - 'ref' => $content['refid'], - 'hash' => $content['user_hash'], - 'link' => generateUserProfileLink($content['userid']), + 'email' => "".$content['email']."", + 'ip' => $content['REMOTE_ADDR'], + 'refid' => $content['refid'], + 'hash' => $content['user_hash'], + 'link' => generateUserProfileLink($content['userid']), ); // Load row template and switch color - $OUT .= loadTemplate('admin_reg_row', true, $content); + $OUT .= loadTemplate('admin_list_chk_reg_row', true, $content); $SW = 3 - $SW; } // Load main template - loadTemplate('admin_reg', false, $OUT); + loadTemplate('admin_list_chk_reg', false, $OUT); } else { // No registrations left - or all has confirmed their email address... :-) loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ALL_CONFIRMED_EMAIL')); diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index c17d617305..ba71df52ea 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -50,7 +50,7 @@ if (!isExtensionActive('other')) { return; } // END - if -// Stop saving data if one input field is !isset +// Stop2 saving data if one input field is !isset if (isFormSent()) { // Calculate stamps and set calculated stamps setRequestPostElement('online_timeout' , createTimestampFromSelections('ip_timeout' , postRequestArray())); diff --git a/inc/modules/admin/what-del_transfer.php b/inc/modules/admin/what-del_transfer.php index 8100ac79d7..6c84d7a673 100644 --- a/inc/modules/admin/what-del_transfer.php +++ b/inc/modules/admin/what-del_transfer.php @@ -74,7 +74,7 @@ if (SQL_NUMROWS($result) > 0) { $content = array( 'sw' => $SW, 'trans_id' => $content['trans_id'], - 'stamp' => generateDateTime($content['time_trans'], 3), + 'time_trans' => generateDateTime($content['time_trans'], 3), 'userid_from' => generateUserProfileLink($content['userid']), 'userid_to' => generateUserProfileLink($content['to_userid']), 'reason' => $content['reason'], @@ -93,7 +93,7 @@ if (SQL_NUMROWS($result) > 0) { } else { // Nothing for in and out $OUT = " - + ".loadTemplate('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))." "; diff --git a/inc/modules/admin/what-email_archiv.php b/inc/modules/admin/what-email_archiv.php index 8ce52b112b..545bba1433 100644 --- a/inc/modules/admin/what-email_archiv.php +++ b/inc/modules/admin/what-email_archiv.php @@ -92,7 +92,7 @@ if (SQL_NUMROWS($result) > 0) { while ($pool = SQL_FETCHROW($result)) { // Check sent mails and clicks $result_mails = SQL_QUERY_ESC("SELECT `max_rec`, `clicks` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1", - array(bigintval($pool[0])), __FILE__, __LINE__); + array(bigintval($pool['id'])), __FILE__, __LINE__); list($sent, $clicks) = SQL_FETCHROW($result_mails); SQL_FREERESULT($result_mails); @@ -100,30 +100,30 @@ if (SQL_NUMROWS($result) > 0) { $unconfirmed = $sent - $clicks; if ($unconfirmed > 0) { // Add link to list_unconfirmed what-file - $unconfirmed = "".$unconfirmed.""; + $unconfirmed = "".$unconfirmed.""; } // END - if // Prepare data for the row template - $row = array( + $content = array( 'sw' => $SW, - 'u_link' => generateUserProfileLink($pool[1]), - 'subject' => $pool[2], - 'text' => $pool[3], - 'pay' => getPaymentTitlePrice($pool[5]), - 'cat' => getCategory($pool[10]), + 'u_link' => generateUserProfileLink($pool['sender']), + 'subject' => $pool['subject'], + 'text' => $pool['text'], + 'pay' => getPaymentTitlePrice($pool['payment_id']), + 'cat' => getCategory($pool['cat_id']), 'sent' => $sent, - 'ruserids' => convertReceivers($pool[4]), + 'ruserids' => convertReceivers($pool['receivers']), 'unconfirmed' => $unconfirmed, - 'type' => translatePoolType($pool[6]), - 'target_send' => $pool[9], - 'frametester' => generateFrametesterUrl($pool[8]), - 'url' => $pool[8], - 'stamp' => generateDateTime($pool[7], 0), - 'mid' => $pool[0], + 'type' => translatePoolType($pool['data_type']), + 'target_send' => $pool['target_send'], + 'frametester' => generateFrametesterUrl($pool['url']), + 'url' => $pool['url'], + 'timestamp' => generateDateTime($pool['timestamp'], 0), + 'mid' => $pool['id'], ); // Load row template and switch colors - $OUT .= loadTemplate('admin_email_archiv_row', true, $row); + $OUT .= loadTemplate('admin_email_archiv_row', true, $content); $SW = 3 - $SW; } // END - while diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index 731b4edc61..fcdd8aadfe 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -97,7 +97,7 @@ if (isGetRequestElementSet('userid')) { // @TODO Rewrite this to includes/filter switch ($type) { case 'NORMAL': - $result_data = SQL_QUERY_ESC("SELECT `subject`, `timestamp_ordered`, `cat_id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1", + $result_data = SQL_QUERY_ESC("SELECT `subject`, `timestamp_ordered` AS `timestamp`, `cat_id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM'); $LINK = "".$id.""; @@ -118,16 +118,18 @@ if (isGetRequestElementSet('userid')) { if (SQL_NUMROWS($result_data) == 1) { // Mail was found! - list($subject, $timestamp, $cat) = SQL_FETCHROW($result_data); - if (empty($subject)) $subject = getMessage('DEFAULT_SUBJECT_LINE'); + $content = SQL_FETCHARRAY($result_data); + + // Fix empty subject + if (empty($content['subject'])) $content['subject'] = getMessage('DEFAULT_SUBJECT_LINE'); // Prepare data for the row template $content = array( - 'sw' => $SW, - 'link' => $LINK, - 'subject' => $subject, - 'stamp' => generateDateTime($timestamp, 0), - 'cat' => getCategory($cat), + 'sw' => $SW, + 'link' => $LINK, + 'subject' => $content['subject'], + 'timestamp' => generateDateTime($content['timestamp'], 0), + 'cat' => getCategory($content['cat_id']), ); // Load row template @@ -135,11 +137,11 @@ if (isGetRequestElementSet('userid')) { } else { // Load template for error $OUT .= loadTemplate('admin_list_links_problem', - array( + array( 'sw' => $SW, 'problem' => $PROBLEM, 'data' => $DATA - ) + ) ); } diff --git a/inc/modules/admin/what-list_networks.php b/inc/modules/admin/what-list_networks.php index c0b4623a15..be0e311273 100644 --- a/inc/modules/admin/what-list_networks.php +++ b/inc/modules/admin/what-list_networks.php @@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__); $GLOBALS['network_display'] = true; // Was the form sent? -if ((isFormSent()) || (isPostRequestElementSet('edit')) || (isPostRequestElementSet('del'))) { +if ((isFormSent()) || (isPostRequestElementSet('edit')) || (isPostRequestElementSet('del')) || (isPostRequestElementSet('change')) || (isPostRequestElementSet('remove'))) { // Do we have a 'do'? if (isGetRequestElementSet('do')) { // Process the request diff --git a/inc/modules/admin/what-list_transfer.php b/inc/modules/admin/what-list_transfer.php index bb42974a02..aedb3fc9e0 100644 --- a/inc/modules/admin/what-list_transfer.php +++ b/inc/modules/admin/what-list_transfer.php @@ -53,13 +53,13 @@ if (SQL_NUMROWS($result) > 0) { while ($content = SQL_FETCHARRAY($result)) { // Prepare data for the row template $content = array( - 'sw' => $SW, - 'trans_id' => $content['trans_id'], - 'stamp' => generateDateTime($content['time_trans'], 3), - 'from_link' => generateUserProfileLink($content['userid']), - 'to_link' => generateUserProfileLink($content['to_userid']), - 'reason' => wordwrap($content['reason'], 15), - 'points' => translateComma($content['points']), + 'sw' => $SW, + 'trans_id' => $content['trans_id'], + 'time_trans' => generateDateTime($content['time_trans'], 3), + 'from_link' => generateUserProfileLink($content['userid']), + 'to_link' => generateUserProfileLink($content['to_userid']), + 'reason' => wordwrap($content['reason'], 15), + 'points' => translateComma($content['points']), ); // Load row template add points and switch color @@ -72,7 +72,7 @@ if (SQL_NUMROWS($result) > 0) { } else { // Nothing for in and out $OUT = " - + ".loadTemplate('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))." "; diff --git a/inc/modules/admin/what-list_unconfirmed.php b/inc/modules/admin/what-list_unconfirmed.php index 57cb5aea2d..9421b68753 100644 --- a/inc/modules/admin/what-list_unconfirmed.php +++ b/inc/modules/admin/what-list_unconfirmed.php @@ -195,5 +195,5 @@ WHERE SQL_FREERESULT($result_master); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 0722b871e4..53bf9e2d89 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -286,7 +286,7 @@ LIMIT 1", // @TODO Rewrite this into a filter if (isExtensionActive('nickname')) { // Nickname extension found - define('__NICKNAME_TH', " {--NICKNAME--}"); + define('__NICKNAME_TH', " {--NICKNAME--}"); } else { // Not found define('__NICKNAME_TH', ''); @@ -309,12 +309,12 @@ LIMIT 1", if ((empty($content['nickname'])) || ($content['nickname'] == $content['userid'])) $content['nickname'] = '---'; // Calculate total points - $pointsTotal = countSumTotalData($content['userid'], 'user_points', 'points') - countSumTotalData($content['userid'], 'user_data', 'used_points'); + $content['points'] = countSumTotalData($content['userid'], 'user_points', 'points') - countSumTotalData($content['userid'], 'user_data', 'used_points'); // Clickrate - $clickRate = '0'; + $content['rate'] = '0'; if ($content['emails_received'] > 0) { - $clickRate = $content['mails_confirmed'] / $content['emails_received'] * 100; + $content['rate'] = $content['mails_confirmed'] / $content['emails_received'] * 100; } // END - if // Transfer data to array @@ -323,8 +323,8 @@ LIMIT 1", $content['gender'] = translateGender($content['gender']); $content['email'] = '[' . $content['email'] . ']'; $content['alinks'] = generateMemberAdminActionLinks($content['userid'], $content['status']); - $content['points'] = translateComma($pointsTotal); - $content['rate'] = translateComma($clickRate); + $content['points'] = translateComma($content['points']); + $content['rate'] = translateComma($content['rate']); $content['locked'] = translateComma(countSumTotalData($content['userid'], 'user_points', 'locked_points')); $content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], 2); $content['status'] = translateUserStatus($content['status']); diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 49e1636cf7..3f8c23e43d 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -140,14 +140,13 @@ ORDER BY } // Prepare data for the template - // @TODO Rewritings: acc->target_account,bank->target_bank in templates $content = array( - 'sw' => $SW, - 'acc' => $content['target_account'], - 'points' => translateComma($content['payout_total']) . ' ' . $content['type'], - 'bank' => $content['target_bank'], - 'stamp' => generateDateTime($content['payout_timestamp'], 2), - 'status' => $content['status'] + 'sw' => $SW, + 'target_account' => $content['target_account'], + 'points' => translateComma($content['payout_total']) . ' ' . $content['type'], + 'target_bank' => $content['target_bank'], + 'payout_timestamp' => generateDateTime($content['payout_timestamp'], 2), + 'status' => $content['status'] ); // Load row template and switch colors diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index bc866cc2dd..e5b18542ea 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -89,12 +89,12 @@ if (!isGetRequestElementSet('mode')) { while ($data = SQL_FETCHARRAY($result)) { // Prepare data for output $rowContent = array( - 'stamp' => generateDateTime($data['primera_timestamp'], 2), - 'points' => translateComma($data['primera_amount']), - 'acc' => SQL_ESCAPE($data['primera_account']), - 'status' => PRIMERA_TRANSFER_STATUS($data['primera_type']), - 'raw_type' => strtolower($data['primera_type']), - 'sw' => $SW, + 'primera_timestamp' => generateDateTime($data['primera_timestamp'], 2), + 'points' => translateComma($data['primera_amount']), + 'primera_account' => SQL_ESCAPE($data['primera_account']), + 'status' => PRIMERA_TRANSFER_STATUS($data['primera_type']), + 'raw_type' => strtolower($data['primera_type']), + 'sw' => $SW, ); // Load row template diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 691733e5e7..6b06e8b655 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -321,12 +321,12 @@ switch ($mode) { // Prepare content for template // @TODO Rewrite: tid->trans_id,stamp->time_trans $row = array( - 'sw' => $SW, - 'tid' => $tid, - 'stamp' => generateDateTime($stamp, 3), - 'userid' => $userid, - 'reason' => $reason, - 'points' => translateComma($points) + 'sw' => $SW, + 'trans_id' => $tid, + 'stamp' => generateDateTime($stamp, 3), + 'userid' => $userid, + 'reason' => $reason, + 'points' => translateComma($points) ); // Load row template @@ -342,7 +342,7 @@ switch ($mode) { } else { // Nothing for in or out $OUT = " - + ".loadTemplate('admin_settings_saved', true, $nothingMessage)." "; @@ -428,7 +428,7 @@ KEY (`party_userid`) } else { // Nothing for in and out $OUT = " - + ".loadTemplate('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))." "; diff --git a/inc/modules/member/what-unconfirmed.php b/inc/modules/member/what-unconfirmed.php index 6b74bacc48..b97bfebb48 100644 --- a/inc/modules/member/what-unconfirmed.php +++ b/inc/modules/member/what-unconfirmed.php @@ -205,15 +205,15 @@ LIMIT 1", // Prepare data for template $content = array( - 'sw' => $SW, - 'userid' => getMemberId(), - 'data' => bigintval($DATA), - 'type' => $type, - 'subject' => $subject, - 'sender' => $sender, - 'stamp' => generateDateTime($timestamp, 2), - 'cat' => getCategory($cat), - 'points' => translateComma($pay), + 'sw' => $SW, + 'userid' => getMemberId(), + 'data' => bigintval($DATA), + 'type' => $type, + 'subject' => $subject, + 'sender' => $sender, + 'timestamp' => generateDateTime($timestamp, 2), + 'cat' => getCategory($cat), + 'points' => translateComma($pay), ); // Load row template diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index 5e2c960cb0..c9082b2210 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -88,12 +88,12 @@ if ((!isGetRequestElementSet('mode')) || (getRequestElement('mode') == 'choose') while ($data = SQL_FETCHARRAY($result)) { // Prepare data for output $rowContent = array( - 'stamp' => generateDateTime($data['wernis_timestamp'], 2), - 'points' => translateComma($data['wernis_amount']), - 'acc' => bigintval($data['wernis_account']), - 'status' => WERNIS_TRANSFER_STATUS($data['wernis_type']), - 'raw_type' => strtolower($data['wernis_type']), - 'sw' => $SW, + 'wernis_timestamp' => generateDateTime($data['wernis_timestamp'], 2), + 'points' => translateComma($data['wernis_amount']), + 'wernis_account' => bigintval($data['wernis_account']), + 'status' => WERNIS_TRANSFER_STATUS($data['wernis_type']), + 'raw_type' => strtolower($data['wernis_type']), + 'sw' => $SW, ); // Load row template diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index bc2ccddadf..27961f5f60 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1644,22 +1644,29 @@ function generateOptionList ($table, $id, $name, $default='', $special='', $wher $ret = ''; if ($table == '/ARRAY/') { // Selection from array - if (is_array($id) && is_array($name) && count($id) == count($name)) { + if ((is_array($id)) && (is_array($name)) && (count($id)) == (count($name))) { // Both are arrays foreach ($id as $idx => $value) { $ret .= '