static function showInput($S)
 {
     $value = !$S->count() ? $S->get() : array();
     switch ($S->getHandler()) {
         case 'checkbox':
             return '<input name="' . $S->i . '" type=checkbox ' . ($value ? 'checked' : '') . '>';
         case 'select':
             return '<select name="' . $S->i . '">' . helper_optionsFromArray($S->getOptions(), $value, 0) . '</select>';
         case 'range':
             $opts = $S->getOptions();
             if (isset($opts[1])) {
                 // deprecated
                 $vs['min'] = $opts[0];
                 $vs['max'] = $opts[1];
                 if (isset($opts[2])) {
                     $vs['step'] = $opts[2];
                 }
             } else {
                 $vs = $opts[0];
             }
             if (!isset($vs['step'])) {
                 $vs['step'] = 'any';
             }
             $atts = array();
             foreach ($vs as $n => $v) {
                 $atts[] = $n . '="' . $v . '"';
             }
             return '<input name="' . $S->i . '" type=range ' . implode(' ', $atts) . ' value="' . hee($value) . '">';
         case 'number':
             $opts = $S->getOptions();
             $vs = isset($opts[0]) ? $opts[0] : array();
             if (!isset($vs['step'])) {
                 $vs['step'] = 'any';
             }
             $atts = array();
             foreach ($vs as $n => $v) {
                 $atts[] = $n . '="' . $v . '"';
             }
             return '<input name="' . $S->i . '" type=number ' . implode(' ', $atts) . ' value="' . hee($value) . '">';
         case 'text':
             return '<textarea name="' . $S->i . '">' . hee($value) . '</textarea>';
         default:
             switch ($S->getType()) {
                 case 'bool':
                     return '<input type=checkbox name="' . $S->i . '" ' . ($value ? 'checked' : '') . '>';
                 case 'int':
                     return '<input type=number name="' . $S->i . '" value="' . hee($value) . '">';
                 default:
                     if (!is_array($value)) {
                         return '<input type=text name="' . $S->i . '" value="' . hee($value) . '">';
                     } else {
                         return '<input type=hidden name="' . $S->i . '">';
                     }
             }
     }
 }
Exemple #2
0
foreach ($Cont->SET['elements'] as $id => $el) {
    ?>
		<tr id="<?php 
    echo $id;
    ?>
">
			<td>
				<select style="width:auto" onchange="$fn('page::setDefault')( <?php 
    echo $Cont;
    ?>
,{'elements': {<?php 
    echo $id;
    ?>
:{type:$(this).val()}}} ); cms.panel.tabs.show('options');">
					<?php 
    echo helper_optionsFromArray(array('text' => 'Eingabefeld', 'textarea' => 'Eingabeblock', 'select' => 'Auswahlliste', 'checkbox' => 'Checkbox', 'radio' => 'Radiobox', 'description' => 'Textfeld', 'email' => 'E-Mail', 'url' => 'Url'), $el['type']->v);
    ?>
				</select>
			<td>
			<?php 
    if ($el['type']->v != 'description') {
        ?>
				<input type="text" value="<?php 
        echo $Cont->text($id . '_name');
        ?>
" cmsTxt="<?php 
        echo $Cont->text($id . '_name')->id;
        ?>
" />
			<?php 
    } else {
Exemple #3
0
		<td><input value="<?php 
echo $Cont->SET['height'];
?>
" onchange="$fn('page::setDefault')(<?php 
echo $Cont;
?>
,{'height': this.value });" />
	<tr>
		<td>Type:
		<td>
			<select onchange="$fn('page::setDefault')(<?php 
echo $Cont;
?>
,{'mapType': this.value});">
				<?php 
echo helper_optionsFromArray(array('ROADMAP', 'SATELLITE', 'HYBRID', 'TERRAIN'), $Cont->SET['mapType']->v, false);
?>
			</select>
	<tr>
		<td>Zoom:
		<td><input onchange="$fn('page::setDefault')(<?php 
echo $Cont;
?>
,{'zoom': this.value});" value="<?php 
echo (int) $Cont->SET['zoom']->v;
?>
" type=range min=2 max=22>
	<tr>
		<td>disable Userinterface:
		<td><input onclick="$fn('page::setDefault')(<?php 
echo $Cont;
Exemple #4
0
echo $F;
?>
',$(this).val()).run()" value="<?php 
echo $F->getLength();
?>
" /><br>
		<br>
		<select onchange="$fn('db::fieldSetSpezial')('<?php 
echo $T;
?>
','<?php 
echo $F;
?>
',$(this).val()).run()">
			<?php 
echo helper_optionsFromArray(array(' ', 'UNSIGNED', 'UNSIGNED ZEROFILL', 'ON UPDATE CURRENT_TIMESTAMP'), strtoupper($F->getSpezial()), 0);
?>
		</select><br>
		<input <?php 
echo $F->vs['Null'] == 'YES' ? 'checked' : '';
?>
 type="checkbox" onclick="$fn('db::fieldSetNull')('<?php 
echo $T;
?>
','<?php 
echo $F;
?>
',this.checked).run()" />
		Null?
		<br>
		<input <?php