// Show next link
loadTemplate('admin_next_link', false, array(
'url' => 'modules.php?module=admin&what=list_country',
// Show next link
loadTemplate('admin_next_link', false, array(
'url' => 'modules.php?module=admin&what=list_country',
));
} elseif (((isFormSent('edit')) || (isPostRequestParameterSet('delete'))) && (isPostRequestParameterSet('id'))) {
if (count(postRequestParameter('id')) > 0) {
));
} elseif (((isFormSent('edit')) || (isPostRequestParameterSet('delete'))) && (isPostRequestParameterSet('id'))) {
if (count(postRequestParameter('id')) > 0) {
- $result = SQL_QUERY_ESC("SELECT 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
array(bigintval($id)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
- list($code, $descr) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
-
- // Prepare data, load row template and switch colors
- $content = array(
- 'id' => $id,
- 'code' => $code,
- 'descr' => $descr,
- 'sw' => $SW,
- );
+ $content = SQL_FETCHARRAY($result);
- $content['status'] = generateOptionList('/ARRAY/', array('Y', 'N'), array(getMessage('YES'), getMessage('NO')), $status);
+ $content['status'] = generateOptionList('/ARRAY/', array('Y', 'N'), array('{--YES--}', '{--NO--}'), $status);
// Insert row template and switch color
$OUT .= loadTemplate($row, true, $content);
// Insert row template and switch color
$OUT .= loadTemplate($row, true, $content);
// Load currenty setup country codes to list
$result = SQL_QUERY('SELECT id, code, descr, is_active FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY code',
__FILE__, __LINE__);
// Load currenty setup country codes to list
$result = SQL_QUERY('SELECT id, code, descr, is_active FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY code',
__FILE__, __LINE__);
while ($content = SQL_FETCHARRAY($result)) {
// Prepare array for the template
$content['active'] = translateYesNo($content['is_active']);
while ($content = SQL_FETCHARRAY($result)) {
// Prepare array for the template
$content['active'] = translateYesNo($content['is_active']);
// Load row template and switch colors
$OUT .= loadTemplate('admin_list_country_row', true, $content);
// Load row template and switch colors
$OUT .= loadTemplate('admin_list_country_row', true, $content);