From b7a1548aeb455b072b913450631121271b4c9475 Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Tue, 6 Mar 2012 10:53:22 +0000 Subject: [PATCH] I am assuming demo.php is the one we should keep/use, and demo.txt was stale git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@281 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641 --- demo.php | 276 ------------------------------------------------------- demo.txt | 237 ++++++++++++++++++++++------------------------- 2 files changed, 110 insertions(+), 403 deletions(-) delete mode 100644 demo.php diff --git a/demo.php b/demo.php deleted file mode 100644 index 374f96b5ba..0000000000 --- a/demo.php +++ /dev/null @@ -1,276 +0,0 @@ -php_library_path . "login_library.php"; - -include $xerte_toolkits_site->php_library_path . "display_library.php"; - -$_SESSION['toolkits_firstname'] = "Guest"; - -$_SESSION['toolkits_surname'] = "User"; - -include $xerte_toolkits_site->php_library_path . "user_library.php"; - -$_SESSION['toolkits_logon_username'] = "guest"; - -$mysql_id=database_connect("index.php database connect success","index.php database connect fail"); - -/* - * Check to see if this is a users' first time on the site - */ - -if(check_if_first_time($_SESSION['toolkits_logon_username'])){ - - /* - * create the user a new id - */ - - $_SESSION['toolkits_logon_id'] = create_user_id($_SESSION['toolkits_logon_username'], $_SESSION['toolkits_firstname'], $_SESSION['toolkits_surname']); - - /* - * create a virtual root folder for this user - */ - - create_a_virtual_root_folder(); - -}else{ - - /* - * User exists so update the user settings - */ - - $_SESSION['toolkits_logon_id'] = get_user_id(); - - update_user_logon_time(); - -} - -recycle_bin(); - -/* - * Output the main page, including the user's and blank templates - */ -?> - - - - - - <?PHP echo $xerte_toolkits_site->site_title; ?> - - - // JAVASCRIPT library for fixed variables\n // management of javascript is set up here\n // SITE SETTINGS\n"; - -echo "var site_url = \"" . $xerte_toolkits_site->site_url . "\";\n"; - -echo "var site_apache = \"" . $xerte_toolkits_site->apache . "\";\n"; - -echo "var properties_ajax_php_path = \"website_code/php/properties/\";\n var management_ajax_php_path = \"website_code/php/management/\";\n var ajax_php_path = \"website_code/php/\";\n"; - -?> - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
- -
-
-

-
- -
- - - -
- -
-
- -
- -
-
- - - -
- -
-
- - - -
-
- - - -
-
-
- - -
-
- -
-
-
- pod_one; ?> -
- -
- pod_two; ?> -
-
- -
- - -
- - - - - -
- -
-
-
- -
-
-
- -
- - - - diff --git a/demo.txt b/demo.txt index 9fbb0ffc90..374f96b5ba 100644 --- a/demo.txt +++ b/demo.txt @@ -4,93 +4,81 @@ require_once(dirname(__FILE__) . "/config.php"); _load_language_file("/index.inc"); -/** - * - * Login page, self posts to become management page - * - * @author Patrick Lockley - * @version 1.0 - * @copyright Copyright (c) 2008,2009 University of Nottingham - * @package - */ +include $xerte_toolkits_site->php_library_path . "login_library.php"; +include $xerte_toolkits_site->php_library_path . "display_library.php"; + +$_SESSION['toolkits_firstname'] = "Guest"; + +$_SESSION['toolkits_surname'] = "User"; -include $xerte_toolkits_site->php_library_path . "login_library.php"; include $xerte_toolkits_site->php_library_path . "user_library.php"; -include $xerte_toolkits_site->php_library_path . "display_library.php"; - /* - * Get some user details back from LDAP - */ +$_SESSION['toolkits_logon_username'] = "guest"; - $_SESSION['toolkits_firstname'] = "Guest"; - $_SESSION['toolkits_surname'] = "User 2"; - $_SESSION['toolkits_logon_username'] = "guest_user"; +$mysql_id=database_connect("index.php database connect success","index.php database connect fail"); - $mysql_id=database_connect("index.php database connect success","index.php database connect fail"); +/* + * Check to see if this is a users' first time on the site + */ + +if(check_if_first_time($_SESSION['toolkits_logon_username'])){ + + /* + * create the user a new id + */ - $_SESSION['toolkits_logon_id'] = "guestuser2"; + $_SESSION['toolkits_logon_id'] = create_user_id($_SESSION['toolkits_logon_username'], $_SESSION['toolkits_firstname'], $_SESSION['toolkits_surname']); - /* - * Check to see if this is a users' first time on the site - */ + /* + * create a virtual root folder for this user + */ - if(check_if_first_time($_SESSION['toolkits_logon_username'])===FALSE){ - - /* - * create the user a new id - */ + create_a_virtual_root_folder(); - $_SESSION['toolkits_logon_id'] = create_user_id($_SESSION['toolkits_logon_username'], $_SESSION['toolkits_firstname'], $_SESSION['toolkits_surname']); +}else{ - /* - * create a virtual root folder for this user - */ + /* + * User exists so update the user settings + */ + $_SESSION['toolkits_logon_id'] = get_user_id(); - }else{ - - /* - * User exists so update the user settings - */ + update_user_logon_time(); + +} + +recycle_bin(); /* * Output the main page, including the user's and blank templates */ +?> + - update_user_logon_time(); + - HTML to use to set up the template management page + + <?PHP echo $xerte_toolkits_site->site_title; ?> - Version 1.0 + + +echo " @@ -119,7 +107,7 @@ body_scroll handles the calculation of the documents actual height in IE. --> - + + --> - -
- -
-
-
- pod_one; ?> -
- -
- pod_two; ?> -
- -
- -
+
+ - + Top of the blank templates section + --> -
-
-
-
- -
-
-
- -
- + +
+ +
+ +
+ + - - - - +