Changeset 89 for trunk/admin
- Timestamp:
- 04/04/06 21:48:13 (3 years ago)
- Location:
- trunk/admin
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/index.php
r86 r89 17 17 */ 18 18 19 $adminmode = 1;20 19 require("../common/functions_blog.php"); 21 20 //----------------------------- … … 1004 1003 <div class="log_post"> 1005 1004 <div class="log_head"> 1006 <span class="log_subject ">1005 <span class="log_subject<?=($row["deleted"]?" log_deleted":"")?>"> 1007 1006 <?=$row["title"]?> (<?=$articles[$row["articles_id"]]?>) 1008 1007 <span class="log_cat"><br /> … … 1012 1011 </span> 1013 1012 </div> 1014 <div class="log_contents ">1013 <div class="log_contents<?=($row["deleted"]?" log_deleted":"")?>"> 1015 1014 <?=$row["comment"]?> 1016 1015 </div> … … 1019 1018 <? if (trim($row["ip"])) { ?><a href="index.php?action=blacklist_ip&commentid=<?=$row["id"]?>">blacklist ip</a><? } ?> 1020 1019 --> 1021 <a href="index.php?action=delete_comment&id=<?=$row["id"]?>">delete</a> 1020 <? if (!$row["deleted"]) { ?> 1021 <a href="index.php?action=delete_comment&id=<?=$row["id"]?>">delete</a> 1022 <? } else { ?> 1023 <a href="index.php?action=recover_comment&id=<?=$row["id"]?>">recover</a> 1024 <? } ?> 1022 1025 </div> 1023 1026 </div> … … 1047 1050 //----------------------------------------------------------- 1048 1051 function delete_comment($id) { 1049 global $db; 1050 $sql = sprintf("DELETE FROM comments WHERE id = %d", $id); 1051 $res = $db->query($sql); 1052 $sql = sprintf("UPDATE comments set deleted = %d WHERE id = %d", mktime(), $id); 1053 $res = $GLOBALS["db"]->query($sql); 1054 header("Location: index.php?action=show_comments"); 1055 } 1056 1057 //}}}------------------------------------------------------------------ 1058 //{{{ recover_comment($id): Recover a deleted comment from the database 1059 //--------------------------------------------------------------------- 1060 function recover_comment($id) { 1061 $sql = sprintf("UPDATE comments set deleted=0 WHERE id = %d", $id); 1062 $res = $GLOBALS["db"]->query($sql); 1052 1063 header("Location: index.php?action=show_comments"); 1053 1064 } … … 1090 1101 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_comments") { echo "_act"; } ?>" href="./index.php?action=show_comments">comments</a> 1091 1102 <a class="if_menu_item<? if ($_REQUEST["action"] == "show_posts") { echo "_act"; } ?>" href="./index.php?action=show_posts">posts</a> 1092 < a class="if_menu_item<? if ($_REQUEST["action"] == "show_acro") { echo "_act"; } ?>" href="./index.php?action=show_acro">acronyms</a> 1103 <!-- this one should move to plugins --><a class="if_menu_item<? if ($_REQUEST["action"] == "show_acro") { echo "_act"; } ?>" href="./index.php?action=show_acro">acronyms</a> 1093 1104 <!-- <a class="if_menu_item<? if ($_REQUEST["action"] == "show_pages") { echo "_act"; } ?>" href="./index.php?action=show_pages"> pages</a> 1094 1105 --> … … 1125 1136 case "show_comments" : show_comments($_REQUEST["options"]); break; 1126 1137 case "delete_comment" : delete_comment($_REQUEST["id"]); break; 1138 case "recover_comment": recover_comment($_REQUEST["id"]); break; 1127 1139 default : show_index(); break; 1128 1140 } -
trunk/admin/login.php
r86 r89 16 16 * at the top of the source tree. 17 17 */ 18 $adminmode = 1; 18 19 19 require("../common/functions_blog.php"); 20 20 -
trunk/admin/style/index.css
r1 r89 455 455 } 456 456 457 #if_page span.log_deleted,div.log_deleted 458 { 459 text-decoration: line-through; 460 } 461 457 462 #if_page div.log_panel 458 463 {
