case '0.5.6': // SQL queries for v0.5.6
// Get current month
- $curr = getMonth();
- if (strlen($curr) == 1) $curr = '0' . $curr;
+ $curr = str_pad(getMonth(), 2, '0', STR_PAD_LEFT);
if ($curr == '00') $curr = '12';
// Generate timemark...
} // END - foreach
// Is something there?
- if (strlen($ret) > 0) {
+ if (!empty($ret)) {
// Remove leading commata and space
$ret = substr($ret, 2);
} else {
}
// Compare both lengths and abort if different
- if (strlen($str) != count($scrambleNums)) return $str;
+ if (strlen($str) != count($scrambleNums)) {
+ return $str;
+ } // END - if
// Scramble string here
//* DEBUG: */ debugOutput('***Original=' . $str.'***<br />');
$mod = substr($mod, 0, 2);
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'idx=' . $idx . ',part1=' . $part1 . '/part2=' . $part2 . '/mod=' . $mod . '(' . strlen($mod) . ')');
- $mod = str_repeat('0', (2 - strlen($mod))) . $mod;
+ $mod = str_pad($mod, 2, '0', STR_PAD_LEFT);
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'mod(' . ($idx * 2) . ')=' . $mod . '*');
$start += 2;
$newHash .= $mod;
// Shall I withdraw now?
if (isPostRequestElementSet('withdraw')) {
// Okay, let's prepare...
- $curr = getMonth() - 1;
- if (strlen($curr) == 1) $curr = '0' . $curr;
+ $curr = str_pad((getMonth() - 1), 2, '0', STR_PAD_LEFT);
updateConfiguration('last_month', $curr);
displayMessage('{--ADMIN_BEG_WITHDRAW_PREPARED--}');
} // END - if
// Shall I withdraw now?
if (isPostRequestElementSet('withdraw')) {
// Okay, let's prepare...
- $curr = getMonth() - 1;
- if (strlen($curr) == 1) $curr = '0' . $curr;
+ $curr = str_pad((getMonth() - 1), 2, '0', STR_PAD_LEFT);
updateConfiguration('last_month', $curr);
displayMessage('{--ADMIN_BONUS_WITHDRAW_PREPARED--}');
} // END - if
$content['change'] = loadTemplate('member_mydata_button', TRUE);
}
- if (strlen($content['birth_day']) == 1) $content['birth_day'] = '0' . $content['birth_day'];
- if (strlen($content['birth_month']) == 1) $content['birth_month'] = '0' . $content['birth_month'];
+ $content['birth_day'] = str_pad($content['birth_day'] , 2, '0', STR_PAD_LEFT);
+ $content['birth_month'] = str_pad($content['birth_month'], 2, '0', STR_PAD_LEFT);
switch (getLanguage()) {
case 'de': $content['dob'] = $content['birth_day'] . '.' . $content['birth_month'] . '.' . $content['birth_year']; break;
$characters = trim($characters);
// Are there some to handle?
- if (strlen($characters) == 0) {
+ if (empty($characters)) {
// Nothing to handle
return;
} // END - if
$content['userid'] = $userId;
$content['type'] = $type;
$content['data'] = $urlId;
- $content['rand'] = getRandomTan();
$content['banner'] = loadTemplate('mailid_banner', TRUE);
// Load template
document.confirm.counter.value = timer;
if (timer == 0) {
clearInterval(Counter);
- document.location.href = '{%url,js=mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&do=confirm&code=$content[rand]%}';
+ document.location.href = '{%url,js=mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&do=confirm&code={%pipe,getRandomTan%}%}';
}
}
//-->