templates/de/html/guest/guest_sponsor_login.tpl -text svneol=unset#text/plain
templates/de/html/guest/guest_sponsor_lost.tpl -text svneol=unset#text/plain
templates/de/html/guest/guest_sponsor_pay_row.tpl -text svneol=unset#text/plain
+templates/de/html/guest/guest_sponsor_payment.tpl svneol=native#text/plain
templates/de/html/guest/guest_sponsor_payment_row.tpl -text svneol=unset#text/plain
templates/de/html/guest/guest_sponsor_reg.tpl -text svneol=unset#text/plain
templates/de/html/guest/guest_stats_cats_row.tpl -text svneol=unset#text/plain
templates/de/html/menu/menu_guest_advert_main.tpl -text svneol=unset#text/plain
templates/de/html/menu/menu_guest_advert_members.tpl -text svneol=unset#text/plain
templates/de/html/menu/menu_guest_advert_online.tpl -text svneol=unset#text/plain
+templates/de/html/menu/menu_guest_advert_sponsor.tpl -text svneol=unset#text/plain
templates/de/html/menu/menu_member_advert_account.tpl -text svneol=unset#text/plain
templates/de/html/menu/menu_member_advert_bank.tpl -text svneol=unset#text/plain
templates/de/html/menu/menu_member_advert_end.tpl -text svneol=unset#text/plain
./inc/modules/admin/what-del_email.php:61: // @TODO Unused: cat_id, payment_id
./inc/modules/admin/what-edit_user.php:20: * @TODO Add support for ext-country *
./inc/modules/admin/what-email_stats.php:48:// @TODO Unused at the moment
-./inc/modules/admin/what-extensions.php:364: // @TODO Rewrite this to a filter
+./inc/modules/admin/what-extensions.php:368: // @TODO Rewrite this to a filter
./inc/modules/admin/what-guest_add.php:131: // @TODO This can be somehow rewritten to a function
./inc/modules/admin/what-guest_add.php:69: // @TODO Cant this be rewritten?
./inc/modules/admin/what-guest_add.php:82: // @TODO This can be somehow rewritten to a function
./inc/modules/guest/what-mediadata.php:183:// @TODO Rewrite all these if-blocks to filters
./inc/modules/guest/what-mediadata.php:70: // @TODO Find a better formular than this one
./inc/modules/guest/what-rallyes.php:91: // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&what=impressum&admin=' . $adminId . '%}">' . $login . '</a>';
-./inc/modules/guest/what-sponsor_reg.php:290: // @TODO Swap this HTML code to templates
./inc/modules/guest/what-stats.php:116: // @TODO This can be somehow rewritten
./inc/modules/guest/what-stats.php:76:// @TODO This can be rewritten in a dynamic include
./inc/modules/member/what-beg.php:56:// @TODO Can't this be moved into EL?
setPostRequestParameter('points', bigintval(postRequestParameter('points')));
// Begin with doubling process
- if ((isPostRequestParameterSet('userid')) && (isPostRequestParameterSet('pass')) && (isPostRequestParameterSet('points'))) {
+ if ((isPostRequestParameterSet('userid')) && (isPostRequestParameterSet('password')) && (isPostRequestParameterSet('points'))) {
// Probe for nickname extension and if a nickname was entered
if (isNickNameUsed(postRequestParameter('userid'))) {
// Nickname in URL, so load the id
$probe_points = ((postRequestParameter('points') >= getConfig('doubler_min')) && (postRequestParameter('points') <= getConfig('doubler_max')));
// Check all together
- if ((isUserDataValid()) && (getUserData('password') == generateHash(postRequestParameter('pass'), substr(getUserData('password'), 0, -40))) && (getUserData('status') == 'CONFIRMED') && ($probe_points)) {
+ if ((isUserDataValid()) && (getUserData('password') == generateHash(postRequestParameter('password'), substr(getUserData('password'), 0, -40))) && (getUserData('status') == 'CONFIRMED') && ($probe_points)) {
// Nickname resolved to a unique userid or direct userid entered by the member
$GLOBALS['local_doubler_userid'] = getUserData('userid');
} elseif (!isPostRequestParameterSet('userid')) {
// Login not entered
$content['message'] = '{--DOUBLER_FORM_404_LOGIN--}';
- } elseif (!isPostRequestParameterSet('pass')) {
+ } elseif (!isPostRequestParameterSet('password')) {
// Password not entered
$content['message'] = '{--DOUBLER_FORM_404_PASSWORD--}';
} elseif (!isPostRequestParameterSet('points')) {
case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
- addExtensionSql('');
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='mediadata' LIMIT 1");
break;
case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
- addExtensionSql('');
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='mediadata' LIMIT 1");
break;
case 'update': // Update an extension
case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
- addExtensionSql('');
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='mydata' LIMIT 1");
break;
case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
- addExtensionSql('');
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='mydata' LIMIT 1");
break;
case 'update': // Update an extension
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
break;
- }
+ } // END - switch
break;
case 'modify': // When the extension got modified
default: // Unknown extension mode
logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
break;
-}
+} // END - switch
// [EOF]
?>
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `refback_enabled` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `refback_min_perc` TINYINT(3) NOT NULL DEFAULT 0");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `refback_max_perc` TINYINT(3) NOT NULL DEFAULT 100");
- addAdminMenuSql('setup','config_refback','Refback','Ändern Sie Einstellungen zum Refback, wie z.B. Minium- und Maximum-Prozente, was die Mitglieder einstellen dürfen.',15);
+ addAdminMenuSql('setup','config_refback','Refback','Ändern Sie Einstellungen zum Refback, wie z.B. Minimum- und Maximum-Prozente, was die Mitglieder einstellen dürfen.',15);
addAdminMenuSql('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15);
// Update notes (these will be set as task text!)
case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor' LIMIT 4");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor'");
addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='sponsor' LIMIT 1");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_menu` SET active='Y' WHERE active='N'");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_registry` SET is_active='Y' WHERE is_active='N'");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_menu` SET `active`='Y' WHERE active='N'");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_registry` SET `is_active`='Y' WHERE `is_active`='N'");
break;
case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor' LIMIT 4");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor'");
addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='sponsor' LIMIT 1");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_menu` SET active='N' WHERE active='Y'");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_registry` SET is_active='N' WHERE is_active='Y'");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_menu` SET `active`='N' WHERE `active`='Y'");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_registry` SET `is_active`='N' WHERE `is_active`='Y'");
break;
case 'update': // Update an extension
if (empty($GLOBALS['install_mysql']['prefix'])) $GLOBALS['install_mysql']['prefix'] = 'mxchange';
if (empty($GLOBALS['install_mysql']['type'])) $GLOBALS['install_mysql']['type'] = 'MyISAM';
if (ifFatalErrorsDetected()) {
- addToInstallContent('<div class="install_fatal">');
+ addToInstallContent('<div class="install_fatal"><ul>');
foreach (getFatalArray() as $key => $err) {
- addToInstallContent('<div class="para"><strong>·</strong> {--FATAL_NO--}' . ($key + 1) . ': ' . $err . '</div>');
+ addToInstallContent('<li> {--FATAL_NO--}' . ($key + 1) . ': ' . $err . '</li>');
} // END - foreach
- addToInstallContent('</div>');
+ addToInstallContent('</ol></div>');
} // END - if
+
$content['mysql_host'] = $GLOBALS['install_mysql']['host'];
$content['mysql_dbase'] = $GLOBALS['install_mysql']['dbase'];
$content['mysql_prefix'] = $GLOBALS['install_mysql']['prefix'];
'ADMIN_PAYOUT_NO_MEMBER_REQUESTS' => "Keine Auszahlungsanfragen von Ihren Mitgliedern erhalten.",
'ADMIN_PAYOUT_ENTRIES_CHANGED' => "Einträge wurden geändert.",
'ADMIN_PAYOUT_ENTRIES_DELETED' => "Einträge wurden gelölscht.",
- 'ADMIN_PAYOUT_MIN_POINTS' => "Minium {?POINTS?}-Guthaben",
+ 'ADMIN_PAYOUT_MIN_POINTS' => "Minimum {?POINTS?}-Guthaben",
'ADMIN_PAYOUT_MIN_POINTS2' => "Min. {?POINTS?}",
'ADMIN_PAYOUT_YOUR_ACCOUNT' => "Ihre Account-Id",
'ADMIN_PAYOUT_YOUR_PASSWORD' => "Passwort",
'SPONSOR_PAYTYPE_NAME_HINT' => "(max. 255 Zeichen)",
'SPONSOR_PAYTYPE_RATE' => "Umrechnungsrate",
'SPONSOR_PAYTYPE_RATE_HINT' => "(z.B. 1 € = x {?POINTS?})",
- 'SPONSOR_PAYTYPE_MIN_COUNT' => "Bestellmenge",
+ 'SPONSOR_PAYTYPE_MIN_COUNT' => "Minimum Bestellmenge",
'SPONSOR_PAYTYPE_CURRENCY' => "Währung",
'SPONSOR_ADD_PAYTYPES_NOTES' => "Hinweise zu den Buchungspaketen",
'SPONSOR_PAYTYPE_NAME_NOTE' => "Geben Sie eine passende Bezeichnung zum Buchungspaket ein (z.B. <strong>Spar-Paket</strong>)",
'ADMIN_SPONSOR_PAYTYPE_ALREADY' => "Buchungspaket <span class=\"data\">%s</span> bereits eingerichtet.",
'ADMIN_SPONSOR_PAYTYPE_ADDED' => "Buchungspaket <span class=\"data\">%s</span> hinzugefügt.",
'SPONSOR_LIST_PAYMENT_TYPES_TITLE' => "Buchungspakete auflisten, bearbeiten und löschen",
- 'SPONSOR_PAYTYPE_MIN_COUNT2' => "Minium",
+ 'SPONSOR_PAYTYPE_MIN_COUNT2' => "Minimum",
'ADMIN_SPONSOR_PAYTYPE_EDIT' => "Bearbeiten",
'ADMIN_SPONSOR_PAYTYPE_DELETE' => "Löschen",
'SPONSOR_EDIT_PAY_ENTRIES' => "Buchungspakete editieren",
// Prepare data array for the email template
// Start with the gender...
$content = array(
- 'hash' => $hash,
- 'userid' => $userid,
- 'gender' => SQL_ESCAPE(postRequestParameter('gender')),
- 'surname' => SQL_ESCAPE(postRequestParameter('surname')),
- 'family' => SQL_ESCAPE(postRequestParameter('family')),
- 'email' => SQL_ESCAPE(postRequestParameter('email')),
- 'street' => SQL_ESCAPE(postRequestParameter('street_nr')),
- 'city' => SQL_ESCAPE(postRequestParameter('city')),
- 'zip' => bigintval(postRequestParameter('zip')),
- 'country' => $countryData,
- 'refid' => SQL_ESCAPE(postRequestParameter('refid')),
- 'pass' => SQL_ESCAPE(postRequestParameter('pass1')),
+ 'hash' => $hash,
+ 'userid' => $userid,
+ 'gender' => SQL_ESCAPE(postRequestParameter('gender')),
+ 'surname' => SQL_ESCAPE(postRequestParameter('surname')),
+ 'family' => SQL_ESCAPE(postRequestParameter('family')),
+ 'email' => SQL_ESCAPE(postRequestParameter('email')),
+ 'street' => SQL_ESCAPE(postRequestParameter('street_nr')),
+ 'city' => SQL_ESCAPE(postRequestParameter('city')),
+ 'zip' => bigintval(postRequestParameter('zip')),
+ 'country' => $countryData,
+ 'refid' => SQL_ESCAPE(postRequestParameter('refid')),
+ 'password' => SQL_ESCAPE(postRequestParameter('pass1')),
);
} else {
// No ZIP code entered
$content = array(
- 'hash' => $hash,
- 'userid' => $userid,
- 'gender' => SQL_ESCAPE(postRequestParameter('gender')),
- 'surname' => SQL_ESCAPE(postRequestParameter('surname')),
- 'family' => SQL_ESCAPE(postRequestParameter('family')),
- 'email' => SQL_ESCAPE(postRequestParameter('email')),
- 'street' => SQL_ESCAPE(postRequestParameter('street_nr')),
- 'city' => SQL_ESCAPE(postRequestParameter('city')),
- 'zip' => '',
- 'country' => $countryData,
- 'refid' => SQL_ESCAPE(postRequestParameter('refid')),
- 'pass' => SQL_ESCAPE(postRequestParameter('pass1')),
+ 'hash' => $hash,
+ 'userid' => $userid,
+ 'gender' => SQL_ESCAPE(postRequestParameter('gender')),
+ 'surname' => SQL_ESCAPE(postRequestParameter('surname')),
+ 'family' => SQL_ESCAPE(postRequestParameter('family')),
+ 'email' => SQL_ESCAPE(postRequestParameter('email')),
+ 'street' => SQL_ESCAPE(postRequestParameter('street_nr')),
+ 'city' => SQL_ESCAPE(postRequestParameter('city')),
+ 'zip' => '',
+ 'country' => $countryData,
+ 'refid' => SQL_ESCAPE(postRequestParameter('refid')),
+ 'password' => SQL_ESCAPE(postRequestParameter('pass1')),
);
}
}
//
-function handlSponsorRequest (&$postData, $update=false, $messageArray=array(), $RET_STATUS=false) {
+function handleSponsorRequest ($postData, $update=false, $messageArray=array(), $RET_STATUS=false) {
// Init a lot variables
$SAVE = true;
$UPDATE = false;
//
function sponsorTranslateUserStatus ($status) {
// Construct constant name
- $constantName = sprintf("ACCOUNT_%s", $status);
+ $constantName = sprintf("ACCOUNT_STATUS_%s", $status);
// Is the constant there?
- if (defined($constantName)) {
+ if (isMessageIdValid($constantName)) {
// Then use it
- $ret = constant($constantName);
+ $ret = getMessage($constantName);
} else {
// Not found!
logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
- $ret = getMaskedMessage('UNKNOWN_STATUS', $status);
+ $ret = getMaskedMessage('ACCOUNT_STATUS_UNKNOWN_STATUS', $status);
}
return $ret;
}
} // END - if
// Check if the admin has submitted data or not
- if ((isFormSent()) && ((!isPostRequestParameterSet('login')) || (!isPostRequestParameterSet('pass')) || (strlen(postRequestParameter('pass')) < 4))) {
+ if ((isFormSent()) && ((!isPostRequestParameterSet('login')) || (!isPostRequestParameterSet('password')) || (strlen(postRequestParameter('password')) < 4))) {
setPostRequestParameter('ok', '***');
} // END - if
if ((isFormSent()) && (postRequestParameter('ok') != '***')) {
// All required data was entered so we check his account
- $ret = ifAdminLoginDataIsValid(postRequestParameter('login'), postRequestParameter('pass'));
+ $ret = ifAdminLoginDataIsValid(postRequestParameter('login'), postRequestParameter('password'));
// Which status do we have?
switch ($ret) {
destroyAdminSession();
break;
- case 'pass': // Wrong password
+ case 'password': // Wrong password
setPostRequestParameter('ok', $ret);
$ret = '{--WRONG_PASS--} [<a href="{%url=modules.php?module=admin&reset_pass=1%}">{--ADMIN_RESET_PASS--}</a>]';
destroyAdminSession();
if ((!empty($ret)) && (postRequestParameter('ok') == '404')) $loginMessage = $ret;
// No password entered?
- if (!isPostRequestParameterSet('pass')) $passwdMessage = '{--ADMIN_NO_PASS--}';
+ if (!isPostRequestParameterSet('password')) $passwdMessage = '{--ADMIN_NO_PASS--}';
// Or password too short?
- if (strlen(postRequestParameter('pass')) < 4) $passwdMessage = '{--ADMIN_SHORT_PASS--}';
+ if (strlen(postRequestParameter('password')) < 4) $passwdMessage = '{--ADMIN_SHORT_PASS--}';
// An error comes back from login?
- if ((!empty($ret)) && (postRequestParameter('ok') == 'pass')) $passwdMessage = $ret;
+ if ((!empty($ret)) && (postRequestParameter('ok') == 'password')) $passwdMessage = $ret;
// Load message template
$content['login_message'] = loadTemplate('admin_login_msg', true, $loginMessage);
destroyAdminSession();
break;
- case 'pass': // Wrong password
+ case 'password': // Wrong password
setPostRequestParameter('ok', $ret);
loadTemplate('admin_settings_saved', false, '{--WRONG_PASS--}');
destroyAdminSession();
$ret = 'done';
} else {
// Set status
- $ret = 'pass';
+ $ret = 'password';
}
} // END - if
} // END - if
$ret = 'done';
} else {
// Set status
- $ret = 'pass';
+ $ret = 'password';
}
} // END - if
// Some security stuff...
if ((!defined('__SECURITY')) || (!isAdmin())) {
die();
-}
+} // END - if
// Add description as navigation point
addMenuDescription('admin', __FILE__);
if (isFormSent()) {
// Save sponsor in database
- handlSponsorRequest(postRequestArray());
+ handleSponsorRequest(postRequestArray());
} else {
// Output form
loadTemplate('admin_add_sponsor');
mergeConfig(postRequestArray());
// Is the password set?
- if (isPostRequestParameterSet('pass')) {
+ if (isPostRequestParameterSet('password')) {
// Then hash and remove it
- setPostRequestParameter('primera_api_md5', md5(postRequestParameter('pass')));
- unsetPostRequestParameter('pass');
+ setPostRequestParameter('primera_api_md5', md5(postRequestParameter('password')));
+ unsetPostRequestParameter('password');
} // END - if
// Let's test the API first (hold your horses here, cowboy! Thank you. :) )
convertSelectionsToTimestamp(postRequestArray(), $DATA, $id, $skip);
// Save the sponsor
- handlSponsorRequest(postRequestArray());
+ handleSponsorRequest(postRequestArray());
// Convert some data for the email template
postRequestParameter('gender' , translateGender(postRequestParameter('gender')));
// The id comes from task management and it is - of course - *not* the extension's name!
} elseif ((isFormSent('change')) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// De-/activate extensions
- foreach (postRequestParameter('sel') as $taskId => $active) {
+ foreach (postRequestParameter('sel') as $taskId => $ext_active) {
// Shall we keep the extension always active?
- if ((isset($GLOBALS['cache_array']['always_active'][getExtensionName($taskId)])) && ($GLOBALS['cache_array']['always_active'][getExtensionName($taskId)] == 'Y') && ($active == 'Y')) {
+ if ((isset($GLOBALS['cache_array']['always_active'][getExtensionName($taskId)])) && ($GLOBALS['cache_array']['always_active'][getExtensionName($taskId)] == 'Y') && ($ext_active == 'Y')) {
// Keep this extension active!
loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_ALWAYS_ACTIVE', getExtensionName($taskId)));
} else {
- // De/activate extension
- $active = 'N'; setExtensionMode('deactivate');
- if ($active != 'Y') {
+ // Deactivation is default
+ $active = 'N';
+ setExtensionMode('deactivate');
+
+ // Is the extension deactivated?
+ if ($ext_active != 'Y') {
+ // Then we can activate it
$active = 'Y';
setExtensionMode('activate');
} // END - if
// Update database
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s AND `ext_active`='%s' LIMIT 1",
- array($active, bigintval($taskId), $active), __FILE__, __LINE__);
+ array($active, bigintval($taskId), $ext_active), __FILE__, __LINE__);
// Run embeded SQL commands
doExtensionSqls($taskId, getExtensionMode());
if (SQL_NUMROWS($result) == 1) {
// Load sponsor details
$content = SQL_FETCHARRAY($result);
- SQL_FREERESULT($result);
// Check if an entry is empty
foreach ($content as $k => $v) {
- if (empty($v)) $content[$k] = '---';
+ if ((empty($v)) && ($v != 0)) $content[$k] = '---';
} // END - foreach
// Prepare all data for the template
// Sponsor not found
loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id'))));
}
+
+ // Free result
+ SQL_FREERESULT($result);
} elseif (isGetRequestParameterSet('refid')) {
// Search for sponsor
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1",
$OUT = '';
while ($content = SQL_FETCHARRAY($result_main)) {
// Transfer data to array
- $content = array(
- 'id' => $content['id'],
- 'gender' => $content['gender'],
- 'surname' => $content['surname'],
- 'family' => $content['family'],
- 'email' => generateEmailLink($content['email'], 'sponsor_data'),
- 'status' => $content['status'],
- 'sponsor_created' => generateDateTime($content['sponsor_created'], 2),
- 'last_online' => generateDateTime($content['last_online'], 2),
- 'points' => ($content['points_amount'] - $content['points_used']),
- 'remote_addr' => $content['remote_addr'],
- );
+ $content['email'] = generateEmailLink($content['email'], 'sponsor_data');
+ $content['sponsor_created'] = generateDateTime($content['sponsor_created'], 2);
+ $content['last_online'] = generateDateTime($content['last_online'], 2);
+ $content['points'] = ($content['points_amount'] - $content['points_used']);
// Load row template
$OUT .= loadTemplate('admin_list_sponsor_row', true, $content);
} // END - if
} // END - if
- // Transfer data to array
- $content['points'] = translateComma($content['points_amount']);
-
// So let's send the email away
$message = loadEmailTemplate('sponsor_unlocked', $content);
sendEmail($content['email'], '{--SPONSOR_UNLOCKED_SUBJECT--}', $message);
FROM
`{?_MYSQL_PREFIX?}_sponsor_data`
WHERE
- `status`='PENDING'
+ `status`='PENDING' OR `status`='UNCONFIRMED'
ORDER BY
`id`", __FILE__, __LINE__);
} // END - while
} else {
// No pay types setuped so far!
- $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}'));
+ $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', false, loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}'));
}
} else {
// No actions activated so far!
- $OUT_ACT = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}'));
- $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}'));
+ $OUT_ACT = loadTemplate('guest_sponsor_infos_none_row', true, loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}'));
+ $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', true, loadTemplate('admin_settings_saved', true, '{--SPONSOR_NO_ACTIONS_ACTIVATED--}'));
}
// Free memory
}
} elseif (isFormSent()) {
// Check status and login data ...
- $result = SQL_QUERY_ESC("SELECT status FROM `{?_MYSQL_PREFIX?}_sponsor_data`
-WHERE `id`='%s' AND password='%s' LIMIT 1",
- array(bigintval(postRequestParameter('sponsor_id')), md5(postRequestParameter('pass'))), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT
+ `status`
+FROM
+ `{?_MYSQL_PREFIX?}_sponsor_data`
+WHERE
+ `id`=%s AND
+ `password`='%s'
+LIMIT 1",
+ array(
+ bigintval(postRequestParameter('sponsor_id')),
+ md5(postRequestParameter('password'))
+ ), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Okay, first login data check passed, now has he/she an approved (CONFIRMED) account?
if ($status == 'CONFIRMED') {
// Is confirmed so both is fine and we can continue with login procedure
$login = ((setSession('sponsor_id' , bigintval(postRequestParameter('sponsor_id')))) &&
- (setSession('sponsorpass', md5(postRequestParameter('pass')) ))
+ (setSession('sponsorpass', md5(postRequestParameter('password')) ))
);
if ($login === true) {
);
// Calulate points
- $result = SQL_QUERY_ESC("SELECT (`pay_rate` * `pay_min_count`) AS points, `pay_min_count` AS pay, `pay_currency` AS curr
-FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes`
-WHERE `id`='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT
+ (`pay_rate` * `pay_min_count`) AS points, `pay_min_count` AS pay, `pay_currency` AS curr
+FROM
+ `{?_MYSQL_PREFIX?}_sponsor_paytypes`
+WHERE
+ `id`=%s
+LIMIT 1",
array(postRequestParameter('pay_type')), __FILE__, __LINE__);
list($points, $pay, $curr) = SQL_FETCHROW($result);
postRequestParameter('last_curr' , $curr);
// Register sponsor but never ever update here!
- $STATUS = handlSponsorRequest(postRequestArray(), true, $messageArray, true);
+ $STATUS = handleSponsorRequest(postRequestArray(), true, $messageArray, true);
// Check the status of the registration process
switch ($STATUS) {
$content['email'] = secureString(postRequestParameter('email'));
$content['surname'] = secureString(postRequestParameter('surname'));
$content['family'] = secureString(postRequestParameter('family'));
- $content['gender'] = translateGender(postRequestParameter('gender'));
$content['timestamp'] = generateDateTime(time(), 0);
$content['password'] = secureString(postRequestParameter('pass1'));
FROM
`{?_MYSQL_PREFIX?}_sponsor_paytypes`
ORDER BY
- pay_name` ASC', __FILE__, __LINE__);
+ `pay_name` ASC', __FILE__, __LINE__);
if (!SQL_HASZERONUMS($result)) {
// Load all types...
- // @TODO Swap this HTML code to templates
- $OUT = '<table border="0" cellspacing="0" cellpadding="0" width="300" class="left right top">';
+ $OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Prepare content for output
$content['res'] = translateComma($content['pay_rate'] * $content['pay_min_count']);
// Load row template and switch color
- $OUT .= loadTemplate('guest_sponsor_payment_row', false, $content);
+ $OUT .= loadTemplate('guest_sponsor_payment_row', true, $content);
} // END - while
- $OUT .= '</table>';
// Remember the list in table
- $content['payment_list'] = $OUT;
+ $content['payment_list'] = loadTemplate('guest_sponsor_payment', true, $OUT);
// Init a lot array elements
- foreach (array('company','position','tax_ident','gender_m','gender_f','gender_c','surname','family','street_nr1','street_nr2','country','zip','city','phone','fix','cell','email','url','receive_warnings_y','receive_warnings_n','form_errors','refid') as $entry) {
+ foreach (array('company','position','tax_ident','gender_m','gender_f','gender_c','surname','family','street_nr1','street_nr2','country','zip','city','phone','fax','cell','email','url','receive_warnings_y','receive_warnings_n','form_errors','refid') as $entry) {
$content[$entry] = '';
} // END - foreach
// Check for invalid entries
if (count($FORM_ERRORS) > 0) {
// Some found... :-(
- foreach (array('company','position','tax_ident','surname','family','street_nr1','street_nr2','country','zip','city','phone','fix','cell','email','url') as $entry) {
+ foreach (array('company','position','tax_ident','surname','family','street_nr1','street_nr2','country','zip','city','phone','fax','cell','email','url') as $entry) {
$content[$entry] = secureString(postRequestParameter($entry));
} // END - foreach
// Did the user changed the password?
if ($hash != $content['password']) {
$AND = ", `password`='" . $hash . "'";
- $mode = 'pass';
+ $mode = 'password';
} // END - if
// Or did he changed his password?
bigintval(postRequestParameter('account')),
postRequestParameter('bank'),
bigintval(getRequestParameter('payout')),
- postRequestParameter('pass')
+ postRequestParameter('password')
), __FILE__, __LINE__);
// Load templates
} // END - if
// Default message
- $message = getMaskedMessage('EXTENSION_PROBLEM_EXT_INACTIVE', $ext_name);
+ $message = getMaskedMessage('EXTENSION_PROBLEM_EXTENSION_INACTIVE', $ext_name);
// Is an admin logged in?
if (isAdmin()) {
// Then output admin message
- $message = getMaskedMessage('ADMIN_EXTENSION_PROBLEM_EXT_INACTIVE', $ext_name);
+ $message = getMaskedMessage('ADMIN_EXTENSION_PROBLEM_EXTENSION_INACTIVE', $ext_name);
} // END - if
// Return prepared message
$content['message'] = '{--MEMBER_CHANGED_EMAIL--}' . ': ' . postRequestParameter('old_email') . "\n";
break;
- case 'pass': // Password was changed
+ case 'password': // Password was changed
$content['message'] = '{--MEMBER_CHANGED_PASS--}' . "\n";
break;
Email-Adresse: {%user,email=$userid%}
Geburtsdatum: $content[birthday]
-----------------------------------------------
-Ihr Passwort: $content[pass]
+Ihr Passwort: $content[password]
-----------------------------------------------
Geworben von: {%user,refid,bigintval=$userid%}
-----------------------------------------------
</tr>
</table>
</form>
+</div>
- <div class="admin_note tiny">
- <u><strong>{--SPONSOR_ADD_PAYTYPES_NOTES--}:</strong></u><br />
- <br />
- <strong>{--SPONSOR_PAYTYPE_NAME--}:</strong> {--SPONSOR_PAYTYPE_NAME_NOTE--}<br />
- <strong>{--SPONSOR_PAYTYPE_RATE--}:</strong> {--SPONSOR_PAYTYPE_RATE_NOTE--}<br />
- <strong>{--SPONSOR_PAYTYPE_MIN_COUNT--}:</strong> {--SPONSOR_PAYTYPE_MIN_COUNT_NOTE--}<br />
- <strong>{--SPONSOR_PAYTYPE_CURRENCY--}:</strong> {--SPONSOR_PAYTYPE_CURRENCY_NOTE--}<br />
- </div>
+<div class="admin_note tiny" align="left">
+ <div class="para">
+ <u><strong>{--SPONSOR_ADD_PAYTYPES_NOTES--}:</strong></u>
+ </div>
+ <div class="para">
+ <ul>
+ <li><strong>{--SPONSOR_PAYTYPE_NAME--}:</strong> {--SPONSOR_PAYTYPE_NAME_NOTE--}</li>
+ <li><strong>{--SPONSOR_PAYTYPE_RATE--}:</strong> {--SPONSOR_PAYTYPE_RATE_NOTE--}</li>
+ <li><strong>{--SPONSOR_PAYTYPE_MIN_COUNT--}:</strong> {--SPONSOR_PAYTYPE_MIN_COUNT_NOTE--}</li>
+ <li><strong>{--SPONSOR_PAYTYPE_CURRENCY--}:</strong> {--SPONSOR_PAYTYPE_CURRENCY_NOTE--}</li>
+ </ul>
+ </div>
</div>
</tr>
<tr>
<td class="bottom" width="300" align="right">{--ADMIN_PRIMERA_API_MD5--}:</td>
- <td class="bottom" width="270"><input type="password" name="pass"
+ <td class="bottom" width="270"><input type="password" name="password"
class="admin_normal" size="20"
maxlength="255" /><br />
</td>
<a href="$content[email]">{%pipe,translateGender=$content[gender]%} $content[surname] $content[family]</a>
</td>
<td align="center" class="{%template,ColorSwitch%} bottom" width="160">
- [<strong><a href="{%url=modules.php?module=admin&what=edit_sponsor&id=$content[id]&mode=add_points%}" title="{--ADMIN_SPONSOR_ADD_POINTS_LINK_TITLE--}">{%pipe,translateComma=$content[points]%}</a></strong>]
+ <a href="{%url=modules.php?module=admin&what=edit_sponsor&id=$content[id]&mode=add_points%}"
+ title="{--ADMIN_SPONSOR_ADD_POINTS_LINK_TITLE--}">{%pipe,translateComma=$content[points]%}</a> {?POINTS?}
</td>
</tr>
<tr>
</div>
</td>
<td class="bottom">
- <input type="password" name="pass" tabindex="2" size="20" maxlength="100" class="admin_normal" />
+ <input type="password" name="password" tabindex="2" size="20" maxlength="100" class="admin_normal" />
</td>
</tr>
$content[pass_message]
{--GUEST_ENTER_PASSWORD--}:
</td>
<td>
- <input type="password" name="pass" class="guest_normal" size="10" maxlength="255" />
+ <input type="password" name="password" class="guest_normal" size="10" maxlength="255" />
</td>
</tr>
<tr>
<table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed" width="550">
<tr>
<td class="guest_title bottom">
- <div class="big para">
+ <div class="big">
{--GUEST_SPONSOR_WANT_BECOME_HEADER--}
</div>
- <div class="para">
+ <div>
{--GUEST_SPONSOR_INFOS_PRICING_HEADER--}
</div>
</td>
</tr>
<tr>
- <td align="center" class="bottom" style="padding-top:15px; padding-bottom: 15px">
+ <td align="center" style="padding-top:8px; padding-bottom: 4px">
<div>
{--GUEST_SPONSOR_PRICING_HEADER--}
</div>
</td>
</tr>
<tr>
- <td align="center" style="padding-top: 15px; padding-bottom: 15px">
+ <td align="center" style="padding-top: 4px; padding-bottom: 8px">
<table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed" width="450">
<tr>
<td colspan="2" align="center" class="guest_title bottom">
<tr>
- <td colspan="2">
+ <td colspan="2" class="bottom">
$content
</td>
</tr>
{--SPONSOR_ENTER_ID--}:
</td>
<td>
- <input type="text" name="sponsorid" class="guest_normal" size="5" maxlength="20" />
+ <input type="text" name="sponsor_id" class="guest_normal" size="5" maxlength="20" />
</td>
</tr>
<tr>
{--SPONSOR_ENTER_PASSWORD--}:
</td>
<td class="bottom">
- <input type="password" name="pass" class="guest_normal" size="10" maxlength="255" />
+ <input type="password" name="password" class="guest_normal" size="10" maxlength="255" />
</td>
</tr>
<tr>
--- /dev/null
+<div align="center">
+<table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed" width="350">
+$content
+<tr>
+ <td colspan="2" class="guest_footer" align="center">
+ {--GUEST_SPONSOR_PRICING_FOOTER--}
+ </td>
+</tr>
+</table>
+</div>
<td class="bottom {%template,ColorSwitch%}" height="50" style="padding-left: 2px; padding-right: 2px">
<input type="radio" name="pay_type" class="guest_normal" value="$content[id]" />
$content[pay_name]
- <div align="right">($content[pay_min_count] $content[pay_currency] = $content[res] {?POINTS?})</div>
+ <div align="right">
+ ($content[pay_min_count] $content[pay_currency] = $content[res] {?POINTS?})
+ </div>
</td>
</tr>
</td>
</tr>
<tr>
- <td align="right" valign="top">
+ <td class="bottom" align="right" valign="top">
{--SPONSOR_ENTER_TAX_IDENT--}:
</td>
- <td>
+ <td class="bottom">
<input type="text" name="tax_ident" class="guest_normal" size="20" maxlength="255" value="$content[tax_ident]" />
</td>
</tr>
</td>
</tr>
<tr>
- <td align="right">
+ <td class="bottom" align="right">
{--GUEST_FAMILY--}:
</td>
- <td>
+ <td class="bottom">
<input type="text" name="family" class="guest_normal" size="20" maxlength="255" value="$content[family]" />
</td>
</tr>
</td>
</tr>
<tr>
- <td align="right" valign="top">
+ <td class="bottom" align="right" valign="top">
{--SPONSOR_ENTER_URL--}:
</td>
- <td>
+ <td class="bottom">
<input type="text" name="url" class="guest_normal" size="20" maxlength="255" value="$content[url]" />
</td>
</tr>
</td>
</tr>
<tr>
- <td align="right" valign="top">
+ <td class="bottom" align="right" valign="top">
{--SPONSOR_ENTER_PASSWORDS--}:
</td>
- <td>
+ <td class="bottom">
<input type="password" name="pass1" class="guest_normal" size="10" maxlength="255" />
<input type="password" name="pass2" class="guest_normal" size="10" maxlength="255" />
</td>
</td>
</tr>
<tr>
- <td align="right" valign="top">
+ <td class="bottom" align="right" valign="top">
{--SPONSOR_REFID_WAS--}:
</td>
- <td>
+ <td class="bottom">
<strong>{%pipe,determineReferalId%}</strong>
</td>
</tr>
</td>
</tr>
<tr>
- <td align="right">
+ <td class="bottom" align="right">
{--SPONSOR_WARNING_INTERVAL--}:
</td>
- <td>
+ <td class="bottom">
<select name="warning_interval" class="guest_select" size="1">
<option value="0">{--SELECT_NONE--}</option>
<option value="{--({?ONE_DAY?}*1)--}">1 {--DAYS--}</option>
</td>
</tr>
<tr>
- <td align="right" valign="top">
+ <td class="bottom" align="center" valign="top" colspan="2">
{--SPONSOR_SELECT_PAYMENT--}:
- </td>
- <td>
$content[payment_list]
</td>
</tr>
</td>
</tr>
<tr>
- <td align="center" valign="top">
+ <td class="bottom" align="center" valign="top">
<input type="checkbox" name="terms" class="guest_normal" value="1" />
</td>
- <td>
+ <td class="bottom">
{--SPONSOR_ACCEPT_TERMS--}
</td>
</tr>
<tr>
<td height="25" align="right">{--MEMBER_PAYOUT_OPTIONAL_PASSWORD--}:</td>
<td>
- <input type="password" name="pass" class="member_normal" ize="10" maxlength="255" />
+ <input type="password" name="password" class="member_normal" ize="10" maxlength="255" />
</td>
</tr>
<tr>
--- /dev/null
+<tr>
+ <td class="menu_advert">
+ <!-- Fuegen Sie hier Ihre Werbung ein! //-->
+ <a href="{%url=modules.php??module=index&what=impressum%}" target="_blank">Hier könnte Ihre Werbung stehen!</a>
+ </td>
+</tr>