Exemplo n.º 1
0
function show_pick_class()
{
    return select_output(pick_category_list(TRUE), '', 'move_cid', '', 1);
}
Exemplo n.º 2
0
function pick_search_select($select_name, $select_pid, $no_show_id = 0)
{
    $cat_arr = pick_category_list();
    $html = '<select name="' . $select_name . '"  ><option value="">' . milu_lang('now_select_picker') . '</option>';
    foreach ($cat_arr as $k_c => $v_c) {
        $html .= '<optgroup label="' . $v_c[name] . '">';
        $query = DB::query("SELECT name,pid FROM " . DB::table('strayer_picker') . " WHERE pick_cid='{$v_c['cid']}' ORDER BY displayorder ASC,dateline DESC");
        while ($rs = DB::fetch($query)) {
            if ($rs['pid'] != $no_show_id || !$no_show_id) {
                $selected = $rs['pid'] == $select_pid ? 'selected="selected"' : '';
                $html .= '<option ' . $selected . ' value="' . $rs['pid'] . '">' . $rs['name'] . '</option>';
            }
        }
        $html .= '</optgroup>';
    }
    $html .= '</select>';
    return $html;
}