Location: PHPKode > projects > OpenBizMap > obm2007.1/mydata/script/run_change.txt
<?php
/*
OpenDataBag - Data Web Interface
Copyright (C) 2004 Nawara

This program 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; either version 2
of the License, or (at your option) any later version.

This program 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 this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

/*
Action execution
*/

// Updating content

  //sorting fields
  $field_array=array();
  $cnt=1;
  while(1)
  {
    $ord=get('ord'.$cnt);
    $key=get('key'.$cnt);

    if(strlen($key) and ($key!='sysId'))
    {
      $field_array[$key]=''.(10000+$ord).(10000+$cnt);
      $field_cnt_array[$key]=$cnt;
    }

    $cnt++;

    if($cnt>300)
      break;
  }

  asort($field_array);

  $variable_array=array();
  $variable_array['sysId']['value']='';

  while(list($key,$tmp)=each($field_array))
  {
    $cnt=$field_cnt_array[$key];
    $variable_name=trim($key);

    //$variable_array[$variable_name]['description']=get('description'.$cnt);
    $variable_array[$variable_name]['template']=get('template'.$cnt);
    //$variable_array[$variable_name]['value']='';//get('value'.$cnt);
    $variable_array[$variable_name]['dict']='';//get('dict'.$cnt);
    $variable_array[$variable_name]['tab']=get('tab'.$cnt);
    $variable_array[$variable_name]['size']=get('size'.$cnt);
    $variable_array[$variable_name]['formula']=get('formula'.$cnt);
    $variable_array[$variable_name]['show_cond']=trim(get('show_cond'.$cnt));
    $variable_array[$variable_name]['hl']=trim(get('hl'.$cnt));

    if(strlen($variable_array[$variable_name]['show_cond']))
      $variable_array[$variable_name]['show_cond']=0+substr($variable_array[$variable_name]['show_cond'],0,1);
    else
      $variable_array[$variable_name]['show_cond']='';

    if($variable_array[$variable_name]['show_cond']==0)
      $variable_array[$variable_name]['show_cond']='';
  }

  $variable_array['sysGroupBy']['value']=purename(get('sysGroupBy'));
  $variable_array['sysDetailTitle']['value']=get('sysDetailTitle');
  $variable_array['sysListTitle']['value']=get('sysListTitle');
  $variable_array['sysSortBy']['value']=get('sysSortBy');

  save_config($variable_array['sysGroupBy']['value'],$variable_array);


?>
Return current item: OpenBizMap