]> Softwares of Agnibho - simpleipd.git/commitdiff
Minor
authorAgnibho Mondal <mondal@agnibho.com>
Fri, 21 May 2021 06:40:13 +0000 (12:10 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Fri, 21 May 2021 06:40:13 +0000 (12:10 +0530)
.gitignore
config.php
config.php.example [new file with mode: 0644]
lib/top.php
www/res/script.js

index c6a2fd8ba3018fe3337e45d140b9531552e68d37..8e024db11414de7158e8762c782849101ecc7868 100644 (file)
@@ -1,3 +1,4 @@
+config.php
 database/data.db
 database/log.db
 www/data/*
index 7bb277a6fd3b239f54ba9a03fdb4c1e1dcbb7544..41b08de822d810981d035f79ca61086e59467a23 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+define("CONFIG_URL", "");
 define("CONFIG_ROOT", __DIR__."/");
 define("CONFIG_WWW", CONFIG_ROOT."www/");
 define("CONFIG_LIB", CONFIG_ROOT."lib/");
diff --git a/config.php.example b/config.php.example
new file mode 100644 (file)
index 0000000..7361f60
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+define("CONFIG_URL", "/");
+define("CONFIG_ROOT", __DIR__."/");
+define("CONFIG_WWW", CONFIG_ROOT."www/");
+define("CONFIG_LIB", CONFIG_ROOT."lib/");
+define("CONFIG_DB", CONFIG_ROOT."database/data.db");
+define("CONFIG_LOG", CONFIG_ROOT."database/log.db");
+define("CONFIG_TITLE", "SimpleIPD");
+?>
index 28d36bec3ab3c2bb79a23ee690ddd71e74ed83f5..0a0074777cd9e96b34aea7e4b92f391c3174699f 100644 (file)
@@ -1,10 +1,13 @@
 <nav class="navbar navbar-expand-lg navbar-light bg-light">
 <?php
-if(!empty($_GET["pid"])){
+if(basename($_SERVER["PHP_SELF"])=="view.php"){
+  echo '<a class="navbar-brand" href="'.CONFIG_URL.'">'.CONFIG_TITLE.'</a>';
+}
+elseif(!empty($_GET["pid"])){
   echo '<a href="view.php?pid='.$_GET["pid"].'" class="navbar-brand">View Patient</a>';
 }
 else{
-  echo '<a class="navbar-brand" href="#">'.CONFIG_TITLE.'</a>';
+  echo '<a class="navbar-brand" href="'.CONFIG_URL.'">'.CONFIG_TITLE.'</a>';
 }
 ?>
 
index 34af0f12055f9ab797e5ab22fa6c850c6c22ad05..4fb2f4e0349fb32088baa1298cdc367d510b71a6 100644 (file)
@@ -1,7 +1,7 @@
 $(document).ready(function(){
   $(".confirm").each(function(){
     $(this).click(function(event){
-      if(!confirm("Continue?")){
+      if(!confirm("Are you sure?")){
         event.preventDefault();
       }
     });