📄 book.php
字号:
$fee_count = $projects->get_authorized_fees($GO_SECURITY->user_id); while($projects->next_record()) { $fees[] = $projects->Record; } echo '<tr><td>'.$pm_internal_fee.':</td><td colspan="3">'; $fee_select = new select('fee_id', '0/0'); $fee_select->add_value('0/0', $cmdPleaseSelect); foreach($fees as $fee) { $fee_select->add_value($fee['value'].'/'.$fee['time'], $fee['name'].' ('. htmlspecialchars($_SESSION['GO_SESSION']['currency']).' '. number_format($fee['value'], 2, $_SESSION['GO_SESSION']['decimal_seperator'], $_SESSION['GO_SESSION']['thousands_seperator']).' / '. $fee['time'].' '.$pm_mins.')'); } $fee_select->set_attribute('onchange', 'javascript:set_int_fee(this);'); echo $fee_select->get_html().' '.htmlspecialchars($_SESSION["GO_SESSION"]['currency']).' '; $input = new input('text', 'int_fee_value', format_number($int_fee_value)); $input->set_attribute('style', 'width:50px;text-align:right'); $input->set_attribute('onfocus','this.select();'); $input->set_attribute('onblur', "javascript:this.value=number_format(this.value, 2, '".$_SESSION['GO_SESSION']['decimal_seperator']."', '".$_SESSION['GO_SESSION']['thousands_seperator']."');"); echo $input->get_html().' / '; $select = new select('int_fee_time',$int_fee_time); for ($i=1;$i<=60;$i++) { $select->add_value($i,$i); } echo $select->get_html(); echo '</td></tr>'; echo '<tr><td>'.$pm_external_fee.':</td><td colspan="3">'; $fee_select = new select('fee_id', '0/0'); $fee_select->add_value('0/0', $cmdPleaseSelect); foreach($fees as $fee) { $fee_select->add_value($fee['value'].'/'.$fee['time'], $fee['name'].' ('. htmlspecialchars($_SESSION['GO_SESSION']['currency']).' '. number_format($fee['value'], 2, $_SESSION['GO_SESSION']['decimal_seperator'], $_SESSION['GO_SESSION']['thousands_seperator']).' / '. $fee['time'].' '.$pm_mins.')'); } $fee_select->set_attribute('onchange', 'javascript:set_ext_fee(this);'); echo $fee_select->get_html().' '.htmlspecialchars($_SESSION["GO_SESSION"]['currency']).' '; $input = new input('text', 'ext_fee_value', format_number($int_fee_value)); $input->set_attribute('style', 'width:50px;text-align:right'); $input->set_attribute('onfocus','this.select();'); $input->set_attribute('onblur', "javascript:this.value=number_format(this.value, 2, '".$_SESSION['GO_SESSION']['decimal_seperator']."', '".$_SESSION['GO_SESSION']['thousands_seperator']."');"); echo $input->get_html().' / '; $select = new select('ext_fee_time',$ext_fee_time); for ($i=1;$i<=60;$i++) { $select->add_value($i,$i); } echo $select->get_html(); echo '</td></tr>'; ?> <tr> <td><?php echo $pm_starttime; ?>:</td> <td> <?php $datepicker= new date_picker('book_start_date', $_SESSION['GO_SESSION']['date_format'], $book_start_date, '', '', 'onchange="javascript:check_date(this.name);"'); echo $datepicker->get_html(); echo ' '; $hours = array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23", "24"); for ($i=0;$i<=60;$i++) { $text = strlen($i) < 2 ? '0'.$i : $i; $mins[] = $text; } $dropbox = new dropbox(); $dropbox->add_arrays($hours, $hours); $dropbox->print_dropbox("start_hour", $start_hour, 'onchange="javascript:update_end_hour();"'); echo ' : '; $dropbox = new dropbox(); $dropbox->add_arrays($mins, $mins); $dropbox->print_dropbox("start_min", $start_min, 'onchange="javascript:document.projects_form.end_min.value=this.value;"'); ?> </td> <td colspan="2"> </td> </tr> <tr><td colspan="3"> </td></tr> <tr> <td colspan="2"> <?php if ($registration_method == 'units') { $unit_check = 'checked'; $endtime_check = ''; }else { $unit_check = ''; $endtime_check = 'checked'; } ?> <input type="radio" name="registration_method" value="endtime" onclick="javascript:toggle_registration_method(this.value)" <?php echo $endtime_check; ?> /><?php echo $pm_endtime; ?> </td> <td colspan="2"> <input type="radio" name="registration_method" value="units" onclick="javascript:toggle_registration_method(this.value)" <?php echo $unit_check; ?> /><?php echo $pm_units; ?> </td> </tr> <tr> <td><?php echo $pm_endtime; ?>:</td> <td> <?php $datepicker= new date_picker('book_end_date', $_SESSION['GO_SESSION']['date_format'], $book_end_date, '', '', 'onchange="javascript:check_date(this.name);"'); echo $datepicker->get_html(); echo ' '; $dropbox = new dropbox(); $dropbox->add_arrays($hours, $hours); $dropbox->print_dropbox("end_hour", $end_hour); echo ' : '; $dropbox = new dropbox(); $dropbox->add_arrays($mins, $mins); $dropbox->print_dropbox("end_min", $end_min); ?> </td> <td> <?php echo $pm_value; ?>: </td> <td> <?php $dropbox = new dropbox(); for ($i=1;$i<=60;$i++) { $dropbox->add_value($i,$i); } $dropbox->print_dropbox('unit_value', $unit_value); echo ' '.$pm_mins; ?> </td> </tr> <tr> <td><?php echo $pm_breaktime; ?>:</td> <td> <?php $dropbox = new dropbox(); $dropbox->add_arrays($hours, $hours); $dropbox->print_dropbox("break_hours", $break_hours); echo ' : '; $dropbox = new dropbox(); $dropbox->add_arrays($mins, $mins); $dropbox->print_dropbox("break_mins", $break_mins); ?> </td> <td> <?php echo $pm_units; ?>: </td> <td> <input type="text" name="units" value="<?php echo $units; ?>" class="textbox" size="4" /> </td> </tr> <tr><td colspan="3"> </td></tr> <tr> <td valign="top"><?php echo $strComments; ?>:</td> <td colspan="3"> <textarea class="textbox" name="book_comments" cols="40" rows="4"><?php echo htmlspecialchars($book_comments, ENT_QUOTES); ?></textarea> </td> </tr> <?php echo '<tr><td colspan="4">'; $button = new button($cmdOk,"javascript:_save('save_hours', 'true')"); echo $button->get_html(); $button = new button($cmdApply,"javascript:_save('save_hours', 'false')"); echo $button->get_html(); $button = new button($cmdClose, "javascript:document.location='".$return_to."';"); echo $button->get_html(); ?> </table> </td></tr></table><?php$tabtable->print_foot();echo '</form>';?><script type="text/javascript">function toggle_registration_method(registration_method){ if (registration_method == "endtime") { document.projects_form.unit_value.disabled = true; document.projects_form.units.disabled = true; document.projects_form.end_hour.disabled = false; document.projects_form.book_end_date.disabled = false; document.projects_form.end_min.disabled = false; document.projects_form.break_hours.disabled = false; document.projects_form.break_mins.disabled = false; }else { document.projects_form.unit_value.disabled = false; document.projects_form.units.disabled = false; document.projects_form.book_end_date.disabled = true; document.projects_form.end_hour.disabled = true; document.projects_form.end_min.disabled = true; document.projects_form.break_hours.disabled = true; document.projects_form.break_mins.disabled = true; }}toggle_registration_method("<?php echo $registration_method; ?>");function check_date(changed_field){ start_date = get_date(document.projects_form.book_start_date.value, '<?php echo $_SESSION['GO_SESSION']['date_format']; ?>', '<?php echo $_SESSION['GO_SESSION']['date_seperator']; ?>'); end_date = get_date(document.projects_form.book_end_date.value, '<?php echo $_SESSION['GO_SESSION']['date_format']; ?>','<?php echo $_SESSION['GO_SESSION']['date_seperator']; ?>'); if(end_date < start_date) { if(changed_field == 'book_start_date') { document.projects_form.book_end_date.value = document.projects_form.book_start_date.value; }else { document.projects_form.book_start_date.value = document.projects_form.book_end_date.value; } }}function set_ext_fee(select){ var arr = select.value.split('/'); document.forms[0].ext_fee_value.value=number_format(arr[0], 2, '<?php echo $_SESSION['GO_SESSION']['decimal_seperator']; ?>', '<?php echo $_SESSION['GO_SESSION']['thousands_seperator']; ?>'); document.forms[0].ext_fee_time.value=arr[1];}function set_int_fee(select){ var arr = select.value.split('/'); document.forms[0].int_fee_value.value=number_format(arr[0], 2, '<?php echo $_SESSION['GO_SESSION']['decimal_seperator']; ?>', '<?php echo $_SESSION['GO_SESSION']['thousands_seperator']; ?>'); document.forms[0].int_fee_time.value=arr[1];} function update_end_hour(){ var start_hour = parseInt(document.projects_form.start_hour.value); var end_hour = parseInt(document.projects_form.end_hour.value); if (start_hour == 23) { document.projects_form.end_hour.value='23'; document.projects_form.end_min.value='30'; }else { if (start_hour >= end_hour) { end_hour = start_hour+1; document.projects_form.end_hour.value=end_hour; } }}function _save(task, close){ document.projects_form.task.value = task; document.projects_form.close.value = close; document.projects_form.submit();}function remove_client(){ document.projects_form.contact_id.value = 0; document.projects_form.contact_name.value = ''; document.projects_form.contact_name_text.value = '';}function remove_user(){ document.projects_form.responsible_user_id.value = 0; document.projects_form.user_name.value = ''; document.projects_form.user_name_text.value = '';}</script><?phprequire_once ($GO_THEME->theme_path."footer.inc");?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -