示例#1
0
文件: survey.php 项目: danorama/orsee
function survey__render_field($field)
{
    $out = '';
    switch ($field['type']) {
        case 'textline':
            $out = survey__render_textline($field);
            break;
        case 'textarea':
            $out = survey__render_textarea($field);
            break;
        case 'radioline':
            $out = survey__render_radioline($field);
            break;
        case 'select_list':
            $out = survey__render_select_list($field);
            break;
        case 'select_numbers':
            $out = survey__render_select_numbers($field);
            break;
        case 'select_yesno':
            $out = survey__render_select_yesno($field);
            break;
        case 'select_yesno_switchy':
            $out = survey__render_select_yesno_switchy($field);
            break;
    }
    return $out;
}
示例#2
0
        } else {
            $style = 'orsee';
        }
    }
}
if ($proceed) {
    echo '<center>';
    echo '<TABLE class="or_page_subtitle" style="background: ' . $color['page_subtitle_background'] . '; color: ' . $color['page_subtitle_textcolor'] . '; width: 80%;">
            <TR><TD align="center">
            ' . lang('style') . ' ' . $style . '
            </TD>
            </TR></TABLE>';
    echo '
            <TABLE style="width: 80%;">
            <TR><TD align="right">
            <FORM id="styleform" action="' . thisdoc() . '" method="GET">' . lang('edit_colors_for_style') . survey__render_select_list(array('submitvarname' => 'style', 'option_values' => $styles, 'option_values_lang' => $styles, 'value' => $style, 'include_none_option' => 'n')) . '<INPUT class="button" type="submit" value="' . lang('go') . '"></FORM>
            </TD>
            </TR></TABLE>';
    $pars = array(':style' => $style);
    $query = "select * from " . table('options') . "\n            where option_type='color'\n            and option_style= :style\n            order by option_name";
    $result = or_query($query, $pars);
    $mycolors = array();
    while ($line = pdo_fetch_assoc($result)) {
        $mycolors[$line['option_name']] = $line['option_value'];
    }
    if (check_allow('settings_edit_colors') && isset($_REQUEST['change']) && $_REQUEST['change']) {
        $newcolors = $_REQUEST['mycolors'];
        $now = time();
        $pars_new = array();
        $pars_update = array();
        foreach ($newcolors as $oname => $ovalue) {