Пример #1
0
include_once "./Manager/ConnectionManager.php";
include_once "./Manager/ProductManager.php";
include_once "./Manager/CreditManager.php";
include_once "./Manager/FdpManager.php";
include_once "./Manager/CustomerManager.php";
include_once "./Manager/PhotoManager.php";
include_once "./Manager/RewardManager.php";
include_once "./Manager/OrderManager.php";
include_once "./Manager/AddressManager.php";
$admin = $_SESSION["admin_id"];
$productMgr = new ProductManager();
$product_list = $productMgr->getAllProduct();
$no_of_products = sizeof($product_list);
$creditMgr = new CreditManager();
$total_no_invitation = $creditMgr->getNoOfInvitation();
$fdpMgr = new FdpManager();
$current_cutoff = $fdpMgr->getCutoff();
$current_charge = $fdpMgr->getCharge();
?>

<html>   
    <head>
        <script type="text/javascript" src="public_html/js/jquery-1.11.0.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/3.51/jquery.form.js"></script> 
        <script>
        $(window).load(function(){
            var hash = window.location.hash;
            if(hash != ''){
                $("#dashboard").attr('class','tab-pane fade');
                $("#dashboard_tab").attr('class', '');
                $(hash).attr('class','tab-pane fade active in');
<?php

include_once './Manager/ConnectionManager.php';
include_once './Manager/FdpManager.php';
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$fdpMgr = new FdpManager();
$operation = $_GET["operation"];
if ($operation == 'updateCutoff') {
    $new_cutoff = $_GET["new_cutoff"];
    $fdpMgr->updateCutoff($new_cutoff);
    header("Location: admin.php#freeDeliveryPrice");
    exit;
} elseif ($operation == 'updateCharge') {
    $new_charge = $_GET["new_charge"];
    $fdpMgr->updateCharge($new_charge);
    header("Location: admin.php#freeDeliveryPrice");
    exit;
}