Commit 72bbe461 by jackzhou

修改

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