6 require_once 'plc_login.php';
8 // Get session and API handles
9 require_once 'plc_session.php';
13 require_once 'plc_functions.php';
14 require_once 'plc_sorts.php';
17 require_once 'plc_drupal.php';
18 include 'plc_header.php';
22 $_person= $plc->person;
23 $_roles= $_person['role_ids'];
28 header( "location: index.php" );
33 $site_id= $_GET['id'];
36 if( $_POST['delete'] ) {
37 $api->DeleteSite( intval( $site_id ) );
38 drupal_set_title ("Site " . $site_id . " deleted");
39 $api_error=$api->error();
41 print '<div class="messages error">' . $api_error . '</div>';
43 print '<div class="messages status">';
44 print "Site " . $site_id . " deleted";
47 echo "<p><a href='index.php'>Back to Sites</a>\n";
51 // get site info from api
52 $site_info= $api->GetSites( array( intval( $site_id ) ), array( "name" ) );
53 $name= $site_info[0]['name'];
54 drupal_set_title('Confirm site deletion for ' . $name);
57 echo "<form action='delete_site.php?id=$site_id' method=post>\n";
59 echo "<h2>Delete Site</h2>\n";
60 echo "Are you sure you want to delete this site?\n";
61 echo "<table><tbody>\n";
62 echo "<tr><th>Site Name: </th><td> $name </td></tr>\n";
63 echo "<tr><td colspan=2> </td></tr>";
64 echo "<tr><td colspan=2 align=center><input type=submit name='delete' value='Delete Site'></td></tr>\n";
65 echo "<tr><td colspan=2> </td></tr>";
66 echo "</tbody></table>\n";
68 echo "<p><a href='index.php?id=$site_id'>Back to Site</a>\n";
76 include 'plc_footer.php';