forked from craigk5n/webcalendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nonusers.php
51 lines (45 loc) · 1.3 KB
/
nonusers.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
<?php // $Id: nonusers.php,v 1.35 2009/11/22 16:47:45 bbannon Exp $
defined ( '_ISVALID' ) or die ( 'You cannot access this file directly!' );
if ( ! $is_admin ) {
echo print_not_auth ( true ) . '
</body>
</html>';
exit;
}
if ( ! $NONUSER_PREFIX ) {
echo print_error_header() . translate ( 'NONUSER_PREFIX not set' ) . '
</body>
</html>';
exit;
}
$add = getValue ( 'add' );
$newNonUserStr = translate ( 'Add New NonUser Calendar' );
$targetStr =
'target="nonusersiframe" onclick="showFrame( \'nonusersiframe\' );">';
echo '
<a name="tabnonusers"></a>
<div id="tabscontent_nonusers">';
if ( empty ( $error ) ) {
echo '
<a title="' . $newNonUserStr . '" href="edit_nonusers.php?add=1"'
. $targetStr . $newNonUserStr . '</a><br />';
// Displaying NonUser Calendars
$userlist = get_nonuser_cals();
if ( ! empty ( $userlist ) ) {
echo '
<ul>';
for ( $i = 0, $cnt = count ( $userlist ); $i < $cnt; $i++ ) {
echo '
<li><a title="' . $userlist[$i]['cal_fullname']
. '" href="edit_nonusers.php?nid=' . $userlist[$i]['cal_login'] . '"'
. $targetStr . $userlist[$i]['cal_fullname'] . '</a></li>';
}
echo '
</ul>';
}
}
echo '
<iframe name="nonusersiframe" id="nonusersiframe" style="width: 90%; '
. 'border: 0; height: 250px;"></iframe>
</div>';
?>