You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.5 KiB
46 lines
1.5 KiB
<?php
|
|
include("header.php");
|
|
|
|
// get id
|
|
$assetclassgroup_id = $_GET['assetclassgroup_id'];
|
|
|
|
// set template
|
|
$tp = new Template("tpl/assetclassgroupview.tpl");
|
|
|
|
// set language variables
|
|
$tp->setvars($lang);
|
|
|
|
// get assetclassgroup info
|
|
$result = mysql_query("SELECT assetclassgroup_name, color FROM assetclassgroup WHERE assetclassgroup_id='$assetclassgroup_id'") or die(mysql_error());
|
|
$row=mysql_fetch_object($result);
|
|
$tp->set("assetclassgroup_name", $row->assetclassgroup_name);
|
|
$tp->set("color", $row->color);
|
|
|
|
$result = mysql_query("SELECT assetclass_id, assetclass_name FROM assetclass WHERE assetclassgroup_id='$assetclassgroup_id' ORDER BY assetclass_name") or die(mysql_error());
|
|
for ($i=0;$row=mysql_fetch_object($result);$i++) {
|
|
$tp->set("assetclass_name", $row->assetclass_name);
|
|
$tp->set("assetclass_id", $row->assetclass_id);
|
|
$tp->parse("assetclassrow");
|
|
}
|
|
if (($i>0) ? $tp->parse("assetclass") : $tp->hide("assetclass"));
|
|
|
|
// display options
|
|
if($_SESSION['suser_level'] >= $config_userlevel_assetclassgroupedit) {
|
|
$tp->set("assetclassgroup_id", $assetclassgroup_id);
|
|
$tp->parse("assetclassgroupedit");
|
|
} else {
|
|
$tp->hide("assetclassgroupedit");
|
|
}
|
|
if($_SESSION['suser_level'] >= $config_userlevel_assetclassgroupdel) {
|
|
$tp->set("assetclassgroup_id", $assetclassgroup_id);
|
|
$tp->parse("assetclassgroupdel");
|
|
} else {
|
|
$tp->hide("assetclassgroupdel");
|
|
}
|
|
|
|
// output
|
|
$tp->parse();
|
|
$tp->spit();
|
|
|
|
include("footer.php");
|
|
?>
|