4 require_once 'plc_login.php';
6 // Get session and API handles
7 require_once 'plc_session.php';
11 require_once 'plc_functions.php';
12 require_once 'plc_sorts.php';
15 $_person= $plc->person;
16 $_roles= $_person['role_ids'];
18 //print_r( $_person );
20 // if no id then go back to slice index
22 header( "index.php" );
24 // get slice id from get
25 $slice_id= $_GET['id'];
28 if( $_POST['delete'] ) {
29 $api->DeleteSlice( intval( $slice_id ) );
31 header( "location: index.php" );
36 require_once 'plc_drupal.php';
37 drupal_set_title('Slices');
38 include 'plc_header.php';
41 // get slice info from API call
42 $slice_info= $api->GetSlices( array( intval( $slice_id ) ), array( "name", "expires", "description" ) );
45 echo "<form action='delete_slice.php?id=$slice_id' method=post>\n";
47 // show delete confirmation
48 echo "<h2>Delete slice ". $slice_info[0]['name'] ."</h2>\n";
49 echo "<p>Are you sure you want to delete this slice?\n";
51 echo "<table><tbody>\n";
52 echo "<tr><th>Name: </th><td> ". $slice_info[0]['name'] ."</td></tr>\n";
53 echo "<tr><th>Description: </th><td> ". $slice_info[0]['description'] ."</td></tr>\n";
54 echo "<tr><th>Expiration: </th><td> ". gmstrftime( "%A %b-%d-%y %T %Z", $slice_info[0]['expires'] ) ."</td></tr>\n";
55 echo "</tbody></table>\n";
56 echo "<input type=submit value='Delete Slice' name='delete'>\n";
60 include 'plc_footer.php';