aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'php/admin/regions.php')
-rw-r--r--php/admin/regions.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/php/admin/regions.php b/php/admin/regions.php
index f42c0da..0709e43 100644
--- a/php/admin/regions.php
+++ b/php/admin/regions.php
@@ -9,7 +9,7 @@ require_once('../cfg/init.php');
// add region
if (!empty($_POST['add-submit'])&&!empty($_POST['region_name'])) {
- if (mirror_insert_region($_POST['region_name'],$_POST['region_priority'])) {
+ if (Mirror::insert_region($_POST['region_name'],$_POST['region_priority'])) {
set_msg('Region added successfully.');
header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/regions.php');
exit;
@@ -24,7 +24,7 @@ if (!empty($_POST['submit'])) {
switch($_POST['action']) {
case 'edit':
if (!empty($_POST['doit'])) {
- if (mirror_update_region($_POST['region_id'],$_POST['region_name'],$_POST['region_priority'])) {
+ if (Mirror::update_region($_POST['region_id'],$_POST['region_name'],$_POST['region_priority'])) {
set_msg('Region updated successfully.');
header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/regions.php');
exit;
@@ -36,7 +36,7 @@ if (!empty($_POST['submit'])) {
$nav = INC.'/admin_nav.php';
require_once(HEADER);
echo '<h2>Edit Region</h2>';
- $posts = mirror_get_one_region($_POST['region_id']);
+ $posts = Mirror::get_one_region($_POST['region_id']);
form_start();
include_once(INC.'/forms/region.php');
form_hidden('doit','1');
@@ -49,7 +49,7 @@ if (!empty($_POST['submit'])) {
}
break;
case 'delete':
- if (!record_exists('mirror_mirror_region_map','region_id',$_POST['region_id'])&&mirror_delete_region($_POST['region_id'])) {
+ if (!record_exists('mirror_mirror_region_map','region_id',$_POST['region_id'])&&Mirror::delete_region($_POST['region_id'])) {
set_msg('Region deleted successfully.');
} else {
set_error('Region cannot be deleted because it is linked to a mirror.');
@@ -69,7 +69,7 @@ echo '<h2>Regions</h2>';
show_error();
show_msg();
-$regions = mirror_get_regions();
+$regions = Mirror::get_regions();
$_GET['sort']=(!empty($_GET['sort']))?$_GET['sort']:'region_name';
$_GET['order']=(!empty($_GET['order']))?$_GET['order']:'ASC';
@@ -98,4 +98,3 @@ form_submit('add-submit','','button1','Add Region');
form_end();
require_once(FOOTER);
-?>