diff options
author | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-11 18:00:51 +0000 |
---|---|---|
committer | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-11 18:00:51 +0000 |
commit | 1d8f2122fa238d17dd03d5b1a795b3f743b6bc02 (patch) | |
tree | 10cde8177e38f7659625a55f2079a65195b3f1b0 | |
parent | 66e281c8094d0e5882baa7c3a76a4b23b312329d (diff) | |
download | elgg-1d8f2122fa238d17dd03d5b1a795b3f743b6bc02.tar.gz elgg-1d8f2122fa238d17dd03d5b1a795b3f743b6bc02.tar.bz2 |
index page changes so it now logs you into the dashboard
git-svn-id: https://code.elgg.org/elgg/trunk@171 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | index.php | 83 | ||||
-rw-r--r-- | mod/dashboard/views/default/dashboard/welcome.php | 7 |
2 files changed, 16 insertions, 74 deletions
@@ -16,79 +16,14 @@ */
require_once(dirname(__FILE__) . "/engine/start.php");
- /**
- * Check to see if user is logged in, if not display login form
- **/
- if ($_SESSION['id'] != -1){
- //Load the sample welcome page
- echo page_draw(null, elgg_view("welcome"));
- } else {
- //Load the front page
- echo page_draw(null, elgg_view("login"));
- }
-
-
- - $obj = new stdClass;
- $obj->id = 3; - - -/* - - // Testing /////// - if ($_SESSION['id']==-1) $_SESSION['id'] = 1; - - // Create / load a site - $site = get_site(1); -error_log("GETTIGN SITE ".$_SESSION['id']. " " . print_r($site, true)); - - if (empty($site)) - { - $site = new ElggSite(); - - $site->title = "Test title"; - $site->description = "Test description"; - $site->url = "http://dushka/~icewing/Workingdirectory/elggnew/"; - $site->owner_id = 1; - $site->access_id = 0; - - error_log("LOADED NEW SITE: Saving" . print_r($site,true)); - - $site->save(); - } - else - { - $site = new ElggSite($site); - - $site->title = "Test title " . time(); - $site->save(); - - error_log("UPDATING SITE " . print_r($site, true)); - } - - - - // annotate site - $site->annotate("Test","TestValue"); - - // add meta data - $site->setMetadata("Metaname", "Value"); - - - - // change site metadata - $site->setMetadata("Metaname", "Value2"); - - error_log("SITE RETRIEVE : " . print_r(get_objects_from_metadatas(0, "", "", "Value2"), true)); -
-
- // get site annotations
- error_log("SITE Annotations : " . print_r($site->getAnnotations("Test"), true));
- -
- // get site metadata
- error_log("SITE Metadata : " . print_r($site->getMetadata("Metaname"), true)); - + // Display page
+ if ($_SESSION['id'] == -1) {
+ //Load the front page
+ echo page_draw(null, elgg_view("login"));
+ } else {
+ global $CONFIG;
+ header("Location: {$CONFIG->url}mod/dashboard/");
+ exit;
+ }
- */
?>
\ No newline at end of file diff --git a/mod/dashboard/views/default/dashboard/welcome.php b/mod/dashboard/views/default/dashboard/welcome.php index 527ea88ba..08c9692f5 100644 --- a/mod/dashboard/views/default/dashboard/welcome.php +++ b/mod/dashboard/views/default/dashboard/welcome.php @@ -1 +1,8 @@ +<?php
+
+ $user = $vars['name'];
+
+?>
+
+<p>Welcome <?php echo $user; ?></p>
<p><i>This will be a dashboard.</i></p>
\ No newline at end of file |