white page error

Started on the old forum in September 2009 · view the original in the archive · old links redirect here

16 replies · 645 views · started 17 years ago · 1 min read

3 participants
mentalhosting Junior · 19 posts #1

hi there friends i have been working on a chapel page well changing it so it fits my site and when i go to see the site and look at the chapel i get a white page and any one tell me why this is happening please here is the coding i am using

<?php
define('WCS',true);
include('./core/main.inc');
header_type();
cleardata();
if(ipbanned(ip(),browser())){
if(!shield(getuid_sid($sid))){
echo head_tag("Ip Blocked!!!",0,0);
echo ipbanned_msg();
echo foot_tag();
exit();
}
}
if(!islogged($sid)){
echo head_tag("Error!!!",0,0);
echo session_expired();
echo foot_tag();
exit();
}
if(banned(getuid_sid($sid))){
echo head_tag("Error!!!",1,getnick_sid($sid));
echo banned_msg($sid);
echo foot_tag();
exit();
}
if($pass!=""){$pw="&pass=$pass";}
if($rid!=""){
$rooms=mysql_fetch_array(mysql_query("SELECT id, name FROM chatrooms WHERE id='".$rid."'"));
$rname=$rooms[1];
$chatlink="&rid=$rid$pw";
}
mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");

if($aciton=="chapel")
{
addonline(getuid_sid($sid),"in chapel","chapel.php");
echo head_tag(getnick_sid($sid)."@chapel",1,getnick_sid($sid));
$main= "<p align=\"center\">";
$main= "<u><b> $sitename Chapel</b></u><br/>";
$main= "<img src=\"../images/chapel.gif\" alt=\"Chapel\"/><br/>";
$main= "Welcome To  $sitename Chapel. <br/>";
$main= "Marry that special someone online.<br/><br/>";
$couple = mysql_fetch_array(mysql_query("SELECT who, partner, req FROM couple WHERE partner='".$uid."'"));
if($couple[2]=='1')
{
$unick = getnick_uid($couple[1]);
$nick = getnick_uid($couple[0]);
$nopl = mysql_fetch_array(mysql_query("SELECT sex FROM users WHERE id='".$couple[0]."'"));
if($nopl[0]=='M')
{
$usex = "Husband";
}else if($nopl[0]=='F'){
$usex = "Wife";
}else{
$usex = "Partner";
}

$main.="<b>Marriage Between $unick and $nick</b><br/><br/>";
$main.="Your Only one step away from Marrying your true love. All you need to do is read and accept the vows below<br/><br/>";
$main.="$unick, do you take user to be your wedded $usex to live together in marriage.<br/>";
$main.="Do you promise to love, comfort, honor and keep <br/>";
$main.="For better or worse, for richer or poorer, in sickness and in health.<br/>";
$main.="And forsaking all others, be faithful only to<br/>";
$main.="so long as you both shall live?<br/><br/>";
$main.="<a href=\"chapel.php?action=reqacc&sid=$sid&who=$couple[0]\">Yes, I Do</a><br/>";
$main.="<a href=\"chapel.php?action=reqref&sid=$sid&who=$couple[1]\">Sorry, I Dont</a><br/><br/>";

}else{

$main.="To Begin Please Enter The Nickname Of The User You Want to Marry, A PM will be sent<br/>";
$main.="To them asking if they wish to marry you and inviting them to the chapel to complete the service.<br/>";
$main.="By Sending the message below you agree to the below vows also<br/><br/>";
$nick = getnick_sid($sid);
$main.="$nick, do you take $unick, to be your wedded [wife/husband] to live together in marriage.<br/>";
$main.="Do you promise to love, comfort, honor and keep [him/her]<br/>";
$main.="For better or worse, for richer or poorer, in sickness and in health.<br/>";
$main.="And forsaking all others, be faithful only to<br/>";
$main.="[him/her] so long as you both shall live?<br/><br/>";
$whonick = getnick_uid($who);
$main.="<form action=\"chapel.php?action=getreq&sid=$sid\" method=\"post\">";
$main.="<center>Username:<br/><input name=\"usr\" maxlength=\"25\"/></center>";
//$main.="<input type=\"hidden\" name=\"usr\" value=\"$(usr)\"/>";
$main.="<center><input type=\"submit\" name=\"submit\" value=\"I Do\"></center></form>";
}
$rukiya = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM couple WHERE (who='".$uid."' OR partner='".$uid."') AND accept='1'"));
if ($rukiya[0]=="1")
{
$main.="<center><a href=\"chapel.php?action=div&sid=$sid\">Divorce!</a></center><br/>";
}
$main.="<center><small>Please Note: This Marriage IS NOT Legally Binding</small></center><br/>";

$L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main);
echo foot_tag();
exit;
}

else if($action=="getreq")
{
addonline(getuid_sid($sid),"$sitename Chapel ($mmsg)","");
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="<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='".$uid."'"));
if($we[2]=='1')
{
$wer = getnick_uid($we[1]);
$main.="You're already married to $wer!<br/><br/>";
$L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main);
echo foot_tag();
exit;
}

$me = mysql_fetch_array(mysql_query("SELECT who, partner, accept, req FROM couple WHERE partner='".$uid."'"));
if($me[2]=='1')
{
$sya = getnick_uid($me[0]);
$main.="You're already married to $sya!<br/><br/>";
$L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main);
echo foot_tag();
exit;
}
$sex1 = mysql_fetch_array(mysql_query("SELECT sex FROM profiles WHERE id='".$uid."'"));
$sex2 = mysql_fetch_array(mysql_query("SELECT sex FROM profiles WHERE id='".$usr."'"));
if($usr==0)
{
$main.="User Does Not exist<br/>";
}else if($usr==$uid)
{
$main.="lol.. Why do you wanna marry yourself? PMPL..<br/>";
$main.="<a href=\"chapel.php?action=chapel&sid=$sid\">back</a><br/>";
}

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

{

$whonick = getnick_uid($usr);
$couple = mysql_fetch_array(mysql_query("SELECT who, partner, accept, req FROM couple WHERE partner='".$usr."'"));
if($couple[2]=='1')
{
$sya = getnick_uid($couple[0]);
$main.="$whonick is already married to $sya. Try your luck to other users!<br/><br/>";
}

$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='".$pmtext."', byuid='".$byuid."', touid='".$usr."', timesent='".$tm."'");
}else{
$res = true;
}
if($res)
{
$main.="<u><b> $sitename Chapel</b></u>";
$main.="<br/>Here You Can Get Married Online.<br/><br/>";
$main.="Marriage Request was sent successfully to $whonick<br/>";
$main.="Please wait for a response<br/><br/>";
$main.="<small>Please Note: This Marriage IS NOT Legally Binding</small><br/>";
mysql_query("INSERT INTO couple SET req='1', partner='".$usr."', who='".$uid."', time='".time()."'");
}else{
$main.="Can't Send your Request to $whonick<br/><br/>";
}
}

$L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main);
echo foot_tag();
exit;
}
else if($action=="reqacc")
{
$who = $_GET["who"];
addonline(getuid_sid($sid),"$sitename Chapel ($mmsg)","");
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="<p align=\"center\">";
$main.="<b> $sitename Chapel</b><br/><br/>";
$byuid = getuid_sid($sid);
$nick = getnick_uid($uid);
$main.="Congratulations! You are Marriage To $nick Is Complete. We Hope You Are Both Happy in your new Relationship.<br/><br/>";
$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='".$msg."', byuid='".$byuid."', touid='".$who."', unread='1', timesent='".time()."'");
mysql_query("UPDATE couple SET accept='1', req='2', joined='".time()."' WHERE partner='".$uid."' AND who='".$who."'");
$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='".$fmsg."' WHERE id='".$byuid."'");
$main.="<small>Please Note: This Marriage IS NOT Legally Binding</small><br/>";
$L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main);
echo foot_tag();
exit;
}

else if($action=="reqref")
{
$who = $_GET["who"];
addonline(getuid_sid($sid),"$sitename Chapel ($mmsg)","");
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="<p align=\"center\">";
$main.="<b> $sitename Chapel</b><br/><br/>";
$nick = getnick_uid($who);
$main.="Ohh.. We are sorry to hear about Your Decision, your proposer has been informed of your decison, thank you.<br/><br/>";
$byuid = getuid_sid($sid);
$couple = mysql_fetch_array(mysql_query("SELECT who, partner FROM couple WHERE partner='".$uid."'"));
$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 inbox SET text='".$msg."', byuid='".$byuid."', touid='".$couple[0]."', unread='1', timesent='".time()."'");
$res = mysql_query("DELETE FROM couple WHERE partner='".$uid."' AND who='".$couple[0]."'");
$main.="<small>Please Note: This Marriage IS NOT Legally Binding</small><br/>";
$L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main);
echo foot_tag();
exit;
}else if($action=="div")
{
addonline(getuid_sid($sid),"$sitename Chapel ($mmsg)","");
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="<p align=\"center\">";
//$me = mysql_fetch_array(mysql_query("SELECT who, partner, accept, req FROM couple WHERE who ='".$uid."'"));
$me = mysql_fetch_array(mysql_query("SELECT who,partner FROM couple WHERE who='".$uid."' OR partner='".$uid."'"));
//$you = mysql_fetch_array(mysql_query("SELECT who, partner, accept, req FROM couple WHERE partner ='".$uid."'"));
$nick = getnick_uid($me[0]);
$unick = getnick_uid($me[1]);

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

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

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

$main.="<form action=\"chapel.php?action=sep&sid=$sid\" method=\"post\">";
$main.="<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
$main.="<center><input type=\"submit\" name=\"submit\" value=\"Yes\"></center></form>";
$main.="<center><a href=\"chapel.php?action=chapel&sid=$sid\">No</a></center><br/><center>----</center><br/>";
$main.="<center><a href=\"index.php?action=main&sid=$sid\">Main Menu</a></center>";
$main.="</p>";
$main.="</body>";
}else if($action=="sep")
{
addonline(getuid_sid($sid),"$sitename Chapel ($mmsg)","");
$main.="<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
$main.="<p align=\"center\">";
$who = $_POST["who"];
$uid = getuid_sid($sid);
$res = mysql_query("DELETE FROM couple WHERE who='".$uid."' OR partner='".$uid."'");
$res = mysql_query("DELETE FROM couple WHERE who='".$who."' OR partner='".$who."'");
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 inbox SET text='".$msg."', byuid='".$uid."', touid='".$who."', unread='1', timesent='".time()."'");
$main.="You have successfully divorced $nick !<br/><br/>";
}else{
$main.="Database Error!<br/><br/>";

}
$L6="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,$L6,0,0,$main);
echo foot_tag();
exit;

}
?>

i have been trying to think what it can be but not getting any where with it this is also my first time i am doing this as well i am new to this coding this chapel id for the wapdesire v_2 script

thanks to any person that can help get this working or that can help me fix this problem

something else Fellow · 2,296 posts #2

Put:

error_reporting (E_ALL); ini_set ('display_errors', true);

after <?php at the top of the page and find the error yourself 😛

mentalhosting Junior · 19 posts #3

something else wrote: Put:

error_reporting (E_ALL); ini_set ('display_errors', true);

after <?php at the top of the page and find the error yourself :P

thanks something else but that never helped me one bit i toke out the errors it said then it give me more errors after that and toke them out and got more errors

it was telling me to take parts of my script out that i needed for the coding to work

surely some one has this coding for chapel for wapdesire v_2

and like i said on my first message i been working on this for a few days now to get it working that is why i am asking for help off some one

something else Fellow · 2,296 posts #8

is all the errors your functions? if so is this right: include('./core/main.inc');

is it ment to be:

main.inc.php ?

sorry havent delt with v2 for a while

mentalhosting Junior · 19 posts #10

crazybrumi wrote: nope its just how hes coded it is not correct. i'm still learning crazybrumi i done it my self i dont now what i am doing i just want to learn things

mentalhosting Junior · 19 posts #11

crazybrumi wrote: here is my copy that i coded its not completly finish but its looking much better than yours.. its got a few flaws in and still needs validating but its a starting point.

have you seen this working crazybrumi as i got this error

Warning: include(../core/main.inc) [function.include]: failed to open stream: No such file or directory in /home/*******/public_html/chapel.php on line 3

Warning: include(../core/main.inc) [function.include]: failed to open stream: No such file or directory in /home/********/public_html/chapel.php on line 3

Warning: include() [function.include]: Failed opening '../core/main.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*******/public_html/chapel.php on line 3

Fatal error: Call to undefined function header_type() in /home/*********/public_html/chapel.php on line 4
something else Fellow · 2,296 posts #12

exactly as i said the file core/main.inc Does not exist making functions on that page also not exist creating a load of errors.... check to see if you have that page and its not: ./core/main.inc.php and also the file is in the right location

crazybrumi Super moderator Principal · 1,064 posts #14

yes i have, it is on my site as half finished tho, it does all the database parts, but im gna add something different to it. and edit it abit, but i coded it so there should be a huge problem.

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

mentalhosting Junior · 19 posts #15

i got it to work but the request is not working in it i can send a request but the other person dont get the request and it dont show up in the chapel as well

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close