array(strtoupper(postRequestElement('code'))), __FILE__, __LINE__);
if (SQL_HASZERONUMS($result)) {
// Save entry
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (`code`,`descr`,`is_active`) VALUES ('%s','%s','%s')",
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (`code`, `descr`, `is_active`) VALUES ('%s','%s','%s')",
array(
strtoupper(substr(postRequestElement('code'), 0, 2)),
postRequestElement('descr'),
adminChangeActivationStatus(postRequestElement('id'), 'countries', 'is_active');
// Show next link
- loadTemplate('admin_next_link', false, array(
+ loadTemplate('admin_next_link', FALSE, array(
'url' => 'modules.php?module=admin&what=list_country',
'title' => '{--ADMIN_COUNTRY_ACTIVATION_NEXT_LINK--}'
));
} elseif (((isFormSent('edit')) || (isPostRequestElementSet('delete'))) && (isPostRequestElementSet('id'))) {
- // Do we have entries?
+ // Are there entries?
if (ifPostContainsSelections('id')) {
// Is the proper form sent?
if (isFormSent('edit')) {
$OUT = '';
foreach (postRequestElement('id') as $id => $isActive) {
// Load data from DB
- $result = SQL_QUERY_ESC("SELECT `id`,`code`,`descr` FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `id`, `code`, `descr` FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
$content['is_active'] = $isActive;
// Insert row template and switch color
- $OUT .= loadTemplate($row, true, $content);
+ $OUT .= loadTemplate($row, TRUE, $content);
} // END - if
// Free result
);
// Load main template
- loadTemplate('admin_list_country_form', false, $content);
+ loadTemplate('admin_list_country_form', FALSE, $content);
} // END - if
} else {
// Shall we modify / remove entries now?
} // END - if
// Load currenty setup country codes to list
- $result = SQL_QUERY('SELECT `id`,`code`,`descr`,`is_active` FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY `code` ASC',
+ $result = SQL_QUERY('SELECT `id`, `code`, `descr`, `is_active` FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY `code` ASC',
__FILE__, __LINE__);
- // Do we have entries?
+ // Are there entries?
if (!SQL_HASZERONUMS($result)) {
// List all countries
$OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Load row template and switch colors
- $OUT .= loadTemplate('admin_list_country_row', true, $content);
+ $OUT .= loadTemplate('admin_list_country_row', TRUE, $content);
} // END - while
// Free memory
SQL_FREERESULT($result);
} else {
// No code setup so far (not possible by this software! 'DE' for 'Deutschland' is default
- $OUT = loadTemplate('admin_list_country_no_row', true);
+ $OUT = loadTemplate('admin_list_country_no_row', TRUE);
}
// Add list to constant for the template
$content['rows'] = $OUT;
// Include add template
- $content['add_form'] = loadTemplate('admin_add_country', true);
+ $content['add_form'] = loadTemplate('admin_add_country', TRUE);
// Load main template
- loadTemplate('admin_list_country', false, $content);
+ loadTemplate('admin_list_country', FALSE, $content);
}
// [EOF]