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

require_once('../../includes/inc_admin.php');
require_once('class_guestbook.php');

$url = 'mod_guestbook/guestbook_edit.php';
Common::checkAdminFileAuth($url); //check file authority
$clComguestbook = new Comguestbook();

$act = kGet('act');
switch ($act) {
    case 'save_add':
        $clComguestbook -> addRecords();
        break;

    case 'save_edit':
        $clComguestbook -> editRecords();
        break;

    case 'delete':
        $clComguestbook -> recycleRecords();
        break;

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

	case 'add':
    case 'edit':
	default:
        $clComguestbook -> layout_guestbook_edit();
        break;
} 

?>