C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\webcalendar\del_layer.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
<?php
include_once 'includes/init.php';

if ( 
$allow_view_other != 'Y' ) {
  
print_header ();
  
etranslate("You are not authorized");
  
print_trailer ();
  exit;
}

$updating_public false;
if ( 
$is_admin && ! empty ( $public ) && $public_access == "Y" ) {
  
$updating_public true;
  
$layer_user "__public__";
} else {
  
$layer_user $login;
}

load_user_layers $layer_user);

if ( 
strlen $layers[$id]['cal_layeruser'] ) > &&
  ( 
$is_admin || $readonly == "N" ) ) {
  
$layeruser $layers[$id]['cal_layeruser'];

  
dbi_query "DELETE FROM webcal_user_layers " .
    
"WHERE cal_login = '$layer_user' AND cal_layeruser = '$layeruser'" );
}

if ( 
$updating_public )
  
do_redirect "layers.php?public=1" );
else
  
do_redirect "layers.php" );
?>