<?php
include("head.php");
/////////////////////////////////////////////////main page
if($action=="main")
{
addonline(getuid_sid($sid),"In The Chapel","");
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\">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&wid=$wid\">YES!</a><br/>";
echo "<a href=\"chapel.php?action=rejm&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\">Get Devorced</a><br/>";
}else{
echo "<a href=\"chapel.php?action=rgetm\">Get Wappied!</a><br/>";
}
}
echo "<br/><a href=\"lists.php?action=marry\">Who`s Wappied?</a><br/>";
echo getfoot($sid,$folder);
exit();
}
/////////////////////////////////////////////////// blady numpties! lol
else if($action=="wnumpty")
{
addonline(getuid_sid($sid),"Asking what Wappied is..","");
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 getfoot($sid,$folder);
exit();
}
//////////////////////////////////////////////////// Request to get married, who?
else if($action=="rgetm")
{
addonline(getuid_sid($sid),"Requesting To Get Wappied","");
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\" 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 getfoot($sid,$folder);
exit();
}
///////////////////////////////////////////////////// Request to get married, final.
else if($action=="getm")
{
addonline(getuid_sid($sid),"Requesting To Get Wappied","");
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\">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 getfoot($sid,$folder);
exit();
}
///////////////////////////////////////////////////// request devorce verify
else if($action=="getd")
{
addonline(getuid_sid($sid),"Getting Devorced","");
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 "<a href=\"chapel.php?action=getdf&wid=$wid\">YES!</a><br/>";
echo "<a href=\"chapel.php?action=main\">Oops! no I love my equal!</a><br/>----<br/>";
echo getfoot($sid,$folder);
exit();
}
/////////////////////////////////////////////////// get devorce final
else if($action=="getdf")
{
addonline(getuid_sid($sid),"This wont be pretty...","");
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 getfoot($sid,$folder);
exit();
}
/////////////////////////////////////////////////// complete marrage
else if($action=="conm")
{
addonline(getuid_sid($sid),"They are WAPPIED!!","");
echo "<div><br/>CONGRATULATIONS<br/></div>";
echo "<p align=\"center\">";
$wid = $_GET["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 getfoot($sid,$folder);
exit();
}
//////////////////////////////////////////////// reject marrage... ow! lol
else if($action=="rejm")
{
addonline(getuid_sid($sid),"This won't be pretty...","");
$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 getfoot($sid,$folder);
exit();
}
///////////////////////////////////////////////// the end lol
else{
addonline(getuid_sid($sid),"Lost in Chapel","");
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 getfoot($sid,$folder);
exit();
}
?>