r394: Add access keys to the checkboxes
[bugdar.git] / docs / lang_file_import.php
1 <?php
2
3 // takes the XML language file and loads it into the database
4 // SVN: $Id$
5
6 chdir('./../');
7
8 require_once('./global.php');
9
10 if (empty($_REQUEST['do']))
11 {
12 echo "are you sure? <a href=\"lang_file_import.php?do=1\">yes</a>";
13 }
14
15 if ($_REQUEST['do'] == 1)
16 {
17 require_once('./includes/class_xml_language.php');
18 $lang = new XML_Language();
19
20 $lang->path = './docs/lang_file_master.xml';
21 $lang->load();
22 $lang->parse();
23 $query = $lang->build();
24
25 if ($query)
26 {
27 $db->query("TRUNCATE TABLE " . TABLE_PREFIX . "phrase");
28 $db->query($query);
29 echo 'language file imported...';
30 }
31 }
32
33 ?>