protected function action_getModuleFieldTypeSet() { $module = $_REQUEST['aow_module']; $fieldname = $_REQUEST['aow_fieldname']; $aow_field = $_REQUEST['aow_newfieldname']; if (isset($_REQUEST['view'])) { $view = $_REQUEST['view']; } else { $view = 'EditView'; } if (isset($_REQUEST['aow_value'])) { $value = $_REQUEST['aow_value']; } else { $value = ''; } switch ($_REQUEST['aow_type']) { case 'Field': $valid_fields = getValidFieldsTypes($module, $fieldname); if (isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') { $module = $_REQUEST['alt_module']; } if ($view == 'EditView') { echo "<select type='text' style='width:178px;' name='{$aow_field}' id='{$aow_field} ' title='' tabindex='116'>" . getModuleFields($module, $view, $value, $valid_fields) . "</select>"; } else { echo getModuleFields($module, $view, $value); } break; case 'Date': if (isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') { $module = $_REQUEST['alt_module']; } echo getDateField($module, $aow_field, $view, $value); break; case 'Round_Robin': case 'Least_Busy': case 'Random': echo getAssignField($aow_field, $view, $value); break; case 'Value': default: echo getModuleField($module, $fieldname, $aow_field, $view, $value); break; } die; }
$data = array('lang_event_edit' => _MD_NEWTITLE, 'reservation' => 1, 'style' => 1, 'autoaccept' => 1, 'notify' => 1, 'strict' => 1, 'persons' => $xoopsModuleConfig['default_persons'], 'optfield' => $xoopsModuleConfig['member_only'] ? _MD_RESERV_DEFAULT_MEMBER : _MD_RESERV_DEFAULT_ITEM, 'title' => '', 'summary' => '', 'body' => '', 'counter' => 0, 'reserved' => 0, 'edate' => time() + 3600 * 24, 'event' => '', 'expire' => $xoopsModuleConfig['expire_after'] * 60, 'closetime' => $xoopsModuleConfig['close_before'] * 60, 'optvars' => '', 'topicid' => 1); } else { if ($eid) { $result = $xoopsDB->query('SELECT * FROM ' . EGTBL . ' e LEFT JOIN ' . OPTBL . ' o ON e.eid=o.eid LEFT JOIN ' . CATBL . " ON topicid=catid WHERE e.eid={$eid}"); $data = $xoopsDB->fetchArray($result); $edate = $data['edate']; } else { $data = array(); } $data['lang_event_edit'] = _MD_EDITARTICLE; if ($op == 'preview' || $op == 'save' || $op == 'date') { $edate = getDateField("edate"); if (isset($_POST['expire'])) { $expire = empty($_POST['expire']) ? time_to_sec($_POST['expire_text']) : intval($_POST['expire']); } else { $expire = getDateField('expire'); } $data['ldate'] = $data['edate'] = $edate; $data['expire'] = $expire; $data['topicid'] = param('topicid', 1); foreach ($iargs as $name) { $data[$name] = param($name); } foreach ($targs as $name) { $data[$name] = param($name, ""); } $data['ldate'] = 0; $data['closetime'] = time_to_sec($data['before']); if ($adm) { $data['status'] = param('status'); }