aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'php/admin/index.php')
-rw-r--r--php/admin/index.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/php/admin/index.php b/php/admin/index.php
index 8c3db5c..e8feaec 100644
--- a/php/admin/index.php
+++ b/php/admin/index.php
@@ -9,7 +9,7 @@ require_once('../cfg/init.php');
// add mirror
if (!empty($_POST['add-submit'])) {
- if (mirror_insert_mirror($_POST['mirror_name'],$_POST['region_id'],$_POST['mirror_baseurl'],$_POST['mirror_rating'])) {
+ if (Mirror::insert_mirror($_POST['mirror_name'],$_POST['region_id'],$_POST['mirror_baseurl'],$_POST['mirror_rating'])) {
set_msg('Mirror added successfully.');
header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/');
exit;
@@ -24,7 +24,7 @@ if (!empty($_POST['submit'])) {
switch($_POST['action']) {
case 'edit':
if (!empty($_POST['doit'])) {
- if (mirror_update_mirror($_POST['mirror_id'],$_POST['mirror_name'],$_POST['region_id'],$_POST['mirror_baseurl'],$_POST['mirror_rating'])) {
+ if (Mirror::update_mirror($_POST['mirror_id'],$_POST['mirror_name'],$_POST['region_id'],$_POST['mirror_baseurl'],$_POST['mirror_rating'])) {
set_msg('Mirror updated successfully.');
header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/');
exit;
@@ -36,7 +36,7 @@ if (!empty($_POST['submit'])) {
$nav = INC.'/admin_nav.php';
require_once(HEADER);
echo '<h2>Edit Mirror</h2>';
- $posts = mirror_get_one_mirror($_POST['mirror_id']);
+ $posts = Mirror::get_one_mirror($_POST['mirror_id']);
form_start();
include_once(INC.'/forms/mirror.php');
form_hidden('doit','1');
@@ -49,14 +49,14 @@ if (!empty($_POST['submit'])) {
}
break;
case 'delete':
- if (mirror_delete_mirror($_POST['mirror_id'])) {
+ if (Mirror::delete_mirror($_POST['mirror_id'])) {
set_msg('Mirror deleted successfully.');
} else {
set_error('Mirror could not be deleted.');
}
break;
case 'toggle':
- if (mirror_toggle($_POST['mirror_id'])) {
+ if (Mirror::toggle($_POST['mirror_id'])) {
set_msg('Mirror enabled/disabled.');
} else {
set_error('Mirror could not be enabled/disabled.');
@@ -75,7 +75,7 @@ echo '<h2>Mirrors</h2>';
show_error();
show_msg();
-$mirrors = mirror_get_mirrors();
+$mirrors = Mirror::get_mirrors();
$_GET['sort']=(!empty($_GET['sort']))?$_GET['sort']:'mirror_active';
$_GET['order']=(!empty($_GET['order']))?$_GET['order']:'ASC';
@@ -108,4 +108,3 @@ form_submit('add-submit','','button1','Add Mirror');
form_end();
require_once(FOOTER);
-?>