예제 #1
0
 function control_select($action, $data)
 {
     if ($action == 'serialize') {
         return $_REQUEST['variable_' . $data['variable']];
     } elseif ($action == 'widget') {
         if (!$_REQUEST['variable_' . $data['variable']]) {
             $GLOBALS['variable_' . $data['variable']] = $_REQUEST['variable_' . $data['variable']] = $data['default'];
         }
         return html_form::select_widget('variable_' . $data['variable'], explode('|', $data['options']));
     }
 }