function start(){

  global $ar,$db;

  $dt=array();

  $dt2=array();

  $dt[menu]=tab_add_menu();

  //account_trx

  $sql2=SELECT `id`,`name`,`code`,`c3`,`parent_id` from `account` where trx=1;

  $res2=mysqli_query($db,$sql2);

  $r2=mysqli_num_rows($res2);

  $dt[account_trx][count]=$r2;



  $sql=$sql2. order by `code`;

  //echo $sql.;<br>;

  $res=mysqli_query($db,$sql);

  if(mysqli_num_rows($res2)>0) {

    $c=0; $d=0;

    while($r1=mysqli_fetch_assoc($res)) {

      $dt[account_trx][data][all][$r1[code]]=$r1;

      if($r1[c3]<30) {

        $dt[account_trx][data][left][$c]=$r1;

        $c++;

      } else {

        $dt[account_trx][data][right][$d]=$r1; 

        $d++;     

      }

    }

  } else {

    $dt[account_trx][count]=0;

  }



  //account_trx

  $sql2=SELECT `id`,`name`,`code`,`parent` from `fcode` where `code`=c61 or `code`=c62  or `code`=c81 or `code`=c11 or `code`=c21 or `code`=c31;

  $res2=mysqli_query($db,$sql2);

  $r2=mysqli_num_rows($res2);



  $sql=$sql2. order by `code`;

  //echo $sql.;<br>;

  $res=mysqli_query($db,$sql);

  if(mysqli_num_rows($res2)>0) {

    $c=0;

    while($r1=mysqli_fetch_assoc($res)) {

      $dt[account_cost][data][$r1[code]]=$r1;

      $sql3=SELECT `id`,`name`,`code`,`parent` from `fcode` where `parent`=.$r1[id]. and trx=1 and is_cost=1 order by `name`;

      $res3=mysqli_query($db,$sql3);

      $d=0;

      while($r3=mysqli_fetch_assoc($res3)) {

        $dt[account_cost][data][$r1[code]][items][$d]=$r3;

        $dt[account_cost][data][$r1[code]][items][$d][code]=substr($r3[code],1);

        $d++;        

      }

      $c++;

    }

  } 



  //account_trx

  $sql2=SELECT `id`,`name`,`code`,`parent` from `fcode` where `code`=c31  or `code`=c71 or `code`=c11 or `code`=c21 ;

  $res2=mysqli_query($db,$sql2);

  $r2=mysqli_num_rows($res2);



  $sql=$sql2. order by `code`;

  //echo $sql.;<br>;

  $res=mysqli_query($db,$sql);

  if(mysqli_num_rows($res2)>0) {

    $c=0;

    while($r1=mysqli_fetch_assoc($res)) {

      $dt[account_in][data][$r1[code]]=$r1;

      $sql3=SELECT `id`,`name`,`code`,`parent` from `fcode` where `parent`=.$r1[id]. and trx=1 and is_income=1 order by `name`;

      $res3=mysqli_query($db,$sql3);

      $d=0;

      while($r3=mysqli_fetch_assoc($res3)) {

        $dt[account_in][data][$r1[code]][items][$d]=$r3;

        $dt[account_in][data][$r1[code]][items][$d][code]=substr($r3[code],1);

        $d++;        

      }

      $c++;

    }

  } 



  //icons

  include_once $ar[path_core].u9/inc.ar.f7icon.php;

  $dt[icons][count]=count($ar[f7_icon]);

  foreach($ar[f7_icon] as $k=>$v) {

    $dt[icons][data][$k][name]=$v;

    $dt[icons][data][$k][id]=$k+1;

  }

  $dt2[result]=$dt;

  $dt2[status]=true;

  //echo json_encode($dt2);

  return $dt2;

  $db->close();

}