]> andersk Git - sql-web.git/blobdiff - index.php
change password feature
[sql-web.git] / index.php
index 1cdf9762e3c0f9e5043ecc5be0f8ae5871795e49..7ab60495e3c6cc6792c4959ce4b8dd0639643da5 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -7,45 +7,21 @@
        - to support group sql "lockers"
 */
 
-if (file_exists('/mit/presbrey/web_tmp'))
-       ini_set('session.save_path','/mit/presbrey/web_tmp');
-ini_set('display_errors', 1);
-ignore_user_abort(1);
-error_reporting(E_ALL);
-set_time_limit(0);
-session_start();
-if (isset($_GET['reset'])) { session_destroy(); session_start(); }
+require_once('mitsql.cfg.php');
 require_once('mitsql.lib.php');
 
-if (!isset($_SESSION['owner'])) {
-       if (isset($_GET['owner'])) {
-               $_SESSION['owner'] = $_GET['owner'];
-               redirectLocal('/');
-       }
-       if (isset($_POST['owner'])) {
-               $_SESSION['owner'] = $_POST['owner'];
-               redirectLocal('/');
-       }
-       if (is_null(getSSLIdent())) {
-               redirect('https://'.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']);
-               echo '<p class="err">Your SSL certificate could not be verified, please authenticate manually below.</p>';
-//             echo '<form method="',FORM_METHOD,'"><input type="text" name="owner" value="',$_SESSION['owner'],'"><input type=submit value="owner"></form>';
-               echo '<p>(This will be fixed when I do group locker SQL support)</p>';
-       } else {
-               $_SESSION['owner'] = getSSLIdent();
-       }
-}
-if (isset($_SESSION['realuser'])) {
-       $realuser = $_SESSION['realuser'];
-} else $realuser = null;
+isLoggedIn() && redirect('main');
+//$LoginSSL->canSignup() && redirect('signup');
 
-ob_start();
-include('style.inc');
+//redirect('login');
+
+include 'tpl/index.php';
+
+exit;
 
 if (isset($_SESSION['owner'])) {
        $owner = $_SESSION['owner'];
        $dbm = new DBManage($owner);
-} else exit;
 
 ?><p><h2>SQL Databases: <?php echo $owner; ?></h2><?php
 if (isset($realuser)) {
@@ -54,10 +30,6 @@ if (isset($realuser)) {
 ?></p><?php
 
 $inputvars = array('initpw', 'op', 'name', 'owner');
-foreach($inputvars as $i) {
-       $newvar = 'i_'.$i;
-       $$newvar = isset($_GET[$i]) ? $_GET[$i] : null;
-}
 
 if (isset($i_op)) {
        switch($i_op) {
@@ -183,5 +155,5 @@ if (isset($i_op)) {
 <address>MIT SQL Service Management v<?php echo VERSION; ?><br />
 Direct comments and bugs to: <a href="mailto:presbrey@mit.edu">presbrey@mit.edu</a></address></div>
 <?php
-       //ob_flush();
+}
 ?>
This page took 0.130819 seconds and 4 git commands to generate.