if ($packages) { ?> <table style="width:100%;"> <colgroup> <col width="20%" /> <col width="30%" /> <col width="35%" /> <col width="10%" /> <col width="5%" /> </colgroup> <thead><th>Path To</th><th>Path From</th><th>URL (seperate with a " ; ", a space, semicolon, and another space)</th><th>Type</th><th>Remove</th></thead> <?php foreach ($packages as $n => $v) { echo '<tr>'; echo '<td>'; echo '<input type="text" style="width:100%;" name="packages[' . $n . '][to]" id="packages[' . $n . '][to]" value="' . $v['to'] . '" >'; echo '</td><td>'; echo isset($v['path']) ? '<input style="width:100%;" type="text" name="packages[' . $n . '][path]" id="packages[' . $n . '][path]" value="' . $v['path'] . '" >' : 'N/A'; echo '</td><td>'; echo isset($v['url']) ? '<input style="width:100%;" type="text" name="packages[' . $n . '][url]" id="packages[' . $n . '][url]" value="' . $v['url'] . '" >' : 'N/A'; echo '</td><td>'; echo isset($v['type']) ? '<select style="width:100%;" name="packages[' . $n . '][type]" id="packages[' . $n . '][type]">' . genSelect($v['type']) . '</select>' : 'N/A'; echo '</td><td>'; echo '<input type="submit" name="package_clear[' . $n . ']" id="package_clear[' . $n . ']" value="Remove" >'; echo '</td>'; echo "</tr>\n"; } echo '</table>'; } else { echo 'You have no listings defined.'; }
<?php HTML_Render_Head($js_vars, getTxt('RemoveUser')); echo $CSS_Main; echo $JS_JQuery; HTML_Render_Body_Start(); genHeading('RemoveExistingUser', true); $attributes = array('class' => 'form-horizontal'); echo form_open('user/delete', $attributes); genSelect('UserName', "username", "username", $option_block, 'SelectUsernameEllipisis', true); genSubmit('RemoveUser'); HTML_Render_Body_End();
function query_builder() { $this->load->helper('query_builder'); $campaign = $this->mdl_campaign->query_builder(); $id_type = $this->mdl_individual->query_builder('id_type'); $city = $this->mdl_individual->query_builder('city'); $curr_brand = $this->mdl_individual->query_builder('brand'); $sec_brand = $this->mdl_individual->query_builder('brand_'); $source_type = $this->mdl_individual->query_builder('source_type'); $status_verifikasi = $this->mdl_individual->query_builder('status_verifikasi'); $data[] = genSelect('campaign_id', 'Campaign', $campaign); $data[] = genString('id', 'Individual ID'); $data[] = genString('mop_id', 'MOP ID'); $data[] = genString('firstname', 'Firstname'); $data[] = genString('lastname', 'Lastname'); $data[] = genString('nickname', 'Nickname'); $data[] = genSelect('sex', 'Sex', array("M" => "MALE", "F" => "FEMALE")); $data[] = genDate('dob', 'Day of Birth'); $data[] = genInteger("DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(dob)), '%Y')", 'Age'); $data[] = genSelect('id_type', 'ID Type', $id_type); $data[] = genString('id_number', 'ID Number'); $data[] = genString('tlp', 'Telephone'); $data[] = genString('email', 'Email'); $data[] = genString('fb', 'Facebook'); $data[] = genString('tw', 'Twitter'); $data[] = genString('address', 'Address'); $data[] = genSelect('city', 'City', $city); $data[] = genString('pos_code', 'Pos Code'); $data[] = genSelect('brand', 'Current Brand', $curr_brand); $data[] = genSelect('brand_', 'Second Brand', $sec_brand); $data[] = genSelect('source_type', 'Source Type', $source_type); $data[] = genString('source_user', 'Source User'); $data[] = genDate('survey_date', 'Survey Date'); $data[] = genDate('upload_date', 'Upload Date'); $data[] = genDate('entry_date', 'Entry Date'); $data[] = genDate('verifikasi_date', 'Verification Date'); $data[] = genString('referred', 'Referred by'); $data[] = genSelect('status_verifikasi', 'Status Verification', $status_verifikasi); echo json_encode($data); }
/** * 更新关联表单域 * @param array $data 更新的数据 * @param int $modelId 模型id * @return */ public function updateRalationInput(array $data, $modelId) { $fieldService = D('Field', 'Service'); $inputLogic = D('Input', 'Logic'); $fields = $fieldService->getByModelId($modelId); $updKeys = array_keys($data); $updFields = array(); foreach ($fields as $field) { if (!in_array($field['name'], $updKeys)) { continue; } $rFields = $fieldService->getRelatedFields($modelId, $field['name']); foreach ($rFields as $rField) { $updFields[] = $rField; } } foreach ($updFields as $updField) { $opts = $inputLogic->getRelationOpts($updField); $fn = $this->getInputModelName($updField['model_id']) . "[{$updField['name']}]"; $udpInput = array('opt_value' => $inputLogic->optArrayToString($opts), 'html' => genSelect($fn, $opts['opt_value'])); // update $this->getM()->where("id={$updField['input']['id']}")->save($udpInput); } return; }
echo HTML_Render_Head($js_vars, getTxt('AddUser')); echo $CSS_Main; echo $JS_JQuery; echo $JS_CreateUserName; HTML_Render_Body_Start(); genHeading('AddNewUser', true); $attributes = array('class' => 'form-horizontal', 'id' => 'newuser'); echo form_open('user/doadd', $attributes); genInput('FirstName', 'firstname', 'firstname', true); genInput('LastName', 'lastname', 'lastname', true); genInputT('UserName', 'username', 'username', true, $extra = "", 'FirstLastNameExample'); echo '<span id="user-result"></span>'; //echo '<span class="help-block">'.getTxt('FirstLastNameExample').'</span>'; genInputT('Password', 'password', 'password', true, $extra = "", 'CaseSensitive'); //echo '<span class="help-block">'.getTxt('CaseSensitive').'</span>'; genSelect('Authority', "authority", "authority", $selection, 'SelectLevel', true); ?> <div class="col-md-5 col-md-offset-5"> <input type="SUBMIT" name="submit" value="<?php echo getTxt('AddUser'); ?> " class="button"/> <input type="reset" name="Reset" value="<?php echo getTxt('Cancel'); ?> " class="button" style="width: auto" /> </div> <div id="checkStatus" hidden="true"></div> </FORM> </div> <?php
<input type="type" class="form-control" id="Elevation" name="Elevation"/> </div> <div class="col-sm-2"> <?php echo getTxt('Meters'); ?> <span class="hint" title="<?php echo getTxt('ElevationInfo'); ?> ">?</span><span class="required"/> </div> </div> <?php genSelect('State', 'state', 'state', $stateOptions, 'SelectEllipsis', true); ?> <div class="form-group" id="countyWrapper"> <label class="col-sm-2 control-label"><?php echo getTxt('County'); ?> </label> <div class="col-sm-10"> <div id="county_drop_down"><select class="form-control" id="county" name="county"><option value=""><?php echo getTxt('CountyEllipsis'); ?> </option></select>*</div> <span id="loading_county_drop_down"><img src="<?php echo getImg('loader.gif'); ?>
//echo '<span class="em">' .getTxt('ExMetaLink').'</span>'; genInputT('ContactName', 'ContactName', 'ContactName', true, $extra = "", 'ExName'); //echo '<span class="em">' .getTxt('ExName').'</span>'; genInputT('Phone', 'Phone', 'Phone', true, $extra = "", 'ExPhone'); //echo '<span class="em">' .getTxt('ExPhone').'</span>'; genInputT('Email', 'Email', 'Email', true, $extra = "", 'ExEmail'); //echo '<span class="em">' .getTxt('ExEmail').'</span>'; genInput('Address', 'Address', 'Address', true); genInput('City', 'City', 'City', true); genSelect('State', 'State', 'State', $stateOptions, 'SelectEllipsis', true); genInput('Zip', 'ZipCode', 'ZipCode', true); genInputT('Citation', 'Citation', 'Citation', false, $extra = "", 'ExCitation'); //echo '<span class="em">' .getTxt('ExCitation').'</span>'; genInputT('MetadataIDSemicolon', 'MetadataID', 'MetadataID', false, ' disabled', 'MetadataAutoGenerated'); //echo '<span class="em">' .getTxt('MetadataAutoGenerated').'</span>'; genSelect('TopicCategory', 'TopicCategory', 'TopicCategory', $topicOptions, 'SelectEllipsis', true); genInputT('Title', 'Title', 'Title', true, $extra = "", 'ExTitle2'); //echo '<span class="em">' .getTxt('ExTitle2').'</span>'; genInputT('Abstract', 'Abstract', 'Abstract', true, $extra = "", 'ExAbstract1'); //echo '<span class="em">' .getTxt('ExAbstract1').'</span>'; genInputT('MetaLink', 'MetadataLink', 'MetadataLink', false, $extra = "", 'Optional'); //echo '<span class="em">' .getTxt('Optional').'</span>'; ?> <div class="col-md-5 col-md-offset-5"> <input type="SUBMIT" name="submit" value="<?php echo getTxt('AddSourceButton'); ?> " class="button"/> <input type="reset" name="Reset" value="<?php echo getTxt('Cancel'); ?>
} $('#' + newid).change(function() { var result1=validatetime(this.id); }); } </script> <?php HTML_Render_Body_Start(); genHeading('EnterMultipleValuesManually', true); echo getTxt('EnterDataTableAppears'); $attributes = array('class' => 'form-horizontal', 'name' => 'addvalue'); echo form_open('datapoint/addmultiplevalues', $attributes); genSelect('Source', "SourceID", "SourceID", $sourcesOptions, 'SelectEllipsis', true, 'onChange="showSites(this.value)"'); genSelectH('Site', "SiteID", "SiteID", '', getTxt('IfNoSeeSite1') . ' ' . getTxt('ContactSupervisor') . ' ' . getTxt('AddIt'), 'SelectElipsis', true); ?> <div class="table-responsive"> <table border="1" cellpadding="0" cellspacing="0" id="multiple" class="table table-bordered"> <tr> <td width="20%"><center><strong><?php echo getTxt('Variable'); ?> *</strong></center></td> <td width="20%"><center><strong><?php echo getTxt('Method'); ?> *</strong> <span class="hint" title="<?php echo "'" . getTxt('IfNoSeeMethod1') . "'";
function confirmBox(){ $('#window').show(); $('#window').jqxWindow('show'); } </script> <?php HTML_Render_Body_Start(); genHeading('EditDeleteMethod', true); echo '<p>' . getTxt('SelectMethod') . '</p>'; $attributes = array('class' => 'form-horizontal'); echo form_open('methods/change', $attributes); genSelect('Method', "MethodID", "MethodID", $methodOptions, 'SelectEllipsis', true, 'onChange="editMethod()"'); ?> <strong class="em2"><?php echo getTxt('NoteColon'); ?> </strong> <span class="em"><?php echo getTxt('MethodNote'); ?> </span> </FORM> <div id="msg3"></div> <div id="window"> <div id="windowHeader"> <span><?php echo getTxt('ConfirmationBox');
?> <table width='100%' cellpadding='10px' border='2'> <tr> <th colspan='1000'align="center"><b style="font-size:18px;"> <?php echo $sy . '<br>'; echo grading_translator($g_period) . '<br/>'; echo 'CLASS RECORD IN - ' . getSubjDesc($subj_code) . '<br/>'; echo 'Grade & Section: Grade ' . $grade_id . '- (' . get_section_by_desc($section_id) . ')'; ?> </b> </th> </tr> <?php $cols = ""; $colsel = genSelect($ws_cols, 'w'); $total_item = 0; $item_query = mysqli_query($conn, "select {$colsel},wtotal,wps from class_record_items where class_record_id='{$id}' and school_id='{$_SESSION['school_id']}'") or die(mysqli_error($conn)); if (mysqli_num_rows($item_query) > 0) { while ($items = mysqli_fetch_array($item_query)) { ?> <tr> <td> </td> <td style="width:auto;">Name</td> <?php for ($i = 1; $i <= $ws_cols; $i++) { ?> <td><input type="text" name="items[]" value="<?php echo $items["w{$i}"]; ?> "</td>
?> , deselectButtonText: <?php echo "'" . getTxt('Deselect') . "'"; ?> }); }); </script> <?php HTML_Render_Body_Start(); genHeading('EnterSingleDataValue', true); $attributes = array('class' => 'form-horizontal', 'name' => 'addvalue', 'id' => 'addvalue'); echo form_open('datapoint/addvalue', $attributes); genSelect('Source', "SourceID", "SourceID", $sourcesOptions, 'SelectEllipsis', true, 'onChange="showSites(this.value)"'); genSelectH('Site', "SiteID", "SiteID", '', getTxt('IfNoSeeSite1') . ' ' . getTxt('ContactSupervisor') . ' ' . getTxt('AddIt'), 'SelectElipsis', true); genSelect('Variable', "VariableID", "VariableID", $variableOptions, 'SelectEllipsis', true, 'onChange="showMethods(this.value)"'); genSelectH('Method', "MethodID", "MethodID", '', getTxt('IfNoSeeMethod1') . ' ' . getTxt('ContactSupervisor') . ' ' . getTxt('AddIt'), 'SelectElipsis', true); genInputT('Date', 'datepicker', 'datepicker', true, 'onChange="return validateDate()"', 'DateFormatExample'); //echo '<span class="help-block"><br />'.getTxt('DateFormatExample').'</span>'; genInputT('Time', 'timepicker', 'timepicker', true, 'onChange="return validateTime()" class="short"', 'TimeFormatExample'); //echo '<span class="help-block"><br />'.getTxt('TimeFormatExample').'</span>'; genInputT('Value', 'value', 'value', true, 'class="short" maxlength=20 onBlur="return validateNum()"', 'NumberNoCommas'); //echo '<span class="badge"><br />'.getTxt('NumberNoCommas').'</span>'; ?> <div class="col-md-5 col-md-offset-5"> <input type="SUBMIT" name="submit" value= "<?php echo getTxt('SubmitData'); ?> " class="button" style="width: auto" /> <input type="reset" name="Reset" value="<?php echo getTxt('Cancel');
/** * 生成表单域对应的html * @param array $input * @param array $field 字段信息 * @return string */ public function genHtml(&$input, $field) { $width = $input['width']; $height = $input['height']; $value = $input['value']; $type = $input['type']; $remark = $input['remark']; $class = 'input'; if ('file' == $type) { $fn = "{$field['name']}"; } else { $fn = "{$field['model']}[{$field['name']}]"; } $html = ''; if ('text' == $type) { $html = genText($fn, $width, $value, $class); } else { if ('password' == $type) { $html = genPassword($fn, $width, $value, $class); } else { if ('select' == $type) { $list = $this->optValueToArray($input['opt_value']); $html = genSelect($fn, $list['opt_value'], $list['selected']); } else { if ('radio' == $type) { $list = $this->optValueToArray($input['opt_value']); $html = genRadios($fn, $list['opt_value'], $list['selected']); } else { if ('checkbox' == $type) { $list = $this->optValueToArray($input['opt_value'], true); $html = genCheckboxs($fn, $list['opt_value'], $list['selected']); } else { if ('file' == $type) { $html = genFile($fn); } else { if ('textarea' == $type) { $html = genTextarea($fn, $value, $width, $height, $remark); } else { if ('date' == $type) { $html = genDate($fn, $value, $class); } else { if ('relation_select' == $type) { $relaOpts = $this->getRelationOpts($field); $input['opt_value'] = $this->optArrayToString($relaOpts); $html = genSelect($fn, $relaOpts['opt_value']); } else { if ('editor' == $type) { $html = genEditor($fn, empty($value) ? $remark : $value, $width, $height, $input['editor']); } } } } } } } } } } $input['html'] = $html; }
genInputH('DatabaseName', 'Database Name', 'databasename', getTxt('DatabaseNameInfo'), true); echo '</div>'; ?> <div class="col-sm-12"><p class="h4"><strong><?php echo getTxt('ConfigurationSettingsLook'); ?> </strong></p></div> <?php $extraText = ""; if ($default) { $options = "<option value='true'>" . getTxt('Yes') . "</option>"; genSelect('multipleInstall', "multi", "multi", $options, 'No', true); $extraText = " value='default' readonly"; } genInputT('ConfigName', 'Website Path', 'ConfigName', true, $extraText, 'ConfigDesc'); genSelect('LanguageCode', "LangCode", "lang", $langOptions, 'SelectEllipsis', true); genInputT('OrganizationName', getTxt('OrganizationName'), 'orgname', true, '', 'OrganizationNameEx'); genInputT('ParentWebsiteName', getTxt('ParentWebsiteName'), 'parentname', true, '', 'ParentWebsiteNameEx'); genInputT('ParentWebsite', getTxt('ParentWebsite'), 'parentweb', true, '', 'WebsiteDomainEx'); ?> <div id="advSetup"> <div class="col-sm-12"><p class="h4"><strong><?php echo getTxt('ConfigurationSettingsSource'); ?> </strong></p></div> <?php genInputH('MetaDataProfileVersion', 'Profile Version', 'profilev', getTxt('ProfileVersionInfo')); ?> <div class="col-sm-12"><p class="h4"><strong><?php