/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/models/admin/admin_model.php

  • Committer: a11andoh
  • Date: 2013-05-24 11:37:57 UTC
  • mfrom: (97 lenasys_b)
  • mto: This revision was merged to the branch mainline in revision 98.
  • Revision ID: a11andoh@student.his.se-20130524113757-cdvtx3xjyimouu5k
blurp

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
                return $query->result();
20
20
        }
21
21
 
 
22
        function setCourseHidden($courseID) {
 
23
                $this->db->where("courseID", $courseID);
 
24
                $this->db->update("Courses", array("isHidden" => 1));
 
25
        }
 
26
 
 
27
        function unsetCourseHidden($courseID){
 
28
                $this->db->where("courseID", $courseID);
 
29
                $this->db->update("Courses", array("isHidden" => 0));
 
30
        }
 
31
 
22
32
        function addCourse($cid, $name, $courseData){
23
33
                $data = array(
24
34
                        'courseID' => $cid ,
31
41
 
32
42
        }
33
43
 
 
44
        function editCourse($cid, $name, $courseData) {
 
45
                $data = array(
 
46
                        'name' => $name,
 
47
                        'courseData' => $courseData
 
48
                );
 
49
 
 
50
                $this->db->where('courseID', $cid);
 
51
                $this->db->update('Courses', $data);
 
52
        }
 
53
 
34
54
        function getMenu(){
35
55
                $menu = array();
36
56
                $courses = $this->db->get("Courses");
212
232
                        echo json_encode(array('status'=>'File was uploaded successfuly!'));
213
233
                }       
214
234
        }
 
235
 
215
236
}