Changeset 1434

Show
Ignore:
Timestamp:
04/12/06 20:46:46 (3 years ago)
Author:
mbonetti
Message:

fix for mobile login

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/rss/themes/default/mobile/plugins.php

    r1355 r1434  
    4747<form method="post" action="<?php echo getPath(); ?>"> 
    4848<p><input type="hidden" name="media" value="mobile" /> 
    49 <label for="mobile_username">Username:</label> 
    50 <input type="text" id="mobile_username" name="mobile_username" value="" /></p> 
    51 <p><label for="mobile_password">Password:</label> 
    52 <input type="password" name="mobile_password" id="mobile_password"  value="" /></p> 
    53 <p><input type="submit" name="mobilelogin" value="Go" /></p> 
     49<label for="username">Username:</label> 
     50<input type="text" id="username" name="username" value="" /></p> 
     51<p><label for="password">Password:</label> 
     52<input type="password" name="password" id="password"  value="" /></p> 
     53<p><input type="submit" name="login" value="Go" /></p> 
    5454</form> 
    5555</body> 
     
    6161 
    6262if (isset($_REQUEST['mobilelogin'])) { 
    63     if (isset($_POST['mobile_username']) && isset($_POST['mobile_password'])) { 
    64         $un = rss_real_escape_string($_POST['mobile_username']); 
    65         $pw = md5($_POST['mobile_password']); 
    66         $dt = explode('|',__exp_login($un,$pw,null)); 
    67         if ($dt[0] == RSS_USER_LEVEL_NOLEVEL) { 
    68             mobileLoginForm(); 
    69         } else { 
    70             setUserCookie($dt[1], $dt[2]); 
    71             $_SESSION['mobile']=($dt[1] ."|" .$dt[2]); 
    72             echo "Hello, " . $dt[1] . ", <a href=\"".getPath()."?media=mobile\">continue...</a>"; 
    73             flush(); 
    74             exit(); 
    75         } 
    76     } else { 
    77         mobileLoginForm(); 
    78     } 
     63    mobileLoginForm(); 
    7964} 
     65 
    8066?>