]> Softwares of Agnibho - simpleipd.git/commitdiff
Bugfix
authorAgnibho Mondal <mondal@agnibho.com>
Tue, 18 May 2021 06:14:20 +0000 (11:44 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Tue, 18 May 2021 06:14:20 +0000 (11:44 +0530)
adduser
www/print-discharge.php

diff --git a/adduser b/adduser
index f878e2996a5066b2b1dd744568cf37c91170a368..d8bbb09f67f42e61422072c8c82b16b4c5c8a1cd 100755 (executable)
--- a/adduser
+++ b/adduser
@@ -1,6 +1,6 @@
 #! /usr/bin/env php
 <?php
-$db=new SQLite3("data/data.db");
+$db=new SQLite3("database/data.db");
 if(!empty($_SERVER["argv"][1]) && !empty($_SERVER["argv"][2]) && !empty($_SERVER["argv"][3]) && !empty($_SERVER["argv"][4])){
   $stmt=$db->prepare("SELECT * FROM users WHERE user=:user");
   $stmt->bindValue(":user",$_SERVER["argv"][1]);
index f1af38fa88939d518b4880ee7fdbac9808e7d1b5..4b0e4bc38faf6ddaa79e02b8cd931b95c31ba306 100644 (file)
@@ -22,7 +22,7 @@ function json2tex($data){
 }
 if(!empty($_GET["pid"])){
   $pid=$_GET["pid"];
-  $template=file_get_contents("discharge.tex");
+  $template=file_get_contents(CONFIG_ROOT."discharge.tex");
   if(!empty($_POST["discharge-note"])){
     $template=str_replace("%[note]%", $_POST["discharge-note"], $template);
   }