function test_readAppPath() { $rc = new ReadConfig(); echo $rc->readAppPath("Mobogenie"); }
$apps = $rc->readAllApp(); foreach ($apps as $app) { echo "<div class='col-xs-3'>"; if ((int) $app["db"] == 1) { $db = new DB(); $count = $db->selectAppQrsCount($app["name"]); $db = null; $href = "home.php?app_name={$app["name"]}"; showTile($app["name"], $href, $count[0]); } else { $href = "home001.php?app_name={$app["name"]}"; showTile($app["name"], $href, 0); } echo "</div>"; } } else { if (isset($_COOKIE["default_app"])) { $app_name = $_COOKIE["default_app"]; require_once "class.ReadConfig.php"; $rc = new ReadConfig(); if ((int) $rc->readAppDbable($app_name) == 1) { header("Location: home.php?app_name=" . $app_name); } else { header("Location: home001.php?app_name=" . $app_name); } } } ?> </div> </div> </body>
echo "<p>有" . $count . "个应用</p>"; } else { echo "<p>***</p>"; } echo "</div></div>"; } #Cookie没有记录默认应用 if (!isset($_COOKIE["default_app"])) { echo "<div class='tiles'>"; echo "<div class='row title'>"; echo "<h3>不管你选还是不选,我就在这里,不悲不泣...</h3>"; echo "</div>"; echo "<div class='row tiles_home'>"; #不连接数据库,从配置文件读取内容 require_once "class.ReadConfig.php"; $rc = new ReadConfig(); $apps = $rc->readAllApp(); foreach ($apps as $app) { echo "<div class='col-xs-3'>"; showTile($app["name"], null); echo "</div>"; } } else { if (isset($_COOKIE["default_app"])) { $appname = $_COOKIE["default_app"]; header("Location: home001.php?app_name=" . $appname); } } ?> </div></div> </body>
require_once "class.DB.php"; require_once "config.php"; require_once "class.ReadConfig.php"; #质量平台页面 define("LADAOBA", "http://oa.it.mobogarden.com/login.php"); if (isset($_GET["app_name"])) { $app_name = $_GET["app_name"]; setcookie("default_app", $app_name, time() + 3600 * 24 * 30); } else { header("Location: index.php"); } #标题行 echo "<div class='row first_row'>"; echo "<div class='title_div'>"; echo "<h3 class='page_title'>{$app_name}"; $rc = new ReadConfig(); if ((int) $rc->readAppDbable($app_name) == 1) { echo "<a class='c_model' href='home.php?app_name=", $app_name, "'>数据库模式<i class='entypo-forward'></i></a>"; } echo "</h3></div>"; echo "<div class='to_orther'>"; echo "<a class='to_ladaoba' href='", LADAOBA, "'>去集成质量管理平台<i class='entypo-cloud'></i></a>"; echo "<a class='to_home' href='index.php?clear_cookie=1' class='back'>返回重新选择应用<i class='entypo-home'></i></a>"; echo "</div>"; echo "</div>"; ?> <div class="row"> <div class="progress"> <div class="progress-bar progress-bar-success" role="progressbar" style="width: 0%"> <span class="sr-only"></span> </div>