Initial commit: Kimai TMS
Kimai time management system (PHP 5.6 / MySQL) with custom extensions: - Budget tracking (ki_budget) - Change request form (ki_changerequest) - Invoice generation (ki_invoice) - Expense tracking (ki_expenses) - Flexi time (ki_flexitime) - Export, admin panel, timesheets, tasks, summary Database: ~900K time entries, 2,000+ users, 439 projects. Config: includes/autoconf.php — localhost/kimai/kimai
This commit is contained in:
@@ -0,0 +1,139 @@
|
||||
<?php /* Smarty version 2.6.20, created on 2015-01-21 09:05:35
|
||||
compiled from export_PDF.tpl */ ?>
|
||||
<?php echo '
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$(\'#help\').hide();
|
||||
$(\'#floater input#timeformat\').attr(\'value\',$(\'#xp_ext_timeformat\').attr(\'value\'));
|
||||
$(\'#floater input#dateformat\').attr(\'value\',$(\'#xp_ext_dateformat\').attr(\'value\'));
|
||||
$(\'#floater input#default_location\').attr(\'value\',$(\'#xp_ext_default_location\').attr(\'value\'));
|
||||
$(\'#floater input#axValue\').attr(\'value\',filterUsr.join(":")+\'|\'+filterKnd.join(":")+\'|\'+filterPct.join(":")+\'|\'+filterEvt.join(":"));
|
||||
$(\'#floater input#filter_cleared\').attr(\'value\',$(\'#xp_ext_tab_filter_cleared\').attr(\'value\'));
|
||||
$(\'#floater input#filter_refundable\').attr(\'value\',$(\'#xp_ext_tab_filter_refundable\').attr(\'value\'));
|
||||
$(\'#floater input#filter_type\').attr(\'value\',$(\'#xp_ext_tab_filter_type\').attr(\'value\'));
|
||||
$(\'#floater input#axColumns\').attr(\'value\',xp_enabled_columns());
|
||||
$(\'.floater_content fieldset label\').css(\'width\',\'200px\');
|
||||
|
||||
$(\'#floater input#first_day\').attr(\'value\',new Date($(\'#pick_in\').val()).getTime()/1000);
|
||||
$(\'#floater input#last_day\').attr(\'value\',new Date($(\'#pick_out\').val()).getTime()/1000);
|
||||
});
|
||||
|
||||
</script>
|
||||
'; ?>
|
||||
|
||||
|
||||
|
||||
<div id="floater_innerwrap">
|
||||
|
||||
<div id="floater_handle">
|
||||
<span id="floater_title"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['exportPDF']; ?>
|
||||
</span>
|
||||
<div class="right">
|
||||
<a href="#" class="close" onClick="floaterClose();"><?php echo $this->_tpl_vars['kga']['lang']['close']; ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="help">
|
||||
<div class="content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="floater_content">
|
||||
|
||||
<form id="xp_ext_form_export_PDF" action="../extensions/ki_export/processor.php" method="post" target="_blank">
|
||||
<fieldset>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<label for="print_comments"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['print_comment']; ?>
|
||||
:</label>
|
||||
<input type="checkbox" value="true" name="print_comments" id="print_comments" <?php if ($this->_tpl_vars['prefs']['print_comments']): ?>checked="checked"<?php endif; ?>/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="print_summary"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['print_summary']; ?>
|
||||
:</label>
|
||||
<input type="checkbox" value="true" name="print_summary" id="print_summary" <?php if ($this->_tpl_vars['prefs']['print_summary']): ?>checked="checked"<?php endif; ?>>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="create_bookmarks"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['create_bookmarks']; ?>
|
||||
:</label>
|
||||
<input type="checkbox" value="true" name="create_bookmarks" id="create_bookmarks" <?php if ($this->_tpl_vars['prefs']['create_bookmarks']): ?>checked="checked"<?php endif; ?>/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="download_pdf"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['download_pdf']; ?>
|
||||
:</label>
|
||||
<input type="checkbox" value="true" name="download_pdf" id="download_pdf" <?php if ($this->_tpl_vars['prefs']['download_pdf']): ?>checked="checked"<?php endif; ?>/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="customer_new_page"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['customer_new_page']; ?>
|
||||
:</label>
|
||||
<input type="checkbox" value="true" name="customer_new_page" id="customer_new_page" <?php if ($this->_tpl_vars['prefs']['customer_new_page']): ?>checked="checked"<?php endif; ?>/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="reverse_order"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['reverse_order']; ?>
|
||||
:</label>
|
||||
<input type="checkbox" value="true" name="reverse_order" id="reverse_order" <?php if ($this->_tpl_vars['prefs']['reverse_order']): ?>checked="checked"<?php endif; ?>/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="reverse_order"><?php echo $this->_tpl_vars['kga']['lang']['comment']; ?>
|
||||
:</label>
|
||||
<textarea name="document_comment" id="document_comment"></textarea>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="axAction"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['pdf_format']; ?>
|
||||
:</label>
|
||||
<select name="axAction" id="axAction">
|
||||
<option value="export_pdf" <?php if ($this->_tpl_vars['prefs']['pdf_format'] == 'export_pdf'): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['export_pdf']; ?>
|
||||
</option>
|
||||
<option value="export_pdf2" <?php if ($this->_tpl_vars['prefs']['pdf_format'] == 'export_pdf2'): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['export_pdf2']; ?>
|
||||
</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['dl_hint']; ?>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <input name="id" type="hidden" value="" /> -->
|
||||
<input name="axValue" id="axValue" type="hidden" value="" />
|
||||
<input name="first_day" id="first_day" type="hidden" value="" />
|
||||
<input name="last_day" id="last_day" type="hidden" value="" />
|
||||
<input name="axColumns" id="axColumns" type="hidden" value=""/>
|
||||
<input name="timeformat" id="timeformat" type="hidden" value=""/>
|
||||
<input name="dateformat" id="dateformat" type="hidden" value=""/>
|
||||
<input name="default_location" id="default_location" type="hidden" value=""/>
|
||||
<input name="filter_cleared" id="filter_cleared" type="hidden" value=""/>
|
||||
<input name="filter_refundable" id="filter_refundable" type="hidden" value=""/>
|
||||
<input name="filter_type" id="filter_type" type="hidden" value=""/>
|
||||
|
||||
<div id="formbuttons">
|
||||
<input class='btn_norm' type='button' value='<?php echo $this->_tpl_vars['kga']['lang']['cancel']; ?>
|
||||
' onClick='floaterClose(); return false;' />
|
||||
<input class='btn_ok' type='submit' value='<?php echo $this->_tpl_vars['kga']['lang']['submit']; ?>
|
||||
' onClick="floaterClose();"/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
457
extensions/ki_export/compile/%%1D^1DE^1DE40086%%table.tpl.php
Normal file
457
extensions/ki_export/compile/%%1D^1DE^1DE40086%%table.tpl.php
Normal file
@@ -0,0 +1,457 @@
|
||||
<?php /* Smarty version 2.6.20, created on 2015-02-13 13:25:17
|
||||
compiled from table.tpl */ ?>
|
||||
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'table.tpl', 1, false),array('modifier', 'date_format', 'table.tpl', 53, false),array('modifier', 'escape', 'table.tpl', 62, false),array('modifier', 'replace', 'table.tpl', 137, false),array('modifier', 'nl2br', 'table.tpl', 211, false),)), $this); ?>
|
||||
<?php echo smarty_function_cycle(array('values' => "odd,even",'reset' => true,'print' => false), $this);?>
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data']): ?>
|
||||
<div id="xptable">
|
||||
|
||||
<table>
|
||||
|
||||
<colgroup>
|
||||
<col class="date" />
|
||||
<col class="from" />
|
||||
<col class="to" />
|
||||
<col class="time" />
|
||||
<col class="dec_time" />
|
||||
<col class="rate" />
|
||||
<col class="wage" />
|
||||
<col class="client" />
|
||||
<col class="division" />
|
||||
<col class="project" />
|
||||
<col class="action" />
|
||||
<col class="comment" />
|
||||
<col class="location" />
|
||||
<col class="trackingnr" />
|
||||
<col class="user" />
|
||||
<col class="cleared" />
|
||||
</colgroup>
|
||||
|
||||
<tbody>
|
||||
|
||||
<?php $this->assign('day_buffer', '0'); ?>
|
||||
<?php $this->assign('time_in_buffer', 0); ?>
|
||||
|
||||
<?php unset($this->_sections['row']);
|
||||
$this->_sections['row']['name'] = 'row';
|
||||
$this->_sections['row']['loop'] = is_array($_loop=$this->_tpl_vars['arr_data']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||
$this->_sections['row']['show'] = true;
|
||||
$this->_sections['row']['max'] = $this->_sections['row']['loop'];
|
||||
$this->_sections['row']['step'] = 1;
|
||||
$this->_sections['row']['start'] = $this->_sections['row']['step'] > 0 ? 0 : $this->_sections['row']['loop']-1;
|
||||
if ($this->_sections['row']['show']) {
|
||||
$this->_sections['row']['total'] = $this->_sections['row']['loop'];
|
||||
if ($this->_sections['row']['total'] == 0)
|
||||
$this->_sections['row']['show'] = false;
|
||||
} else
|
||||
$this->_sections['row']['total'] = 0;
|
||||
if ($this->_sections['row']['show']):
|
||||
|
||||
for ($this->_sections['row']['index'] = $this->_sections['row']['start'], $this->_sections['row']['iteration'] = 1;
|
||||
$this->_sections['row']['iteration'] <= $this->_sections['row']['total'];
|
||||
$this->_sections['row']['index'] += $this->_sections['row']['step'], $this->_sections['row']['iteration']++):
|
||||
$this->_sections['row']['rownum'] = $this->_sections['row']['iteration'];
|
||||
$this->_sections['row']['index_prev'] = $this->_sections['row']['index'] - $this->_sections['row']['step'];
|
||||
$this->_sections['row']['index_next'] = $this->_sections['row']['index'] + $this->_sections['row']['step'];
|
||||
$this->_sections['row']['first'] = ($this->_sections['row']['iteration'] == 1);
|
||||
$this->_sections['row']['last'] = ($this->_sections['row']['iteration'] == $this->_sections['row']['total']);
|
||||
?>
|
||||
|
||||
<tr id="xp<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['type']; ?>
|
||||
<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['id']; ?>
|
||||
" class="<?php echo smarty_function_cycle(array('values' => "odd,even"), $this);?>
|
||||
<?php if (! $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out']): ?>active<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['type'] == 'exp'): ?>expense<?php endif; ?>">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="date
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['date']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['dateformat']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['dateformat'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="from
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['from']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['timeformat']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['timeformat'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="to
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['to']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out']): ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'])) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['timeformat']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['timeformat'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php else: ?>
|
||||
––:––
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="time
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['time']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['zef_time']): ?>
|
||||
|
||||
<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['zef_duration']; ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
–:––
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="dec_time
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['dec_time']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['dec_zef_time']): ?>
|
||||
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['dec_zef_time'])) ? $this->_run_mod_handler('replace', true, $_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator']) : smarty_modifier_replace($_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
–:––
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="rate
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['rate']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['zef_rate'])) ? $this->_run_mod_handler('replace', true, $_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator']) : smarty_modifier_replace($_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="wage
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['wage']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['wage']): ?>
|
||||
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['wage'])) ? $this->_run_mod_handler('replace', true, $_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator']) : smarty_modifier_replace($_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
–
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="knd
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['knd']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['knd_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="division
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['division']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['division'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')))) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="pct
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['pct']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
|
||||
<a href ="#" class="preselect_lnk"
|
||||
onClick="buzzer_preselect('pct',<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['pct_ID']; ?>
|
||||
,'<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['pct_name'])) ? $this->_run_mod_handler('replace', true, $_tmp, "'", "\\'") : smarty_modifier_replace($_tmp, "'", "\\'")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
',<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['pct_kndID']; ?>
|
||||
,'<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['knd_name'])) ? $this->_run_mod_handler('replace', true, $_tmp, "'", "\\'") : smarty_modifier_replace($_tmp, "'", "\\'")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
');
|
||||
return false;">
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['pct_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['kga']['conf']['pct_comment_flag'] == 1): ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['pct_comment']): ?>
|
||||
<span class="lighter">(<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['pct_comment'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
)</span>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="evt
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['evt']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
|
||||
<a href ="#" class="preselect_lnk"
|
||||
onClick="buzzer_preselect('evt',<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['zef_evtID']; ?>
|
||||
,'<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['evt_name'])) ? $this->_run_mod_handler('replace', true, $_tmp, "'", "\\'") : smarty_modifier_replace($_tmp, "'", "\\'")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
',0,0);
|
||||
return false;">
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['evt_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</a>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="comment
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['comment']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['comment'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')))) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="location
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['location']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['location'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="trackingnr
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['trackingnr']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['trackingnr'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="user
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['user']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['username'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="cleared
|
||||
<?php if (((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d")) != $this->_tpl_vars['day_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>break_day<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'] != $this->_tpl_vars['time_in_buffer']): ?>
|
||||
<?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>break_gap<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['disabled_columns']['cleared']): ?>disabled<?php endif; ?>
|
||||
">
|
||||
<a class ="<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['cleared']): ?>is_cleared<?php else: ?>isnt_cleared<?php endif; ?>" href ="#" onClick="xp_toggle_cleared('<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['type']; ?>
|
||||
<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['id']; ?>
|
||||
'); return false;"></a>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
<?php $this->assign('day_buffer', ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d") : smarty_modifier_date_format($_tmp, "%d"))); ?>
|
||||
<?php $this->assign('time_in_buffer', $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in']); ?>
|
||||
|
||||
<?php endfor; endif; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div style='padding:5px;color:#f00'>
|
||||
<strong><?php echo $this->_tpl_vars['kga']['lang']['noEntries']; ?>
|
||||
</strong>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
ts_usr_ann = null;
|
||||
ts_knd_ann = null;
|
||||
ts_pct_ann = null;
|
||||
ts_evt_ann = null;
|
||||
ts_total = '<?php echo $this->_tpl_vars['total']; ?>
|
||||
';
|
||||
|
||||
<?php if ($this->_tpl_vars['usr_ann']): ?>
|
||||
ts_usr_ann = new Array();
|
||||
<?php $_from = $this->_tpl_vars['usr_ann']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
|
||||
foreach ($_from as $this->_tpl_vars['id'] => $this->_tpl_vars['value']):
|
||||
?>
|
||||
ts_usr_ann[<?php echo $this->_tpl_vars['id']; ?>
|
||||
] = '<?php echo $this->_tpl_vars['value']; ?>
|
||||
';
|
||||
<?php endforeach; endif; unset($_from); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['knd_ann']): ?>
|
||||
ts_knd_ann = new Array();
|
||||
<?php $_from = $this->_tpl_vars['knd_ann']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
|
||||
foreach ($_from as $this->_tpl_vars['id'] => $this->_tpl_vars['value']):
|
||||
?>
|
||||
ts_knd_ann[<?php echo $this->_tpl_vars['id']; ?>
|
||||
] = '<?php echo $this->_tpl_vars['value']; ?>
|
||||
';
|
||||
<?php endforeach; endif; unset($_from); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['pct_ann']): ?>
|
||||
ts_pct_ann = new Array();
|
||||
<?php $_from = $this->_tpl_vars['pct_ann']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
|
||||
foreach ($_from as $this->_tpl_vars['id'] => $this->_tpl_vars['value']):
|
||||
?>
|
||||
ts_pct_ann[<?php echo $this->_tpl_vars['id']; ?>
|
||||
] = '<?php echo $this->_tpl_vars['value']; ?>
|
||||
';
|
||||
<?php endforeach; endif; unset($_from); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['evt_ann']): ?>
|
||||
ts_evt_ann = new Array();
|
||||
<?php $_from = $this->_tpl_vars['evt_ann']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
|
||||
foreach ($_from as $this->_tpl_vars['id'] => $this->_tpl_vars['value']):
|
||||
?>
|
||||
ts_evt_ann[<?php echo $this->_tpl_vars['id']; ?>
|
||||
] = '<?php echo $this->_tpl_vars['value']; ?>
|
||||
';
|
||||
<?php endforeach; endif; unset($_from); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo '
|
||||
lists_update_annotations(parseInt($(\'#gui div.ki_export\').attr(\'id\').substring(7)),ts_usr_ann,ts_knd_ann,ts_pct_ann,ts_evt_ann);
|
||||
$(\'#display_total\').html(ts_total);
|
||||
'; ?>
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php /* Smarty version 2.6.20, created on 2015-01-23 16:04:42
|
||||
compiled from export_CSV.tpl */ ?>
|
||||
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'export_CSV.tpl', 50, false),)), $this); ?>
|
||||
<?php echo '
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$(\'#help\').hide();
|
||||
$(\'#floater input#timeformat\').attr(\'value\',$(\'#xp_ext_timeformat\').attr(\'value\'));
|
||||
$(\'#floater input#dateformat\').attr(\'value\',$(\'#xp_ext_dateformat\').attr(\'value\'));
|
||||
$(\'#floater input#default_location\').attr(\'value\',$(\'#default_location\').attr(\'value\'));
|
||||
$(\'#floater input#axValue\').attr(\'value\',filterUsr.join(":")+\'|\'+filterKnd.join(":")+\'|\'+filterPct.join(":")+\'|\'+filterEvt.join(":"));
|
||||
$(\'#floater input#filter_cleared\').attr(\'value\',$(\'#xp_ext_tab_filter_cleared\').attr(\'value\'));
|
||||
$(\'#floater input#filter_refundable\').attr(\'value\',$(\'#xp_ext_tab_filter_refundable\').attr(\'value\'));
|
||||
$(\'#floater input#filter_type\').attr(\'value\',$(\'#xp_ext_tab_filter_type\').attr(\'value\'));
|
||||
$(\'#floater input#axColumns\').attr(\'value\',xp_enabled_columns());
|
||||
$(\'.floater_content fieldset label\').css(\'width\',\'200px\');
|
||||
|
||||
$(\'#floater input#first_day\').attr(\'value\',new Date($(\'#pick_in\').val()).getTime()/1000);
|
||||
$(\'#floater input#last_day\').attr(\'value\',new Date($(\'#pick_out\').val()).getTime()/1000);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
'; ?>
|
||||
|
||||
|
||||
|
||||
<div id="floater_innerwrap">
|
||||
|
||||
<div id="floater_handle">
|
||||
<span id="floater_title"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['exportCSV']; ?>
|
||||
</span>
|
||||
<div class="right">
|
||||
<a href="#" class="close" onClick="floaterClose();"><?php echo $this->_tpl_vars['kga']['lang']['close']; ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="help">
|
||||
<div class="content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="floater_content">
|
||||
|
||||
<form id="xp_ext_form_export_CSV" action="../extensions/ki_export/processor.php" method="post">
|
||||
|
||||
<fieldset>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<label for="column_delimiter"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['column_delimiter']; ?>
|
||||
:</label>
|
||||
<input type="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['prefs']['column_delimiter'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
" name="column_delimiter" id="column_delimiter" size="1"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="quote_char"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['quote_char']; ?>
|
||||
:</label>
|
||||
<input type="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['prefs']['quote_char'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
" name="quote_char" id="quote_char" size="1">
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="reverse_order"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['reverse_order']; ?>
|
||||
:</label>
|
||||
<input type="checkbox" value="true" name="reverse_order" id="reverse_order"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['dl_hint']; ?>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <input name="id" type="hidden" value="" /> -->
|
||||
<input name="axAction" type="hidden" value="export_csv" />
|
||||
<input name="axValue" id="axValue" type="hidden" value="" />
|
||||
<input name="first_day" id="first_day" type="hidden" value="" />
|
||||
<input name="last_day" id="last_day" type="hidden" value="" />
|
||||
<input name="axColumns" id="axColumns" type="hidden" value=""/>
|
||||
<input name="timeformat" id="timeformat" type="hidden" value=""/>
|
||||
<input name="dateformat" id="dateformat" type="hidden" value=""/>
|
||||
<input name="default_location" id="default_location" type="hidden" value=""/>
|
||||
<input name="filter_cleared" id="filter_cleared" type="hidden" value=""/>
|
||||
<input name="filter_refundable" id="filter_refundable" type="hidden" value=""/>
|
||||
<input name="filter_type" id="filter_type" type="hidden" value=""/>
|
||||
|
||||
<div id="formbuttons">
|
||||
<input class='btn_norm' type='button' value='<?php echo $this->_tpl_vars['kga']['lang']['cancel']; ?>
|
||||
' onClick='floaterClose(); return false;' />
|
||||
<input class='btn_ok' type='submit' value='<?php echo $this->_tpl_vars['kga']['lang']['submit']; ?>
|
||||
' onClick="floaterClose();"/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php /* Smarty version 2.6.20, created on 2015-07-03 11:43:13
|
||||
compiled from help_timeformat.tpl */ ?>
|
||||
<div id="floater_innerwrap">
|
||||
|
||||
<div id="floater_handle">
|
||||
<span id="floater_title"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['export_timeformat_help']; ?>
|
||||
</span>
|
||||
<div class="right">
|
||||
<a href="#" class="close" onClick="floaterClose();"><?php echo $this->_tpl_vars['kga']['lang']['close']; ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="floater_content">
|
||||
|
||||
<table class="xp_time_help_table">
|
||||
<tr> <td class="xp_time_shortcut">a</td> <td class="xp_time_description">abbreviated weekday name according to the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">A</td> <td class="xp_time_description">full weekday name according to the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">b</td> <td class="xp_time_description">abbreviated month name according to the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">B</td> <td class="xp_time_description">full month name according to the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">c</td> <td class="xp_time_description">preferred date and time representation for the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">C</td> <td class="xp_time_description">century number (the year divided by 100 and truncated to an integer, range 00 to 99)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">d</td> <td class="xp_time_description">day of the month as a decimal number (range 01 to 31)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">D</td> <td class="xp_time_description">same as m/d/y</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">e</td> <td class="xp_time_description">day of the month as a decimal number, a single digit is preceded by a space (range 1 to 31)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">g</td> <td class="xp_time_description">Week-based year within century [00,99]</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">G</td> <td class="xp_time_description">Week-based year, including the century [0000,9999]</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">h</td> <td class="xp_time_description">same as b</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">H</td> <td class="xp_time_description">hour as a decimal number using a 24-hour clock (range 00 to 23)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">I</td> <td class="xp_time_description">hour as a decimal number using a 12-hour clock (range 01 to 12)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">j</td> <td class="xp_time_description">day of the year as a decimal number (range 001 to 366)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">k</td> <td class="xp_time_description">Hour (24-hour clock) single digits are preceded by a blank. (range 0 to 23)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">l</td> <td class="xp_time_description">hour as a decimal number using a 12-hour clock, single digits preceeded by a space (range 1 to 12)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">m</td> <td class="xp_time_description">month as a decimal number (range 01 to 12)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">M</td> <td class="xp_time_description">minute as a decimal number</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">n</td> <td class="xp_time_description">newline character</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">p</td> <td class="xp_time_description"> either `am' or `pm' according to the given time value, or the corresponding strings for the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">r</td> <td class="xp_time_description">time in a.m. and p.m. notation</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">R</td> <td class="xp_time_description">time in 24 hour notation</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">S</td> <td class="xp_time_description">second as a decimal number</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">t</td> <td class="xp_time_description">tab character</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">T</td> <td class="xp_time_description">current time, equal to H:M:S</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">u</td> <td class="xp_time_description">weekday as a decimal number [1,7], with 1 representing Monday</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">U</td> <td class="xp_time_description">week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">V</td> <td class="xp_time_description">The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week
|
||||
1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week.</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">w</td> <td class="xp_time_description">day of the week as a decimal, Sunday being 0</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">W</td> <td class="xp_time_description">week number of the current year as a decimal number, starting with the first Monday
|
||||
as the first day of the first week</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">x</td> <td class="xp_time_description">preferred date representation for the current locale without the time</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">X</td> <td class="xp_time_description">preferred time representation for the current locale without the date</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">y</td> <td class="xp_time_description">year as a decimal number without a century (range 00 to 99)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">Y</td> <td class="xp_time_description">year as a decimal number including the century</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">Z</td> <td class="xp_time_description">time zone or name or abbreviation</td> </tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,100 @@
|
||||
<?php /* Smarty version 2.6.20, created on 2015-01-21 09:31:05
|
||||
compiled from export_XLS.tpl */ ?>
|
||||
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'export_XLS.tpl', 49, false),)), $this); ?>
|
||||
<?php echo '
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$(\'#help\').hide();
|
||||
$(\'#floater input#timeformat\').attr(\'value\',$(\'#xp_ext_timeformat\').attr(\'value\'));
|
||||
$(\'#floater input#dateformat\').attr(\'value\',$(\'#xp_ext_dateformat\').attr(\'value\'));
|
||||
$(\'#floater input#default_location\').attr(\'value\',$(\'#default_location\').attr(\'value\'));
|
||||
$(\'#floater input#axValue\').attr(\'value\',filterUsr.join(":")+\'|\'+filterKnd.join(":")+\'|\'+filterPct.join(":")+\'|\'+filterEvt.join(":"));
|
||||
$(\'#floater input#filter_cleared\').attr(\'value\',$(\'#xp_ext_tab_filter_cleared\').attr(\'value\'));
|
||||
$(\'#floater input#filter_refundable\').attr(\'value\',$(\'#xp_ext_tab_filter_refundable\').attr(\'value\'));
|
||||
$(\'#floater input#filter_type\').attr(\'value\',$(\'#xp_ext_tab_filter_type\').attr(\'value\'));
|
||||
$(\'#floater input#axColumns\').attr(\'value\',xp_enabled_columns());
|
||||
$(\'.floater_content fieldset label\').css(\'width\',\'200px\');
|
||||
|
||||
$(\'#floater input#first_day\').attr(\'value\',new Date($(\'#pick_in\').val()).getTime()/1000);
|
||||
$(\'#floater input#last_day\').attr(\'value\',new Date($(\'#pick_out\').val()).getTime()/1000);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
'; ?>
|
||||
|
||||
|
||||
|
||||
<div id="floater_innerwrap">
|
||||
|
||||
<div id="floater_handle">
|
||||
<span id="floater_title"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['exportXLS']; ?>
|
||||
</span>
|
||||
<div class="right">
|
||||
<a href="#" class="close" onClick="floaterClose();"><?php echo $this->_tpl_vars['kga']['lang']['close']; ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="help">
|
||||
<div class="content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="floater_content">
|
||||
|
||||
<form id="xp_ext_form_export_XLS" action="../extensions/ki_export/processor.php" method="post">
|
||||
<fieldset>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<label for="decimal_separator"><?php echo $this->_tpl_vars['kga']['lang']['decimal_separator']; ?>
|
||||
:</label>
|
||||
<input type="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['decimalSeparator'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
" name="decimal_separator" id="decimal-separator" size="1"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="reverse_order"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['reverse_order']; ?>
|
||||
:</label>
|
||||
<input type="checkbox" value="true" name="reverse_order" id="reverse_order" <?php if ($this->_tpl_vars['prefs']['reverse_order']): ?>checked="checked"<?php endif; ?>/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['dl_hint']; ?>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<input name="axAction" type="hidden" value="export_xls" />
|
||||
<input name="axValue" id="axValue" type="hidden" value="" />
|
||||
<input name="first_day" id="first_day" type="hidden" value="" />
|
||||
<input name="last_day" id="last_day" type="hidden" value="" />
|
||||
<input name="axColumns" id="axColumns" type="hidden" value=""/>
|
||||
<input name="timeformat" id="timeformat" type="hidden" value=""/>
|
||||
<input name="dateformat" id="dateformat" type="hidden" value=""/>
|
||||
<input name="default_location" id="default_location" type="hidden" value=""/>
|
||||
<input name="filter_cleared" id="filter_cleared" type="hidden" value=""/>
|
||||
<input name="filter_refundable" id="filter_refundable" type="hidden" value=""/>
|
||||
<input name="filter_type" id="filter_type" type="hidden" value=""/>
|
||||
|
||||
<div id="formbuttons">
|
||||
<input class='btn_norm' type='button' value='<?php echo $this->_tpl_vars['kga']['lang']['cancel']; ?>
|
||||
' onClick='floaterClose(); return false;' />
|
||||
<input class='btn_ok' type='submit' value='<?php echo $this->_tpl_vars['kga']['lang']['submit']; ?>
|
||||
' onClick="floaterClose();"/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
77
extensions/ki_export/compile/%%72^72D^72DAF6E8%%main.tpl.php
Normal file
77
extensions/ki_export/compile/%%72^72D^72DAF6E8%%main.tpl.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php /* Smarty version 2.6.20, created on 2015-02-13 11:07:39
|
||||
compiled from main.tpl */ ?>
|
||||
<?php echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
xp_ext_onload();
|
||||
});
|
||||
</script>
|
||||
'; ?>
|
||||
|
||||
|
||||
|
||||
<div id="xp_head">
|
||||
<div class="right">
|
||||
<a href="#" onClick="$('#xptable td.cleared>a').click(); return false;">invert</a>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="date" />
|
||||
<col class="from" />
|
||||
<col class="to" />
|
||||
<col class="time" />
|
||||
<col class="dec_time" />
|
||||
<col class="rate" />
|
||||
<col class="wage" />
|
||||
<col class="knd" />
|
||||
<col class="division" />
|
||||
<col class="pct" />
|
||||
<col class="evt" />
|
||||
<col class="comment" />
|
||||
<col class="location" />
|
||||
<col class="trackingnr" />
|
||||
<col class="user" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="date <?php if ($this->_tpl_vars['disabled_columns']['date']): ?>disabled<?php endif; ?>"><a onClick="xp_toggle_column('date');"><?php echo $this->_tpl_vars['kga']['lang']['datum']; ?>
|
||||
</a></td>
|
||||
<td class="from <?php if ($this->_tpl_vars['disabled_columns']['from']): ?>disabled<?php endif; ?>"><a onClick="xp_toggle_column('from');"><?php echo $this->_tpl_vars['kga']['lang']['in']; ?>
|
||||
</a></td>
|
||||
<td class="to <?php if ($this->_tpl_vars['disabled_columns']['to']): ?>disabled<?php endif; ?>"><a onClick="xp_toggle_column('to');"><?php echo $this->_tpl_vars['kga']['lang']['out']; ?>
|
||||
</a></td>
|
||||
<td class="time <?php if ($this->_tpl_vars['disabled_columns']['time']): ?>disabled<?php endif; ?>"><a onClick="xp_toggle_column('time');"><?php echo $this->_tpl_vars['kga']['lang']['time']; ?>
|
||||
</a></td>
|
||||
<td class="dec_time <?php if ($this->_tpl_vars['disabled_columns']['dec_time']): ?>disabled<?php endif; ?>"><a onClick="xp_toggle_column('dec_time');"><?php echo $this->_tpl_vars['kga']['lang']['timelabel']; ?>
|
||||
</a></td>
|
||||
<td class="rate"><a class="rate <?php if ($this->_tpl_vars['disabled_columns']['rate']): ?>disabled<?php endif; ?>" onClick="xp_toggle_column('rate');"><?php echo $this->_tpl_vars['kga']['lang']['rate_short']; ?>
|
||||
</a></td>
|
||||
<td class="wage"><a class="wage <?php if ($this->_tpl_vars['disabled_columns']['wage']): ?>disabled<?php endif; ?>" onClick="xp_toggle_column('wage');"><?php echo $this->_tpl_vars['kga']['lang']['total']; ?>
|
||||
</a></td>
|
||||
<td class="knd <?php if ($this->_tpl_vars['disabled_columns']['knd']): ?>disabled<?php endif; ?>"><a onClick="xp_toggle_column('knd');"><?php echo $this->_tpl_vars['kga']['lang']['knd']; ?>
|
||||
</a></td>
|
||||
<td class="division <?php if ($this->_tpl_vars['disabled_columns']['division']): ?>disabled<?php endif; ?>"><a onClick="xp_toggle_column('division');">Division</a></td>
|
||||
<td class="pct <?php if ($this->_tpl_vars['disabled_columns']['pct']): ?>disabled<?php endif; ?>"><a onClick="xp_toggle_column('pct');"><?php echo $this->_tpl_vars['kga']['lang']['pct']; ?>
|
||||
</a></td>
|
||||
<td class="evt <?php if ($this->_tpl_vars['disabled_columns']['evt']): ?>disabled<?php endif; ?>"><a onClick="xp_toggle_column('evt');"><?php echo $this->_tpl_vars['kga']['lang']['evt']; ?>
|
||||
</a></td>
|
||||
|
||||
<td class="moreinfo" colspan="3">
|
||||
<a class="comment <?php if ($this->_tpl_vars['disabled_columns']['comment']): ?>disabled<?php endif; ?>" onClick="xp_toggle_column('comment');"><?php echo $this->_tpl_vars['kga']['lang']['comment']; ?>
|
||||
</a>,
|
||||
<a class="location <?php if ($this->_tpl_vars['disabled_columns']['location']): ?>disabled<?php endif; ?>" onClick="xp_toggle_column('location');"><?php echo $this->_tpl_vars['kga']['lang']['zlocation']; ?>
|
||||
</a>,
|
||||
<a class="trackingnr <?php if ($this->_tpl_vars['disabled_columns']['trackingnr']): ?>disabled<?php endif; ?>" onClick="xp_toggle_column('trackingnr');"><?php echo $this->_tpl_vars['kga']['lang']['trackingnr']; ?>
|
||||
</a>
|
||||
</td>
|
||||
|
||||
<td class="user <?php if ($this->_tpl_vars['disabled_columns']['user']): ?>disabled<?php endif; ?>"><a onClick="xp_toggle_column('user');"><?php echo $this->_tpl_vars['kga']['lang']['username']; ?>
|
||||
</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="xp"><?php echo $this->_tpl_vars['table_display']; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php /* Smarty version 2.6.20, created on 2015-01-21 09:08:58
|
||||
compiled from print.tpl */ ?>
|
||||
<?php echo '
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$(\'#help\').hide();
|
||||
$(\'#floater input#timeformat\').attr(\'value\',$(\'#xp_ext_timeformat\').attr(\'value\'));
|
||||
$(\'#floater input#dateformat\').attr(\'value\',$(\'#xp_ext_dateformat\').attr(\'value\'));
|
||||
$(\'#floater input#default_location\').attr(\'value\',$(\'#default_location\').attr(\'value\'));
|
||||
$(\'#floater input#axValue\').attr(\'value\',filterUsr.join(":")+\'|\'+filterKnd.join(":")+\'|\'+filterPct.join(":")+\'|\'+filterEvt.join(":"));
|
||||
$(\'#floater input#filter_cleared\').attr(\'value\',$(\'#xp_ext_tab_filter_cleared\').attr(\'value\'));
|
||||
$(\'#floater input#filter_refundable\').attr(\'value\',$(\'#xp_ext_tab_filter_refundable\').attr(\'value\'));
|
||||
$(\'#floater input#filter_type\').attr(\'value\',$(\'#xp_ext_tab_filter_type\').attr(\'value\'));
|
||||
$(\'#floater input#axColumns\').attr(\'value\',xp_enabled_columns());
|
||||
$(\'.floater_content fieldset label\').css(\'width\',\'200px\');
|
||||
|
||||
$(\'#floater input#first_day\').attr(\'value\',new Date($(\'#pick_in\').val()).getTime()/1000);
|
||||
$(\'#floater input#last_day\').attr(\'value\',new Date($(\'#pick_out\').val()).getTime()/1000);
|
||||
});
|
||||
|
||||
</script>
|
||||
'; ?>
|
||||
|
||||
|
||||
<div id="floater_innerwrap">
|
||||
|
||||
<div id="floater_handle">
|
||||
<span id="floater_title"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['print']; ?>
|
||||
</span>
|
||||
<div class="right">
|
||||
<a href="#" class="close" onClick="floaterClose();"><?php echo $this->_tpl_vars['kga']['lang']['close']; ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="help">
|
||||
<div class="content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="floater_content">
|
||||
|
||||
|
||||
<form id="xp_ext_form_print" action="../extensions/ki_export/processor.php" method="post" target="_blank">
|
||||
<fieldset>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['print_hint']; ?>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="print_summary"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['print_summary']; ?>
|
||||
:</label>
|
||||
<input type="checkbox" value="true" name="print_summary" id="print_summary" <?php if ($this->_tpl_vars['prefs']['print_summary']): ?>checked="checked"<?php endif; ?>>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="reverse_order"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['reverse_order']; ?>
|
||||
:</label>
|
||||
<input type="checkbox" value="true" name="reverse_order" id="reverse_order" <?php if ($this->_tpl_vars['prefs']['reverse_order']): ?>checked="checked"<?php endif; ?>/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<input name="axAction" type="hidden" value="export_html" />
|
||||
<input name="axValue" id="axValue" type="hidden" value="" />
|
||||
<input name="first_day" id="first_day" type="hidden" value="" />
|
||||
<input name="last_day" id="last_day" type="hidden" value="" />
|
||||
<input name="axColumns" id="axColumns" type="hidden" value=""/>
|
||||
<input name="timeformat" id="timeformat" type="hidden" value=""/>
|
||||
<input name="dateformat" id="dateformat" type="hidden" value=""/>
|
||||
<input name="default_location" id="default_location" type="hidden" value=""/>
|
||||
<input name="filter_cleared" id="filter_cleared" type="hidden" value=""/>
|
||||
<input name="filter_refundable" id="filter_refundable" type="hidden" value=""/>
|
||||
<input name="filter_type" id="filter_type" type="hidden" value=""/>
|
||||
|
||||
<div id="formbuttons">
|
||||
<input class='btn_norm' type='button' value='<?php echo $this->_tpl_vars['kga']['lang']['cancel']; ?>
|
||||
' onClick='floaterClose(); return false;' />
|
||||
<input class='btn_ok' type='submit' value='<?php echo $this->_tpl_vars['kga']['lang']['submit']; ?>
|
||||
' onClick="floaterClose();"/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
103
extensions/ki_export/compile/%%AD^ADB^ADB70847%%panel.tpl.php
Normal file
103
extensions/ki_export/compile/%%AD^ADB^ADB70847%%panel.tpl.php
Normal file
@@ -0,0 +1,103 @@
|
||||
<?php /* Smarty version 2.6.20, created on 2015-01-20 09:05:24
|
||||
compiled from panel.tpl */ ?>
|
||||
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'panel.tpl', 34, false),)), $this); ?>
|
||||
<?php echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
xp_ext_onload();
|
||||
});
|
||||
</script>
|
||||
'; ?>
|
||||
|
||||
<div id="xp_panel">
|
||||
<div class="w">
|
||||
<div class="c">
|
||||
<div class="w">
|
||||
<div class="c">
|
||||
|
||||
<div id="xp_ext_tab_filter">
|
||||
<select id="xp_ext_tab_filter_cleared" name="cleared" onChange="xp_ext_reload()">
|
||||
<option value="-1" <?php if (! $this->_tpl_vars['kga']['conf']['hideClearedEntries']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['cleared_all']; ?>
|
||||
</option>
|
||||
<option value="1"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['cleared_cleared']; ?>
|
||||
</option>
|
||||
<option value="0" <?php if ($this->_tpl_vars['kga']['conf']['hideClearedEntries']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['cleared_open']; ?>
|
||||
</option>
|
||||
</select>
|
||||
<select id="xp_ext_tab_filter_refundable" name="refundable" onChange="xp_ext_reload()">
|
||||
<option value="-1" selected="selected"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['refundable_all']; ?>
|
||||
</option>
|
||||
<option value="0"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['refundable_refundable']; ?>
|
||||
</option>
|
||||
<option value="1"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['refundable_not_refundable']; ?>
|
||||
</option>
|
||||
</select>
|
||||
<select id="xp_ext_tab_filter_type" name="type" onChange="xp_ext_reload()">
|
||||
<option value="-1" selected="selected"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['times_and_expenses']; ?>
|
||||
</option>
|
||||
<option value="0"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['times']; ?>
|
||||
</option>
|
||||
<option value="1"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['expenses']; ?>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="xp_ext_tab_timeformat">
|
||||
<span><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['timeformat']; ?>
|
||||
:<a href="#" class="helpfloater"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['export_timeformat_help']; ?>
|
||||
</a></span>
|
||||
<input type="text" name="time_format" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['timeformat'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
" id="xp_ext_timeformat" onChange="xp_ext_reload()">
|
||||
<span><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['dateformat']; ?>
|
||||
:<a href="#" class="helpfloater"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['export_timeformat_help']; ?>
|
||||
</a></span>
|
||||
<input type="text" name="date_format" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['dateformat'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
" id="xp_ext_dateformat" onChange="xp_ext_reload()">
|
||||
</div>
|
||||
|
||||
<div id="xp_ext_tab_location">
|
||||
<span><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['stdrd_location']; ?>
|
||||
</span>
|
||||
<input type="text" name="std_loc" value="" id="xp_ext_default_location" onChange="xp_ext_reload()">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="l"> </div><div class="r"> </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="l">
|
||||
<div class="w">
|
||||
<div class="c">
|
||||
<a id="xp_ext_select_filter" href="#" class="select_btn"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['filter']; ?>
|
||||
</a>
|
||||
<a id="xp_ext_select_location" href="#" class="select_btn"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['location']; ?>
|
||||
</a>
|
||||
<a id="xp_ext_select_timeformat" href="#" class="select_btn"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['timeformat']; ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="l"> </div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<div class="w">
|
||||
<div class="c">
|
||||
<a id="xp_ext_export_pdf" href="#" class="output_btn"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['exportPDF']; ?>
|
||||
</a>
|
||||
<a id="xp_ext_export_xls" href="#" class="output_btn"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['exportXLS']; ?>
|
||||
</a>
|
||||
<a id="xp_ext_export_csv" href="#" class="output_btn"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['exportCSV']; ?>
|
||||
</a>
|
||||
<a id="xp_ext_print" href="#" class="output_btn"><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['print']; ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="l"> </div><div class="r"> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
279
extensions/ki_export/compile/%%BD^BD1^BD1DEAA1%%excel.tpl.php
Normal file
279
extensions/ki_export/compile/%%BD^BD1^BD1DEAA1%%excel.tpl.php
Normal file
@@ -0,0 +1,279 @@
|
||||
<?php /* Smarty version 2.6.20, created on 2015-02-16 08:20:42
|
||||
compiled from formats/excel.tpl */ ?>
|
||||
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'formats/excel.tpl', 76, false),array('modifier', 'escape', 'formats/excel.tpl', 76, false),array('modifier', 'replace', 'formats/excel.tpl', 191, false),)), $this); ?>
|
||||
<html xmlns:o="urn:schemas-microsoft-com:office:office"
|
||||
xmlns:x="urn:schemas-microsoft-com:office:excel"
|
||||
xmlns="http://www.w3.org/TR/REC-html40">
|
||||
|
||||
<head>
|
||||
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
|
||||
<style>
|
||||
<?php echo '
|
||||
.date {
|
||||
mso-number-format:"Short Date";
|
||||
}
|
||||
.time {
|
||||
mso-number-format:"h\\:mm\\:ss\\;\\@";
|
||||
}
|
||||
.duration {
|
||||
mso-number-format:"h\\:mm\\;\\@";
|
||||
}
|
||||
.decimal {
|
||||
mso-number-format:Fixed;
|
||||
}
|
||||
'; ?>
|
||||
|
||||
</style>
|
||||
<!--[if gte mso 9]><xml>
|
||||
<x:ExcelWorkbook>
|
||||
<x:ExcelWorksheets>
|
||||
<x:ExcelWorksheet>
|
||||
<x:Name>Tabelle1</x:Name>
|
||||
<x:WorksheetOptions>
|
||||
<x:DefaultColWidth>10</x:DefaultColWidth>
|
||||
<x:Selected/>
|
||||
<x:Panes>
|
||||
<x:Pane>
|
||||
<x:Number>3</x:Number>
|
||||
<x:ActiveRow>4</x:ActiveRow>
|
||||
<x:ActiveCol>3</x:ActiveCol>
|
||||
</x:Pane>
|
||||
</x:Panes>
|
||||
<x:ProtectContents>False</x:ProtectContents>
|
||||
<x:ProtectObjects>False</x:ProtectObjects>
|
||||
<x:ProtectScenarios>False</x:ProtectScenarios>
|
||||
</x:WorksheetOptions>
|
||||
</x:ExcelWorksheet>
|
||||
</x:ExcelWorksheets>
|
||||
</x:ExcelWorkbook>
|
||||
</xml><![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table>
|
||||
<thead><tr>
|
||||
<?php if ($this->_tpl_vars['columns']['date']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['datum']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['from']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['in']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['to']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['out']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['time']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['time']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['dec_time']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['timelabel']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['rate']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['rate']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['wage']): ?> <td><?php echo $this->_tpl_vars['kga']['currency_name']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['knd']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['knd']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['division']): ?> <td>Division</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['pct']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['pct']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['action']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['evt']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['comment']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['comment']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['location']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['zlocation']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['trackingnr']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['trackingnr']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['user']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['username']; ?>
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['cleared']): ?> <td><?php echo $this->_tpl_vars['kga']['lang']['cleared']; ?>
|
||||
</td> <?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php unset($this->_sections['row']);
|
||||
$this->_sections['row']['name'] = 'row';
|
||||
$this->_sections['row']['loop'] = is_array($_loop=$this->_tpl_vars['arr_data']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||
$this->_sections['row']['show'] = true;
|
||||
$this->_sections['row']['max'] = $this->_sections['row']['loop'];
|
||||
$this->_sections['row']['step'] = 1;
|
||||
$this->_sections['row']['start'] = $this->_sections['row']['step'] > 0 ? 0 : $this->_sections['row']['loop']-1;
|
||||
if ($this->_sections['row']['show']) {
|
||||
$this->_sections['row']['total'] = $this->_sections['row']['loop'];
|
||||
if ($this->_sections['row']['total'] == 0)
|
||||
$this->_sections['row']['show'] = false;
|
||||
} else
|
||||
$this->_sections['row']['total'] = 0;
|
||||
if ($this->_sections['row']['show']):
|
||||
|
||||
for ($this->_sections['row']['index'] = $this->_sections['row']['start'], $this->_sections['row']['iteration'] = 1;
|
||||
$this->_sections['row']['iteration'] <= $this->_sections['row']['total'];
|
||||
$this->_sections['row']['index'] += $this->_sections['row']['step'], $this->_sections['row']['iteration']++):
|
||||
$this->_sections['row']['rownum'] = $this->_sections['row']['iteration'];
|
||||
$this->_sections['row']['index_prev'] = $this->_sections['row']['index'] - $this->_sections['row']['step'];
|
||||
$this->_sections['row']['index_next'] = $this->_sections['row']['index'] + $this->_sections['row']['step'];
|
||||
$this->_sections['row']['first'] = ($this->_sections['row']['iteration'] == 1);
|
||||
$this->_sections['row']['last'] = ($this->_sections['row']['iteration'] == $this->_sections['row']['total']);
|
||||
?>
|
||||
<tr>
|
||||
<?php if ($this->_tpl_vars['columns']['date']): ?>
|
||||
<td class=date>
|
||||
<?php if ($this->_tpl_vars['custom_dateformat']): ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['custom_dateformat']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['custom_dateformat'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['kga']['date_format']['1']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['kga']['date_format']['1'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['from']): ?>
|
||||
<td align=right class=time>
|
||||
<?php if ($this->_tpl_vars['custom_timeformat']): ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['custom_timeformat']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['custom_timeformat'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%H:%M") : smarty_modifier_date_format($_tmp, "%H:%M")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['to']): ?>
|
||||
<td align=right class=time>
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out']): ?>
|
||||
<?php if ($this->_tpl_vars['custom_timeformat']): ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'])) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['custom_timeformat']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['custom_timeformat'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%H:%M") : smarty_modifier_date_format($_tmp, "%H:%M")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
––:––
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['time']): ?>
|
||||
<td align=right class=duration>
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['zef_time']): ?>
|
||||
|
||||
<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['zef_duration']; ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
–:––
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['dec_time']): ?>
|
||||
<td align=right class=decimal>
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['dec_zef_time']): ?>
|
||||
<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['dec_zef_time']; ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
–:––
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['rate']): ?>
|
||||
<td align=right class=decimal>
|
||||
|
||||
<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['zef_rate']; ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['wage']): ?>
|
||||
<td align=right class=decimal>
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['wage']): ?>
|
||||
|
||||
<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['wage']; ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
–
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['knd']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['knd_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['division']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['division'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['pct']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['pct_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['action']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['evt_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['comment']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['comment'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')))) ? $this->_run_mod_handler('replace', true, $_tmp, "\n", " ") : smarty_modifier_replace($_tmp, "\n", " ")); ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['location']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['location'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['trackingnr']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['trackingnr'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['user']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['username'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['cleared']): ?>
|
||||
<td>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['cleared']): ?>cleared<?php else: ?><?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
<?php endfor; endif; ?>
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
492
extensions/ki_export/compile/%%E4^E49^E4961385%%html.tpl.php
Normal file
492
extensions/ki_export/compile/%%E4^E49^E4961385%%html.tpl.php
Normal file
@@ -0,0 +1,492 @@
|
||||
<?php /* Smarty version 2.6.20, created on 2015-02-13 13:26:10
|
||||
compiled from formats/html.tpl */ ?>
|
||||
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'formats/html.tpl', 123, false),array('modifier', 'number_format', 'formats/html.tpl', 168, false),array('modifier', 'date_format', 'formats/html.tpl', 214, false),array('modifier', 'replace', 'formats/html.tpl', 267, false),array('modifier', 'nl2br', 'formats/html.tpl', 331, false),array('modifier', 'count', 'formats/html.tpl', 373, false),)), $this); ?>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta content="">
|
||||
|
||||
<?php echo '
|
||||
<style type="text/css" media="all">
|
||||
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin-bottom:30px;
|
||||
}
|
||||
fieldset, img { border: 0; }
|
||||
address, caption, cite, code, dfn, em, strong, th, var {
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
ol, ul { list-style: none; }
|
||||
caption, th { text-align: left; }
|
||||
h2 {
|
||||
margin-bottom:10px;
|
||||
}
|
||||
q:before { content: \'\'; }
|
||||
q:after { content: \'\'; }
|
||||
abbr, acronym { border: 0; }
|
||||
th {
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
th {
|
||||
border-right: 1px solid #999999;
|
||||
padding: 5px;
|
||||
}
|
||||
th:first-child { border-left: 1px solid #999999; }
|
||||
td {
|
||||
border-right: 1px solid #999999;
|
||||
padding: 5px;
|
||||
}
|
||||
td:first-child { border-left: 1px solid #999999; }
|
||||
h1 {
|
||||
font-size: 150%;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style type="text/css" media="print">
|
||||
|
||||
body {
|
||||
color: black;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
th {
|
||||
background: #ccc;
|
||||
border-top: 1px solid #999;
|
||||
border-bottom: 1px solid #999;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
td {
|
||||
border-bottom: 1px solid #999;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#div_selectform {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#div_liste {
|
||||
|
||||
}
|
||||
|
||||
#invertbtn, .invertclm {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
body {
|
||||
color: black;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
th {
|
||||
background: #ccc;
|
||||
border-top: 1px solid #999;
|
||||
border-bottom: 1px solid #999;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
td {
|
||||
border-bottom: 1px solid #999;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#div_liste {
|
||||
margin-top:10px;
|
||||
float: left;
|
||||
width: 600px;
|
||||
}
|
||||
</style>
|
||||
|
||||
'; ?>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2> <?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['time_period']; ?>
|
||||
: <?php echo ((is_array($_tmp=$this->_tpl_vars['timespan'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
</h2>
|
||||
|
||||
<?php if ($this->_tpl_vars['customersFilter'] != ""): ?>
|
||||
<br/><b><?php echo $this->_tpl_vars['kga']['lang']['knds']; ?>
|
||||
</b>: <?php echo ((is_array($_tmp=$this->_tpl_vars['customersFilter'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['projectsFilter'] != ""): ?>
|
||||
<br/><b><?php echo $this->_tpl_vars['kga']['lang']['pcts']; ?>
|
||||
</b>: <?php echo ((is_array($_tmp=$this->_tpl_vars['projectsFilter'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<br/>
|
||||
|
||||
<?php if ($this->_tpl_vars['summary'] != 0): ?>
|
||||
<h2><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['summary']; ?>
|
||||
</h2>
|
||||
|
||||
|
||||
<table border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $this->_tpl_vars['kga']['lang']['evt']; ?>
|
||||
</th>
|
||||
<?php if ($this->_tpl_vars['columns']['dec_time']): ?>
|
||||
<th><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['duration']; ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['wage']): ?>
|
||||
<th><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['costs']; ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
|
||||
<?php unset($this->_sections['row']);
|
||||
$this->_sections['row']['name'] = 'row';
|
||||
$this->_sections['row']['loop'] = is_array($_loop=$this->_tpl_vars['summary']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||
$this->_sections['row']['show'] = true;
|
||||
$this->_sections['row']['max'] = $this->_sections['row']['loop'];
|
||||
$this->_sections['row']['step'] = 1;
|
||||
$this->_sections['row']['start'] = $this->_sections['row']['step'] > 0 ? 0 : $this->_sections['row']['loop']-1;
|
||||
if ($this->_sections['row']['show']) {
|
||||
$this->_sections['row']['total'] = $this->_sections['row']['loop'];
|
||||
if ($this->_sections['row']['total'] == 0)
|
||||
$this->_sections['row']['show'] = false;
|
||||
} else
|
||||
$this->_sections['row']['total'] = 0;
|
||||
if ($this->_sections['row']['show']):
|
||||
|
||||
for ($this->_sections['row']['index'] = $this->_sections['row']['start'], $this->_sections['row']['iteration'] = 1;
|
||||
$this->_sections['row']['iteration'] <= $this->_sections['row']['total'];
|
||||
$this->_sections['row']['index'] += $this->_sections['row']['step'], $this->_sections['row']['iteration']++):
|
||||
$this->_sections['row']['rownum'] = $this->_sections['row']['iteration'];
|
||||
$this->_sections['row']['index_prev'] = $this->_sections['row']['index'] - $this->_sections['row']['step'];
|
||||
$this->_sections['row']['index_next'] = $this->_sections['row']['index'] + $this->_sections['row']['step'];
|
||||
$this->_sections['row']['first'] = ($this->_sections['row']['iteration'] == 1);
|
||||
$this->_sections['row']['last'] = ($this->_sections['row']['iteration'] == $this->_sections['row']['total']);
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo ((is_array($_tmp=$this->_tpl_vars['summary'][$this->_sections['row']['index']]['name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
</td>
|
||||
<?php if ($this->_tpl_vars['columns']['dec_time']): ?>
|
||||
<td><?php if ($this->_tpl_vars['summary'][$this->_sections['row']['index']]['time'] != -1): ?>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['summary'][$this->_sections['row']['index']]['time'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php endif; ?></td>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['wage']): ?>
|
||||
<td><?php echo ((is_array($_tmp=$this->_tpl_vars['summary'][$this->_sections['row']['index']]['wage'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endfor; endif; ?>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<i><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['finalamount']; ?>
|
||||
</i>
|
||||
</td>
|
||||
<?php if ($this->_tpl_vars['columns']['dec_time']): ?>
|
||||
<td><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['timeSum'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2, $this->_tpl_vars['kga']['conf']['decimalSeparator'], "") : number_format($_tmp, 2, $this->_tpl_vars['kga']['conf']['decimalSeparator'], "")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['wage']): ?>
|
||||
<td><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['wageSum'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2, $this->_tpl_vars['kga']['conf']['decimalSeparator'], "") : number_format($_tmp, 2, $this->_tpl_vars['kga']['conf']['decimalSeparator'], "")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['full_list']; ?>
|
||||
</h2>
|
||||
|
||||
<table border="1">
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<?php if ($this->_tpl_vars['columns']['date']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['datum']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['from']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['in']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['to']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['out']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['time']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['time']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['dec_time']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['timelabel']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['rate']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['rate']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['wage']): ?> <th><?php echo $this->_tpl_vars['kga']['currency_name']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['knd']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['knd']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['division']): ?> <th>Division</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['pct']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['pct']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['action']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['evt']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['comment']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['comment']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['location']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['zlocation']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['trackingnr']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['trackingnr']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['user']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['username']; ?>
|
||||
</th> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['cleared']): ?> <th><?php echo $this->_tpl_vars['kga']['lang']['cleared']; ?>
|
||||
</th> <?php endif; ?>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php unset($this->_sections['row']);
|
||||
$this->_sections['row']['name'] = 'row';
|
||||
$this->_sections['row']['loop'] = is_array($_loop=$this->_tpl_vars['arr_data']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||
$this->_sections['row']['show'] = true;
|
||||
$this->_sections['row']['max'] = $this->_sections['row']['loop'];
|
||||
$this->_sections['row']['step'] = 1;
|
||||
$this->_sections['row']['start'] = $this->_sections['row']['step'] > 0 ? 0 : $this->_sections['row']['loop']-1;
|
||||
if ($this->_sections['row']['show']) {
|
||||
$this->_sections['row']['total'] = $this->_sections['row']['loop'];
|
||||
if ($this->_sections['row']['total'] == 0)
|
||||
$this->_sections['row']['show'] = false;
|
||||
} else
|
||||
$this->_sections['row']['total'] = 0;
|
||||
if ($this->_sections['row']['show']):
|
||||
|
||||
for ($this->_sections['row']['index'] = $this->_sections['row']['start'], $this->_sections['row']['iteration'] = 1;
|
||||
$this->_sections['row']['iteration'] <= $this->_sections['row']['total'];
|
||||
$this->_sections['row']['index'] += $this->_sections['row']['step'], $this->_sections['row']['iteration']++):
|
||||
$this->_sections['row']['rownum'] = $this->_sections['row']['iteration'];
|
||||
$this->_sections['row']['index_prev'] = $this->_sections['row']['index'] - $this->_sections['row']['step'];
|
||||
$this->_sections['row']['index_next'] = $this->_sections['row']['index'] + $this->_sections['row']['step'];
|
||||
$this->_sections['row']['first'] = ($this->_sections['row']['iteration'] == 1);
|
||||
$this->_sections['row']['last'] = ($this->_sections['row']['iteration'] == $this->_sections['row']['total']);
|
||||
?>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['date']): ?>
|
||||
<td>
|
||||
<?php if ($this->_tpl_vars['custom_dateformat']): ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['custom_dateformat']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['custom_dateformat'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['kga']['date_format']['1']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['kga']['date_format']['1'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['from']): ?>
|
||||
<td>
|
||||
<?php if ($this->_tpl_vars['custom_timeformat']): ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['custom_timeformat']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['custom_timeformat'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_in'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%H:%M") : smarty_modifier_date_format($_tmp, "%H:%M")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['to']): ?>
|
||||
<td>
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out']): ?>
|
||||
<?php if ($this->_tpl_vars['custom_timeformat']): ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'])) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['custom_timeformat']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['custom_timeformat'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['time_out'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%H:%M") : smarty_modifier_date_format($_tmp, "%H:%M")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
––:––
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['time']): ?>
|
||||
<td>
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['zef_time']): ?>
|
||||
|
||||
<?php echo $this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['zef_duration']; ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
–:––
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['dec_time']): ?>
|
||||
<td>
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['dec_zef_time']): ?>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['dec_zef_time'])) ? $this->_run_mod_handler('replace', true, $_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator']) : smarty_modifier_replace($_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
–:––
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['rate']): ?>
|
||||
<td>
|
||||
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['zef_rate'])) ? $this->_run_mod_handler('replace', true, $_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator']) : smarty_modifier_replace($_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['wage']): ?>
|
||||
<td>
|
||||
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['wage']): ?>
|
||||
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['wage'])) ? $this->_run_mod_handler('replace', true, $_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator']) : smarty_modifier_replace($_tmp, '.', $this->_tpl_vars['kga']['conf']['decimalSeparator'])))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
–
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['knd']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['knd_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['division']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['division'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['pct']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['pct_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['action']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['evt_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['comment']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['comment'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')))) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['location']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['location'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['trackingnr']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['trackingnr'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['user']): ?>
|
||||
<td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['username'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['columns']['cleared']): ?>
|
||||
<td>
|
||||
<?php if ($this->_tpl_vars['arr_data'][$this->_sections['row']['index']]['cleared']): ?><?php echo $this->_tpl_vars['kga']['lang']['cleared']; ?>
|
||||
<?php else: ?><?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
<?php endfor; endif; ?>
|
||||
|
||||
<?php if ($this->_tpl_vars['timeSum'] > 0 || $this->_tpl_vars['wageSum'] > 0): ?>
|
||||
<tr>
|
||||
<td colspan="<?php echo count($this->_tpl_vars['columns']); ?>
|
||||
">
|
||||
<?php echo $this->_tpl_vars['kga']['lang']['xp_ext']['finalamount']; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php if ($this->_tpl_vars['columns']['date']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['from']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['to']): ?><td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['time']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['dec_time']): ?> <td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['timeSum'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['rate']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['wage']): ?> <td>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['wageSum'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
|
||||
</td><?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['knd']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['division']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['pct']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['action']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['comment']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['location']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['trackingnr']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['user']): ?> <td></td> <?php endif; ?>
|
||||
<?php if ($this->_tpl_vars['columns']['cleared']): ?> <td></td> <?php endif; ?>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
22
extensions/ki_export/config.ini
Normal file
22
extensions/ki_export/config.ini
Normal file
@@ -0,0 +1,22 @@
|
||||
EXTENSION_NAME = "Export"
|
||||
EXTENSION_KEY = "ki_export"
|
||||
EXTENSION_INIT_FILE = "ki_export/init.php"
|
||||
EXTENSION_DIR = "ki_export"
|
||||
|
||||
ADMIN_ALLOWED = "1"
|
||||
GROUP_LEADER_ALLOWED = "1"
|
||||
USER_ALLOWED = "1"
|
||||
CUSTOMER_ALLOWED = "1"
|
||||
|
||||
JS_INCLUDE_FILES[] = "../extensions/ki_export/js/xp_func.js"
|
||||
JS_INCLUDE_FILES[] = "../extensions/ki_export/js/xp_init.js"
|
||||
CSS_INCLUDE_FILES = "../extensions/ki_export/css/styles.css"
|
||||
|
||||
TAB_CHANGE_TRIGGER = "xp_ext_triggerchange();"
|
||||
TIMESPACE_CHANGE_TRIGGER = "xp_ext_triggerTSS();"
|
||||
|
||||
CHANGE_KND_TRIGGER = "xp_ext_triggerCHK();"
|
||||
CHANGE_PCT_TRIGGER = "xp_ext_triggerCHP();"
|
||||
CHANGE_EVT_TRIGGER = "xp_ext_triggerCHE();"
|
||||
LIST_FILTER_TRIGGER = "xp_ext_reload();"
|
||||
RESIZE_TRIGGER = "xp_ext_resize();"
|
||||
70
extensions/ki_export/css/optiontabs.css
Normal file
70
extensions/ki_export/css/optiontabs.css
Normal file
@@ -0,0 +1,70 @@
|
||||
#xp_ext_tab_filter {
|
||||
padding: 10px 0 0 0;
|
||||
font-size: 20px;
|
||||
color: #3a3b34;
|
||||
display: none;
|
||||
}
|
||||
#xp_ext_tab_filter input[type=text] {
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
float: left;
|
||||
width: 100px;
|
||||
border: none;
|
||||
height: 25px;
|
||||
margin-top: 1px;
|
||||
margin-left: 5px;
|
||||
padding-left: 3px;
|
||||
background-color: #ddddcd;
|
||||
}
|
||||
#xp_ext_tab_filter span {
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
#xp_ext_tab_location {
|
||||
padding: 10px 0 0 0;
|
||||
font-size: 20px;
|
||||
color: #3a3b34;
|
||||
display: none;
|
||||
}
|
||||
#xp_ext_tab_location input[type=text] {
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
float: left;
|
||||
width: 150px;
|
||||
border: none;
|
||||
height: 25px;
|
||||
margin-top: 1px;
|
||||
margin-left: 5px;
|
||||
padding-left: 3px;
|
||||
background-color: #ddddcd;
|
||||
}
|
||||
#xp_ext_tab_location span {
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
#xp_ext_tab_timeformat {
|
||||
padding: 10px 0 0 0;
|
||||
font-size: 20px;
|
||||
color: #3a3b34;
|
||||
display: none;
|
||||
}
|
||||
#xp_ext_tab_timeformat input[type=text] {
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
float: left;
|
||||
width: 100px;
|
||||
border: none;
|
||||
height: 25px;
|
||||
margin-top: 1px;
|
||||
margin-left: 5px;
|
||||
padding-left: 3px;
|
||||
background-color: #ddddcd;
|
||||
}
|
||||
#xp_ext_tab_timeformat span {
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
#xp_ext_tab_timeformat { display: block; }
|
||||
103
extensions/ki_export/css/panel.css
Normal file
103
extensions/ki_export/css/panel.css
Normal file
@@ -0,0 +1,103 @@
|
||||
#xp_panel { padding: 10px 10px 10px 10px; }
|
||||
#xp_panel .r .l,#xp_panel .l .l,
|
||||
#xp_panel .l .w .c,
|
||||
#xp_panel .r .w .c,
|
||||
#xp_panel .w .c .w .c,
|
||||
#xp_panel .w .c .l,
|
||||
#xp_panel .w .c .r,
|
||||
#xp_panel .r .r
|
||||
{background: url('../grfx/stats_panel.png');}
|
||||
|
||||
#xp_panel .l,#xp_panel .r,#xp_panel .w { float: left; }
|
||||
#xp_panel .l,#xp_panel .r,#xp_panel .c { height: 49px; }
|
||||
#xp_panel .l .l,#xp_panel .r .l,#xp_panel .r .r {width: 4px;}
|
||||
#xp_panel .l .w .c,#xp_panel .r .w .c {background-position: 0 98px;}
|
||||
|
||||
#xp_panel .l { margin-left: -100%; width: 133px;}
|
||||
#xp_panel .r { width: 183px; margin-left: -183px;}
|
||||
#xp_panel .r .r { background-position: -27px 0; margin-left: -4px;}
|
||||
#xp_panel .w { width: 100%; }
|
||||
#xp_panel .w .c { margin: 0 183px 0 133px; }
|
||||
#xp_panel .w .c .w .c { margin: 0 8px 0 15px; background-position: 0 49px;}
|
||||
#xp_panel .w .c .l { background-position: -4px 0; width: 15px;}
|
||||
#xp_panel .w .c .r { background-position: -19px 0; width: 8px; margin-left: -10px;}
|
||||
#xp_panel .l .w .c { margin: 0 0 0 1px;}
|
||||
#xp_panel .r .w .c { margin: 0 4px 0 2px;}
|
||||
|
||||
#xp_panel .select_btn,#xp_panel .output_btn {
|
||||
position:relative;
|
||||
text-indent:-999em;
|
||||
display:block;
|
||||
width:41px;
|
||||
height:42px;
|
||||
background: url('../grfx/select.png');
|
||||
}
|
||||
|
||||
#xp_panel a.helpfloater {
|
||||
display:block;
|
||||
float:left;
|
||||
height:13px;
|
||||
width:13px;
|
||||
text-indent:-999em;
|
||||
background: url('../grfx/help.png');
|
||||
}
|
||||
|
||||
#xp_panel #xp_ext_select_filter { top:3px; }
|
||||
#xp_panel #xp_ext_select_filter:hover { background-position: 0 -42px; }
|
||||
#xp_panel #xp_ext_select_filter:active { background-position: 0 -84px; }
|
||||
#xp_panel #xp_ext_select_filter.pressed { background-position: 0 -84px; }
|
||||
|
||||
#xp_panel #xp_ext_select_location
|
||||
{
|
||||
left:44px; top:-39px;
|
||||
background-position: 204px 0;
|
||||
}
|
||||
#xp_panel #xp_ext_select_location:hover { background-position: 204px -42px; }
|
||||
#xp_panel #xp_ext_select_location:active { background-position: 204px -84px; }
|
||||
#xp_panel #xp_ext_select_location.pressed { background-position: 204px -84px; }
|
||||
|
||||
#xp_panel #xp_ext_select_timeformat
|
||||
{
|
||||
left:88px; top:-81px;
|
||||
background-position: 163px 0;
|
||||
}
|
||||
#xp_panel #xp_ext_select_timeformat:hover { background-position: 163px -42px; }
|
||||
#xp_panel #xp_ext_select_timeformat:active { background-position: 163px -84px; }
|
||||
#xp_panel #xp_ext_select_timeformat.pressed { background-position: 163px -84px; }
|
||||
|
||||
#xp_panel #xp_ext_export_pdf
|
||||
{
|
||||
top:3px;
|
||||
background-position: 122px 0;
|
||||
}
|
||||
#xp_panel #xp_ext_export_pdf:hover { background-position: 122px -42px; }
|
||||
#xp_panel #xp_ext_export_pdf.pressed { background-position: 122px -84px; }
|
||||
|
||||
#xp_panel #xp_ext_export_xls
|
||||
{
|
||||
left:44px; top:-39px;
|
||||
background-position: 82px 0;
|
||||
}
|
||||
#xp_panel #xp_ext_export_xls:hover { background-position: 82px -42px; }
|
||||
#xp_panel #xp_ext_export_xls.pressed { background-position: 82px -84px; }
|
||||
|
||||
#xp_panel #xp_ext_export_csv
|
||||
{
|
||||
left:88px; top:-81px;
|
||||
background-position: -41px 0;
|
||||
}
|
||||
#xp_panel #xp_ext_export_csv:hover { background-position: -41px -42px; }
|
||||
#xp_panel #xp_ext_export_csv.pressed { background-position: -41px -84px; }
|
||||
|
||||
#xp_panel #xp_ext_print
|
||||
{
|
||||
left:132px; top:-123px;
|
||||
background-position: 41px 0;
|
||||
}
|
||||
#xp_panel #xp_ext_print:hover { background-position: 41px -42px; }
|
||||
#xp_panel #xp_ext_print.pressed { background-position: 41px -84px; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
55
extensions/ki_export/css/setup.css.php
Normal file
55
extensions/ki_export/css/setup.css.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
header('Content-type: text/css');
|
||||
$table_header = "../../../skins/standard/grfx/g3_table_header.png";
|
||||
?>
|
||||
|
||||
#xp {
|
||||
border:1px solid black;
|
||||
margin:0;
|
||||
padding:0;
|
||||
background-color:#eee;
|
||||
position:absolute;
|
||||
overflow:auto;
|
||||
left:10px;
|
||||
}
|
||||
|
||||
#xp {
|
||||
top:200px;
|
||||
z-index:2;
|
||||
}
|
||||
|
||||
#xp_head {
|
||||
border:1px solid black;
|
||||
border-bottom:none;
|
||||
background-image: url('<?php echo $table_header; ?>');
|
||||
position:absolute;
|
||||
height:25px;
|
||||
text-align:left;
|
||||
color:#FFF;
|
||||
left:10px;
|
||||
font-size:11px;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
#xp_head { top:175px; }
|
||||
|
||||
#xp_head table { border:none; }
|
||||
|
||||
#xp_head td {
|
||||
font-weight:bold;
|
||||
color:white;
|
||||
}
|
||||
|
||||
.xp_time_help_table {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
.xp_time_description {
|
||||
border-bottom:1px solid gray;
|
||||
}
|
||||
|
||||
.xp_time_shortcut {
|
||||
font-weight:bold;
|
||||
border-bottom:1px solid gray;
|
||||
padding-right:10px;
|
||||
}
|
||||
4
extensions/ki_export/css/styles.css
Normal file
4
extensions/ki_export/css/styles.css
Normal file
@@ -0,0 +1,4 @@
|
||||
@import "setup.css.php";
|
||||
@import "tables.css.php";
|
||||
@import "panel.css";
|
||||
@import "optiontabs.css";
|
||||
290
extensions/ki_export/css/tables.css.php
Normal file
290
extensions/ki_export/css/tables.css.php
Normal file
@@ -0,0 +1,290 @@
|
||||
<?php
|
||||
header('Content-type: text/css');
|
||||
$table_header = "../../../skins/standard/grfx/g3_table_header.png";
|
||||
$schraff3 = "../../../skins/standard/grfx/schraff3.png";
|
||||
?>
|
||||
|
||||
div.ki_export table {
|
||||
border-collapse: collapse;
|
||||
font-size: 11px;
|
||||
color: #363636;
|
||||
border-bottom:1px solid #888;
|
||||
}
|
||||
div.ki_export table a.preselect_lnk {
|
||||
color: #363636;
|
||||
text-decoration:none;
|
||||
border-bottom:1px dotted #bbb;
|
||||
}
|
||||
|
||||
div.ki_export table a:hover {
|
||||
color: #0F9E00;
|
||||
border-bottom:none;
|
||||
}
|
||||
|
||||
div.ki_export table thead {
|
||||
height:25px;
|
||||
text-align:left;
|
||||
color:#FFF;
|
||||
}
|
||||
|
||||
div.ki_export table thead th {
|
||||
background-image: url('<?php echo $table_header; ?>');
|
||||
}
|
||||
|
||||
div.ki_export tr.even td,
|
||||
div.ki_export tr.odd td
|
||||
{
|
||||
border-bottom: none;
|
||||
border-left: none;
|
||||
border-right: 1px dotted #CCC;
|
||||
/* border-top: 1px solid #DDD;*/
|
||||
padding: 3px 4px 4px 5px;
|
||||
}
|
||||
#xp_head td {
|
||||
overflow:hidden;
|
||||
padding: 3px 4px 4px 6px;
|
||||
}
|
||||
|
||||
div.ki_export tr.hover td {
|
||||
background: #FFC !important;
|
||||
/* border-top: 1px solid #666 !important;
|
||||
border-bottom: 1px solid #666 !important;*/
|
||||
}
|
||||
|
||||
div.ki_export tr.even td {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
div.ki_export tr.odd td {
|
||||
background: #EEE;
|
||||
}
|
||||
|
||||
|
||||
div#xptable tr.odd td.comment,
|
||||
div#xptable tr.odd td.trackingnr,
|
||||
div#xptable tr.odd td.location {
|
||||
background: #CFE3F5;
|
||||
}
|
||||
|
||||
div#xptable tr.even td.comment,
|
||||
div#xptable tr.even td.trackingnr,
|
||||
div#xptable tr.even td.location {
|
||||
background: #ECF7FD;
|
||||
}
|
||||
div#xptable tr.even.expense td {
|
||||
background: #E5FFBF;
|
||||
}
|
||||
|
||||
div#xptable tr.odd.expense td {
|
||||
background: #DCF4B7;
|
||||
}
|
||||
|
||||
div#xptable tr.odd.expense td.comment,
|
||||
div#xptable tr.odd.expense td.trackingnr,
|
||||
div#xptable tr.odd.expense td.location {
|
||||
background: #A3F1A6;
|
||||
}
|
||||
|
||||
div#xptable tr.even.expense td.comment,
|
||||
div#xptable tr.even.expense td.trackingnr,
|
||||
div#xptable tr.even.expense td.location {
|
||||
background: #C8F1CC;
|
||||
}
|
||||
|
||||
|
||||
|
||||
div#xptable tr.odd td.cleared {
|
||||
background: #6E7882;
|
||||
}
|
||||
|
||||
div#xptable tr.even td.cleared {
|
||||
background: #86939F;
|
||||
}
|
||||
|
||||
|
||||
div#xptable tr td.time {
|
||||
border-bottom:1px dotted white;;
|
||||
}
|
||||
|
||||
div#xptable tr.even td.time {
|
||||
background: #A4E7A5;
|
||||
}
|
||||
|
||||
div#xptable tr.odd td.time {
|
||||
background: #64BF61;
|
||||
}
|
||||
|
||||
div#xptable tr.active td.time {
|
||||
background: #F00;
|
||||
}
|
||||
|
||||
div#xptable tr.expense td.time {
|
||||
background-image:url('<?php echo $schraff3; ?>');
|
||||
}
|
||||
|
||||
|
||||
|
||||
div.ki_export tr td.option,
|
||||
div.ki_export tr td.date,
|
||||
div.ki_export tr td.from,
|
||||
div.ki_export tr td.to,
|
||||
div.ki_export tr td.time,
|
||||
div.ki_export tr td.wage {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
div.ki_export>div#xp>div#xptable>table>tbody>tr>td.cleared {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
#xp_head table {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#xp_head td.option,
|
||||
#xp td.option
|
||||
{
|
||||
width:70px;
|
||||
}
|
||||
|
||||
#xp_head td.date,
|
||||
#xp td.date
|
||||
{
|
||||
width:50px;
|
||||
}
|
||||
|
||||
#xp_head td.time,
|
||||
#xp td.time
|
||||
{
|
||||
width:40px;
|
||||
}
|
||||
|
||||
#xp_head td.dec_time,
|
||||
#xp td.dec_time
|
||||
{
|
||||
width:40px;
|
||||
}
|
||||
|
||||
#xp_head td.cash
|
||||
{
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
#xp td.rate
|
||||
{
|
||||
width:40px;
|
||||
}
|
||||
|
||||
#xp td.wage
|
||||
{
|
||||
width:40px;
|
||||
}
|
||||
|
||||
#xp_head td { white-space:nowrap; }
|
||||
|
||||
|
||||
#xp_head td.from,
|
||||
#xp_head td.to,
|
||||
#xp td.from,
|
||||
#xp td.to
|
||||
{
|
||||
width:50px;
|
||||
}
|
||||
|
||||
#xp td.knd {
|
||||
min-width:50px;
|
||||
}
|
||||
|
||||
#xp td.pct {
|
||||
min-width:50px;
|
||||
}
|
||||
|
||||
#xp td.evt {
|
||||
min-width:60px;
|
||||
}
|
||||
|
||||
#xp td.comment {
|
||||
width:80px;
|
||||
}
|
||||
|
||||
#xp td.location {
|
||||
width:30px;
|
||||
}
|
||||
|
||||
#xp td.trackingnr {
|
||||
width:120px;
|
||||
}
|
||||
|
||||
div.ki_export table tr.odd td.disabled {
|
||||
background-color:#FFC7BB !important;
|
||||
}
|
||||
div.ki_export table tr.even td.disabled {
|
||||
background-color:#FFE1DB !important;
|
||||
}
|
||||
|
||||
|
||||
div.ki_export table td.user
|
||||
{
|
||||
width:50px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
#xp_head td.user
|
||||
{
|
||||
width:100px;
|
||||
}
|
||||
|
||||
|
||||
div.ki_export table td.cleared
|
||||
{
|
||||
width:20px;
|
||||
}
|
||||
|
||||
div.ki_export table td.cleared a
|
||||
{
|
||||
width:13px;
|
||||
height:13px;
|
||||
display:block;
|
||||
float:left;
|
||||
}
|
||||
|
||||
div.ki_export table td.cleared a.is_cleared
|
||||
{
|
||||
background:url('../grfx/cleared.png') 0 -13px no-repeat;
|
||||
}
|
||||
|
||||
div.ki_export table td.cleared a.isnt_cleared
|
||||
{
|
||||
background:url('../grfx/cleared.png') no-repeat;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
div#xp_head div.right
|
||||
{
|
||||
position:absolute;
|
||||
overflow:hidden;
|
||||
width:32px;
|
||||
height:20px;
|
||||
top:3px;
|
||||
right:3px;
|
||||
}
|
||||
|
||||
div#xp_head div.right a
|
||||
{
|
||||
background-image: url('../grfx/invert.png');
|
||||
overflow:hidden;
|
||||
display:block;
|
||||
width:22px;
|
||||
height:16px;
|
||||
text-indent:-500px;
|
||||
|
||||
}
|
||||
|
||||
div#xp_head td {padding: 3px 4px 4px 6px;}
|
||||
|
||||
|
||||
|
||||
|
||||
446
extensions/ki_export/export_pdf.php
Normal file
446
extensions/ki_export/export_pdf.php
Normal file
@@ -0,0 +1,446 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of
|
||||
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||
* (c) 2006-2009 Kimai-Development-Team
|
||||
*
|
||||
* Kimai is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; Version 3, 29 June 2007
|
||||
*
|
||||
* Kimai is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
include('../../libraries/tcpdf/tcpdf.php');
|
||||
|
||||
class MYPDF extends TCPDF {
|
||||
|
||||
/**
|
||||
* Widths of all columns
|
||||
*/
|
||||
var $w = array();
|
||||
var $print_time;
|
||||
var $date_format;
|
||||
|
||||
var $columns = array();
|
||||
|
||||
/**
|
||||
* Format a Unix timestamp to a date.
|
||||
* @param int $number unix timestamp
|
||||
* @return string formatted as date
|
||||
*/
|
||||
public function dateformat($number) {
|
||||
return strftime($this->date_format,$number);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the duration.
|
||||
* @param int $number number to format (usually in hours)
|
||||
* @return string formatted string
|
||||
*/
|
||||
public function timespan($number) {
|
||||
global $kga;
|
||||
if ($number == -1)
|
||||
return "-------";
|
||||
else
|
||||
return str_replace(".",$kga['conf']['decimalSeparator'],sprintf("%01.2f",$number))." ".$kga['lang']['xp_ext']['duration_unit'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a number as a money value.
|
||||
* @param int $number amount of money
|
||||
* @return string formatted string
|
||||
*/
|
||||
public function money($number) {
|
||||
return formatCurrency($number,false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print a footer on every page.
|
||||
*/
|
||||
public function Footer() {
|
||||
global $kga,$knd_data, $pct_data;
|
||||
|
||||
// Position at 1.5 cm from bottom
|
||||
$this->SetY(-15);
|
||||
|
||||
// customer data
|
||||
//$this->SetFont('helvetica', '', 8); // Set font
|
||||
//$this->Cell(80, 10, $knd_data['knd_name'].' ('.$pct_data['pct_name'].')', 0, 0, 'L');
|
||||
|
||||
// Page number
|
||||
$this->SetFont('helvetica', 'I', 8); // Set font
|
||||
$this->Cell(30, 10, $kga['lang']['xp_ext']['page'].' '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, 0, 'C');
|
||||
|
||||
//Date
|
||||
$this->SetFont('helvetica', '', 8); // Set font
|
||||
$this->Cell(0, 10, date('d.m.Y H:i:s', $this->print_time), 0, 0, 'R');
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the header of the table.
|
||||
* @param array $w widths of the table columns
|
||||
* @param array $header string with the column headers
|
||||
*/
|
||||
public function printHeader($w,$header) {
|
||||
|
||||
// Colors, line width and bold font
|
||||
$this->SetFillColor(240, 240, 240);
|
||||
$this->SetTextColor(0);
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->SetLineWidth(0.3);
|
||||
$this->SetFont('', 'B');
|
||||
|
||||
for($i = 0; $i < count($w); $i++) {
|
||||
if ($w[$i] <= 0) continue;
|
||||
$this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', 1);
|
||||
}
|
||||
$this->Ln();
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the table containing the detailed information.
|
||||
* @param array $header String with the column headers.
|
||||
* @param array $data Data to print.
|
||||
*/
|
||||
public function ColoredTable($header,$data) {
|
||||
global $kga;
|
||||
$dateWidth = max(
|
||||
$this->GetStringWidth($header[0]),
|
||||
$this->GetStringWidth($this->dateformat(mktime(0,0,0,12,31,2000)))
|
||||
);
|
||||
$dateWidth += 4;
|
||||
$w = array($dateWidth, $this->getPageWidth()-$this->pagedim[$this->page]['lm']-$this->pagedim[$this->page]['rm']-$dateWidth,0,0);
|
||||
if (isset($this->columns['wage'])) {
|
||||
$w[3] = 30;
|
||||
$w[1] -= 30;
|
||||
}
|
||||
if (isset($this->columns['dec_time'])) {
|
||||
$w[2] = 30;
|
||||
$w[1] -= 30;
|
||||
}
|
||||
|
||||
// Header
|
||||
$this->printHeader($w,$header);
|
||||
|
||||
// Color and font restoration
|
||||
$this->SetFillColor(224, 235, 255);
|
||||
$this->SetTextColor(0);
|
||||
$this->SetFont('');
|
||||
// Data
|
||||
$fill = 0;
|
||||
$moneySum = 0;
|
||||
$timeSum = 0;
|
||||
foreach($data as $row) {
|
||||
|
||||
$show_comment = !empty($row['comment']) && isset($_REQUEST['print_comments']);
|
||||
// check if page break is nessessary
|
||||
if ($this->getPageHeight()-$this->pagedim[$this->page]['bm']-($this->getY()+20+($show_comment?6:0)) < 0) {
|
||||
$this->Cell(array_sum($w), 0, '', 'T');
|
||||
if (isset($this->columns['wage']) || isset($this->columns['dec_time'])) {
|
||||
$this->Ln();
|
||||
$this->Cell($w[0]+$w[1], 6, $kga['lang']['xp_ext']['subtotal'].':', '', 0, 'R', false);
|
||||
if (isset($this->columns['dec_time']))
|
||||
$this->Cell($w[2], 6, $this->timespan($timeSum), isset($this->columns['wage'])?'R':'', 0, 'R', true);
|
||||
if (isset($this->columns['wage']))
|
||||
$this->Cell($w[3], 6, $this->money($moneySum), 'L', 0, 'R', true);
|
||||
}
|
||||
$this->Ln();
|
||||
$this->AddPage();
|
||||
$this->printHeader($w,$header);
|
||||
|
||||
// Color and font restoration
|
||||
$this->SetFillColor(224, 235, 255);
|
||||
$this->SetTextColor(0);
|
||||
$this->SetFont('');
|
||||
}
|
||||
$this->Cell($w[0], 6, $this->dateformat($row['time_in']), 'LR', 0, 'C', $fill);
|
||||
$this->Cell($w[1], 6, $row['knd_name'] . ' - ' . $row['evt_name'], 'LR', 0, 'L', $fill);
|
||||
|
||||
if (isset($this->columns['dec_time']))
|
||||
$this->Cell($w[2], 6, $this->timespan(isset($row['dec_zef_time'])?$row['dec_zef_time']:0), 'LR', 0, 'R', $fill);
|
||||
if (isset($this->columns['wage']))
|
||||
$this->Cell($w[3], 6, $this->money($row['wage']), 'LR', 0, 'R', $fill);
|
||||
$this->Ln();
|
||||
|
||||
|
||||
//Kommentar anzeigen:
|
||||
if ( $show_comment ) {
|
||||
// comment line width
|
||||
$comment_line_width = 58;
|
||||
// split comment in lines
|
||||
$comment_lines = explode("\n", wordwrap(stripslashes($row['comment']), $comment_line_width, "\n", true));
|
||||
// loop through all comment lines an add a cell for each line
|
||||
if (is_array($comment_lines)) {
|
||||
// determine font sizes to work with
|
||||
$current_font_size = $this->getFontSizePt();
|
||||
if ($current_font_size <= 0) {
|
||||
$current_font_size = 12;
|
||||
}
|
||||
$comment_font_size = $current_font_size - 2;
|
||||
foreach ($comment_lines as $comment_line) {
|
||||
$this->Cell($w[0], 6, '', 'L', 0, 'C', $fill);
|
||||
$this->SetFont('', 'I', $comment_font_size);
|
||||
//$this->Cell($w[1], 6, $kga['lang']['comment'].': '.nl2br(addEllipsis($row['comment'],40)), 'LR', 0, 'L', $fill);
|
||||
$this->Cell($w[1], 6, $comment_line, 'LR', 0, 'L', $fill);
|
||||
$this->SetFont('', '', $current_font_size);
|
||||
if (isset($this->columns['dec_time']))
|
||||
$this->Cell($w[2], 6, '', 'LR', 0, 'R', $fill);
|
||||
if (isset($this->columns['wage']))
|
||||
$this->Cell($w[3], 6, '', 'LR', 0, 'R', $fill);
|
||||
$this->Ln();
|
||||
}
|
||||
}
|
||||
}
|
||||
$fill=!$fill;
|
||||
$moneySum+=$row['wage'];
|
||||
$timeSum += $row['dec_zef_time']==-1?0:$row['dec_zef_time'];
|
||||
|
||||
}
|
||||
$this->Cell(array_sum($w), 0, '', 'T');
|
||||
$this->Ln();
|
||||
|
||||
if (isset($this->columns['wage']) || isset($this->columns['dec_time'])) {
|
||||
$this->Cell($w[0]+$w[1], 6, $kga['lang']['xp_ext']['finalamount'].':', '', 0, 'R', false);
|
||||
$this->SetFont('', 'B');
|
||||
if (isset($this->columns['dec_time']))
|
||||
$this->Cell($w[2], 6, $this->timespan($timeSum), isset($this->columns['wage'])?'R':'', 0, 'R', true);
|
||||
if (isset($this->columns['wage']))
|
||||
$this->Cell($w[3], 6, $this->money($moneySum), 'L', 0, 'R', true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the table containing the summarized information.
|
||||
* @param array $header String with the column headers.
|
||||
* @param array $data Data to print.
|
||||
*/
|
||||
public function ColoredTable_result($header,$data) {
|
||||
global $kga;
|
||||
$w = array($this->getPageWidth()-$this->pagedim[$this->page]['lm']-$this->pagedim[$this->page]['rm'],0,0);
|
||||
if (isset($this->columns['wage'])) {
|
||||
$w[2] = 30;
|
||||
$w[0] -= 30;
|
||||
}
|
||||
if (isset($this->columns['dec_time'])) {
|
||||
$w[1] = 30;
|
||||
$w[0] -= 30;
|
||||
}
|
||||
|
||||
// Header
|
||||
$this->printHeader($w,$header);
|
||||
|
||||
// Color and font restoration
|
||||
$this->SetFillColor(224, 235, 255);
|
||||
$this->SetTextColor(0);
|
||||
$this->SetFont('');
|
||||
// Data
|
||||
$fill = 0;
|
||||
$sum = 0;
|
||||
$sum_time = 0;
|
||||
foreach($data as $row) {
|
||||
// check if page break is nessessary
|
||||
if ($this->getPageHeight()-$this->pagedim[$this->page]['bm']-($this->getY()+20) < 0) {
|
||||
$this->Cell(array_sum($w), 0, '', 'T');
|
||||
$this->Ln();
|
||||
$this->Cell($w[0], 6, $kga['lang']['xp_ext']['subtotal'].':', '', 0, 'R', false);
|
||||
if (isset($this->columns['dec_time']))
|
||||
$this->Cell($w[1], 6, $this->timespan($sum_time), 'R', 0, 'R', true);
|
||||
if (isset($this->columns['wage']))
|
||||
$this->Cell($w[2], 6, $this->money($sum), 'L', 0, 'R', true);
|
||||
$this->Ln();
|
||||
$this->AddPage();
|
||||
$this->printHeader($w,$header);
|
||||
|
||||
// Color and font restoration
|
||||
$this->SetFillColor(224, 235, 255);
|
||||
$this->SetTextColor(0);
|
||||
$this->SetFont('');
|
||||
}
|
||||
$this->Cell($w[0], 6, $row['name'], 'LR', 0, 'L', $fill);
|
||||
if (isset($this->columns['dec_time']))
|
||||
$this->Cell($w[1], 6, $this->timespan($row['time']), 'LR', 0, 'R', $fill);
|
||||
if (isset($this->columns['wage']))
|
||||
$this->Cell($w[2], 6, $this->money($row['wage']), 'LR', 0, 'R', $fill);
|
||||
$this->Ln();
|
||||
$fill=!$fill;
|
||||
$sum+=$row['wage'];
|
||||
$sum_time += $row['time']==-1?0:$row['time'];
|
||||
|
||||
}
|
||||
$this->Cell(array_sum($w), 0, '', 'T');
|
||||
$this->Ln();
|
||||
|
||||
$this->Cell($w[0], 6, $kga['lang']['xp_ext']['finalamount'].':', '', 0, 'R', false);
|
||||
$this->SetFont('', 'B');
|
||||
if (isset($this->columns['dec_time']))
|
||||
$this->Cell($w[1], 6, $this->timespan($sum_time), '', 0, 'R', true);
|
||||
if (isset($this->columns['wage']))
|
||||
$this->Cell($w[2], 6, $this->money($sum), 'L', 0, 'R', true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
$pdf->date_format = $dateformat;
|
||||
$pdf->columns = $columns;
|
||||
$pdf->print_time = time();
|
||||
$pdf->SetDisplayMode('default', 'continuous'); //PDF-Seitenanzeige fortlaufend
|
||||
|
||||
// determine page title
|
||||
switch ($filter_type) {
|
||||
case 0:
|
||||
$pdf_title = $kga['lang']['xp_ext']['pdf_headline_only_times'];
|
||||
break;
|
||||
case 1:
|
||||
$pdf_title = $kga['lang']['xp_ext']['pdf_headline_only_expenses'];
|
||||
break;
|
||||
case -1:
|
||||
default:
|
||||
$pdf_title = $kga['lang']['xp_ext']['pdf_headline'];
|
||||
}
|
||||
// determine filter values
|
||||
switch ($filter_cleared) {
|
||||
case 0:
|
||||
$pdf_filter[] = $kga['lang']['xp_ext']['cleared_open'];
|
||||
break;
|
||||
case 1:
|
||||
$pdf_filter[] = $kga['lang']['xp_ext']['cleared_cleared'];
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($filter_refundable) {
|
||||
case 0:
|
||||
$pdf_filter[] = $kga['lang']['xp_ext']['refundable_refundable'];
|
||||
break;
|
||||
case 1:
|
||||
$pdf_filter[] = $kga['lang']['xp_ext']['refundable_not_refundable'];
|
||||
break;
|
||||
}
|
||||
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetTitle($pdf_title);
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->AddPage();
|
||||
|
||||
if (isset($_REQUEST['create_bookmarks']))
|
||||
$pdf->Bookmark($pdf_title, 0, 0);
|
||||
|
||||
//$pdf->ImageEps('kimai-logo.ai', 0, 10, 60, 0, "http://www.kimai.org", true, 'T', 'R'); // include company logo
|
||||
|
||||
|
||||
|
||||
$pdf->WriteHtml('<h1>' . $pdf_title . '</h1>');
|
||||
$pdf->ln();
|
||||
|
||||
$pdf->WriteHtml('<b>'.$kga['lang']['xp_ext']['time_period'].':</b> '.
|
||||
strftime($kga['date_format']['2'],$in).' - '.strftime($kga['date_format']['2'],$out) );
|
||||
|
||||
if (isset($pdf_filter)) {
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtml('<b>' . $kga['lang']['xp_ext']['filter'] . ':</b> ' . implode(' | ', $pdf_filter));
|
||||
}
|
||||
|
||||
if (!empty($_REQUEST['document_comment'])) {
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtml($_REQUEST['document_comment']);
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['print_summary'])) {
|
||||
|
||||
//Create the summary.
|
||||
$zef_summary = array();
|
||||
$exp_summary = array();
|
||||
foreach ($arr_data as $one_entry) {
|
||||
|
||||
if ($one_entry['type'] == 'zef') {
|
||||
if (isset($zef_summary[$one_entry['zef_evtID']])) {
|
||||
$zef_summary[$one_entry['zef_evtID']]['time'] += ($kga['conf']['exactSums'] == 1)?$one_entry['zef_time']/3600:$one_entry['dec_zef_time']; //Sekunden
|
||||
$zef_summary[$one_entry['zef_evtID']]['wage'] += ($kga['conf']['exactSums'] == 1)?$one_entry['wage_decimal']:$one_entry['wage']; //Euro
|
||||
}
|
||||
else {
|
||||
$zef_summary[$one_entry['zef_evtID']]['name'] = html_entity_decode($one_entry['evt_name']);
|
||||
$zef_summary[$one_entry['zef_evtID']]['time'] = ($kga['conf']['exactSums'] == 1)?$one_entry['zef_time']/3600:$one_entry['dec_zef_time'];
|
||||
$zef_summary[$one_entry['zef_evtID']]['wage'] = ($kga['conf']['exactSums'] == 1)?$one_entry['wage_decimal']:$one_entry['wage'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$exp_info['name'] = $kga['lang']['xp_ext']['expense'].': '.$one_entry['evt_name'];
|
||||
$exp_info['time'] = -1;
|
||||
$exp_info['wage'] = $one_entry['wage'];
|
||||
|
||||
$exp_summary[] = $exp_info;
|
||||
}
|
||||
}
|
||||
|
||||
$summary = array_merge($zef_summary,$exp_summary);
|
||||
|
||||
if (isset($_REQUEST['create_bookmarks']))
|
||||
$pdf->Bookmark($kga['lang']['xp_ext']['summary'], 0, 0);
|
||||
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtml('<h3>'.$kga['lang']['xp_ext']['summary'].'</h3>');
|
||||
$pdf->ln();
|
||||
$pdf->ColoredTable_result(array($kga['lang']['evt'],$kga['lang']['xp_ext']['duration'],$kga['lang']['xp_ext']['costs']), $summary);
|
||||
|
||||
$pdf->AddPage();
|
||||
|
||||
}
|
||||
|
||||
// Write to the PDF document which, if any, customer filters were applied.
|
||||
$customers = array();
|
||||
foreach ($filterKnd as $knd_id) {
|
||||
$customer_info = knd_get_data($knd_id);
|
||||
$customers[] = $customer_info['knd_name'];
|
||||
}
|
||||
if (count($customers)>0) {
|
||||
$pdf->cell(20,6,$kga['lang']['knd'].':');
|
||||
$pdf->cell(20,6,implode(', ',$customers));
|
||||
$pdf->ln();
|
||||
}
|
||||
|
||||
// Write to the PDF document which, if any, project filters were applied.
|
||||
$projects = array();
|
||||
foreach ($filterPct as $pct_id) {
|
||||
$project_info = pct_get_data($pct_id);
|
||||
$projects[] = $project_info['pct_name'];
|
||||
}
|
||||
if (count($projects)>0) {
|
||||
$pdf->cell(20,6,$kga['lang']['pct'].':');
|
||||
$pdf->cell(20,6,implode(', ',$projects));
|
||||
$pdf->ln();
|
||||
}
|
||||
|
||||
|
||||
if (isset($_REQUEST['customer_new_page'])) {
|
||||
$firstRun = true;
|
||||
foreach ($knd_arr_data as $arr_data) {
|
||||
if ($firstRun)
|
||||
$firstRun = false;
|
||||
else
|
||||
$pdf->AddPage();
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtml('<h3>'.$kga['lang']['xp_ext']['full_list'].'</h3>');
|
||||
$pdf->ln();
|
||||
$pdf->ColoredTable(array($kga['lang']['datum'],$kga['lang']['evt'],$kga['lang']['xp_ext']['duration'],$kga['lang']['xp_ext']['costs']),$arr_data);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtml('<h3>'.$kga['lang']['xp_ext']['full_list'].'</h3>');
|
||||
$pdf->ln();
|
||||
$pdf->ColoredTable(array($kga['lang']['datum'],$kga['lang']['evt'],$kga['lang']['xp_ext']['duration'],$kga['lang']['xp_ext']['costs']),$arr_data);
|
||||
}
|
||||
|
||||
|
||||
$pdf->Output('invoice_'.date('Y-m-d_H-i-s', $pdf->print_time).'.pdf', ( (isset($_REQUEST['download_pdf'])) ? 'D' : 'I' ) ); // D=Download I=Eingebunden
|
||||
?>
|
||||
775
extensions/ki_export/export_pdf2.php
Normal file
775
extensions/ki_export/export_pdf2.php
Normal file
@@ -0,0 +1,775 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of
|
||||
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||
* (c) 2006-2009 Kimai-Development-Team
|
||||
*
|
||||
* Kimai is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; Version 3, 29 June 2007
|
||||
*
|
||||
* Kimai is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
include('../../libraries/tcpdf/tcpdf.php');
|
||||
|
||||
class MYPDF extends TCPDF {
|
||||
|
||||
var $w = array();
|
||||
var $print_time;
|
||||
var $date_format;
|
||||
var $time_format;
|
||||
var $columns;
|
||||
|
||||
var $moneySum;
|
||||
var $timeSum;
|
||||
|
||||
/**
|
||||
* Format a unix timestamp as a date string.
|
||||
* @param int $number unix timestamp
|
||||
* @return string formatted string
|
||||
*/
|
||||
public function date($number) {
|
||||
return strftime($this->date_format,$number);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a unix timestamp as a time string.
|
||||
* @param int $number unix timestamp
|
||||
* @return string formatted string
|
||||
*/
|
||||
public function time($number) {
|
||||
if ($number == -1)
|
||||
return "-------";
|
||||
else
|
||||
return strftime($this->time_format,$number);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Format the duration.
|
||||
* @param int $number duration.
|
||||
* @return duration nicely formatted
|
||||
*/
|
||||
public function timespan($number) {
|
||||
global $kga;
|
||||
if ($number == -1)
|
||||
return "-------";
|
||||
else
|
||||
return str_replace(".",$kga['conf']['decimalSeparator'],sprintf("%01.2f",$number))." ".$kga['lang']['xp_ext']['duration_unit'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Format an amount of money.
|
||||
* @param int $number amount of money
|
||||
* @return string formatted string
|
||||
*/
|
||||
public function money($number) {
|
||||
return formatCurrency($number,false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the array which hold the column widths. They depends on the maximum with
|
||||
* the time column and the money column need.
|
||||
* @param int $max_time_width maximum width the time column needs.
|
||||
* @param int $max_time_width maximum width the time column needs.
|
||||
* @return array containing the widths of the columns
|
||||
*/
|
||||
public function columnWidths($max_time_width,$max_money_width) {
|
||||
return array($max_time_width,
|
||||
$this->getPageWidth()-$this->pagedim[$this->page]['lm']-$this->pagedim[$this->page]['rm']-$max_time_width-$max_money_width,
|
||||
$max_money_width);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Split the string in lines and check if a line would overflow and cause more lines.
|
||||
* @param string $string Text to check.
|
||||
* @param int $line_width
|
||||
* @return int Number of lines the text will need.
|
||||
*/
|
||||
public function getHtmlStringLines($string,$line_width) {
|
||||
$htmlLines = explode("<br />",$string);
|
||||
$lineCount = count($htmlLines);
|
||||
foreach ($htmlLines as $line) {
|
||||
$lineCount += ceil($this->GetStringWidth($line)/$line_width);
|
||||
}
|
||||
return $lineCount;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print a footer on every page.
|
||||
*/
|
||||
public function Footer() {
|
||||
global $kga,$knd_data, $pct_data;
|
||||
|
||||
// Position at 1.5 cm from bottom
|
||||
$this->SetY(-15);
|
||||
|
||||
// customer data
|
||||
/*$this->SetFont('helvetica', '', 8); // Set font
|
||||
$this->Cell(80, 10, $knd_data['knd_name'].' ('.$pct_data['pct_name'].')', 0, 0, 'L');*/
|
||||
|
||||
// Page number
|
||||
$this->SetFont('helvetica', 'I', 8); // Set font
|
||||
$this->Cell(30, 10, $kga['lang']['xp_ext']['page'].' '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, 0, 'C');
|
||||
|
||||
//Datum
|
||||
$this->SetFont('helvetica', '', 8); // Set font
|
||||
$this->Cell(0, 10, date('d.m.Y H:i:s', $this->print_time), 0, 0, 'R');
|
||||
}
|
||||
|
||||
/**
|
||||
* Put a new entry into the PDF document. Decide if it's a time entry or
|
||||
* expense entry and call the appropriate functions.
|
||||
* @param array $columns array containing all fields which should be printed
|
||||
* (Columns is misleading, but they were columns in the browser.)
|
||||
* @param array $data the data of this entry
|
||||
* @param array $widths the widths of the columns
|
||||
*/
|
||||
public function printRows($data,$widths) {
|
||||
|
||||
$this->moneySum = 0;
|
||||
$this->timeSum = 0;
|
||||
foreach($data as $row) {
|
||||
if ($row['type'] == "exp") {
|
||||
$this->printExpenseRow($widths,$row);
|
||||
$this->moneySum+=$row['wage'];
|
||||
}
|
||||
else {
|
||||
$this->printTimeRow($widths,$row);
|
||||
$this->moneySum+=$row['wage'];
|
||||
$this->timeSum +=$row['dec_zef_time']==-1?0:$row['dec_zef_time'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Put a new expense entry into the PDF document.
|
||||
* @param array $columns array containing all fields which should be printed
|
||||
* (Columns is misleading, but they were columns in the browser.)
|
||||
* @param array $w the widths of the columns
|
||||
* @param array $row the data of this entry
|
||||
*/
|
||||
function printExpenseRow($w,$row) {
|
||||
global $kga;
|
||||
$date_string = '';
|
||||
if (isset($this->columns['date']))
|
||||
$date_string = $this->date($row['time_in']);
|
||||
if (isset($this->columns['from']))
|
||||
$date_string .= ' '.$this->time($row['time_in']);
|
||||
|
||||
|
||||
$event_string = (isset($this->columns['action']) && !empty($row['evt_name'])) ? $kga['lang']['xp_ext']['expense'].': <i>'.$row['evt_name'].'</i>' : '';
|
||||
$user_string = (isset($this->columns['user']) && !empty($row['username'])) ? $kga['lang']['xp_ext']['by'].': <i>'.$row['username'].'</i>' : '';
|
||||
$comment_string = (isset($this->columns['comment']) && !empty($row['comment'])) ? $kga['lang']['comment'].': <i>'.nl2br($row['comment']).'</i>' : '';
|
||||
$wage_string = '<b>'.$this->money($row['wage']).'</b>';
|
||||
|
||||
$event_fills_row = empty($user_string) || ($this->GetStringWidth($event_string)+$this->GetStringWidth($user_string) > $w[1]);
|
||||
|
||||
// Find out how many rows we use for this entry.
|
||||
$field_rows = 2;
|
||||
if (!empty($event_string) && !empty($user_string) && $event_fills_row)
|
||||
$field_rows++;
|
||||
if (empty($event_string) && empty($user_string))
|
||||
$field_rows--;
|
||||
if (empty($comment_string))
|
||||
$field_rows--;
|
||||
|
||||
$probable_comment_lines = $this->GetHtmlStringLines($comment_string,$w[1]);
|
||||
|
||||
// check if page break is nessessary
|
||||
if ($this->getPageHeight()-$this->pagedim[$this->page]['bm']-($this->getY()+($field_rows+$probable_comment_lines+4)*6) < 0) {
|
||||
if (isset($this->columns['wage']) && isset($this->columns['dec_time'])) {
|
||||
$this->ln();
|
||||
$this->WriteHtmlCell($w[0]+$w[1]+$w[2], 6, $this->getX(),$this->getY(),$this->timespan($this->timeSum),'',0,0,true,'R');
|
||||
$this->ln();
|
||||
$this->WriteHtmlCell($w[0]+$w[1], 6, $this->getX(),$this->getY(),$kga['lang']['xp_ext']['subtotal'].':', '',0,0,true,'R');
|
||||
$this->WriteHtmlCell($w[2], 6, $this->getX(),$this->getY(),$this->money($this->moneySum),'',0,0,true,'R');
|
||||
} else if(isset($this->columns['wage'])) {
|
||||
$this->ln();
|
||||
$this->WriteHtmlCell($w[0]+$w[1], 6, $this->getX(),$this->getY(),$kga['lang']['xp_ext']['subtotal'].':', '',0,0,true,'R');
|
||||
$this->WriteHtmlCell($w[2], 6, $this->getX(),$this->getY(),$this->money($this->moneySum),'',0,0,true,'R');
|
||||
} else if(isset($this->columns['dec_time'])) {
|
||||
$this->ln();
|
||||
$this->WriteHtmlCell($w[0]+$w[1], 6, $this->getX(),$this->getY(),$kga['lang']['xp_ext']['subtotal'].':', '',0,0,true,'R');
|
||||
$this->WriteHtmlCell($w[2], 6, $this->getX(),$this->getY(),$this->timespan($this->timeSum),'',0,0,true,'R');
|
||||
}
|
||||
$this->AddPage();
|
||||
}
|
||||
|
||||
$this->ln();
|
||||
$this->Cell($w[0], 6, $date_string, '', 0, 'R');
|
||||
|
||||
for ($i=0;$i<3;$i++) {
|
||||
$handled_row = false;
|
||||
|
||||
switch ($i) {
|
||||
case 0: // row with event or event and user
|
||||
if ($event_fills_row && !empty($event_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$event_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
else if (!empty($event_string) && !empty($user_string)) {
|
||||
$this->WriteHtmlCell($w[1]/2, 6, $this->getX(),$this->getY(),$event_string, 'L');
|
||||
$this->WriteHtmlCell($w[1]/2, 6, $this->getX(),$this->getY(),$user_string, '');
|
||||
$handled_row = true;
|
||||
}
|
||||
else if (!empty($user_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$user_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1: // row with user
|
||||
if ($event_fills_row && !empty($user_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$user_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: // row with comment
|
||||
if (!empty($comment_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$comment_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if ($handled_row) {
|
||||
$field_rows--;
|
||||
|
||||
if ($field_rows == 0) { // if this is the last row
|
||||
$this->ln($this->getLastH());
|
||||
$this->Cell($w[0], 6, '');
|
||||
$this->Cell($w[1], 6, '','T');
|
||||
if (isset($this->columns['wage'])) {
|
||||
$this->WriteHtmlCell($w[2], 6, $this->getX(),$this->getY()-$this->getLastH(),$wage_string, '',0,0,true,'R');
|
||||
}
|
||||
$this->ln();
|
||||
//$this->ln();
|
||||
break; // leave for loop
|
||||
}
|
||||
else {
|
||||
$this->ln();
|
||||
$this->Cell($w[0],6,'');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Put a new time entry into the PDF document.
|
||||
* @param array $columns array containing all fields which should be printed
|
||||
* (Columns is misleading, but they were columns in the browser.)
|
||||
* @param array $w the widths of the columns
|
||||
* @param array $row the data of this entry
|
||||
*/
|
||||
function printTimeRow($w,$row) {
|
||||
global $kga;
|
||||
$from_date_string = '';
|
||||
if (isset($this->columns['date']))
|
||||
$from_date_string = $this->date($row['time_in']);
|
||||
if (isset($this->columns['from']))
|
||||
$from_date_string .= ' '.$this->time($row['time_in']);
|
||||
|
||||
$to_date_string = '';
|
||||
if (isset($this->columns['to'])) {
|
||||
if (isset($this->columns['date']))
|
||||
$to_date_string = $this->date($row['time_out']);
|
||||
$to_date_string .= ' '.$this->time($row['time_out']);
|
||||
}
|
||||
|
||||
|
||||
if (isset($this->columns['action']) && !empty($row['evt_name']))
|
||||
$event_string = $kga['lang']['evt'].': <i>'.$row['evt_name'].'</i>';
|
||||
else
|
||||
$event_string = '';
|
||||
|
||||
if (isset($this->columns['user']) && !empty($row['username']))
|
||||
$user_string = $kga['lang']['xp_ext']['done_by'].': <i>'.$row['username'].'</i>';
|
||||
else
|
||||
$user_string = '';
|
||||
|
||||
if (isset($this->columns['location']) && !empty($row['location']))
|
||||
$location_string = $kga['lang']['zlocation'].': <i>'.$row['location'].'</i>';
|
||||
else
|
||||
$location_string = '';
|
||||
|
||||
if (isset($this->columns['trackingnr']) && !empty($row['trackingnr']))
|
||||
$trackingnr_string = $kga['lang']['trackingnr'].': <i>'.$row['trackingnr'].'</i>';
|
||||
else
|
||||
$trackingnr_string = '';
|
||||
|
||||
if (isset($this->columns['comment']) && !empty($row['comment']))
|
||||
$comment_string = $kga['lang']['comment'].': <i>'.nl2br($row['comment']).'</i>';
|
||||
else
|
||||
$comment_string = '';
|
||||
|
||||
if (isset($this->columns['time']) && !empty($row['zef_duration']))
|
||||
$time_string = $kga['lang']['xp_ext']['duration'].': <i>'.$row['zef_duration'].' '.$kga['lang']['xp_ext']['duration_unit'].'</i>';
|
||||
else
|
||||
$time_string = '';
|
||||
|
||||
if (isset($this->columns['rate']) && !empty($row['zef_rate']))
|
||||
$rate_string = $kga['lang']['rate'].': <i>'.$row['zef_rate'].'</i>';
|
||||
else
|
||||
$rate_string = '';
|
||||
|
||||
if (isset($this->columns['wage']) && !empty($row['wage']))
|
||||
$wage_string = '<b>'.$this->money($row['wage']).'</b>';
|
||||
else
|
||||
$wage_string = '';
|
||||
|
||||
$event_fills_row = empty($user_string) || ($this->GetStringWidth($event_string)+$this->GetStringWidth($user_string) > $w[1]);
|
||||
|
||||
$field_rows = 4; // number of rows in block of values
|
||||
|
||||
if (!empty($event_string) && !empty($user_string) && $event_fills_row)
|
||||
$field_rows++;
|
||||
|
||||
if (empty($event_string) && empty($user_string))
|
||||
$field_rows--;
|
||||
|
||||
if (empty($location_string) && empty($trackingnr_string))
|
||||
$field_rows--;
|
||||
|
||||
if (empty($comment_string))
|
||||
$field_rows--;
|
||||
|
||||
if (empty($time_string) && empty($rate_string))
|
||||
$field_rows--;
|
||||
|
||||
$probable_comment_lines = $this->getHtmlStringLines($comment_string,$w[1]);
|
||||
|
||||
// check if page break is nessessary
|
||||
if ($this->getPageHeight()-$this->pagedim[$this->page]['bm']-($this->getY()+($field_rows+$probable_comment_lines+4)*6) < 0) {
|
||||
if (isset($this->columns['wage']) && isset($this->columns['dec_time'])) {
|
||||
$this->ln();
|
||||
$this->WriteHtmlCell($w[0]+$w[1]+$w[2], 6, $this->getX(),$this->getY(),$this->timespan($this->timeSum),'',0,0,true,'R');
|
||||
$this->ln();
|
||||
$this->WriteHtmlCell($w[0]+$w[1], 6, $this->getX(),$this->getY(),$kga['lang']['xp_ext']['subtotal'].':', '',0,0,true,'R');
|
||||
$this->WriteHtmlCell($w[2], 6, $this->getX(),$this->getY(),$this->money($this->moneySum),'',0,0,true,'R');
|
||||
} else if(isset($this->columns['wage'])) {
|
||||
$this->ln();
|
||||
$this->WriteHtmlCell($w[0]+$w[1], 6, $this->getX(),$this->getY(),$kga['lang']['xp_ext']['subtotal'].':', '',0,0,true,'R');
|
||||
$this->WriteHtmlCell($w[2], 6, $this->getX(),$this->getY(),$this->money($this->moneySum),'',0,0,true,'R');
|
||||
} else if(isset($this->columns['dec_time'])) {
|
||||
$this->ln();
|
||||
$this->WriteHtmlCell($w[0]+$w[1], 6, $this->getX(),$this->getY(),$kga['lang']['xp_ext']['subtotal'].':', '',0,0,true,'R');
|
||||
$this->WriteHtmlCell($w[2], 6, $this->getX(),$this->getY(),$this->timespan($this->timeSum),'',0,0,true,'R');
|
||||
}
|
||||
$this->AddPage();
|
||||
}
|
||||
|
||||
$this->ln();
|
||||
$this->Cell($w[0], 6, $from_date_string, '', 0, 'R');
|
||||
|
||||
|
||||
|
||||
for ($i=0;$i<5;$i++) {
|
||||
$handled_row = false;
|
||||
|
||||
switch ($i) {
|
||||
case 0: // row with event or event and user
|
||||
if ($event_fills_row && !empty($event_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$event_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
else if (!empty($event_string) && !empty($user_string)) {
|
||||
$this->WriteHtmlCell($w[1]/2, 6, $this->getX(),$this->getY(),$event_string, 'L');
|
||||
$this->WriteHtmlCell($w[1]/2, 6, $this->getX(),$this->getY(),$user_string, '');
|
||||
$handled_row = true;
|
||||
}
|
||||
else if (!empty($user_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$user_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1: // row with user
|
||||
if ($event_fills_row && !empty($user_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$user_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: // row with location and/or tracking number
|
||||
if (!empty($location_string) && empty($trackingnr_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$location_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
else if (empty($location_string) && !empty($trackingnr_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$trackingnr_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
else if (!empty($location_string) && !empty($trackingnr_string)) {
|
||||
$this->WriteHtmlCell($w[1]/2, 6, $this->getX(),$this->getY(),$location_string, 'L');
|
||||
$this->WriteHtmlCell($w[1]/2, 6, $this->getX(),$this->getY(),$trackingnr_string, '');
|
||||
$handled_row = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: // row with comment
|
||||
if (!empty($comment_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$comment_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4: // row with time and/or rate
|
||||
if (!empty($time_string) && empty($rate_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$time_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
else if (empty($time_string) && !empty($rate_string)) {
|
||||
$this->WriteHtmlCell($w[1], 6, $this->getX(),$this->getY(),$rate_string, 'L');
|
||||
$handled_row = true;
|
||||
}
|
||||
else if (!empty($time_string) && !empty($rate_string)) {
|
||||
$this->WriteHtmlCell($w[1]/2, 6, $this->getX(),$this->getY(),$time_string, 'L');
|
||||
$this->WriteHtmlCell($w[1]/2, 6, $this->getX(),$this->getY(),$rate_string, '');
|
||||
$handled_row = true;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if ($handled_row) {
|
||||
$field_rows--;
|
||||
|
||||
if ($field_rows == 0) { // if this is the last row
|
||||
$this->ln($this->getLastH());
|
||||
$this->Cell($w[0], 6, '');
|
||||
$this->Cell($w[1], 6, '','T');
|
||||
$this->WriteHtmlCell($w[2], 6, $this->getX(),$this->getY()-$this->getLastH(),$wage_string, '',0,0,true,'R');
|
||||
$this->ln();
|
||||
//$this->ln();
|
||||
break; // leave for loop
|
||||
}
|
||||
else {
|
||||
$this->ln();
|
||||
$this->Cell($w[0],6,'');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a header of the summarization table.
|
||||
* @param array $w widths of the columns
|
||||
* @param array $headers name of the column headers
|
||||
*/
|
||||
public function printHeader($w,$header) {
|
||||
|
||||
// Colors, line width and bold font
|
||||
$this->SetFillColor(240, 240, 240);
|
||||
$this->SetTextColor(0);
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->SetLineWidth(0.3);
|
||||
$this->SetFont('', 'B');
|
||||
|
||||
for($i = 0; $i < count($header); $i++) {
|
||||
if ($w[$i] <= 0) continue;
|
||||
$this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', 1);
|
||||
}
|
||||
$this->Ln();
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the summarization table.
|
||||
* @param array $headers name of the column headers
|
||||
* @param array $data summarized data to print
|
||||
*/
|
||||
public function ColoredTable_result($header,$data) {
|
||||
global $kga;
|
||||
$w = array($this->getPageWidth()-$this->pagedim[$this->page]['lm']-$this->pagedim[$this->page]['rm'],0,0);
|
||||
if (isset($this->columns['wage'])) {
|
||||
$w[2] = 30;
|
||||
$w[0] -= 30;
|
||||
}
|
||||
if (isset($this->columns['dec_time'])) {
|
||||
$w[1] = 30;
|
||||
$w[0] -= 30;
|
||||
}
|
||||
|
||||
// Header
|
||||
$this->printHeader($w,$header);
|
||||
|
||||
// Color and font restoration
|
||||
$this->SetFillColor(224, 235, 255);
|
||||
$this->SetTextColor(0);
|
||||
$this->SetFont('');
|
||||
// Data
|
||||
$fill = 0;
|
||||
$sum = 0;
|
||||
$sum_time = 0;
|
||||
foreach($data as $row) {
|
||||
// check if page break is nessessary
|
||||
if ($this->getPageHeight()-$this->pagedim[$this->page]['bm']-($this->getY()+20) < 0) {
|
||||
$this->Cell(array_sum($w), 0, '', 'T');
|
||||
$this->Ln();
|
||||
$this->Cell($w[0], 6, $kga['lang']['xp_ext']['subtotal'].':', '', 0, 'R', false);
|
||||
if (isset($this->columns['dec_time']))
|
||||
$this->Cell($w[1], 6, $this->timespan($sum_time), isset($this->columns['wage'])?'R':'', 0, 'R', true);
|
||||
if (isset($this->columns['wage']))
|
||||
$this->Cell($w[2], 6, $this->money($sum), 'L', 0, 'R', true);
|
||||
$this->Ln();
|
||||
$this->AddPage();
|
||||
$this->printHeader($w,$header);
|
||||
|
||||
// Color and font restoration
|
||||
$this->SetFillColor(224, 235, 255);
|
||||
$this->SetTextColor(0);
|
||||
$this->SetFont('');
|
||||
}
|
||||
$this->Cell($w[0], 6, $row['name'], 'LR', 0, 'L', $fill);
|
||||
if (isset($this->columns['dec_time']))
|
||||
$this->Cell($w[1], 6, $this->timespan($row['time']), 'LR', 0, 'R', $fill);
|
||||
if (isset($this->columns['wage']))
|
||||
$this->Cell($w[2], 6, $this->money($row['wage']), 'LR', 0, 'R', $fill);
|
||||
$this->Ln();
|
||||
$fill=!$fill;
|
||||
$sum+=$row['wage'];
|
||||
$sum_time += $row['time']==-1?0:$row['time'];
|
||||
|
||||
}
|
||||
$this->Cell(array_sum($w), 0, '', 'T');
|
||||
$this->Ln();
|
||||
|
||||
$this->Cell($w[0], 6, $kga['lang']['xp_ext']['finalamount'].':', '', 0, 'R', false);
|
||||
$this->SetFont('', 'B');
|
||||
if (isset($this->columns['dec_time']))
|
||||
$this->Cell($w[1], 6, $this->timespan($sum_time), isset($this->columns['wage'])?'R':'', 0, 'R', false);
|
||||
if (isset($this->columns['wage']))
|
||||
$this->Cell($w[2], 6, $this->money($sum), 'L', 0, 'R', false);
|
||||
$this->SetFont('');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
$pdf->columns = $columns;
|
||||
$pdf->date_format = $dateformat;
|
||||
$pdf->time_format = $timeformat;
|
||||
$pdf->print_time = time();
|
||||
$pdf->SetDisplayMode('default', 'continuous'); //PDF-Seitenanzeige fortlaufend
|
||||
|
||||
// determine page title
|
||||
switch ($filter_type) {
|
||||
case 0:
|
||||
$pdf_title = $kga['lang']['xp_ext']['pdf_headline_only_times'];
|
||||
break;
|
||||
case 1:
|
||||
$pdf_title = $kga['lang']['xp_ext']['pdf_headline_only_expenses'];
|
||||
break;
|
||||
case -1:
|
||||
default:
|
||||
$pdf_title = $kga['lang']['xp_ext']['pdf_headline'];
|
||||
}
|
||||
// determine filter values
|
||||
switch ($filter_cleared) {
|
||||
case 0:
|
||||
$pdf_filter[] = $kga['lang']['xp_ext']['cleared_open'];
|
||||
break;
|
||||
case 1:
|
||||
$pdf_filter[] = $kga['lang']['xp_ext']['cleared_cleared'];
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($filter_refundable) {
|
||||
case 0:
|
||||
$pdf_filter[] = $kga['lang']['xp_ext']['refundable_refundable'];
|
||||
break;
|
||||
case 1:
|
||||
$pdf_filter[] = $kga['lang']['xp_ext']['refundable_not_refundable'];
|
||||
break;
|
||||
}
|
||||
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetTitle($pdf_title);
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->AddPage();
|
||||
|
||||
$pdf->setFont('helvetica');
|
||||
|
||||
if (isset($_REQUEST['create_bookmarks']))
|
||||
$pdf->Bookmark($pdf_title, 0, 0);
|
||||
|
||||
//$pdf->ImageEps('kimai-logo.ai', 0, 10, 60, 0, "http://www.kimai.org", true, 'T', 'R'); // include company logo
|
||||
|
||||
|
||||
$pdf->WriteHtml('<h1>'.$pdf_title.'</h1>');
|
||||
$pdf->ln();
|
||||
|
||||
$pdf->WriteHtml('<b>'.$kga['lang']['xp_ext']['time_period'].':</b> '.
|
||||
strftime($kga['date_format']['2'],$in).' - '.strftime($kga['date_format']['2'],$out) );
|
||||
|
||||
if (isset($pdf_filter)) {
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtml('<b>' . $kga['lang']['xp_ext']['filter'] . ':</b> ' . implode(' | ', $pdf_filter));
|
||||
}
|
||||
|
||||
if (!empty($_REQUEST['document_comment'])) {
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtml($_REQUEST['document_comment']);
|
||||
}
|
||||
|
||||
$pdf->ln();
|
||||
|
||||
|
||||
if (isset($_REQUEST['print_summary'])) {
|
||||
|
||||
// arrays for keeping track to print summary
|
||||
$zef_summary = array();
|
||||
$exp_summary = array();
|
||||
|
||||
foreach ($pdf_arr_data as $customer) {
|
||||
$project_ids = array_keys($customer);
|
||||
foreach ($project_ids as $project_id) {
|
||||
foreach ($customer[$project_id] as $row) {
|
||||
|
||||
// summary aggregation
|
||||
if ($row['type'] == 'zef') {
|
||||
if (isset($zef_summary[$row['zef_evtID']])) {
|
||||
$zef_summary[$row['zef_evtID']]['time'] += ($kga['conf']['exactSums'] == 1)?$row['zef_time']/3600:$row['dec_zef_time']; //Sekunden
|
||||
$zef_summary[$row['zef_evtID']]['wage'] += ($kga['conf']['exactSums'] == 1)?$row['wage_decimal']:$row['wage']; //Euro
|
||||
}
|
||||
else {
|
||||
$zef_summary[$row['zef_evtID']]['name'] = html_entity_decode($row['evt_name']);
|
||||
$zef_summary[$row['zef_evtID']]['time'] = ($kga['conf']['exactSums'] == 1)?$row['zef_time']/3600:$row['dec_zef_time'];
|
||||
$zef_summary[$row['zef_evtID']]['wage'] = ($kga['conf']['exactSums'] == 1)?$row['wage_decimal']:$row['wage'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$exp_info['name'] = $kga['lang']['xp_ext']['expense'].': '.$row['evt_name'];
|
||||
$exp_info['time'] = -1;
|
||||
$exp_info['wage'] = $row['wage'];
|
||||
$exp_summary[] = $exp_info;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$summary = array_merge($zef_summary,$exp_summary);
|
||||
|
||||
|
||||
if (isset($_REQUEST['create_bookmarks']))
|
||||
$pdf->Bookmark($kga['lang']['xp_ext']['summary'], 0, 0);
|
||||
|
||||
|
||||
|
||||
$pdf->WriteHtml('<h4>'.$kga['lang']['xp_ext']['summary'].'</h4>');
|
||||
$pdf->ln();
|
||||
$pdf->ColoredTable_result(array($kga['lang']['evt'],$kga['lang']['xp_ext']['duration'],$kga['lang']['xp_ext']['costs']), $summary);
|
||||
|
||||
$pdf->AddPage();
|
||||
|
||||
}
|
||||
|
||||
$pdf->WriteHtml('<h4>'.$kga['lang']['xp_ext']['full_list'].'</h4>');
|
||||
$pdf->ln();
|
||||
|
||||
|
||||
$firstRun = true;
|
||||
|
||||
|
||||
foreach ($pdf_arr_data as $customer) {
|
||||
|
||||
if ($firstRun)
|
||||
$firstRun = false;
|
||||
else if (isset($_REQUEST['customer_new_page']))
|
||||
$pdf->AddPage();
|
||||
|
||||
// process each customer in first dimension
|
||||
|
||||
$project_ids = array_keys($customer);
|
||||
|
||||
// get customer name from first row of first project
|
||||
$customer_name = $customer[$project_ids[0]][0]['knd_name'];
|
||||
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtml("<h2>$customer_name</h2>");
|
||||
|
||||
foreach ($project_ids as $project_id) {
|
||||
// process each project in second dimension
|
||||
|
||||
$project_name = $customer[$project_id][0]['pct_name'];
|
||||
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtml("<h4>$project_name</h4>");
|
||||
|
||||
$max_money_width = 0;
|
||||
$max_time_width = 0;
|
||||
// calculate maximum width for time and money
|
||||
// and add to summary array
|
||||
foreach ($customer[$project_id] as $row) {
|
||||
|
||||
// maximum width calculation
|
||||
$max_money_width = max($max_money_width,$pdf->GetStringWidth($pdf->money($row['wage'])));
|
||||
|
||||
$time_width = 0;
|
||||
if (isset($columns['date']))
|
||||
$time_width += $pdf->GetStringWidth(strftime($dateformat,$row['time_in']));
|
||||
if (isset($columns['from']) && isset($columns['to']))
|
||||
$time_width += max($pdf->GetStringWidth(strftime($timeformat,$row['time_in'])),
|
||||
$pdf->GetStringWidth(strftime($timeformat,$row['time_out'])));
|
||||
else if (isset($columns['from']))
|
||||
$time_width += $pdf->GetStringWidth(strftime($timeformat,$row['time_in']));
|
||||
else
|
||||
$time_width += $pdf->GetStringWidth(strftime($timeformat,$row['time_out']));
|
||||
|
||||
|
||||
$max_time_width = max($max_time_width,$time_width);
|
||||
|
||||
|
||||
|
||||
}
|
||||
$max_time_width+=10;
|
||||
$max_money_width+=10;
|
||||
$widths = $pdf->columnWidths($max_time_width,$max_money_width);
|
||||
|
||||
$pdf->printRows($customer[$project_id],$widths);
|
||||
|
||||
|
||||
if (isset($columns['wage']) && isset($columns['dec_time'])) {
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtmlCell($widths[0]+$widths[1]+$widths[2], 6, $pdf->getX(),$pdf->getY(),$pdf->timespan($pdf->timeSum),'',0,0,true,'R');
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtmlCell($widths[0]+$widths[1], 6, $pdf->getX(),$pdf->getY(),$kga['lang']['xp_ext']['finalamount'].':', '',0,0,true,'R');
|
||||
$pdf->WriteHtmlCell($widths[2], 6, $pdf->getX(),$pdf->getY(),$pdf->money($pdf->moneySum),'',0,0,true,'R');
|
||||
} else if(isset($columns['wage'])) {
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtmlCell($widths[0]+$widths[1], 6, $pdf->getX(),$pdf->getY(),$kga['lang']['xp_ext']['finalamount'].':', '',0,0,true,'R');
|
||||
$pdf->WriteHtmlCell($widths[2], 6, $pdf->getX(),$pdf->getY(),$pdf->money($pdf->moneySum),'',0,0,true,'R');
|
||||
} else if(isset($columns['dec_time'])) {
|
||||
$pdf->ln();
|
||||
$pdf->WriteHtmlCell($widths[0]+$widths[1], 6, $pdf->getX(),$pdf->getY(),$kga['lang']['xp_ext']['finalamount'].':', '',0,0,true,'R');
|
||||
$pdf->WriteHtmlCell($widths[2], 6, $pdf->getX(),$pdf->getY(),$pdf->timespan($pdf->timeSum),'',0,0,true,'R');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$pdf->Output('invoice_'.date('Y-m-d_H-i-s', $pdf->print_time).'.pdf', ( (isset($_REQUEST['download_pdf'])) ? 'D' : 'I' ) ); // D=Download I=Eingebunden
|
||||
?>
|
||||
68
extensions/ki_export/floaters.php
Normal file
68
extensions/ki_export/floaters.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of
|
||||
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||
* (c) 2006-2009 Kimai-Development-Team
|
||||
*
|
||||
* Kimai is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; Version 3, 29 June 2007
|
||||
*
|
||||
* Kimai is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// insert KSPI
|
||||
$isCoreProcessor = 0;
|
||||
$dir_templates = "templates/floaters/";
|
||||
require("../../includes/kspi.php");
|
||||
|
||||
switch ($axAction) {
|
||||
|
||||
case "PDF":
|
||||
$defaults = array('print_comments'=>1, 'print_summary'=>1, 'create_bookmarks'=>1, 'download_pdf'=>1,
|
||||
'customer_new_page'=>0, 'reverse_order'=>0, 'pdf_format'=>'export_pdf');
|
||||
$prefs = usr_get_preferences_by_prefix('ki_export.pdf.');
|
||||
$tpl->assign('prefs', array_merge($defaults,$prefs));
|
||||
|
||||
$tpl->display("export_PDF.tpl");
|
||||
break;
|
||||
|
||||
case "XLS":
|
||||
$defaults = array('reverse_order'=>0);
|
||||
$prefs = usr_get_preferences_by_prefix('ki_export.xls.');
|
||||
$tpl->assign('prefs', array_merge($defaults,$prefs));
|
||||
|
||||
$tpl->display("export_XLS.tpl");
|
||||
break;
|
||||
|
||||
case "CSV":
|
||||
$defaults = array('column_delimiter'=>',','quote_char'=>'"','reverse_order'=>0);
|
||||
$prefs = usr_get_preferences_by_prefix('ki_export.csv.');
|
||||
$tpl->assign('prefs', array_merge($defaults,$prefs));
|
||||
|
||||
$tpl->display("export_CSV.tpl");
|
||||
break;
|
||||
|
||||
case "print":
|
||||
$defaults = array('print_summary'=>1,'reverse_order'=>0);
|
||||
$prefs = usr_get_preferences_by_prefix('ki_export.print.');
|
||||
$tpl->assign('prefs', array_merge($defaults,$prefs));
|
||||
|
||||
$tpl->display("print.tpl");
|
||||
break;
|
||||
|
||||
case "help_timeformat":
|
||||
$tpl->display("help_timeformat.tpl");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
BIN
extensions/ki_export/grfx/cleared.png
Normal file
BIN
extensions/ki_export/grfx/cleared.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 928 B |
BIN
extensions/ki_export/grfx/help.png
Normal file
BIN
extensions/ki_export/grfx/help.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 477 B |
BIN
extensions/ki_export/grfx/invert.png
Normal file
BIN
extensions/ki_export/grfx/invert.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 364 B |
BIN
extensions/ki_export/grfx/select.png
Normal file
BIN
extensions/ki_export/grfx/select.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
extensions/ki_export/grfx/stats_panel.png
Normal file
BIN
extensions/ki_export/grfx/stats_panel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
120
extensions/ki_export/init.php
Normal file
120
extensions/ki_export/init.php
Normal file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of
|
||||
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||
* (c) 2006-2009 Kimai-Development-Team
|
||||
*
|
||||
* Kimai is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; Version 3, 29 June 2007
|
||||
*
|
||||
* Kimai is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// ==================================
|
||||
// = implementing standard includes =
|
||||
// ==================================
|
||||
include('../../includes/basics.php');
|
||||
|
||||
require("private_func.php");
|
||||
|
||||
$usr = checkUser();
|
||||
|
||||
// ============================================
|
||||
// = initialize currently displayed timespace =
|
||||
// ============================================
|
||||
$timespace = get_timespace();
|
||||
$in = $timespace[0];
|
||||
$out = $timespace[1];
|
||||
|
||||
// set smarty config
|
||||
require_once('../../libraries/smarty/Smarty.class.php');
|
||||
$tpl = new Smarty();
|
||||
$tpl->template_dir = 'templates/';
|
||||
$tpl->compile_dir = 'compile/';
|
||||
|
||||
$tpl->assign('kga', $kga);
|
||||
|
||||
// prevent IE from caching the response
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
$timeformat = 'H:M';
|
||||
$dateformat = 'd.m.';
|
||||
$tpl->assign('timeformat',$timeformat);
|
||||
$tpl->assign('dateformat',$dateformat);
|
||||
|
||||
$tpl->display('panel.tpl');
|
||||
|
||||
|
||||
$tpl->assign('timeformat',preg_replace('/([A-Za-z])/','%$1',$timeformat));
|
||||
$tpl->assign('dateformat',preg_replace('/([A-Za-z])/','%$1',$dateformat));
|
||||
|
||||
// Get the total amount of time shown in the table.
|
||||
if (isset($kga['customer']))
|
||||
$total = formatDuration(get_zef_time($in,$out,null,array($kga['customer']['knd_ID']),null));
|
||||
else
|
||||
$total = formatDuration(get_zef_time($in,$out,array($kga['usr']['usr_ID']),null,null));
|
||||
|
||||
if (isset($kga['customer']))
|
||||
$arr_zef = xp_get_arr($in,$out,null,array($kga['customer']['knd_ID']));
|
||||
else
|
||||
$arr_zef = xp_get_arr($in,$out,array($kga['usr']['usr_ID']));
|
||||
|
||||
if (count($arr_zef)>0) {
|
||||
$tpl->assign('arr_data', $arr_zef);
|
||||
} else {
|
||||
$tpl->assign('arr_data', 0);
|
||||
}
|
||||
|
||||
$tpl->assign('total', $total);
|
||||
|
||||
// Get the annotations for the user sub list.
|
||||
if (isset($kga['customer']))
|
||||
$ann = xp_get_arr_usr($in,$out,null,array($kga['customer']['knd_ID']));
|
||||
else
|
||||
$ann = xp_get_arr_usr($in,$out,array($kga['usr']['usr_ID']));
|
||||
formatAnnotations($ann);
|
||||
$tpl->assign('usr_ann',$ann);
|
||||
|
||||
// Get the annotations for the customer sub list.
|
||||
if (isset($kga['customer']))
|
||||
$ann = xp_get_arr_knd($in,$out,null,array($kga['customer']['knd_ID']));
|
||||
else
|
||||
$ann = xp_get_arr_knd($in,$out,array($kga['usr']['usr_ID']));
|
||||
formatAnnotations($ann);
|
||||
$tpl->assign('knd_ann',$ann);
|
||||
|
||||
// Get the annotations for the project sub list.
|
||||
if (isset($kga['customer']))
|
||||
$ann = xp_get_arr_pct($in,$out,null,array($kga['customer']['knd_ID']));
|
||||
else
|
||||
$ann = xp_get_arr_pct($in,$out,array($kga['usr']['usr_ID']));
|
||||
formatAnnotations($ann);
|
||||
$tpl->assign('pct_ann',$ann);
|
||||
|
||||
// Get the annotations for the task sub list.
|
||||
if (isset($kga['customer']))
|
||||
$ann = xp_get_arr_evt($in,$out,null,array($kga['customer']['knd_ID']));
|
||||
else
|
||||
$ann = xp_get_arr_evt($in,$out,array($kga['usr']['usr_ID']));
|
||||
formatAnnotations($ann);
|
||||
$tpl->assign('evt_ann',$ann);
|
||||
|
||||
// Get the columns the user had disabled last time.
|
||||
if (isset($kga['usr']))
|
||||
$tpl->assign('disabled_columns',xp_get_disabled_headers($kga['usr']['usr_ID']));
|
||||
|
||||
$tpl->assign('table_display', $tpl->fetch("table.tpl"));
|
||||
|
||||
$tpl->display('main.tpl');
|
||||
|
||||
?>
|
||||
360
extensions/ki_export/js/xp_func.js
Normal file
360
extensions/ki_export/js/xp_func.js
Normal file
@@ -0,0 +1,360 @@
|
||||
/**
|
||||
* This file is part of
|
||||
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||
* (c) 2006-2009 Kimai-Development-Team
|
||||
*
|
||||
* Kimai is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; Version 3, 29 June 2007
|
||||
*
|
||||
* Kimai is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Javascript functions used in the export extension.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The extension was loaded, do some setup stuff.
|
||||
*/
|
||||
function xp_ext_onload() {
|
||||
xp_ext_resize();
|
||||
$("#loader").hide();
|
||||
lists_visible(true);
|
||||
|
||||
$('#xp_ext_select_filter').click(function(){
|
||||
xp_ext_select_filter();
|
||||
});
|
||||
|
||||
$('#xp_ext_select_location').click(function(){
|
||||
xp_ext_select_location();
|
||||
});
|
||||
|
||||
$('#xp_ext_select_timeformat').click(function(){
|
||||
xp_ext_select_timeformat();
|
||||
});
|
||||
|
||||
$('#xp_ext_export_pdf').click(function(){
|
||||
this.blur();
|
||||
floaterShow('../extensions/ki_export/floaters.php','PDF',0,0,600,570);
|
||||
});
|
||||
|
||||
$('#xp_ext_export_xls').click(function(){
|
||||
this.blur();
|
||||
floaterShow('../extensions/ki_export/floaters.php','XLS',0,0,600,570);
|
||||
});
|
||||
$('#xp_ext_export_csv').click(function(){
|
||||
this.blur();
|
||||
floaterShow('../extensions/ki_export/floaters.php','CSV',0,0,600,570);
|
||||
});
|
||||
|
||||
$('#xp_ext_print').click(function(){
|
||||
this.blur();
|
||||
floaterShow('../extensions/ki_export/floaters.php','print',0,0,600,570);
|
||||
});
|
||||
|
||||
$('.helpfloater').click(function(){
|
||||
this.blur();
|
||||
floaterShow('../extensions/ki_export/floaters.php','help_timeformat',0,0,600,570);
|
||||
});
|
||||
|
||||
xp_ext_select_filter();
|
||||
xp_ext_reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Show the tab which allows filtering.
|
||||
*/
|
||||
function xp_ext_select_filter()
|
||||
{
|
||||
$('#xp_ext_select_filter').addClass("pressed");
|
||||
$('#xp_ext_tab_filter').css("display","block");
|
||||
|
||||
$('#xp_ext_select_location').removeClass("pressed");
|
||||
$('#xp_ext_tab_location').css("display","none");
|
||||
$('#xp_ext_select_timeformat').removeClass("pressed");
|
||||
$('#xp_ext_tab_timeformat').css("display","none");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the tab via which the default location can be set.
|
||||
*/
|
||||
function xp_ext_select_location()
|
||||
{
|
||||
$('#xp_ext_select_location').addClass("pressed");
|
||||
$('#xp_ext_tab_location').css("display","block");
|
||||
|
||||
$('#xp_ext_select_filter').removeClass("pressed");
|
||||
$('#xp_ext_tab_filter').css("display","none");
|
||||
$('#xp_ext_select_timeformat').removeClass("pressed");
|
||||
$('#xp_ext_tab_timeformat').css("display","none");
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the tab which lets the user define the date and time format.
|
||||
*/
|
||||
function xp_ext_select_timeformat()
|
||||
{
|
||||
$('#xp_ext_select_timeformat').addClass("pressed");
|
||||
$('#xp_ext_tab_timeformat').css("display","block");
|
||||
|
||||
$('#xp_ext_select_filter').removeClass("pressed");
|
||||
$('#xp_ext_tab_filter').css("display","none");
|
||||
$('#xp_ext_select_location').removeClass("pressed");
|
||||
$('#xp_ext_tab_location').css("display","none");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// mitgebracht von ts_ext:
|
||||
|
||||
|
||||
/**
|
||||
* Update the dimension variables to reflect new height and width.
|
||||
*/
|
||||
function xp_ext_get_dimensions() {
|
||||
scroller_width = 17;
|
||||
if (navigator.platform.substr(0,3)=='Mac') {
|
||||
scroller_width = 16;
|
||||
}
|
||||
|
||||
(kndShrinkMode)?subtableCount=2:subtableCount=3;
|
||||
subtableWidth = (pageWidth()-10)/subtableCount-7 ;
|
||||
|
||||
xp_w = pageWidth()-24;
|
||||
xp_h = pageHeight()-274-headerHeight()-28;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The window has been resized, we have to adjust to the new space.
|
||||
*/
|
||||
function xp_ext_resize() {
|
||||
xp_ext_set_tableWrapperWidths();
|
||||
xp_ext_set_heightTop();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set width of table and faked table head.
|
||||
*/
|
||||
function xp_ext_set_tableWrapperWidths() {
|
||||
xp_ext_get_dimensions();
|
||||
// zef: set width of table and faked table head
|
||||
$("#xp_head,#xp").css("width",xp_w);
|
||||
xp_ext_set_TableWidths();
|
||||
}
|
||||
|
||||
/**
|
||||
* If the extension is being shrinked so the sublists are shown larger
|
||||
* adjust to that.
|
||||
*/
|
||||
function xp_ext_set_heightTop() {
|
||||
xp_ext_get_dimensions();
|
||||
if (!extShrinkMode) {
|
||||
$("#xp").css("height", xp_h);
|
||||
} else {
|
||||
$("#xp").css("height", "20px");
|
||||
}
|
||||
|
||||
xp_ext_set_TableWidths();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the width of the table.
|
||||
*/
|
||||
function xp_ext_set_TableWidths() {
|
||||
xp_ext_get_dimensions();
|
||||
// set table widths
|
||||
|
||||
($("#xp").innerHeight()-$("#xp table").outerHeight()>0)?scr=0:scr=scroller_width; // width of zef table depending on scrollbar or not
|
||||
$("#xp table").css("width",xp_w-scr);
|
||||
|
||||
$("#xp_head > table").css("width", "100%");
|
||||
|
||||
|
||||
$("#xp_head > table > tbody > tr > td.time").css("width", $("div#xp > div > table > tbody > tr > td.time").width());
|
||||
$("#xp_head > table > tbody > tr > td.knd").css("width", $("div#xp > div > table > tbody > tr > td.knd").width());
|
||||
$("#xp_head > table > tbody > tr > td.pct").css("width", $("div#xp > div > table > tbody > tr > td.pct").width());
|
||||
$("#xp_head > table > tbody > tr > td.evt").css("width", $("div#xp > div > table > tbody > tr > td.evt").width());
|
||||
$("#xp_head > table > tbody > tr > td.moreinfo").css("width",
|
||||
$("div#xp > div > table > tbody > tr > td.comment").width()+
|
||||
$("div#xp > div > table > tbody > tr > td.location").width()+
|
||||
$("div#xp > div > table > tbody > tr > td.trackingnr").width()
|
||||
);
|
||||
}
|
||||
|
||||
function xp_ext_triggerchange() {
|
||||
if (xp_tss_hook_flag) {
|
||||
xp_ext_reload();
|
||||
xp_chk_hook_flag = 0;
|
||||
xp_chp_hook_flag = 0;
|
||||
xp_che_hook_flag = 0;
|
||||
}
|
||||
if (xp_chk_hook_flag) {
|
||||
xp_ext_triggerCHK();
|
||||
xp_chp_hook_flag = 0;
|
||||
xp_che_hook_flag = 0;
|
||||
}
|
||||
if (xp_chp_hook_flag) {
|
||||
xp_ext_triggerCHP();
|
||||
}
|
||||
if (xp_che_hook_flag) {
|
||||
xp_ext_triggerCHE();
|
||||
}
|
||||
|
||||
xp_tss_hook_flag = 0;
|
||||
xp_rec_hook_flag = 0;
|
||||
xp_stp_hook_flag = 0;
|
||||
xp_chk_hook_flag = 0;
|
||||
xp_chp_hook_flag = 0;
|
||||
xp_che_hook_flag = 0;
|
||||
if ($('.ki_export').html() != '')
|
||||
xp_ext_reload();
|
||||
}
|
||||
|
||||
function xp_ext_triggerTSS() {
|
||||
if ($('.ki_export').css('display') == "block") {
|
||||
xp_ext_reload();
|
||||
} else {
|
||||
xp_tss_hook_flag++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function xp_ext_triggerCHK() {
|
||||
if ($('.ki_export').css('display') == "block") {
|
||||
xp_ext_reload();
|
||||
} else {
|
||||
xp_chk_hook_flag++;
|
||||
}
|
||||
}
|
||||
|
||||
function xp_ext_triggerCHP() {
|
||||
if ($('.ki_export').css('display') == "block") {
|
||||
xp_ext_reload();
|
||||
} else {
|
||||
xp_chp_hook_flag++;
|
||||
}
|
||||
}
|
||||
|
||||
function xp_ext_triggerCHE() {
|
||||
if ($('.ki_export').css('display') == "block") {
|
||||
xp_ext_reload();
|
||||
} else {
|
||||
xp_che_hook_flag++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// reloads timesheet, customer, project and event tables
|
||||
//
|
||||
function xp_ext_reload() {
|
||||
|
||||
// don't reload if extension is not loaded
|
||||
if ($('.ki_export').html() =='')
|
||||
return;
|
||||
|
||||
$.post(xp_ext_path + "processor.php", { axAction: "reload", axValue: filterUsr.join(":")+'|'+filterKnd.join(":")+'|'+filterPct.join(":")+'|'+filterEvt.join(":"),
|
||||
id: 0, timeformat: $("#xp_ext_timeformat").val(), dateformat: $("#xp_ext_dateformat").val(), default_location: $("#xp_ext_default_location").val(),
|
||||
filter_cleared:$('#xp_ext_tab_filter_cleared').attr('value'),
|
||||
filter_refundable:$('#xp_ext_tab_filter_refundable').attr('value'),
|
||||
filter_type:$('#xp_ext_tab_filter_type').attr('value'),
|
||||
first_day: new Date($('#pick_in').val()).getTime()/1000, last_day: new Date($('#pick_out').val()).getTime()/1000 },
|
||||
function(data) {
|
||||
$("#xp").html(data);
|
||||
|
||||
// set zef table width
|
||||
($("#xp").innerHeight()-$("#xp table").outerHeight() > 0 ) ? scr=0 : scr=scroller_width; // width of zef table depending on scrollbar or not
|
||||
$("#xp table").css("width",xp_w-scr);
|
||||
// stretch customer column in faked zef table head
|
||||
$("#xp_head > table > tbody > tr > td.knd").css("width", $("div#xp > div > table > tbody > tr > td.knd").width());
|
||||
// stretch project column in faked zef table head
|
||||
$("#xp_head > table > tbody > tr > td.pct").css("width", $("div#xp > div > table > tbody > tr > td.pct").width());
|
||||
xp_ext_resize();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Toggle the enabled state of a column.
|
||||
*/
|
||||
function xp_toggle_column(name) {
|
||||
if ($("#xp_head > table > tbody > tr ."+name).hasClass('disabled')) {
|
||||
returnfunction = new Function("data","if (data!=1) return;\
|
||||
$('#xp_head > table > tbody > tr ."+name+"').removeClass('disabled');\
|
||||
$('div#xp > div > table > tbody > tr > td."+name+"').removeClass('disabled'); ");
|
||||
$.post(xp_ext_path + "processor.php", { axAction: "toggle_header", axValue: name },
|
||||
returnfunction
|
||||
);
|
||||
|
||||
}
|
||||
else {
|
||||
returnfunction = new Function("data","if (data!=1) return;\
|
||||
$('#xp_head > table > tbody > tr ."+name+"').addClass('disabled'); \
|
||||
$('div#xp > div > table > tbody > tr > td."+name+"').addClass('disabled'); ");
|
||||
$.post(xp_ext_path + "processor.php", { axAction: "toggle_header", axValue: name },
|
||||
returnfunction
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the cleared state of an entry.
|
||||
*/
|
||||
function xp_toggle_cleared(id) {
|
||||
path = "#xp"+id+">td.cleared>a";
|
||||
if ($(path).hasClass("is_cleared")) {
|
||||
returnfunction = new Function("data","if (data!=1) return;\
|
||||
$('"+path+"').removeClass('is_cleared');\
|
||||
$('"+path+"').addClass('isnt_cleared');");
|
||||
$.post(xp_ext_path + "processor.php", { axAction: "set_cleared", axValue: 0, id: id },
|
||||
returnfunction
|
||||
);
|
||||
|
||||
}
|
||||
else {
|
||||
returnfunction = new Function("data","if (data!=1) return;\
|
||||
$('"+path+"').removeClass('isnt_cleared');\
|
||||
$('"+path+"').addClass('is_cleared');");
|
||||
$.post(xp_ext_path + "processor.php", { axAction: "set_cleared", axValue: 1, id: id },
|
||||
returnfunction
|
||||
);
|
||||
}
|
||||
$(path).blur();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a list of enabled columns.
|
||||
*/
|
||||
function xp_enabled_columns() {
|
||||
columns = new Array('date','from','to','time','dec_time','rate','wage','knd','division','pct','action','comment','location','trackingnr','user','cleared');
|
||||
columnsString = '';
|
||||
firstColumn = true;
|
||||
$(columns).each(function () {
|
||||
if (!$('#xp_head .'+this).hasClass('disabled')) {
|
||||
columnsString += (firstColumn?'':'|') + this;
|
||||
firstColumn = false;
|
||||
}
|
||||
});
|
||||
return columnsString;
|
||||
}
|
||||
44
extensions/ki_export/js/xp_init.js
Normal file
44
extensions/ki_export/js/xp_init.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* This file is part of
|
||||
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||
* (c) 2006-2009 Kimai-Development-Team
|
||||
*
|
||||
* Kimai is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; Version 3, 29 June 2007
|
||||
*
|
||||
* Kimai is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// ===========
|
||||
// XP EXT init
|
||||
// ===========
|
||||
|
||||
// set path of extension
|
||||
var xp_ext_path = "../extensions/ki_export/";
|
||||
|
||||
var scroller_width;
|
||||
var drittel;
|
||||
var xp_w;
|
||||
var xp_h;
|
||||
|
||||
var xp_tss_hook_flag = 0;
|
||||
var xp_rec_hook_flag = 0;
|
||||
var xp_stp_hook_flag = 0;
|
||||
var xp_chk_hook_flag = 0;
|
||||
var xp_chp_hook_flag = 0;
|
||||
var xp_che_hook_flag = 0;
|
||||
|
||||
$(document).ready(function(){
|
||||
var xp_resizeTimer = null;
|
||||
$(window).bind('resize', function() {
|
||||
if (xp_resizeTimer) clearTimeout(xp_resizeTimer);
|
||||
xp_resizeTimer = setTimeout(xp_ext_resize, 500);
|
||||
});
|
||||
});
|
||||
124
extensions/ki_export/private_db_layer_mysql.php
Normal file
124
extensions/ki_export/private_db_layer_mysql.php
Normal file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of
|
||||
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||
* (c) 2006-2009 Kimai-Development-Team
|
||||
*
|
||||
* Kimai is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; Version 3, 29 June 2007
|
||||
*
|
||||
* Kimai is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* set cleared state for zef entry
|
||||
*
|
||||
* @param integer $id -> ID of record
|
||||
* @param boolean $cleared -> true if record is cleared, otherwise false
|
||||
* @global array $kga kimai-global-array
|
||||
* @author sl
|
||||
*/
|
||||
function xp_zef_set_cleared($id,$cleared) {
|
||||
global $kga,$conn;
|
||||
|
||||
$table = $kga['server_prefix']."zef";
|
||||
$values['zef_cleared'] = $cleared?1:0;
|
||||
$filter['zef_ID'] = MySQL::SQLValue($id,MySQL::SQLVALUE_NUMBER);
|
||||
$query = MySQL::BuildSQLUpdate($table, $values, $filter);
|
||||
|
||||
if ($conn->Query($query))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* set cleared state for exp entry
|
||||
*
|
||||
* @param integer $id -> ID of record
|
||||
* @param boolean $cleared -> true if record is cleared, otherwise false
|
||||
* @global array $kga kimai-global-array
|
||||
* @author sl
|
||||
*/
|
||||
function xp_exp_set_cleared($id,$cleared) {
|
||||
global $kga,$conn;
|
||||
|
||||
$table = $kga['server_prefix']."exp";
|
||||
$values['exp_cleared'] = $cleared?1:0;
|
||||
$filter['exp_ID'] = MySQL::SQLValue($id,MySQL::SQLVALUE_NUMBER);
|
||||
$query = MySQL::BuildSQLUpdate($table, $values, $filter);
|
||||
|
||||
if ($conn->Query($query))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* save deselection of columns
|
||||
*
|
||||
* @param string $header -> header name
|
||||
* @global array $kga kimai-global-array
|
||||
* @global array $all_column_headers array containing all columns
|
||||
* @author sl
|
||||
*/
|
||||
function xp_toggle_header($header) {
|
||||
global $kga,$conn,$all_column_headers;
|
||||
|
||||
$header_number = array_search($header,$all_column_headers);
|
||||
|
||||
$table = $kga['server_prefix']."preferences";
|
||||
$values['value'] = "`value`^POWER(2,$header_number)";
|
||||
$filter['userID'] = MySQL::SQLValue($kga['usr']['usr_ID'],MySQL::SQLVALUE_NUMBER);
|
||||
$filter['var'] = MySQL::SQLValue('export_disabled_columns');
|
||||
$query = MySQL::BuildSQLUpdate($table, $values, $filter);
|
||||
|
||||
if ($conn->Query($query))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* get list of deselected columns
|
||||
*
|
||||
* @param integer $user_id -> header name
|
||||
* @global array $kga kimai-global-array
|
||||
* @global array $all_column_headers array containing all columns
|
||||
* @author sl
|
||||
*/
|
||||
function xp_get_disabled_headers($user_id) {
|
||||
global $kga,$conn,$all_column_headers;
|
||||
|
||||
$disabled_headers = array();
|
||||
|
||||
$filter['userID'] = MySQL::SQLValue($user_id, MySQL::SQLVALUE_NUMBER);
|
||||
$filter['var'] = MySQL::SQLValue('export_disabled_columns');
|
||||
$table = $kga['server_prefix']."preferences";
|
||||
|
||||
if (!$conn->SelectRows($table, $filter)) return 0;
|
||||
|
||||
$result_array = $conn->RowArray(0,MYSQL_ASSOC);
|
||||
$code = $result_array['value'];
|
||||
|
||||
$i = 0;
|
||||
while ($code>0) {
|
||||
if ($code%2==1) // bit set?
|
||||
$disabled_headers[$all_column_headers[$i]] = true;
|
||||
|
||||
// next bit and array element
|
||||
$code = $code/2;
|
||||
$i++;
|
||||
}
|
||||
return $disabled_headers;
|
||||
}
|
||||
?>
|
||||
131
extensions/ki_export/private_db_layer_pdo.php
Normal file
131
extensions/ki_export/private_db_layer_pdo.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of
|
||||
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||
* (c) 2006-2009 Kimai-Development-Team
|
||||
*
|
||||
* Kimai is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; Version 3, 29 June 2007
|
||||
*
|
||||
* Kimai is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* set cleared state for zef entry
|
||||
*
|
||||
* @param integer $id -> ID of record
|
||||
* @param boolean $cleared -> true if record is cleared, otherwise false
|
||||
* @global array $kga kimai-global-array
|
||||
* @author sl
|
||||
*/
|
||||
function xp_zef_set_cleared($id,$cleared) {
|
||||
global $kga;
|
||||
global $pdo_conn;
|
||||
$p = $kga['server_prefix'];
|
||||
|
||||
$pdo_query = $pdo_conn->prepare("UPDATE ${p}zef SET zef_cleared = ? WHERE `zef_ID` = ? LIMIT 1;");
|
||||
$result = $pdo_query->execute(array($cleared?1:0,$id));
|
||||
|
||||
if ($result)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* set cleared state for exp entry
|
||||
*
|
||||
* @param integer $id -> ID of record
|
||||
* @param boolean $cleared -> true if record is cleared, otherwise false
|
||||
* @global array $kga kimai-global-array
|
||||
* @author sl
|
||||
*/
|
||||
function xp_exp_set_cleared($id,$cleared) {
|
||||
global $kga;
|
||||
global $pdo_conn;
|
||||
$p = $kga['server_prefix'];
|
||||
|
||||
$pdo_query = $pdo_conn->prepare("UPDATE ${p}exp SET exp_cleared = ? WHERE `exp_ID` = ? LIMIT 1;");
|
||||
$result = $pdo_query->execute(array($cleared?1:0,$id));
|
||||
|
||||
if ($result)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* save deselection of columns
|
||||
*
|
||||
* @param string $header -> header name
|
||||
* @global array $kga kimai-global-array
|
||||
* @global array $all_column_headers array containing all columns
|
||||
* @author sl
|
||||
*/
|
||||
function xp_toggle_header($header) {
|
||||
global $kga,$pdo_conn,$all_column_headers;
|
||||
$p = $kga['server_prefix'];
|
||||
|
||||
|
||||
$header_number = array_search($header,$all_column_headers);
|
||||
|
||||
$pdo_query = $pdo_conn->prepare(
|
||||
"UPDATE ${p}preferences SET
|
||||
`value` = `value`^POWER(2,?)
|
||||
WHERE `var` = \"export_disabled_columns\" AND `userID` = ?;");
|
||||
$result = $pdo_query->execute(array($header_number,$kga['usr']['usr_ID']));
|
||||
|
||||
if ($result)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* get list of deselected columns
|
||||
*
|
||||
* @param integer $user_id -> header name
|
||||
* @global array $kga kimai-global-array
|
||||
* @global array $all_column_headers array containing all columns
|
||||
* @author sl
|
||||
*/
|
||||
function xp_get_disabled_headers($user_id) {
|
||||
global $kga,$pdo_conn,$all_column_headers;
|
||||
$p = $kga['server_prefix'];
|
||||
|
||||
$disabled_headers = array();
|
||||
|
||||
$pdo_query = $pdo_conn->prepare(
|
||||
"SELECT value FROM ${p}preferences
|
||||
WHERE `var` = \"export_disabled_columns\" AND `userID` = ?;");
|
||||
|
||||
if (!$pdo_query->execute(array($user_id))) return 0;
|
||||
|
||||
|
||||
$result_array = $pdo_query->fetch(PDO::FETCH_ASSOC);
|
||||
$code = $result_array['value'];
|
||||
|
||||
$i = 0;
|
||||
while ($code>0) {
|
||||
if ($code%2==1) // bit set?
|
||||
$disabled_headers[$all_column_headers[$i]] = true;
|
||||
|
||||
// next bit and array element
|
||||
$code = $code/2;
|
||||
$i++;
|
||||
}
|
||||
return $disabled_headers;
|
||||
}
|
||||
?>
|
||||
330
extensions/ki_export/private_func.php
Normal file
330
extensions/ki_export/private_func.php
Normal file
@@ -0,0 +1,330 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of
|
||||
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||
* (c) 2006-2009 Kimai-Development-Team
|
||||
*
|
||||
* Kimai is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; Version 3, 29 June 2007
|
||||
*
|
||||
* Kimai is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$all_column_headers = array('date','from','to','time','dec_time','rate','wage','knd','division','pct','evt','comment','location','trackingnr','user','cleared');
|
||||
|
||||
|
||||
// Determine if the expenses extension is used.
|
||||
$expense_ext_available = false;
|
||||
if (file_exists('../ki_expenses/private_db_layer_'.$kga['server_conn'].'.php')) {
|
||||
include('../ki_expenses/private_db_layer_'.$kga['server_conn'].'.php');
|
||||
$expense_ext_available = true;
|
||||
}
|
||||
include('private_db_layer_'.$kga['server_conn'].'.php');
|
||||
|
||||
/**
|
||||
* Get a combined array with time recordings and expenses to export.
|
||||
*
|
||||
* @param int $start Time from which to take entries into account.
|
||||
* @param int $end Time until which to take entries into account.
|
||||
* @param array $users Array of user IDs to filter by.
|
||||
* @param array $customers Array of customer IDs to filter by.
|
||||
* @param array $projects Array of project IDs to filter by.
|
||||
* @param array $events Array of event IDs to filter by.
|
||||
* @param bool $limit sbould the amount of entries be limited
|
||||
* @param bool $reverse_order should the entries be put out in reverse order
|
||||
* @param string $default_location use this string if no location is set for the entry
|
||||
* @param int $filter_cleared (-1: show all, 0:only cleared 1: only not cleared) entries
|
||||
* @param int $filter_type (-1 show time and expenses, 0: only show time entries, 1: only show expenses)
|
||||
* @param int $limitCommentSize should comments be cut off, when they are too long
|
||||
* @return array with time recordings and expenses chronologically sorted
|
||||
*/
|
||||
function xp_get_arr($start,$end,$users = null,$customers = null,$projects = null,$events = null,$limit=false,$reverse_order=false,$default_location='',$filter_cleared=-1,$filter_type=-1,$limitCommentSize=true,$filter_refundable=-1) {
|
||||
global $expense_ext_available;
|
||||
|
||||
$zef_arr = array();
|
||||
$exp_arr = array();
|
||||
|
||||
if ($filter_type != 1)
|
||||
$zef_arr = get_arr_zef($start,$end,$users,$customers,$projects,$events,$limit,$reverse_order,$filter_cleared);
|
||||
|
||||
if ($filter_type != 0 && $expense_ext_available)
|
||||
$exp_arr = get_arr_exp($start,$end,$users,$customers,$projects,$limit,$reverse_order,$filter_refundable,$filter_cleared);
|
||||
|
||||
$result_arr = array();
|
||||
|
||||
$zef_arr_index = 0;
|
||||
$exp_arr_index = 0;
|
||||
while ($zef_arr_index < count($zef_arr) && $exp_arr_index < count($exp_arr)) {
|
||||
$arr = array();
|
||||
if ( (!$reverse_order && ($zef_arr[$zef_arr_index]['zef_in'] > $exp_arr[$exp_arr_index]['exp_timestamp']) ) ||
|
||||
( $reverse_order && ($zef_arr[$zef_arr_index]['zef_in'] < $exp_arr[$exp_arr_index]['exp_timestamp']) ) ) {
|
||||
|
||||
if ($zef_arr[$zef_arr_index]['zef_out'] != 0) {
|
||||
// active recordings will be omitted
|
||||
$arr['type'] = 'zef';
|
||||
$arr['id'] = $zef_arr[$zef_arr_index]['zef_ID'];
|
||||
$arr['time_in'] = $zef_arr[$zef_arr_index]['zef_in'];
|
||||
$arr['time_out'] = $zef_arr[$zef_arr_index]['zef_out'];
|
||||
$arr['zef_time'] = $zef_arr[$zef_arr_index]['zef_time'];
|
||||
$arr['zef_duration'] = $zef_arr[$zef_arr_index]['zef_duration'];
|
||||
$arr['dec_zef_time'] = sprintf("%01.2f",$zef_arr[$zef_arr_index]['zef_time']/3600);
|
||||
$arr['zef_rate'] = $zef_arr[$zef_arr_index]['zef_rate'];
|
||||
$arr['wage'] = $zef_arr[$zef_arr_index]['wage'];
|
||||
$arr['wage_decimal'] = $zef_arr[$zef_arr_index]['wage_decimal'];
|
||||
$arr['pct_kndID'] = $zef_arr[$zef_arr_index]['pct_kndID'];
|
||||
$arr['knd_name'] = $zef_arr[$zef_arr_index]['knd_name'];
|
||||
$arr['division'] = $zef_arr[$zef_arr_index]['zef_division'];
|
||||
$arr['pct_ID'] = $zef_arr[$zef_arr_index]['pct_ID'];
|
||||
$arr['pct_name'] = $zef_arr[$zef_arr_index]['pct_name'];
|
||||
$arr['pct_comment'] = $zef_arr[$zef_arr_index]['pct_comment'];
|
||||
$arr['zef_evtID'] = $zef_arr[$zef_arr_index]['zef_evtID'];
|
||||
$arr['evt_name'] = $zef_arr[$zef_arr_index]['evt_name'];
|
||||
if ($limitCommentSize)
|
||||
$arr['comment'] = addEllipsis($zef_arr[$zef_arr_index]['zef_comment'], 150);
|
||||
else
|
||||
$arr['comment'] = $zef_arr[$zef_arr_index]['zef_comment'];
|
||||
$arr['comment_type'] = $zef_arr[$zef_arr_index]['zef_comment_type'];
|
||||
$arr['location'] = $zef_arr[$zef_arr_index]['zef_location'];
|
||||
if (empty($arr['location']))
|
||||
$arr['location'] = $default_location;
|
||||
$arr['trackingnr'] = $zef_arr[$zef_arr_index]['zef_trackingnr'];
|
||||
$arr['username'] = $zef_arr[$zef_arr_index]['usr_name'];
|
||||
$arr['cleared'] = $zef_arr[$zef_arr_index]['zef_cleared'];
|
||||
}
|
||||
$zef_arr_index++;
|
||||
}
|
||||
else {
|
||||
$arr['type'] = 'exp';
|
||||
$arr['id'] = $exp_arr[$exp_arr_index]['exp_ID'];
|
||||
$arr['time_in'] = $exp_arr[$exp_arr_index]['exp_timestamp'];
|
||||
$arr['time_out'] = $exp_arr[$exp_arr_index]['exp_timestamp'];
|
||||
$arr['zef_time'] = null;
|
||||
$arr['zef_apos'] = null;
|
||||
$arr['dec_zef_time'] = null;
|
||||
$arr['zef_rate'] = null;
|
||||
$arr['wage'] = sprintf("%01.2f",$exp_arr[$exp_arr_index]['exp_value']*$exp_arr[$exp_arr_index]['exp_multiplier']);
|
||||
$arr['pct_kndID'] = $exp_arr[$exp_arr_index]['pct_kndID'];
|
||||
$arr['knd_name'] = $exp_arr[$exp_arr_index]['knd_name'];
|
||||
$arr['division'] = $exp_arr[$exp_arr_index]['zef_division'];
|
||||
$arr['pct_ID'] = $exp_arr[$exp_arr_index]['pct_ID'];
|
||||
$arr['pct_name'] = $exp_arr[$exp_arr_index]['pct_name'];
|
||||
if ($limitCommentSize)
|
||||
$arr['comment'] = addEllipsis($exp_arr[$exp_arr_index]['exp_comment'],150);
|
||||
else
|
||||
$arr['comment'] = $exp_arr[$exp_arr_index]['exp_comment'];
|
||||
$arr['evt_name'] = $exp_arr[$exp_arr_index]['exp_designation'];
|
||||
$arr['comment'] = $exp_arr[$exp_arr_index]['exp_comment'];
|
||||
$arr['comment_type'] = $exp_arr[$exp_arr_index]['exp_comment_type'];
|
||||
$arr['location'] = $default_location;
|
||||
$arr['trackingnr'] = null;
|
||||
$arr['username'] = $exp_arr[$exp_arr_index]['usr_name'];
|
||||
$arr['cleared'] = $exp_arr[$exp_arr_index]['exp_cleared'];
|
||||
$exp_arr_index++;
|
||||
}
|
||||
$result_arr[] = $arr;
|
||||
}
|
||||
while ($zef_arr_index < count($zef_arr)) {
|
||||
if ($zef_arr[$zef_arr_index]['zef_out'] != 0) {
|
||||
// active recordings will be omitted
|
||||
$arr = array();
|
||||
$arr['type'] = 'zef';
|
||||
$arr['id'] = $zef_arr[$zef_arr_index]['zef_ID'];
|
||||
$arr['time_in'] = $zef_arr[$zef_arr_index]['zef_in'];
|
||||
$arr['time_out'] = $zef_arr[$zef_arr_index]['zef_out'];
|
||||
$arr['zef_time'] = $zef_arr[$zef_arr_index]['zef_time'];
|
||||
$arr['zef_duration'] = $zef_arr[$zef_arr_index]['zef_duration'];
|
||||
$arr['dec_zef_time'] = sprintf("%01.2f",$zef_arr[$zef_arr_index]['zef_time']/3600);
|
||||
$arr['zef_rate'] = $zef_arr[$zef_arr_index]['zef_rate'];
|
||||
$arr['wage'] = $zef_arr[$zef_arr_index]['wage'];
|
||||
$arr['wage_decimal'] = $zef_arr[$zef_arr_index]['wage_decimal'];
|
||||
$arr['pct_kndID'] = $zef_arr[$zef_arr_index]['pct_kndID'];
|
||||
$arr['knd_name'] = $zef_arr[$zef_arr_index]['knd_name'];
|
||||
$arr['division'] = $zef_arr[$zef_arr_index]['zef_division'];
|
||||
$arr['pct_ID'] = $zef_arr[$zef_arr_index]['pct_ID'];
|
||||
$arr['pct_name'] = $zef_arr[$zef_arr_index]['pct_name'];
|
||||
$arr['pct_comment'] = $zef_arr[$zef_arr_index]['pct_comment'];
|
||||
$arr['zef_evtID'] = $zef_arr[$zef_arr_index]['zef_evtID'];
|
||||
$arr['evt_name'] = $zef_arr[$zef_arr_index]['evt_name'];
|
||||
if ($limitCommentSize)
|
||||
$arr['comment'] = addEllipsis($zef_arr[$zef_arr_index]['zef_comment'], 150);
|
||||
else
|
||||
$arr['comment'] = $zef_arr[$zef_arr_index]['zef_comment'];
|
||||
$arr['comment_type'] = $zef_arr[$zef_arr_index]['zef_comment_type'];
|
||||
$arr['location'] = $zef_arr[$zef_arr_index]['zef_location'];
|
||||
if (empty($arr['location']))
|
||||
$arr['location'] = $default_location;
|
||||
$arr['trackingnr'] = $zef_arr[$zef_arr_index]['zef_trackingnr'];
|
||||
$arr['username'] = $zef_arr[$zef_arr_index]['usr_name'];
|
||||
$arr['cleared'] = $zef_arr[$zef_arr_index]['zef_cleared'];
|
||||
$result_arr[] = $arr;
|
||||
}
|
||||
$zef_arr_index++;
|
||||
}
|
||||
while ($exp_arr_index < count($exp_arr)) {
|
||||
$arr = array();
|
||||
$arr['type'] = 'exp';
|
||||
$arr['id'] = $exp_arr[$exp_arr_index]['exp_ID'];
|
||||
$arr['time_in'] = $exp_arr[$exp_arr_index]['exp_timestamp'];
|
||||
$arr['time_out'] = $exp_arr[$exp_arr_index]['exp_timestamp'];
|
||||
$arr['zef_time'] = null;
|
||||
$arr['zef_apos'] = null;
|
||||
$arr['dec_zef_time'] = null;
|
||||
$arr['zef_rate'] = null;
|
||||
$arr['wage'] = sprintf("%01.2f",$exp_arr[$exp_arr_index]['exp_value']*$exp_arr[$exp_arr_index]['exp_multiplier']);
|
||||
$arr['pct_kndID'] = $exp_arr[$exp_arr_index]['pct_kndID'];
|
||||
$arr['knd_name'] = $exp_arr[$exp_arr_index]['knd_name'];
|
||||
$arr['pct_ID'] = $exp_arr[$exp_arr_index]['pct_ID'];
|
||||
$arr['pct_name'] = $exp_arr[$exp_arr_index]['pct_name'];
|
||||
$arr['division'] = $exp_arr[$exp_arr_index]['zef_division'];
|
||||
if ($limitCommentSize)
|
||||
$arr['comment'] = addEllipsis($exp_arr[$exp_arr_index]['exp_comment'],150);
|
||||
else
|
||||
$arr['comment'] = $exp_arr[$exp_arr_index]['exp_comment'];
|
||||
$arr['evt_name'] = $exp_arr[$exp_arr_index]['exp_designation'];
|
||||
$arr['comment'] = $exp_arr[$exp_arr_index]['exp_comment'];
|
||||
$arr['comment_type'] = $exp_arr[$exp_arr_index]['exp_comment_type'];
|
||||
$arr['username'] = $exp_arr[$exp_arr_index]['usr_name'];
|
||||
$arr['cleared'] = $exp_arr[$exp_arr_index]['exp_cleared'];
|
||||
$exp_arr_index++;
|
||||
$result_arr[] = $arr;
|
||||
}
|
||||
return $result_arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge the expense annotations with the timesheet annotations. The result will
|
||||
* be the timesheet array, which has to be passed as the first argument.
|
||||
*
|
||||
* @param array the timesheet annotations array
|
||||
* @param array the expense annotations array
|
||||
*/
|
||||
function merge_annotations(&$zef_arr,&$exp_arr) {
|
||||
|
||||
foreach ($exp_arr as $id => $costs) {
|
||||
if (!isset($zef_arr[$id]))
|
||||
$zef_arr[$id]['costs'] = $costs;
|
||||
else
|
||||
$zef_arr[$id]['costs'] += $costs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get annotations for the user sub list. Currently it's just the time, like
|
||||
* in the timesheet extension.
|
||||
*
|
||||
* @param int $start Time from which to take entries into account.
|
||||
* @param int $end Time until which to take entries into account.
|
||||
* @param array $users Array of user IDs to filter by.
|
||||
* @param array $customers Array of customer IDs to filter by.
|
||||
* @param array $projects Array of project IDs to filter by.
|
||||
* @param array $events Array of event IDs to filter by.
|
||||
* @return array Array which assigns every user (via his ID) the data to show.
|
||||
*/
|
||||
function xp_get_arr_usr($start,$end,$users = null,$customers = null,$projects = null,$events = null) {
|
||||
global $expense_ext_available;
|
||||
|
||||
$arr = get_arr_time_usr($start,$end,$users,$customers,$projects,$events);
|
||||
|
||||
if ($expense_ext_available) {
|
||||
$exp_arr = get_arr_exp_usr($start,$end,$users,$customers,$projects);
|
||||
merge_annotations($arr,$exp_arr);
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get annotations for the customer sub list. Currently it's just the time, like
|
||||
* in the timesheet extension.
|
||||
*
|
||||
* @param int $start Time from which to take entries into account.
|
||||
* @param int $end Time until which to take entries into account.
|
||||
* @param array $users Array of user IDs to filter by.
|
||||
* @param array $customers Array of customer IDs to filter by.
|
||||
* @param array $projects Array of project IDs to filter by.
|
||||
* @param array $events Array of event IDs to filter by.
|
||||
* @return array Array which assigns every customer (via his ID) the data to show.
|
||||
*/
|
||||
function xp_get_arr_knd($start,$end,$users = null,$customers = null,$projects = null,$events = null) {
|
||||
global $expense_ext_available;
|
||||
|
||||
$arr = get_arr_time_knd($start,$end,$users,$customers,$projects,$events);
|
||||
|
||||
if ($expense_ext_available) {
|
||||
$exp_arr = get_arr_exp_knd($start,$end,$users,$customers,$projects);
|
||||
merge_annotations($arr,$exp_arr);
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get annotations for the project sub list. Currently it's just the time, like
|
||||
* in the timesheet extension.
|
||||
*
|
||||
* @param int $start Time from which to take entries into account.
|
||||
* @param int $end Time until which to take entries into account.
|
||||
* @param array $users Array of user IDs to filter by.
|
||||
* @param array $customers Array of customer IDs to filter by.
|
||||
* @param array $projects Array of project IDs to filter by.
|
||||
* @param array $events Array of event IDs to filter by.
|
||||
* @return array Array which assigns every project (via his ID) the data to show.
|
||||
*/
|
||||
function xp_get_arr_pct($start,$end,$users = null,$customers = null,$projects = null,$events = null) {
|
||||
global $expense_ext_available;
|
||||
|
||||
$arr = get_arr_time_pct($start,$end,$users,$customers,$projects,$events);
|
||||
|
||||
if ($expense_ext_available) {
|
||||
$exp_arr = get_arr_exp_pct($start,$end,$users,$customers,$projects);
|
||||
merge_annotations($arr,$exp_arr);
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get annotations for the task sub list. Currently it's just the time, like
|
||||
* in the timesheet extension.
|
||||
*
|
||||
* @param int $start Time from which to take entries into account.
|
||||
* @param int $end Time until which to take entries into account.
|
||||
* @param array $users Array of user IDs to filter by.
|
||||
* @param array $customers Array of customer IDs to filter by.
|
||||
* @param array $projects Array of project IDs to filter by.
|
||||
* @param array $events Array of event IDs to filter by.
|
||||
* @return array Array which assigns every taks (via his ID) the data to show.
|
||||
*/
|
||||
function xp_get_arr_evt($start,$end,$users = null,$customers = null,$projects = null,$events = null) {
|
||||
$arr = get_arr_time_evt($start,$end,$users,$customers,$projects,$events);
|
||||
return $arr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prepare a string to be printed as a single field in the csv file.
|
||||
* @param string $field String to prepare.
|
||||
* @param string $column_delimiter Character used to delimit columns.
|
||||
* @param string $quote_char Character used to quote strings.
|
||||
* @return string Correctly formatted string.
|
||||
*/
|
||||
function csv_prepare_field($field,$column_delimiter,$quote_char) {
|
||||
if (strpos($field,$column_delimiter) === false &&
|
||||
strpos($field,$quote_char) === false &&
|
||||
strpos($field,"\n") === false)
|
||||
return $field;
|
||||
|
||||
$field = str_replace($quote_char,$quote_char.$quote_char,$field);
|
||||
$field = $quote_char.$field.$quote_char;
|
||||
|
||||
return $field;
|
||||
}
|
||||
|
||||
?>
|
||||
454
extensions/ki_export/processor.php
Normal file
454
extensions/ki_export/processor.php
Normal file
@@ -0,0 +1,454 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of
|
||||
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||
* (c) 2006-2009 Kimai-Development-Team
|
||||
*
|
||||
* Kimai is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; Version 3, 29 June 2007
|
||||
*
|
||||
* Kimai is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Export Processor.
|
||||
*/
|
||||
|
||||
// insert KSPI
|
||||
$isCoreProcessor = 0;
|
||||
$dir_templates = "templates/";
|
||||
require("../../includes/kspi.php");
|
||||
|
||||
require("private_func.php");
|
||||
|
||||
|
||||
// ============================
|
||||
// = parse general parameters =
|
||||
// ============================
|
||||
|
||||
if ($axAction == 'export_csv' ||
|
||||
$axAction == 'export_pdf' ||
|
||||
$axAction == 'export_pdf2' ||
|
||||
$axAction == 'export_html' ||
|
||||
$axAction == 'export_xls' ||
|
||||
$axAction == 'reload') {
|
||||
|
||||
if (isset($_REQUEST['axColumns'])) {
|
||||
$axColumns = explode('|',$_REQUEST['axColumns']);
|
||||
$columns = array();
|
||||
foreach ($axColumns as $column)
|
||||
$columns[$column] = true;
|
||||
}
|
||||
|
||||
$timeformat = strip_tags($_REQUEST['timeformat']);
|
||||
$timeformat = preg_replace('/([A-Za-z])/','%$1',$timeformat);
|
||||
|
||||
$dateformat = strip_tags($_REQUEST['dateformat']);
|
||||
$dateformat = preg_replace('/([A-Za-z])/','%$1',$dateformat);
|
||||
|
||||
$default_location = strip_tags($_REQUEST['default_location']);
|
||||
|
||||
$reverse_order = isset($_REQUEST['reverse_order']);
|
||||
|
||||
$filter_cleared = $_REQUEST['filter_cleared'];
|
||||
$filter_refundable = $_REQUEST['filter_refundable'];
|
||||
$filter_type = $_REQUEST['filter_type'];
|
||||
|
||||
$filters = explode('|',$axValue);
|
||||
|
||||
if ($filters[0] == "")
|
||||
$filterUsr = array();
|
||||
else
|
||||
$filterUsr = explode(':',$filters[0]);
|
||||
|
||||
if ($filters[1] == "")
|
||||
$filterKnd = array();
|
||||
else
|
||||
$filterKnd = explode(':',$filters[1]);
|
||||
|
||||
if ($filters[2] == "")
|
||||
$filterPct = array();
|
||||
else
|
||||
$filterPct = explode(':',$filters[2]);
|
||||
|
||||
if ($filters[3] == "")
|
||||
$filterEvt = array();
|
||||
else
|
||||
$filterEvt = explode(':',$filters[3]);
|
||||
|
||||
// if no userfilter is set, set it to current user
|
||||
if (isset($kga['usr']) && count($filterUsr) == 0)
|
||||
array_push($filterUsr,$kga['usr']['usr_ID']);
|
||||
|
||||
if (isset($kga['customer']))
|
||||
$filterKnd = array($kga['customer']['knd_ID']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ==================
|
||||
// = handle request =
|
||||
// ==================
|
||||
switch ($axAction) {
|
||||
|
||||
|
||||
// ======================
|
||||
// = set status cleared =
|
||||
// ======================
|
||||
case 'set_cleared':
|
||||
if (isset($kga['customer'])) {
|
||||
echo 0;
|
||||
break;
|
||||
}
|
||||
// $axValue: 1 = cleared, 0 = not cleared
|
||||
$id = isset($_REQUEST['id']) ? strip_tags($_REQUEST['id']) : null;
|
||||
$success = false;
|
||||
|
||||
if (strncmp($id,"zef",3) == 0)
|
||||
$success = xp_zef_set_cleared(substr($id,3),$axValue==1);
|
||||
else if (strncmp($id,"exp",3) == 0)
|
||||
$success = xp_exp_set_cleared(substr($id,3),$axValue==1);
|
||||
|
||||
echo $success?1:0;
|
||||
break;
|
||||
|
||||
|
||||
// =========================
|
||||
// = save selected columns =
|
||||
// =========================
|
||||
case 'toggle_header':
|
||||
// $axValue: header name
|
||||
$success = xp_toggle_header($axValue);
|
||||
echo $success?1:0;
|
||||
break;
|
||||
|
||||
// ===========================
|
||||
// = Load data and return it =
|
||||
// ===========================
|
||||
case 'reload':
|
||||
$arr_data = xp_get_arr($in,$out,$filterUsr,$filterKnd,$filterPct,$filterEvt,false,$reverse_order,$default_location,$filter_cleared,$filter_type,false,$filter_refundable);
|
||||
$tpl->assign('arr_data', count($arr_data)>0?$arr_data:0);
|
||||
|
||||
$tpl->assign('total', formatDuration(get_zef_time($in,$out,$filterUsr,$filterKnd,$filterPct,$filterEvt,$filter_cleared)));
|
||||
|
||||
$ann = xp_get_arr_usr($in,$out,$filterUsr,$filterKnd,$filterPct,$filterEvt);
|
||||
formatAnnotations($ann);
|
||||
$tpl->assign('usr_ann',$ann);
|
||||
|
||||
$ann = xp_get_arr_knd($in,$out,$filterUsr,$filterKnd,$filterPct,$filterEvt);
|
||||
formatAnnotations($ann);
|
||||
$tpl->assign('knd_ann',$ann);
|
||||
|
||||
$ann = xp_get_arr_pct($in,$out,$filterUsr,$filterKnd,$filterPct,$filterEvt);
|
||||
formatAnnotations($ann);
|
||||
$tpl->assign('pct_ann',$ann);
|
||||
|
||||
$ann = xp_get_arr_evt($in,$out,$filterUsr,$filterKnd,$filterPct,$filterEvt);
|
||||
formatAnnotations($ann);
|
||||
$tpl->assign('evt_ann',$ann);
|
||||
|
||||
$tpl->assign('timeformat',$timeformat);
|
||||
$tpl->assign('dateformat',$dateformat);
|
||||
if (isset($kga['usr']))
|
||||
$tpl->assign('disabled_columns',xp_get_disabled_headers($kga['usr']['usr_ID']));
|
||||
$tpl->display("table.tpl");
|
||||
break;
|
||||
|
||||
|
||||
/**
|
||||
* Exort as html file.
|
||||
*/
|
||||
case 'export_html':
|
||||
|
||||
usr_set_preferences(array(
|
||||
'print_summary' => isset($_REQUEST['print_summary'])?1:0,
|
||||
'reverse_order' => isset($_REQUEST['reverse_order'])?1:0),
|
||||
'ki_export.print.');
|
||||
|
||||
|
||||
$arr_data = xp_get_arr($in,$out,$filterUsr,$filterKnd,$filterPct,$filterEvt,false,$reverse_order,$default_location,$filter_cleared,$filter_type,false,$filter_refundable);
|
||||
$timeSum = 0;
|
||||
$wageSum = 0;
|
||||
foreach ($arr_data as $data) {
|
||||
$timeSum += $data['dec_zef_time'];
|
||||
$wageSum += $data['wage'];
|
||||
}
|
||||
|
||||
$tpl->assign('timespan',strftime($kga['date_format']['2'],$in).' - '.strftime($kga['date_format']['2'],$out) );
|
||||
|
||||
if (isset($_REQUEST['print_summary'])) {
|
||||
//Create the summary. Same as in PDF export
|
||||
$zef_summary = array();
|
||||
$exp_summary = array();
|
||||
foreach ($arr_data as $one_entry) {
|
||||
|
||||
if ($one_entry['type'] == 'zef') {
|
||||
if (isset($zef_summary[$one_entry['zef_evtID']])) {
|
||||
$zef_summary[$one_entry['zef_evtID']]['time'] += $one_entry['dec_zef_time']; //Sekunden
|
||||
$zef_summary[$one_entry['zef_evtID']]['wage'] += $one_entry['wage']; //Euro
|
||||
}
|
||||
else {
|
||||
$zef_summary[$one_entry['zef_evtID']]['name'] = html_entity_decode($one_entry['evt_name']);
|
||||
$zef_summary[$one_entry['zef_evtID']]['time'] = $one_entry['dec_zef_time'];
|
||||
$zef_summary[$one_entry['zef_evtID']]['wage'] = $one_entry['wage'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$exp_info['name'] = $kga['lang']['xp_ext']['expense'].': '.$one_entry['evt_name'];
|
||||
$exp_info['time'] = -1;
|
||||
$exp_info['wage'] = $one_entry['wage'];
|
||||
|
||||
$exp_summary[] = $exp_info;
|
||||
}
|
||||
}
|
||||
|
||||
$summary = array_merge($zef_summary,$exp_summary);
|
||||
$tpl->assign('summary',$summary);
|
||||
}
|
||||
else
|
||||
$tpl->assign('summary',0);
|
||||
|
||||
|
||||
// Create filter descirption, Same is in PDF export
|
||||
$customers = array();
|
||||
foreach ($filterKnd as $knd_id) {
|
||||
$customer_info = knd_get_data($knd_id);
|
||||
$customers[] = $customer_info['knd_name'];
|
||||
}
|
||||
$tpl->assign('customersFilter',implode(', ',$customers));
|
||||
|
||||
$projects = array();
|
||||
foreach ($filterPct as $pct_id) {
|
||||
$project_info = pct_get_data($pct_id);
|
||||
$projects[] = $project_info['pct_name'];
|
||||
}
|
||||
$tpl->assign('projectsFilter',implode(', ',$projects));
|
||||
|
||||
$tpl->assign('arr_data', count($arr_data)>0?$arr_data:0);
|
||||
|
||||
$tpl->assign('columns',$columns);
|
||||
$tpl->assign('custom_timeformat',$timeformat);
|
||||
$tpl->assign('custom_dateformat',$dateformat);
|
||||
$tpl->assign('timeSum',$timeSum);
|
||||
$tpl->assign('wageSum',$wageSum);
|
||||
|
||||
header("Content-Type: text/html");
|
||||
$tpl->display("formats/html.tpl");
|
||||
break;
|
||||
|
||||
|
||||
/**
|
||||
* Exort as excel file.
|
||||
*/
|
||||
case 'export_xls':
|
||||
|
||||
usr_set_preferences(array(
|
||||
'decimal_separator' => $_REQUEST['decimal_separator'],
|
||||
'reverse_order' => isset($_REQUEST['reverse_order'])?1:0),
|
||||
'ki_export.xls.');
|
||||
|
||||
$arr_data = xp_get_arr($in,$out,$filterUsr,$filterKnd,$filterPct,$filterEvt,false,$reverse_order,$default_location,$filter_cleared,$filter_type,false,$filter_refundable);
|
||||
for ($i=0;$i<count($arr_data);$i++) {
|
||||
$arr_data[$i]['dec_zef_time'] = str_replace(".",$_REQUEST['decimal_separator'],$arr_data[$i]['dec_zef_time']);
|
||||
$arr_data[$i]['zef_rate'] = str_replace(".",$_REQUEST['decimal_separator'],$arr_data[$i]['zef_rate']);
|
||||
$arr_data[$i]['wage'] = str_replace(".",$_REQUEST['decimal_separator'],$arr_data[$i]['wage']);
|
||||
}
|
||||
$tpl->assign('arr_data', count($arr_data)>0?$arr_data:0);
|
||||
|
||||
$tpl->assign('columns',$columns);
|
||||
$tpl->assign('custom_timeformat',$timeformat);
|
||||
$tpl->assign('custom_dateformat',$dateformat);
|
||||
|
||||
header("Content-Disposition:attachment;filename=export.xls");
|
||||
header("Content-Type: application/vnd.ms-excel");
|
||||
$tpl->display("formats/excel.tpl");
|
||||
break;
|
||||
|
||||
|
||||
/**
|
||||
* Exort as csv file.
|
||||
*/
|
||||
case 'export_csv':
|
||||
|
||||
usr_set_preferences(array(
|
||||
'column_delimiter' => $_REQUEST['column_delimiter'],
|
||||
'quote_char' => $_REQUEST['quote_char'],
|
||||
'reverse_order' => isset($_REQUEST['reverse_order'])?1:0),
|
||||
'ki_export.csv.');
|
||||
|
||||
$arr_data = xp_get_arr($in,$out,$filterUsr,$filterKnd,$filterPct,$filterEvt,false,$reverse_order,$default_location,$filter_cleared,$filter_type,false,$filter_refundable);
|
||||
$column_delimiter = $_REQUEST['column_delimiter'];
|
||||
$quote_char = $_REQUEST['quote_char'];
|
||||
|
||||
header("Content-Disposition:attachment;filename=export.csv");
|
||||
header("Content-Type: text/csv ");
|
||||
|
||||
$row = array();
|
||||
|
||||
// output of headers
|
||||
if (isset($columns['date']))
|
||||
$row[] = csv_prepare_field($kga['lang']['datum'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['from']))
|
||||
$row[] = csv_prepare_field($kga['lang']['in'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['to']))
|
||||
$row[] = csv_prepare_field($kga['lang']['out'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['time']))
|
||||
$row[] = csv_prepare_field($kga['lang']['time'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['dec_time']))
|
||||
$row[] = csv_prepare_field($kga['lang']['timelabel'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['rate']))
|
||||
$row[] = csv_prepare_field($kga['lang']['rate'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['wage']))
|
||||
$row[] = csv_prepare_field($kga['currency_name'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['knd']))
|
||||
$row[] = csv_prepare_field($kga['lang']['knd'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['pct']))
|
||||
$row[] = csv_prepare_field($kga['lang']['pct'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['division']))
|
||||
$row[] = csv_prepare_field('division',$column_delimiter,$quote_char);
|
||||
if (isset($columns['action']))
|
||||
$row[] = csv_prepare_field($kga['lang']['evt'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['comment']))
|
||||
$row[] = csv_prepare_field($kga['lang']['comment'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['location']))
|
||||
$row[] = csv_prepare_field($kga['lang']['zlocation'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['trackingnr']))
|
||||
$row[] = csv_prepare_field($kga['lang']['trackingnr'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['user']))
|
||||
$row[] = csv_prepare_field($kga['lang']['username'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['cleared']))
|
||||
$row[] = csv_prepare_field($kga['lang']['cleared'],$column_delimiter,$quote_char);
|
||||
|
||||
echo implode($column_delimiter,$row);
|
||||
echo "\n";
|
||||
|
||||
// output of data
|
||||
foreach ($arr_data as $data) {
|
||||
$row = array();
|
||||
if (isset($columns['date']))
|
||||
$row[] = csv_prepare_field(strftime($dateformat,$data['time_in']),$column_delimiter,$quote_char);
|
||||
if (isset($columns['from']))
|
||||
$row[] = csv_prepare_field(strftime($timeformat,$data['time_in']),$column_delimiter,$quote_char);
|
||||
if (isset($columns['to']))
|
||||
$row[] = csv_prepare_field(strftime($timeformat,$data['time_out']),$column_delimiter,$quote_char);
|
||||
if (isset($columns['time']))
|
||||
$row[] = csv_prepare_field($data['zef_duration'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['dec_time']))
|
||||
$row[] = csv_prepare_field($data['dec_zef_time'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['rate']))
|
||||
$row[] = csv_prepare_field($data['zef_rate'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['wage']))
|
||||
$row[] = csv_prepare_field($data['wage'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['knd']))
|
||||
$row[] = csv_prepare_field($data['knd_name'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['division']))
|
||||
$row[] = csv_prepare_field($data['division'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['division']))
|
||||
$row[] = csv_prepare_field($data['pct_name'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['action']))
|
||||
$row[] = csv_prepare_field($data['evt_name'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['comment']))
|
||||
$row[] = csv_prepare_field($data['comment'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['location']))
|
||||
$row[] = csv_prepare_field($data['location'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['trackingnr']))
|
||||
$row[] = csv_prepare_field($data['trackingnr'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['user']))
|
||||
$row[] = csv_prepare_field($data['username'],$column_delimiter,$quote_char);
|
||||
if (isset($columns['cleared']))
|
||||
$row[] = csv_prepare_field($data['cleared'],$column_delimiter,$quote_char);
|
||||
|
||||
echo implode($column_delimiter,$row);
|
||||
echo "\n";
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Export as tabular PDF document.
|
||||
*/
|
||||
case 'export_pdf':
|
||||
|
||||
usr_set_preferences(array(
|
||||
'print_comments'=>isset($_REQUEST['print_comments'])?1:0,
|
||||
'print_summary'=>isset($_REQUEST['print_summary'])?1:0,
|
||||
'create_bookmarks'=>isset($_REQUEST['create_bookmarks'])?1:0,
|
||||
'download_pdf'=>isset($_REQUEST['download_pdf'])?1:0,
|
||||
'customer_new_page'=>isset($_REQUEST['customer_new_page'])?1:0,
|
||||
'reverse_order'=>isset($_REQUEST['reverse_order'])?1:0,
|
||||
'pdf_format'=>'export_pdf'),
|
||||
'ki_export.pdf.');
|
||||
|
||||
$arr_data = xp_get_arr($in,$out,$filterUsr,$filterKnd,$filterPct,$filterEvt,false,$reverse_order,$default_location,$filter_cleared,$filter_type,false,$filter_refundable);
|
||||
|
||||
$knd_arr_data = array();
|
||||
if (isset($_REQUEST['customer_new_page'])) {
|
||||
foreach ($arr_data as $row) {
|
||||
$knd_id = $row['pct_kndID'];
|
||||
|
||||
// create key for customer, if not present
|
||||
if (!array_key_exists($knd_id,$knd_arr_data))
|
||||
$knd_arr_data[$knd_id] = array();
|
||||
|
||||
// add row
|
||||
$knd_arr_data[$knd_id][] = $row;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
require('export_pdf.php');
|
||||
break;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Export as a PDF document in a list format.
|
||||
*/
|
||||
case 'export_pdf2':
|
||||
|
||||
usr_set_preferences(array(
|
||||
'print_comments'=>isset($_REQUEST['print_comments'])?1:0,
|
||||
'print_summary'=>isset($_REQUEST['print_summary'])?1:0,
|
||||
'create_bookmarks'=>isset($_REQUEST['create_bookmarks'])?1:0,
|
||||
'download_pdf'=>isset($_REQUEST['download_pdf'])?1:0,
|
||||
'customer_new_page'=>isset($_REQUEST['customer_new_page'])?1:0,
|
||||
'reverse_order'=>isset($_REQUEST['reverse_order'])?1:0,
|
||||
'pdf_format'=>'export_pdf2'),
|
||||
'ki_export.pdf.');
|
||||
|
||||
$arr_data = xp_get_arr($in,$out,$filterUsr,$filterKnd,$filterPct,$filterEvt,false,$reverse_order,$default_location,$filter_cleared,$filter_type,false,$filter_refundable);
|
||||
|
||||
// sort data into new array, where first dimension is customer and second dimension is project
|
||||
$pdf_arr_data = array();
|
||||
foreach ($arr_data as $row) {
|
||||
$knd_id = $row['pct_kndID'];
|
||||
$pct_id = $row['pct_ID'];
|
||||
|
||||
// create key for customer, if not present
|
||||
if (!array_key_exists($knd_id,$pdf_arr_data))
|
||||
$pdf_arr_data[$knd_id] = array();
|
||||
|
||||
// create key for project, if not present
|
||||
if (!array_key_exists($pct_id,$pdf_arr_data[$knd_id]))
|
||||
$pdf_arr_data[$knd_id][$pct_id] = array();
|
||||
|
||||
// add row
|
||||
$pdf_arr_data[$knd_id][$pct_id][] = $row;
|
||||
|
||||
}
|
||||
require('export_pdf2.php');
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
95
extensions/ki_export/templates/floaters/export_CSV.tpl
Normal file
95
extensions/ki_export/templates/floaters/export_CSV.tpl
Normal file
@@ -0,0 +1,95 @@
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#help').hide();
|
||||
$('#floater input#timeformat').attr('value',$('#xp_ext_timeformat').attr('value'));
|
||||
$('#floater input#dateformat').attr('value',$('#xp_ext_dateformat').attr('value'));
|
||||
$('#floater input#default_location').attr('value',$('#default_location').attr('value'));
|
||||
$('#floater input#axValue').attr('value',filterUsr.join(":")+'|'+filterKnd.join(":")+'|'+filterPct.join(":")+'|'+filterEvt.join(":"));
|
||||
$('#floater input#filter_cleared').attr('value',$('#xp_ext_tab_filter_cleared').attr('value'));
|
||||
$('#floater input#filter_refundable').attr('value',$('#xp_ext_tab_filter_refundable').attr('value'));
|
||||
$('#floater input#filter_type').attr('value',$('#xp_ext_tab_filter_type').attr('value'));
|
||||
$('#floater input#axColumns').attr('value',xp_enabled_columns());
|
||||
$('.floater_content fieldset label').css('width','200px');
|
||||
|
||||
$('#floater input#first_day').attr('value',new Date($('#pick_in').val()).getTime()/1000);
|
||||
$('#floater input#last_day').attr('value',new Date($('#pick_out').val()).getTime()/1000);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
|
||||
<div id="floater_innerwrap">
|
||||
|
||||
<div id="floater_handle">
|
||||
<span id="floater_title">{$kga.lang.xp_ext.exportCSV}</span>
|
||||
<div class="right">
|
||||
<a href="#" class="close" onClick="floaterClose();">{$kga.lang.close}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="help">
|
||||
<div class="content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="floater_content">
|
||||
|
||||
<form id="xp_ext_form_export_CSV" action="../extensions/ki_export/processor.php" method="post">
|
||||
|
||||
<fieldset>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<label for="column_delimiter">{$kga.lang.xp_ext.column_delimiter}:</label>
|
||||
<input type="text" value="{$prefs.column_delimiter|escape:'html'}" name="column_delimiter" id="column_delimiter" size="1"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="quote_char">{$kga.lang.xp_ext.quote_char}:</label>
|
||||
<input type="text" value="{$prefs.quote_char|escape:'html'}" name="quote_char" id="quote_char" size="1">
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="reverse_order">{$kga.lang.xp_ext.reverse_order}:</label>
|
||||
<input type="checkbox" value="true" name="reverse_order" id="reverse_order"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
{$kga.lang.xp_ext.dl_hint}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
{* -------------------------------------------------------------------- *}
|
||||
|
||||
<!-- <input name="id" type="hidden" value="" /> -->
|
||||
<input name="axAction" type="hidden" value="export_csv" />
|
||||
<input name="axValue" id="axValue" type="hidden" value="" />
|
||||
<input name="first_day" id="first_day" type="hidden" value="" />
|
||||
<input name="last_day" id="last_day" type="hidden" value="" />
|
||||
<input name="axColumns" id="axColumns" type="hidden" value=""/>
|
||||
<input name="timeformat" id="timeformat" type="hidden" value=""/>
|
||||
<input name="dateformat" id="dateformat" type="hidden" value=""/>
|
||||
<input name="default_location" id="default_location" type="hidden" value=""/>
|
||||
<input name="filter_cleared" id="filter_cleared" type="hidden" value=""/>
|
||||
<input name="filter_refundable" id="filter_refundable" type="hidden" value=""/>
|
||||
<input name="filter_type" id="filter_type" type="hidden" value=""/>
|
||||
|
||||
<div id="formbuttons">
|
||||
<input class='btn_norm' type='button' value='{$kga.lang.cancel}' onClick='floaterClose(); return false;' />
|
||||
<input class='btn_ok' type='submit' value='{$kga.lang.submit}' onClick="floaterClose();"/>
|
||||
</div>
|
||||
|
||||
{* -------------------------------------------------------------------- *}
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
121
extensions/ki_export/templates/floaters/export_PDF.tpl
Normal file
121
extensions/ki_export/templates/floaters/export_PDF.tpl
Normal file
@@ -0,0 +1,121 @@
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#help').hide();
|
||||
$('#floater input#timeformat').attr('value',$('#xp_ext_timeformat').attr('value'));
|
||||
$('#floater input#dateformat').attr('value',$('#xp_ext_dateformat').attr('value'));
|
||||
$('#floater input#default_location').attr('value',$('#xp_ext_default_location').attr('value'));
|
||||
$('#floater input#axValue').attr('value',filterUsr.join(":")+'|'+filterKnd.join(":")+'|'+filterPct.join(":")+'|'+filterEvt.join(":"));
|
||||
$('#floater input#filter_cleared').attr('value',$('#xp_ext_tab_filter_cleared').attr('value'));
|
||||
$('#floater input#filter_refundable').attr('value',$('#xp_ext_tab_filter_refundable').attr('value'));
|
||||
$('#floater input#filter_type').attr('value',$('#xp_ext_tab_filter_type').attr('value'));
|
||||
$('#floater input#axColumns').attr('value',xp_enabled_columns());
|
||||
$('.floater_content fieldset label').css('width','200px');
|
||||
|
||||
$('#floater input#first_day').attr('value',new Date($('#pick_in').val()).getTime()/1000);
|
||||
$('#floater input#last_day').attr('value',new Date($('#pick_out').val()).getTime()/1000);
|
||||
});
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
|
||||
<div id="floater_innerwrap">
|
||||
|
||||
<div id="floater_handle">
|
||||
<span id="floater_title">{$kga.lang.xp_ext.exportPDF}</span>
|
||||
<div class="right">
|
||||
<a href="#" class="close" onClick="floaterClose();">{$kga.lang.close}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="help">
|
||||
<div class="content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="floater_content">
|
||||
|
||||
<form id="xp_ext_form_export_PDF" action="../extensions/ki_export/processor.php" method="post" target="_blank">
|
||||
<fieldset>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<label for="print_comments">{$kga.lang.xp_ext.print_comment}:</label>
|
||||
<input type="checkbox" value="true" name="print_comments" id="print_comments" {if $prefs.print_comments}checked="checked"{/if}/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="print_summary">{$kga.lang.xp_ext.print_summary}:</label>
|
||||
<input type="checkbox" value="true" name="print_summary" id="print_summary" {if $prefs.print_summary}checked="checked"{/if}>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="create_bookmarks">{$kga.lang.xp_ext.create_bookmarks}:</label>
|
||||
<input type="checkbox" value="true" name="create_bookmarks" id="create_bookmarks" {if $prefs.create_bookmarks}checked="checked"{/if}/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="download_pdf">{$kga.lang.xp_ext.download_pdf}:</label>
|
||||
<input type="checkbox" value="true" name="download_pdf" id="download_pdf" {if $prefs.download_pdf}checked="checked"{/if}/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="customer_new_page">{$kga.lang.xp_ext.customer_new_page}:</label>
|
||||
<input type="checkbox" value="true" name="customer_new_page" id="customer_new_page" {if $prefs.customer_new_page}checked="checked"{/if}/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="reverse_order">{$kga.lang.xp_ext.reverse_order}:</label>
|
||||
<input type="checkbox" value="true" name="reverse_order" id="reverse_order" {if $prefs.reverse_order}checked="checked"{/if}/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="reverse_order">{$kga.lang.comment}:</label>
|
||||
<textarea name="document_comment" id="document_comment"></textarea>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="axAction">{$kga.lang.xp_ext.pdf_format}:</label>
|
||||
<select name="axAction" id="axAction">
|
||||
<option value="export_pdf" {if $prefs.pdf_format=='export_pdf'}selected="selected"{/if}>{$kga.lang.xp_ext.export_pdf}</option>
|
||||
<option value="export_pdf2" {if $prefs.pdf_format=='export_pdf2'}selected="selected"{/if}>{$kga.lang.xp_ext.export_pdf2}</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
{$kga.lang.xp_ext.dl_hint}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
{* -------------------------------------------------------------------- *}
|
||||
|
||||
<!-- <input name="id" type="hidden" value="" /> -->
|
||||
<input name="axValue" id="axValue" type="hidden" value="" />
|
||||
<input name="first_day" id="first_day" type="hidden" value="" />
|
||||
<input name="last_day" id="last_day" type="hidden" value="" />
|
||||
<input name="axColumns" id="axColumns" type="hidden" value=""/>
|
||||
<input name="timeformat" id="timeformat" type="hidden" value=""/>
|
||||
<input name="dateformat" id="dateformat" type="hidden" value=""/>
|
||||
<input name="default_location" id="default_location" type="hidden" value=""/>
|
||||
<input name="filter_cleared" id="filter_cleared" type="hidden" value=""/>
|
||||
<input name="filter_refundable" id="filter_refundable" type="hidden" value=""/>
|
||||
<input name="filter_type" id="filter_type" type="hidden" value=""/>
|
||||
|
||||
<div id="formbuttons">
|
||||
<input class='btn_norm' type='button' value='{$kga.lang.cancel}' onClick='floaterClose(); return false;' />
|
||||
<input class='btn_ok' type='submit' value='{$kga.lang.submit}' onClick="floaterClose();"/>
|
||||
</div>
|
||||
|
||||
{* -------------------------------------------------------------------- *}
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
87
extensions/ki_export/templates/floaters/export_XLS.tpl
Normal file
87
extensions/ki_export/templates/floaters/export_XLS.tpl
Normal file
@@ -0,0 +1,87 @@
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#help').hide();
|
||||
$('#floater input#timeformat').attr('value',$('#xp_ext_timeformat').attr('value'));
|
||||
$('#floater input#dateformat').attr('value',$('#xp_ext_dateformat').attr('value'));
|
||||
$('#floater input#default_location').attr('value',$('#default_location').attr('value'));
|
||||
$('#floater input#axValue').attr('value',filterUsr.join(":")+'|'+filterKnd.join(":")+'|'+filterPct.join(":")+'|'+filterEvt.join(":"));
|
||||
$('#floater input#filter_cleared').attr('value',$('#xp_ext_tab_filter_cleared').attr('value'));
|
||||
$('#floater input#filter_refundable').attr('value',$('#xp_ext_tab_filter_refundable').attr('value'));
|
||||
$('#floater input#filter_type').attr('value',$('#xp_ext_tab_filter_type').attr('value'));
|
||||
$('#floater input#axColumns').attr('value',xp_enabled_columns());
|
||||
$('.floater_content fieldset label').css('width','200px');
|
||||
|
||||
$('#floater input#first_day').attr('value',new Date($('#pick_in').val()).getTime()/1000);
|
||||
$('#floater input#last_day').attr('value',new Date($('#pick_out').val()).getTime()/1000);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
|
||||
<div id="floater_innerwrap">
|
||||
|
||||
<div id="floater_handle">
|
||||
<span id="floater_title">{$kga.lang.xp_ext.exportXLS}</span>
|
||||
<div class="right">
|
||||
<a href="#" class="close" onClick="floaterClose();">{$kga.lang.close}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="help">
|
||||
<div class="content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="floater_content">
|
||||
|
||||
<form id="xp_ext_form_export_XLS" action="../extensions/ki_export/processor.php" method="post">
|
||||
<fieldset>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<label for="decimal_separator">{$kga.lang.decimal_separator}:</label>
|
||||
<input type="text" value="{$kga.conf.decimalSeparator|escape:'html'}" name="decimal_separator" id="decimal-separator" size="1"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="reverse_order">{$kga.lang.xp_ext.reverse_order}:</label>
|
||||
<input type="checkbox" value="true" name="reverse_order" id="reverse_order" {if $prefs.reverse_order}checked="checked"{/if}/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
{$kga.lang.xp_ext.dl_hint}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{* -------------------------------------------------------------------- *}
|
||||
|
||||
<input name="axAction" type="hidden" value="export_xls" />
|
||||
<input name="axValue" id="axValue" type="hidden" value="" />
|
||||
<input name="first_day" id="first_day" type="hidden" value="" />
|
||||
<input name="last_day" id="last_day" type="hidden" value="" />
|
||||
<input name="axColumns" id="axColumns" type="hidden" value=""/>
|
||||
<input name="timeformat" id="timeformat" type="hidden" value=""/>
|
||||
<input name="dateformat" id="dateformat" type="hidden" value=""/>
|
||||
<input name="default_location" id="default_location" type="hidden" value=""/>
|
||||
<input name="filter_cleared" id="filter_cleared" type="hidden" value=""/>
|
||||
<input name="filter_refundable" id="filter_refundable" type="hidden" value=""/>
|
||||
<input name="filter_type" id="filter_type" type="hidden" value=""/>
|
||||
|
||||
<div id="formbuttons">
|
||||
<input class='btn_norm' type='button' value='{$kga.lang.cancel}' onClick='floaterClose(); return false;' />
|
||||
<input class='btn_ok' type='submit' value='{$kga.lang.submit}' onClick="floaterClose();"/>
|
||||
</div>
|
||||
|
||||
{* -------------------------------------------------------------------- *}
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
55
extensions/ki_export/templates/floaters/help_timeformat.tpl
Normal file
55
extensions/ki_export/templates/floaters/help_timeformat.tpl
Normal file
@@ -0,0 +1,55 @@
|
||||
<div id="floater_innerwrap">
|
||||
|
||||
<div id="floater_handle">
|
||||
<span id="floater_title">{$kga.lang.xp_ext.export_timeformat_help}</span>
|
||||
<div class="right">
|
||||
<a href="#" class="close" onClick="floaterClose();">{$kga.lang.close}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="floater_content">
|
||||
|
||||
<table class="xp_time_help_table">
|
||||
<tr> <td class="xp_time_shortcut">a</td> <td class="xp_time_description">abbreviated weekday name according to the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">A</td> <td class="xp_time_description">full weekday name according to the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">b</td> <td class="xp_time_description">abbreviated month name according to the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">B</td> <td class="xp_time_description">full month name according to the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">c</td> <td class="xp_time_description">preferred date and time representation for the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">C</td> <td class="xp_time_description">century number (the year divided by 100 and truncated to an integer, range 00 to 99)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">d</td> <td class="xp_time_description">day of the month as a decimal number (range 01 to 31)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">D</td> <td class="xp_time_description">same as m/d/y</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">e</td> <td class="xp_time_description">day of the month as a decimal number, a single digit is preceded by a space (range 1 to 31)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">g</td> <td class="xp_time_description">Week-based year within century [00,99]</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">G</td> <td class="xp_time_description">Week-based year, including the century [0000,9999]</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">h</td> <td class="xp_time_description">same as b</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">H</td> <td class="xp_time_description">hour as a decimal number using a 24-hour clock (range 00 to 23)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">I</td> <td class="xp_time_description">hour as a decimal number using a 12-hour clock (range 01 to 12)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">j</td> <td class="xp_time_description">day of the year as a decimal number (range 001 to 366)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">k</td> <td class="xp_time_description">Hour (24-hour clock) single digits are preceded by a blank. (range 0 to 23)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">l</td> <td class="xp_time_description">hour as a decimal number using a 12-hour clock, single digits preceeded by a space (range 1 to 12)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">m</td> <td class="xp_time_description">month as a decimal number (range 01 to 12)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">M</td> <td class="xp_time_description">minute as a decimal number</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">n</td> <td class="xp_time_description">newline character</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">p</td> <td class="xp_time_description"> either `am' or `pm' according to the given time value, or the corresponding strings for the current locale</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">r</td> <td class="xp_time_description">time in a.m. and p.m. notation</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">R</td> <td class="xp_time_description">time in 24 hour notation</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">S</td> <td class="xp_time_description">second as a decimal number</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">t</td> <td class="xp_time_description">tab character</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">T</td> <td class="xp_time_description">current time, equal to H:M:S</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">u</td> <td class="xp_time_description">weekday as a decimal number [1,7], with 1 representing Monday</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">U</td> <td class="xp_time_description">week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">V</td> <td class="xp_time_description">The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week
|
||||
1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week.</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">w</td> <td class="xp_time_description">day of the week as a decimal, Sunday being 0</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">W</td> <td class="xp_time_description">week number of the current year as a decimal number, starting with the first Monday
|
||||
as the first day of the first week</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">x</td> <td class="xp_time_description">preferred date representation for the current locale without the time</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">X</td> <td class="xp_time_description">preferred time representation for the current locale without the date</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">y</td> <td class="xp_time_description">year as a decimal number without a century (range 00 to 99)</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">Y</td> <td class="xp_time_description">year as a decimal number including the century</td> </tr>
|
||||
<tr> <td class="xp_time_shortcut">Z</td> <td class="xp_time_description">time zone or name or abbreviation</td> </tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
83
extensions/ki_export/templates/floaters/print.tpl
Normal file
83
extensions/ki_export/templates/floaters/print.tpl
Normal file
@@ -0,0 +1,83 @@
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#help').hide();
|
||||
$('#floater input#timeformat').attr('value',$('#xp_ext_timeformat').attr('value'));
|
||||
$('#floater input#dateformat').attr('value',$('#xp_ext_dateformat').attr('value'));
|
||||
$('#floater input#default_location').attr('value',$('#default_location').attr('value'));
|
||||
$('#floater input#axValue').attr('value',filterUsr.join(":")+'|'+filterKnd.join(":")+'|'+filterPct.join(":")+'|'+filterEvt.join(":"));
|
||||
$('#floater input#filter_cleared').attr('value',$('#xp_ext_tab_filter_cleared').attr('value'));
|
||||
$('#floater input#filter_refundable').attr('value',$('#xp_ext_tab_filter_refundable').attr('value'));
|
||||
$('#floater input#filter_type').attr('value',$('#xp_ext_tab_filter_type').attr('value'));
|
||||
$('#floater input#axColumns').attr('value',xp_enabled_columns());
|
||||
$('.floater_content fieldset label').css('width','200px');
|
||||
|
||||
$('#floater input#first_day').attr('value',new Date($('#pick_in').val()).getTime()/1000);
|
||||
$('#floater input#last_day').attr('value',new Date($('#pick_out').val()).getTime()/1000);
|
||||
});
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
<div id="floater_innerwrap">
|
||||
|
||||
<div id="floater_handle">
|
||||
<span id="floater_title">{$kga.lang.xp_ext.print}</span>
|
||||
<div class="right">
|
||||
<a href="#" class="close" onClick="floaterClose();">{$kga.lang.close}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="help">
|
||||
<div class="content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="floater_content">
|
||||
|
||||
|
||||
<form id="xp_ext_form_print" action="../extensions/ki_export/processor.php" method="post" target="_blank">
|
||||
<fieldset>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
{$kga.lang.xp_ext.print_hint}
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="print_summary">{$kga.lang.xp_ext.print_summary}:</label>
|
||||
<input type="checkbox" value="true" name="print_summary" id="print_summary" {if $prefs.print_summary}checked="checked"{/if}>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="reverse_order">{$kga.lang.xp_ext.reverse_order}:</label>
|
||||
<input type="checkbox" value="true" name="reverse_order" id="reverse_order" {if $prefs.reverse_order}checked="checked"{/if}/>
|
||||
</li>
|
||||
</ul>
|
||||
{* -------------------------------------------------------------------- *}
|
||||
|
||||
<input name="axAction" type="hidden" value="export_html" />
|
||||
<input name="axValue" id="axValue" type="hidden" value="" />
|
||||
<input name="first_day" id="first_day" type="hidden" value="" />
|
||||
<input name="last_day" id="last_day" type="hidden" value="" />
|
||||
<input name="axColumns" id="axColumns" type="hidden" value=""/>
|
||||
<input name="timeformat" id="timeformat" type="hidden" value=""/>
|
||||
<input name="dateformat" id="dateformat" type="hidden" value=""/>
|
||||
<input name="default_location" id="default_location" type="hidden" value=""/>
|
||||
<input name="filter_cleared" id="filter_cleared" type="hidden" value=""/>
|
||||
<input name="filter_refundable" id="filter_refundable" type="hidden" value=""/>
|
||||
<input name="filter_type" id="filter_type" type="hidden" value=""/>
|
||||
|
||||
<div id="formbuttons">
|
||||
<input class='btn_norm' type='button' value='{$kga.lang.cancel}' onClick='floaterClose(); return false;' />
|
||||
<input class='btn_ok' type='submit' value='{$kga.lang.submit}' onClick="floaterClose();"/>
|
||||
</div>
|
||||
|
||||
{* -------------------------------------------------------------------- *}
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
235
extensions/ki_export/templates/formats/excel.tpl
Normal file
235
extensions/ki_export/templates/formats/excel.tpl
Normal file
@@ -0,0 +1,235 @@
|
||||
<html xmlns:o="urn:schemas-microsoft-com:office:office"
|
||||
xmlns:x="urn:schemas-microsoft-com:office:excel"
|
||||
xmlns="http://www.w3.org/TR/REC-html40">
|
||||
|
||||
<head>
|
||||
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
|
||||
<style>
|
||||
{literal}
|
||||
.date {
|
||||
mso-number-format:"Short Date";
|
||||
}
|
||||
.time {
|
||||
mso-number-format:"h\:mm\:ss\;\@";
|
||||
}
|
||||
.duration {
|
||||
mso-number-format:"h\:mm\;\@";
|
||||
}
|
||||
.decimal {
|
||||
mso-number-format:Fixed;
|
||||
}
|
||||
{/literal}
|
||||
</style>
|
||||
<!--[if gte mso 9]><xml>
|
||||
<x:ExcelWorkbook>
|
||||
<x:ExcelWorksheets>
|
||||
<x:ExcelWorksheet>
|
||||
<x:Name>Tabelle1</x:Name>
|
||||
<x:WorksheetOptions>
|
||||
<x:DefaultColWidth>10</x:DefaultColWidth>
|
||||
<x:Selected/>
|
||||
<x:Panes>
|
||||
<x:Pane>
|
||||
<x:Number>3</x:Number>
|
||||
<x:ActiveRow>4</x:ActiveRow>
|
||||
<x:ActiveCol>3</x:ActiveCol>
|
||||
</x:Pane>
|
||||
</x:Panes>
|
||||
<x:ProtectContents>False</x:ProtectContents>
|
||||
<x:ProtectObjects>False</x:ProtectObjects>
|
||||
<x:ProtectScenarios>False</x:ProtectScenarios>
|
||||
</x:WorksheetOptions>
|
||||
</x:ExcelWorksheet>
|
||||
</x:ExcelWorksheets>
|
||||
</x:ExcelWorkbook>
|
||||
</xml><![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table>
|
||||
<thead><tr>
|
||||
{*column headers------------------------------------------------*}
|
||||
{ if $columns.date } <td>{$kga.lang.datum}</td> { /if }
|
||||
{ if $columns.from } <td>{$kga.lang.in}</td> { /if }
|
||||
{ if $columns.to } <td>{$kga.lang.out}</td> { /if }
|
||||
{ if $columns.time } <td>{$kga.lang.time}</td> { /if }
|
||||
{ if $columns.dec_time } <td>{$kga.lang.timelabel}</td> { /if }
|
||||
{ if $columns.rate } <td>{$kga.lang.rate}</td> { /if }
|
||||
{ if $columns.wage } <td>{$kga.currency_name}</td> { /if }
|
||||
{ if $columns.knd } <td>{$kga.lang.knd}</td> { /if }
|
||||
{ if $columns.division } <td>Division</td> { /if }
|
||||
{ if $columns.pct } <td>{$kga.lang.pct}</td> { /if }
|
||||
{ if $columns.action } <td>{$kga.lang.evt}</td> { /if }
|
||||
{ if $columns.comment } <td>{$kga.lang.comment}</td> { /if }
|
||||
{ if $columns.location } <td>{$kga.lang.zlocation}</td> { /if }
|
||||
{ if $columns.trackingnr } <td>{$kga.lang.trackingnr}</td> { /if }
|
||||
{ if $columns.user } <td>{$kga.lang.username}</td> { /if }
|
||||
{ if $columns.cleared } <td>{$kga.lang.cleared}</td> { /if }
|
||||
</tr>
|
||||
</thead>
|
||||
{section name=row loop=$arr_data}
|
||||
<tr>
|
||||
{*datum --------------------------------------------------------*}
|
||||
{ if $columns.date }
|
||||
<td class=date>
|
||||
{ if $custom_dateformat }
|
||||
{$arr_data[row].time_in|date_format:$custom_dateformat|escape:'html'}
|
||||
{ else }
|
||||
{$arr_data[row].time_in|date_format:$kga.date_format.1|escape:'html'}
|
||||
{ /if }
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*in -----------------------------------------------------------*}
|
||||
{ if $columns.from }
|
||||
<td align=right class=time>
|
||||
{ if $custom_timeformat }
|
||||
{$arr_data[row].time_in|date_format:$custom_timeformat|escape:'html'}
|
||||
{ else }
|
||||
{$arr_data[row].time_in|date_format:"%H:%M"|escape:'html'}
|
||||
{ /if }
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*out ----------------------------------------------------------*}
|
||||
{ if $columns.to }
|
||||
<td align=right class=time>
|
||||
|
||||
{if $arr_data[row].time_out}
|
||||
{ if $custom_timeformat }
|
||||
{$arr_data[row].time_out|date_format:$custom_timeformat|escape:'html'}
|
||||
{ else }
|
||||
{$arr_data[row].time_out|date_format:"%H:%M"|escape:'html'}
|
||||
{ /if }
|
||||
{else}
|
||||
––:––
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*task time ----------------------------------------------------*}
|
||||
{ if $columns.time }
|
||||
<td align=right class=duration>
|
||||
|
||||
{if $arr_data[row].zef_time}
|
||||
|
||||
{$arr_data[row].zef_duration}
|
||||
|
||||
{else}
|
||||
–:––
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*decimal time --------------------------------------------------*}
|
||||
{ if $columns.dec_time }
|
||||
<td align=right class=decimal>
|
||||
|
||||
{if $arr_data[row].dec_zef_time}
|
||||
{$arr_data[row].dec_zef_time}
|
||||
|
||||
{else}
|
||||
–:––
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*rate ---------------------------------------------------------*}
|
||||
{ if $columns.rate }
|
||||
<td align=right class=decimal>
|
||||
|
||||
{$arr_data[row].zef_rate}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*task wage ----------------------------------------------------*}
|
||||
{ if $columns.wage }
|
||||
<td align=right class=decimal>
|
||||
|
||||
{if $arr_data[row].wage}
|
||||
|
||||
{$arr_data[row].wage}
|
||||
|
||||
{else}
|
||||
–
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*client name --------------------------------------------------*}
|
||||
{ if $columns.knd }
|
||||
<td>
|
||||
{$arr_data[row].knd_name|escape:'html'}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*division name -------------------------------------------------*}
|
||||
{ if $columns.division }
|
||||
<td>
|
||||
{$arr_data[row].division|escape:'html'}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*project name -------------------------------------------------*}
|
||||
{ if $columns.pct }
|
||||
<td>
|
||||
{$arr_data[row].pct_name|escape:'html'}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
|
||||
{*event name and comment bubble --------------------------------*}
|
||||
{ if $columns.action }
|
||||
<td>
|
||||
{$arr_data[row].evt_name|escape:'html'}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*comment -----------------------------------------------------*}
|
||||
{ if $columns.comment }
|
||||
<td>
|
||||
{$arr_data[row].comment|escape:'html'|replace:"\n":" "}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*location ----------------------------------------------------*}
|
||||
{ if $columns.location }
|
||||
<td>
|
||||
{$arr_data[row].location|escape:'html'}
|
||||
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*tracking number ---------------------------------------------*}
|
||||
{ if $columns.trackingnr }
|
||||
<td>
|
||||
{$arr_data[row].trackingnr|escape:'html'}
|
||||
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*user --------------------------------------------------------*}
|
||||
{ if $columns.user }
|
||||
<td>
|
||||
{$arr_data[row].username|escape:'html'}
|
||||
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*cleared -----------------------------------------------------*}
|
||||
{ if $columns.cleared }
|
||||
<td>
|
||||
{if $arr_data[row].cleared}cleared{else}{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
{/section}
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
403
extensions/ki_export/templates/formats/html.tpl
Normal file
403
extensions/ki_export/templates/formats/html.tpl
Normal file
@@ -0,0 +1,403 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta content="">
|
||||
|
||||
{literal}
|
||||
<style type="text/css" media="all">
|
||||
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin-bottom:30px;
|
||||
}
|
||||
fieldset, img { border: 0; }
|
||||
address, caption, cite, code, dfn, em, strong, th, var {
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
ol, ul { list-style: none; }
|
||||
caption, th { text-align: left; }
|
||||
h2 {
|
||||
margin-bottom:10px;
|
||||
}
|
||||
q:before { content: ''; }
|
||||
q:after { content: ''; }
|
||||
abbr, acronym { border: 0; }
|
||||
th {
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
th {
|
||||
border-right: 1px solid #999999;
|
||||
padding: 5px;
|
||||
}
|
||||
th:first-child { border-left: 1px solid #999999; }
|
||||
td {
|
||||
border-right: 1px solid #999999;
|
||||
padding: 5px;
|
||||
}
|
||||
td:first-child { border-left: 1px solid #999999; }
|
||||
h1 {
|
||||
font-size: 150%;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style type="text/css" media="print">
|
||||
|
||||
body {
|
||||
color: black;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
th {
|
||||
background: #ccc;
|
||||
border-top: 1px solid #999;
|
||||
border-bottom: 1px solid #999;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
td {
|
||||
border-bottom: 1px solid #999;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#div_selectform {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#div_liste {
|
||||
|
||||
}
|
||||
|
||||
#invertbtn, .invertclm {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
body {
|
||||
color: black;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
th {
|
||||
background: #ccc;
|
||||
border-top: 1px solid #999;
|
||||
border-bottom: 1px solid #999;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
td {
|
||||
border-bottom: 1px solid #999;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#div_liste {
|
||||
margin-top:10px;
|
||||
float: left;
|
||||
width: 600px;
|
||||
}
|
||||
</style>
|
||||
|
||||
{/literal}
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2> {$kga.lang.xp_ext.time_period}: {$timespan|escape:'html'} </h2>
|
||||
|
||||
{ if $customersFilter != "" }
|
||||
<br/><b>{$kga.lang.knds}</b>: {$customersFilter|escape:'html'}
|
||||
{/if}
|
||||
{ if $projectsFilter != "" }
|
||||
<br/><b>{$kga.lang.pcts}</b>: {$projectsFilter|escape:'html'}
|
||||
{/if}
|
||||
<br/>
|
||||
|
||||
{if $summary != 0}
|
||||
<h2>{$kga.lang.xp_ext.summary}</h2>
|
||||
|
||||
|
||||
<table border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{$kga.lang.evt}</th>
|
||||
{ if $columns.dec_time }
|
||||
<th>{$kga.lang.xp_ext.duration}</th>
|
||||
{/if}
|
||||
{ if $columns.wage }
|
||||
<th>{$kga.lang.xp_ext.costs}</th>
|
||||
{/if}
|
||||
</tr>
|
||||
|
||||
{section name=row loop=$summary}
|
||||
<tr>
|
||||
<td>{$summary[row].name|escape:'html'}</td>
|
||||
{ if $columns.dec_time }
|
||||
<td>{if $summary[row].time != -1}
|
||||
{$summary[row].time|escape:'html'}
|
||||
{/if}</td>
|
||||
{/if}
|
||||
{ if $columns.wage }
|
||||
<td>{$summary[row].wage|escape:'html'}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/section}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<i>{$kga.lang.xp_ext.finalamount}</i>
|
||||
</td>
|
||||
{ if $columns.dec_time }
|
||||
<td>{$timeSum|number_format:2:$kga.conf.decimalSeparator:""|escape:'html'}</td>
|
||||
{/if}
|
||||
{ if $columns.wage }
|
||||
<td>{$wageSum|number_format:2:$kga.conf.decimalSeparator:""|escape:'html'}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
{/if}
|
||||
|
||||
<h2>{$kga.lang.xp_ext.full_list}</h2>
|
||||
|
||||
<table border="1">
|
||||
<tbody>
|
||||
|
||||
{*column headers------------------------------------------------*}
|
||||
<tr>
|
||||
{ if $columns.date } <th>{$kga.lang.datum}</th> { /if }
|
||||
{ if $columns.from } <th>{$kga.lang.in}</th> { /if }
|
||||
{ if $columns.to } <th>{$kga.lang.out}</th> { /if }
|
||||
{ if $columns.time } <th>{$kga.lang.time}</th> { /if }
|
||||
{ if $columns.dec_time } <th>{$kga.lang.timelabel}</th> { /if }
|
||||
{ if $columns.rate } <th>{$kga.lang.rate}</th> { /if }
|
||||
{ if $columns.wage } <th>{$kga.currency_name}</th> { /if }
|
||||
{ if $columns.knd } <th>{$kga.lang.knd}</th> { /if }
|
||||
{ if $columns.division } <th>Division</th> { /if }
|
||||
{ if $columns.pct } <th>{$kga.lang.pct}</th> { /if }
|
||||
{ if $columns.action } <th>{$kga.lang.evt}</th> { /if }
|
||||
{ if $columns.comment } <th>{$kga.lang.comment}</th> { /if }
|
||||
{ if $columns.location } <th>{$kga.lang.zlocation}</th> { /if }
|
||||
{ if $columns.trackingnr } <th>{$kga.lang.trackingnr}</th> { /if }
|
||||
{ if $columns.user } <th>{$kga.lang.username}</th> { /if }
|
||||
{ if $columns.cleared } <th>{$kga.lang.cleared}</th> { /if }
|
||||
|
||||
</tr>
|
||||
|
||||
{section name=row loop=$arr_data}
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
{*datum --------------------------------------------------------*}
|
||||
{ if $columns.date }
|
||||
<td>
|
||||
{ if $custom_dateformat }
|
||||
{$arr_data[row].time_in|date_format:$custom_dateformat|escape:'html'}
|
||||
{ else }
|
||||
{$arr_data[row].time_in|date_format:$kga.date_format.1|escape:'html'}
|
||||
{ /if }
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*in -----------------------------------------------------------*}
|
||||
{ if $columns.from }
|
||||
<td>
|
||||
{ if $custom_timeformat }
|
||||
{$arr_data[row].time_in|date_format:$custom_timeformat|escape:'html'}
|
||||
{ else }
|
||||
{$arr_data[row].time_in|date_format:"%H:%M"|escape:'html'}
|
||||
{ /if }
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*out ----------------------------------------------------------*}
|
||||
{ if $columns.to }
|
||||
<td>
|
||||
|
||||
{if $arr_data[row].time_out}
|
||||
{ if $custom_timeformat }
|
||||
{$arr_data[row].time_out|date_format:$custom_timeformat|escape:'html'}
|
||||
{ else }
|
||||
{$arr_data[row].time_out|date_format:"%H:%M"|escape:'html'}
|
||||
{ /if }
|
||||
{else}
|
||||
––:––
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*task time ----------------------------------------------------*}
|
||||
{ if $columns.time }
|
||||
<td>
|
||||
|
||||
{if $arr_data[row].zef_time}
|
||||
|
||||
{$arr_data[row].zef_duration}
|
||||
|
||||
{else}
|
||||
–:––
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*decimal time --------------------------------------------------*}
|
||||
{ if $columns.dec_time }
|
||||
<td>
|
||||
|
||||
{if $arr_data[row].dec_zef_time}
|
||||
{$arr_data[row].dec_zef_time|replace:'.':$kga.conf.decimalSeparator|escape:'html'}
|
||||
|
||||
{else}
|
||||
–:––
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*rate ---------------------------------------------------------*}
|
||||
{ if $columns.rate }
|
||||
<td>
|
||||
|
||||
{$arr_data[row].zef_rate|replace:'.':$kga.conf.decimalSeparator|escape:'html'}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*task wage ----------------------------------------------------*}
|
||||
{ if $columns.wage }
|
||||
<td>
|
||||
|
||||
{if $arr_data[row].wage}
|
||||
|
||||
{$arr_data[row].wage|replace:'.':$kga.conf.decimalSeparator|escape:'html'}
|
||||
|
||||
{else}
|
||||
–
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*client name --------------------------------------------------*}
|
||||
{ if $columns.knd }
|
||||
<td>
|
||||
{$arr_data[row].knd_name|escape:'html'}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*division name -------------------------------------------------*}
|
||||
{ if $columns.division }
|
||||
<td>
|
||||
{$arr_data[row].division|escape:'html'}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*project name -------------------------------------------------*}
|
||||
{ if $columns.pct }
|
||||
<td>
|
||||
{$arr_data[row].pct_name|escape:'html'}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
|
||||
{*event name and comment bubble --------------------------------*}
|
||||
{ if $columns.action }
|
||||
<td>
|
||||
{$arr_data[row].evt_name|escape:'html'}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*comment -----------------------------------------------------*}
|
||||
{ if $columns.comment }
|
||||
<td>
|
||||
{$arr_data[row].comment|escape:'html'|nl2br}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*location ----------------------------------------------------*}
|
||||
{ if $columns.location }
|
||||
<td>
|
||||
{$arr_data[row].location|escape:'html'}
|
||||
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*tracking number ---------------------------------------------*}
|
||||
{ if $columns.trackingnr }
|
||||
<td>
|
||||
{$arr_data[row].trackingnr|escape:'html'}
|
||||
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*user --------------------------------------------------------*}
|
||||
{ if $columns.user }
|
||||
<td>
|
||||
{$arr_data[row].username|escape:'html'}
|
||||
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{*cleared -----------------------------------------------------*}
|
||||
{ if $columns.cleared }
|
||||
<td>
|
||||
{if $arr_data[row].cleared}{$kga.lang.cleared}{else}{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
{/section}
|
||||
|
||||
{if $timeSum > 0 || $wageSum > 0}
|
||||
<tr>
|
||||
<td colspan="{$columns|@count}">
|
||||
{$kga.lang.xp_ext.finalamount}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{ if $columns.date } <td></td> {/if}
|
||||
{ if $columns.from } <td></td> {/if}
|
||||
{ if $columns.to }<td></td> {/if}
|
||||
{ if $columns.time } <td></td> {/if}
|
||||
{ if $columns.dec_time } <td>
|
||||
{$timeSum|escape:'html'}
|
||||
</td> {/if}
|
||||
{ if $columns.rate } <td></td> {/if}
|
||||
{ if $columns.wage } <td>
|
||||
{$wageSum|escape:'html'}
|
||||
</td>{/if}
|
||||
{ if $columns.knd } <td></td> {/if}
|
||||
{ if $columns.division } <td></td> {/if}
|
||||
{ if $columns.pct } <td></td> {/if}
|
||||
{ if $columns.action } <td></td> {/if}
|
||||
{ if $columns.comment } <td></td> {/if}
|
||||
{ if $columns.location } <td></td> {/if}
|
||||
{ if $columns.trackingnr } <td></td> {/if}
|
||||
{ if $columns.user } <td></td> {/if}
|
||||
{ if $columns.cleared } <td></td> {/if}
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
59
extensions/ki_export/templates/main.tpl
Normal file
59
extensions/ki_export/templates/main.tpl
Normal file
@@ -0,0 +1,59 @@
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
xp_ext_onload();
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
|
||||
<div id="xp_head">
|
||||
<div class="right">
|
||||
<a href="#" onClick="$('#xptable td.cleared>a').click(); return false;">invert</a>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="date" />
|
||||
<col class="from" />
|
||||
<col class="to" />
|
||||
<col class="time" />
|
||||
<col class="dec_time" />
|
||||
<col class="rate" />
|
||||
<col class="wage" />
|
||||
<col class="knd" />
|
||||
<col class="division" />
|
||||
<col class="pct" />
|
||||
<col class="evt" />
|
||||
<col class="comment" />
|
||||
<col class="location" />
|
||||
<col class="trackingnr" />
|
||||
<col class="user" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="date {if $disabled_columns.date}disabled{/if}"><a onClick="xp_toggle_column('date');">{$kga.lang.datum}</a></td>
|
||||
<td class="from {if $disabled_columns.from}disabled{/if}"><a onClick="xp_toggle_column('from');">{$kga.lang.in}</a></td>
|
||||
<td class="to {if $disabled_columns.to}disabled{/if}"><a onClick="xp_toggle_column('to');">{$kga.lang.out}</a></td>
|
||||
<td class="time {if $disabled_columns.time}disabled{/if}"><a onClick="xp_toggle_column('time');">{$kga.lang.time}</a></td>
|
||||
<td class="dec_time {if $disabled_columns.dec_time}disabled{/if}"><a onClick="xp_toggle_column('dec_time');">{$kga.lang.timelabel}</a></td>
|
||||
<td class="rate"><a class="rate {if $disabled_columns.rate}disabled{/if}" onClick="xp_toggle_column('rate');">{$kga.lang.rate_short}</a></td>
|
||||
<td class="wage"><a class="wage {if $disabled_columns.wage}disabled{/if}" onClick="xp_toggle_column('wage');">{$kga.lang.total}</a></td>
|
||||
<td class="knd {if $disabled_columns.knd}disabled{/if}"><a onClick="xp_toggle_column('knd');">{$kga.lang.knd}</a></td>
|
||||
<td class="division {if $disabled_columns.division}disabled{/if}"><a onClick="xp_toggle_column('division');">Division</a></td>
|
||||
<td class="pct {if $disabled_columns.pct}disabled{/if}"><a onClick="xp_toggle_column('pct');">{$kga.lang.pct}</a></td>
|
||||
<td class="evt {if $disabled_columns.evt}disabled{/if}"><a onClick="xp_toggle_column('evt');">{$kga.lang.evt}</a></td>
|
||||
|
||||
<td class="moreinfo" colspan="3">
|
||||
<a class="comment {if $disabled_columns.comment}disabled{/if}" onClick="xp_toggle_column('comment');">{$kga.lang.comment}</a>,
|
||||
<a class="location {if $disabled_columns.location}disabled{/if}" onClick="xp_toggle_column('location');">{$kga.lang.zlocation}</a>,
|
||||
<a class="trackingnr {if $disabled_columns.trackingnr}disabled{/if}" onClick="xp_toggle_column('trackingnr');">{$kga.lang.trackingnr}</a>
|
||||
</td>
|
||||
|
||||
<td class="user {if $disabled_columns.user}disabled{/if}"><a onClick="xp_toggle_column('user');">{$kga.lang.username}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="xp">{$table_display} </div>
|
||||
76
extensions/ki_export/templates/panel.tpl
Normal file
76
extensions/ki_export/templates/panel.tpl
Normal file
@@ -0,0 +1,76 @@
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
xp_ext_onload();
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
<div id="xp_panel">
|
||||
<div class="w">
|
||||
<div class="c">
|
||||
<div class="w">
|
||||
<div class="c">
|
||||
|
||||
<div id="xp_ext_tab_filter">
|
||||
<select id="xp_ext_tab_filter_cleared" name="cleared" onChange="xp_ext_reload()">
|
||||
<option value="-1" {if !$kga.conf.hideClearedEntries}selected="selected"{/if}>{$kga.lang.xp_ext.cleared_all}</option>
|
||||
<option value="1">{$kga.lang.xp_ext.cleared_cleared}</option>
|
||||
<option value="0" {if $kga.conf.hideClearedEntries}selected="selected"{/if}>{$kga.lang.xp_ext.cleared_open}</option>
|
||||
</select>
|
||||
<select id="xp_ext_tab_filter_refundable" name="refundable" onChange="xp_ext_reload()">
|
||||
<option value="-1" selected="selected">{$kga.lang.xp_ext.refundable_all}</option>
|
||||
<option value="0">{$kga.lang.xp_ext.refundable_refundable}</option>
|
||||
<option value="1">{$kga.lang.xp_ext.refundable_not_refundable}</option>
|
||||
</select>
|
||||
<select id="xp_ext_tab_filter_type" name="type" onChange="xp_ext_reload()">
|
||||
<option value="-1" selected="selected">{$kga.lang.xp_ext.times_and_expenses}</option>
|
||||
<option value="0">{$kga.lang.xp_ext.times}</option>
|
||||
<option value="1">{$kga.lang.xp_ext.expenses}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="xp_ext_tab_timeformat">
|
||||
<span>{$kga.lang.xp_ext.timeformat}:<a href="#" class="helpfloater">{$kga.lang.xp_ext.export_timeformat_help}</a></span>
|
||||
<input type="text" name="time_format" value="{$timeformat|escape:'html'}" id="xp_ext_timeformat" onChange="xp_ext_reload()">
|
||||
<span>{$kga.lang.xp_ext.dateformat}:<a href="#" class="helpfloater">{$kga.lang.xp_ext.export_timeformat_help}</a></span>
|
||||
<input type="text" name="date_format" value="{$dateformat|escape:'html'}" id="xp_ext_dateformat" onChange="xp_ext_reload()">
|
||||
</div>
|
||||
|
||||
<div id="xp_ext_tab_location">
|
||||
<span>{$kga.lang.xp_ext.stdrd_location}</span>
|
||||
<input type="text" name="std_loc" value="" id="xp_ext_default_location" onChange="xp_ext_reload()">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="l"> </div><div class="r"> </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="l">
|
||||
<div class="w">
|
||||
<div class="c">
|
||||
<a id="xp_ext_select_filter" href="#" class="select_btn">{$kga.lang.xp_ext.filter}</a>
|
||||
<a id="xp_ext_select_location" href="#" class="select_btn">{$kga.lang.xp_ext.location}</a>
|
||||
<a id="xp_ext_select_timeformat" href="#" class="select_btn">{$kga.lang.xp_ext.timeformat}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="l"> </div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<div class="w">
|
||||
<div class="c">
|
||||
<a id="xp_ext_export_pdf" href="#" class="output_btn">{$kga.lang.xp_ext.exportPDF}</a>
|
||||
<a id="xp_ext_export_xls" href="#" class="output_btn">{$kga.lang.xp_ext.exportXLS}</a>
|
||||
<a id="xp_ext_export_csv" href="#" class="output_btn">{$kga.lang.xp_ext.exportCSV}</a>
|
||||
<a id="xp_ext_print" href="#" class="output_btn">{$kga.lang.xp_ext.print}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="l"> </div><div class="r"> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
398
extensions/ki_export/templates/table.tpl
Normal file
398
extensions/ki_export/templates/table.tpl
Normal file
@@ -0,0 +1,398 @@
|
||||
{cycle values="odd,even" reset=true print=false}
|
||||
{if $arr_data}
|
||||
<div id="xptable">
|
||||
|
||||
<table>
|
||||
|
||||
<colgroup>
|
||||
<col class="date" />
|
||||
<col class="from" />
|
||||
<col class="to" />
|
||||
<col class="time" />
|
||||
<col class="dec_time" />
|
||||
<col class="rate" />
|
||||
<col class="wage" />
|
||||
<col class="client" />
|
||||
<col class="division" />
|
||||
<col class="project" />
|
||||
<col class="action" />
|
||||
<col class="comment" />
|
||||
<col class="location" />
|
||||
<col class="trackingnr" />
|
||||
<col class="user" />
|
||||
<col class="cleared" />
|
||||
</colgroup>
|
||||
|
||||
<tbody>
|
||||
|
||||
{assign var="day_buffer" value="0"}
|
||||
{assign var="time_in_buffer" value=0}
|
||||
|
||||
{section name=row loop=$arr_data}
|
||||
|
||||
<tr id="xp{$arr_data[row].type}{$arr_data[row].id}" class="{cycle values="odd,even"} {if !$arr_data[row].time_out}active{/if}
|
||||
{if $arr_data[row].type=="exp"}expense{/if}">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{*datum --------------------------------------------------------*}
|
||||
|
||||
<td class="date
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.date}disabled{/if}
|
||||
">
|
||||
{$arr_data[row].time_in|date_format:$dateformat|escape:'html'}
|
||||
</td>
|
||||
|
||||
{*in -----------------------------------------------------------*}
|
||||
|
||||
<td class="from
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.from}disabled{/if}
|
||||
">
|
||||
{$arr_data[row].time_in|date_format:$timeformat|escape:'html'}
|
||||
</td>
|
||||
|
||||
{*out ----------------------------------------------------------*}
|
||||
|
||||
<td class="to
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.to}disabled{/if}
|
||||
">
|
||||
|
||||
{if $arr_data[row].time_out}
|
||||
{$arr_data[row].time_out|date_format:$timeformat|escape:'html'}
|
||||
{else}
|
||||
––:––
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
{*task time ----------------------------------------------------*}
|
||||
|
||||
<td class="time
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.time}disabled{/if}
|
||||
">
|
||||
|
||||
{if $arr_data[row].zef_time}
|
||||
|
||||
{$arr_data[row].zef_duration}
|
||||
|
||||
{else}
|
||||
–:––
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
{*decimal time --------------------------------------------------*}
|
||||
|
||||
<td class="dec_time
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.dec_time}disabled{/if}
|
||||
">
|
||||
|
||||
{if $arr_data[row].dec_zef_time}
|
||||
|
||||
{$arr_data[row].dec_zef_time|replace:'.':$kga.conf.decimalSeparator|escape:'html'}
|
||||
|
||||
{else}
|
||||
–:––
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
{*rate ---------------------------------------------------------*}
|
||||
|
||||
<td class="rate
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.rate}disabled{/if}
|
||||
">
|
||||
|
||||
{$arr_data[row].zef_rate|replace:'.':$kga.conf.decimalSeparator|escape:'html'}
|
||||
</td>
|
||||
|
||||
{*task wage ----------------------------------------------------*}
|
||||
|
||||
<td class="wage
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.wage}disabled{/if}
|
||||
">
|
||||
|
||||
{if $arr_data[row].wage}
|
||||
|
||||
{$arr_data[row].wage|replace:'.':$kga.conf.decimalSeparator|escape:'html'}
|
||||
|
||||
{else}
|
||||
–
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
{*client name --------------------------------------------------*}
|
||||
|
||||
<td class="knd
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.knd}disabled{/if}
|
||||
">
|
||||
{$arr_data[row].knd_name|escape:'html'}
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
{*division -----------------------------------------------------*}
|
||||
|
||||
<td class="division
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.division}disabled{/if}
|
||||
">
|
||||
{$arr_data[row].division|escape:'html'|nl2br}
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
{*project name -------------------------------------------------*}
|
||||
|
||||
<td class="pct
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.pct}disabled{/if}
|
||||
">
|
||||
|
||||
<a href ="#" class="preselect_lnk"
|
||||
onClick="buzzer_preselect('pct',{$arr_data[row].pct_ID},'{$arr_data[row].pct_name|replace:"'":"\\'"|escape:'html'}',{$arr_data[row].pct_kndID},'{$arr_data[row].knd_name|replace:"'":"\\'"|escape:'html'}');
|
||||
return false;">
|
||||
{$arr_data[row].pct_name|escape:'html'}
|
||||
{if $kga.conf.pct_comment_flag == 1}
|
||||
{if $arr_data[row].pct_comment}
|
||||
<span class="lighter">({$arr_data[row].pct_comment|escape:'html'})</span>
|
||||
{/if}
|
||||
{/if}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
|
||||
{*event name and comment bubble --------------------------------*}
|
||||
|
||||
<td class="evt
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.evt}disabled{/if}
|
||||
">
|
||||
|
||||
<a href ="#" class="preselect_lnk"
|
||||
onClick="buzzer_preselect('evt',{$arr_data[row].zef_evtID},'{$arr_data[row].evt_name|replace:"'":"\\'"|escape:'html'}',0,0);
|
||||
return false;">
|
||||
{$arr_data[row].evt_name|escape:'html'}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
{*comment -----------------------------------------------------*}
|
||||
|
||||
<td class="comment
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.comment}disabled{/if}
|
||||
">
|
||||
{$arr_data[row].comment|escape:'html'|nl2br}
|
||||
|
||||
</td>
|
||||
|
||||
{*location ----------------------------------------------------*}
|
||||
|
||||
<td class="location
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.location}disabled{/if}
|
||||
">
|
||||
{$arr_data[row].location|escape:'html'}
|
||||
|
||||
</td>
|
||||
|
||||
{*tracking number ---------------------------------------------*}
|
||||
|
||||
<td class="trackingnr
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.trackingnr}disabled{/if}
|
||||
">
|
||||
{$arr_data[row].trackingnr|escape:'html'}
|
||||
|
||||
</td>
|
||||
|
||||
{*user --------------------------------------------------------*}
|
||||
|
||||
<td class="user
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.user}disabled{/if}
|
||||
">
|
||||
{$arr_data[row].username|escape:'html'}
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="cleared
|
||||
{if $arr_data[row].time_in|date_format:"%d" != $day_buffer}
|
||||
{if $kga.show_daySeperatorLines}break_day{/if}
|
||||
{else}
|
||||
{if $arr_data[row].time_out != $time_in_buffer}
|
||||
{if $kga.show_gabBreaks}break_gap{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $disabled_columns.cleared}disabled{/if}
|
||||
">
|
||||
<a class ="{if $arr_data[row].cleared}is_cleared{else}isnt_cleared{/if}" href ="#" onClick="xp_toggle_cleared('{$arr_data[row].type}{$arr_data[row].id}'); return false;"></a>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
{assign var="day_buffer" value=$arr_data[row].time_in|date_format:"%d"}
|
||||
{assign var="time_in_buffer" value=$arr_data[row].time_in}
|
||||
|
||||
{/section}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{else}
|
||||
<div style='padding:5px;color:#f00'>
|
||||
<strong>{$kga.lang.noEntries}</strong>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
ts_usr_ann = null;
|
||||
ts_knd_ann = null;
|
||||
ts_pct_ann = null;
|
||||
ts_evt_ann = null;
|
||||
ts_total = '{$total}';
|
||||
|
||||
{ if $usr_ann }
|
||||
ts_usr_ann = new Array();
|
||||
{foreach key=id item=value from=$usr_ann}
|
||||
ts_usr_ann[{$id}] = '{$value}';
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{ if $knd_ann }
|
||||
ts_knd_ann = new Array();
|
||||
{foreach key=id item=value from=$knd_ann}
|
||||
ts_knd_ann[{$id}] = '{$value}';
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{ if $pct_ann }
|
||||
ts_pct_ann = new Array();
|
||||
{foreach key=id item=value from=$pct_ann}
|
||||
ts_pct_ann[{$id}] = '{$value}';
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{ if $evt_ann }
|
||||
ts_evt_ann = new Array();
|
||||
{foreach key=id item=value from=$evt_ann}
|
||||
ts_evt_ann[{$id}] = '{$value}';
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{literal}
|
||||
lists_update_annotations(parseInt($('#gui div.ki_export').attr('id').substring(7)),ts_usr_ann,ts_knd_ann,ts_pct_ann,ts_evt_ann);
|
||||
$('#display_total').html(ts_total);
|
||||
{/literal}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user