Пример #1
0
function rawman_editbox($pic)
{
    // Reading params and settting form fields
    $par = rawman_mkdir(array(rawman_getpicdir($pic), 'param')) . $pic . '.txt';
    $opt = rawman_convparams($par, array('rating' => 0, 'coloring' => 'none', 'wb' => 'camera', 'rotate' => 'none'));
    if (preg_match('/\\-b\\s+(\\d\\.\\d+)\\b/', $opt['dcraw'], $m)) {
        _fsine(array('brightness' => $m[1]));
    }
    if (IsEmpty($opt['wb']) && preg_match('/\\-a\\b/', $opt['dcraw'], $m)) {
        $opt['wb'] = 'auto';
    }
    if (preg_match('/\\-gamma\\s+(\\d\\.\\d+)\\b/', $opt['cnvpre'], $m)) {
        _fsine(array('gamma' => $m[1]));
    }
    if (preg_match('/\\-t\\s+(\\d+)\\b/', $opt['dcraw'], $m)) {
        $opt['rotate'] = $m[1] == 270 ? 'left' : 'right';
    } elseif (preg_match('/\\-rotate\\s+(\\d+)\\b/', $opt['cnvpre'], $m)) {
        $opt['rotate'] = $m[1] == 270 ? 'left' : 'right';
    }
    $arr_ev = array('-2.00', '-1.66', '-1.50', '-1.33', '-1.00', '-0.66', '-0.50', '-0.33', '0.00', '+0.33', '+0.50', '+0.66', '+1.00', '+1.33', '+1.50', '+1.66', '+2.00');
    $arr_high = array(0 => '0 - White', 1 => '1 - Pink', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9');
    _fsine(array('ev' => '+0.33', 'rotate' => $opt['rotate']));
    echo '
<form name="editForm">' . CreateHiddenField('balance', $opt['wb']) . rawman_wb($opt['wb'], true) . '<p style="clear:both;"></p>
<ul>
<li>Ekspozycja: ' . CreateSelectField('ev', $arr_ev, 0) . 'EV</li>
<li>Jasność: ' . CreateInputText('brightness', 5) . '</li>
<li>Gamma: ' . CreateInputText('gamma', 5) . '</li>
<li>Ziarno: ' . CreateInputText('noise', 5) . '</li>
<li>Odbłyski: ' . CreateSelectField('highlight', $arr_high) . '</li>
</ul>
' . '<p style="clear:both;"></p>' . CreateHiddenField('rotate', $opt['rotate']) . rawman_rotate($opt['rotate'], true) . '<p style="clear:both;"></p>' . CreateButton('preview', 'View', 'onclick="editImg()"') . CreateButton('cancel', 'Cancel', 'onclick="rmSendReq(\'' . rmconf('elem-dir') . '/info\')"') . CreateButton('apply', 'Apply', 'onclick="applyImg()"') . '</form>';
}
Пример #2
0
     CreateSelectField(
         $evnt_type_o->a_lieu,
         $evnt_type_o->txt_lieu ?: 'Lieu',
         'evnt_lieu',
         $evnt_lieu,
         $Freeze_evnt_lieu,
         $bdd->Lieu_Lister_Tous(),
         function($it){ return $it->id_lieu;},
         function($it){ return $it->type_lieu . '-' .  $it->designation; }
     );

     CreateSelectField(
         $evnt_type_o->a_equipement,
         $evnt_type_o->txt_equipement ?: 'equipement',
         'evnt_equipement',
         $evnt_equipement,
         $Freeze_evnt_equipement,
         $bdd->Equipements_Lister_Tous(),
         function($it){ return $it->id_equipement;},
         function($it){ return $it->nom; }
     );
     
     
    
    CreateInputField(
        $evnt_type_o->a_valeur,
        $technique->valeur_technique ?: $evnt_type_o->txt_valeur ?: 'Valeur 1',
        'evnt_valeur',
        $evnt_valeur ,
        $Freeze_evnt_valeur,
        'number'
    );