2 include_once $gfplugins.'webcalendar/www/includes/init.php';
3 send_no_cache_header ();
5 $updating_public = false;
6 if ( $is_admin && ! empty ( $public ) && $public_access == "Y" ) {
7 $updating_public = true;
8 $layer_user = "__public__";
9 $u_url = "&public=1";
15 load_user_layers ( $layer_user, 1 );
18 $sql = "SELECT cal_value FROM webcal_user_pref " .
19 "WHERE cal_setting = 'LAYERS_STATUS' AND cal_login = '$layer_user'";
20 $res = dbi_query ( $sql );
22 $row = dbi_fetch_row ( $res );
23 $layers_enabled = ( $row[0] == "Y" ? 1 : 0 );
24 dbi_free_result ( $res );
29 if ( $allow_view_other != 'Y') {
30 echo "allow_view_other = $allow_view_other <br>";
31 echo translate("You are not authorized");
37 echo translate($PUBLIC_ACCESS_FULLNAME) . " ";
38 etranslate("Layers")?> <img src="help.gif" alt="<?php etranslate("Help")?>" class="help" onclick="window.open ( 'help_layers.php', 'cal_help', 'dependent,menubar,scrollbars,height=400,width=400,innerHeight=420,outerWidth=420');" /></h2>
40 <a title="<?php etranslate("Admin") ?>" class="nav" href="adminhome.php">« <?php etranslate("Admin") ?></a><br /><br />
42 etranslate("Layers are currently");
44 echo " <strong>";
45 if ($layers_enabled) {
46 etranslate ("Enabled");
47 echo "</strong>. (<a title=\"" .
48 translate ("Disable Layers") . "\" class=\"nav\" href=\"layers_toggle.php?status=off$u_url\">" .
49 translate ("Disable Layers") . "</a>)\n";
51 etranslate ("Disabled");
52 echo "</strong>. (<a title=\"" .
53 translate ("Enable Layers") . "\" class=\"nav\" href=\"layers_toggle.php?status=on$u_url\">" .
54 translate ("Enable Layers") . "</a>)\n";
58 if ($is_admin && $layers_enabled) {
59 if ( empty ($public) && ! empty ( $public_access ) &&
60 $public_access == 'Y' ) {
61 echo "<blockquote><a href=\"layers.php?public=1\">" .
62 translate("Click here") . " " .
63 translate("to modify the layers settings for the") . " " .
64 translate($PUBLIC_ACCESS_FULLNAME) . " " .
65 translate("calendar") .
66 "</a></blockquote>\n";
70 if ($layers_enabled) { ?>
72 <a title="<?php etranslate("Add layer"); ?>" href="edit_layer.php<?php if ( $updating_public ) echo "?public=1";?>"><?php etranslate("Add layer"); ?></a><br /><br />
76 if ($layers) foreach ($layers as $layer) {
77 $layeruser = $layer['cal_layeruser'];
78 user_load_variables ( $layeruser, "layer" );
80 <span style="font-weight:bold;"><?php etranslate("Layer")?> <?php echo ($layer_count); ?></span>
82 etranslate("Edit layer"); ?>" href="edit_layer.php?id=<?php echo $layer['cal_layerid'] . $u_url; ?>"><?php
83 etranslate("Edit"); ?></a> /
85 etranslate("Delete layer")?>" href="del_layer.php?id=<?php echo $layer['cal_layerid'] . $u_url; ?>" onclick="return confirm('<?php etranslate("Are you sure you want to delete this layer?")?>');"><?php
86 etranslate("Delete")?></a>)
88 <table style="margin-left:20px; border-width:0px;">
89 <tr><td style="vertical-align:top; font-weight:bold;">
90 <?php etranslate("Source")?>:</td><td>
91 <?php echo $layerfullname; ?>
93 <tr><td style="font-weight:bold;">
94 <?php etranslate("Color")?>:</td><td style="background-color:<?php echo $CELLBG;?>; color:<?php echo ( $layer['cal_color'] ); ?>;">
95 <?php echo ( $layer['cal_color'] ); ?>
97 <tr><td style="font-weight:bold;">
98 <?php etranslate("Duplicates")?>:</td><td>
100 if( $layer['cal_dups'] == 'N')
114 <?php print_trailer(); ?>