This repository has been archived by the owner on Jan 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sch_mod_week_app.php
59 lines (50 loc) · 1.65 KB
/
sch_mod_week_app.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
<?php
if ($already_initialized != 1)
{
require("./inc/script_inicialization.php");
}
require("./inc/nrp_api.php");
if (!isset($num_errors))
$num_errors = 0;
if (!isset($num_alerts))
$num_alerts = 0;
$master_session = Get_Master_Session($sess_id, $bd);
if (!$master_session == 0)
Get_Account_Id($master_session, $owner, $bd);
else
$owner = '';
$master_session = Get_Crypt_Master_Session($sess_id, $bd);
if (Validate_Session($complete_sess_id, $_SERVER['REMOTE_ADDR'], $bd))
{
Get_Account_Id($sess_id, $account_id, $bd);
$query = "SELECT * FROM accounts WHERE account_id = '$account_id'";
$result = $bd->Query($query);
$role = $bd->FetchResult($result, 0, 'role');
$var_type = $role . '_type';
$var_color = $role . '_color';
$var_image = $role . '_icon';
$array_type = $cfg[$var_type];
$array_color = $cfg[$var_color];
$array_image = $cfg[$var_image];
$apps = List_Weekly_Appointments($account_id, 0, '', 1, '', '', '', '', '', $owner,
$cfg['time'], $array_type, $array_color, $array_image, $cfg['days'], $bd);
$result_xsl = "xsl/" . $default_xsl . "/sch_mod_week_app.xsl";
}
else
{
$error[$num_errors++] = "Invalid Session ID";
include "logout.php";
exit;
}
$smarty->assign("nrpTransform", $result_xsl);
$smarty->assign("nrpMasterSession", $master_Session);
$smarty->assign("nrpSchErrors", $error);
$smarty->assign("nrpSchAlerts", $alert);
$smarty->assign("nrpSessId", $complete_sess_id);
$smarty->assign("nrpUserId", $account_id);
$smarty->assign("nrpSchSpan", 'all');
$smarty->assign("nrpMainApp", $apps);
$result_xml = $smarty->fetch("xml/sch_del_app.xml");
require("./inc/proc_transform.php");
// Calls the commands do procede the XSLT transformation
?>