require 'header.php';
/* 判断是否输入了 pageID */
if (empty($_GET['pageID'])) {
echo "需要传入有效的 pageID。";
exit;
}
/* 判断该 pageID 是否存在 */
$pageID = $_GET['pageID'];
$usersJson= $datapath . "/user.json";
$strUsers = file_get_contents($usersJson);
$users = json_decode($strUsers, true);
if (!(array_key_exists($pageID, $users))) {
// 该 pageID 不存在
exit('"' . $pageID . '" 这个 pageID 还没有人使用,无法查看。');
}
$jsonFileName = $datapath . "/siteid_" . $pageID . ".json";
$string = file_get_contents("$jsonFileName");
$json_a = json_decode($string, true);
if ($json_a == FALSE) {
echo "Json 数据格式不正确,请先纠正。";
exit;
}
// -----------------------------------------------------------------------------
?>
<?php echo $pageID; ?>.fenlei {}
.fenlei:hover {
cursor:pointer;
}
.wangzhiliebiao {}
编辑本页
展开所有
折叠所有
$zindexCounter = 1000;
foreach ($json_a as $fenlei => $wangzhi) {
?>
$zindexCounter += 1;
}
?>
addBackToTop({
diameter: 56,
backgroundColor: 'rgb(255, 82, 82)',
textColor: '#fff',
scrollDuration: 300, // ms
zIndex: 2000
})
$(document).ready(function() {
function showLinkList(){
var nextBrotherElement = $(this).next();
if (nextBrotherElement.css('display') == 'block') {
nextBrotherElement.slideUp();
} else {
nextBrotherElement.slideDown();
}
}
$(document).on("click",".fenlei",showLinkList);
});
$(document).ready(function() {
function openAll() {
$('.wangzhiliebiao').slideDown();
}
function closeAll() {
$('.wangzhiliebiao').slideUp();
}
function editPage() {
window.open("edit.php?pageID=<?php echo $pageID; ?>", "_self");
}
$(document).on("click", "#btnOpen", openAll);
$(document).on("click", "#btnClose", closeAll);
$(document).on("click", "#btnEdit", editPage);
});
echo $analysisCode;
?>
一键复制
编辑
Web IDE
原始数据
按行查看
历史