2 include_once $gfplugins.'webcalendar/www/includes/init.php';
4 if ( $allow_view_other != 'Y' ) {
6 etranslate("You are not authorized");
11 $updating_public = false;
12 if ( $is_admin && ! empty ( $public ) && $public_access == "Y" ) {
13 $updating_public = true;
14 $layer_user = "__public__";
19 load_user_layers ( $layer_user, 1 );
21 if ( strlen ( $layers[$id]['cal_layeruser'] ) > 0 &&
22 ( $is_admin || $readonly == "N" ) ) {
23 $layeruser = $layers[$id]['cal_layeruser'];
25 dbi_query ( "DELETE FROM webcal_user_layers " .
26 "WHERE cal_login = '$layer_user' AND cal_layeruser = '$layeruser'" );
29 if ( $updating_public )
30 do_redirect ( "layers.php?public=1" );
32 do_redirect ( "layers.php" );