PHP Classes
elePHPant
Icontem

File: example1.php

Recommend this page to a friend!
  Classes of Abhishek Shukla  >  Simple XML User System  >  example1.php  >  Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: Example One
Class: Simple XML User System
Manage users storing their records in XML files
Author: By
Last change:
Date: 3 years ago
Size: 867 bytes
 

 

Contents

Class file image Download
<?php

require_once("class.simpleusersystem.php");

session_start();

$login=New simple_usersystem();

$thisuser=$login->login_form();


$menu="<h3><a href=\"?\">Home</a> | <a href=\"?p=p2\">Page 2</a>
| <a href=\"?p=profile\">Profile</a> | <a href=\"?p=contact\">Contact</a>
| <a href=\"?logout=y\">Logout</a></h3>"
;



$home="<h2>Home Page</h2>
This is a test home page for Simple User System class by Abhishek Shukla.
<br/>"
;

$p2="<h2>Page 2</h2>This is a Page 2.";

$contact="<h2>Contact</h2>This is Contact Page.";

//homepage
   
$content=$home;
   
//other pages
if(isset($_GET['p'])) {
    switch(
$_GET['p']){
        Case
"p2";
       
$content=$p2;
        break;
   
        Case
"contact";
       
$content=$contact;
        break;
   
        Case
"profile";
       
$login->adminurl="?p=profile&";
       
$content=$login->user_profile($thisuser);
        break;
    }
}

$login->renderHTML($login->usertool.$menu.$content);