本文整理汇总了PHP中get_select_options函数的典型用法代码示例。如果您正苦于以下问题:PHP get_select_options函数的具体用法?PHP get_select_options怎么用?PHP get_select_options使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_select_options函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
function process()
{
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings, $app_strings;
$mod_strings = return_module_language($current_language, 'GroupPrograms');
parent::process();
if ($this->viaAJAX) {
// override for ajax call
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"toursQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"tours\"); else return false;'");
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_groupprograms\")';");
//$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_tours\")';");
}
$this->ss->assign('viaAJAX', $this->viaAJAX);
$this->ss->assign('APP', $app_strings);
$this->javascript = new javascript();
$this->javascript->setFormName('MadeTourQuickCreate');
$focus = new GroupProgram();
$this->javascript->setSugarBean($focus);
$this->javascript->addAllFields('');
$json = getJSONobj();
if (!empty($focus->status)) {
$this->ss->assign('STATUS_DOM', get_select_options($app_list_strings['groupprogram_status_dom'], $focus->status));
} else {
$this->ss->assign('STATUS_DOM', get_select_options($app_list_strings['groupprogram_status_dom'], ''));
}
$git_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'group_id', 'name' => 'group_name'));
$this->ss->assign('gits_popup_request_data', json_encode($git_popup_request_data));
// worksheet popup request data
$worksheet_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'worksheet_id', 'name' => 'worksheet'));
$this->ss->assign('worksheet_popup_request_data', json_encode($worksheet_popup_request_data));
// pick up airport guide
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'guide_pick_up_at_airport_id', 'name' => 'guide_pick_up_at_airport', 'phone' => 'pick_up_phone'));
$this->ss->assign('pick_up_airport', json_encode($popup_request_data));
// insurance_popup_request_data
$insurance_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'insurance_id', 'name' => 'insurance'));
$this->ss->assign('insurance_popup_request_data', json_encode($insurance_popup_request_data));
// airlines_tickets_popup_request_data
$airlines_tickets_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'airlines_tickets_id', 'name' => 'airlines_tickets'));
$this->ss->assign('airlines_tickets_popup_request_data', json_encode($airlines_tickets_popup_request_data));
// operator
$popup_operator_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'assigned_user_id', 'user_name' => 'operator', 'phone_mobile' => 'operator_phone'));
$this->ss->assign('operator_users', json_encode($popup_operator_request_data));
$popup_giude_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'guide_id', 'name' => 'guide', 'phone' => 'guide_phone'));
$this->ss->assign('guide_users', json_encode($popup_giude_request_data));
// leader popup request data
$leader_popup_data_request = array("call_back_function" => "set_return", "form_name" => "MadeTourQuickCreate", 'field_to_name_array' => array('id' => 'leader_id', 'name' => 'team_leader', 'phone' => 'leader_phone'));
$this->ss->assign('leader_popup_request_data', json_encode($leader_popup_data_request));
// tour popup
$tour_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'tour_id', 'name' => 'tour_name', 'start_date' => 'start_date_group', 'end_date' => 'end_date_group'));
$this->ss->assign('tour_popup_request_data', $json->encode($tour_popup_request_data));
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
}
示例2: setup
function setup($parentFieldArray, $vardef, $displayParams, $tabindex, $twopass = true)
{
global $app_list_strings, $app_strings;
parent::setup($parentFieldArray, $vardef, $displayParams, $tabindex, $twopass);
$this->ss->assign('APP', $app_strings);
$this->ss->assign('types', get_select_options_with_id($app_list_strings['aor_scheduled_report_schedule_types'], ''));
$weekdays = $this->getWeekDays();
$this->ss->assign('weekday_vals', json_encode($weekdays));
$this->ss->assign('weekdays', get_select_options($weekdays, ''));
$days = $this->getDays();
$this->ss->assign('days', get_select_options($days, ''));
function padNumbers($x)
{
return str_pad($x, 2, '0', STR_PAD_LEFT);
}
$minutes = array_map('padNumbers', range(0, 59));
$hours = array_map('padNumbers', range(0, 23));
$this->ss->assign('minutes', get_select_options($minutes, ''));
$this->ss->assign('hours', get_select_options($hours, ''));
}
示例3: get_class_title
<tr>
<td nowrap="nowrap" class="label"> Class of Admission :<?php
echo $indicator;
?>
</td>
<td class="field" nowrap>
<?php
if (!empty($isview) || !empty($i)) {
echo "<span class='viewtext'>" . get_class_title($this, $studentdetails['admissionclass']) . "</span><input name='admissionclass' type='hidden' value='" . $studentdetails['admissionclass'] . "' />";
} else {
echo get_required_field_wrap($requiredfields, 'admissionclass');
?>
<select name="admissionclass" id="admissionclass" class="selectfield"> <?php
echo get_select_options($classes, 'id', 'class', !empty($studentdetails['admissionclass']) ? $studentdetails['admissionclass'] : '', 'Y', 'Select Class');
?>
</select>
<?php
echo get_required_field_wrap($requiredfields, 'admissionclass', 'end');
}
?>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" class="label" style="padding-top:13px">Student No. :<?php
echo $indicator;
?>
示例4: get_select_options
<div class="col-md-4">
<div class="col-md-12">
<label class="control-label"> Rereference Number </label>
<div class="controls">
<input type="text" name="procurement_ref_no" value="" class="input-medium span12">
</div>
</div>
<div class="col-md-12" style="margin-top:5px; padding-right:5px; ">
<label class="control-label">Entity</label>
<div class="controls ">
<select id="procurement-ref-no" class="col-md-6" name="entity" tabindex="1" style=" ">
<?php
echo get_select_options($pdes, 'pdeid', 'pdename', !empty($formdata['entity']) ? $formdata['entity'] : '');
?>
</select>
</div>
</div>
</div>
<div class="col-md-4">
<div class="col-md-12">
<label class="control-label">Search by Dates:</label>
<div class="controls">
<div class="input-append date date-picker col-md-6" style="padding-left:0px;" data-date="<?php
echo !empty($formdata['date_posted_from']) ? custom_date_format('Y-m-d', $formdata['date_posted_from']) : date('Y-m-d');
?>
" data-date-format="yyyy-mm-dd" data-date-viewmode="days">
示例5: assign
function assign()
{
global $app_list_strings;
$content = $this->bean->cost_detail;
$content = base64_decode($content);
$content = json_decode($content);
$this->ev->ss->assign('tour_name', $_REQUEST['tour_name']);
$this->ev->ss->assign('tour_id', $_REQUEST['tour_id']);
$this->ev->ss->assign('is_tour', $_REQUEST['is_tour']);
$html = '';
if ($this->bean->department == 'dos') {
$cost_detail = $content->dos_cost_detail;
if (count($cost_detail) > 0) {
foreach ($cost_detail as $val) {
$html .= '<tr height="15">';
$html .= '<td class="tdborder"><select name="dos_hotel_standard[]" id="dos_hotel_standard">' . get_select_options($app_list_strings['quotes_dos_hotel_standard'], $val->dos_hotel_standard) . '</select></td>';
$html .= '<td class="tdborder"><input type="text" class="ticket_cost" name="ticket_cost[]" id="tickect_cost" value="' . format_number($val->ticket_cost) . '" /></td>';
$html .= '<td class="tdborder"><input type="text" class="facility_cost" name="facility_cost[]" id="facility_cost" value="' . format_number($val->facility_cost) . '" /></td>';
$html .= '<td class="tdborder"><input type="text" class="single_room" name="single_room[]" id="single_room" value="' . format_number($val->single_room) . '" /></td>';
$html .= '<td class="tdborder"><input type="text" class="foreign" name="foreign[]" id="foreign" value="' . format_number($val->foreign) . '" /></td>';
$html .= '<td class="tdborder"><input type="button" class="btnAddRow" value="Add Row" /> <input type="button" class="btnDeleteRow" value="Delete Row"/></td>';
$html .= '</tr>';
}
}
$this->ev->ss->assign('doshtml', $html);
$this->ev->ss->assign('countdos', count($cost_detail));
}
if ($this->bean->department == 'ib') {
$cost_detail_head = $content->cost_detail_head;
$this->ev->ss->assign('group_site1', $cost_detail_head->group_site1);
$this->ev->ss->assign('group_site2', $cost_detail_head->group_site2);
$this->ev->ss->assign('group_site3', $cost_detail_head->group_site3);
$this->ev->ss->assign('group_site4', $cost_detail_head->group_site4);
$this->ev->ss->assign('group_site5', $cost_detail_head->group_site5);
$this->ev->ss->assign('group_site6', $cost_detail_head->group_site6);
$ib_cose_detai = $content->ib_cose_detai;
if (count($ib_cose_detai) > 0) {
foreach ($ib_cose_detai as $val) {
$html .= '<tr height="15">';
$html .= '<td class="tdborder"><select name="ib_hotel_standard[]" id="ib_hotel_standard">' . get_select_options_with_id($app_list_strings['quotes_ib_hotel_standard'], $val->ib_hotel_standard) . '</select></td>';
$html .= '<td class="tdborder"><input type="text" name="group_site1_cost[]" id="group_site1_cost" value="' . format_number($val->group_site1_cost) . '"/></td>';
$html .= '<td class="tdborder"><input type="text" name="group_site2_cost[]" id="group_site2_cost" value="' . format_number($val->group_site2_cost) . '"/></td>';
$html .= '<td class="tdborder"><input type="text" name="group_site3_cost[]" id="group_site3_cost" value="' . format_number($val->group_site3_cost) . '"/></td>';
$html .= '<td class="tdborder"><input type="text" name="group_site4_cost[]" id="group_site4_cost" value="' . format_number($val->group_site4_cost) . '"/></td>';
$html .= '<td class="tdborder"><input type="text" name="group_site5_cost[]" id="group_site5_cost" value="' . format_number($val->group_site5_cost) . '"/></td>';
$html .= '<td class="tdborder"><input type="text" name="group_site6_cost[]" id="group_site6_cost" value="' . format_number($val->group_site6_cost) . '"/></td>';
$html .= '<td class="tdborder"><input type="button" class="btnAddRow" value="Add Row" /> <input type="button" class="btnDeleteRow" value="Delete Row"/></td>';
$html .= '</tr>';
}
}
$this->ev->ss->assign('ibhtml', $html);
$this->ev->ss->assign('countib', count($ib_cose_detai));
}
if ($this->bean->department == 'ob') {
$ob_cost_detail = $content->ob_cost_detail;
$this->ev->ss->assign('ob_price', $ob_cost_detail->price);
$this->ev->ss->assign('ob_tax', $ob_cost_detail->tax);
$this->ev->ss->assign('ob_currency', get_select_options_with_id($app_list_strings['currency_dom'], $ob_cost_detail->currency));
$this->ev->ss->assign('ob_total_price', $ob_cost_detail->total_price);
$this->ev->ss->assign('price_note', $ob_cost_detail->price_note);
}
}
示例6: array
</table></td>
</tr>
<tr>
<td>Permission Group:*</td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><select name="usertype" class="textfield" id="usertype">
<?php
if (isset($companyuserdetails['usertype'])) {
$selected = $companyuserdetails['usertype'];
} else {
$selected = '';
}
$user_rights_templates = $this->db->query($this->Query_reader->get_query_by_code('get_user_rights_templates', array('isinternal' => 'N')));
echo get_select_options($user_rights_templates->result_array(), 'rightsname', 'displayname', $selected);
?>
</select></td>
<td><input name="layerid" type="hidden" id="layerid" value="rights_div" /> </td>
<td><input name="viewrights" type="button" class="button" id="viewrights" value="View Rights" onclick="updateDropDownDiv('usertype', 'none', 'rights_div', '<?php
echo base_url() . "index.php/companyprofile/users/view_rights";
?>
','Select a template to view its assigned rights.')"/></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php
if (isset($id)) {
?>
示例7: trim
"/></td>
<td> </td>
<td valign="top">Location: </td>
<td valign="top"><select name="stateorprovince" id="stateorprovince" class="textfield">
<?php
if (isset($employeedetails)) {
$selected = trim($employeedetails['stateorprovince']);
} else {
$selected = '';
}
$statearray = array();
$originalarray = get_all_states();
foreach ($originalarray as $state) {
array_push($statearray, array('state' => $state));
}
echo get_select_options($statearray, 'state', 'state', $selected);
?>
</select></td>
</tr>
<tr>
<td nowrap="nowrap">Gender:</td>
<td valign="top"><table border="0" cellpadding="4" cellspacing="0">
<tr>
<td nowrap="nowrap"><input name="gender_radio" id="female" type="radio" value="Female" onclick="passFormValue('female', 'gender', 'radio');" <?php
if (isset($employeedetails) && $employeedetails['gender'] == 'Female') {
echo " checked";
}
?>
/></td>
<td nowrap="nowrap">Female </td>
<td nowrap="nowrap"><input name="gender_radio" id="male" type="radio" value="Male" onclick="passFormValue('male', 'gender', 'radio');" <?php
示例8: trim
echo $jobdetails['jobtitle'];
}
?>
">
<?php
if (isset($jobdetails)) {
$selected = trim($jobdetails['jobtitle']);
} else {
$selected = '';
}
$jobarray = array();
$originalarray = get_all_jobs();
foreach ($originalarray as $jobs) {
array_push($jobarray, array('job' => $jobs));
}
echo get_select_options($jobarray, 'job', 'job', $selected);
?>
</select></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><input name="saveandnew" type="submit" id="saveandnew" value="Save & New" class="button"/>
<input name="save" type="submit" id="save" value="Save" class="button"/></td>
</tr>
</table></td>
</tr>
示例9: format_notice
#*********************************************************************************
# Displays forms used in AJAX when processing data on other forms without
# reloading the whole form.
#*********************************************************************************
#===============================================================================================
# Display for simple message results
#===============================================================================================
if (!empty($area) && in_array($area, array('save_recover_settings_results', 'add_delivery_data'))) {
$table_HTML .= format_notice($msg);
} else {
if (!empty($area) && $area == 'combo_list') {
if (!empty($page_list)) {
if (empty($select_text)) {
$select_text = 'Select';
}
$table_HTML .= get_select_options($page_list, $value_field, $text_field, '', 'Y', $select_text);
} else {
$table_HTML .= "<option value=''>No items to show!</option>";
}
} else {
if (!empty($area) && $area == 'users_list') {
if (!empty($page_list)) {
$table_HTML .= '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="5%"></th>' . '<th>Name</th>' . '<th class="hidden-480">PDE</th>' . '<th class="hidden-480">User Group</th>' . '<th class="hidden-480">Email Address</th>' . '<th class="hidden-480">Phone No.</th>' . '<th>Date Added</th>' . '</tr>' . '</thead>' . '</tbody>';
foreach ($page_list as $row) {
#user's role(s)
$user_roles_arr_text = get_user_roles_text($this, $row['userid'], $usergroups);
$user_roles_text = !empty($user_roles_arr_text) ? implode(', ', $user_roles_arr_text) : '<i>NONE</i>';
$delete_str = '<a title="Delete user details" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'admin/delete_user/i/' . encryptValue($row['userid']) . '\', \'Are you sure you want to delete this user?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="icon-trash"></i></a>';
$edit_str = '<a title="Edit user details" href="' . base_url() . 'user/load_user_form/i/' . encryptValue($row['userid']) . '"><i class="icon-edit"></i></a>';
$table_HTML .= '<tr>' . '<td>' . $delete_str . ' ' . $edit_str . '</td>' . '<td>' . (!empty($row['prefix']) ? $row['prefix'] . ' ' : '') . $row['firstname'] . ' ' . $row['lastname'] . '</td>' . '<td>' . $row['pdename'] . '</td>' . '<td>' . $user_roles_text . '</td>' . '<td>' . $row['emailaddress'] . '</td>' . '<td>' . $row['telephone'] . '</td>' . '<td>' . custom_date_format('d M, Y', $row['dateadded']) . '</td>' . '</tr>';
}
示例10: get_select_options
?>
</div>
</li>
<li>
<div class="label">Term:</div>
<div class="label_value"><?php
echo $term['term'] . ', ' . $term['year'];
?>
</div>
</li>
<li>
<div class="label">Exam:</div>
<div class="label_value">
<select name="term" id="select-marksheet-exam" class="selectfield"> <?php
echo get_select_options($exams, 'id', 'exam', '', 'Y', 'Select exam');
?>
</select>
<input type="hidden" id="cste" value="<?php
echo $class['id'] . '^' . $subject['id'] . '^' . $term['id'];
?>
" />
</div>
</li>
<div style="clear: both;"></div>
</ul>
</td>
</tr>
<tr>
<td align="left" nowrap="nowrap" valign="top">
示例11: get_select_options
$output .= '<h3 id="myModalLabel">' . $mod_strings['LBL_ADD_LAYOUT'] . '</h3>';
}
$output .= '</div>
<div class="modal-body">
<table class="table-consdened">
<tr>
<td ><strong>' . $mod_strings['LBL_MANDATORY'] . '</strong></td>
<td><input name="fldMandatory" value="1" ' . $fieldmandatory . ' type="checkbox" ></td>
</tr>
<tr>
<td><strong>' . $mod_strings['FIELD_LABEL'] . '</strong></td>
<td><input type="text" size=20 name="fieldlabel" value="' . $fieldlabel . '" ></td>
</tr>
<tr>
<td ><strong>' . $mod_strings['LBL_LAYOUT_LABEL'] . '</strong></td>
<td width="50%" align="left"><select name="blockid">' . get_select_options($blockArr, $blockid) . '</select></td>
</tr>
<tr>
<td ><strong>' . $mod_strings['LBL_BLOCK_ORDER'] . '</strong></td>
<td><input type="text" size=20 name="order" value="' . $order . '" ></td>
</tr>
</table>
</div>
<div class="modal-footer">
<button class="btn pull-left btn-small btn-primary" data-dismiss="modal" aria-hidden="true">
<i class ="icon-arrow-left icon-white"></i> ' . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . '</button>
<button class="btn btn-small btn-success pull-right" type="submit"><i class="icon-ok icon-white"></i> ' . $app_strings['LBL_SAVE_BUTTON_LABEL'] . '</button>
</div>
</from>
</div>';
示例12: str_replace
}
$xtpl->assign('RETURN_MODULE', 'Schedulers');
$xtpl->assign('RETURN_ID', $focus->id);
$xtpl->assign('RETURN_ACTION', 'DetailView');
// module specific
$xtpl->assign('ID', $focus->id);
$xtpl->assign('NAME', $focus->name);
if ($focus->catch_up == 1) {
$xtpl->assign('CATCH_UP_CHECKED', 'CHECKED');
}
// job
if (strstr($focus->job, 'url::')) {
$job_url = str_replace('url::', '', $focus->job);
} else {
$job_url = 'http://';
}
$xtpl->assign('JOB_FUNCTION', $job_function);
$xtpl->assign('JOB_URL', $job_url);
$xtpl->assign('JOB_INTERVAL', $focus->job_interval);
$xtpl->assign('TIME_FROM', $focus->time_from);
$xtpl->assign('TIME_TO', $focus->time_to);
$xtpl->assign('STATUS_OPTIONS', get_select_options($mod_strings['scheduler_status_dom'], $focus->status));
$xtpl->assign('MINS', $exInterval[0]);
$xtpl->assign('HOURS', $exInterval[1]);
$xtpl->assign('DAY_OF_MONTH', $exInterval[2]);
$xtpl->assign('MONTHS', $exInterval[3]);
$xtpl->assign('DAY_OF_WEEK', $exInterval[4]);
$xtpl->assign('ROLLOVER', $email->rolloverStyle);
$xtpl->parse("main");
$xtpl->out("main");
//$focus->displayCronInstructions();
示例13: get_required_field_wrap
</td></tr>
</table>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" class="label" style="padding-top:13px">Fee :</td>
<td class="field" nowrap>
<?php
if (!empty($isview)) {
echo "<span class='viewtext'>" . $feedetails['fee'] . "</span>";
} else {
echo get_required_field_wrap($requiredfields, 'fee');
?>
<select name="fee" id="frequency" class="selectfield"> <?php
echo get_select_options($fees, 'id', 'fee', !empty($formdata['fee']) ? $formdata['fee'] : '', 'Y', 'Select fee');
?>
</select>
<?php
echo get_required_field_wrap($requiredfields, 'fee', 'end');
}
?>
</td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" class="label" style="padding-top:13px">Amount :<?php
echo $indicator;
?>
</td>
示例14: display
function display()
{
$focus = new C_Reports();
global $db;
global $app_strings;
global $app_list_strings;
global $mod_strings;
global $currentModule;
$ketqua = '';
$export = '';
$file_name = '';
$ss = new Sugar_Smarty();
$ss->assign("APP", $app_strings);
$ss->assign("MOD", $mod_strings);
$ss->assign('CURRENT_MODULE', $currentModule);
$ss->assign('KY', get_select_options($app_list_strings['tinhdiem_ky_dom'], ''));
$ss->assign('THANG', get_select_options($app_list_strings['tinhdiem_thang_dom'], ''));
$ss->assign('DEPARTMENT', get_select_options($app_list_strings['report_deparment_dom'], 'any'));
if ((isset($_REQUEST['tinhdiem']) || isset($_REQUEST['tinhdiemsales']) || isset($_REQUEST['tinhdiemtelesales']) || isset($_REQUEST['xephang']) || isset($_REQUEST['xephangsales']) || isset($_REQUEST['xephangtelesales']) || isset($_REQUEST['export'])) && $_REQUEST['nam'] != '') {
//////////////////////////////////////
//Khai bao bien
$ds_ketqua = array();
$rate = '';
$type_calculate = '';
$type_value = '';
$start_date = '';
$end_date = '';
$report_type = '';
$check_sale_man = $_REQUEST['check_sale_man'];
$sale_man = $_REQUEST['sale_man'];
$sale_man_id = $_REQUEST['sale_man_id'];
$department = $_REQUEST['department'];
if (isset($_REQUEST['report_type'])) {
$report_type = $_REQUEST['report_type'];
}
if (isset($_REQUEST['export'])) {
$export = 1;
}
$ky = $_REQUEST['ky'];
$thang = $_REQUEST['thang'];
$nam = $_REQUEST['nam'];
if ($check_sale_man == '1') {
$ss->assign('CHECK_SALE_MAN', 'checked="checked"');
} elseif ($check_sale_man == '0') {
$ss->assign('CHECK_SALE_MAN', '');
}
$ss->assign('SALE_MAN', $sale_man);
$ss->assign('SALE_MAN_ID', $sale_man_id);
$ss->assign('KY', get_select_options($app_list_strings['tinhdiem_ky_dom'], $ky));
$ss->assign('THANG', get_select_options($app_list_strings['tinhdiem_thang_dom'], $thang));
$ss->assign('DEPARTMENT', get_select_options($app_list_strings['report_deparment_dom'], $department));
$ss->assign('NAM', $nam);
///////////////////////////////////////
// Tinh ngay bat dau va ngay ket thuc de cham diem
if (isset($_REQUEST['xephangsales']) || isset($_REQUEST['xephangtelesales']) || isset($_REQUEST['xephang']) || $report_type == 5 || $report_type == 6 || $report_type == 7 || $report_type == 8) {
foreach ($thang as $thang_unit) {
$start_date[] = $nam . '-' . $thang_unit . '-01';
$end_date[] = date('Y-m-d', strtotime('-1 second', strtotime('+1 month', strtotime($thang_unit . '/01/' . $nam . ' 00:00:00'))));
}
} else {
if ($ky == '1') {
foreach ($thang as $thang_unit) {
$start_date[] = $nam . '-' . $thang_unit . '-01';
$end_date[] = $nam . '-' . $thang_unit . '-16';
}
} else {
foreach ($thang as $thang_unit) {
$start_date[] = $nam . '-' . $thang_unit . '-16';
$end_date[] = date('Y-m-d', strtotime('-1 second', strtotime('+1 month', strtotime($thang_unit . '/01/' . $nam . ' 00:00:00'))));
}
}
}
////////////////////////////////////////
// Lay ket qua
if (isset($_REQUEST['tinhdiemtelesales']) || $report_type == 1 && $export == 1) {
if ($report_type != 1) {
$report_type = 1;
}
$ketqua = $focus->getDanhSachDiemCuaNhanVienTeleSale($app_strings, $mod_strings, $ds_ketqua, $start_date, $end_date, $sale_man_id, $department, null, $export, $report_type);
$type_value = 1;
$type_calculate = $mod_strings['LBL_TINH_DIEM_TELESALES'];
} elseif (isset($_REQUEST['tinhdiemsales']) || $report_type == 2 && $export == 1) {
if ($report_type != 2) {
$report_type = 2;
}
$ketqua = $focus->getDanhSachDiemCuaNhanVienSale($app_strings, $mod_strings, $ds_ketqua, $start_date, $end_date, $sale_man_id, $department, null, $export, $report_type);
$type_value = 2;
$type_calculate = $mod_strings['LBL_TINH_DIEM_SALES'];
} elseif (isset($_REQUEST['tinhdiem']) || ($report_type == 3 || $report_type == 4) && $export == 1) {
$user = new User();
$user->retrieve($sale_man_id);
if ($user->type_sale == 'telesales' || $report_type == 3) {
if ($report_type != 3) {
$report_type = 3;
}
$ketqua = $focus->getDanhSachDiemCuaNhanVienTeleSale($app_strings, $mod_strings, $ds_ketqua, $start_date, $end_date, $sale_man_id, $department, null, $export, $report_type);
$type_value = 1;
$type_calculate = $mod_strings['LBL_TINH_DIEM_TELESALES'] . ' ' . $user->last_name;
} elseif ($user->type_sale == 'sales' || $report_type == 4) {
if ($report_type != 4) {
//.........这里部分代码省略.........
示例15: getSignatures
/**
* retrieves any signatures that the User may have created as <select>
*/
function getSignatures($live = false, $defaultSig = '')
{
$q = 'SELECT * FROM users_signatures WHERE user_id = \'' . $this->id . '\' AND deleted = 0 ORDER BY name ASC';
$r = $this->db->query($q);
$sig = array("" => "");
while ($a = $this->db->fetchByAssoc($r)) {
$sig[$a['id']] = $a['name'];
}
$change = '';
if (!$live) {
$change = 'onChange="setSigEditButtonVisibility();" ';
}
$signs = '<select ' . $change . ' id="signature_id" name="signature_id" tabindex="390">';
$signs .= get_select_options($sig, $defaultSig) . '</select>';
return $signs;
}