Commit 5a3a72f9 by Jansa Jose

examm admin panl

parent f76a7c7d
...@@ -23,7 +23,7 @@ class Exam_model extends CI_Model { ...@@ -23,7 +23,7 @@ class Exam_model extends CI_Model {
//} //}
} }
function get_all_exams(){ function get_all_exams(){
$this->db->select("CAST(AES_DECRYPT(`exam_procedure`,'Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA') as CHAR) as exam_procedure,id,CAST(AES_DECRYPT(`observation`,'Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA') as CHAR) as observation "); $this->db->select("CAST(AES_DECRYPT(`exam_procedure`,'Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA') as CHAR) as exam_procedure,id,CAST(AES_DECRYPT(`observation`,'Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA') as CHAR) as observation");
$all_exams = $this->db->get('tbl_exams'); $all_exams = $this->db->get('tbl_exams');
if($all_exams->num_rows() > 0){ if($all_exams->num_rows() > 0){
$result = $all_exams->result_array(); $result = $all_exams->result_array();
...@@ -49,6 +49,8 @@ class Exam_model extends CI_Model { ...@@ -49,6 +49,8 @@ class Exam_model extends CI_Model {
if($res){ if($res){
return false; return false;
}else{*/ }else{*/
$exam_procedure = ucfirst($data['exam_procedure']);
$observation = ucfirst($data['observation']);
if($this->db->query("update `tbl_exams` set `exam_procedure` = AES_ENCRYPT('".$exam_procedure."','Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA'),`observation` = AES_ENCRYPT('".$observation."','Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA') where id = $id ")) { if($this->db->query("update `tbl_exams` set `exam_procedure` = AES_ENCRYPT('".$exam_procedure."','Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA'),`observation` = AES_ENCRYPT('".$observation."','Ptf/PWNWrULQT72syxfaaBRTS9JbiKrj9dfuVEvT3rA') where id = $id ")) {
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment