Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Top100.php

Parašė musulmonas· 2008 Geg. 8 08:05:03
#3

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

opentable("Whos-Blazin' Topsites");

if($HTTP_GET_VARS['action'] == "join"){

   $result = dbquery("INSERT INTO ".$db_prefix."toplist VALUES('', '".stripinput($HTTP_POST_VARS['webname'])."', '".stripinput($HTTP_POST_VARS['weburl'])."', '".stripinput($HTTP_POST_VARS['yourname'])."', '".stripinput($HTTP_POST_VARS['sitebutton'])."', '".stripinput($HTTP_POST_VARS['youremail'])."', '0', '0')");
   $data = dbarray(dbquery("SELECT * FROM ".$db_prefix."toplist WHERE name='".stripinput($HTTP_POST_VARS['webname'])."'"));

   echo "Thank you for your interest in our Topsites<br>
        Your website has been added to the directory and you can immediently begin using this link:<br><br>";
   echo "- <a href='".$settings['siteurl']."in.php?id=".$data['id']."'>".$settings['siteurl']."in.php?id=".$data['id']."</a> (Use this to link to our website)<br>";
   echo "<br>And, on the Top 100 page, we will list your site and when users click on the link, it adds to the Outgoing traffic counter.<br><br>";
   echo "Click <a href='".FUSION_SELF."'>here</a> to continue";
   closetable();

} elseif($_GET['action'] == "delete"){

   $result = dbquery("SELECT * FROM ".$db_prefix."toplist WHERE id='".$_GET['id']."'");
   if(dbrows($result) != 0){
   $deltop = dbquery("DELETE FROM ".$db_prefix."toplist WHERE id='".$_GET['id']."'");
   fallback(FUSION_SELF);
   } else {
   fallback(FUSION_SELF);
   }

} else {

   echo "Welcome to Whos-Blazin' Top 100!<br><br>";
   $result = dbquery("SELECT * FROM ".$db_prefix."toplist");
   if(dbrows($result) != 0){
   echo "<table width='500' cellpadding='1' cellspacing='1' bgcolor='#000000'>";
   
   echo "<tr><td class='tbl2'><b>Website</b></td><td class='tbl2'><b>Owner</b></td><td class='tbl2'><b>Site Button</b></td><td class='tbl2'><b>In</b></td><td class='tbl2'><b>Out</b></td><td class='tbl2'><b>Options</b></td></tr>";
   
   while($data = dbarray($result)){
   echo "<tr><td class='tbl2'><a href='out.php?id=".$data['id']."'>".$data['name']."</a></td>";
   echo "<td class='tbl1'><a href='mailto:".$data['email']."'>".$data['owner']."</a></td>";
   echo "<td class='tbl2'><img src='$result['sitebutton']."'></td>";
   echo "<td class='tbl1'>".$data['incnt']."</td><td class='tbl2'>".$data['outcnt']."</td>";
   if(iADMIN){
   echo "<td class='tbl1'><a href='".FUSION_SELF."?action=delete&id=".$data['id']."'>Delete</a></td>";
   }
   echo "</tr>";
   }
   
   echo "</table>";
   } else {
   echo "There are currently no websites on the Toplist, please show your support and register below!";
   }
   
   closetable();
   echo "<br>";
   opentable("Join the topsites list");
   echo "<table><form name='joincgn' action='".FUSION_SELF."?action=join' method='post'>";
   echo "<tr><td>Website Name:</td><td><input type='textbox' name='webname' class='textbox'></td></tr>";
   echo "<tr><td>Website URL:</td><td><input type='textbox' name='weburl' class='textbox' value='http://' size='50'> (must include <b>http://</b>)</td></tr>";
   echo "<tr><td>Your Name:</td><td><input type='textbox' name='yourname' class='textbox'></td></tr>";
   echo "<tr><td>Site Button:</td><td><input type='textbox' name='sitebutton' class='textbox' value='http://' size='50'> (must include <b>http://</b>)</td></tr>";
   echo "<tr><td>Your E-mail Address:</td><td><input type='textbox' name='youremail' class='textbox'></td></tr>";
   echo "</table><input type='submit' name='submit' value='Join' class='button'></form>";
   closetable();
   echo "<center><a href='http://www.cgeagles.com'>Powered by CGeagles Productions</a></center>";

}



require_once "side_right.php";
require_once "footer.php";
?>