Location: PHPKode > projects > JobAppr > Jobappr-1.4/admin/faq.php
<?php 
session_start();
if(!isset($_SESSION['password'])){
	header("Location: index.php");
	exit();
}
require_once('../includes/functions.php');
require_once('inc/admin-functions.php');

# VARIABLES
$user_id = $_SESSION['user_id'];
$error = 'There were problems encountered';
$success = 'A successful operation just happened';
$notice = 'This is a notice from the administrator';
?>

<?php get_template('header', 'Setup FAQ'); ?>

	<div id="main">
		<h1>Setup FAQ</h1>
		
		<p>These are some setup rules and suggestions for integrating new pages into this control panel.</p>
		
		<h4>Registration</h4>
		<p>By default, all users who register on the site are set as 'Limited Users' (Role #2)</p>
		
		<h4>Messages</h4>
		<p>These are the types of messages that can be shown to the user. <code>$error</code>, <code>$success</code> or <code>$notice</code></p>
		<?php display_messages(); ?>
	
		<h4>New Control Panel Pages</h4>
		<p>To create a new control panel page, include the following code just under the <code>&lt;?php</code> on line #2 of the page you want to protect inside the <code>/admin/</code> folder.</p>
		<pre>session_start();
if(!isset($_SESSION['password'])){
	header("Location: index.php");
	exit();
}
require_once('../includes/functions.php');
require_once('inc/admin-functions.php');</pre>

		<h4>Role-Based Access</h4>
		<p>By default, limited users (Role #2) have access to everything. If you need a part of a page restricted to only administrators (Role #1), wrap it in this code:</p>
		<pre>if( $_SESSION['role'] == 1 ){ echo 'Only admins can see this'; }</pre>
		<p>If a whole page needs to be restricted to only administrators (Role #1) add this directly under the <code>$_SESSION['password']</code> check:</p>
		<pre>if( $_SESSION['role'] != 1 ){
	header("Location: dashboard.php");
	exit();
}</pre>
			
		<h4>HTML Element Styling</h4>
		
		<p>Lorem ipsum dolor sit amet, <a href="#" title="test link">test link</a> adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.</p>
	
		<h5>Heading 5</h5>
		<ul>
			<li>List Item 1</li>
			<li>List Item 2</li>
			<li>List Item 3</li>
		</ul>
		
		<h6>Heading 6</h6>
		<ol>
			<li>List Item 1</li>
			<li>List Item 2</li>
			<li>List Item 3</li>
		</ol>
		
	 
	<small><a href="#wrapper">[small]</a></small>
	
	</div>	


<?php get_template('sidebar'); ?>

<?php get_template('footer'); ?>
Return current item: JobAppr