root/trunk/gui/admin/multilanguage_export.php

Revision 1327, 1.9 kB (checked in by rats, 4 months ago)

* Fixed: --scan-knownbad-files and --check-deleted are no longer supported by rkhunter
* Fixed #1471: chkrootkit should be in lenny / hardy
* Updated Chinese (simplified)
* Updated German
* Fixed #1475: typo on installation (ispcp-setup)
* Fixed: default user for rkhunter.log

Line 
1 <?php
2 /**
3  * ispCP ω (OMEGA) a Virtual Hosting Control System
4  *
5  * @copyright     2001-2006 by moleSoftware GmbH
6  * @copyright     2006-2008 by ispCP | http://isp-control.net
7  * @version     SVN: $Id$
8  * @link         http://isp-control.net
9  * @author         ispCP Team
10  *
11  * @license
12  *   This program is free software; you can redistribute it and/or modify it under
13  *   the terms of the MPL General Public License as published by the Free Software
14  *   Foundation; either version 1.1 of the License, or (at your option) any later
15  *   version.
16  *   You should have received a copy of the MPL Mozilla Public License along with
17  *   this program; if not, write to the Open Source Initiative (OSI)
18  *   http://opensource.org | osi@opensource.org
19  */
20
21 require '../include/ispcp-lib.php';
22
23 // Security
24 check_login(__FILE__);
25
26 if (isset($_GET['export_lang']) && $_GET['export_lang'] !== '') {
27   $language_table = $_GET['export_lang'];
28   $encoding  = $sql->Execute("SELECT `msgstr` FROM `$language_table` WHERE `msgid` = 'encoding';");
29   if ($encoding && $encoding->RowCount() > 0 && $encoding->fields['msgstr'] != '') {
30       $encoding = $encoding->fields['msgstr'];
31   } else {
32       $encoding = 'UTF-8';
33   }
34   $query = <<<SQL_QUERY
35             SELECT
36                 msgid,
37                 msgstr
38             FROM
39                 $language_table
40 SQL_QUERY;
41
42     $rs = exec_query($sql, $query, array());
43
44     if ($rs->RecordCount() == 0) {
45         set_page_message( tr("Incorrect data input!"));
46         header( "Location: multilanguage.php" );
47         die();
48     } else {
49         $GLOBALS['class']['output']->showSize=false;
50         header( "Content-type: text/plain; charset=".$encoding );
51         while (!$rs -> EOF) {
52             $msgid = $rs->fields['msgid'];
53             $msgstr = $rs->fields['msgstr'];
54             if ($msgid !== '' && $msgstr !== '') {
55                 echo $msgid." = ".$msgstr."\n";
56             }
57             $rs -> MoveNext();
58         }
59     }
60 } else {
61     set_page_message(tr("Incorrect data input!"));
62     header( "Location: multilanguage.php" );
63     die();
64 }
65
66 ?>
Note: See TracBrowser for help on using the browser.