// Output HTML code directly or 'render' it. You addionally switch the new-line character off
function outputHtml ($htmlCode, $newLine = true) {
// Init output
// Output HTML code directly or 'render' it. You addionally switch the new-line character off
function outputHtml ($htmlCode, $newLine = true) {
// Init output
- if ($id > 0) $prefix .= "[" . $id."]";
- $OUT .= " <select name=\"" . $prefix."\" class=\"" . $class . "\" size=\"1\">\n";
+ if ($id > 0) $prefix .= '[' . $id . ']';
+ $OUT .= '<select name="' . $prefix . '" class="' . $class . '" size="1">';
- if ($id > 0) $type2 .= "[" . $id."]";
- $OUT .= " <select name=\"".strtolower($prefix . $type2)."\" class=\"" . $class . "\" size=\"1\">\n";
+ if ($id > 0) $type2 .= '[' . $id . ']';
+ $OUT .= '<select name="' . strtolower($prefix . $type2) . '" class="' . $class . '" size="1">';
- foreach ($GLOBALS['month_descr'] as $month => $descr) {
- $OUT .= "<option value=\"" . $month."\"";
- if ($default == $month) $OUT .= ' selected="selected"';
- $OUT .= ">" . $descr."</option>\n";
+ foreach ($GLOBALS['month_descr'] as $idx => $descr) {
+ $OUT .= '<option value="' . $idx . '"';
+ if ($default == $idx) $OUT .= ' selected="selected"';
+ $OUT .= '>' . $descr . '</option>';
// Check if the default value is larger than minimum and bigger than actual year
if (($default > $minYear) && ($default >= $year)) {
for ($idx = $year; $idx < ($year + 11); $idx++) {
// Check if the default value is larger than minimum and bigger than actual year
if (($default > $minYear) && ($default >= $year)) {
for ($idx = $year; $idx < ($year + 11); $idx++) {
- for ($idx = $startYear; $idx <= ($year + 1); $idx++)
- {
- $OUT .= "<option value=\"" . $idx."\">" . $idx."</option>\n";
- }
+ for ($idx = $startYear; $idx <= ($year + 1); $idx++) {
+ $OUT .= '<option value="' . $idx . '">' . $idx . '</option>';
+ } // END - for
// Calculate earliest year depending on extension version
if (isExtensionInstalledAndNewer('order', '0.2.1')) {
// Use configured minimum age
// Calculate earliest year depending on extension version
if (isExtensionInstalledAndNewer('order', '0.2.1')) {
// Use configured minimum age
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
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
case 'jpg':
// Okay, load image and hide all errors
$image = imagecreatefromjpeg($img);
case 'jpg':
// Okay, load image and hide all errors
$image = imagecreatefromjpeg($img);
// Okay, load image and hide all errors
$image = imagecreatefrompng($img);
break;
// Okay, load image and hide all errors
$image = imagecreatefrompng($img);
break;
} else {
// Exit function here
logDebugMessage(__FUNCTION__, __LINE__, sprintf("File for image type %s not found.", getConfig('img_type')));
} else {
// Exit function here
logDebugMessage(__FUNCTION__, __LINE__, sprintf("File for image type %s not found.", getConfig('img_type')));
switch (getConfig('img_type')) {
case 'jpg': imagejpeg($image); break;
case 'png': imagepng($image); break;
switch (getConfig('img_type')) {
case 'jpg': imagejpeg($image); break;
case 'png': imagepng($image); break;
- $OUT = "<div align=\"" . $align."\">\n";
- $OUT .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"timebox_table dashed\">\n";
- $OUT .= "<tr>\n";
+ $OUT = '<div align="' . $align . '">';
+ $OUT .= '<table border="0" cellspacing="0" cellpadding="0" class="timebox_table dashed">';
+ $OUT .= '<tr>';
if (isInString('Y', $display) || (empty($display))) {
// Generate year selection
if (isInString('Y', $display) || (empty($display))) {
// Generate year selection
- $OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_ye\" size=\"1\">\n";
- for ($idx = '0'; $idx <= 10; $idx++) {
- $OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
+ $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_ye" size="1">';
+ for ($idx = 0; $idx <= 10; $idx++) {
+ $OUT .= '<option class="mini_select" value="' . $idx . '"';
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_ye" value="0" />';
}
if (isInString('M', $display) || (empty($display))) {
// Generate month selection
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_ye" value="0" />';
}
if (isInString('M', $display) || (empty($display))) {
// Generate month selection
- $OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_mo\" size=\"1\">\n";
- for ($idx = '0'; $idx <= 11; $idx++)
- {
- $OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
+ $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_mo" size="1">';
+ for ($idx = 0; $idx <= 11; $idx++) {
+ $OUT .= ' <option class="mini_select" value="' . $idx . '"';
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_mo" value="0" />';
}
if (isInString('W', $display) || (empty($display))) {
// Generate week selection
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_mo" value="0" />';
}
if (isInString('W', $display) || (empty($display))) {
// Generate week selection
- $OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_we\" size=\"1\">\n";
- for ($idx = '0'; $idx <= 4; $idx++) {
- $OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
+ $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_we" size="1">';
+ for ($idx = 0; $idx <= 4; $idx++) {
+ $OUT .= ' <option class="mini_select" value="' . $idx . '"';
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_we" value="0" />';
}
if (isInString('D', $display) || (empty($display))) {
// Generate day selection
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_we" value="0" />';
}
if (isInString('D', $display) || (empty($display))) {
// Generate day selection
- $OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_da\" size=\"1\">\n";
- for ($idx = '0'; $idx <= 31; $idx++) {
- $OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
+ $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_da" size="1">';
+ for ($idx = 0; $idx <= 31; $idx++) {
+ $OUT .= ' <option class="mini_select" value="' . $idx . '"';
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_da" value="0" />';
}
if (isInString('h', $display) || (empty($display))) {
// Generate hour selection
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_da" value="0" />';
}
if (isInString('h', $display) || (empty($display))) {
// Generate hour selection
- $OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_ho\" size=\"1\">\n";
- for ($idx = '0'; $idx <= 23; $idx++) {
- $OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
+ $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_ho" size="1">';
+ for ($idx = 0; $idx <= 23; $idx++) {
+ $OUT .= ' <option class="mini_select" value="' . $idx . '"';
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_ho" value="0" />';
}
if (isInString('m', $display) || (empty($display))) {
// Generate minute selection
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_ho" value="0" />';
}
if (isInString('m', $display) || (empty($display))) {
// Generate minute selection
- $OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_mi\" size=\"1\">\n";
- for ($idx = '0'; $idx <= 59; $idx++) {
- $OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
+ $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_mi" size="1">';
+ for ($idx = 0; $idx <= 59; $idx++) {
+ $OUT .= ' <option class="mini_select" value="' . $idx . '"';
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_mi" value="0" />';
}
if (isInString('s', $display) || (empty($display))) {
// Generate second selection
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_mi" value="0" />';
}
if (isInString('s', $display) || (empty($display))) {
// Generate second selection
- $OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_se\" size=\"1\">\n";
- for ($idx = '0'; $idx <= 59; $idx++) {
- $OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
+ $OUT .= '<td align="center"><select class="mini_select" name="' . $prefix . '_se" size="1">';
+ for ($idx = 0; $idx <= 59; $idx++) {
+ $OUT .= ' <option class="mini_select" value="' . $idx . '"';
// If so and if current time is before 02/29 and estimated time is after 02/29 then add 86400 seconds (one day)
if ((floor($TEST) == $TEST) && ($M1 == '02') && ($postData[$prefix . '_mo'] > '02')) $SWITCH = getConfig('ONE_DAY');
// If so and if current time is before 02/29 and estimated time is after 02/29 then add 86400 seconds (one day)
if ((floor($TEST) == $TEST) && ($M1 == '02') && ($postData[$prefix . '_mo'] > '02')) $SWITCH = getConfig('ONE_DAY');
function addEmailNavigation ($PAGES, $offset, $show_form, $colspan, $return=false) {
$TOP = '';
if ($show_form === false) {
function addEmailNavigation ($PAGES, $offset, $show_form, $colspan, $return=false) {
$TOP = '';
if ($show_form === false) {
if (isInString('/', $host)) $host = substr($host, 0, strpos($host, '/'));
// Generate relative URL
if (isInString('/', $host)) $host = substr($host, 0, strpos($host, '/'));
// Generate relative URL
if (substr(strtolower($script), 0, 7) == 'http://') {
// But only if http:// is in front!
$script = substr($script, (strlen($url) + 7));
if (substr(strtolower($script), 0, 7) == 'http://') {
// But only if http:// is in front!
$script = substr($script, (strlen($url) + 7));
if (substr($script, 0, 1) == '/') $script = substr($script, 1);
// Return host name
if (substr($script, 0, 1) == '/') $script = substr($script, 1);
// Return host name
if ($useProxy === true) {
// Resolve hostname into IP address
$ip = $resolver->resolveHostname(compileRawCode(getConfig('proxy_host')));
if ($useProxy === true) {
// Resolve hostname into IP address
$ip = $resolver->resolveHostname(compileRawCode(getConfig('proxy_host')));
// Get char on scrambled position
$char = substr($str, $scrambleNums[$idx], 1);
// Get char on scrambled position
$char = substr($str, $scrambleNums[$idx], 1);
// Begin descrambling
$orig = str_repeat(' ', 40);
//* DEBUG: */ outputHtml('+++Scrambled=' . $str.'+++<br />');
// Begin descrambling
$orig = str_repeat(' ', 40);
//* DEBUG: */ outputHtml('+++Scrambled=' . $str.'+++<br />');
$char = substr($str, $idx, 1);
$orig = substr_replace($orig, $char, $scrambleNums[$idx], 1);
} // END - for
$char = substr($str, $idx, 1);
$orig = substr_replace($orig, $char, $scrambleNums[$idx], 1);
} // END - for
} elseif ((isExtensionInstalledAndNewer('user', '0.3.4')) && (getConfig('select_user_zero_refid') == 'Y')) {
// Select a random user which has confirmed enougth mails
$GLOBALS['refid'] = determineRandomReferalId();
} elseif ((isExtensionInstalledAndNewer('user', '0.3.4')) && (getConfig('select_user_zero_refid') == 'Y')) {
// Select a random user which has confirmed enougth mails
$GLOBALS['refid'] = determineRandomReferalId();
// Generates meta description for current module and 'what' value
function generateMetaDescriptionCode () {
// Generates meta description for current module and 'what' value
function generateMetaDescriptionCode () {
- // Only include from guest area
- if (getModule() == 'index') {
+ // Only include from guest area and if sql_patches has correct version
+ if ((getModule() == 'index') && (isExtensionInstalledAndNewer('sql_patches', '0.1.6'))) {