<!-- BEGIN {$smarty.template} -->

<script type="text/javascript" src="js/siteconfig.js"></script>
<script type="text/javascript" src="js/ColorPicker2.js"></script>
<script type="text/javascript">
  var cp = new ColorPicker('window'); // Popup window
  var cp2 = new ColorPicker(); // DIV style
</script>

<form action="siteconfig.php" method="post">

{if $admin}
<input type="hidden" name="usr_id" value="0">
{else}
<input type="hidden" name="usr_id" value="{$usr_id}">
{/if}
<input type="hidden" name="action" value="{$smarty.const.ACTION_SAVECONFIG}">
<input type="submit" name="submit" value="{t}Submit{/t}"> <input type="reset" name="reset" value="{t}Reset{/t}">

<table cellspacing="0" width="80%">

  <caption><em>{if $admin}{t}Sitewide configuration settings{/t}{else}{t}Configuration settings{/t}{/if}</em></caption>

  {if $admin}

  <tr><th colspan="2" class="clhead">{t}Letterhead{/t}</th></tr>

  <tr>
    <td>{t}Company name{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.LETTERHEAD_COMPANY_NAME|wash}" name="cfgitem[LETTERHEAD_COMPANY_NAME]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td valign="top">{t}Location{/t}</td>
    <td><textarea cols="33" rows="3" name="cfgitem[LETTERHEAD_COMPANY_FULLLOCATION]">{$config.LETTERHEAD_COMPANY_FULLLOCATION|wash}</textarea></td>
  </tr>
  <tr>
    <td>{t}Street address{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.LETTERHEAD_COMPANY_STREET|wash}" name="cfgitem[LETTERHEAD_COMPANY_STREET]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}City name, needed for the bill's location and date line{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.LETTERHEAD_COMPANY_CITY|wash}" name="cfgitem[LETTERHEAD_COMPANY_CITY]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Phone number{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.LETTERHEAD_COMPANY_PHONE|wash}" name="cfgitem[LETTERHEAD_COMPANY_PHONE]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Email address{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.LETTERHEAD_COMPANY_EMAIL|wash}" name="cfgitem[LETTERHEAD_COMPANY_EMAIL]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Full company tax number with prefix, e.g. P.IVA 00110022003{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.LETTERHEAD_COMPANY_TAXNR|wash}" name="cfgitem[LETTERHEAD_COMPANY_TAXNR]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Company owner's personal tax numer with prefix, e.g. Cod. fisc. ABCZYX00A11B123C{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.LETTERHEAD_OWNER_PERSONALTAXNR|wash}" name="cfgitem[LETTERHEAD_OWNER_PERSONALTAXNR]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Footer line, useful e.g. for bank account numbers{/t}</td>
    <td><input maxlength="200" size="50" value="{$config.LETTERHEAD_FOOTER|wash}" name="cfgitem[LETTERHEAD_FOOTER]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Full path to the company logo file{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.LETTERHEAD_LOGO_FILE|wash}" name="cfgitem[LETTERHEAD_LOGO_FILE]" type="text" class="tinput"></td>
  </tr>

  <tr><th colspan="2" class="cfinance">{t}Finances{/t}</th></tr>

  <tr>
    <td>{t}Fiscal year starts on {/t}</td>
    <td>
      <select name="cfgitem[FIN_FISCYEAR_DAY]" id="fiscdays">
        {html_options options=$options_days selected=$config.FIN_FISCYEAR_DAY}
      </select>

       <select name="cfgitem[FIN_FISCYEAR_MONTH]" id="fiscmonths" onChange="getMonthDays();">
        {html_options options=$options_months selected=$config.FIN_FISCYEAR_MONTH}
      </select>
    </td>
  </tr>

  <tr><th colspan="4" class="cdefault">{t}Default values{/t}</th></tr>

  <tr>
    <td>{t}Default country{/t}</td>
    <td>
      <select name="cfgitem[DEFAULTCOUNTRY]">
        {html_options options=$options_countries selected=$config.DEFAULTCOUNTRY}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}Default currency{/t}</td>
    <td>
      <select name="cfgitem[DEFAULTCURRENCY]">
        {html_options options=$options_currencies selected=$config.DEFAULTCURRENCY}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}Default Late Fee in Percentage (e.g. 1.5){/t}</td>
    <td><input maxlength="5" size="5" value="{$config.PHPAGA_LATE_FEE|wash}" name="cfgitem[PHPAGA_LATE_FEE]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Default language{/t}</td>
    <td>
      <select name="cfgitem[DEFAULTLANGUAGE]">
        {html_options options=$options_languages selected=$config.DEFAULTLANGUAGE}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}Default billing method plugin{/t}</td>
    <td>
      <select name="cfgitem[DEFAULTBMT]">
        {html_options options=$options_bmt selected=$config.DEFAULTBMT}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}Default selected project status in dashboard{/t}</td>
    <td>
      <select name="cfgitem[MAIN_SHOW_PRJSTAT]">
        {html_options options=$options_prjstat selected=$config.MAIN_SHOW_PRJSTAT}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}Show Set_Payment_Date on Invoice Page?{/t}</td>
    <td>
      <select name="cfgitem[SHOW_SET_PAYMENT_DATE]">
        {html_options options=$options_truefalse selected=$config.SHOW_SET_PAYMENT_DATE}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}Monetary Symbol{/t}</td>
    <td>
      <input maxlength="2" size="2" value="{$config.MONETARY_SYMBOL|wash}" name="cfgitem[MONETARY_SYMBOL]" type="text" class="tinput">
    </td>
  </tr>
  <tr>
    <td>{t}Show Currency Abbreviation{/t}</td>
    <td>
      <select name="cfgitem[SHOW_CURRENCY]">
	{html_options options=$options_truefalse selected=$config.SHOW_CURRENCY}
      </select>
  </tr>
  {/if}

  <tr><th colspan="2" class="clayout">{t}Layout{/t}</th></tr>

  {if $admin}

  <tr>
    <td>{t}Site name{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.SITENAME|wash}" name="cfgitem[SITENAME]" type="text" class="tinput"> </td>
  </tr>

  <tr>
    <td>{t}Default stylesheet (css) for new users{/t}</td>
    <td>
      <select name="cfgitem[DEFAULT_SKIN]">
        {html_options options=$options_styles selected=$config.DEFAULT_SKIN}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}Template set name{/t}</td>
    <td>
      <select name="cfgitem[TEMPLATESET]">
        {html_options options=$options_templatesets selected=$config.TEMPLATESET}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}Display date format (short){/t}</td>
    <td><input maxlength="100" size="50" value="{$config.DATEFORMAT_SHORT|wash}" name="cfgitem[DATEFORMAT_SHORT]" type="text" class="tinput"> [ <a class="ptr" onclick="openwindow('help_dateformat.php')">?</a> ] </td>
  </tr>
  <tr>
    <td>{t}Display date format (long){/t}</td>
    <td><input maxlength="100" size="50" value="{$config.DATEFORMAT_LONG|wash}" name="cfgitem[DATEFORMAT_LONG]" type="text" class="tinput"> [ <a class="ptr" onclick="openwindow('help_dateformat.php')">?</a> ] </td>
  </tr>
  <tr>
    <td>{t}Print date format{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.DATEFORMAT_PRINT|wash}" name="cfgitem[DATEFORMAT_PRINT]" type="text" class="tinput"> [ <a class="ptr" onclick="openwindow('help_dateformat.php?type=print')">?</a> ] </td>
  </tr>
  <tr>
    <td>{t}Display date format (short, time included){/t}</td>
    <td><input maxlength="100" size="50" value="{$config.DATETIMEFORMAT_SHORT|wash}" name="cfgitem[DATETIMEFORMAT_SHORT]" type="text" class="tinput"> [ <a class="ptr" onclick="openwindow('help_dateformat.php')">?</a> ] </td>
  </tr>
  <tr>
    <td>{t}Display date format (long, time included){/t}</td>
    <td><input maxlength="100" size="50" value="{$config.DATETIMEFORMAT_LONG|wash}" name="cfgitem[DATETIMEFORMAT_LONG]" type="text" class="tinput"> [ <a class="ptr" onclick="openwindow('help_dateformat.php')">?</a> ] </td>
  </tr>
  <tr>
    <td>{t}Person's name format for display{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.PENAME_FORMAT|wash}" name="cfgitem[PENAME_FORMAT]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Short location format{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.SHORTLOCATION_FORMAT|wash}" name="cfgitem[SHORTLOCATION_FORMAT]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Long location format{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.LOCATION_FORMAT|wash}" name="cfgitem[LOCATION_FORMAT]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Separator for thousands{/t}</td>
    <td><input maxlength="1" size="1" value="{$config.SEPARATOR_THOUSANDS|wash}" name="cfgitem[SEPARATOR_THOUSANDS]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Separator for decimals{/t}</td>
    <td><input maxlength="1" size="1" value="{$config.SEPARATOR_DECIMALS|wash}" name="cfgitem[SEPARATOR_DECIMALS]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Number of last tasks to be displayed on the summary page{/t}</td>
    <td><input maxlength="4" size="4" value="{$config.SHOWLASTOPERATIONS|wash}" name="cfgitem[SHOWLASTOPERATIONS]" type="text" class="tinput"></td>
  </tr>

  {/if}

  <tr>
    <td>{t}Number of records shown per page{/t}</td>
    <td><input maxlength="4" size="4" value="{$config.RECORDS_PERPAGE|wash}" name="cfgitem[RECORDS_PERPAGE]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Maximum number of characters of the task description to be displayed{/t}</td>
    <td><input maxlength="4" size="4" value="{$config.SHOWOPDESCLENGHT|wash}" name="cfgitem[SHOWOPDESCLENGHT]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Maximum number of characters of the task category title to be displayed in lists{/t}</td>
    <td><input maxlength="4" size="4" value="{$config.SHOWOPCATTITLELENGHT|wash}" name="cfgitem[SHOWOPCATTITLELENGHT]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Maximum number of characters of the project title to be displayed in lists{/t}</td>
    <td><input maxlength="4" size="4" value="{$config.SHOWPRJTITLELENGHT|wash}" name="cfgitem[SHOWPRJTITLELENGHT]" type="text" class="tinput"></td>
  </tr>

  {if $admin}

  <tr><th colspan="2" class="cchart">{t}Charts{/t}</th></tr>

  <tr>
    <td>{t}Enable Graphviz?{/t}</td>
    <td>
      <select name="cfgitem[GRAPHVIZ_ENABLED]">
        {html_options options=$options_truefalse selected=$config.GRAPHVIZ_ENABLED}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}Highlight Data Points on Bar Charts?{/t}</td>
    <td>
      <select name="cfgitem[HIGHLIGHT_BARCHART]">
        {html_options options=$options_truefalse selected=$config.HIGHLIGHT_BARCHART}
      </select>
    </td>
  </tr>

  <tr><th colspan="2" class="cpdf">{t}PDF Settings{/t}</th></tr>

  <tr>
    <td>{t}PDF page format{/t}</td>
    <td>
      <select name="cfgitem[PDF_DOCFORMAT]">
        {html_options options=$options_pdfpageformat selected=$config.PDF_DOCFORMAT}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}PDF template set name{/t}</td>
    <td>
      <select name="cfgitem[PDF_TEMPLATE]">
        {html_options options=$options_pdftemplatesets selected=$config.PDF_TEMPLATE}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}PDF document header font size{/t}</td>
    <td><input maxlength="6" size="6" value="{$config.PDF_FONT_SIZE_HEADER|wash}" name="cfgitem[PDF_FONT_SIZE_HEADER]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}PDF document normal font size{/t}</td>
    <td><input maxlength="6" size="6" value="{$config.PDF_FONT_SIZE_NORMAL|wash}" name="cfgitem[PDF_FONT_SIZE_NORMAL]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}PDF document small font size{/t}</td>
    <td><input maxlength="6" size="6" value="{$config.PDF_FONT_SIZE_SMALL|wash}" name="cfgitem[PDF_FONT_SIZE_SMALL]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Print letterhead by default?{/t}</td>
    <td>
      <select name="cfgitem[PDF_PRINT_LETTERHEAD_DEFAULT]">
        {html_options options=$options_truefalse selected=$config.PDF_PRINT_LETTERHEAD_DEFAULT}
      </select>
    </td>
  </tr>
  <tr>
    <td>{t}Invoice header,  e.g. Invoice 5 / 08-08-2002{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.BILL_PDF_HEADER|wash}" name="cfgitem[BILL_PDF_HEADER]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Quotation number 3 from 07-07-2002{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.QUOTATION_PDF_HEADER|wash}" name="cfgitem[QUOTATION_PDF_HEADER]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Default quotation footer{/t}</td>
    <td><input maxlength="100" size="50" value="{$config.QUOTATION_PDF_FOOTER|wash}" name="cfgitem[QUOTATION_PDF_FOOTER]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}An additional line you may want to add{/t}</td>
    <td><input maxlength="200" size="50" value="{$config.LETTERHEAD_ADDITIONAL_LINE|wash}" name="cfgitem[LETTERHEAD_ADDITIONAL_LINE]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Task description: max. number of characters per line in a pdf document{/t}</td>
    <td><input maxlength="6" size="6" value="{$config.PDFSHOWOPDESCLENGHT|wash}" name="cfgitem[PDFSHOWOPDESCLENGHT]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Invoice description: max. number of characters per line in a pdf document{/t}</td>
    <td><input maxlength="6" size="6" value="{$config.PDFSHOWBILLDESCLENGHT|wash}" name="cfgitem[PDFSHOWBILLDESCLENGHT]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Quotation description: max. number of characters per line in a pdf document{/t}</td>
    <td><input maxlength="6" size="6" value="{$config.PDFSHOWQUOTATIONDESCLENGHT|wash}" name="cfgitem[PDFSHOWQUOTATIONDESCLENGHT]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Width of the company logo in the PDF file{/t}</td>
    <td><input maxlength="6" size="6" value="{$config.PDF_LOGOWIDTH|wash}" name="cfgitem[PDF_LOGOWIDTH]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}PDF document left border{/t}</td>
    <td><input maxlength="6" size="6" value="{$config.PDF_BORDER_LEFT|wash}" name="cfgitem[PDF_BORDER_LEFT]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}PDF document top border{/t}</td>
    <td><input maxlength="6" size="6" value="{$config.PDF_BORDER_TOP|wash}" name="cfgitem[PDF_BORDER_TOP]" type="text" class="tinput"></td>
  </tr>
{*
  <tr>
    <td>{t}Graphs: width for PDF output{/t}</td>
    <td><input maxlength="6" size="6" value="{$config.GRAPH_PDF_WIDTH|wash}" name="cfgitem[GRAPH_PDF_WIDTH]" type="text" class="tinput"></td>
  </tr>
  <tr>
    <td>{t}Graphs: height for PDF output{/t}</td>
    <td><input maxlength="6" size="6" value="{$config.GRAPH_PDF_HEIGHT|wash}" name="cfgitem[GRAPH_PDF_HEIGHT]" type="text" class="tinput"></td>
  </tr>
*}
  {/if}

</table>

<input type="submit" name="submit" value="{t}Submit{/t}"> <input type="reset" name="reset" value="{t}Reset{/t}">

</form>
<script type="text/javascript">cp.writeDiv()</script>

<!-- END {$smarty.template} -->
