View file chat spall script/web/love.htm

File size: 4.41Kb
<?php
/////////////////script load time
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$start = $time;
//////////////////Includes
include("config.php");
include("core.php");
/////////////////Page headers
echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE HTML PUBLIC \"-//W3C//DTD XHTML Mobile 1.0//EN\"". " \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">");
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>LOVE CALCULATER BY CHATSPELL.COM</title>
<meta forua="true" http-equiv="Cache-Control" content="no-cache"/>
<meta forua="true" http-equiv="Cache-Control" content="must-revalidate"/>
      <link rel="shortcut icon" href="images/favicon.ico" />
      <link rel="icon" href="images/favicon.gif" type="image/gif" />
<?php
$bcon = connectdb();
$sid = $_GET['sid'];

?>
</head>
<body>
<?php

///////////////All the GETs//////
$page = $_GET['page'];
$who = $_GET['who'];
$action = $_GET['action'];
$uid = getuid_sid($sid);
//////////////DB connection failed
if (!$bcon){
echo "<p align=\"center\">
ERROR! Couldn't connect to database!<br/>SO BE PATIENT PLEASE<br/>
<b>Thanks,<br/>With regards,<br/>$sitename Team!</b>
</p>
</font></body>
</html>";
exit();
}
cleardata();
/////////////Session not legal??
if(($action != "") && ($action!="terms")){
if((islogged($sid)==false)||($uid==0)){
("Error!");
echo "<center><img src=\"images/notok.gif\" alt=\"\"/>You are not logged in<br/>";
echo "or your session has expired.<br/><br/>";
echo "
			 
			  <form action=\"login.php\" method=\"get\">
			     <img src=\"images/user.gif\" alt=\"\"/>Enter username:<br/>
			       <input id=\"inputText\" name=\"loguid\" maxlength=\"30\"/><br/>
                             <img src=\"images/pass.gif\" alt=\"\"/>Enter password:<br/>
			       <input id=\"inputText\" type=\"password\" format=\"*x\" name=\"logpwd\"  maxlength=\"30\"/><br/>
                               <input id=\"inputButton\" type=\"submit\" value=\"Login\"/><br/>
			  </form>
                          <br/><br/><img src=\"images/register.gif\" alt=\"\"/><a href=\"register.php\">Register</a>
                               <br/><img src=\"images/home.gif\" alt=\"\"/><a href=\"index.php\">Home</a>
			       </center>";

echo "</font></body></html>";
exit();
}
}
//////////////////User Banned?
if(isbanned($uid)){
("Error!");
echo "<img src=\"images/notok.gif\" alt=\"\"/><center>";
echo "You are presently banned!<br/><br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "Time to finish your penalty: $rmsg<br/><br/>";
echo "</center>";

echo "</font></body>";
echo "</html>";
exit();
}
$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");

if($action=="main")
{
  addvisitor();
  addonline(getuid_sid($sid),"Xhtml-Love Calculator","index.php?action=$action");
  //saveuinfo($sid);
  $nick = getnick_sid($sid);;
  $sid = $_GET["sid"];
  $uid = getuid_sid($sid);
  ("Love Calculator!");

  echo "<p align=\"center\">";
echo "<form action=\"love.php?action=results&amp;sid=$sid\" method=\"post\">";
        echo "Your Name:<br/><input name=\"Your Name\" maxlength=\"30\"><br/>";
        echo "Your Partners Name:<br/><input name=\"Your Partners\" maxlength=\"30\"><br/>";
        echo "<br/><input type=\"Submit\" name=\"Results\" Value=\"Results\"></form>";
  
  echo "<br/><a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"/images/home.gif\" alt=\"\"/>Home</a><br/>";
//  echo "<small><b>&#169;copyright  2010<br/>www.CHATSPELL.COM</b></small><br/>";
  echo "</p>";

}
if($action=="results")
{
  addvisitor();
  addonline(getuid_sid($sid),"Xhtml-Love Calculator","index.php?action=$action");
  //saveuinfo($sid);
  $nick = getnick_sid($sid);;
  $sid = $_GET["sid"];
  $uid = getuid_sid($sid);
 ("Love Results!");
echo "<p align=\"center\">";
$lovecalc=rand (40,100);
 $jeez     = "48";
 $wow      = "67";
 
 echo "<small>";

 echo "You Love Your Partner <b>$lovecalc %</b><br/>";

if($lovecalc < $jeez) echo "<b>Jeez Do Better Than That!</b>";
	elseif($lovecalc > $wow) echo "<b>WOW Thats Cool Keep It Up!</b>";
	else echo "<b>Obviously I Dont Know What To Say!</b>";

  echo "<br/><a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"/images/home.gif\" alt=\"\"/>Home</a><br/>";
  echo "<small><b>&#169;copyright  2010<br/>www.CHATSPELL.COM</b></small><br/>";
  echo "</p>";
  
}
?>
</html>