dump db version
[openemr.git] / interface / language / language.php
blob3df394244c9c6436f8d52ffe14e4d29b34a5474a
1 <?php
2 /**
3 * language.php script
5 * @package OpenEMR
6 * @link http://www.open-emr.org
7 * @author Brady Miller <brady.g.miller@gmail.com>
8 * @copyright Copyright (c) 2018 Brady Miller <brady.g.miller@gmail.com>
9 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 //INCLUDES, DO ANY ACTIONS, THEN GET OUR DATA
14 require_once("../globals.php");
15 require_once("$srcdir/registry.inc");
16 require_once("../../library/acl.inc");
17 require_once("language.inc.php");
19 //START OUT OUR PAGE....
21 <html>
22 <head>
23 <?php html_header_show();?>
24 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
25 </head>
27 <body class="body_top">
28 <form name='translation' id='translation' method='get' action='language.php' onsubmit="return top.restoreSession()">
29 <input type="hidden" name="csrf_token_form" value="<?php echo attr(collectCsrfToken()); ?>" />
31 <input type='hidden' name='m' value='<?php echo attr($_GET['m']); ?>' />
32 <input type='hidden' name='edit' value='<?php echo attr($_GET['edit']); ?>' />
33 <span class="title"><?php echo xlt('Multi Language Tool'); ?></span>
34 <table>
35 <tr>
36 <td class="small" colspan='4'>
37 <a href="?m=definition&csrf_token_form=<?php echo attr(urlencode(collectCsrfToken())); ?>" onclick="top.restoreSession()"><?php echo xlt('Edit Definitions'); ?></a> |
38 <a href="?m=language&csrf_token_form=<?php echo attr(urlencode(collectCsrfToken())); ?>" onclick="top.restoreSession()"><?php echo xlt('Add Language'); ?></a> |
39 <a href="?m=constant&csrf_token_form=<?php echo attr(urlencode(collectCsrfToken())); ?>" onclick="top.restoreSession()"><?php echo xlt('Add Constant'); ?></a> |
40 <a href="?m=manage&csrf_token_form=<?php echo attr(urlencode(collectCsrfToken())); ?>" onclick="top.restoreSession()"><?php echo xlt('Manage Translations'); ?></a>
41 </td>
42 </tr>
43 </table>
44 </form>
46 <?php
47 if (!empty($_GET['m'])) {
48 if (!verifyCsrfToken($_GET["csrf_token_form"])) {
49 csrfNotVerified();
52 // Pass a unique variable, so below scripts can
53 // not be run on their own
54 $unique_id = createUniqueToken();
55 $_SESSION['lang_module_unique_id'] = $unique_id;
57 switch ($_GET['m']) :
58 case 'definition':
59 require_once('lang_definition.php');
60 break;
61 case 'constant':
62 require_once('lang_constant.php');
63 break;
64 case 'language':
65 require_once('lang_language.php');
66 break;
67 case 'manage':
68 require_once('lang_manage.php');
69 break;
70 endswitch;
74 <BR><A HREF="lang.info.html" TARGET="_blank"><?php echo xlt('Info'); ?></A>
75 </body>
76 </html>