add, remove, edit lease
This commit is contained in:
@@ -190,6 +190,14 @@ switch ($this->get_id()) {
|
||||
# hír létrehozása
|
||||
$smarty->display('news_create.tpl');
|
||||
break;
|
||||
case 'lease':
|
||||
# bérlettípus létrehozása
|
||||
$training_type_query = "SELECT * FROM training_type ORDER BY trt_name ASC;";
|
||||
$training_type_assoc_array = $sql->assoc_array($training_type_query);
|
||||
$smarty->assign("training_type_assoc_array", $training_type_assoc_array);
|
||||
|
||||
$smarty->display('lease_create.tpl');
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
|
||||
9
_include/include_delete_lease.php
Normal file
9
_include/include_delete_lease.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
$sql->update_table('lease', array('l_deleted' => 1), array('l_id' => $this->get_id()));
|
||||
log::register('delete_lease', $this->get_id());
|
||||
header("Location: /admin/lease");
|
||||
}
|
||||
|
||||
?>
|
||||
29
_include/include_lease.php
Normal file
29
_include/include_lease.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
# HA NINCS ID, AKKOR BÉRLETTÍPUS LISTA
|
||||
|
||||
if ($this->is_id()) {
|
||||
# BÉRLETTÍPUS SZERKESZTÉSE
|
||||
|
||||
$lease = new lease();
|
||||
$lease->set_l_data_by_id($this->get_id());
|
||||
|
||||
$training_type_query = "SELECT * FROM training_type ORDER BY trt_name ASC;";
|
||||
$training_type_assoc_array = $sql->assoc_array($training_type_query);
|
||||
|
||||
$smarty->assign("training_type_assoc_array", $training_type_assoc_array);
|
||||
$smarty->assign('lease',$lease);
|
||||
|
||||
$smarty->display('lease_data_edit.tpl');
|
||||
}
|
||||
else {
|
||||
|
||||
# BÉRLETTÍPUS LISTA
|
||||
|
||||
$l_query = "SELECT * FROM lease WHERE l_deleted = 0 ORDER BY l_name ASC";
|
||||
$l_assoc_array = $sql->assoc_array($l_query);
|
||||
|
||||
$smarty->assign('l_assoc_array',$l_assoc_array);
|
||||
$smarty->display('lease_list.tpl');
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user