+ $site_form = new PleKitForm (l_slice_add(),array(),array('method'=>'get'));
+ $site_form->start();
+ print $site_form->label_html('site_id','Or choose some other site');
+ print $site_form->select_html('site_id',$selectors,array('autosubmit'=>true,
+ 'id'=>'create-slice-choose-site'));
+ $site_form->end();
+ print "</div>";
+ }
+
+print <<< EOF
+<div class='create-slice-instantiations'>
+<p><span class='bold'>Important:</span> Please provide a short description, as well as a
+link to a project website, before creating your slice.</p>
+<p>
+PlanetLab's security model requires that anyone who is concerned about a slice's activity be able to immediately learn about that slice. The details that you provide are your public explanation about why the slice behaves as it does. Be sure to describe the <span class='bold'>kind of traffic</span> that your slice generates, and how it handles material that is under <span class='bold'>copyright</span>, if relevant.
+</p><p>
+The PlanetLab Operations Centres regularly respond to concerns raised by third parties about site behaviour. Most incidents are resolved rapidly based upon the publicly posted slice details. However, when these details are not sufficiently clear or accurate, and we cannot immediately reach the slice owner, we must delete the slice.
+</p>
+<p><span class='bold'>NOTE</span>: All PlanetLab users are <span class='bold'>strongly</span>
+ encouraged to join the PlanetLab
+<a href='https://lists.planet-lab.org/mailman/listinfo/users'>Users</a>
+mailing list. Most questions about running software on PlanetLab can be answered by
+posting to this list.
+<br/>Site administrators often use this list to post announcements about service outages.
+New software releases and available services are announced here as well.
+</p>
+</div>
+EOF;
+
+$toggle = new PlekitToggle ('create-slice-details','Slice Details',
+ array ('visible'=>get_arg('show_slice')));
+$details = new PlekitDetails(TRUE);
+
+$form_variables = array('site_id'=>plc_my_site_id());
+$form = $details -> form_start("/db/slices/slice_add.php",$form_variables);
+print $form->hidden_html("site_id",$site_id);
+
+$toggle->start();
+$details->start();
+
+$running=count($site['slice_ids']);
+$max=$site['max_slices'];
+$allocated = " $running running / $max max";
+if ($running >= $max) $allocated = plc_warning_html($allocated);
+$details->th_td("Allocated slices",$allocated);
+$details->th_td("Name",$name ? $name : $base, "name");
+$details->th_td("URL",$url,"url");
+$details->th_td("Description",$description,"description",
+ array('input_type'=>'textarea',
+ 'width'=>50,'height'=>5));
+$selectors=array(array('display'=>"PLC",'value'=>'plc-instantiated'),
+ array('display'=>"Delegated",'value'=>'delegated'),
+ array('display'=>"Controller",'value'=>'nm-controller'),
+ array('display'=>"None",'value'=>'not-instantiated'));
+
+$instantiation_select = $form->select_html ("instantiation", $selectors);
+$details->th_td("Instantiation",$instantiation_select,"instantiation",
+ array('input_type'=>'select', 'value'=>$instantiation));
+
+// display the current settings if any (like, we've screwed up the first time)
+if (isset($_POST['omf-control'])) {
+ $omf_options=array('checked'=>'checked');
+} else {
+ $omf_options=array();