<?php
/**
 * 
 * @file address.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.php';
Common::checkAdminFileAuth($url); //check file authority
$clComAddress = new ComAddress();

if (!isset($act)) $act = '';
switch ($act) {
    case 'up':
    case 'down':
        $clComAddress -> orderbyRecords();
        break;

    case 'setvalue':
        $clComAddress -> setFieldRecords();
        break;

    case 'delete_forever':
        $clComAddress -> deleteRecords();
        break;
} 

$clTemplate = new Template(getAdminTemplateDir($url));
$clComAddress -> layout_address();

?>
