Esempio n. 1
0
function get_product_fields($product)
{
    $fields = array();
    $areas = get_areas($product['id']);
    if (count($areas) > 0) {
        $fields['area'] = array('text' => '服务区', 'type' => 'select', 'items' => $areas);
    }
    $subcate = get_subcate($product['subcate']);
    if ($subcate['target_name']) {
        $fields['to'] = array('text' => $subcate['target_name'], 'type' => 'text');
    }
    return $fields;
}
Esempio n. 2
0
function make_area_select_html($link, $current, $year, $month, $day)
{
    global $area_list_format;
    $area_list_format = 'select';
    $out_html = '';
    $users = get_areas();
    // Only show the areas if there are more than one of them, otherwise
    // there's no point
    if (count($users) > 1) {
        $out_html .= "<div id=\"dwm_areas\">\n";
        $out_html .= "<h3>" . get_vocab("areas") . "</h3>\n";
        if ($area_list_format == "select") {
            $out_html .= "<form id=\"areaChangeForm\" method=\"get\" action=\"{$link}\">\n" . "<div>\n" . "<select class=\"room_area_select\" id=\"area_select\" name=\"user\" onchange=\"this.form.submit()\">";
            foreach ($users as $code => $name) {
                $selected = $code == $current ? "selected=\"selected\"" : "";
                $out_html .= "<option {$selected} value=\"" . $code . "\">" . htmlspecialchars($name) . "</option>\n";
            }
            // Note:  the submit button will not be displayed if JavaScript is enabled
            $out_html .= "</select>\n" . "<input type=\"hidden\" name=\"day\"   value=\"{$day}\">\n" . "<input type=\"hidden\" name=\"month\" value=\"{$month}\">\n" . "<input type=\"hidden\" name=\"year\"  value=\"{$year}\">\n" . "</div>\n" . "</form>\n";
        } else {
            $out_html .= "<ul>\n";
            foreach ($areas as $area_id => $area_name) {
                $out_html .= "<li><a href=\"{$link}?year={$year}&amp;month={$month}&amp;day={$day}&amp;area={$area_id}\">";
                $out_html .= "<span" . ($area_id == $current ? ' class="current"' : '') . ">";
                $out_html .= htmlspecialchars($area_name) . "</span></a></li>\n";
            }
            $out_html .= "</ul>\n";
        }
        $out_html .= "</div>\n";
    }
    return $out_html;
}
Esempio n. 3
0
    ?>
"><?php 
    echo $city['name'];
    ?>
</option>
                            
                            <?php 
}
?>
                    </select>
                </div>
                <label for="subcategory" class="col-sm-2 control-label">Area</label>
                <div class="col-sm-10 col-md-4">
                    <select class="form-control" name="area">
                        <?php 
foreach (get_areas() as $area) {
    ?>
                            <option value="<?php 
    echo $area['ID'];
    ?>
"><?php 
    echo $area['name'];
    ?>
</option>
                            
                            <?php 
}
?>
                    </select>
                </div>
            </div>
Esempio n. 4
0
	</div>
	<div class="column span-2">
		<?php 
echo form_checkbox("permissions[{$r['position_rid']}][move]", 1, set_value("permissions[{$r['position_rid']}][move]", $r['move_allow']));
?>
	
	</div>
	<div class="column span-2">
		<?php 
echo form_checkbox("permissions[{$r['position_rid']}][archive]", 1, set_value("permissions[{$r['position_rid']}][archive]", $r['archive_allow']));
?>
	
	</div>
	<div class="column span-2 last">
		<?php 
echo form_dropdown("permissions[{$r['position_rid']}][viewed_space]", get_areas(), set_value("permissions[{$r['position_rid']}][viewed_space]", $r['viewed_space']), 'id="item_area" class="text" style="margin:0px;"');
?>
	</div>
	<?}?>
	
</fieldset>

<div class="column span-3">
	<?php 
echo form_label(lang('ARCHIVE'), 'archive');
?>
</div>
<div class="column span-21 last">
	<?php 
echo form_dropdown('archive', array('0' => lang('NO'), '1' => lang('YES')), set_value('archive', $ds->archive), 'id="archive" class="text"');
?>
Esempio n. 5
0
    echo FALSE == $valid_email ? get_vocab('invalid_email') : "";
    echo FALSE == $valid_area ? get_vocab('invalid_area') : "";
    echo FALSE == $valid_room_name ? get_vocab('invalid_room_name') : "";
    ?>
        </span>
      </fieldset>
    
      <fieldset>
      <legend></legend>
      <input type="hidden" name="room" value="<?php 
    echo $row["id"];
    ?>
">
    
      <?php 
    $areas = get_areas($all = TRUE);
    if (empty($areas)) {
        fatal_error(FALSE, get_vocab('noareas'));
        // should not happen
    }
    // The area select box
    echo "<div>\n";
    $params = array('label' => get_vocab("area") . ":", 'name' => 'new_area', 'options' => $areas, 'force_assoc' => TRUE, 'value' => $row['area_id'], 'disabled' => $disabled, 'create_hidden' => FALSE);
    generate_select($params);
    echo "<input type=\"hidden\" name=\"old_area\" value=\"" . $row['area_id'] . "\">\n";
    echo "</div>\n";
    // First of all deal with the standard MRBS fields
    // Room name
    echo "<div>\n";
    $params = array('label' => get_vocab("name") . ":", 'name' => 'room_name', 'value' => $row['room_name'], 'disabled' => $disabled, 'create_hidden' => FALSE);
    generate_input($params);