当前位置: 首页>>代码示例>>PHP>>正文


PHP Order::deleteOrder方法代码示例

本文整理汇总了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;
 }
开发者ID:joe-lumarlin,项目名称:oleis_shop,代码行数:7,代码来源:AdminOrderController.php

示例2: actionDelete

 public function actionDelete($id)
 {
     if (isset($_POST['submit'])) {
         $result = Order::deleteOrder($id);
         if (!$result) {
             $_SESSION['message'] = 'Произошла ошибка при удалении.';
         }
         FunctionLibrary::redirectTo('/admin/order');
     }
     return true;
 }
开发者ID:php-user,项目名称:shop.local,代码行数:11,代码来源:AdminOrderController.php

示例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;
 }
开发者ID:dmitry-politov,项目名称:e-shopper,代码行数:17,代码来源:AdminOrderController.php

示例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();
开发者ID:meghv999,项目名称:cdshop-php,代码行数:17,代码来源:delOrder.php

示例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;
开发者ID:HadrienX,项目名称:PhoneDeals,代码行数:23,代码来源:order-delete.php

示例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>  
开发者ID:naretini,项目名称:pizzeria,代码行数:31,代码来源:ordini_cancella.php

示例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;
开发者ID:huguangAOA,项目名称:sk_vjudge,代码行数:31,代码来源:order.php


注:本文中的Order::deleteOrder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。