Guest User

edit_entry.php new mrbs

a guest
Aug 13th, 2015
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function create_field_entry_areas($disabled=FALSE)
  2. {
  3.   global $areas, $area_id, $rooms;
  4.  
  5.   // if there is more than one area then give the option
  6.   // to choose areas.
  7.   if (count($areas) > 0)
  8.   {
  9.     // We will set the display to none and then turn it on in the JavaScript.  That's
  10.     // because if there's no JavaScript we don't want to display it because we won't
  11.     // have any means of changing the rooms if the area is changed.
  12.     echo "<div id=\"div_areas\" style=\"display: none\">\n";
  13.     $options = array();
  14.     // go through the areas and create the options
  15.     foreach ($areas as $a)
  16.     {
  17.       $options[$a['id']] = $a['area_name'];
  18.     }
  19.  
  20.     $params = array('label'       => get_vocab("area") . ":",
  21.                     'name'        => 'area',
  22.                     'options'     => $options,
  23.                     'force_assoc' => TRUE,
  24.                     'value'       => $area_id,
  25.                     'disabled'    => $disabled);
  26.  
  27.     generate_select($params);
  28.     echo "</div>\n";
  29.   } //if count($areas)
  30. }
Advertisement
Add Comment
Please, Sign In to add comment