<?php
include( "../lib_PHP/PhPage.lib.php" );
$n_path = $_SERVER['DOCUMENT_ROOT'] . '/studio/desenv/usuarios/othuki/config/';
/*
$obj = "datasource1";
$item = "host";
$val_ = "localhost";
*/
$obj = "Table1";
$item = "tabela";
$val_ = "usuario__";

        // atualiza o arquivo config.data.ini
        $fileINI = $n_path . $obj .'.config.data.ini';
        if( file_exists( $fileINI ) )
        {
          $arrINI = readINIfile( $fileINI, ';' );
          $flagINI = false;
          echo"\n<pre>";print_r($arrINI);echo"\n";
          foreach( $arrINI as $_i_ => $_arr_ )
          {
            foreach( $_arr_ as $ii_ => $_ite_ )
            {
              if( $ii_ == $item  )
              {
                $arrINI[ $_i_  ][ $item ] = $val_;
                $flagINI = true;
              }// End if( $ii_ == $item  )
            }// End foreach( $_arr_ as $ii_ => $_ite_ )
          }// End foreach( $arrINI as $_i_ => $_arr_ )
          if( $flagINI )
          {
            writeINIfile( $fileINI, $arrINI, ';', '' );
            echo"\n<pre>";print_r($arrINI);echo"\n";
          }// End
        }else
        {
          echo $fileINI." not found;";
        }
?>
