Hi all,
I try to add a link to the left menu. But it will only pop-up if the users login with my login script. How can i add the script, so the links wil be vissable and when people click on the links it wil appair in the main content.
<?php
if (isset($_SESSION['user_id'])) {?>
<div class="myaccount">
<p><strong>My Account</strong></p>
<a href="myaccount.php">Mijn account</a><br>
<br>
<a href="mysettings.php">Instellingen</a><br>
<br>
<a href="logout.php">Uitloggen</a></div>
<?php }
if (checkAdmin()) {
?>
<p> <a href="admin.php">Admin CP </a></p>
<?php } ?>
<p> </p>
<p> </p>
<p> </p></td>
<td width="732" valign="top"><p> </p>
<h3 class="titlehdr">Welkom<?php echo $_SESSION['user_name'];?></h3>
<?php
if (isset($_GET['msg'])) {
echo "<div class=\"error\">$_GET[msg]</div>";
}
?>
PHP and TPL?
Moderator: Thorsten
Re: PHP and TPL?
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: PHP and TPL?
Ok but where is the inc/constants.php?? i dont have it in v2.3
Re: PHP and TPL?
Found it, it was in the config.
Re: PHP and TPL?
Still have some problems,
I now have the following:
<?php
include 'dbc.php';
page_protect();
?>
<?php
$testTitle = 'My first PMF page';
ob_start();
include( '/home/user/public_html/faq/myaccount.php' );
$testContent = ob_get_contents();
ob_end_clean();
$tpl->processTemplate ('writeContent', array(
'testTitle' => $testTitle,
'testContent' => $testContent
)
);
$tpl->includeTemplate('writeContent', 'index');
?>
But it gives me a white page instead of what i want to see...
I now have the following:
<?php
include 'dbc.php';
page_protect();
?>
<?php
$testTitle = 'My first PMF page';
ob_start();
include( '/home/user/public_html/faq/myaccount.php' );
$testContent = ob_get_contents();
ob_end_clean();
$tpl->processTemplate ('writeContent', array(
'testTitle' => $testTitle,
'testContent' => $testContent
)
);
$tpl->includeTemplate('writeContent', 'index');
?>
But it gives me a white page instead of what i want to see...
Re: PHP and TPL?
Hi,
a white page is a PHP fatal error. Please check the error log of your webserver.
bye
Thorsten
a white page is a PHP fatal error. Please check the error log of your webserver.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist