Location: PHPKode > projects > OpenBizMap > openbizmap/mydata/script/sys_dictionaries.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.
*/

$dictionary=get('dictionary');

echo '<div class="supergroup">';

echo '<h2>';
myecho('Change dictionary %1',$dictionary);
echo '</h2>';

echo('<form id="form1" action="odb_index.php" method="post">');
echo('<div><input name="odb_run" type="hidden" value="chdict"></input>');
echo('<input name="odb_sys" type="hidden" value="dictionaries"></input>');
echo('<input name="odb_dictionary" type="hidden" value="'.$dictionary.'"></input>');

myecho('Allow new values');
if(!file_exists(cfg_data_path.'/config/dict/static_'.purename($dictionary).'.txt'))
  echo('<input name="odb_allownew" type="checkbox" checked="checked" value="1"></input>');
else
  echo('<input name="odb_allownew" type="checkbox" value="1"></input>');

echo '<textarea class="fld_" style="width:90%; height:20em;" name="odb_dictcontent">';

if(file_exists(cfg_data_path.'/config/dict/static_'.purename($dictionary).'.txt'))
  echo file_get_contents(cfg_data_path.'/config/dict/static_'.purename($dictionary).'.txt');
elseif(file_exists(cfg_data_path.'/config/dict/dict_'.purename($dictionary).'.txt'))
  echo file_get_contents(cfg_data_path.'/config/dict/dict_'.purename($dictionary).'.txt');

echo '</textarea>';


echo('<br /><input class="button" name="submit" type="submit" value="'.myecho('Save','RETURN').'"></input>');
echo('</div>');
echo('</form>');
echo('<br />');
?>
Return current item: OpenBizMap