<?php
/**
 * 
 * @file address_edit.php
 * @copyright (c) 2005 - 2007 eifr.com
 * @license http://www.gnu.org/copyleft/gpl.html gnu/gpl
 * eifr is free software
 */

require_once('../../includes/inc_admin.php');
require_once(EIFR_ROOT . 'libraries/template.php');
require_once('class_address.php');

$url = 'mod_address/address_edit.php';
Common::checkAdminFileAuth($url); //check file authority
$clComAddress = new ComAddress();
$clTemplate = new Template(getAdminTemplateDir($url));

if (!isset($act)) $act = '';
switch ($act) {
    case 'save_add':
        $clComAddress -> addRecords();
        break;
    case 'save_edit':
        $clComAddress -> editRecords();
        break;

    case 'copy':
        $clComAddress -> copyRecords();
        break;

    case 'add':
    case 'edit':
    default :

        $clComAddress -> layout_address_edit();
        break;
} 

?>
