Subversion-Projekte lars-tiefland.ci

Revision

Revision 1050 | Revision 1054 | 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
	{
1052 lars 38
		$erg = $this->form_validaton->run();
39
		trigger_error(var_export($erg, true), E_USER_WARNING);
40
		if ($erg === false)
1049 lars 41
		{
42
			$errors = validation_errors();
43
			$this->smary->assign('errors', $errors);
1050 lars 44
			echo "1|";
1049 lars 45
			$this->edit($this->input->post('ID'));
46
		}
1050 lars 47
		else
48
		{
49
			echo "0|";
50
		}
1049 lars 51
	}
52
 
1022 lars 53
	/**
54
	 * User::edit_profile()
55
	 *
56
	 * @return
57
	 */
58
	public function edit_profile()
59
	{
60
		echo "eigenes Profile ändern";
61
	}
62
}
1052 lars 63
;