summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPreston Cody <codeman@gentoo.org>2006-04-22 19:26:31 +0000
committerPreston Cody <codeman@gentoo.org>2006-04-22 19:26:31 +0000
commit6a12cd6dacc358cc26cfb2f93fa0d0bfb9587cbc (patch)
tree618261615e892bb3821ee382e335d0acf64652b1 /scire/index.php
parentinitial scire files and directory added. more will come soon (diff)
downloadscire-6a12cd6dacc358cc26cfb2f93fa0d0bfb9587cbc.tar.gz
scire-6a12cd6dacc358cc26cfb2f93fa0d0bfb9587cbc.tar.bz2
scire-6a12cd6dacc358cc26cfb2f93fa0d0bfb9587cbc.zip
updating code
svn path=/; revision=42
Diffstat (limited to 'scire/index.php')
-rwxr-xr-xscire/index.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/scire/index.php b/scire/index.php
new file mode 100755
index 0000000..d881a3d
--- /dev/null
+++ b/scire/index.php
@@ -0,0 +1,51 @@
+<?php
+
+require_once('DBInterface.php');
+#include('main_checklogin.php');
+print "SESSION: ";
+print_r($_SESSION);
+exit;
+include('Smarty.class.php');
+include('main_smarty.php'); #Instantiates Smarty and sets the left nav bar.
+
+#Database structure for scire modules
+#Table: modules
+#Desc:
+# id = unique int; auto_increment
+# name = varchar(20)
+# long_name = varchar(90)
+# description = varchar(500)
+# main_content = varchar(90) # a filename to import.. we don't want php code in the database.
+# author = varchar(50)
+# creation_date =
+# distribution = varchar(30)
+# group? like categorizing them?
+# homepage = varchar(90) #misc modules should have a website
+$module_list = array();
+$module_list = get_scire_modules();
+$smarty->assign('leftnav', $module_list);
+
+
+$smarty->display('index.tpl');
+
+if ($_GET['module']) {
+ show_module_content($_GET['module'], $module_list);
+}
+else {
+ print "Welcome to Scire. This is the index page. It has index-y stuff on it. ok?";
+}
+
+function show_module_content($module, $module_list)
+{
+# $module_list = get_scire_modules();
+ foreach ($module_list as $single_module)
+ {
+ if ($single_module[1] == $module)
+ {
+ require_once($single_module[4]);
+ }
+ }
+}
+$smarty->display('leftbar.tpl');
+
+?>