From: Chris S. <san...@us...> - 2005-10-11 09:57:45
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2925 Modified Files: index.php Log Message: Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/index.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** index.php 7 Sep 2005 14:19:35 -0000 1.30 --- index.php 11 Oct 2005 09:57:44 -0000 1.31 *************** *** 84,93 **** if ('logout' == $action) { ! echo '<h1>Thank you</h1><p>Thank you for using STACK.'; $action = 'loginscreen'; } if ('welcome' == $action) { ! echo "<h1>Welcome</h1> <p>Welcome to STACK, {$user['firstname']} {$user['lastname']}.</p>"; if ('admin' != $user['username']) { $action = 'choose_subject'; --- 84,96 ---- if ('logout' == $action) { ! echo get_string('FE_index_logout','stack',''); $action = 'loginscreen'; } if ('welcome' == $action) { ! $a = array(); ! $a[0] = $user['firstname']; ! $a[1] = $user['lastname']; ! echo get_string('FE_index_welcome','stack',$a); if ('admin' != $user['username']) { $action = 'choose_subject'; *************** *** 96,100 **** if ('loginerr' == $action) { ! echo "<h1>Problems with your login.</h1> <p>You could not be logged into STACK as <tt>{$user['username']}</tt> for the following reason.</p>"; echo $errors['user']; $action = 'loginscreen'; --- 99,104 ---- if ('loginerr' == $action) { ! $a = $user['username']; ! echo get_string('FE_index_loginerr','stack',$a); echo $errors['user']; $action = 'loginscreen'; *************** *** 115,144 **** switch ($action) { case 'loginscreen': ! echo '<h1>Login</h1><form action="index.php" method="post" name="login" id="login"><table><tr><td align="right">Username:</td>'; ! echo "<td><input type=\"text\" name=\"username\" size=\"15\" value=\"{$username}\" alt=\"Username\" /></td><td>".$errun.'</td>'; ! echo '</tr><tr><td>Password:</td>'; echo '<td><input type="password" name="password" size="15" value="" alt="Password" /></td><td>'.$errps.'</td>'; echo '</tr><tr><td> <input type="hidden" name="action" value="login" /> ! <input type="submit" value="Login" /> </td></tr> </table></form>'; ! echo 'You may login with the username "guest" and an empty password.'; ! echo '<form action="index.php" method="post" name="guestlogin"> ! Register with this STACK sever: ! <input type="hidden" name="username" value="guest" /> <input type="hidden" name="password" value="guest" /> <input type="hidden" name="action" value="registration_screen" /> ! <input type="submit" value="Register" /> </form>'; break; case 'update_info': if (stack_is_logged_in($user) and !stack_user_is_guest($user)) { stack_user_update_info($user, $errors); } else { ! echo '<h1>Update user information</h1>'; ! echo '<p>Please logout and login as a personal user first to update your information.</p>'; } break; --- 119,151 ---- switch ($action) { case 'loginscreen': ! echo '<h1>'.get_string('FE_index_loginscreen_title','stack','').'</h1>'; ! echo '<form action="index.php" method="post" name="login" id="login"><table><tr>'; ! echo '<td align="right">'.get_string('USR_Username','stack','').'</td>'; ! echo "<td><input type=\"text\" name=\"username\" size=\"15\" value=\"{$username}\" alt=\"Username\" /></td><td>".$errun.'</td></tr><tr>'; ! echo '<td align="right">'.get_string('USR_Password','stack','').'</td>'; echo '<td><input type="password" name="password" size="15" value="" alt="Password" /></td><td>'.$errps.'</td>'; echo '</tr><tr><td> <input type="hidden" name="action" value="login" /> ! <input type="submit" value="'.get_string('FE_index_button_login','stack','').'" /> </td></tr> </table></form>'; ! echo get_string('FE_index_loginscreen_guestok','stack',''); ! echo '<form action="index.php" method="post" name="guestlogin">'; ! echo get_string('FE_index_loginscreen_pleasereg','stack',''); ! echo '<input type="hidden" name="username" value="guest" /> <input type="hidden" name="password" value="guest" /> <input type="hidden" name="action" value="registration_screen" /> ! <input type="submit" value="'.get_string('FE_index_button_register','stack','').'" /> </form>'; break; + case 'update_info': if (stack_is_logged_in($user) and !stack_user_is_guest($user)) { stack_user_update_info($user, $errors); } else { ! echo '<h1>'.get_string('FE_index_update_info_title','stack','').'</h1>'; ! echo '<p>'.get_string('FE_index_update_info_guest','stack','').'</p>'; } break; *************** *** 146,155 **** include_once($stack_root."/scripts/stackUser.php"); ! echo "<h1>Register as a new user</h1><form action=\"index.php\" method=\"post\" name=\"register\" id=\"register\">"; ! echo '<p>To register as a STACK user, please provide the following information.<p>'; ! echo '<table><tr><td>Username </td><td><input type="text" name="user[username]" size="25" value="'.stack_s($username).'" alt="User name" /></td><td>'.$err.'</td></tr>'; // TO DO: Need to fix typo in this form - institution stack_user_edit_form($user,$errors); ! echo '</table><input type="hidden" name="action" value="register" /><input type="submit" value="Register" /></form>'; break; --- 153,167 ---- include_once($stack_root."/scripts/stackUser.php"); ! echo '<h1>'.get_string('FE_index_register_title','stack','').'</h1>'; ! echo "<form action=\"index.php\" method=\"post\" name=\"register\" id=\"register\">"; ! echo '<p>'.get_string('FE_index_register_instruct','stack','').'</p>'; ! echo '<table><tr>'; ! echo '<td>'.get_string('USR_Username').'</td>'; ! echo '<td><input type="text" name="user[username]" size="25" value="'.stack_s($username).'" alt="User name" /></td><td>'.$err.'</td></tr>'; // TO DO: Need to fix typo in this form - institution stack_user_edit_form($user,$errors); ! echo '</table><input type="hidden" name="action" value="register" />'; ! echo '<input type="submit" value="'.get_string('FE_index_button_register','stack','').'" />'; ! echo '</form>'; break; |