Top Software Reviews:
include("inc/ip2country.php");
$skin = "grey";
include("config.php");
$link_id = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
if ($link_id->connect_errno) {
echo "Не удалось подключиться к MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
$sql = "SELECT
paddata.progid AS progid,
paddata.title AS title,
usrreviews.useripaddr AS useripaddr,
usrreviews.revtime AS revtime,
usrreviews.username AS username,
usrreviews.userrating AS userrating,
usrreviews.usercomment AS usercomment
FROM usrreviews, paddata WHERE usrreviews.progid = paddata.progid ORDER BY usrreviews.revtime DESC LIMIT 40";
$sresult = $link_id->query($sql);
while($squery = mysqli_fetch_array($sresult)) {
$suseripaddr = $squery["useripaddr"];
$sprogid = $squery["progid"];
$stitle = $squery["title"];
$srevtime = $squery["revtime"];
$susername = $squery["username"];
$suserrating = $squery["userrating"];
$susercomment = substr($squery["usercomment"], 0, 120) . "...";
// Showing up the software name in URL for better search engines ranking
$sseotitle = preg_replace("/(\W+)/", "-", strtolower($stitle));
echo "" . $stitle . " \nComment: " . $susercomment . " [read more] \nReviewed by " . $susername . " (" . ip2country($suseripaddr) . ") at " . $srevtime . ": \n";
}
?>
|