dump db version
[openemr.git] / interface / weno / admin.php
blob66fc17110f293ecda2e67f4d508867b1303f6157
1 <?php
2 /**
3 * weno admin.
5 * @package OpenEMR
6 * @link http://www.open-emr.org
7 * @author Sherwin Gaddis <sherwingaddis@gmail.com>
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2016-2017 Sherwin Gaddis <sherwingaddis@gmail.com>
10 * @copyright Copyright (c) 2018 Brady Miller <brady.g.miller@gmail.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
15 require_once('../globals.php');
16 require_once("$srcdir/options.inc.php");
18 use OpenEMR\Core\Header;
19 use OpenEMR\Rx\Weno\AdminProperties;
21 $tables = new AdminProperties();
24 <!DOCTYPE html>
25 <html xmlns="http://www.w3.org/1999/html">
26 <head>
27 <title><?php print xlt("Weno Admin"); ?></title>
28 <?php Header::setupHeader(); ?>
30 </head>
31 <style>
32 .row.text-center > div {
33 display: inline-block;
34 float: none;
36 </style>
37 <body class="body_top text-center">
38 <div class="container center-block">
39 <?php
41 // check to make sure only administrators access this page.
42 if (!acl_check('admin', 'super')) {
43 die(xlt("You are not authorized!"));
46 if ($GLOBALS['weno_rx_enable'] != 1) {
47 print xlt("You must activate Weno first! Go to Administration, Globals, Connectors");
48 exit;
49 } else {
50 print xlt("Weno Service is Enabled")."<br><br>";
53 $drugData = $tables->drugTableInfo();
54 if (!$drugData['ndc']) {
55 echo "<a href='drugPaidInsert.php?csrf_token_form=" . attr_url(collectCsrfToken()) . "' class='btn btn-default'>".xlt("Import Formularies")."</a> <br>".xlt("Be patient, this can take a while.");
56 } else {
57 print xlt("Formularies inserted into table")."<br>";
62 <br><br>
63 <?php
64 if (file_exists('../../contrib/weno/pharmacyList.csv')) {
65 echo "<a href='import_pharmacies.php?csrf_token_form=" . attr_url(collectCsrfToken()) . "' class='btn btn-default'>" . xlt("Import Pharmacies Script") . "</a> <br>";
69 </div>
70 <script>
71 $(document).ready(function(){
72 $("#addtolistid_state").hide();
73 });
74 </script>
75 </body>
76 </html>