i got it to a point where it logs in, but it does not store session data it seems... like if i was to make a page that gives your session info, it would be empty
<?php
in_array('pluginname', $PRISM->plugins->getPlugins());
?>
<?php
php
if (!isset($_SESSION['user'])){
if (isset($_POST['login'])){
$adminUser = isset($_POST['loginUser']) ? $_POST['loginUser'] : '';
$adminPass = isset($_POST['loginPass']) ? $_POST['loginPass'] : '';
if ($adminUser && $adminPass){
if ($PRISM->admins->isPasswordCorrect($adminUser, $adminPass)){
if (!isset($_SESSION)){
$_SESSION = array('counter' => 1, 'staticvar' => 'mooh', 'lasttime' => time());
}
$_SESSION['user'] = $adminUser;
<p class="msg info">You are now logged in!</p>
php
}
}
}else{
<h3 class="tit">Login</h3>
<form method="post" action="login.php">
<label for="username">Username: </label> <input type="text" name="loginUser" size="20" class="input-text">
<label for="password">Password: </label><input type="password" name="loginPass" size="20" class="input-text"><br><br>
<label for="autologin">Remember Me?: </label><input type="checkbox" name="autologin">
<input type="submit" value="Log In" name="login">
</form>
php
}}else{
<p class="msg info">Your Already logged in.</p>
php
}
?>
<?php
php
if (isset($SERVER['PHP_AUTH_USER']))
{
if (!isset($_SESSION))
$_SESSION = array('user' => $SERVER['PHP_AUTH_USER'], 'counter' => 0);
else
$_SESSION['user'] = $SERVER['PHP_AUTH_USER'];
$_SESSION['autoLogin'] = TRUE;
}
else
{
if (isset($_SESSION['autoLogin'])) unset($_SESSION['autoLogin']);
}
?>
<?php
php
if (isset($_SESSION))
{
$_SESSION['counter']++;
$_SESSION['lasttime'] = time();
}
else
{
$_SESSION = array
(
'counter' => 1,
'staticvar' => 'mooh',
'lasttime' => time()
);
}
?>
<?php
date('l, d-M-y H:i:s T', (int) $v[1])
?>
<?php
gmdate('l, d-M-y H:i:s T', (int) $v[1])
?>
<?php
foreach ($PRISM->plugins->getPlugins() as $plugin)
{
var_dump($plugin::NAME);
}
?>
<?php
php
$NavLinks = array(
array('File' => 'cruise.php', 'LinkText' => 'Cruise', 'Plugin' => 'Cruise')
);
?>
<?php
php
Foreach($NavLinks as $info){
if(in_array($info['Plugin'], $PRISM->plugins->getPlugins()) ){
echo("<li".(( basename($SERVER["SCRIPT_NAME"]) == $info["File"] ) ? ' id="menu-active"' : '')."><a href=\"{$info["File"]}\"><span>{$info["LinkText"]}</span></a></li>");
}}
?>