View file index.php

File size: 5.96Kb
<?php
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////                                                                                              ////////////////////////
///////////////////                           SCRIPT BY WAP-RULER aka ARNAB                                     /////////////////////
//////////////             CONTACT ME @ fb.me/arnab2012 or EMAIL : arnab2098@gmail.com                      /////////////////////////
//////////////////                             Buy Hosting : Hosthurry.CoM                                     //////////////////////
/////////////                                 My Download Portal : PJFun.CoM                                /////////////////////////
//////////////////                                                                                             //////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

error_reporting(0);
require_once"./includes/functions/gzip.php";
if(!array_key_exists('HTTP_ACCEPT', $_SERVER) || empty($_SERVER['HTTP_ACCEPT'])){ 
$_GET['ver'] = 'html';
} else {
if(preg_match('/(application|text)\/(html|xhtml|xml|xhtml\+xml|xslt\+xml)/i', $_SERVER['HTTP_ACCEPT']) && !isset($_GET['ver'])) $_GET['ver'] = 'html';
elseif (preg_match('/(application|text)\/(html|xhtml|xml|xhtml\+xml|xslt\+xml)/i', $_SERVER['HTTP_ACCEPT']) && !isset($_GET['ver'])) $_GET['ver'] = 'html';
elseif(!isset($_GET['ver'])) $_GET['ver'] = 'html';
}
list($msec, $sec) = explode(chr(32), microtime());
$headtime = $sec + $msec;

include("config.php");
include("./includes/constants/index");
include("./includes/".$ver."/banned");

$nocache = rand(1000, 9999);

switch($ver)
{
case 'wml':
///////////////////////////////////////////////////////
//WML VERSION
///////////////////////////////////////////////////////

header("Content-type: text/vnd.wap.wml; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-revalidate");

echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\">\n<wml>\n";

$chat = file("chat.dat");
$logo = trim($chat[0]);
$message = trim($chat[1]);

$q = mysql_query("SELECT COUNT(`id`) FROM `chat_users` WHERE `time` >= ".time().";");
$online = mysql_result($q, 0);

$q = mysql_query("SELECT COUNT(`id`) FROM `chat_users`;");
$users = mysql_result($q, 0);
echo "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>\n";
echo "<card id=\"index\" title=\"".TITLE."\"><p align=\"center\">\n";
echo "<!-- Developed by Developed by ILI -->\n";
if(!empty($logo)) echo "<img src=\"http://$logo\" alt=\"\" /><br/>\n";
if(!empty($message)) echo "$message<br/>\n";
echo "<a href=\"http://facebook.com/bigblastin\">".FACE."</a><br/>\n";
echo "Nick :<br/>\n";
echo "<input type=\"text\" name=\"nickname$nocache\" maxlength=\"15\"/><br/>\n";
echo "Password:<br/>\n";
echo "<input type=\"password\" name=\"password$nocache\" maxlength=\"20\"/><br/>\n";
echo "<anchor>[Login]<go href=\"menu.php?ver=wml&amp;nocache=$nocache\" method=\"post\">\n";
echo "<postfield name=\"nickname\" value=\"$(nickname$nocache)\"/>\n";
echo "<postfield name=\"password\" value=\"$(password$nocache)\"/>\n";
echo "<postfield name=\"action\" value=\"auth\"/>\n";
echo "</go></anchor><br/>\n";
echo ONLINE.": <a href=\"inchat.php?ver=wml\">$online</a><br/>\n";
echo REG_USERS.": ".$users."<br/>\n";
echo "<a href=\"rules.php?ver=wml&amp;action=registration\">Register</a><br/>\n";
echo "<a href=\"./?ver=html\">HTML</a> | WML<br/>\n";

echo "<b>Powered By:</b><br/>\n";
echo "<a href=\"http://superkrazy.wapka.mobi\">".MAIN."</a><br/>\n";
echo "<br />\n";
list($msec, $sec) = explode(chr(32), microtime());
echo "<small>[".round(($sec + $msec) - $headtime, 5)."]</small><br/>\n";
require_once "includes/functions/gzip_foot.php";
echo "</p></card></wml>";
ob_end_flush();
break;

case 'html':
///////////////////////////////////////////////////////
//HTML VERSION
///////////////////////////////////////////////////////

$my_title = "YourSiteName";
if(!isset($_COOKIE['theme'])) $_COOKIE['theme'] = 1;
include_once "themes/".intval($_COOKIE['theme'])."/index.php";
  
include_once("adzfun.php"); 
 
$chat = file("chat.dat");
$logo = trim($chat[0]);
echo "<div class='gmenu'>What's Inside?</div>";
echo "<font color=red>
* Lots Of New Friends!!<br>
* <b>Send FREE SMS</b><br>
* Cool Chat Rooms to Hang In!!<br>
* Cool Contests To Win Real Money<b> ( Through Recharge )</b>!!<br>
* Customizable Chat Text & Smileys* Private Messaging<br>
* Much More,All You Need For Fun.</font>";

$q = mysql_query("SELECT COUNT(`id`) FROM `chat_users` WHERE `time` >= ".time().";");
$online = mysql_result($q, 0);

$q = mysql_query("SELECT COUNT(`id`) FROM `chat_users`;");
$users = mysql_result($q, 0);


if(!empty($message)) echo "$message<br/>\n";
echo "<hr/>LOGIN NOW : ";
echo "<form action=\"menu.php?ver=html&amp;nocache=$nocache\" method=\"post\">\n";
echo "Nick Name:<br/>\n";
echo "<input type=\"text\" name=\"nickname\" maxlength=\"15\" /><br/>\n";
//echo "<input type=\"checkbox\" name=\"translit\" value=\"yes\" /><br/>\n";
echo "Password:<br/>\n";
echo "<input type=\"password\" name=\"password\" maxlength=\"20\" /><br/>\n";
echo "<input type=\"hidden\" name=\"action\" value=\"auth\" />\n";
echo "<input type=\"submit\" value=\"Sign In\" /></form>\n";
echo "<hr/>";
echo ONLINE.": <a href=\"inchat.php?ver=html\">$online</a><br/>\n";
echo REG_USERS.": ".$users."<br/>\n";
echo "<a href=\"rules.php?ver=html\">Rules</a><br/>\n";

echo "<b><a href=\"rules.php?ver=html&amp;action=registration\">Sign Up</a> || \n";
echo "<a href=\"./?ver=wml\">WML</a></b><br/>\n";
echo "<hr/>Contact us :<b>admin@yoursitename</b><br/>";
echo "Home Site :<b><a href='http://bigblast.in'>PjFun.CoM</a><br>";
include_once "themes/".intval($_COOKIE['theme'])."/foot.php";
break;
}
?>