Như trên. Code này dùng để xem thông tin các nick, diễn đàn, thông tin số liệu wap. Trong đây mình đã cập nhật 3 Mã, 1 Mã help, tổng là 4. K nói nhìu nữa
Mã Twig - Dữ liệu
[code]{%set u=api.u.get(api.r.get('user'))%}
{%if api.r.get('user')%}
<div class="left">
{%if u.nick!=null%}
Nick: {{u.nick}}. Plus: {{u.plus}}. Level: {{u.level}}. Uid: {{u.uid}}
{%else%}Người dùng không tồn tại.{%endif%}
</div>
{%endif%}
{%if api.r.get('view')%}
<div class="left">
Các mã lệnh: <br>- about:user12345678 là xem thông tin người dùng, 123456789 là uid. <br>- about:site là xem các số liệu của trang wap. <br>- forum:new là thông tin về diễn đàn, gồm 3 chỉ số (new,top,act).
</div>
{%endif%}[/code]
Mã HTML - Jquery Xử Lí
[code]<script src="files/1043097/jquery.js"></script><script>
$(function(){
$('#console').submit(function(){
code=$('#console>#code').val();
page=$('#page');
file=$('#file');
if(code.length>0){
page.append('[<a href="main.php?f=1">user</a>] > '+code+'.<br>');
if(code.match(/about\:site/gi)){
file.load('stats.php?id=stats .left',function(){
page.append('[<a href="">console</a>] > '+file.html().replace(/\<br\>/gi,'. ')+'<br><br>');
});
}else if(code.match(/^help$/gi)){
file.load('main.php?f={{api.r.get('f')}}&view=help .left',function(){
page.append('[<a href="">console</a>] > '+file.html()+'<br>');});
}else if(code.match(/about\:user([0-9]+)/gi)){
file.load('main.php?f={{api.r.get('f')}}&user='+code.replace(/about\:user([0-9]+)/gi,'$1')+' .left',function(){
page.append('[<a href="">console</a>] > '+file.html().replace(/\<br\>/gi,'. ')+'<br>');});
}else if(code.match(/Forum\:(act|new|top)/gi)){
file.load('forums.php?id=menu&sor='+code.replace(/Forum\:(act|new|top)/gi,'$1')+' .left>a',function(){
page.append('[<a href="">console</a>] > '+file.html().replace(/\<\/a\>/gi,'</a>. ')+'<br>');});
}else{
page.append('[<a href="">console</a>] > Cú pháp console sai.<br><br>');
}
}else{
page.append('[<a href="">console</a>] > Cú pháp console sai.<br><br>');
}
return false;
})
})
</script>[/code]
Cuối cùng là Mã HTML dùng để thực hiện tương tác
[code]
<div style="display:none" id="file"></div>
<div class="title">Console</div>
<div id="page" style="min-height:70px;background:#000;color:#fff">
[<a href="">console</a>] > Welcome to console toolkit.<br><br>
</div>
<form id="console">
<input id="code" style="padding:5px;background:none;border:1px solid #eee;width:60%;color:#000"> <input type="submit" value="Mã" style="padding:5px;background:none;border:1px solid #eee;width:20%;color:#000">
</form>
<br>
<b>Mẹo</b> Gõ lệnh help để biết thêm chi tiết.[/code]
Code này là của tớ. Hiện tại tớ đặt cho nó là v1.0 và các bạn có thể phát triển thêm! Nhớ chia sẻ cho m.n nhé.
![[OFF]](/assets/images/off.gif)