View file wapirate/A1/chapel.php

File size: 16.69Kb
<?php





include("core.php");

include("config.php");





header("Content-type: text/html; charset=ISO-8859-1");

echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";

echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";

echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";





$addy ="wapirate.net";

$bcon = connectdb();

if (!$bcon)

{

        echo "<head>";

    echo "<title>Error!!!</title>";

    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";

    echo "</head>";

    echo "<body>";

echo "<div><br/>Doh!<br/></div>";

    echo "<p align=\"center\">";

    echo "<img src=\"images/error.gif\" alt=\"*\"/><br/>";

    echo "ERROR! cannot connect to database<br/><br/>";

    echo "This error usually happens when backing up the database, please be patient, The site will be up as soon as possible<br/><br/>";

    echo "<b>THANK YOU VERY MUCH</b>";

    echo "</p>";

echo "<div>$addy</div>";

    echo "</body>";

    echo "</html>";

    exit();

}

$brws = $_SERVER['HTTP_USER_AGENT'];

$ubr = $brws;

$uip = getip();

$action = $_GET["action"];

$sid = $_GET["sid"];

$page = $_GET["page"];

$who = $_GET["who"];

$wnick = getnick_uid($who);

$uid = getuid_sid($sid);

$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));

cleardata();

if(isipbanned($uip,$ubr))

    {

      if(!isshield(getuid_sid($sid)))

      {

  echo "<head>";

  echo "<title>Ip Block!</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";

  echo "</head>";

  echo "<body>";

echo "<div><br/>Doh!<br/></div>";

      echo "<p align=\"center\">";

      echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";

      echo "This IP address is blocked<br/>";

      echo "<br/>";

      echo "However we grant a shield against IP-Ban for our best users, you can try to see if you are shielded by trying to login, if you keep coming to this page that means you are not shielded, so come back when the ip-ban period is over<br/><br/>";

      $banto = mysql_fetch_array(mysql_query("SELECT  timeto FROM ibwf_penalties WHERE  penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));

      //echo mysql_error();

      $remain =  $banto[0] - time();

      $rmsg = gettimemsg($remain);

      echo " IP: $rmsg<br/><br/>";

      

      echo "</p>";

    //  echo "<p>";

  echo "<form action=\"login.php\" method=\"get\">";

  echo "username:<br/> <input name=\"loguid\" format=\"*x\" size=\"8\" maxlength=\"30\"/><br/>";

  echo "password:<br/> <input type=\"password\" name=\"logpwd\" size=\"8\" maxlength=\"30\"/><br/>";

echo "<input type=\"submit\" value=\"login &#187;\"/>";

echo "</form>"; 

 // echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

  echo "</html>";

      exit();

      }

    }

if(($action != "") && ($action!="terms"))

{

    $uid = getuid_sid($sid);

    if((islogged($sid)==false)||($uid==0))

    {

      echo "<head>";

      echo "<title>Error!!!</title>";

      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";

      echo "</head>";

      echo "<body>";  

    echo "<div><br/>Doh!<br/></div>";

      echo "<p align=\"center\">";

      echo "You are not logged in<br/>";

      echo "Or Your session has been expired<br/><br/>";

      echo "<a href=\"index.php\">Login</a>";

      echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

  echo "</html>";

      exit();

    }

    

    

    

}

//echo isbanned($uid);

if(isbanned($uid))

    {

      echo "<head>";

      echo "<title>Error!!!</title>";

      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";

      echo "</head>";

      echo "<body>"; 

echo "<div><br/>Doh!<br/></div>";

      echo "<p align=\"center\">";

      echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";

      echo "You are <b>Banned</b><br/>";

      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'"));

	  $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));

	  

      $remain = $banto[0]- time();

      $rmsg = gettimemsg($remain);

      echo "Time to finish your penalty: $rmsg<br/><br/>";

	  echo "Ban Reason: $banres[0]";

      //echo "<a href=\"index.php\">Login</a>";

      echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

  echo "</html>";

      exit();

    }

$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");

/////////////////////////////////////////////////main page

if($action=="main")

{

addonline(getuid_sid($sid),"In The Chapel","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

echo "<div><br/>Wapirate Chapel<br/></div>";

echo "<p align=\"center\">";

echo "<img src=\"/images/chapel.gif\" alt=\"Chapel\"/><br/>";

echo "Welcome To The Online Chapel!<br/>";

echo "Here You Can Get Wappied To That Special Someone In Your Wap Life!<br/>----<br/>";

echo "<a href=\"chapel.php?action=wnumpty&amp;sid=$sid\">What Is Wappied?</a><br/>";

$uid = getuid_sid($sid);

$isreq = mysql_fetch_array(mysql_query("SELECT rpen, uid FROM ibwf_chapel WHERE mid='".$uid."'"));

if ($isreq[0]==1)

{

$wid = $isreq[1];

$wnick = getnick_uid($wid);

echo "$wnick Has Requested To Get Wappied To You<br/>";

echo "Do You Accept:<br/>";

echo "<a href=\"chapel.php?action=conm&amp;sid=$sid&amp;wid=$wid\">YES!</a><br/>";

echo "<a href=\"chapel.php?action=rejm&amp;sid=$sid&amp;wid=$wid\">NO!</a><br/>";

}else{

$hmm = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_chapel WHERE mid='".$uid."' AND ismd='1'"));

$yum = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_chapel WHERE uid='".$uid."' AND ismd='1'"));

if($yum[0]>0||$hmm[0]>0){

echo "<a href=\"chapel.php?action=getd&amp;sid=$sid\">Get Devorced</a><br/>";

}else{

echo "<a href=\"chapel.php?action=rgetm&amp;sid=$sid\">Get Wappied!</a><br/>";

}

}

echo "<br/><a href=\"lists.php?action=marry&amp;sid=$sid\">Who`s Wappied?</a><br/>";

echo "<img src=\"/images/line.gif\" alt=\"line\"/>";

echo "<br/><a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";

echo "<br/><br/><small>&#169; $sitename</small>";

echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

      exit();

}

/////////////////////////////////////////////////// blady numpties! lol

else if($action=="wnumpty")

{

addonline(getuid_sid($sid),"Asking what Wappied is..","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

echo "<div><br/>Whats Wappied!<br/></div>";

echo "<p align=\"center\">";

echo "What Is Wappied You Ask?<br/>";

echo "Well <b>Wappied</b> means <b>Wap Married</b><br/> Its a fun way to express the love you have for that special someone and let the whole community know about it!<br/>";

echo "Its completely free and fun! ... oh yes and it is reversable<br/> So enjoy and keep having fun!<br/>";

echo "<img src=\"/images/line.gif\" alt=\"line\"/>";

echo "<br/><a href=\"chapel.php?action=main&amp;sid=$sid\">Back</a><br/>";

echo "<br/><br/><small>&#169; $sitename</small>";

echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

      exit();

}

//////////////////////////////////////////////////// Request to get married, who?



else if($action=="rgetm")

{

addonline(getuid_sid($sid),"Requesting To Get Wappied","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

echo "<div><br/>Request To Get Wappied!<br/></div>";

echo "<p align=\"center\">";

echo "Who would you like be Wappied to:<br/>";

echo "</p><form action=\"chapel.php?action=getm&amp;sid=$sid\" method=\"post\">";

echo "Name: <input name=\"who\" format=\"*x\"  maxlength=\"20\"/><br/>";

echo "<input type=\"submit\" value=\"[GO]\"/>";

echo "</form><br/>";

echo "<p align=\"center\">";

echo "NOTE: Please Note That This Is Just For Entertainment Purposes And Does NOT Constitute A Valid Mariage. lol<br/>

Thank You And I Truelly Hope You Enjoy This Service<br/>";

echo "<img src=\"/images/line.gif\" alt=\"line\"/>";

echo "<br/><a href=\"index.php?action=main&amp;sid=$sid\">Home</a><br/>";

echo "<br/><br/><small>&#169; $sitename</small>";

echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

      exit();

}

///////////////////////////////////////////////////// Request to get married, final.



else if($action=="getm")

{

addonline(getuid_sid($sid),"Requesting To Get Wappied","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

echo "<div><br/>Request To Get Wappied!<br/></div>";

echo "<p align=\"center\">";

$who = $_POST["who"];

$wid = getuid_nick($who);

$uid = getuid_sid($sid);

if($wid==0 OR $wid=="")

{

echo "UserName Don't Exist!<br/>Please check if your spelling was correct!<br/>----<br/>";

echo "<a href=\"chapel.php?action=rgetm&amp;sid=$sid\">Back</a><br/>";

}else if($wid==$uid){

echo "What Are You Thinking?<br/> Are you That Vain?<br/>You Cant get Wappied to yourself<br/>Shame On You!<br/>";

$jmtxt = "\[br/\]\[b\]CHAPEL NEWS:\[/b\]\[id=$wid\]$who \[/id\] Wants to get Wappied to Themselfs! :rofl";

$jmtm = time();

mysql_query("INSERT INTO ibwf_shouts SET shout='".$jmtxt."', shouter='1218', shtime='".$jmtm."'");

$shtss = mysql_fetch_array(mysql_query("SELECT ibwf_shouts from users WHERE id='1218'"));

$shtss = $shtss[0]+1;

mysql_query("UPDATE ibwf_users SET shouts='".$shtss."' WHERE id='1218'");

}else{

$iswhom = mysql_fetch_array(mysql_query("SELECT ismd FROM ibwf_chapel WHERE mid='".$wid."'"));

if (!$iswhom)

{

$iswhom = mysql_fetch_array(mysql_query("SELECT ismd FROM ibwf_chapel WHERE uid='".$wid."'"));

$ismar = mysql_fetch_array(mysql_query("SELECT ismd FROM ibwf_chapel WHERE mid='".$wid."'"));

}

if($iswhom[0]=='1'||$ismar[0]=='1')

{

echo "What Are You Thinking?.. This Member Is Already Wappied... Shame On You!<br/>";

}else{

$iswhor = mysql_fetch_array(mysql_query("SELECT rpen FROM ibwf_chapel WHERE mid='".$wid."'"));

if (!$iswhor)

{

$iswhor = mysql_fetch_array(mysql_query("SELECT rpen FROM ibwf_chapel WHERE uid='".$wid."'"));

}

if($iswhor[0]=='1')

{

echo "$who Already Has A Request Pending!<br/>If This Seems To Be A Problem Then Kindly Ask $who To Reject The Other Offer<br/>";

}else{

echo "A Request Has Been Sent To $who";

mysql_query("INSERT INTO ibwf_chapel SET rpen='1', mid='".$wid."', uid='".$uid."'");

}

}

}

echo "<br/><img src=\"/images/line.gif\" alt=\"line\"/>";

echo "<br/><a href=\"index.php?action=main&amp;sid=$sid\">Home</a><br/>";

echo "<br/><br/><small>&#169; $sitename</small>";

echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

      exit();

}

///////////////////////////////////////////////////// request devorce verify

else if($action=="getd")

{

addonline(getuid_sid($sid),"Getting Devorced","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

echo "<div><br/>Do You Really Want To Do This?<br/></div>";

echo "<p align=\"center\">";

$uid = getuid_sid($sid);

$wida = mysql_fetch_array(mysql_query("SELECT mid FROM ibwf_chapel WHERE uid='".$uid."'"));

if (!$wida)

{

$wida = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_chapel WHERE mid='".$uid."'"));

}

$wid = $wida[0];

echo "Are you sure you want to be de-Wappied?<br/> Please confirm:<br/>";

/*

echo "</p><form action=\"chapel.php?action=getdf&amp;sid=$sid\" method=\"post\">";

echo " <input name=\"wid\" type=\"hidden\"/><br/>";

echo "<input type=\"submit\" value=\"YES!\"/>";

echo "</form><br/>";

echo "<p align=\"center\">";*/

echo "<a href=\"chapel.php?action=getdf&amp;sid=$sid&amp;wid=$wid\">YES!</a><br/>";

echo "<a href=\"chapel.php?action=main&amp;sid=$sid\">Oops! no I love my equal!</a><br/>----<br/>";

echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a><br/>";

echo "<br/><br/><small>&#169; $sitename</small>";

echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

      exit();

}

/////////////////////////////////////////////////// get devorce final

else if($action=="getdf")

{

addonline(getuid_sid($sid),"This wont be pretty...","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

echo "<div><br/>Sorry It Didnt Work Out!<br/></div>";

echo "<p align=\"center\">";

$wid = $_GET["wid"];

$uid = getuid_sid($sid);

$res = mysql_query("DELETE FROM ibwf_chapel WHERE uid='".$uid."' OR mid='".$uid."'");

if($res){

echo "Done... We wish you the best, always remember that there are many more fish in the sea<br/>----<br/>";

}else{

echo "Error... It Looks Like Your Not Getting A Devorce Today lol <br/> Try Again Later!";

}

echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";

echo "<br/><br/><small>&#169; $sitename</small>";

echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

      exit();

}

///////////////////////////////////////////////////  complete marrage

else if($action=="conm")

{

addonline(getuid_sid($sid),"They are WAPPIED!!","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

echo "<div><br/>CONGRATULATIONS<br/></div>";

echo "<p align=\"center\">";

$wid = $_POST["wid"];

$uid = getuid_sid($sid);

$unick = getnick_uid($uid);

$wnick = getnick_uid($wid);

echo "You And $wnick Are Now Wappied!!<br/>Congratulations!!";

mysql_query("UPDATE ibwf_chapel SET ismd='1', mdy='".time()."', rpen='0' WHERE mid='".$uid."' AND uid='".$wid."'");

$jmtxt = "\[br/\]\[b\]CHAPEL NEWS:\[/b\]\[id=$wid\]$wnick\[/id\] and \[id=$uid\]$unick\[/id\]\[br/\]Have just been WAPPIED!";

$jmtm = time();

mysql_query("INSERT INTO ibwf_shouts SET shout='".$jmtxt."', shouter='1218', shtime='".$jmtm."'");

$shtss = mysql_fetch_array(mysql_query("SELECT ibwf_shouts from users WHERE id='1218'"));

$shtss = $shtss[0]+1;

mysql_query("UPDATE ibwf_users SET shouts='".$shtss."' WHERE id='1218'"); 

echo "<br/><img src=\"/images/line.gif\" alt=\"line\"/>"; 

echo "<br/><a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";

echo "<br/><br/><small>&#169; $sitename</small>";

echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

      exit();

}

////////////////////////////////////////////////  reject marrage... ow! lol

else if($action=="rejm")

{

addonline(getuid_sid($sid),"This won't be pretty...","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

$wid = $_GET["wid"];

$uid = getuid_sid($sid);

$unick = getnick_uid($uid);

$wnick = getnick_uid($wid);

echo "<div><br/>Reject $wnick<br/></div>";

echo "<p align=\"center\">";

$res = mysql_query("DELETE FROM ibwf_chapel WHERE uid='".$wid."'");

if($res){

echo "You Have Successfully Rejected $wnick's Request.";

}else{

echo "Error... Looks Like Cupids Hit You <br/>Try Again Later!";

}

echo "<br/><img src=\"/images/line.gif\" alt=\"line\"/>";

echo "<br/><a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";

echo "<br/><br/><small>&#169; $sitename</small>";

echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

      exit();

}

///////////////////////////////////////////////// the end lol

else{

addonline(getuid_sid($sid),"Lost in Chapel","");

  echo "<head>";

  echo "<title>wapirate</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

  echo "</head>";

  echo "<body>"; 

echo "<div><br/>Doh!<br/></div>";

echo "<p align=\"center\">";

echo "I don't know how you got into here, but there's nothing to show<br/><br/>";

echo "<img src=\"/images/line.gif\" alt=\"line\"/>";

echo "<br/><a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";

echo "<br/><br/><small>&#169; $sitename</small>";

echo "</p>";

echo "<div>$addy</div>";

  echo "</body>";

      exit();

}







	echo "</html>";

?>