person; $_roles= $_person['role_ids']; if( !empty( $_GET['id'] ) ) { $slice_id= $_GET['id']; // Fetch slice information $slices= $api->GetSlices( array( intval( $slice_id ) ) ); if( !empty( $slices ) ) { $slice= $slices[0]; } } // Invalid slice name if( !isset( $slice ) ) { Header( "Location: index.php" ); exit(); } // Defaults $url_error = ""; $description_error = ""; if( isset( $_POST['submitted'] ) ) { if( !empty($_POST['url'] ) ) $slice['url']= $_POST['url']; else $url_error= "Provide a link to a project website."; if( !empty($_POST['desc'] ) ) $slice['description'] = $_POST['desc']; else $description_error= "Provide a short description of the slice."; if( empty( $url_error ) && empty( $description_error ) ) { // Update the slice URL and description $fields= array( "description"=>$slice['description'], "url"=>$slice['url'] ); $api->UpdateSlice( intval( $slice_id ), $fields ); Header( "Location: index.php?id=$slice_id" ); exit(); } } // Print header require_once 'plc_drupal.php'; drupal_set_title('Slices'); include 'plc_header.php'; $slice_name= $slice['name']; print "

Update Slice ". $slice['name'] ."

"; //echo "
"; print_r( $slice ); echo "
"; $url = $slice['url'] ; $description = $slice['description'] ; echo <<You must provide a short description as well as a link to a project website. Do not provide bogus information; if a complaint is lodged against your slice and PlanetLab Operations is unable to determine what the normal behavior of your slice is, your slice may be deleted to resolve the complaint.

Name: $slice_name
URL: $url_error
Description: $description_error
EOF; // Print footer include 'plc_footer.php'; ?>