Example #1
0
<body class="skin-blue">
<?php 
include_once 'lib/nav.inc.php';
include_once 'lib/slidebar_left.inc.php';
//更新
if (!empty($_POST)) {
    $node_id = $_POST['node_id'];
    $node_name = $_POST['node_name'];
    $node_type = $_POST['node_type'];
    $node_server = $_POST['node_server'];
    $node_method = $_POST['node_method'];
    $node_info = $_POST['node_info'];
    $node_status = $_POST['node_status'];
    $node_order = $_POST['node_order'];
    $n = new node($node_id);
    $query = $n->update($node_name, $node_type, $node_server, $node_method, $node_info, $node_status, $node_order);
    if ($query) {
        echo ' <script>alert("更新成功!")</script> ';
        echo " <script>window.location='node.php';</script> ";
    }
}
if (!empty($_GET)) {
    //获取id
    $id = $_GET['id'];
    $sql = "SELECT * FROM `ss_node` WHERE id = '{$id}' ";
    $query = $dbc->query($sql);
    $rs = $query->fetch_array();
}
?>
<!-- Right side column. Contains the navbar and content of the page -->
<aside class="right-side">