$result=mysql_query("select lid, cid, sid, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from links_links where date LIKE '%$newlinkDB%' order by title ASC");
echo "<b><br><font color=BBBBBB size=2>".translate("Sites currently sorted by").": $orderbyTrans</font></b></center><br><br>";
$result=mysql_query("select lid, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from links_links where cid=$cid AND sid=0 order by $orderby limit $min,$perpage ");
$fullcountresult=mysql_query("select lid, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from links_links where cid=$cid AND sid=0");
echo "<b><br><font color=BBBBBB size=2>".translate("Sites currently sorted by").": $orderbyTrans</font></b></center><br><br>";
$result=mysql_query("select lid, url, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from links_links where sid=$sid order by $orderby limit $min,$perpage");
$fullcountresult=mysql_query("select lid, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from links_links where sid=$sid");
$result = mysql_query("select lid, cid, sid, title, url, description, date, hits, linkratingsummary, totalvotes, totalcomments from links_links where title LIKE '%$query%' OR description LIKE '%$query%' ORDER BY $orderby LIMIT $min,$linksresults");
$fullcountresult=mysql_query("select lid, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from links_links where title LIKE '%$query%' OR description LIKE '%$query%' ");
echo "<br><br><center>".translate("No editorial is currently available for this website.")."</center><br>";
}
echo "</table><br><br>";
linkfooter($lid,$ttitle);
CloseTable();
include("footer.php");
}
function detecteditorial($lid, $ttitle) {
$resulted2 = mysql_query("select adminid from links_editorials where linkid=$lid");
$recordexist = Mysql_num_rows($resulted2);
// if returns 'bad query' status 0 (add editorial)
if ($recordexist != 0) echo " | <a href=links.php?op=viewlinkeditorial&lid=$lid&ttitle=$ttitle>Editorial</a>";
}
function viewlinkcomments($lid, $ttitle) {
global $admin;
include("header.php");
OpenTable();
mainheader();
$result=mysql_query("SELECT ratinguser, rating, ratingcomments, ratingtimestamp FROM links_votedata WHERE ratinglid = $lid AND ratingcomments != '' ORDER BY ratingtimestamp DESC");
<a href=links.php?op=visit&lid=$lid target=_blank>".translate("Visit this Website")."</a> | <a href=links.php?op=ratelink&lid=$lid&ttitle=$ttitle>".translate("Rate this Website")."</a><br><br>";
linkfooterchild($lid);
}
function linkfooterchild($lid) {
if ($useoutsidevoting = 1) { echo "<br><center><hr size=1 noshade><font size=-1>".translate("Is this your resource?")." <a href=links.php?op=outsidelinksetup&lid=$lid>".translate("Allow users to rate your script from your web site!")."</center></a></font>"; }
}
function outsidelinksetup($lid) {
include("header.php");
OpenTable();
mainheader();
echo "<center><font size=3><br><b>".translate("Promote Your Website")."</b></font></center><br><br>";
echo "
<table width=90%>
If the resource you were rating at the time you clicked on the 'remote rate'
link was your own, you may be interested in several of the remote 'Rate a
Website' options we have available. These allow you to place an image (or
even a rating form) on your script's web site in order to increase the number
of votes your website receive. Please choose from one of the options listed
below if this is something you are interested in:<br><br>
<b>Please, no cheating...</b><br>
We have had several cases where a website has been removed from the directory due
to cheating involved with our rating system. We usually find these, even when they are
very obscure, either from user reportings or routine checks by staff. By being
removed from the directory, you'll lose more accesses than you ever would by falsely
bolstering your rating value.<br><br>
<b>1. Text Links</b><br><br>
One way to link to the rating form is through a simple text link, such as:<br><br>
<center><a href=$nuke_url/links.php?op=ratelink&lid=$lid>Rate this Website @ $sitename</a></center><br><br>
<center>The HTML code you should use in this case, is the following:</center><br>
<center><textarea rows=4 name=S1 cols=50><a href=\"$nuke_url/links.php?op=ratelink&lid=$lid\">Rate this Website @ $sitename</a></textarea></center>
<br><br>
The number '$lid' in the HTML source references the resource id number in $sitename link directory database. You should make sure you link to the correct website.<br><br>
<b>2. Small Image Links</b><br><br>
If you're looking for a little more than a basic text link, you may wish for one of our smaller image links to the rating form:<br><br>
<center>Right click on image and 'Save Image'. <b>Do NOT link this image from our site!</b> Copy the image to your website and change the links as appropriate</center><br><br>
Our policies on the use of a remote rating form on your web site are very strict. If we find a web site in violation of the acceptable terms, we have the right to block all incoming votes from the offending web site or remove your listing from $sitename entirely. The only voting mechanisms required on a remote site are the form types shown below, unless you get permission to use a different rating form scheme. Basically, we want the default vote set to '--' and the user must be able to freely choose from 1 - 10. Any site that we find that is attempting to submit all 10's or something similar when a user simply hits submit will be in violation of the remote rating rules.<br><br>
Having said that, here is what the current remote rating form looks like. If we get significant user feedback, we will create others. If you wish to have something custom made on your site, feel free, but make sure you get it approved by us and that it follows the basic guidelines set forth above.<br><br>
<p align=right><input type=image src=$nuke_url/images/ratebutton.gif name=op value=addrating width=63 height=17 alt=\"Rate Link at $sitename\"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td></tr></table></center>
<table width=90% align=center>
<br><br>
Using this form will allow users to rate your website directly from your site and the rating will be recorded. The above form is disabled, but the following source code will work if you simply cut and paste it into your web page, copy the images (top, bottom, and button), and change image paths to your site. The source code is shown below:<br><br>
$result=mysql_query("select * FROM links_votedata WHERE ratinglid=$ratinglid AND ratinguser='$anonymous' AND ratinghostname = '$ip' AND TO_DAYS(NOW()) - TO_DAYS(ratingtimestamp) < $anonwaitdays");
$anonvotecount = mysql_num_rows($result);
if ($anonvotecount >= 1) {
$error = "anonflood";
completevote($error);
$passtest = "no";
}
}
// Check if OUTSIDE user is trying to vote more than once per day.
$result=mysql_query("select * FROM links_votedata WHERE ratinglid=$ratinglid AND ratinguser='outside' AND ratinghostname = '$ip' AND TO_DAYS(NOW()) - TO_DAYS(ratingtimestamp) < $outsidewaitdays");
function completevotefooter($lid, $ttitle, $ratinguser) {
$result=mysql_query("select url FROM links_links WHERE lid=$lid");
list($url)=mysql_fetch_row($result);
echo "
</td>
</tr>
<tr>
<td>
<font size=2>".translate("Thank you for taking the time to rate a site here at $sitename. Input from users such as yourself will help other visitors better decide which links to click on.")."</font><br><br><br>
</td>
</tr>";
if ($ratinguser=="outside") {
echo "
<tr>
<td>
<font size=2><center>".translate("We appreciate your visit to $sitename!")."</center><br><center><a href=$url>".translate("Return to")." $ttitle</a></font><center><br><br>
</td>
</tr>";
$result=mysql_query("select title FROM links_links where lid=$lid");
list($title)=mysql_fetch_row($result);
$ttitle = ereg_replace (" ", "_", $title);
}
echo "
</table>
<br><br>";
linkinfomenu($lid,$ttitle);
}
function completevote($error) {
$anonwaitdays = 1;
if ($error == "none") echo "<center><b><font size=2>".translate("Your vote is appreciated.")."</font></b></center>";
if ($error == "anonflood") echo "<font size=3 color=Red><b><center>".translate("You have already voted for this link in the past $anonwaitdays day(s).")."</center></b><br>";
if ($error == "regflood") echo "<font size=3 color=Red><b><center>".translate("Vote for a link only once.<br>All votes are logged and reviewed.")."</center></b><br>";
if ($error == "postervote") echo "<font size=3 color=Red><b><center>".translate("You cannot vote on a link you submitted.<br>All votes are logged and reviewed.")."</center></b><br>";
if ($error == "nullerror") echo "<font size=3 color=Red><b><center>".translate("No rating selected - no vote tallied")."</center></b><br>";
if ($error == "outsideflood") echo "<font size=3 color=Red><b><center>".translate("Only one vote per IP address allowed every")." $outsidewaitdays ".translate("day(s).")."</center></b><br>";