Something Don't Works Here

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Something Don't Works Here

    this is the original chapel.php page i use in my italian version of wapdesire:<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?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\">";
    echo "<head>";
    echo "<title>$stitle</title>";
    echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
    echo "
    <meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
    <meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
    <meta name=\"description\" content=\"ibwf mobile \">
    <meta name=\"keywords\" content=\"free, community, forums, chat, wap, communicate\">
    ";
    echo "</head>";
    echo "<body>";
    connectdb();
    $action = $_GET["action"];
    $sid = $_GET["sid"];
    $page = $_GET["page"];
    $who = $_GET["who"];
    $uid = getuid_sid($sid);
    $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name=&#39;sitename&#39;"));

    $sitename = $sitename[0];
    $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
    if (islogged($sid) == false) {
    echo "<p align=\"center\">";
    echo "You are not logged in
    ";
    echo "Or Your session has been expired

    ";
    echo "<a href=\"index.php\">Login</a>";
    echo "</p>";
    exit();
    }
    if(isbanned($uid))
    {
    echo "<head>";
    echo "<title>Error!!!</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    echo "<p align=\"center\">";
    echo "<img src=\"../images/notok.gif\" alt=\"x\"/>
    ";
    echo "You are Banned

    ";
    $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#39; OR uid=&#39;".$uid."&#39; AND penalty=&#39;2&#39;"));
    $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
    $remain = $banto[0]- time();
    $rmsg = gettimemsg($remain);
    echo "Time Left: $rmsg
    ";
    $nick = getnick_uid($banto[2]);
    echo "By: $nick
    ";
    echo "Reason: $banto[1]";
    //echo "<a href=\"index.php\">Login</a>";
    echo "</p>";
    echo "</body>";
    echo "</html>";
    exit();
    }

    if($action=="chapel")
    {
    //$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline(getuid_sid($sid),"$sitename Chapel ($mmsg)","");
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "<p align=\"center\">";
    echo " $sitename Chapel
    ";
    echo "<img src=\"wed.gif\" alt=\"Chapel\"/>
    ";
    echo "Welcome To $sitename Chapel.
    ";
    echo "Marry that special someone online.

    ";
    $couple = mysql_fetch_array(mysql_query("SELECT who, partner, req FROM couple WHERE partner=&#39;".$uid."&#39;"));
    if($couple[2]==&#39;1&#39;)
    {
    $unick = getnick_uid($couple[1]);
    $nick = getnick_uid($couple[0]);
    $nopl = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id=&#39;".$couple[0]."&#39;"));
    if($nopl[0]==&#39;M&#39;)
    {
    $usex = "Husband";
    }else if($nopl[0]==&#39;F&#39;){
    $usex = "Wife";
    }else{
    $usex = "Partner";
    }

    echo "Marriage Between $unick and $nick

    ";
    echo "Your Only one step away from Marrying your true love. All you need to do is read and accept the vows below

    ";
    echo "$unick, do you take $nick to be your wedded $usex to live together in marriage.
    ";
    echo "Do you promise to love, comfort, honor and keep
    ";
    echo "For better or worse, for richer or poorer, in sickness and in health.
    ";
    echo "And forsaking all others, be faithful only to
    ";
    echo "so long as you both shall live?

    ";
    echo "<a href=\"chapel.php?action=reqacc&amp;sid=$sid&amp;w ho=$couple[0]\">Yes, I Do</a>
    ";
    echo "<a href=\"chapel.php?action=reqref&amp;sid=$sid&amp;w ho=$couple[1]\">Sorry, I Dont</a>

    ";

    }else{

    echo "To Begin Please Enter The Nickname Of The User You Want to Marry, A PM will be sent
    ";
    echo "To them asking if they wish to marry you and inviting them to the chapel to complete the service.
    ";
    echo "By Sending the message below you agree to the below vows also

    ";
    $nick = getnick_sid($sid);
    echo "$nick, do you take [user] to be your wedded [wife/husband] to live together in marriage.
    ";
    echo "Do you promise to love, comfort, honor and keep [him/her]
    ";
    echo "For better or worse, for richer or poorer, in sickness and in health.
    ";
    echo "And forsaking all others, be faithful only to
    ";
    echo "[him/her] so long as you both shall live?

    ";
    $whonick = getnick_uid($who);
    echo "<form action=\"chapel.php?action=getreq&amp;sid=$sid\" method=\"post\">";
    echo "<center>Username:
    <input name=\"usr\" maxlength=\"25\"/></center>";
    //echo "<input type=\"hidden\" name=\"usr\" value=\"$(usr)\"/>";
    echo "<center><input type=\"submit\" name=\"submit\" value=\"I Do\"></center></form>";
    }
    $rukiya = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM couple WHERE (who=&#39;".$uid."&#39; OR partner=&#39;".$uid."&#39;) AND accept=&#39;1&#39;"));
    if ($rukiya[0]=="1")
    {
    echo "<center><a href=\"chapel.php?action=div&amp;sid=$sid\">Divorc e!</a></center>
    ";
    }
    echo "<center>Please Note: This Marriage IS NOT Legally Binding</center>
    ";
    echo "<center><a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a></center>";
    echo "</p>";
    echo "</body>";
    }

    else if($action=="getreq")
    {
    //$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline(getuid_sid($sid),"$sitename Chapel ($mmsg)","");
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "<p align=\"center\">";
    $usr = $_POST["usr"];
    $usr = mysql_real_escape_string($usr);
    $usr = getuid_nick($usr);
    $we = mysql_fetch_array(mysql_query("SELECT who, partner, accept, req FROM couple WHERE who=&#39;".$uid."&#39;"));
    if($we[2]==&#39;1&#39;)
    {
    $wer = getnick_uid($we[1]);
    echo "You&#39;re already married to $wer!

    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a>";
    echo "</p>";
    echo "</body>";
    echo "</html>";
    exit();
    }

    $me = mysql_fetch_array(mysql_query("SELECT who, partner, accept, req FROM couple WHERE partner=&#39;".$uid."&#39;"));
    if($me[2]==&#39;1&#39;)
    {
    $sya = getnick_uid($me[0]);
    echo "You&#39;re already married to $sya!

    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a>";
    echo "</p>";
    echo "</body>";
    echo "</html>";
    exit();
    }
    $sex1 = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
    $sex2 = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id=&#39;".$usr."&#39;"));
    if($usr==0)
    {
    echo "User Does Not exist
    ";
    }else if($usr==$uid)
    {
    echo "lol.. Why do you wanna marry yourself? PMPL..
    ";
    echo "<a href=\"chapel.php?action=chapel&amp;sid=$sid\">bac k</a>
    ";
    }

    elseif($sex1[0]!=$sex2[0])

    {

    $whonick = getnick_uid($usr);
    $couple = mysql_fetch_array(mysql_query("SELECT who, partner, accept, req FROM couple WHERE partner=&#39;".$usr."&#39;"));
    if($couple[2]==&#39;1&#39;)
    {
    $sya = getnick_uid($couple[0]);
    echo "$whonick is already married to $sya. Try your luck to other users!

    ";
    }

    $byuid = getuid_sid($sid);
    $tm = time();
    if((!isignored($byuid, $who))&&(!istrashed($byuid)))
    {
    $unick = getnick_uid($uid);
    $pmtext = "(bemine) $unick would like to To ask For your hand in marriage, to accept or refuse visit the chapel link in the site main page [br/][small]p.s: this is an automatic pm[/small]";
    $res = mysql_query("INSERT INTO ibwf_private SET text=&#39;".$pmtext."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;".$usr."&#39;, timesent=&#39;".$tm."&#39;");
    }else{
    $res = true;
    }
    if($res)
    {
    echo " $sitename Chapel";
    echo "
    Here You Can Get Married Online.

    ";
    echo "Marriage Request was sent successfully to $whonick
    ";
    echo "Please wait for a response

    ";
    echo "Please Note: This Marriage IS NOT Legally Binding
    ";
    mysql_query("INSERT INTO couple SET req=&#39;1&#39;, partner=&#39;".$usr."&#39;, who=&#39;".$uid."&#39;, time=&#39;".time()."&#39;");
    }else{
    echo "Can&#39;t Send your Request to $whonick

    ";
    }
    }


    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a>";
    echo "</p>";
    echo "</body>";
    }
    else if($action=="reqacc")
    {
    $who = $_GET["who"];
    //$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline(getuid_sid($sid),"$sitename Chapel ($mmsg)","");
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "<p align=\"center\">";
    echo " $sitename Chapel

    ";
    $byuid = getuid_sid($sid);
    $nick = getnick_uid($uid);
    echo "Congratulations! You are Marriage To $nick Is Complete. We Hope You Are Both Happy in your new Relationship.

    ";
    $msg = "Congratulations! You are Marriage To $nick Is Complete. We Hope You Are Both Happy in your new Relationship [br/][small]p.s: this is an automatic pm[/small]";
    mysql_query("INSERT INTO ibwf_private SET text=&#39;".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;".$who."&#39;, unread=&#39;1&#39;, timesent=&#39;".time()."&#39;");
    mysql_query("UPDATE couple SET accept=&#39;1&#39;, req=&#39;2&#39;, joined=&#39;".time()."&#39; WHERE partner=&#39;".$uid."&#39; AND who=&#39;".$who."&#39;");

    $nick = getnick_uid($who);
    $byuid = getuid_sid($sid);
    $unick = getnick_uid($byuid);
    $fmsg = "$nick and I just get married!";
    mysql_query("UPDATE ibwf_users SET shouts=&#39;".$fmsg."&#39; WHERE id=&#39;".$byuid."&#39;");
    echo "Please Note: This Marriage IS NOT Legally Binding
    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a>";
    echo "</p>";
    echo "</body>";
    }

    else if($action=="reqref")
    {
    $who = $_GET["who"];
    $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline(getuid_sid($sid),"$sitename Chapel ($mmsg)","");
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "<p align=\"center\">";
    echo " $sitename Chapel

    ";
    $nick = getnick_uid($who);
    echo "Ohh.. We are sorry to hear about Your Decision, your proposer has been informed of your decison, thank you.

    ";
    $byuid = getuid_sid($sid);
    $couple = mysql_fetch_array(mysql_query("SELECT who, partner FROM couple WHERE partner=&#39;".$uid."&#39;"));
    $msg = "Sorry, $nick has refused your proposal.(blink) we are sorry to hear this, but feel free to try again at a later date [small]p.s: this is an automatic pm[/small]";
    mysql_query("INSERT INTO ibwf_private SET text=&#39;".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;".$couple[0]."&#39;, unread=&#39;1&#39;, timesent=&#39;".time()."&#39;");
    $res = mysql_query("DELETE FROM couple WHERE partner=&#39;".$uid."&#39; AND who=&#39;".$couple[0]."&#39;");
    echo "Please Note: This Marriage IS NOT Legally Binding
    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a>";
    echo "</p>";
    echo "</body>";
    }else if($action=="div")
    {
    //$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline(getuid_sid($sid),"$sitename Chapel ($mmsg)","");
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "<p align=\"center\">";
    //$me = mysql_fetch_array(mysql_query("SELECT who, partner, accept, req FROM couple WHERE who =&#39;".$uid."&#39;"));
    $me = mysql_fetch_array(mysql_query("SELECT who,partner FROM couple WHERE who=&#39;".$uid."&#39; OR partner=&#39;".$uid."&#39;"));
    //$you = mysql_fetch_array(mysql_query("SELECT who, partner, accept, req FROM couple WHERE partner =&#39;".$uid."&#39;"));
    $nick = getnick_uid($me[0]);
    $unick = getnick_uid($me[1]);

    if($uid==$me[0])
    {
    echo "Do you really want to divorce $unick ?";
    }

    if($uid==$me[1])
    {
    echo "Do you really want to divorce $nick ?";
    }

    $wed = mysql_fetch_array(mysql_query("SELECT partner FROM couple WHERE who=&#39;".$uid."&#39;"));
    if (!$wed)
    {
    $wed = mysql_fetch_array(mysql_query("SELECT who FROM couple WHERE partner=&#39;".$uid."&#39;"));
    }
    $who = $wed[0];

    echo "<form action=\"chapel.php?action=sep&amp;sid=$sid\" method=\"post\">";
    echo "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
    echo "<center><input type=\"submit\" name=\"submit\" value=\"Yes\"></center></form>";
    echo "<center><a href=\"chapel.php?action=chapel&amp;sid=$sid\">No</a></center>
    <center>----</center>
    ";
    echo "<center><a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a></center>";
    echo "</p>";
    echo "</body>";
    }else if($action=="sep")
    {
    //$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline(getuid_sid($sid),"$sitename Chapel ($mmsg)","");
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "<p align=\"center\">";
    $who = $_POST["who"];
    $uid = getuid_sid($sid);
    $res = mysql_query("DELETE FROM couple WHERE who=&#39;".$uid."&#39; OR partner=&#39;".$uid."&#39;");
    $res = mysql_query("DELETE FROM couple WHERE who=&#39;".$who."&#39; OR partner=&#39;".$who."&#39;");
    if($res)
    {
    $nick = getnick_uid($who);
    $nic = getnick_uid($uid);
    $msg = "A very sad news for you ! $nic has devorced you.We are extreamly sorry for the broke up (gifimage34). Be patient![br/][small]p.s: this is an automatic pm[/small]";
    mysql_query("INSERT INTO ibwf_private SET text=&#39;".$msg."&#39;, byuid=&#39;".$uid."&#39;, touid=&#39;".$who."&#39;, unread=&#39;1&#39;, timesent=&#39;".time()."&#39;");
    echo "You have successfully divorced $nick !

    ";
    }else{
    echo "Database Error!

    ";

    }
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a>";
    echo "</p>";
    echo "</body>";
    }
    /////////////////////////////Error/////////////////////////////
    else{
    $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline(getuid_sid($sid),"Lost in Chapel lol ($mmsg)","");
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "<p align=\"center\">";
    echo "I don&#39;t know how did you get into here, but there&#39;s nothing to show

    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a>";
    echo "</body>";
    echo "</html>";
    }
    ?>

    </html></div>

    it don&#39;t works because after done marriage request to a user ,he don&#39;t find the option
    (goin&#39;in chapel page) to answer YES or NOT..
    the inbox with request works right
    sigpicthe italian/international COMMUNITY of friendship
    http://people2000.netne.net
    WAP/WEB
    peoplemailbox@katamail.com
Working...
X