Changeset 124
- Timestamp:
- 21/06/05 20:07:29 (4 years ago)
- Files:
-
- admin.lib.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
admin.lib.php
r122 r124 85 85 } 86 86 if ($this->sessionError) { 87 echo "< p class=\"invalid\">*** " . $this->sessionError . " ***</p>\n";87 echo "<div class=\"updateinfo\">Error : " . $this->sessionError . " </div>\n"; 88 88 } 89 89 } … … 138 138 echo "<li><a href=\"".$this->adminPath."settings\">"._("Settings")."</a></li>\n"; 139 139 echo "<li><a href=\"".$this->adminPath."moderatecomments\">"._("Comments"); 140 $result = db_getrow(db_query("SELECT COUNT(id) FROM comments WHERE post IN (SELECT id FROM entries WHERE user_id=".$this->id.") AND moderated=false;"));140 $result = db_getrow(db_query("SELECT count(comments.id) from comments join entries on comments.post = entries.id where moderated = false and entries.user_id = ".$this->id.";")); 141 141 if($result['count']>0){ 142 142 echo "<span style=\"font-size: 0.8em; color: red\"> (".$result['count'].")</span>"; … … 162 162 echo "<div class=\"td\">\n"; 163 163 if ($this->sessionError != "") { 164 echo "< p class=\"invalid\">*** " . $this->sessionError . " ***</p>\n";164 echo "<div class=\"updateinfo\">Error : " . $this->sessionError . "</div>\n"; 165 165 } 166 166 echo "<form action=\"".$this->adminPath."login\" method=\"post\" id=\"commentform\">\n"; … … 416 416 echo "<div class=\"entry\">\n"; 417 417 if ($this->inputError != "") { 418 echo "< p class=\"invalid\">*** " . $this->inputError . " ***</p>\n";418 echo "<div class=\"updateinfo\">Error : " . $this->inputError . "</div>\n"; 419 419 } 420 420 echo "<h2>".((!$edit) ?_("Write Entry") : _("Edit Entry"))."</h2>\n"; … … 490 490 491 491 function printComments() { 492 $result = db_query("SELECT comments.*, entries.subject,entries.shortsubject FROM comments,entries WHERE post IN (SELECT id FROM entries WHERE user_id=".$this->id.") AND moderated=false AND comments.post = entries.idORDER BY entries.subject ASC;");492 $result = db_query("SELECT comments.*, entries.subject, entries.shortsubject from comments join entries on comments.post = entries.id where moderated = false and entries.user_id = ".$this->id." ORDER BY entries.subject ASC;"); 493 493 if(db_num_rows($result)==0) { 494 494 return; … … 819 819 echo "<div class=\"adduser\">\n"; 820 820 if ($this->inputError != "") { 821 echo "< p class=\"invalid\">*** " . $this->inputError . " ***</p>\n";821 echo "<div class=\"updateinfo\">Error : " . $this->inputError . "</div>\n"; 822 822 } 823 823 elseif (isset($_POST['submit'])) {
