<?PHP
// Pushok's SEMA (Small Enterprise Management Application)
//
// Copyright (C) 2004 Pushok Software http://www.pushok.com
//
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
if ( isset($_GET['id']) && $_GET['id']>0 )
{
$GLOBALS['LIB_DISPATCHER']->ProcessMessage("LM_OBJECT_INFO", $_oIn=array('idobject'=>$_GET['id']), $_oOut=array());
if ( isset($_oOut['object']) && count($_oOut['object']) )
{
switch ( $_oOut['object']['type'] )
{
case ID_SEMA_CONTACT:
web_RedirectRelative("sema.php?page=/web/contact/contact_view.php&idcontact=".$_GET['id']);
break;
case ID_SEMA_ISSUE:
web_RedirectRelative("sema.php?page=/web/issue/issue_view.php&idissue=".$_GET['id']);
break;
case ID_SEMA_PROJECT:
web_RedirectRelative("sema.php?page=/web/project/project_view.php&idproject=".$_GET['id']);
break;
case ID_SEMA_TASK:
web_RedirectRelative("sema.php?page=/web/task/task_view.php&idtask=".$_GET['id']);
break;
case ID_SEMA_NOTE:
web_RedirectRelative("sema.php?page=/web/note/note_view.php&idnote=".$_GET['id']);
break;
}
}
}
else
return PEAR::raiseError(_LW("Wrong object id"), E_USER_WARNING);
?>