userid; $tag = $retarr->tag; impress("steve"); //track($UserID, $REMOTE_ADDR, $REMOTE_HOST, $HTTP_REFERER, $PHP_SELF); ?>
|
0) $previousR2--;
$numofvotes=$row["Votes"];
$average=$row["Average"];
$newrate = ($average * $numofvotes - $previousvote + $Rate) / ($numofvotes);
mysql_query ("UPDATE steve SET ".$string1." = $previousR, ".$string2." = $previousR2, Average = $newrate WHERE ID = $issue");
}
else
{
$Query = "INSERT INTO logsteve VALUES ('$UserID', '$issue', '$Rate', '$date')";
mysql_query ($Query);
$result = mysql_query ("SELECT * FROM steve WHERE ID = $issue");
$row = mysql_fetch_array($result);
$string1 = 'R'.$Rate;
$previousR = $row[$string1];
$previousR++;
$numofvotes=$row["Votes"];
$average=$row["Average"];
$newrate = ($average * $numofvotes + $Rate) / ($numofvotes + 1);
$numofvotes++;
mysql_query ("UPDATE steve SET Average = $newrate, Votes = $numofvotes, ".$string1." = $previousR WHERE ID = $issue");
}
}
if ($Keywords != '')
{
$Keywords = strtoupper($Keywords);
$KeywordsArr = explode(" ", $Keywords);
$ArrSize = sizeof($KeywordsArr);
$Query = "SELECT * FROM steve WHERE UPPER(Story) LIKE '%$KeywordsArr[0]%' ";
$i = 1;
while (($i <= $ArrSize) && ($i <= 5) )
{
$Query = $Query."AND Story LIKE '%$KeywordsArr[$i]%' ";
$i++;
}
if (($sort == 'ratings') || ($sort == ''))
{
$Query = $Query." ORDER BY Average DESC, Votes DESC LIMIT 20";
}
else
{
$Query = $Query.' ORDER BY Votes DESC, Average DESC, date DESC ';
}
$result = mysql_query($Query);
$numresult = mysql_num_rows($result);
if ($row = mysql_fetch_array($result))
{
print '
| ||||||||||||||||
Steve Goodier\'s Newsletter This section is about Steve Goodier\'s free newsletter (Life Support System). I found it to be one of the most inspirational on the net and thought that BestInspiration.com\'s visitors would appreciate it. Feel free to browse around and rate a few issues. You may also consider subscribing to the newsletter (on the left) and start receiving very inspirational messages daily, as more than 155,000 subscribers currently do. |
Steve Goodier\'s Newsletter |
Title | Rating | # of ratings | Your rating |
'.$row["Storytitle"].' | '.$row["Average"].' | '.$row["Votes"].' | '.$YourRate.' |
'.$row["Storytitle"].' | '.$row["Average"].' | '.$row["Votes"].' | '.$YourRate.' |
';
if (($prev_page) && ($x_pages > 19)) {
echo "<< Prev";
}
else if($prev_page) {
echo "<< Prev";
}
// Page # direct links
// If you don't want direct links to each page, you should be able to
// safely remove this chunk.
for ($i = 1; $i <= $x_pages; $i++) {
if ($i != $page) {
echo " $i ";
} else {
echo " $i ";
}
}
// Next
if (($page != $x_pages) && ($x_pages > 29)) {
echo " Next >>"; } else if (($page != $x_pages)) { echo "Next >>"; } ?> |
Click Here to discuss and/or comment this message or if you would like to read comments from others '; //} print ' '; ?> print ' |