| Code: : |
| <?php if (eregi("block-vcard1.php", $_SERVER['PHP_SELF'])) { Header("Location: index.php"); die(); } global $nukeurl, $prefix, $startdate, $db; // hostname or ip of server $servername='localhost'; // username and password to log onto db server $dbusername='adminalnukhtha'; $dbpassword='xxxxxx'; // name of database $dbname='alnukhtha_com2'; //require("$path/config.php"); $dbnew=mysql_connect($servername,$dbusername,$dbpassword) or die("Unable to connect to database"); mysql_select_db($dbname) or die("Unable to select database $dbname"); $imgurl="http://www.alnukhtha.com/cards/images/"; $sql = "SELECT count(cd.card_id) AS score, cd.card_id as cid, cd.card_category AS cname, cd.card_thmfile AS fname, cd.card_caption as Title, cd.card_rating,cd.card_date FROM vcard_stats AS s LEFT JOIN vcard_cards AS cd ON s.card_id=cd.card_id LEFT JOIN vcard_category AS ct ON cd.card_category=ct.cat_id WHERE ct.cat_active='1' GROUP BY s.card_id ORDER BY score DESC LIMIT 0, 4"; $postsresult = mysql_query($sql) or die("Unable to complete query"); $content .= "<table align =center border=1>"; $content .= "<tr><td colspan=3>Cards</td></tr><tr>"; while ($topposters = mysql_fetch_array($postsresult)): $content .= "<td>".$topposters[Title]."<br><a target='_blank' href='http://www.alnukhtha.com/cards/create.php?card_id=".$topposters[cid]."'><img border=0 src='" . $imgurl.$topposters[fname]."'></a></td>"; endwhile; $content .= "</tr></table>"; ?> |
| Code: : |
| <?PHP if (eregi("block-vcard1.php", $_SERVER['PHP_SELF'])) { Header("Location: index.php"); die(); } global $db; $imgurl="http://www.alnukhtha.com/cards/images/"; $Q01 = "SELECT count(cd.card_id) AS score, cd.card_id as cid, cd.card_category AS cname, cd.card_thmfile AS fname, cd.card_caption as Title, cd.card_rating,cd.card_date FROM vcard_stats AS s LEFT JOIN vcard_cards AS cd ON s.card_id=cd.card_id LEFT JOIN vcard_category AS ct ON cd.card_category=ct.cat_id WHERE ct.cat_active='1' GROUP BY s.card_id ORDER BY score DESC LIMIT 0, 4"; $R01 = $db -> sql_query($Q01) or die("Bad Q01:".mysql_error()); $content = ""; $content = "<table align =center border=1>"; $content .= "<tr><td colspan=3>Cards</td></tr><tr>"; while($topposters = mysql_fetch_array($R01)) { $content .= "<td>".$topposters[Title]."<br><a target='_blank' href='http://www.alnukhtha.com/cards/create.php?card_id=".$topposters[cid]."'><img border=0 src='" . $imgurl.$topposters[fname]."'></a></td>"; } $content .= "</tr></table>"; ?> |
| Code: : |
<?php if (eregi("block-vcard1.php", $_SERVER['PHP_SELF'])) { Header("Location: index.php"); die(); } global $nukeurl, $prefix, $startdate, $db; // hostname or ip of server $servername='localhost'; // username and password to log onto db server $dbusername='adminalnukhtha'; $dbpassword='xxxxxx'; // name of database $dbname='alnukhtha_com2'; //require("$path/config.php"); $dbnew=mysql_connect($servername,$dbusername,$dbpassword) or die("Unable to connect to database"); mysql_select_db($dbname) or die("Unable to select database $dbname"); $imgurl="http://www.alnukhtha.com/cards/images/"; $sql = "SELECT count(cd.card_id) AS score, cd.card_id as cid, cd.card_category AS cname, cd.card_thmfile AS fname, cd.card_caption as Title, cd.card_rating,cd.card_date FROM vcard_stats AS s LEFT JOIN vcard_cards AS cd ON s.card_id=cd.card_id LEFT JOIN vcard_category AS ct ON cd.card_category=ct.cat_id WHERE ct.cat_active='1' GROUP BY s.card_id ORDER BY score DESC LIMIT 0, 4"; $postsresult = mysql_query($sql) or die("Unable to complete query"); $content .= "<table align =center border=1>"; $content .= "<tr><td colspan=3>Cards</td></tr><tr>"; while ($topposters = mysql_fetch_array($postsresult)): $content .= "<td>".$topposters[Title]."<br><a target='_blank' href='http://www.alnukhtha.com/cards/create.php?card_id=".$topposters[cid]."'><img border=0 src='" . $imgurl.$topposters[fname]."'></a></td>"; endwhile; $content .= "</tr></table>"; ?> |
| Code: : |
| $dbname='alnukhtha_com2'; |