summary refs log tree commit diff stats
path: root/php/vm-procedures.php
diff options
context:
space:
mode:
Diffstat (limited to 'php/vm-procedures.php')
-rw-r--r--php/vm-procedures.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/php/vm-procedures.php b/php/vm-procedures.php
new file mode 100644
index 0000000..3abb46f
--- /dev/null
+++ b/php/vm-procedures.php
@@ -0,0 +1,17 @@
+<?php
+$vindex = file($dpath.$mdata[3].'/'.$toc, FILE_IGNORE_NEW_LINES); 
+$cindex = file($dpath.$mdata[3].'/'.$channel, FILE_IGNORE_NEW_LINES);
+
+/* 1 parse the URL */
+$vdata = explode('/', $_SERVER['REQUEST_URI']);
+
+/* 2 security check */
+if(!empty($vdata[1]))
+  foreach($vindex as $i => $value)
+    if($vdata[1] == $value)
+      $vid = $i;
+
+$vdata = file($dpath.$mdata[3].'/'.$vid, FILE_IGNORE_NEW_LINES);
+$vdata[1] = date('M j, Y', $vdata[1]);
+$vdata[] = file_get_contents($dpath.$mdata[3].'/'.$cpath.$vid);
+?>