Commit 216741b6 by kevin

优化详情页

parent c29ca944
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>日志详情页</title> <title>日志详情页</title>
</head> </head>
<style type="text/css"> <style type="text/css">
.wrapper {width: 1000px;margin: 20px auto;} .wrapper {width: 1000px;margin: 20px auto;}
h2 {text-align: center;} h2 {text-align: center;}
.add {margin-bottom: 20px;} .add {margin-bottom: 20px;}
.add a {text-decoration: none;color: #fff;background-color: green;padding: 6px;border-radius: 5px;} .add a {text-decoration: none;color: #fff;background-color: green;padding: 6px;border-radius: 5px;}
td {text-align: center;} td {text-align: center;}
</style> </style>
<body> <body>
<div class="wrapper"> <div class="wrapper">
<h2>日志详情页</h2> <?php
<table width="960"> // 处理增加操作的页面
require "dbconfig.php";
<?php // 连接mysql
// 处理增加操作的页面 $link = @mysqli_connect(HOST,USER,PASS, DBNAME) or die("提示:数据库连接失败!");
require "dbconfig.php"; // 选择数据库
// 连接mysql mysqli_select_db($link, DBNAME);
$link = @mysqli_connect(HOST,USER,PASS, DBNAME) or die("提示:数据库连接失败!"); // 编码设置
// 选择数据库 mysqli_set_charset($link,'utf8');
mysqli_select_db($link, DBNAME);
// 编码设置 $id = $_GET['id'];
mysqli_set_charset($link,'utf8');
// 3. 从DBNAME中查询到news数据库,返回数据库结果集,并按照addtime降序排列
$id = $_GET['id']; $sql = "select * from leakCanary where id={$id} order by id asc;";
// 3. 从DBNAME中查询到news数据库,返回数据库结果集,并按照addtime降序排列 // 结果集
$sql = "select * from leakCanary where id={$id} order by id asc;"; $result = mysqli_query($link, $sql) or die('添加数据出错:'.mysqli_error());
// var_dump($result);
// 结果集
$result = mysqli_query($link, $sql) or die('添加数据出错:'.mysqli_error()); // 解析结果集,$row为新闻所有数据,$newsNum为新闻数目
// var_dump($result); $count= mysqli_num_rows($result);
// 解析结果集,$row为新闻所有数据,$newsNum为新闻数目 // for($i=0; $i<$count; $i++){
$count= mysqli_num_rows($result); $row = mysqli_fetch_assoc($result);
// echo $row;
// for($i=0; $i<$count; $i++){ $contentJson = $row["contentJson"];
$row = mysqli_fetch_assoc($result);
// echo $row; $json=json_decode($contentJson,true);
$contentJson = $row["contentJson"]; $leakTrace = $json["leakTrace"];
$elements = $leakTrace["elements"];
$json=json_decode($contentJson,true); $className = $json["className"];
$leakTrace = $json["leakTrace"]; echo "<div class=title>{$className}</div>";
$elements = $leakTrace["elements"];
$className = $json["className"]; foreach ($elements as $key => $value) {
echo "<div class=title> $classChildName = $value["className"];
{$className} $referenceName = $value["referenceName"];
</div>"; $classHierarchy = $value["classHierarchy"];
echo "
foreach ($elements as $key => $value) { <div class=\"track-rcol\">
$classChildName = $value["className"]; <div class=\"track-list\">
$referenceName = $value["referenceName"]; <ul>
$classHierarchy = $value["classHierarchy"]; <li class=\"first\">
echo "<hr class=line />"; <i class=\"node-icon\"></i>
echo "<div class=title-0> <div class=txt>
{$classChildName} {$classChildName}
</div> </div>
<div class=title-1> </li>
{$referenceName} <li>
</div>"; ";
echo "
foreach ($classHierarchy as $key => $value) { <div class=title-1>
{$referenceName}
echo "<div class=title-2> </div>
{$value} ";
</div>"; foreach ($classHierarchy as $key => $value) {
}
echo "
} <div class=title-2>
------- {$value}
echo "<div class=line></div>"; </div>
/*echo "</tr>";*/ ";
// } }
// 5. 释放结果集 echo "</li>
mysqli_free_result($result); </ul>
mysqli_close($link); </div>
?> </div>";
}
</table>
echo "<div class=line></div>";
<script type="text/javascript"> /*echo "</tr>";*/
function changestatus (id) { // }
if (confirm("确定要修改该日志吗?")){ // 5. 释放结果集
window.location = "action-del.php?id="+id; mysqli_free_result($result);
} mysqli_close($link);
} ?>
function enterpage (id) {
window.location = "detail.php?id="+id; </table>
}
</script> <script type="text/javascript">
<style type="text/css"> function changestatus (id) {
.time{ if (confirm("确定要修改该日志吗?")){
margin-top: 30px; window.location = "action-del.php?id="+id;
font-size: 16px; }
margin-left: 20px; }
text-decoration:none; function enterpage (id) {
} window.location = "detail.php?id="+id;
.title{ }
margin-top: 40px; </script>
font-size: 32px; <style type="text/css">
font-weight: bold; .time{
color: #000000; margin-top: 30px;
} font-size: 16px;
.title-0{ margin-left: 20px;
margin-top: 20px; text-decoration:none;
font-size: 16px; }
font-weight: bold; .title{
color: #000; margin-top: 60px;
} margin-bottom: 60px;
.title-1{ font-size: 32px;
margin-top: 10px; font-weight: bold;
font-size: 16px; color: #000000;
color: #000; }
text-decoration:underline; .title-0{
} margin-top: 20px;
.title-2{ font-size: 16px;
margin-top: 10px; font-weight: bold;
margin-left:50px; color: #000;
font-size: 16px; }
text-decoration:none; .title-1{
color: #ff0000; margin-top: 10px;
} margin-bottom: 10px;
font-size: 18px;
.line{ color: #000;
margin-top: 20px; text-decoration:underline;
margin-bottom: 50px; }
} .title-2{
margin-top: 10px;
.bottom{ font-size: 14px;
display: flex; text-decoration:none;
align-items: flex-end; color: #ff0000;
} }
</style>
.line{
margin-top: 20px;
margin-bottom: 50px;
}
.bottom{
display: flex;
align-items: flex-end;
}
body {
font-size: 12px;
}
ul li {
list-style: none;
}
.track-rcol {
width: 100%;
border: 1px solid #eee;
}
.track-list {
margin: 20px;
padding-left: 5px;
position: relative;
}
.track-list li {
position: relative;
padding: 9px 0 0 25px;
line-height: 18px;
border-left: 1px solid #d9d9d9;
color: #999;
}
.track-list li.first {
color: red;
padding-top: 0;
border-left-color: #fff;
}
.track-list li .node-icon {
position: absolute;
left: -6px;
top: 50%;
width: 11px;
height: 11px;
background: url(images/img-1.jpg) -21px -72px no-repeat;
}
.track-list li.first .node-icon {
background-position: 0 -72px;
}
.track-list li .time {
margin-right: 20px;
position: relative;
top: 4px;
display: inline-block;
vertical-align: middle;
}
.track-list li .txt {
position: relative;
top: 4px;
font-size: 22px;
color: #000000;
display: inline-block;
vertical-align: middle;
}
.track-list li.first .time {
margin-right: 20px;
}
.track-list li.first .txt {
max-width: 600px;
}
</style>
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment