Changeset 4823
- Timestamp:
- 06/06/07 16:31:02 (1 year ago)
- Files:
-
- animanga/trunk/scripts/sensei/comments.pl (modified) (2 diffs)
- animanga/trunk/scripts/sensei/toplist.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
animanga/trunk/scripts/sensei/comments.pl
r4330 r4823 50 50 $founddata = $a->selectAll("*", "comments LEFT JOIN users ON comments.uid = users.uid", { "comments.ip" => $query, writestatus => $writestatus }, "ORDER BY time DESC LIMIT 50"); 51 51 52 $a->displayComments($founddata, $a->constant("commentlist"), 1,0, \$foundcomments);52 $a->displayComments($founddata, $a->constant("commentlist"), 0, \$foundcomments); 53 53 } 54 54 elsif($query =~ /^\d+$/) { 55 55 $founddata = $a->selectAll("*", "comments LEFT JOIN users ON comments.uid = users.uid", { "users.uid" => $query, writestatus => $writestatus }, "ORDER BY time DESC LIMIT 50"); 56 56 57 $a->displayComments($founddata, $a->constant("commentlist"), 1,0, \$foundcomments);57 $a->displayComments($founddata, $a->constant("commentlist"), 0, \$foundcomments); 58 58 } 59 59 elsif($query) { … … 61 61 $founddata = $a->selectAll("*, (subject LIKE $lquery) AS keywords", "comments LEFT JOIN users ON comments.uid = users.uid", { writestatus => $writestatus }, "HAVING keywords > '0' ORDER BY keywords DESC, subject ASC LIMIT 50"); 62 62 63 $a->displayComments($founddata, $a->constant("commentlist"), 1,0, \$foundcomments);63 $a->displayComments($founddata, $a->constant("commentlist"), 0, \$foundcomments); 64 64 } 65 65 animanga/trunk/scripts/sensei/toplist.pl
r2780 r4823 38 38 39 39 foreach ((1, 7, 30, 90, 365)) { 40 my $row = $an->selectHashref("$_ AS period, COUNT(*) AS count", "sessions", " time > NOW() - INTERVAL $_ DAY");40 my $row = $an->selectHashref("$_ AS period, COUNT(*) AS count", "sessions", "currenttime > NOW() - INTERVAL $_ DAY"); 41 41 42 42 push(@activeusers, $row);
