/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk
52.1.1 by b11johgu
Added controllers for examplepage, templatelayout.
1
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2
3
	class Ajax extends CI_Controller {
4
		/*
5
		 *	Constructor
6
		 */
7
		function __construct() {
8
			parent::__construct();
9
			
10
			//Load required library
11
			$this->load->model('user', '', TRUE);
12
		}
13
		
14
		
15
		/*
16
		 *	This function outputs data: user password hint.
17
		 */
64.1.1 by b11johgu
ExamplesController:
18
		public function pwdhint() {
19
		$user = $this->input->post('hintPwd');
52.1.1 by b11johgu
Added controllers for examplepage, templatelayout.
20
			$data = array(
21
				'hint' => $this->user->getPasswordHint($user)
22
			);
23
			
24
			//Output JSON data
25
			echo json_encode($data);
26
		}
27
		
28
		/*
29
		 *	This function outputs data: user password hint.
30
		 */
31
		public function pwdchange() {
32
			$pwdOld = $this->input->post('currentPwd');
33
			$pwdNew = $this->input->post('newPwd');
34
			$pwdHint = $this->input->post('hintPwd');
35
		
36
			$data = array(
37
				'status' => $this->user->changePassword($pwdOld, $pwdNew, $pwdHint)
38
			);
39
			
40
			//Output JSON data
41
			echo json_encode($data);
42
		}
64.1.1 by b11johgu
ExamplesController:
43
		
44
		public function categoryOrderDecrease(){
45
			$pwdOld = $this->input->post('currentPwd');
46
			$pwdNew = $this->input->post('newPwd');
47
		}
52.1.1 by b11johgu
Added controllers for examplepage, templatelayout.
48
	}
49
?>