本文整理汇总了PHP中Order::deleteOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP Order::deleteOrder方法的具体用法?PHP Order::deleteOrder怎么用?PHP Order::deleteOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Order
的用法示例。
在下文中一共展示了Order::deleteOrder方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionDelete
public function actionDelete($order_id)
{
self::checkAdmin();
Order::deleteOrder($order_id);
header('Location: /admin/order');
return true;
}
示例2: actionDelete
public function actionDelete($id)
{
if (isset($_POST['submit'])) {
$result = Order::deleteOrder($id);
if (!$result) {
$_SESSION['message'] = 'Произошла ошибка при удалении.';
}
FunctionLibrary::redirectTo('/admin/order');
}
return true;
}
示例3: actionDelete
/**
* Action для страницы "Удалить заказ"
*/
public function actionDelete($id)
{
// Обработка формы
if (isset($_POST['submit'])) {
// Если форма отправлена
// Удаляем заказ
Order::deleteOrder($id);
// Перенаправляем пользователя на страницу управлениями товарами
header('Location: /admin/order/');
}
// Подключаем вид
require_once ROOT . '/views/admin_order/delete.php';
return true;
}
示例4: header
<?php
session_start();
require_once "../deny/connector.php";
require_once "../administrator/process/class/class.Order.php";
require_once "../administrator/includes/injection.php";
if (!isset($_SESSION['user_id']) or $_SESSION['user_id'] == "") {
header("location: ../index.php?page=login");
exit;
}
$order = new Order();
$userid = $_SESSION['user_id'];
$orderid = sqlInjection($_GET['orderID']);
$order->deleteOrder($orderid, $userid);
echo "<meta http-equiv='refresh' content='0;url=../index.php?page=history'>";
//header('location : ../index.php?page=history');
//exit();
示例5: define
<?php
define('PUBLIC_ROOT', dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))));
define('ROOT', dirname(PUBLIC_ROOT));
define('DS', DIRECTORY_SEPARATOR);
define('BASE_URL', dirname(dirname($_SERVER['SCRIPT_NAME'])));
define('DOMAIN', $_SERVER['HTTP_HOST']);
define('PROTOCOLE', isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ? 'https' : 'http');
define('SYSTEM', ROOT . DS . 'system');
define('APP', ROOT . DS . 'app');
define('LANG', ROOT . DS . 'ressources' . DS . 'lang');
session_start();
require_once APP . '/model/PDOConnexion.php';
require_once APP . '/model/App.class.php';
require_once APP . '/model/Member.class.php';
require_once APP . '/model/Order.class.php';
header('Content-Type: application/json');
if (isset($_POST['delete']) && isset($_POST['id']) && App::isAdmin()) {
Order::deleteOrder(htmlentities($_POST['id']));
die(json_encode(array_merge($_POST, array('status' => 'true'))));
}
echo json_encode(array_merge($_POST, array('status' => 'unknown error')));
die;
示例6: viewDetails
<script>
function viewDetails(el){
el.closest('tr').next('tr').slideToggle()
}
</script>
</head>
<body>
<!-- Fixed navbar -->
<?php
include_once 'assets/tmpl/navbar.inc.php';
?>
<div class="container">
<?php
$res = Order::deleteOrder($_REQUEST['id']);
if ($res) {
?>
<h1>Ordine cancellato con successo </h1>
<?php
} else {
?>
<div class="alert alert-danger" role="alert">
Sono stati riscontrati dei problemi nella cancellazione</a>
</div>
<?php
}
?>
<a class="btn btn-lg btn-primary" href="ordini.php" role="button">Fai un nuovo ordine »</a>
示例7: redirect
if (!$user->isLogin()) {
redirect("Location: status.php?action=login");
}
$look = false;
if (isset($_GET['action']) || isset($_GET['id'])) {
if ($_GET['action'] == "delete") {
if (!$user->str_check($_GET['id'])) {
redirect("Location: error.php");
}
$t = $order->getOrder($_GET['id']);
if ($user->getPower() != 0) {
if ($user->getUser() != $t['user']) {
redirect("Location: error.php");
}
}
$order->deleteOrder($_GET['id']);
echo "<script language=\"javascript\">alert('删除成功!');history.back(-1);</script>";
die;
}
if ($_GET['action'] == "look") {
if (!$user->str_check($_GET['id'])) {
redirect("Location: error.php");
}
$t = $order->getOrder($_GET['id']);
if ($user->getPower() != 0) {
if ($user->getUser() != $t['user']) {
redirect("Location: error.php");
}
}
$order_info = $order->getOrder($_GET['id']);
$look = true;