new login field
This commit is contained in:
parent
e68c4fed17
commit
7512a44190
@ -10,7 +10,7 @@ class saimod_sys_error extends \SYSTEM\SAI\SaiModule {
|
||||
|
||||
$now = microtime(true);
|
||||
|
||||
$result = '<table class="table table-hover table-condensed" style="position:absolute; left:0;overflow: auto;">'.
|
||||
$result = '<table class="table table-hover table-condensed" style="overflow: auto;">'.
|
||||
'<tr>'.'<th>'.'time ago in sec'.'</th>'.'<th>'.'time'.'</th>'.'<th>'.'class'.'</th>'.'<th>'.'message'.'</th>'.'<th>'.'code'.'</th>'.'<th>'.'file'.'</th>'.'<th>'.'line'.'</th>'.'<th>'.'ip'.'</th>'.'<th>'.'querytime'.'</tr>';
|
||||
while($r = $res->next()){
|
||||
$result .= '<tr class="'.self::tablerow_class($r['class']).'">'.'<td>'.(int)($now - strtotime($r['time'])).'</td>'.'<td>'.$r['time'].'</td>'.'<td>'.$r['class'].'</td>'.'<td>'.$r['message'].'</td>'.'<td>'.$r['code'].'</td>'.'<td>'.$r['file'].'</td>'.'<td>'.$r['line'].'</td>'.'<td>'.$r['ip'].'</td>'.'<td>'.$r['querytime'].'</tr>';
|
||||
|
||||
21
sai/modules/saimod_sys_login/login.js
Normal file
21
sai/modules/saimod_sys_login/login.js
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* jQuery on document ready */
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#submitButton").click(function(){
|
||||
$.get('./api.php?call=account&action=login&username='+$('#username').val()+'&password_sha='+$.sha1($('#password').val())+'&password_md5='+hex_md5($('#password').val()), function (data) {
|
||||
if(data === 1){
|
||||
$("#loginStatusMsg").html('Login successful!!');
|
||||
} else {
|
||||
$("#loginStatusMsg").html('Wrong username or password!');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
@ -1,18 +1,22 @@
|
||||
Please login for developer access.
|
||||
</br>
|
||||
<font color="red">${message}</font>
|
||||
<font color="red">
|
||||
<span id="loginStatusMsg"></span>
|
||||
</font>
|
||||
|
||||
|
||||
<form id='login' action='?action=developer&sai_mod=.SYSTEM.SAI.saimod_sys_login' method='post' accept-charset='UTF-8'>
|
||||
<fieldset>
|
||||
<legend>Login</legend>
|
||||
<input type='hidden' name='submitted' id='submitted' value='1'/>
|
||||
|
||||
<label for='username' >UserName:</label>
|
||||
<label for='username' >Username:</label>
|
||||
<input type='text' name='username' id='username' maxlength="50" />
|
||||
|
||||
<label for='password' >Password:</label>
|
||||
<input type='password' name='password' id='password' maxlength="50" />
|
||||
|
||||
<input type='submit' name='Submit' value='Submit' />
|
||||
<br />
|
||||
<button class="btn btn-primary" id="submitButton">Login</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
|
||||
<script src="login.js" type="text/javascript"></script>
|
||||
Loading…
x
Reference in New Issue
Block a user