Location: PHPKode > projects > PushOk SEMA > html/web/project/project_view.php
<?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

/*
subscription: contain more information about some project.
*/
$nIdProject = 0;
if ( isset($_GET['idproject']) && $_GET['idproject']>0 )
	$nIdProject = $_GET['idproject'];
else 
	web_RedirectRelative("sema.php");

class web_Project extends web_Layout 
{
	function Info()
	{
		global $arProjectStatus, $nIdProject, $arProjectTT;
		
		$oIn = array('idcontact_current' => $_SESSION['iduser'], 'id' => $nIdProject);
		$GLOBALS['LIB_DISPATCHER']->ProcessMessage("LM_PROJECT_SEARCH", $oIn, $arProjects);

		if (count($arProjects))
		{
			$arProjectInfo = $arProjects['projects'];
			
			// project data
			$this->formStart($arProjectInfo[$nIdProject]['title']."&nbsp;&nbsp;&nbsp;(".$nIdProject.")");
			$this->formSection("General");
			$this->formItem(_LW("Description"),"memo",$arProjectInfo[$nIdProject]['description']);
			$this->formItem(_LW("Time type"),"string",$arProjectTT[$arProjectInfo[$nIdProject]['time_type']]);
			$this->formItem(_LW("Start date"),"date",$arProjectInfo[$nIdProject]['bdate']);
			$this->formItem(_LW("End date"),"date",$arProjectInfo[$nIdProject]['edate']);
			$this->formItem(_LW("Status"),"string",$arProjectStatus[$arProjectInfo[$nIdProject]['status']]);
			
			$oIn = array('idparent' => $nIdProject, 'idcontact_current' => $_SESSION['iduser'], 'layout' => &$this);
			$GLOBALS['WEB_DISPATCHER']->ProcessMessage("WM_PROJECT_VIEW_SHOW", $oIn, $oOut);
			$this->formEnd();
		}
		else
			web_PageError(_LW("Access denied, or object deleted !"));

		?>
		<?PHP
	}
}

$oPage = new web_Project;
$oPage->m_windowHeader = _LW("Project info");
$oPage->WebStack("project_view.php", $oPage->m_windowHeader, $oPage->m_windowHeader, web_GetPageGetParams());

if ( !isset($_SESSION['iduser']) )
	web_RedirectRelative("sema.php");

$oPage->idobject = $nIdProject;
$oPage->object_type = ID_SEMA_PROJECT;
$oPage->m_menuFLvl = "Projects";
$oPage->RenderPage();

?>
Return current item: PushOk SEMA