Subversion-Projekte lars-tiefland.inventar

Revision

Revision 20 | 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 28 2008-05-24 22:02:19Z 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);
28 lars 22
			$smarty->assign("h1","Computerdetails");
14 lars 23
		break;
24
		case "edit":
28 lars 25
			$tpl_f="edit_comp.tpl";
14 lars 26
		break;
28 lars 27
		case "ask":
28
			$tpl_f="confirm.tpl";
29
		break;
30
		case "new":
31
			$tpl_f="new_comp.tpl";
32
		break;
14 lars 33
		case "del":
28 lars 34
			$tpl_f="meld.tpl";
14 lars 35
		break;
36
		default:
37
			$tpl_f="index.tpl";
38
			$comp=comp::get_computers();
39
			$smarty->assign("list",$comp);
28 lars 40
			$smarty->assign("h1","Computer&uuml;bersicht");
14 lars 41
		break;
42
	}
4 lars 43
 
14 lars 44
	$smarty->display($tpl_f);
1 lars 45
 
28 lars 46
?>