Escolar Documentos
Profissional Documentos
Cultura Documentos
<?php
session_start();
include("password.php");
require_once "config.php";
/* Constants */
$TITLE = "Formation - User Login";
$CSS = array("assets/css/formation.css");
$Javascript = array();
$mode = $_GET["mode"];
/* Template */
require_once $TEMPLATE_PATH."header.php";
};
echo <<< XHTML
<h1>$TITLE</h1>
<form id="form" method="post" action="{$LOGIN_URL}?mode=login">
<label id="username_label" for="username"
class="normal">Username</label> :<br />
<input id="username" name="username" type="text" value=""
class="half" /><br />
<label id="password_label" for="password"
class="normal">Password</label> :<br />
<input id="password" name="password" type="password"
value="" class="half" /><br />
<input id="submits" type="submit" value="Login" />
</form>
XHTML;
?>
<?php
$USERS["drodrig1"] = "pwd1";
$USERS["jsutta"] = "pwd2";
$USERS["username3"] = "pwd3";
function check_logged(){
**Config**.php
<?php
$ASSETS_URL = "[url="https://url-link/formationXX/assets/%22;"]https://urllink/for...ionXX/assets/";[/url]
$ASSETS_PATH = "serverpath/formationXX/assets/";
$TEMPLATE_URL = "[url="https://urllink/formationXX/assets/template/%22;"]https://url-link/for...ets/template/";[/url]
$TEMPLATE_PATH = "serverpath/formationXX/assets/template/";
$LOGIN_URL = "[url="https://urllink/formationXX/login.php%22;"]https://url-link/for...nXX/login.php";[/url]
$LOGIN_PATH = "serverpath/formationXX/login.php";
?>
**Index**.php (After login, this is where I want to see admin differentiate from regular user. The
admin should be able so see and edit the following: CSS, JS, Email, PDF and Spread Sheet.
Meanwhile user can **only view** all except: CSS, JS)
<?php
require_once "config.php";
session_start(); /// initialize session
include("password.php");
check_logged(); /// function checks if visitor is logged.
/* Constants */
$TITLE = "Formation - User Login";
$CSS = array("assets/css/formation.css");
$Javascript = array();
/* Template */
require_once $TEMPLATE_PATH."header.php";
</div>
<div class="full row column">
<table id="formslist" cellpadding="0"
cellspacing="0">
<th>
<tr>
<td class="form_select">
<input id="selectallforms"
name="selectallforms" type="checkbox" value="Select All Forms" />
</td>
<td class="form_id">
ID
</td>
<td class="form_url">
URL
</td>
<td class="form_dates">
Launch Date
</td>
<td class="form_dates">
Expiration Date
</td>
<td class="form_autofill">
Autofill
</td>
<td class="form_save">
**CSS**
</td>
<td class="form_save">
**JS**
</td>
<td class="form_save">
Email
</td>
<td class="form_save">
PDF
</td>
<td class="form_dates">
Spread sheet
</td>
</tr>
</th>
</table>
</div>
</form>
XHTML;
?>