-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmessage_from_doctors.php
85 lines (67 loc) · 2.5 KB
/
message_from_doctors.php
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
<?php
session_start();
error_reporting (0);
include_once('classes/config.php');
include_once('classes/sessions.php');
include_once('classes/tbs_class_php5.php');
include_once('lang/en.php');
include_once('side_nav.php');
include_once('configData.php');
include_once('classes/validation.php');
include_once('models/CI_model.php');
include_once('models/CI_model_TBS.php');
include_once('models/CI_model_search_engine.php');
include_once('classes/random_code.php');
$message_tag_TBS = new CI_model_search_engine();
$to_id="";
$to_cate="";
if(isset($_SESSION['patient_id']))
{
$to_id=$_SESSION['patient_id'];
$to_cate='patient';
}
else if(isset($_SESSION['physician_id']))
{
$to_id=$_SESSION['physician_id'];
$to_cate= 'physician';
}
$limited = "LIMIT $msg_num_item_list";
$limit_msg = "";
$activity = $message_tag_TBS->search_messages_from_doctors($to_id, $to_cate, $limited, $limit_msg);
$msg_id = $activity[$msg_num_item_list-1]["message_id"];
foreach ($activity as &$value) {
$value['message'] = str_replace("\r\n",'',$value['message'] );
}
$template = "views/main_1.htm";
$inner_template1 = "views/nav_main_manu.html";
$inner_template3 = "views/sent_message_layout_dr.html";
$inner_message_sub = "views/inner_message_sub.html";
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;
$TBS->LoadTemplate("$template");
$TBS->Render = TBS_OUTPUT;
$TBS->MergeBlock('activity',$activity);
/*
$search_table2 = 'private_messages';
foreach ($activity as $col_value)
{
$number=$message_tag_TBS->search_messages_member($search_table2, "message_id", $col_value['message_id']);
}
$TBS->MergeBlock('number',$number);
*
*/
$TBS->Show();
function read_unread($BlockName,&$CurrRec,$RecNum){
if ($CurrRec['opened']!=null&&$CurrRec['opened']==0)
{
$CurrRec['level'] = "#E6E6E6";
}
else if($CurrRec['opened']!=null&&$CurrRec['opened']==1)
{
$CurrRec['level'] = "";
}
$CurrRec['message_details'] = "message_details.php?width=400&modal=true&profile_img=$CurrRec[thumbnail_pic_name]&firstname=$CurrRec[firstname]&lastname=$CurrRec[lastname]&message_id=$CurrRec[message_id]&message_recipient_id=$CurrRec[id]";
}
@mysql_close();
die();
?>