$next=db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE b.parent = '$node->parent' AND b.weight > $node->weight ORDER BY b.weight ASC"));
$prev=db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE b.parent = '$node->parent' AND b.weight < $node->weight ORDER BY b.weight DESC"));
$parent=db_fetch_object(db_query("SELECT n.nid, n.title, b.parent FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.nid = '$node->parent'"));
if($parent->title){
...
...
@@ -41,7 +26,7 @@ function book_location($node, $nodes = array()) {
$result=db_query("SELECT n.*, b.* FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.type = 'book' AND n.status = '$status[posted]' AND b.parent = '$parent' ORDER BY b.weight");
$next=db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE b.parent = '$node->parent' AND b.weight > $node->weight ORDER BY b.weight ASC"));
$prev=db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE b.parent = '$node->parent' AND b.weight < $node->weight ORDER BY b.weight DESC"));
$parent=db_fetch_object(db_query("SELECT n.nid, n.title, b.parent FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.nid = '$node->parent'"));
if($parent->title){
...
...
@@ -41,7 +26,7 @@ function book_location($node, $nodes = array()) {
$result=db_query("SELECT n.*, b.* FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.type = 'book' AND n.status = '$status[posted]' AND b.parent = '$parent' ORDER BY b.weight");
$r2=db_query("SELECT COUNT(nid) AS number FROM node WHERE author = '$rating->id' AND (".time()." - timestamp < $period) AND status = '$status[posted]'");
if($story=db_fetch_object($r2)){
$bonus+=$story->number/2;
}
$r3=db_query("SELECT COUNT(nid) AS number FROM node WHERE author = '$rating->id' AND (".time()." - timestamp < $period) AND status = '$status[dumped]'");
if($story=db_fetch_object($r3)){
$bonus-=$story->number/2;
}
$r4=db_query("SELECT score, votes FROM comments WHERE author = '$rating->id' AND (".time()." - timestamp < $period) ORDER BY timestamp LIMIT $number");
while($comment=db_fetch_object($r4)){
$weight++;
$score+=$weight*$comment->score;
$votes+=$weight*$comment->votes;
}
if($weight>=$offset&&$votes>0){
$value=($score+$weight)/$votes+$bonus;
db_query("UPDATE users SET rating = '$value' WHERE id = '$rating->id'");
}
while($account=db_fetch_object($result)){
db_query("UPDATE users SET rating = '".user_gravity($account->id)."' WHERE id = '$account->id'");
<P>Queued stories: user-contributed stories are automatically whisked away to a submission queue for moderators (i.e. registered user) to frown at. Moderators vote whether or not a story should be posted to the front page for discussion.</P>
<P>Queued stories: user-contributed stories are automatically whisked away to a submission queue for moderators (i.e. registered user) to frown at. Moderators vote whether or not a story should be posted to the front page for discussion.</P>
$theme->box(t("Warning: not found"),t("The content or data you requested does not exist or is not accessible."));
$theme->box(t("Not found"),t("The node you are looking for does not exist yet or is no longer accessible:")."<UL><LI><A HREF=\"search.php\">".t("search node")."</A></LI><LI><A HREF=\"submit.php\">".t("add node")."</A></LI></UL>\n");