PageRenderTime 51ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/admin/view/test/detail.php

https://gitlab.com/hop23typhu/doan_tienganh
PHP | 160 lines | 143 code | 17 blank | 0 comment | 38 complexity | d9c0eff978c9bf9e482f91ede752bd07 MD5 | raw file
  1. <div class="col-md-12 row" >
  2. <div class="table-responsive col-md-6 pull-left">
  3. <table class="table table-hover">
  4. <tr>
  5. <td>Tiêu đề</td>
  6. <td><b><?php if($detail->title!='') echo $detail->title; else echo "Trống"; ?></b></td>
  7. </tr>
  8. <tr>
  9. <td>Danh mục</td>
  10. <td>
  11. <b><?php
  12. $sql_group="select * from tb_article_category where id=".$detail->parentid;
  13. $group=$lib->selectone($sql_group);
  14. if($group->title=='') echo "Trống"; else echo $group->title;
  15. ?></b>
  16. </td>
  17. </tr>
  18. <tr>
  19. <td>Tin mới</td>
  20. <td><b><?php if($detail->hot!=''){ if($detail->hot==1) echo"Tin mới";else echo "Tin không mới";} else echo "Trống"; ?></b></td>
  21. </tr>
  22. <tr>
  23. <td>Hẹn giờ</td>
  24. <td><b><?php
  25. if($detail->timer!= '0000-00-00 00:00:00' && $detail->timer!='' )
  26. {
  27. $ngayhomnay = date("Y-m-d H:i:s"); // Năm/Tháng/Ngày
  28. $ngaysosanh = $detail->timer; // Năm/Tháng/Ngày
  29. if (strtotime($ngayhomnay) > strtotime($ngaysosanh)) {
  30. echo 'Đã xuất bản';
  31. }else{
  32. echo date('H:i d/m/Y', strtotime($detail->timer));
  33. }
  34. }
  35. else echo 'Đã xuất bản';
  36. ?></b></td>
  37. </tr>
  38. <tr>
  39. <td>Trạng thái</td>
  40. <td><b><?php if($detail->publish!=''){ if($detail->publish==1) echo"Hoạt động";else echo "Khoá";} else echo "Trống"; ?></b></td>
  41. </tr>
  42. <tr>
  43. <td>Lượt xem</td>
  44. <td>
  45. <b><?php if($detail->viewed!='') echo $detail->viewed; else echo "Trống"; ?></b>
  46. </td>
  47. </tr>
  48. <tr>
  49. <td>Đánh giá </td>
  50. <td>
  51. <b>Tốt</b>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td>Người viết bài</td>
  56. <td>
  57. <b><?php
  58. $sql_usercreated="select * from tb_user where id=".$detail->userid_created;
  59. $usercreated=$lib->selectone($sql_usercreated);
  60. if($usercreated->username=='') echo "-"; else echo $usercreated->username;
  61. ?></b>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td>Ngày xuất bản</td>
  66. <td>
  67. <b><?php
  68. if($detail->created!= '0000-00-00 00:00:00' && $detail->created!='' )
  69. echo date('H:i d/m/Y', strtotime($detail->created));
  70. else echo 'Trống';
  71. ?></b>
  72. </td>
  73. </tr>
  74. <tr>
  75. <td>Người chỉnh sửa bài viết</td>
  76. <td>
  77. <b><?php
  78. if($detail->userid_updated!='')
  79. {
  80. $sql_userupdated="select * from tb_user where id=".$detail->userid_updated;
  81. $userupdated=$lib->selectone($sql_userupdated);
  82. if($userupdated->username=='') echo "-"; else echo $userupdated->username;
  83. }else echo "Trống";
  84. ?></b>
  85. </td>
  86. </tr>
  87. <tr>
  88. <td>Ngày chỉnh sửa</td>
  89. <td>
  90. <b><?php
  91. if($detail->updated!= '0000-00-00 00:00:00' && $detail->updated!='' )
  92. echo date('H:i d/m/Y', strtotime($detail->updated));
  93. else echo 'Trống';
  94. ?></b>
  95. </td>
  96. </tr>
  97. <tr>
  98. <td>Thẻ Meta Title</td>
  99. <td><b><?php if($detail->meta_title!='') echo $detail->meta_title; else echo "Trống"; ?></b></td>
  100. </tr>
  101. <tr>
  102. <td>Thẻ Meta Keywords</td>
  103. <td><b><?php if($detail->meta_keywords!='') echo $detail->meta_keywords; else echo "Trống"; ?></b></td>
  104. </tr>
  105. <tr>
  106. <td>Thẻ Meta Description</td>
  107. <td><b><?php if($detail->meta_description!='') echo $detail->meta_description; else echo "Trống"; ?></b></td>
  108. </tr>
  109. </table>
  110. </div>
  111. <div class="table-responsive col-md-5 pull-right">
  112. <table class="table table-hover">
  113. <tr>
  114. <td></td>
  115. <td>
  116. <b>
  117. <?php if($detail->image!='') echo "<img class='anhdaidien' src='".$detail->image."' width='250'" ;else echo "Chưa có ảnh đại diện"; ?></b>
  118. </td>
  119. </tr>
  120. <tr>
  121. <td></td>
  122. <td>
  123. <a href="<?php echo $url; ?>index.php?page=article&action=edit&form=1&id=<?php echo $detail->id; ?>" class="btn btn-info">Chỉnh sửa</a>
  124. </td>
  125. </tr>
  126. </table>
  127. </div>
  128. <div class="table-responsive col-md-12 ">
  129. <table class="table table-hover">
  130. <tr>
  131. <td>Trích dẫn</td>
  132. <td>
  133. <?php if($detail->description!='') echo $detail->description; else echo "Trống"; ?>
  134. </td>
  135. </tr>
  136. <tr>
  137. <td>Nội dung</td>
  138. <td>
  139. <?php if($detail->content!='') echo $detail->content; else echo "Trống"; ?>
  140. </td>
  141. </tr>
  142. </table>
  143. </div>