[ PHPXref.com ] [ Generated: Sun Jul 20 18:16:57 2008 ] [ ITNAS 0.94 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> wizard.php (source)

   1  <?php
   2  /*
   3   * The contents of this file are subject to the ITNAS Public License Version
   4   * 1.0 ("License"); You may not use this file except in compliance with the
   5   * License. You may obtain a copy of the License at http://en.itnas.org/license.html
   6   * Software distributed under the License is distributed on an "AS IS" basis,
   7   * WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the License
   8   * for the specific language governing rights and limitations under the
   9   * License.
  10   *
  11   * The Original Code is: ITNAS
  12   * The Initial Developer of the Original Code is Community Lösungen.
  13   * Portions created by macher24 are Copyright (C) 2006 Community Lösungen and XPlus Agency
  14   * All Rights Reserved.
  15   *
  16   * Installation wizard (step2)
  17   *
  18   * PHP version 5
  19   *
  20   * @package        ITNAS
  21   * @author        Alexander Meindl <am@community-loesungen.de>
  22   * @copyright    (c) 2006 Community Lösungen and Xplus Agency
  23   * @version        CVS: $Id: wizard.php,v 1.3 2006/05/25 09:48:43 mr3dblond Exp $
  24   */
  25  
  26  require_once ("libraries/openpage.inc");
  27  
  28  // get user variables
  29  ///////////////////////////////////////////////////////////////////////////
  30  $new_firma            = $cphp->get_user_var('new_firma',            'POST');
  31  $new_firma2            = $cphp->get_user_var('new_firma2',            'POST');
  32  $new_street            = $cphp->get_user_var('new_street',            'POST');
  33  $new_zip            = $cphp->get_user_var('new_zip',            'POST');
  34  $new_place            = $cphp->get_user_var('new_place',            'POST');
  35  $new_country        = $cphp->get_user_var('new_country',        'POST');
  36  $new_phone            = $cphp->get_user_var('new_phone',            'POST');
  37  $new_fax            = $cphp->get_user_var('new_fax',            'POST');
  38  $new_url            = $cphp->get_user_var('new_url',            'POST');
  39  $new_email            = $cphp->get_user_var('new_email',            'POST');
  40  $new_steuernr        = $cphp->get_user_var('new_steuernr',        'POST');
  41  $new_ustid            = $cphp->get_user_var('new_ustid',            'POST');
  42  $new_bank            = $cphp->get_user_var('new_bank',            'POST');
  43  $new_blz            = $cphp->get_user_var('new_blz',            'POST');
  44  $new_kto            = $cphp->get_user_var('new_kto',            'POST');
  45  $new_ktoinhaber        = $cphp->get_user_var('new_ktoinhaber',        'POST');
  46  $new_first_year        = $cphp->get_user_var('new_first_year',        'POST');
  47  $new_price_n2        = $cphp->get_user_var('new_price_n2',        'POST');
  48  $new_price_n3        = $cphp->get_user_var('new_price_n3',        'POST');
  49  $new_price_n4        = $cphp->get_user_var('new_price_n4',        'POST');
  50  $new_price_g1n1        = $cphp->get_user_var('new_price_g1n1',        'POST');
  51  $new_price_g1n2        = $cphp->get_user_var('new_price_g1n2',        'POST');
  52  $new_price_g1n3        = $cphp->get_user_var('new_price_g1n3',        'POST');
  53  $new_price_g1n4        = $cphp->get_user_var('new_price_g1n4',        'POST');
  54  $new_price_g2n1        = $cphp->get_user_var('new_price_g2n1',        'POST');
  55  $new_price_g2n2        = $cphp->get_user_var('new_price_g2n2',        'POST');
  56  $new_price_g2n3        = $cphp->get_user_var('new_price_g2n3',        'POST');
  57  $new_price_g2n4        = $cphp->get_user_var('new_price_g2n4',        'POST');
  58  $new_price_g3n1        = $cphp->get_user_var('new_price_g3n1',        'POST');
  59  $new_price_g3n2        = $cphp->get_user_var('new_price_g3n2',        'POST');
  60  $new_price_g3n3        = $cphp->get_user_var('new_price_g3n3',        'POST');
  61  $new_price_g3n4        = $cphp->get_user_var('new_price_g3n4',        'POST');
  62  $new_interval        = $cphp->get_user_var('new_interval',        'POST');
  63  $new_booking_type    = $cphp->get_user_var('new_booking_type',    'POST');
  64  $new_steuerart        = $cphp->get_user_var('new_steuerart',        'POST');
  65  $changed_data        = $cphp->get_user_var('changed_data',        'POST');
  66  ///////////////////////////////////////////////////////////////////////////
  67  
  68  if ($CONF['modaccess']['admin']==0) $itnas->noaccess("admin");
  69  
  70  if (!isvoid($_POST['run_logout']))
  71  {
  72      $new_location = ITNAS_URL."/index.php?logout=1";
  73      header("Location: $new_location");
  74      exit;
  75  }
  76  else if ($changed_data==2)
  77  {
  78      $new_location = ITNAS_URL."/";
  79      header("Location: $new_location");
  80      exit;
  81  }
  82  
  83  
  84  if (!isvoid($_POST['run_level1']))
  85  {
  86      $viewmode = 1;
  87  }
  88  if (!isvoid($_POST['run_level2']))
  89  {
  90      $viewmode = 2;
  91  
  92      if (isvoid($changed_data,true))
  93      {
  94          $changed_data = 1;
  95  
  96          $new_firma      = $CONF['company'];
  97          $new_firma2         = $CONF['company2'];
  98          $new_street     = $CONF['company_street'];
  99          $new_zip        = $CONF['company_zip'];
 100          $new_place      = $CONF['company_place'];
 101          $new_country    = $CONF['company_country_id'];
 102          $new_phone      = $CONF['company_phone'];
 103          $new_fax        = $CONF['company_fax'];
 104          $new_url        = $CONF['company_web'];
 105          $new_email      = $CONF['company_email'];
 106          $new_steuernr   = $CONF['tax_no'];
 107          $new_ustid      = $CONF['tax_ustid'];
 108          $new_bank       = $CONF['bank_name'];
 109          $new_blz        = $CONF['bank_blz'];
 110          $new_kto        = $CONF['bank_kto'];
 111          $new_ktoinhaber = $CONF['bank_account_owner'];
 112  
 113          $new_first_year = $CONF['fibu_firstyear'];
 114  
 115          $new_price_n2    = $cphp->convnumSep($CONF['price_n2'], $CONF['login_num_dec'], 2);
 116          $new_price_n3    = $cphp->convnumSep($CONF['price_n3'], $CONF['login_num_dec'], 2);
 117          $new_price_n4    = $cphp->convnumSep($CONF['price_n4'], $CONF['login_num_dec'], 2);
 118          $new_price_g1n1    = $cphp->convnumSep($cphp->currFactor($CONF['price_g1n1']),$CONF['login_num_dec'],2);
 119          $new_price_g1n2    = $cphp->convnumSep($cphp->currFactor($CONF['price_g1n2']),$CONF['login_num_dec'],2);
 120          $new_price_g1n3    = $cphp->convnumSep($cphp->currFactor($CONF['price_g1n3']),$CONF['login_num_dec'],2);
 121          $new_price_g1n4    = $cphp->convnumSep($cphp->currFactor($CONF['price_g1n4']),$CONF['login_num_dec'],2);
 122          $new_price_g2n1    = $cphp->convnumSep($cphp->currFactor($CONF['price_g2n1']),$CONF['login_num_dec'],2);
 123          $new_price_g2n2    = $cphp->convnumSep($cphp->currFactor($CONF['price_g2n2']),$CONF['login_num_dec'],2);
 124          $new_price_g2n3    = $cphp->convnumSep($cphp->currFactor($CONF['price_g2n3']),$CONF['login_num_dec'],2);
 125          $new_price_g2n4    = $cphp->convnumSep($cphp->currFactor($CONF['price_g2n4']),$CONF['login_num_dec'],2);
 126          $new_price_g3n1    = $cphp->convnumSep($cphp->currFactor($CONF['price_g3n1']),$CONF['login_num_dec'],2);
 127          $new_price_g3n2    = $cphp->convnumSep($cphp->currFactor($CONF['price_g3n2']),$CONF['login_num_dec'],2);
 128          $new_price_g3n3    = $cphp->convnumSep($cphp->currFactor($CONF['price_g3n3']),$CONF['login_num_dec'],2);
 129          $new_price_g3n4    = $cphp->convnumSep($cphp->currFactor($CONF['price_g3n4']),$CONF['login_num_dec'],2);
 130          $new_interval    = $CONF['tax_period'];
 131          $new_steuerart    = $CONF['tax_type'];
 132      }
 133  }
 134  else if (!isvoid($_POST['run_level3']))
 135  {
 136      $viewmode = 2;
 137  
 138      if (isvoid($new_firma))
 139          $cphp->add_form_error(STR_ERR_COMPANY, "new_firma");
 140  
 141      if (isvoid($new_street))
 142          $cphp->add_form_error(STR_ERR_STREET, "new_street");
 143  
 144      if (isvoid($new_zip))
 145          $cphp->add_form_error(STR_ERR_ZIP, "new_zip");
 146      else if (!$cphp->checkZip($new_zip))
 147          $cphp->add_form_error(STR_ERR_ZIP2, "new_zip");
 148  
 149      if (isvoid($new_place))
 150          $cphp->add_form_error(STR_ERR_PLACE, "new_place");
 151  
 152      if (isvoid($new_phone))
 153          $cphp->add_form_error(STR_ERR_PHONE, "new_phone");
 154      else if (!$cphp->checkPhone($new_phone))
 155          $cphp->add_form_error(STR_ERR_PHONE2, "new_phone");
 156  
 157      if (isvoid($new_country,true))
 158          $cphp->add_form_error(STR_ERR_COUNTRY, "new_country");
 159  
 160      if ((!isvoid($new_fax)) && (!$cphp->checkPhone($new_fax)))
 161          $cphp->add_form_error(STR_ERR_FAX2, "new_fax");
 162  
 163     if ((!isvoid($new_url)) && (!Validate::uri($new_url, array('domain_check'=>true, 'allowed_schemes'=>array("http", "https")))))
 164          $cphp->add_form_error(STR_ERR_URL2, "new_url");
 165  
 166      if (isvoid($new_email))
 167          $cphp->add_form_error(STR_ERR_EMAIL, "new_email");
 168      else if (!$cphp->checkEmail($new_email,false))
 169          $cphp->add_form_error(STR_ERR_EMAIL2, "new_email");
 170  
 171      if (isvoid($new_steuernr,true))
 172          $cphp->add_form_error(STR_ERR_TAXNUMBER, "new_steuernr");
 173  
 174      if (isvoid($new_bank,true))
 175          $cphp->add_form_error(STR_ERR_BANK, "new_bank");
 176  
 177      if (isvoid($new_blz,true))
 178          $cphp->add_form_error(STR_ERR_BANK_ID, "new_blz");
 179  
 180      if (isvoid($new_kto,true))
 181          $cphp->add_form_error(STR_ERR_ACCOUNT_NUMBER, "new_kto");
 182  
 183      if (isvoid($new_ktoinhaber,true))
 184          $cphp->add_form_error(STR_ERR_ACCOUNT_OWNER, "new_ktoinhaber");
 185  
 186      if (!$cphp->is_form_error())
 187      {
 188          $viewmode = 3;
 189      }
 190  }
 191  else if (!isvoid($_POST['run_level4']))
 192  {
 193      $viewmode = 3;
 194  
 195      if ((isvoid($new_price_n2)) || (isvoid($new_price_n3)) || (isvoid($new_price_n4)))
 196          $cphp->add_form_error(STR_ERR_ARTICLE_PRICE_N, "new_price_n2,new_price_n3,new_price_n4");
 197      else if (((!$cphp->checkNumber($new_price_n2, $CONF['login_num_dec'],false)) || ($new_price_n2<2)) ||
 198              ((!$cphp->checkNumber($new_price_n3, $CONF['login_num_dec'],false)) || ($new_price_n3<2)) ||
 199              ((!$cphp->checkNumber($new_price_n4, $CONF['login_num_dec'],false)) || ($new_price_n4<2)))
 200          $cphp->add_form_error(STR_ERR_ARTICLE_PRICE_N2, "new_price_n2,new_price_n3,new_price_n4");
 201  
 202      if ((isvoid($new_price_g1n1)) || (isvoid($new_price_g1n2)) || (isvoid($new_price_g1n3)) || (isvoid($new_price_g1n4)))
 203          $cphp->add_form_error(sprintf(STR_ERR_CONFIG_PRICE_G,"A"), "new_price_g1n1,new_price_g1n2,new_price_g1n3,new_price_g1n4");
 204      else if ((!$cphp->checkNumber($new_price_g1n1,$CONF['login_num_dec'],false)) ||
 205              (!$cphp->checkNumber($new_price_g1n2,$CONF['login_num_dec'],false)) ||
 206              (!$cphp->checkNumber($new_price_g1n3,$CONF['login_num_dec'],false)) ||
 207              (!$cphp->checkNumber($new_price_g1n4,$CONF['login_num_dec'],false)))
 208          $cphp->add_form_error(sprintf(STR_ERR_CONFIG_PRICE_G2,"A"), "new_price_g1n1,new_price_g1n2,new_price_g1n3,new_price_g1n4");
 209  
 210      if ((isvoid($new_price_g2n1)) || (isvoid($new_price_g2n2)) || (isvoid($new_price_g2n3)) || (isvoid($new_price_g2n4)))
 211          $cphp->add_form_error(sprintf(STR_ERR_CONFIG_PRICE_G,"B"), "new_price_g2n1,new_price_g2n2,new_price_g2n3,new_price_g2n4");
 212      else if ((!$cphp->checkNumber($new_price_g2n1,$CONF['login_num_dec'],false)) ||
 213              (!$cphp->checkNumber($new_price_g2n2,$CONF['login_num_dec'],false)) ||
 214              (!$cphp->checkNumber($new_price_g2n3,$CONF['login_num_dec'],false)) ||
 215              (!$cphp->checkNumber($new_price_g2n4,$CONF['login_num_dec'],false)))
 216          $cphp->add_form_error(sprintf(STR_ERR_CONFIG_PRICE_G2,"B"), "new_price_g2n1,new_price_g2n2,new_price_g2n3,new_price_g2n4");
 217  
 218      if ((isvoid($new_price_g3n1)) || (isvoid($new_price_g3n2)) || (isvoid($new_price_g3n3)) || (isvoid($new_price_g3n4)))
 219          $cphp->add_form_error(sprintf(STR_ERR_CONFIG_PRICE_G,"C"), "new_price_g3n1,new_price_g3n2,new_price_g3n3,new_price_g3n4");
 220      else if ((!$cphp->checkNumber($new_price_g3n1,$CONF['login_num_dec'],false)) ||
 221              (!$cphp->checkNumber($new_price_g3n2,$CONF['login_num_dec'],false)) ||
 222              (!$cphp->checkNumber($new_price_g3n3,$CONF['login_num_dec'],false)) ||
 223              (!$cphp->checkNumber($new_price_g3n4,$CONF['login_num_dec'],false)))
 224          $cphp->add_form_error(sprintf(STR_ERR_CONFIG_PRICE_G2,"C"), "new_price_g3n1,new_price_g3n2,new_price_g3n3,new_price_g3n4");
 225  
 226      if (isvoid($CONF['company']))
 227      {
 228          if (isvoid($new_first_year))
 229              $cphp->add_form_error(STR_ERR_FIRST_YEAR, "new_first_year");
 230          else if ((intval($new_first_year)<2002) || (intval($new_first_year)>date("Y")))
 231              $cphp->add_form_error(STR_ERR_FIRST_YEAR2, "new_first_year");
 232      }
 233  
 234      if (!$cphp->is_form_error())
 235      {
 236          // if company is empty means first save of wizard data: correct admin country_id
 237          if (isvoid($CONF['company']))
 238          {
 239              $sqlstr  = "UPDATE users SET country_id=".$cphp->sql_value($new_country);
 240              $sqsltr .= " WHERE user_id=1";
 241              $db->query($sqlstr);
 242          }
 243  
 244          $itnas->change_pref('company',            $new_firma);
 245          $itnas->change_pref('company2',           $new_firma2);
 246          $itnas->change_pref('company_street',     $new_street);
 247          $itnas->change_pref('company_zip',        $new_zip);
 248          $itnas->change_pref('company_place',      $new_place);
 249          $itnas->change_pref('company_country_id', $new_country);
 250          $itnas->change_pref('company_phone',      $new_phone);
 251          $itnas->change_pref('company_fax',        $new_fax);
 252          $itnas->change_pref('company_web',        $new_url);
 253          $itnas->change_pref('company_email',      $new_email);
 254          $itnas->change_pref('tax_no',             $new_steuernr);
 255          $itnas->change_pref('tax_ustid',          $new_ustid);
 256          $itnas->change_pref('bank_name',          $new_bank);
 257          $itnas->change_pref('bank_blz',           $new_blz);
 258          $itnas->change_pref('bank_kto',           $new_kto);
 259          $itnas->change_pref('bank_account_owner', $new_ktoinhaber);
 260  
 261          if (isvoid($CONF['company']))
 262              $itnas->change_pref('fibu_firstyear',    $new_first_year);
 263  
 264          $itnas->change_pref('price_n2',        $cphp->convtoNum($new_price_n2, $CONF['login_num_dec']));
 265          $itnas->change_pref('price_n3',        $cphp->convtoNum($new_price_n3, $CONF['login_num_dec']));
 266          $itnas->change_pref('price_n4',        $cphp->convtoNum($new_price_n4, $CONF['login_num_dec']));
 267          $itnas->change_pref('price_g1n1',    $cphp->currFactor($cphp->convtoNum($new_price_g1n1,$CONF['login_num_dec']), true));
 268          $itnas->change_pref('price_g1n2',    $cphp->currFactor($cphp->convtoNum($new_price_g1n2,$CONF['login_num_dec']), true));
 269          $itnas->change_pref('price_g1n3',    $cphp->currFactor($cphp->convtoNum($new_price_g1n3,$CONF['login_num_dec']), true));
 270          $itnas->change_pref('price_g1n4',    $cphp->currFactor($cphp->convtoNum($new_price_g1n4,$CONF['login_num_dec']), true));
 271          $itnas->change_pref('price_g2n1',    $cphp->currFactor($cphp->convtoNum($new_price_g2n1,$CONF['login_num_dec']), true));
 272          $itnas->change_pref('price_g2n2',    $cphp->currFactor($cphp->convtoNum($new_price_g2n2,$CONF['login_num_dec']), true));
 273          $itnas->change_pref('price_g2n3',    $cphp->currFactor($cphp->convtoNum($new_price_g2n3,$CONF['login_num_dec']), true));
 274          $itnas->change_pref('price_g2n4',    $cphp->currFactor($cphp->convtoNum($new_price_g2n4,$CONF['login_num_dec']), true));
 275          $itnas->change_pref('price_g3n1',    $cphp->currFactor($cphp->convtoNum($new_price_g3n1,$CONF['login_num_dec']), true));
 276          $itnas->change_pref('price_g3n2',    $cphp->currFactor($cphp->convtoNum($new_price_g3n2,$CONF['login_num_dec']), true));
 277          $itnas->change_pref('price_g3n3',    $cphp->currFactor($cphp->convtoNum($new_price_g3n3,$CONF['login_num_dec']), true));
 278          $itnas->change_pref('price_g3n4',    $cphp->currFactor($cphp->convtoNum($new_price_g3n4,$CONF['login_num_dec']), true));
 279          $itnas->change_pref('tax_period',   $new_interval,"","Q");
 280          $itnas->change_pref('tax_type',     $new_steuerart,"S","I");
 281          $itnas->change_pref('booking_type', $new_booking_type,"D","B");
 282  
 283          $viewmode = 4;
 284      }
 285  }
 286  
 287  $itnas->html_header(STR_WIZARD);
 288  
 289  ?>
 290  
 291  <script type="text/javascript" language="JavaScript">
 292  <!--
 293  
 294  function RunHelp(mode)
 295  {
 296     if (mode=='level3')
 297        url = "help/german/admin_properties.html#booking";
 298     else
 299        url = "help/german/admin_properties.html#common";
 300  
 301     popupWindow = window.open(url,"Help");
 302     return true;
 303  }
 304  
 305  //-->
 306  </script>
 307  <?php
 308  
 309  // show errors
 310  if ($cphp->is_form_error())            print $cphp->show_form_errors();
 311  else print "<br />\n";
 312  
 313  if (isvoid($viewmode,true))
 314     $viewmode=1;
 315  
 316  print $cphp->fm_start();
 317  print "<div align=\"center\">\n";
 318  print "<table cellpadding=\"0\" cellspacing=\"0\" width=\"95%\"><tr><td style=\"background-color: ".$STYLE['link_color']."\"><table cellpadding=\"4\" cellspacing=\"1\" width=\"100%\">\n";
 319  print "<tr><th style=\"background-color: ".$STYLE['highlight_bgcolor']."; color: ".$STYLE['highlight_color']."; font-weight: bold;\" align=\"center\">";
 320  print "Itnas&nbsp;".STR_WIZARD."&nbsp;".STR_LEVEL."&nbsp;".$viewmode."&nbsp;".STR_OF."&nbsp;4";
 321  print "</th></tr>\n";
 322  print "<tr><td style=\"background-color: ".$STYLE['bgcolor_note']."\">\n";
 323  
 324  if ($viewmode==1)
 325  {
 326      if ($changed_data==1)
 327      {
 328          print $cphp->fm_hidden("new_firma"        ,$new_firma);
 329          print $cphp->fm_hidden("new_firma2"        ,$new_firma2);
 330          print $cphp->fm_hidden("new_street"        ,$new_street);
 331          print $cphp->fm_hidden("new_zip"            ,$new_zip);
 332          print $cphp->fm_hidden("new_place"        ,$new_place);
 333          print $cphp->fm_hidden("new_country"        ,$new_country);
 334          print $cphp->fm_hidden("new_phone"        ,$new_phone);
 335          print $cphp->fm_hidden("new_fax"            ,$new_fax);
 336          print $cphp->fm_hidden("new_url"            ,$new_url);
 337          print $cphp->fm_hidden("new_email"        ,$new_email);
 338          print $cphp->fm_hidden("new_steuernr"        ,$new_steuernr);
 339          print $cphp->fm_hidden("new_ustid"        ,$new_ustid);
 340          print $cphp->fm_hidden("new_bank"            ,$new_bank);
 341          print $cphp->fm_hidden("new_blz"            ,$new_blz);
 342          print $cphp->fm_hidden("new_kto"            ,$new_kto);
 343          print $cphp->fm_hidden("new_ktoinhaber"    ,$new_ktoinhaber);
 344  
 345          print $cphp->fm_hidden("new_price_n2"        ,$new_price_n2);
 346          print $cphp->fm_hidden("new_price_n3"        ,$new_price_n3);
 347          print $cphp->fm_hidden("new_price_n4"        ,$new_price_n4);
 348          print $cphp->fm_hidden("new_price_g1n1"    ,$new_price_g1n1);
 349          print $cphp->fm_hidden("new_price_g1n2"    ,$new_price_g1n2);
 350          print $cphp->fm_hidden("new_price_g1n3"    ,$new_price_g1n3);
 351          print $cphp->fm_hidden("new_price_g1n4"    ,$new_price_g1n4);
 352          print $cphp->fm_hidden("new_price_g2n1"    ,$new_price_g2n1);
 353          print $cphp->fm_hidden("new_price_g2n2"    ,$new_price_g2n2);
 354          print $cphp->fm_hidden("new_price_g2n3"    ,$new_price_g2n3);
 355          print $cphp->fm_hidden("new_price_g2n4"    ,$new_price_g2n4);
 356          print $cphp->fm_hidden("new_price_g3n1"    ,$new_price_g3n1);
 357          print $cphp->fm_hidden("new_price_g3n2"    ,$new_price_g3n2);
 358          print $cphp->fm_hidden("new_price_g3n3"    ,$new_price_g3n3);
 359          print $cphp->fm_hidden("new_price_g3n4"    ,$new_price_g3n4);
 360          print $cphp->fm_hidden("new_first_year"    ,$new_first_year);
 361          print $cphp->fm_hidden("new_interval"        ,$new_interval);
 362          print $cphp->fm_hidden("new_booking_type"    ,$new_booking_type);
 363          print $cphp->fm_hidden("new_steuerart"    ,$new_steuerart);
 364      }
 365      print $cphp->fm_hidden("changed_data", $changed_data);
 366      print STR_WIZARD_LEVEL1;
 367  
 368     print "</td></tr></table></td></tr></table>\n";
 369     print "<br />\n";
 370     print $cphp->fm_submit("run_logout",STR_LOGOUT)."\n";
 371     print "&nbsp;".$cphp->fm_submit("run_level2",STR_CONTINUE)."\n";
 372  }
 373  else if ($viewmode==2)
 374  {
 375      if ($changed_data==1)
 376      {
 377          print $cphp->fm_hidden("new_price_n2"        ,$new_price_n2);
 378          print $cphp->fm_hidden("new_price_n3"        ,$new_price_n3);
 379          print $cphp->fm_hidden("new_price_n4"        ,$new_price_n4);
 380          print $cphp->fm_hidden("new_price_g1n1"    ,$new_price_g1n1);
 381          print $cphp->fm_hidden("new_price_g1n2"    ,$new_price_g1n2);
 382          print $cphp->fm_hidden("new_price_g1n3"    ,$new_price_g1n3);
 383          print $cphp->fm_hidden("new_price_g1n4"    ,$new_price_g1n4);
 384          print $cphp->fm_hidden("new_price_g2n1"    ,$new_price_g2n1);
 385          print $cphp->fm_hidden("new_price_g2n2"    ,$new_price_g2n2);
 386          print $cphp->fm_hidden("new_price_g2n3"    ,$new_price_g2n3);
 387          print $cphp->fm_hidden("new_price_g2n4"    ,$new_price_g2n4);
 388          print $cphp->fm_hidden("new_price_g3n1"    ,$new_price_g3n1);
 389          print $cphp->fm_hidden("new_price_g3n2"    ,$new_price_g3n2);
 390          print $cphp->fm_hidden("new_price_g3n3"    ,$new_price_g3n3);
 391          print $cphp->fm_hidden("new_price_g3n4"    ,$new_price_g3n4);
 392          print $cphp->fm_hidden("new_first_year",        $new_first_year);
 393          print $cphp->fm_hidden("new_interval",        $new_interval);
 394          print $cphp->fm_hidden("new_booking_type",    $new_booking_type);
 395          print $cphp->fm_hidden("new_steuerart",        $new_steuerart);
 396     }
 397     print $cphp->fm_hidden("changed_data", $changed_data);
 398     print "<table>\n";
 399     print "<tr><td>".STR_COMPANY.":<br /></td><td>".$cphp->fm_input("new_firma",$new_firma,"s9")."</td></tr>\n";
 400     print "<tr><td>".STR_ADDON.":<br /></td><td>".$cphp->fm_input("new_firma2",$new_firma2,"s9")."</td></tr>\n";
 401     print "<tr><td>".STR_STREET.":<br /></td><td>".$cphp->fm_input("new_street",$new_street,"s9")."</td></tr>\n";
 402     print "<tr><td>".STR_ZIP_PLACE.":<br /></td><td>".$cphp->fm_input("new_zip",$new_zip,"s3")."&nbsp;".$cphp->fm_input("new_place",$new_place,"s6")."</td></tr>\n";
 403  
 404      print "<tr><td>".STR_COUNTRY.":</td><td>\n";
 405      $fmdata = $itnas->country_options($CONF['login_language']);
 406      print $cphp->fm_select("new_country", $fmdata, $new_country);
 407      print "</td></tr>\n";
 408  
 409      print "<tr><td>".STR_PHONE.":<br /></td><td>".$cphp->fm_input("new_phone",$new_phone,"s9")."</td></tr>\n";
 410      print "<tr><td>".STR_FAX.":<br /></td><td>".$cphp->fm_input("new_fax",$new_fax,"s9")."</td></tr>\n";
 411      print "<tr><td>".STR_URL.":<br /></td><td>".$cphp->fm_input("new_url",$new_url,"s9")."</td></tr>\n";
 412      print "<tr><td>".STR_EMAIL.":<br /></td><td>".$cphp->fm_input("new_email",$new_email,"s9")."</td></tr>\n";
 413      print "<tr><td>".STR_TAX_NO.":<br /></td><td>".$cphp->fm_input("new_steuernr",$new_steuernr,"s9")."</td></tr>\n";
 414      print "<tr><td>".STR_USTID.":<br /></td><td>".$cphp->fm_input("new_ustid",$new_ustid,"s9")."</td></tr>\n";
 415      print "<tr><td>".STR_BANK.":<br /></td><td>".$cphp->fm_input("new_bank",$new_bank,"s9")."</td></tr>\n";
 416      print "<tr><td>".STR_ACCOUNT_OWNER.":<br /></td><td>".$cphp->fm_input("new_ktoinhaber",$new_ktoinhaber,"s9")."</td></tr>\n";
 417      print "<tr><td>".STR_BANKID_ACCOUNT_NO.":<br /></td><td>".$cphp->fm_input("new_blz",$new_blz,"s4")."&nbsp;".$cphp->fm_input("new_kto",$new_kto,"s5")."</td></tr>\n";
 418      print "</table>\n";
 419  
 420      print "</td></tr></table></td></tr></table>\n";
 421      print "<br />\n";
 422      print $cphp->fm_button("run_help",STR_HELP,"RunHelp('level2')")."\n";
 423      print "&nbsp;&nbsp;".$cphp->fm_submit("run_level1",STR_BACK)."\n";
 424      print "&nbsp;&nbsp;".$cphp->fm_submit("run_level3",STR_CONTINUE)."\n";
 425  }
 426  else if ($viewmode==3)
 427  {
 428     if ($changed_data==1)
 429     {
 430        print $cphp->fm_hidden("new_firma"        ,$new_firma);
 431        print $cphp->fm_hidden("new_firma2"       ,$new_firma2);
 432        print $cphp->fm_hidden("new_street"       ,$new_street);
 433        print $cphp->fm_hidden("new_zip"          ,$new_zip);
 434        print $cphp->fm_hidden("new_place"        ,$new_place);
 435        print $cphp->fm_hidden("new_country"      ,$new_country);
 436        print $cphp->fm_hidden("new_phone"        ,$new_phone);
 437        print $cphp->fm_hidden("new_fax"          ,$new_fax);
 438        print $cphp->fm_hidden("new_url"          ,$new_url);
 439        print $cphp->fm_hidden("new_email"        ,$new_email);
 440        print $cphp->fm_hidden("new_steuernr"     ,$new_steuernr);
 441        print $cphp->fm_hidden("new_ustid"        ,$new_ustid);
 442        print $cphp->fm_hidden("new_bank"         ,$new_bank);
 443        print $cphp->fm_hidden("new_blz"          ,$new_blz);
 444        print $cphp->fm_hidden("new_kto"          ,$new_kto);
 445        print $cphp->fm_hidden("new_ktoinhaber"   ,$new_ktoinhaber);
 446     }
 447     print $cphp->fm_hidden("changed_data", $changed_data);
 448  
 449      print "<table>\n";
 450      print "<tr><td>".STR_ADMIN_OTHER_INCREASE.":<br /></td><td>";
 451  
 452      print "<table cellspacing=\"3\">\n";
 453      print "<tr><td>".STR_AMOUNT.":</td><td align=\"center\">1</td><td>".$cphp->fm_input("new_price_n2",$new_price_n2,"s2","",$input_option)."</td><td>".$cphp->fm_input("new_price_n3",$new_price_n3,"s2","",$input_option)."</td><td>".$cphp->fm_input("new_price_n4",$new_price_n4,"s2","",$input_option)."</td></tr>\n";
 454      print "<tr><td>".STR_GROUP." A:</td><td>".$cphp->fm_input("new_price_g1n1",$new_price_g1n1,"s2","",$input_option)."&nbsp;"."%</td><td>".$cphp->fm_input("new_price_g1n2",$new_price_g1n2,"s2","",$input_option)."&nbsp;"."%</td><td>".$cphp->fm_input("new_price_g1n3",$new_price_g1n3,"s2","",$input_option)."&nbsp;"."%</td><td>".$cphp->fm_input("new_price_g1n4",$new_price_g1n4,"s2","",$input_option)."&nbsp;"."%</td></tr>\n";
 455      print "<tr><td>".STR_GROUP." B:</td><td>".$cphp->fm_input("new_price_g2n1",$new_price_g2n1,"s2","",$input_option)."&nbsp;"."%</td><td>".$cphp->fm_input("new_price_g2n2",$new_price_g2n2,"s2","",$input_option)."&nbsp;"."%</td><td>".$cphp->fm_input("new_price_g2n3",$new_price_g2n3,"s2","",$input_option)."&nbsp;"."%</td><td>".$cphp->fm_input("new_price_g2n4",$new_price_g2n4,"s2","",$input_option)."&nbsp;"."%</td></tr>\n";
 456      print "<tr><td>".STR_GROUP." C:</td><td>".$cphp->fm_input("new_price_g3n1",$new_price_g3n1,"s2","",$input_option)."&nbsp;"."%</td><td>".$cphp->fm_input("new_price_g3n2",$new_price_g3n2,"s2","",$input_option)."&nbsp;"."%</td><td>".$cphp->fm_input("new_price_g3n3",$new_price_g3n3,"s2","",$input_option)."&nbsp;"."%</td><td>".$cphp->fm_input("new_price_g3n4",$new_price_g3n4,"s2","",$input_option)."&nbsp;"."%</td></tr>\n";
 457      print "</table>\n";
 458      print "</td></tr>\n";
 459  
 460      if (isvoid($CONF['company']))
 461          print "<tr><td><br />".STR_FIBU_FIRST_YEAR.":<br /></td><td><br />".$cphp->fm_input("new_first_year",$new_first_year, "s1", "", $input_option)."</td></tr>\n";
 462  
 463      print "<tr><td><br />".STR_SALESTAX_PERIOD.":<br /></td><td><br />\n";
 464      print $cphp->fm_radio("new_interval", "M", STR_MONTHLY."<br />", $new_interval);
 465      print $cphp->fm_radio("new_interval", "Q", STR_EVERY_QUARTER."<br />", $new_interval ,"M,Y");
 466      print $cphp->fm_radio("new_interval", "Y", ucfirst(STR_ANNUAL), $new_interval)."</td></tr>\n";
 467  
 468      print "<tr><td><br />".STR_BOOKING_TYPE.":<br /></td><td><br />\n";
 469      print $cphp->fm_radio("new_booking_type", "S", STR_BOOKING_TYPE_BATCH."<br />", $new_booking_type);
 470      print $cphp->fm_radio("new_booking_type", "D", STR_BOOKING_TYPE_DIRECT, $new_booking_type, "S")."</td></tr>\n";
 471  
 472      print "<tr><td><br />".STR_TAXATION.":<br /></td><td><br />\n";
 473      print $cphp->fm_radio("new_steuerart", "S", STR_TAX_SOLL."<br />", $new_steuerart);
 474      print $cphp->fm_radio("new_steuerart", "I", STR_TAX_IST, $new_steuerart, "S")."<br /><br /></td></tr>\n";
 475  
 476      print "</table>\n";
 477  
 478      print "</td></tr></table></td></tr></table>\n";
 479      print "<br />\n";
 480      print $cphp->fm_button("run_help",STR_HELP,"RunHelp('level3')")."\n";
 481      print "&nbsp;&nbsp;".$cphp->fm_submit("run_level2",STR_BACK)."\n";
 482      print "&nbsp;&nbsp;".$cphp->fm_submit("run_level4",STR_CONTINUE)."\n";
 483  }
 484  else
 485  {
 486      print $cphp->fm_hidden("changed_data", 2);
 487  
 488      print STR_WIZARD_LEVEL4;
 489  
 490      print "</td></tr></table></td></tr></table>\n";
 491      print "<br />\n";
 492      print $cphp->fm_submit("run_save",STR_CONTINUE)."\n";
 493  }
 494  
 495  print "</div>\n";
 496  print $cphp->fm_end();
 497  
 498  $itnas->html_footer();
 499  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]