/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to codeigniter/application/controllers/ajax.php

  • Committer: b11johgu
  • Date: 2013-05-14 12:30:38 UTC
  • mto: This revision was merged to the branch mainline in revision 65.
  • Revision ID: b11johgu@student.his.se-20130514123038-rthxj3f34o32gpxy
ExamplesController:
- Added expand/collapse arrows for categories/subcategories.
- Added category positioning (incomplete).

more general changes made.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
                 */
 
18
                public function pwdhint() {
 
19
                $user = $this->input->post('hintPwd');
 
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
                }
 
43
                
 
44
                public function categoryOrderDecrease(){
 
45
                        $pwdOld = $this->input->post('currentPwd');
 
46
                        $pwdNew = $this->input->post('newPwd');
 
47
                }
 
48
        }
 
49
?>
 
 
b'\\ No newline at end of file'