diff options
Diffstat (limited to 'php/admin/products.php')
-rw-r--r-- | php/admin/products.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/php/admin/products.php b/php/admin/products.php index e93686f..a0d5187 100644 --- a/php/admin/products.php +++ b/php/admin/products.php @@ -9,7 +9,7 @@ require_once('../cfg/init.php'); // add product if (!empty($_POST['add-submit'])&&!empty($_POST['product_name'])) { - if (mirror_insert_product($_POST['product_name'],$_POST['product_priority'])) { + if (Mirror::insert_product($_POST['product_name'],$_POST['product_priority'])) { set_msg('Product added successfully.'); header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/products.php'); exit; @@ -24,7 +24,7 @@ if (!empty($_POST['submit'])) { switch($_POST['action']) { case 'edit': if (!empty($_POST['doit'])) { - if (mirror_update_product($_POST['product_id'],$_POST['product_name'],$_POST['product_priority'])) { + if (Mirror::update_product($_POST['product_id'],$_POST['product_name'],$_POST['product_priority'])) { set_msg('Product updated successfully.'); header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/products.php'); exit; @@ -36,7 +36,7 @@ if (!empty($_POST['submit'])) { $nav = INC.'/admin_nav.php'; require_once(HEADER); echo '<h2>Edit Product</h2>'; - $posts = mirror_get_one_product($_POST['product_id']); + $posts = Mirror::get_one_product($_POST['product_id']); form_start(); include_once(INC.'/forms/product.php'); form_hidden('doit','1'); @@ -49,7 +49,7 @@ if (!empty($_POST['submit'])) { } break; case 'delete': - if (!record_exists('mirror_locations','product_id',$_POST['product_id'])&&mirror_delete_product($_POST['product_id'])) { + if (!record_exists('mirror_locations','product_id',$_POST['product_id'])&&Mirror::delete_product($_POST['product_id'])) { set_msg('Product deleted successfully.'); } else { set_error('Product cannot be deleted because it is being used by a file location.'); @@ -69,7 +69,7 @@ echo '<h2>Products</h1>'; show_error(); show_msg(); -$products = mirror_get_products(); +$products = Mirror::get_products(); $_GET['sort']=(!empty($_GET['sort']))?$_GET['sort']:'product_name'; $_GET['order']=(!empty($_GET['order']))?$_GET['order']:'ASC'; |