From ad4a7ff9159c2c64cea98d7189f46fa7d6174fc2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 4 Sep 2011 21:13:47 -0400 Subject: Screw it, I'm tired of trying to break this into individual commits --- src/views/pages/auth.php | 65 ------------------------------------------------ 1 file changed, 65 deletions(-) delete mode 100644 src/views/pages/auth.php (limited to 'src/views/pages/auth.php') diff --git a/src/views/pages/auth.php b/src/views/pages/auth.php deleted file mode 100644 index 2132d67..0000000 --- a/src/views/pages/auth.php +++ /dev/null @@ -1,65 +0,0 @@ -isLoggedIn(); - if ($uid===false) { - login(); - } else { - $mm->header('Authentication'); - $t = $mm->template(); - - $username = $mm->getUsername($uid); - - $t->openTag('div',array('class'=>'login')); - $t->text("Logged in as ".htmlentities($username).'.'); - $t->logout_button('Logout'); - $t->closeTag('div'); - - $mm->footer(); - } -} - -function login() { - include(VIEWPATH.'/pages/auth/login.php'); -} - -function logout() { - global $mm; - $t = $mm->template(); - - $mm->logout(); - - $mm->header('Authentication'); - $t->paragraph('Logged out'); - $mm->footer(); -} - -function badrequest() { - global $mm; - $mm->status('400 Bad Request'); - $t = $mm->template(); - - $mm->header('Authentication'); - $t->paragraph('The recieved POST request was malformed/invalid. '. - 'If you got here from a link, this is a bug; '. - 'Let the admin know.'. - 'If you got here from outside, then the API is being '. - 'missused.'); - $mm->footer(); -} -- cgit v1.2.3-2-g168b