1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
function get_icon(){
$CI = & get_instance();
$CI->db->select('*');
$CI->db->where("id", 1);
$CI->db->from('settings');
$result = $CI->db->get()->row();
return $result;
}
function get_picture($id){
$CI = & get_instance();
$query = $CI->db->get_where('admin',array('id' => $id));
$result = $query->row();
return $result;
}
/* ===Get Admin=== */
function pull_admin(){
$CI = & get_instance();
$query = $CI->db->get('admin');
$result = $query->result();
return $result;
}
// function get_homesettings(){
// $CI = & get_instance();
// $query = $CI->db->get_where('settings',array('id' => 1));
// $result = $query->row();
// return $result;
// }
function upload_patient_image($path) {
$config = array();
$config['upload_path'] = $path;
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '0';
$config['overwrite'] = FALSE;
return $config;
}
function upload_doctor_image($path) {
$config = array();
$config['upload_path'] = $path;
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '0';
$config['overwrite'] = FALSE;
return $config;
}
function upload_hospital_image($path) {
$config = array();
$config['upload_path'] = $path;
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '0';
$config['overwrite'] = FALSE;
return $config;
}
function upload_medical_image($path) {
$config = array();
$config['upload_path'] = $path;
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '0';
$config['overwrite'] = FALSE;
return $config;
}
function upload_clinic_image($path) {
$config = array();
$config['upload_path'] = $path;
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '0';
$config['overwrite'] = FALSE;
return $config;
}
/* === Get Total Patients Count === */
function pull_total_patients(){
$CI = & get_instance();
$CI->db->where('status','1');
$query = $CI->db->get('patient');
$car=$query->num_rows();
return $car;
}
/* === Get Total Appointment Count === */
function pull_total_appoinment(){
$CI = & get_instance();
$CI->db->where('status','1');
$query = $CI->db->get('appointment');
$car=$query->num_rows();
return $car;
}
/* === Get Total Doctor Count === */
function pull_total_doctor(){
$CI = & get_instance();
$CI->db->where('status','1');
$query = $CI->db->get('doctor');
$car=$query->num_rows();
return $car;
}
/* === Get Total Clinic Count === */
function pull_total_clinic(){
$CI = & get_instance();
$CI->db->where('status','1');
$query = $CI->db->get('clinic');
$car=$query->num_rows();
return $car;
}
?>