Exemple #1
0
        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }
    </style>
</head>
<body>
    <?php 
$_id = $_GET['id'];
require_once './webinfo.class.php';
$config = (require './config.php');
$web = new webinfo($config);
$row = $web->getInfo($_id);
?>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container-fluid">
                <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="brand" href="#">内容管理</a>
                <div class="nav-collapse collapse">
                    <p class="navbar-text pull-right">
                        Logged in as <a href="#" class="navbar-link">Admin</a>
                    </p>
    <?php 
//获得页码
$page = isset($_GET['page']) ? $_GET['page'] : 1;
$index = ($page - 1) * 20;
$config = (require_once './config.php');
require_once './webinfo.class.php';
$info = new webinfo($config);
$_list = $info->getInfoList($index);
?>
	<a href="./add.html" class="btn btn-success btn-large btn-block " style="margin-bottom:20px;">+新增信息</a>
	<table class="table table-bordered table-hover">
	    <thead>
	        <tr>
	            <th>后台地址</th>
	            <th>账号</th>
	            <th>密码</th>
	            <th>FTP地址</th>
	            <th>FTP账号</th>
	            <th>FTP密码</th>
	            <th>操作</th>
	        </tr>
	    </thead>
	    <tbody>
	    	<?php 
if ($_list != null) {
    foreach ($_list as $row) {
        echo "<tr>";
        echo "<td>" . $row["BackAddress"] . "</td>";
        echo "<td>" . $row["BackAccount"] . "</td>";
        echo "<td>" . $row["BackPassword"] . "</td>";
        echo "<td>" . $row["FTPAddress"] . "</td>";
<?php

$page = isset($_GET['page']) ? $_GET['page'] : 1;
if ($page <= 0) {
    $page = 1;
}
$config = (require_once './config.php');
require_once './webinfo.class.php';
$info = new webinfo($config);
$pagination = $info->getPagination($page);
return $pagination;