ruạṛ
<?php /** * Remove stockist from the database * @version 0.9 * @author Robert Urquhart <programmer@activatedesign.co.nz> * @package WEP-CMS */ session_start(); require_once $_SERVER['DOCUMENT_ROOT'].'/admin/scripts-includes/universal.php'; $conn_ID = connect_to_db(); /** * get and validate id * @var int $stockist_id * @var object $n * @var string $message */ if(!$stockist_id = is_numeric_id($_GET['stockist'])) { getout('Stockist not found','stockists.php'); exit; } $n = new stockist($stockist_id); $message = ''; if(!$n->stockist_id){ getout('Invalid stockist id'); exit; } //else $n->delete(); $message .= 'Stockist deleted successfully.'; getout($message, '/admin/stockists.php'); exit; ?>
cải xoăn