* -------------------------------------------------------------------- *
* Kurzbeschreibung : Country codes verwalten *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Country codes verwalten *
* -------------------------------------------------------------------- *
* Needs to be in all Files and every File needs "svn propset *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Needs to be in all Files and every File needs "svn propset *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
- LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
-} elseif ((REQUEST_ISSET_POST(('change'))) && (REQUEST_ISSET_POST(('id')))) {
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
+} elseif ((REQUEST_ISSET_POST('change')) && (REQUEST_ISSET_POST(('id')))) {
'url' => "modules.php?module=admin&what=list_country",
'title' => getMessage('ADMIN_COUNTRY_ACTIVATION_NEXT_LINK')
));
'url' => "modules.php?module=admin&what=list_country",
'title' => getMessage('ADMIN_COUNTRY_ACTIVATION_NEXT_LINK')
));
if (count(REQUEST_POST('id')) > 0) {
if (REQUEST_ISSET_POST('edit')) {
// Edit template
$row = "admin_list_country_edit_row";
if (count(REQUEST_POST('id')) > 0) {
if (REQUEST_ISSET_POST('edit')) {
// Edit template
$row = "admin_list_country_edit_row";
$reset = "<input type=\"reset\" class=\"admin_reset\" value=\"{!UNDO_SELECTIONS!}\" /> *\n";
} else {
// Delete template
$row = "admin_list_country_del_row";
$reset = "<input type=\"reset\" class=\"admin_reset\" value=\"{!UNDO_SELECTIONS!}\" /> *\n";
} else {
// Delete template
$row = "admin_list_country_del_row";
foreach (REQUEST_POST('id') as $id => $status) {
// Load data from DB
$result = SQL_QUERY_ESC("SELECT code, descr FROM `{!_MYSQL_PREFIX!}_countries` WHERE id=%s LIMIT 1",
foreach (REQUEST_POST('id') as $id => $status) {
// Load data from DB
$result = SQL_QUERY_ESC("SELECT code, descr FROM `{!_MYSQL_PREFIX!}_countries` WHERE id=%s LIMIT 1",
// Generate default selection in edit-mode
$content['status'] = ADD_OPTION_LINES("/ARRAY/", array("Y","N"), array(YES, NO ), $status);
} else {
// Generate default selection in edit-mode
$content['status'] = ADD_OPTION_LINES("/ARRAY/", array("Y","N"), array(YES, NO ), $status);
} else {
if ((REQUEST_ISSET_POST(('modify'))) && (REQUEST_ISSET_POST(('id')))) {
// Modify
foreach (REQUEST_POST('id') as $id => $sel) {
if ((REQUEST_ISSET_POST(('modify'))) && (REQUEST_ISSET_POST(('id')))) {
// Modify
foreach (REQUEST_POST('id') as $id => $sel) {
- $MSG = getMessage('ADMIN_COUNTRIES_MODIFIED');
- } elseif ((REQUEST_ISSET_POST(('remove'))) && (REQUEST_ISSET_POST(('id')))) {
+ $message = getMessage('ADMIN_COUNTRIES_MODIFIED');
+ } elseif ((REQUEST_ISSET_POST('remove')) && (REQUEST_ISSET_POST(('id')))) {
// Remove
$IDs = implode(",", array_keys(REQUEST_POST('id')));
ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_countries` WHERE id IN (".$IDs.") LIMIT ".count(REQUEST_POST('id'))."");
// Create message
// Remove
$IDs = implode(",", array_keys(REQUEST_POST('id')));
ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_countries` WHERE id IN (".$IDs.") LIMIT ".count(REQUEST_POST('id'))."");
// Create message
}
// 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__);
if (SQL_NUMROWS($result) > 0) {
// List all countries
}
// 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__);
if (SQL_NUMROWS($result) > 0) {
// List all countries
while ($content = SQL_FETCHARRAY($result)) {
// Prepare array for the template
// @TODO Rewritings: name->descr,status->is_active in template
while ($content = SQL_FETCHARRAY($result)) {
// Prepare array for the template
// @TODO Rewritings: name->descr,status->is_active in template