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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
<?php /** * legend.php * * Displays the legend dialog * * @package TeamCalPro * @version 3.3.001 * @author George Lewe * @copyright Copyright (c) 2004-2010 by George Lewe * @link http://www.lewe.com * @license http://www.lewe.com/tcpro/doc/license.txt Extended GNU Public License */ //echo "<script type=\"text/javascript\">alert(\"Debug: \");</script>"; /** * Set parent flag to control access to child scripts */ define( '_VALID_TCPRO', 1 );
/** * Includes */ require ("config.tcpro.php"); require_once ("includes/functions.tcpro.php"); getOptions(); if (strlen($CONF['options']['lang'])) require ("includes/lang/" . $CONF['options']['lang'] . ".tcpro.php"); else require ("includes/lang/english.tcpro.php");
require_once("includes/tcabsence.class.php" ); require_once("includes/tcconfig.class.php" ); require_once("includes/tcholiday.class.php" );
$A = new tcAbsence; $C = new tcConfig; $H = new tcHoliday;
require("includes/header.html.inc.php" ); ?> <body> <table class="dlg"> <tr> <td class="dlg-header" colspan="3"> <?php printDialogTop($LANG['teamcal_legend'],"legend_dialog.html","ico_legend.png"); ?> </td> </tr> </table> <table class="dlg"> <tr> <td class="dlg-body"> <table width="98%"> <tr> <td width="50%" VALIGN="TOP"> <div align="CENTER" > <table width="100%"> <tr> <td class="dlg-caption" colspan="2"><?=$LANG['col_month_header']?></td> </tr> <?php $query = "SELECT * FROM `".$H->table."` ORDER BY `cfgsym`;"; $result = $H->db->db_query($query); while ( $row = $H->db->db_fetch_array($result,MYSQL_ASSOC) ){ if ($row['cfgsym']=='0') $class=""; else $class="-".$row['cfgname']; echo " <tr> <td class=\"daynum".$class."\" width=\"20\">15</td> <td class=\"legend\">".$LANG['dom_prefix']." ".$row['dspname']."</td> </tr>"; } ?> <tr> <td colspan="2"> <hr size="1" /> </td> </tr> <?php $query = "SELECT * FROM `".$H->table."` ORDER BY `cfgsym`;"; $result = $H->db->db_query($query); while ( $row = $H->db->db_fetch_array($result,MYSQL_ASSOC) ){ if ($row['cfgsym']=='0') $class=""; else $class="-".$row['cfgname']; echo " <tr> <td class=\"weekday".$class."\" width=\"20\">Xx</td> <td class=\"legend\">".$LANG['dow_prefix']." ".$row['dspname']."</td> </tr>"; } echo " <tr> <td class=\"weekday-note\" width=\"20\">Xx</td> <td class=\"legend\">".$LANG['dow_daynote']." </td> </tr>"; ?> <tr> <td colspan="2"> <hr size="1" /> </td> </tr> <tr> <td class="month-button"><img src="themes/<?=$theme?>/img/date.png" width="16" height="16" border="0" alt="" /></td> <td class="legend"><?=$LANG['btn_edit_month']?></td> </tr> <tr> <td class="name-button"><img src="themes/<?=$theme?>/img/btn_edit.gif" width="16" height="16" border="0" alt="" /></td> <td class="legend"><?=$LANG['btn_edit_member']?></td> </tr> </table> </div> </td> <td width="50%" VALIGN="TOP"> <div align="CENTER"> <table width="100%"> <tr> <td class="dlg-caption" colspan="2"><?=$LANG['col_day_symbols']?></td> </tr> <?php $qry = "SELECT * FROM `".$H->table."` ORDER BY `cfgsym`;"; $res = $H->db->db_query($qry); while ( $row = $H->db->db_fetch_array($res,MYSQL_ASSOC) ){ echo " <tr> <td class=\"day-".$row['cfgname']."\"> </td> <td class=\"legend\">".$row['dspname']."</td> </tr> "; } $query = "SELECT * FROM `".$A->table."` ORDER BY `cfgsym`;"; $result = $A->db->db_query($query); while ( $row = $A->db->db_fetch_array($result,MYSQL_ASSOC) ){ if ($row['cfgsym']!=".") { ?> <tr> <td class="<?=$row['cfgname']?>" width="20"> <?php if ($row['iconfile']) { ?> <img align="top" alt="" src="<?=$CONF['app_icon_dir'].$row['iconfile']?>" width="16" height="16"> <?php } else { echo $row['dspsym']; } ?> </td> <td class="legend"><?=$row['dspname']?></td> </tr> <?php } } echo " <tr> <td class=\"legend-today\"> </td> <td class=\"legend\">".$LANG['legend_today']."</td> </tr> "; ?> </table> </div> </td> </tr> </table> </td> </tr> <tr> <td class="dlg-menu"> <input name="btn_help" type="button" class="button" onclick="javascript:this.blur(); openPopup('help/<?=$CONF['options']['helplang']?>/html/index.html?legend_dialog.html','help','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,titlebar=0,resizable=0,dependent=1,width=740,height=500');" value="<?=$LANG['btn_help']?>" onmouseover="this.className='button-over';" onmouseout="this.className='button';"> <input name="btn_close" type="button" class="button" onclick="javascript:window.close();" value="<?=$LANG['btn_close']?>" onmouseover="this.className='button-over';" onmouseout="this.className='button';"> </td> </tr> </table> <?php require("includes/footer.html.inc.php"); ?>
|