Splash Page Suport?

Ok so I am working on a Splash page for my site but i have 2 issues.

1. The login isn't working

2. The Facebook Connect Images doesn't show (Dose show in HTML version but not PHP) 

 

Here is the code:

<?php

 

require_once( "inc/header.inc.php" );

 

require_once( BX_DIRECTORY_PATH_INC . "design.inc.php" );

 

require_once( BX_DIRECTORY_PATH_INC . "db.inc.php" );

 

require_once( BX_DIRECTORY_PATH_INC . "profiles.inc.php" );

 

 

check_logged();

 

if(!isMember()) {

echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

 

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Come Together Support</title>

    

 

<link media="screen" rel="stylesheet" type="text/css" href="./splash_files/style.css">

 

 

    

<script language="javascript" type="text/javascript">

    function toggle(obj) {

        if ( document.getElementById(obj).style.display != "none" ) {

            document.getElementById(obj).style.display="none";

        }

        else {

            document.getElementById(obj).style.display="block";

        }

    }

    </script>

    

 

    <script type="text/javascript" src="./splash_files/jquery.js"></script>

    

    

<script language="javascript" type="text/javascript">

function toggle2(obj) {

var el = document.getElementById(obj);

if ( el.style.display != "none" ) {

$("#" + obj).slideUp();

}

else {

$("#" + obj).slideDown();

}

}

    </script>

    

<body id="body" style="">

    <div id="mainCenter" >

        <div id="mainContainer">

 

            <div id="nav">

           <a href="#" class="navLogo"></a>

                                <div class="loggedIn">

                    <a class="login" href="join.php">join</a>&nbsp;&nbsp;<a class="login" href="member.php">login</a>

                </div>

                

           <div class="mainArea">                    

               <div class="buttons">

                                      

                          </div>

                          <div class="btm"></div>

                      </div>

                  </div>

                                  </div>

                    <div id="navSearch">

                    

                        <a href="#" class="searchBtn" title="search" onclick="document.srchfrm.submit()"></a>

                    </div>

                

            

 

            <div id="shadowContainer">

                <div id="mainContent" class="homepage">                

<script language="javascript" type="text/javascript">

                function clearval(obj) {

                    document.getElementById(obj).value="";

                }

                </script>

                

                <div id="home">

<div id="main">

<div id="illustration">

<img src="./splash_files/home.png"><br>

<img src="./splash_files/network.jpg" height="300px" width="400px">

</div>

<div id="quotes">

 

</div>

</div>

<div id="sidebar">

 

<h1>Instantly make friends and find the help you need</h1>

 

                       <div id="loginBox">

<div class="box">

 

<div class="top">

<div class="floatLeft">

login to your account now

</div>

<form onsubmit="validateLoginForm(this); return false;" method="post" action="member.php" id="login_box_form">

<input type="text" name="ID" value="username" maxlength="20" class="default login" onclick="clearval(&#39;id&#39;);" style="margin-right: 5px;">

<input type="password" name="Password" value="password" class="default login" onclick="clearval(&#39;password&#39;);">

<input type="hidden" name="login" value="1"> 

<a href="member.php" id="loginButton" class="sidebarButton floatLeft" onclick="document.loginForm.submit();"><span>login</span></a>

<div class="legalText">

<a href="forgot.php">Forgot password?</a>

</div>

</div>

<div class="bottom"></div>

</div>

 

</div>

                       

<div id="joinBox">

<div class="box">

<div class="top">

                               <center>

 

<div style="background-image: url("modules/deano/deanos_facebook_connect/templates/base/images/fbconnectbutsm.png"); width: 103px; height: 39px; float: left; margin-right: 2px; cursor: pointer;" onclick="window.open ("modules/?r=deanos_facebook_connect/login_form","_self");"></div>

 

                                    </center>

</div>

<div class="bottom"></div>

</div>

</div>

 

</div>

</div>

                    </div>

                </div>

<div id="footer">

                <div id="links" class="longer">

               

                    <div>

                        <a href="contact.php">contact us</a>&nbsp; |&nbsp;    

                        <a href="about_us.php">about us</a>&nbsp; |&nbsp;

                        <a href="privacyphp">privacy policy</a>&nbsp; |&nbsp;

                        <a href="terms_of_use.php">terms of use</a>

                    </div>

                </div>

                

                <div id="copyright">Copyright © 2013 Come Together Support</a></div>

                    

   </div>       

   </div>

    </div>

 

</body></html>';

}

 

else {

header("Location: index.php");

}

 

?>

 

~~Mike ~~ This Signature is missing something :(
Quote · 5 Jan 2013

I am guessing your html version is different.

Specifically it would appear you have changed some single quotes used within the javascript to double quotes to try and make it compatible with PHP. But your use of those quotes is incorrect. You have several areas with illegal use of double quotes inside another set of double quotes which damages the javascript.

Either encase the html using the heredoc method, or escape the single quotes used in the javascript.

https://www.deanbassett.com
Quote · 5 Jan 2013

I have fixed the FBC issue now but the login box just sends your to the login page at member.php (without logging them in)

 

Updated code:

<?php

 

require_once( "inc/header.inc.php" );

 

require_once( BX_DIRECTORY_PATH_INC . "design.inc.php" );

 

require_once( BX_DIRECTORY_PATH_INC . "db.inc.php" );

 

require_once( BX_DIRECTORY_PATH_INC . "profiles.inc.php" );

 

 

check_logged();

 

if(!isMember()) {

echo <<<EOF

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

 

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Come Together Support</title>

    

 

<link media="screen" rel="stylesheet" type="text/css" href="./splash_files/style.css">

 

 

    

 

 

    <script type="text/javascript" src="./splash_files/jquery.js"></script>

    

    

   

<body id="body" style="">

    <div id="mainCenter" >

        <div id="mainContainer">

 

            <div id="nav">

           <a href="#" class="navLogo"></a>

                                <div class="loggedIn">

                    <a class="login" href="join.php">join</a>&nbsp;&nbsp;<a class="login" href="member.php">login</a>

                </div>

                

           <div class="mainArea">                    

               <div class="buttons">

                                      

                          </div>

                          <div class="btm"></div>

                      </div>

                  </div>

                                  </div>

                    <div id="navSearch">

                    

                        <a href="#" class="searchBtn" title="search" onclick="document.srchfrm.submit()"></a>

                    </div>

                

            

 

            <div id="shadowContainer">

                <div id="mainContent" class="homepage">                

 

                

                <div id="home">

<div id="main">

<div id="illustration">

<img src="./splash_files/home.png"><br>

<img src="./splash_files/network.jpg" height="300px" width="400px">

</div>

<div id="quotes">

 

</div>

</div>

<div id="sidebar">

 

<h1>Instantly make friends and find the help you need</h1>

 

<div id="loginBox">

<div class="box">

 

<div class="top">

<div class="floatLeft">

login to your account now

</div>

<form onsubmit="validateLoginForm(this); return false;" method="post" action="member.php" id="login_box_form">

<input type="hidden" value="member.php" name="relocate" class="form_input_hidden">      

<input type="hidden" value="Tg3Skixqd7Kxg+VGXD=Q" name="csrf_token" class="form_input_hidden">

<input type="text" name="ID" value="" maxlength="20" class="default login" onclick="clearval(&#39;id&#39;);" style="margin-right: 5px;"/>

<input type="password" name="Password" value="" class="default login" onclick="clearval(&#39;password&#39;);"/>

<a href="member.php" id="loginButton" class="sidebarButton floatLeft" onclick="document.loginForm.submit();"><span>login</span></a>

<div class="legalText">

<a href="forgot.php">Forgot password?</a>

</div>

</div>

<div class="bottom"></div>

</div>

 

 

 

</div>

                       

<div id="joinBox">

<div class="box">

<div class="top">

                               <center>

 

<div style="background-image: url('modules/deano/deanos_facebook_connect/templates/base/images/fbconnectbutsm.png'); width: 103px; height: 39px; float: left; margin-right: 2px; cursor: pointer;" onclick="window.open ('modules/?r=deanos_facebook_connect/login_form','_self');"></div>

 

                                    </center>

</div>

<div class="bottom"></div>

</div>

</div>

 

</div>

</div>

                    </div>

                </div>

<div id="footer">

                <div id="links" class="longer">

               

                    <div>

                        <a href="contact.php">contact us</a>&nbsp; |&nbsp;    

                        <a href="about_us.php">about us</a>&nbsp; |&nbsp;

                        <a href="privacyphp">privacy policy</a>&nbsp; |&nbsp;

                        <a href="terms_of_use.php">terms of use</a>

                    </div>

                </div>

                

                <div id="copyright">Copyright © 2013 Come Together Support</a></div>

                    

   </div>       

   </div>

    </div>

 

</body></html>

EOF;

}

 

else {

header("Location: index.php");

}

 

?>

~~Mike ~~ This Signature is missing something :(
Quote · 5 Jan 2013

The logon form calls a javascript function validateLoginForm

But it does not appear that you have included the needed JS file that contains that function.

<script language="javascript" type="text/javascript" src="http://www.yoursite.com/inc/js/login.js"></script>

https://www.deanbassett.com
Quote · 5 Jan 2013

Ok thats been added but still have the same issue.

Would I need to add anything to this (eg. The csrf_token or the form action)

<form onsubmit="validateLoginForm(this); return false;" method="post" action="member.php" id="login_box_form">
<input  class="form_input_hidden bx-def-font" type="hidden" name="csrf_token" value="cV4xs5rYHF2=caQ68kyq" />
<input type="text" name="ID" value="Username" maxlength="20" class="default login" onclick="clearval('Username');" style="margin-right: 5px;"/>
<input type="password" name="Password" value="Password" class="default login" onclick="clearval('Password');"/>
</form>

~~Mike ~~ This Signature is missing something :(
Quote · 6 Jan 2013

Check your firebug console for errors. It will show what the problem is.

so much to do....
Quote · 6 Jan 2013

Hey all I managed to get it to work by calling this JS Code in the <head> Tag:

<script type="text/javascript">
function frmSubmit() {
document.login_box_form.submit();
}
</script>

~~Mike ~~ This Signature is missing something :(
Quote · 6 Jan 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.