Subversion-Projekte lars-tiefland.ci

Revision

Revision 1023 | Zur aktuellen Revision | Details | 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
 */
12
class User extends CI_Controller
13
{
14
 
15
	public function __construct()
16
	{
17
		parent::__construct();
18
		$this->load->model('user_model', 'user');
19
	}
20
	/**
21
	 * User::index()
22
	 *
23
	 * @return
24
	 */
25
	public function index()
26
	{
27
		$users = $this->user->user_list();
28
		$this->smarty->assign('users', $users);
29
		$this->smarty->view('user.tpl');
30
	}
31
 
32
	/**
33
	 * User::edit()
34
	 *
35
	 * @param mixed $id
36
	 * @return void
37
	 */
38
	public function edit($id = null)
39
	{
40
		$nav_pos_sel = "";
41
		$user = array();
42
		if ($id)
43
		{
44
			$user = $this->user->get_info($id);
45
			$nav_pos_sel = $user["navigation_pos"];
46
		}
47
		if ($nav_pos_sel == "")
48
		{
49
			if ($GLOBALS["web_rechte"]["general"]["design"]["neu"] == "tabs")
50
			{
51
				$nav_pos_sel = "oben";
52
			}
53
			else
54
			{
55
				$nav_pos_sel = "links";
56
			}
57
		}
58
		$nav_pos = array(
59
			"oben" => "oben",
60
			"links" => "links",
61
			);
62
		$this->smarty->assign("nav_pos", $nav_pos);
63
		$this->smarty->assign("nav_pos_sel", $nav_pos_sel);
64
		$this->smarty->assign('user', $user);
65
		$this->smarty->view('user_edit.tpl');
66
	}
67
 
68
	/**
69
	 * User::edit_profile()
70
	 *
71
	 * @return
72
	 */
73
	public function edit_profile()
74
	{
75
		echo "eigenes Profile ändern";
76
	}
77
}