isnecure send/receive now works... next, secure
[pengine.git] / lib / lib.php
index e89f248..1fde0d7 100644 (file)
@@ -1,3 +1,28 @@
 <?php 
 
+require_once("interComms.php");
+
+// first and foremost, load the plugins
+$basedir = dirname(__FILE__);
+if(is_dir("$basedir/plugins")) {
+       $dh = opendir("$basedir/plugins");
+       if($dh) {
+               while(($file = readdir($dh))!==false) {
+                       $mt = preg_match("/.*\.php$/", $file);
+                       if($mt > 0) {
+                               require_once("$basedir/plugins/$file");
+                               //echo "required $basedir/plugins/$file\n";
+                       }
+               }
+       }
+} else {
+       echo "No plugins dir ($basedir/plugins), continuing without\n";
+}
+
+$storeLocation = "$basedir/../store/";
+global $storeLocation;
+
+if(!is_dir($storeLocation)) {
+       mkdir($storeLocation, 0770);
+}
 ?>
\ No newline at end of file