inc/extensions/ext-register.php -text
inc/extensions/ext-removeip.php -text
inc/extensions/ext-repair.php -text
+inc/extensions/ext-report.php -text
inc/extensions/ext-rewrite.php -text
inc/extensions/ext-safe.php -text
inc/extensions/ext-seo.php -text
templates/de/html/ext/ext_register.tpl -text
templates/de/html/ext/ext_removeip.tpl -text
templates/de/html/ext/ext_repair.tpl -text
+templates/de/html/ext/ext_report.tpl -text
templates/de/html/ext/ext_rewrite.tpl -text
templates/de/html/ext/ext_safe.tpl -text
templates/de/html/ext/ext_seo.tpl -text
array(getUserData('userid'), detectRemoteAddr(), session_id()), __FILE__, __LINE__);
// Entry not found, points set and not logged in?
- if (((SQL_NUMROWS($result) == '0') || (isAdmin())) && ($points > 0) && (!isMember()) && (getConfig('beg_pay_mode') == 'NONE')) {
+ if (((SQL_HASZERONUMS($result)) || (isAdmin())) && ($points > 0) && (!isMember()) && (getConfig('beg_pay_mode') == 'NONE')) {
// Admin is testing?
if (!isAdmin()) {
require('inc/config-global.php');
// Redirect only to registration page when this script is installed
-if ((isExtensionActive('debug')) && (getTotalFatalErrors() == '0')) {
+if ((isExtensionActive('debug')) && (!ifFatalErrorsDetected())) {
// Is the request parameter set?
if (isPostRequestParameterSet('request')) {
// Handle the request
$_cache_f = $this->_cache_dir.$this->_cached_file;
- if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == '0')) {
+ if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == 0)) {
// We have to parse the remote file
$this->_use_cached_file = false;
// --> we want to provide proper Information for Use in
}
$i++;
}
- if ((count($dummy) > 0) && (count($reply) == '0') && (!$isContent)) {
+ if ((count($dummy) > 0) && (count($reply) == 0) && (!$isContent)) {
// Transfer content from dummy
$reply = $content;
}
// SQL num rows
function SQL_NUMROWS ($result) {
+ // Valid link resource?
+ if (!SQL_IS_LINK_UP()) return false;
+
// Link is not up, no rows by default
$lines = false;
// Is the result empty? Then we have an error!
if (empty($lines)) $lines = '0';
- } elseif (SQL_IS_LINK_UP()) {
- // No resource given, no lines found!
- $lines = '0';
+ } else {
+ // No resource given, please fix this
+ trigger_error('No resource given! result[]=' . gettype($result));
}
// Return lines
// Do we have no entry on ADD or an entry on DROP?
// 123 4 4 3 3 4 4 32 23 4 4 3 3 4 4 321
- if (((SQL_NUMROWS($result) == '0') && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 1) && (strpos($sql, 'DROP') !== false))) {
+ if (((SQL_HASZERONUMS($result)) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 1) && (strpos($sql, 'DROP') !== false))) {
// Do the query
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Executing: ' . $sql);
$result = SQL_QUERY($sql, $F, $L, false);
// Skip further attempt(s)
break;
- } elseif ((((SQL_NUMROWS($result) == 1) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == '0') && (strpos($sql, 'DROP') !== false))) && ($columnName != 'KEY')) {
+ } elseif ((((SQL_NUMROWS($result) == 1) && (strpos($sql, 'ADD') !== false)) || ((SQL_HASZERONUMS($result)) && (strpos($sql, 'DROP') !== false))) && ($columnName != 'KEY')) {
// Abort here because it is alreay there
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Skipped: ' . $sql);
break;
return $linkUp;
}
+// Wrapper function to make code more readable
+function SQL_HASZERONUMS ($result) {
+ // Just pass it through
+ return (SQL_NUMROWS($result) === 0);
+}
+
// [EOF]
?>
} // END - for
// Is there no update?
- if (countExtensionUpdateDependencies(getCurrentExtensionName()) == '0') {
+ if (countExtensionUpdateDependencies(getCurrentExtensionName()) == 0) {
// Then test is passed!
$test = true;
} // END - if
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 03/10/2010 *
+ * =================== Last change: 03/10/2010 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : ext-report.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Automated bug-reporting extension *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Automatisierte Bugmelde-Erweiterung *
+ * -------------------------------------------------------------------- *
+ * $Revision:: 856 $ *
+ * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. March 2009) $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: stelzi $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0');
+
+// Version history array (add more with , '0.1.0' and so on)
+setExtensionVersionHistory(array('0.0'));
+
+// This extension is in development (non-productive)
+enableExtensionProductive(false);
+
+switch (getExtensionMode()) {
+ case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ // SQL commands to run
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
+
+ case 'update': // Update an extension
+ switch (getCurrentExtensionVersion()) {
+ case '0.0.1': // SQL queries for v0.0.1
+ addExtensionSql('');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes('');
+ break;
+ } // END - switch
+ break;
+
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
+
+ case 'init': // Do stuff when extension is initialized
+ break;
+
+ default: // Unknown extension mode
+ logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+ break;
+} // END - switch
+
+// [EOF]
+?>
// Handles fatal errors
function FILTER_HANDLE_FATAL_ERRORS () {
// Do we have errors to handle and right output mode?
- if ((getTotalFatalErrors() == '0') || (getOutputMode() != 0)) {
+ if ((!ifFatalErrorsDetected()) || (getOutputMode() != '0')) {
// Abort executing here
return false;
} // END - if
if (empty($mysql['host'])) $mysql['host'] = 'localhost';
if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange';
if (empty($mysql['type'])) $mysql['type'] = 'MyISAM';
- if (getTotalFatalErrors() > 0) {
+ if (ifFatalErrorsDetected()) {
addToInstallContent('<div class="install_fatal">');
foreach (getFatalArray() as $key => $err) {
addToInstallContent('<div class="para"><strong>·</strong> {--FATAL_NO--}' . ($key + 1) . ': ' . $err . '</div>');
addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS'));
} // END - if
- if (getTotalFatalErrors() == '0') {
+ if (!ifFatalErrorsDetected()k) {
// Set type and prefix from POST data
setConfigEntry('_TABLE_TYPE' , postRequestParameter('mysql', 'type'));
setConfigEntry('_MYSQL_PREFIX', postRequestParameter('mysql', 'prefix'));
//* DEBUG: */ die('<pre>'.print_r(getSqls(), true).'</pre>');
// Are some SQLs found?
- if (countSqls() == '0') {
+ if (countSqls() == 0) {
// Abort here
addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED'));
return;
} // END - if
} // END - if
- if (getTotalFatalErrors() > 0) {
+ if (ifFatalErrorsDetected()) {
$OUT = '';
foreach (getFatalArray() as $value) {
$OUT .= ' <li>' . $value . '</li>';
// Check which admin shall receive this mail
$result = SQL_QUERY_ESC("SELECT `admin_id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `admin_id` ASC",
array($template), __FUNCTION__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Create new entry (to all admins)
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`, `mail_template`) VALUES (0, '%s')",
array($template), __FUNCTION__, __LINE__);
$result = SQL_QUERY("SELECT `points` FROM `{?_MYSQL_PREFIX?}_jackpot` WHERE `ok`='ok' LIMIT 1", __FUNCTION__, __LINE__);
// Do we have an entry?
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// No, so create line
SQL_QUERY("INSERT INTO `{?_MYSQL_PREFIX?}_jackpot` (`ok`, `points`) VALUES ('ok','0.00000')", __FUNCTION__, __LINE__);
} else {
// First check if it does exist
$result_media = SQL_QUERY_ESC("SELECT media_key FROM `{?_MYSQL_PREFIX?}_mediadata`
WHERE media_key = '%s' LIMIT 1", array($key), __FUNCTION__, __LINE__);
- if (SQL_NUMROWS($result_media) == '0') {
+ if (SQL_NUMROWS($result_media) == 0) {
// Not found so we create it (mode will be ignored here!)
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_mediadata` (media_key, media_value) VALUES ('%s', '%s')",
array($key, $value), __FUNCTION__, __LINE__);
// Check if line is already included...
$result_ref = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `rallye_id`=%s AND `userid`=%s LIMIT 1",
array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__);
- if (SQL_NUMROWS($result_ref) == '0') {
+ if (SQL_NUMROWS($result_ref) == 0) {
// Free memory
SQL_FREERESULT($result_ref);
// Do we have no entry?
//* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!<br />");
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Insert this level
//* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - ADD!<br />");
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)",
// Do we have no entry?
//* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level=".($GLOBALS['refback_level']-$minus).",ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},numRows=".SQL_NUMROWS($result)." - BACK!<br />");
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Insert this level
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)",
array(bigintval($userid), ($GLOBALS['refback_level']-$minus), bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__);
$dummy = getArrayFromUserRefbackData($id);
// Is this valid?
- if (count($dummy) == '0') {
+ if (count($dummy) == 0) {
// id does not belong to user!
$status['message'] = getMessage('MEMBER_REFBACK_ERROR_ID_MISMATCH');
return $status;
// @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`=0 LIMIT 1",
array($userid), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Add only when the line was not found (maybe some more secure?)
$locked = 'points';
} elseif (!is_array($IDs)) {
// No array
return false;
- } elseif (count($IDs) == '0') {
+ } elseif (count($IDs) == 0) {
// Empty array
return false;
}
} elseif (!is_array($IDs)) {
// No array
return false;
- } elseif (count($IDs) == '0') {
+ } elseif (count($IDs) == 0) {
// Empty array
return false;
}
} // END - if
// Look up the record
- $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, views_max, views_allowed, status, registered, last_locked, lock_reason, views_max, views_allowed, fixed_reload
-FROM `{?_MYSQL_PREFIX?}_surfbar_urls`
-WHERE %s='%s'".$add."
-ORDER BY %s %s
+ $result = SQL_QUERY_ESC("SELECT
+ `id`, `userid`, `url`,
+ `views_total`, `views_max`, `views_allowed`, `status`,
+ UNIX_TIMESTAMP(`registered`) AS `registered`, UNIX_TIMESTAMP(`last_locked`) AS `last_locked`, `lock_reason`,
+ `views_max`, `views_allowed`, `fixed_reload`
+FROM
+ `{?_MYSQL_PREFIX?}_surfbar_urls`
+WHERE
+ `%s`='%s'".$add."
+ORDER BY
+ `%s` %s
%s",
- array($column, $searchTerm, $order, $sort, $limit), __FUNCTION__, __LINE__);
+ array(
+ $column,
+ $searchTerm,
+ $order,
+ $sort,
+ $limit
+ ), __FUNCTION__, __LINE__);
// Is there at least one record?
if (SQL_NUMROWS($result) > 0) {
// Just run the insert query for now
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_urls` (userid,url,status,views_max,views_allowed,fixed_reload) VALUES (%s,'%s','%s',%s,%s,%s)",
- array(
- $userid,
- $urlData['url'],
- $urlData['status'],
- $urlData['limit'],
- $urlData['limit'],
- $urlData['reload']
- ), __FUNCTION__, __LINE__
+ array(
+ $userid,
+ $urlData['url'],
+ $urlData['status'],
+ $urlData['limit'],
+ $urlData['limit'],
+ $urlData['reload']
+ ), __FUNCTION__, __LINE__
);
// Return insert id
$userids = SURFBAR_DETERMINE_DEPLETED_USERIDS();
// If we dont get any user ids back, there are no URLs
- if (count($userids['userid']) == '0') {
+ if (count($userids['userid']) == 0) {
// No user ids found, no URLs!
return 0;
} // END - if
$newStatus = strtolower($newStatus);
// Get URL data for status comparison if missing
- if ((!is_array($data)) || (count($data) == '0')) {
+ if ((!is_array($data)) || (count($data) == 0)) {
// Fetch missing URL data
$data = SURFBAR_GET_URL_DATA($urlId);
} // END - if
$errorCode = YOOMEDIA_GET_ERRORCODE_FROM_RESULT($response);
// Log the response if failed
- if (count($response) == '0') {
+ if (count($response) == 0) {
// Queries depleted (as we count here!)
logDebugMessage(__FUNCTION__, __LINE__, 'Requested depleted. Maxmimum was: ' . getConfig('yoomedia_requests_total'));
$errorCode = -1;
array($adminLogin), __FUNCTION__, __LINE__);
// Is the entry there?
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Ok, let's create the admin login
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins` (`login`, `password`, `email`) VALUES ('%s', '%s', '%s')",
array(
array($email), __FUNCTION__, __LINE__);
// Is there an account?
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// No account found!
return getMessage('ADMIN_NO_LOGIN_WITH_EMAIL');
} // END - if
$result = SQL_QUERY_ESC("SELECT id, admin_id FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE (start_time <= %s AND end_time >= %s) OR (start_time >= %s AND start_time <= %s) LIMIT 1",
array($START, $START, $START, $END), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Ok, start and end time did not overlap
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_data` (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify)
VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')",
// Main or sub menu selected
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE admin_id=%s AND action_menu='%s' AND what_menu='%s' LIMIT 1",
array(bigintval(postRequestParameter('admin_id')), postRequestParameter('action_menu'), postRequestParameter('what_menu')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Finally add the new ACL
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_acls` (admin_id, action_menu, what_menu, access_mode)
VALUES ('%s','%s','%s','%s')",
// Add a new category
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `cat`='%s' LIMIT 1",
array(postRequestParameter('catname')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Category does not exists, we simply add it...
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_cats` (`cat`, `visible`, `sort`) VALUES ('%s','%s','%s')",
array(
// Save all settings
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='%s' LIMIT 1",
array(bigintval(postRequestParameter('max'))), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Add this value (including comment)
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES ('%s','%s')",
array(bigintval(postRequestParameter('max')), postRequestParameter('comment')),__FILE__, __LINE__);
loadTemplate('admin_settings_saved', false, getMessage('MODS_CHANGED'));
}
-if (countPostSelection() == '0') {
+if (countPostSelection() == 0) {
// Load module data (We do not need to check if there's at least one...)
$result = SQL_QUERY('SELECT id, module, locked, hidden, admin_only, title, mem_only
FROM `{?_MYSQL_PREFIX?}_mod_reg`
// Add new payout type
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE type='%s' LIMIT 1",
array(postRequestParameter('title')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Add now
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_payout_types`
(type, rate, min_points, from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url)
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s AND `price_level`='%s' LIMIT 1",
array(bigintval(getRequestParameter('rallye')), bigintval(postRequestParameter('level'))), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Ok, new price level entered!
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_prices` (rallye_id, price_level, points, info)
VALUES ('%s','%s','%s','%s')",
// ... so we can finally register and load it in registration mode
if (registerExtension($ext_name, $ext_id)) {
// Errors?
- if (getTotalFatalErrors() == '0') {
+ if (!ifFatalErrorsDetected()) {
// Extension was found and successfully registered
loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_REGISTERED', $ext_name));
// Check if country code does already exist
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_countries` WHERE code='%s' LIMIT 1",
array(strtoupper(postRequestParameter('code'))), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Save entry
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (code, descr, is_active) VALUES ('%s','%s','%s')",
array(
if (isPostRequestParameterSet('add')) {
// Check input variables
if (!isPostRequestParameterSet('pay_name')) unsetPostRequestParameter('add');
- if ((round(postRequestParameter('pay_rate')) == '0') || (!isPostRequestParameterSet('pay_rate'))) unsetPostRequestParameter('add');
+ if ((round(postRequestParameter('pay_rate')) == 0) || (!isPostRequestParameterSet('pay_rate'))) unsetPostRequestParameter('add');
setPostRequestParameter('pay_min_count', bigintval(postRequestParameter('pay_min_count')));
// Check if entry with same name does exists
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `pay_name`='%s' LIMIT 1",
array(postRequestParameter('pay_name')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// No entry found so add this line
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')",
array(
$show = true;
// Check for 'id' element
-if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('id')) || (!is_array(postRequestParameter('id'))) || (count(postRequestParameter('id')) == '0'))) {
+if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('id')) || (!is_array(postRequestParameter('id'))) || (count(postRequestParameter('id')) == 0))) {
// Not found so output message
loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS'));
$result = YOOMEDIA_GET_PARSED_RESULT_TEXTMAILS();
// Sanity-check on result array
-if ((!is_array($result)) || (count($result) == '0') || (!isset($result[0]['id']))) {
+if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) {
// Invalid result
loadTemplate('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_INVALID_RESULT'));
return false;
$OPT = getMessage('OPTIMIZE_STATUS_OPTIMIZED');
$B1 = '<strong>'; $B2 = '<strong>';
$gain_tabs++;
- } elseif (count(explode(' ', $row_array[2])) == '0') {
+ } elseif (count(explode(' ', $row_array[2])) == 0) {
$OPT = getMessage('OPTIMIZE_STATUS_' . strtoupper($row_array[2]).'');
}
// Check if banner is already added
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE url='%s' LIMIT 1",
array(postRequestParameter('url')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Add banner
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refbanner` (url, alternate, visible)
VALUES ('%s','%s','%s')",
// Lookup in blacklist
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1",
array($url), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Did not find a record so we can add it... :)
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_url_blacklist` (`url`,`pool_id`) VALUES ('%s',%s)",
array($url, $id), __FILE__, __LINE__);
// Was an URL constructed?
if (!empty($URL)) {
// URL was constructed
- if (getTotalFatalErrors() > 0) {
+ if (ifFatalErrorsDetected()) {
// Handle fatal errors
runFilterChain('handle_fatal_errors');
} else {
if (count($FORM_ERRORS) > 0) unsetPostRequestParameter('ok');
}
-if ((isFormSent()) && (count($FORM_ERRORS) == '0')) {
+if ((isFormSent()) && (count($FORM_ERRORS) == 0)) {
// Generate message array
$messageArray = array(
'failed' => getMessage('SPONSOR_REGISTRATION_FAILED'),
$result_user = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1",
array(getMemberId(), bigintval($cat)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result_user) == '0') {
+ if (!SQL_HASZERONUMS($result_user)) {
$sql = "INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (userid, cat_id) VALUES ('%s','%s')";
} // END - if
// Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !)
$result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != '%s' LIMIT 1",
array(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// Nickname not in use, so set it now
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `nickname`='%s' WHERE `userid`=%s LIMIT 1",
array(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__);
$percents = convertCommaToDot(postRequestParameter('percents'));
// Validate percents
- if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == '0')) && ($percents <= getConfig('refback_max_perc'))) {
+ if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == 0)) && ($percents <= getConfig('refback_max_perc'))) {
// Change ref-back for this direct id
$status = updateMemberRefbackPercents(postRequestParameter('id'), postRequestParameter('percents'));
if (empty($data['title'])) {
// No name found
$data['title'] = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $module);
- if (SQL_NUMROWS($result) == '0') {
+ if ((is_resource($result)) && (SQL_HASZERONUMS($result))) {
// Add module to database
$dummy = checkModulePermissions($module);
} // END - if
array($rowName, $stats_id, bigintval($userid), $type), __FUNCTION__, __LINE__);
// Was it *not* found?
- if (SQL_NUMROWS($result) == '0') {
+ if (SQL_HASZERONUMS($result)) {
// So we add one!
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_links` (`%s`, `userid`, `link_type`) VALUES ('%s','%s','%s')",
array($rowName, $stats_id, bigintval($userid), $type), __FUNCTION__, __LINE__);
} // END - if
// Do we have send maximum mails?
- if (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || (countSelection($dummy) == '0')) {
+ if (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || (countSelection($dummy) == 0)) {
// Yes, we have
//* DEBUG: */ print("*EXIT/L:".__LINE__."<br />");
break;
// Close sending system
//* DEBUG: */ print("-L:".__LINE__.'/'.countSelection($dummy)."-<br />");
- if (countSelection($dummy) == '0') {
+ if (countSelection($dummy) == 0) {
// Queue reached!
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='SEND', `target_send`=0, `receivers`='' WHERE `id`=%s LIMIT 1",
array(bigintval($DATA['id'])), __FILE__, __LINE__);
// If there's no stats entry add it!
//* DEBUG: */ outputHtml("!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />");
- if (SQL_NUMROWS($result_stats) == '0') {
+ if (SQL_NUMROWS($result_stats) == 0) {
// No entry was found, so we add him!
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats` (`pool_id` , `userid`, `cat_id`, `payment_id`, `subject`, `url` , `max_rec` , `timestamp_ordered`, `timestamp_sstart`) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
array(bigintval($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['cat_id']), bigintval($DATA['payment_id']), $DATA['subject'], $DATA['url'], $DATA['target_send'], bigintval($DATA['timestamp'])), __FILE__, __LINE__);
return (isInString(strtolower($needle), strtolower($haystack)));
}
+// Wrapper to check for if fatal errors where detected
+function ifFatalErrorsDetected () {
+ // Just call the inner function
+ return (getTotalFatalErrors() > 0);
+}
+
// [EOF]
?>
if (isGetRequestParameterSet('bonusid')) $url_bid = bigintval(getRequestParameter('bonusid'));
// 01 1 12 2 2 21 1 22 10
-if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) {
+if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (!ifFatalErrorsDetected())) {
// Init result
$result_link = false;
if (isGetRequestParameterSet('mode')) $mode = getRequestParameter('mode');
// 01 1 12 2 2 21 1 22 10
-if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) {
+if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (!ifFatalErrorsDetected())) {
// No image? Then output header
if ($mode != 'img') loadIncludeOnce('inc/header.php');
if ((isExtensionActive('maintenance')) && (getConfig('maintenance') == 'Y') && (!isAdmin()) && (getModule() != 'admin')) {
// Maintain mode is active and you are no admin
addFatalMessage(__FILE__, __LINE__, getMessage('LANG_DOWN_MAINTAINCE'));
-} elseif ((SQL_IS_LINK_UP()) && (getTotalFatalErrors() == '0')) {
+} elseif ((SQL_IS_LINK_UP()) && (!ifFatalErrorsDetected())) {
// Construct module name
$GLOBALS['module_inc'] = sprintf("inc/modules/%s.php", getModule());
case 'mem_only': // Member-only access
case 'done': // All fine!
// Does the module exists on local file system?
- if ((isIncludeReadable($GLOBALS['module_inc'])) && (getTotalFatalErrors() == '0')) {
+ if ((isIncludeReadable($GLOBALS['module_inc'])) && (!ifFatalErrorsDetected())) {
// Module is valid, active and located on the local disc...
$isModuleValid = true;
- } elseif (getTotalFatalErrors() == '0') {
+ } elseif (!ifFatalErrorsDetected()) {
// Module not found!
addFatalMessage(__FILE__, __LINE__, getMaskedMessage('LANG_MOD_REG_404', getModule()));
}
addFatalMessage(__FILE__, __LINE__, getMaskedMessage('LANG_MOD_REG_UNKNOWN', $check));
break;
} // END - switch
-} elseif (getTotalFatalErrors() == '0') {
+} elseif (!ifFatalErrorsDetected()) {
// MySQL problems!
addFatalMessage(__FILE__, __LINE__, getMessage('MYSQL_ERRORS'));
}
--- /dev/null
+<div class="para">
+Lassen Sie das Script automatisiert Bug-Mails an mich schicken! Was Sie dazu
+brauchen ist noch nicht mal ein API-Key oder dergleichen. Installieren Sie
+dazu einfach diese Erweiterung und die Mails gehen in Kopie an mich raus.
+Sollten Sie diese Funktionalität nicht mehr wünschen, so deaktivieren
+Sie einfach die Erweiterung. Alternativ können Sie diese auch einfach
+wieder deinstallieren.
+</div>
+
+<div class="para">
+<strong>Wichtig:</strong> Es werden dabei (fast) keine Daten Ihrer Mitglieder
+oder von Ihren Administratorenaccounts gesendet! Es werden die
+Browserbezeichnung und die IP-Adresse sowie den Bug-Report selbst an mich
+geschickt. Sie können dies allerdings verhindern, in dem Sie es einfach im
+Adminbereich abschalten, dann wird ein Bindestrich als Browserbezeichnung bzw.
+0.0.0.0 als IP an mich gesendet.
+</div>
+
+<div class="para">
+Die Daten aus den Bugs werden stets vertraulich behandelt und unterliegen den
+aktuellen Datenschutzgesetzen. Es erfolgt ausnahmelos keine Weitergabe oder
+Weiterleitung in jeglicher Form an Dritte.
+</div>
+