]> dev.renevier.net Git - syp.git/blobdiff - logout.php
improve wizard (hand editing of settings.php is no more needed)
[syp.git] / logout.php
index c2cd62c38e1972e1413469480c3be7a7634e6f09..25d55a9878117932ee600ba16e0772d038993f3c 100644 (file)
@@ -1,9 +1,12 @@
 <?php
+/* Copyright (c) 2009 Arnaud Renevier, Inc, published under the modified BSD
+   license. */
 
-require_once ("./inc/settings.php");
+if (!@include_once ("./inc/settings.php")) {
+    header ('Location: index.php');
+}
 
-$cookie_name = sprintf ("%sauth", DBPREFIX);
-setcookie ($cookie_name, "", time () - 3600, "" , "",false, true);
+setcookie (sprintf ("%sauth", DBPREFIX), "", time () - 3600, "" , "",false, true);
+setcookie (sprintf ("%suser", DBPREFIX), "", time () - 3600, "" , "",false, true);
 header ('Location: index.php');
-
 ?>