| | |
| | | }
|
| | | fclose($handle);
|
| | |
|
| | | $this->lng_add($lang,$formDef); |
| | | |
| | | // überprüfe, ob es die Tabelle schon gibt,
|
| | | // ansonsten wird sie angelegt
|
| | | $tables = $app->db->getTables();
|
| | |
| | | $app->db->createTable($formDef["db_table"],$columns);
|
| | |
|
| | | }
|
| | | |
| | | function lng_add($lang,$formDef) { |
| | | global $go_api, $go_info,$conf; |
| | | |
| | | $lng_file = "lib/lang/".$conf["language"]."_".$formDef['name'].".lng"; |
| | | if(is_file($lng_file)) { |
| | | include($lng_file); |
| | | } else { |
| | | $wb = array(); |
| | | }
|
| | |
|
| | | $wb_out = array_merge($lang,$wb); |
| | | |
| | | if(is_array($wb_out)) { |
| | | $fp = fopen ($lng_file, "w"); |
| | | fwrite($fp,"<?php\r\n"); |
| | | foreach($wb_out as $key => $val) { |
| | | $new_line = '$wb["'.$key.'"] = '."'$val';\r\n"; |
| | | fwrite($fp,$new_line); |
| | | |
| | | } |
| | | fwrite($fp,"?>"); |
| | | fclose($fp); |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | ?> |