Topic: Website intergration
Here's my folder layout (for future reference):
public_html
home.html
index.html
punbb
forum folders & files
<?php
// Login Menu
define('FORUM_ROOT', './punbb/');
require FORUM_ROOT.'include/common.php';
function login_menu()
{
global $pun_user;
if ($pun_user['is_guest'])
{
$stroutput= '<form id="login" method="post" action="'.PUN_ROOT.'login.php?action=in" onsubmit="return process_form(this)">
<input type="hidden" name="form_sent" value="1" />
<input type="hidden" name="redirect_url" value="'.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'" />
<label for="req_username">Username: </label>
<input type="text" id="req_username" name="req_username" size="4" maxlength="25" />
<label for="req_password">Password: </label>
<input type="password" id="req_password" name="req_password" size="4" maxlength="16" />
<input type="submit" name="login" value="Login" />
[<a href="'.PUN_ROOT.'register.php">Register</a>]
</form>';
echo $stroutput;
}
else
{
$stroutput= '<p>Logged in as: '.pun_htmlspecialchars($pun_user['username']).' ('.$pun_user['g_user_title'].') [<a href="'.PUN_ROOT.'login.php?action=out&id='.$pun_user['id'].'">Logout</a>]</p>';
echo $stroutput;
}
}
?>
I've added the above code to my home.html page
along with this beneath it:
<?php login_menu(); ?>
Now when I open my home page I get the following error:
Fatal error: Call to undefined function pun_htmlspecialchars() in /home/a9759590/public_html/home.html on line 98
Any ideas? I want to fix this so that login to the main site is only available through logging in through the forum.
Edit: Just done a quick count and the error is on the following line:
$stroutput= '<p>Logged in as: '.pun_htmlspecialchars($pun_user['username']).' ('.$pun_user['g_user_title'].') [<a href="'.PUN_ROOT.'login.php?. . .