Subversion-Projekte lars-tiefland.ci

Revision

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

Revision Autor Zeilennr. Zeile
1022 lars 1
<?php
2
 
3
/**
4
 * User
5
 *
6
 * @package
7
 * @author WebanOS CI
8
 * @copyright Lars Tiefland
9
 * @version 2016
10
 * @access public
11
 */
1023 lars 12
class User_rechte extends CI_Controller
1022 lars 13
{
14
 
15
	public function __construct()
16
	{
17
		parent::__construct();
1027 lars 18
		$this->load->model('user_rechte_model', 'user_rechte');
1022 lars 19
	}
20
 
21
	/**
22
	 * User::edit()
23
	 *
24
	 * @param mixed $id
25
	 * @return void
26
	 */
27
	public function edit($id = null)
28
	{
1031 lars 29
		$user = $this->user_rechte->get_rechte($id);
30
		$modules = $this->user_rechte->get_rights();
31
		$this->smarty->assign('user', $user);
1027 lars 32
		$this->smarty->assign('modules', $modules);
1024 lars 33
		$this->smarty->view('user_rechte.tpl');
1022 lars 34
	}
35
 
1049 lars 36
	public function save()
37
	{
38
		if ($this->form_validaton->run() === false)
39
		{
40
			$errors = validation_errors();
41
			$this->smary->assign('errors', $errors);
1050 lars 42
			echo "1|";
1049 lars 43
			$this->edit($this->input->post('ID'));
44
		}
1050 lars 45
		else
46
		{
47
			echo "0|";
48
		}
1049 lars 49
	}
50
 
1022 lars 51
	/**
52
	 * User::edit_profile()
53
	 *
54
	 * @return
55
	 */
56
	public function edit_profile()
57
	{
58
		echo "eigenes Profile ändern";
59
	}
60
}
1050 lars 61
;