Subversion-Projekte lars-tiefland.inventar

Revision

Revision 14 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
7 lars 3
	//$Id: index.php 20 2008-05-15 19:12:18Z lars $
4
 
5
	/**
6
	 * @package	Inventar Datenbank
7
	 * @author Lars Tiefland <ltiefland@gmail.com>
8
	 * @copyright 2008
9
	 **/
1 lars 10
 
3 lars 11
	require_once("include/common.php");
1 lars 12
 
14 lars 13
	switch($_POST["mode"])
14
	{
15
		case "details";
16
			$tpl_f="details.tpl";
17
			$s=new comp($_POST["id"]);
18
			$comp=$s->toArray();
20 lars 19
			$comp_hw=computer_hardware::getHardware($_POST["id"]);
20
			$smarty->assign("comp_hw",$comp_hw);
14 lars 21
			$smarty->assign("comp",$comp);
22
		break;
23
		case "edit":
24
			$tpl_f="edit.tpl";
25
		break;
26
		case "del":
27
			$tpl_f="del.tpl";
28
		break;
29
		default:
30
			$tpl_f="index.tpl";
31
			$comp=comp::get_computers();
32
			$smarty->assign("list",$comp);
33
		break;
34
	}
4 lars 35
 
14 lars 36
	$smarty->display($tpl_f);
1 lars 37
 
38
?>