Login   Register  
PHP Classes
elePHPant
Icontem

File: partnerhandle.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Voznyak Nazar  >  MVC Membership System  >  partnerhandle.php  >  Download  
File: partnerhandle.php
Role: Application script
Content type: text/plain
Description: partner handling functions
Class: MVC Membership System
Membership system using the MVC design pattern
Author: By
Last change:
Date: 2003-12-30 00:35
Size: 807 bytes
 

Contents

Class file image Download
<?

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

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

?>