PHP Classes

File: adminhandle.php

Recommend this page to a friend!
  Classes of Voznyak Nazar   MVC Membership System   adminhandle.php   Download  
File: adminhandle.php
Role: Application script
Content type: text/plain
Description: admin actions
Class: MVC Membership System
Membership system using the MVC design pattern
Author: By
Last change:
Date: 20 years ago
Size: 601 bytes
 

Contents

Class file image Download
<?

/*** required inclusions */
require_once '../setup.php';
require_once
ROOT.'functions.inc';
require_once
ROOT.'CAdmin.inc';

if (
isAdminLogged()) {
 
$user = new CAdmin($_SESSION['username'], $_SESSION['password']);
  if (
$user->check()) {
    switch (
$action) {
     case
'remove':
     
$m = new CAdmin($_GET['username'], $_GET['password']);
     
$m->remove();
      break;
     case
'store':
     
$m = new CAdmin($_GET['username'], $_GET['password']);
     
$m->store();
      break;
    default: die(
"Unknown action");
    }
   
Header("Location: adminpages.php?page=printAdmins");
  }
}

?>