示例#1
0
<?php

require_once "../connect/connect.php";
require_once "../moduls/data_constant.php";
$link = db_connect();
if (isset($_GET['action'])) {
    $action = $_GET['action'];
} else {
    $action = "";
}
if ($action == "add") {
    if (!empty($_POST)) {
        data_new($link, $_POST['min_wd'], $_POST['max_wd'], $_POST['critical_damage'], $_POST['special_dc'], $_POST['dodge_chance'], $_POST['min_swd'], $_POST['max_swd'], $_POST['critical_chance'], $_POST['health'], $_POST['armour']);
        header("Location: constant.php");
    }
    include "../views/add_constant.php";
} else {
    if ($action == "edit") {
        if (!isset($_GET['id'])) {
            header("Location: constant.php");
        }
        $id = (int) $_GET['id'];
        if (!empty($_POST) && $id > 0) {
            data_edit($link, $id, $_POST['min_wd'], $_POST['max_wd'], $_POST['critical_damage'], $_POST['special_dc'], $_POST['dodge_chance'], $_POST['min_swd'], $_POST['max_swd'], $_POST['critical_chance'], $_POST['health'], $_POST['armour']);
            header("Location: constant.php");
        }
        $data = data_get($link, $id);
        include "../views/add_constant.php";
    } else {
        if ($action == "delete") {
            $id = $_GET['id'];
示例#2
0
<?php

require_once "../connect/connect.php";
require_once "../moduls/data.php";
$link = db_connect();
if (isset($_GET['action'])) {
    $action = $_GET['action'];
} else {
    $action = "";
}
if ($action == "add") {
    if (!empty($_POST)) {
        data_new($link, $_POST['name'], $_POST['value'], $_POST['discription'], $_POST['level']);
        header("Location: shop.php");
    }
    include "../views/add_shop.php";
} else {
    if ($action == "edit") {
        if (!isset($_GET['id'])) {
            header("Location: shop.php");
        }
        $id = (int) $_GET['id'];
        if (!empty($_POST) && $id > 0) {
            data_edit($link, $id, $_POST['name'], $_POST['value'], $_POST['discription'], $_POST['level']);
            header("Location: shop.php");
        }
        $data = data_get($link, $id);
        include "../views/add_shop.php";
    } else {
        if ($action == "delete") {
            $id = $_GET['id'];
示例#3
0
<?php

require_once "../connect/connect.php";
require_once "../moduls/data_user.php";
$link = db_connect();
if (isset($_GET['action'])) {
    $action = $_GET['action'];
} else {
    $action = "";
}
if ($action == "add") {
    if (!empty($_POST)) {
        $_POST['time'] = time();
        data_new($link, $_POST['uid'], $_POST['name'], $_POST['time'], $_POST['level'], $_POST['expirience'], $_POST['energy'], $_POST['r_cash'], $_POST['v_cash']);
        header("Location: users.php");
    }
    include "../views/add_user.php";
} else {
    if ($action == "edit") {
        if (!isset($_GET['id'])) {
            header("Location: users.php");
        }
        $id = (int) $_GET['id'];
        if (!empty($_POST) && $id > 0) {
            $_POST['time'] = time();
            data_edit($link, $id, $_POST['uid'], $_POST['name'], $_POST['time'], $_POST['level'], $_POST['expirience'], $_POST['energy'], $_POST['r_cash'], $_POST['v_cash']);
            header("Location: users.php");
        }
        $data = data_get($link, $id);
        include "../views/add_user.php";
    } else {