????PandaZa???? โพสต์ 2018-9-22 20:00:31

[สอบถาม] เกี่ยวกับสคริปหน้าเว็บโชว์ Reset-Ranking-PK

สวัสดีสมาชิกในบอร์ดทุกๆท่านคับ

ผมมีเรื่องอยาก สอบถาม+ขอคำปรึกษา เกี่ยวกับ สคริป รีเวล/จัดอันดับ/pk อะไรพวกนี้แบบเซิฟที่เขาเปิดๆทำกัน
แต่ของผมมีแค่ สคริป Ranking อันนี้ (มีคนให้มาฟรี) พอขึ้นโชว์หน้าเว็บมันขึ้นแค่ ชื่อตัวละคร เท่านั้นเอง

ลักษณะที่โชว์หน้าเว็บขึ้นแบบนี้เลย

1. PandaZa01   :   
2. PandaZa02   :
3. PandaZa03   :
4. PandaZa04   :
5. PandaZa05   :

มันขึ้นแค่ลำดับ+ชื่อตัวละครแล้วก็ เครื่องหม้าย >>> : <<< อันนี้แค่นั้นเลย

อยากขอความช่วยเหลือหรือคำแนะนำที่จะนำไปแก้ไขได้จากผู้รู้สักหน่อยคับอยากให้มันโชว์ LV. สักหน่อยก็ดี
หรือดีขึ้นมาหน่อยก็อยากให้มันโชว์จำนวน การรีเซ็ต ด้วย

ลักษณะ(ที่อยากให้เป็น)ก็ประมาณด้านล่างนี้

ลำดับ - ชื่อตัวละคร - LV - Reset

1. PandaZa 400 10

------------------------------------------------------------------------------------------------------------------------------------


ด้านล่างนี้คือ สคริป ที่มีคนให้มาฟรี+ที่เจอปัญหาอยู่ ตามที่เล่าไว้ด้านบนคับ

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<?
include("config.php");
$query = 'SELECT TOP 100 Name,cLevel from Character order by cLevel desc ';
$result = mssql_query($query);
?>
<style type="text/css">
<!--
body {
      margin-left: 0px;
      margin-top: 0px;
      margin-right: 0px;
      margin-bottom: 0px;
      width: 100%;
      height: 100%;
      scrollbar-face-color: #ECECEC;
      scrollbar-highlight-color: #ECECEC;
      scrollbar-3dlight-color: #525252;
      scrollbar-darkshadow-color: #525252;
      scrollbar-shadow-color: #ECECEC;
      scrollbar-arrow-color: #525252;
      scrollbar-track-color: #E0E0E0;
      background-image: url();
      background-color: #000;
}
.login {
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-size: 10px;
      font-weight: bold;
      color: #003366;
      text-decoration: none;
}
.campos {
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-size: 10px;
      font-weight: normal;
      color: #003366;
      text-decoration: none;
      border: 1px solid #003366;
}
.style2 {
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-size: 10px;
      font-weight: bold;
      color: #FFFFFF;
}
#ie5menu{
position:absolute;
width:120px;
border:2px solid black;
background-color:menu;
font-family:Verdana;
font-size: 11px;
line-height:17px;
cursor:default;
visibility:hidden;
}
.menuitems{
padding-left:15px;
padding-right:15px;
}
body,td,th {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 12px;
      color: #FF0000;
}
.style5 {color: #FFFFFF; font-size: 14px; }
.style6 {
      color: #666666;
      font-size: 14px;
}
.style11 {color: #666666}
.style12 {
      color: #999999
}
.style13 {
      color: #990000;
      font-size: 14px;
}
-->
</style>

<html>
<head>
<script language="javascript">
var display_url=0
function showmenuie5(){
var rightedge=document.body.clientWidth-event.clientX
var bottomedge=document.body.clientHeight-event.clientY
if (rightedge<ie5menu.offsetWidth)
ie5menu.style.left=document.body.scrollLeft+event.clientX-ie5menu.offsetWidth
else
ie5menu.style.left=document.body.scrollLeft+event.clientX
if (bottomedge<ie5menu.offsetHeight)
ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight
else
ie5menu.style.top=document.body.scrollTop+event.clientY
ie5menu.style.visibility="visible"
return false
}
function hidemenuie5(){
ie5menu.style.visibility="hidden"
}
function highlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor="highlight"
event.srcElement.style.color="white"
if (display_url==1)
window.status=event.srcElement.url
}
}
function lowlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor=""
event.srcElement.style.color="black"
window.status=''
}
}
function jumptoie5(){
if (event.srcElement.className=="menuitems")
window.location=event.srcElement.url
}
</script>
<title>Player Ranking</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
</head><center>
<body scroll="auto" onLoad="hidemenuie5()">
<table width="20%" height="100%" border="0" align="left" cellpadding="0" cellspacing="0">
    <td height="16"><table width="200" border="0" cellpadding="0" cellspacing="2" bordercolor="#000000" bgcolor="#000000">
      <tr bordercolor="#333333" bgcolor="#000000">

      </tr>
      <?
                for($i=0;$i < mssql_num_rows($result);++$i)
                        {
                        $row = mssql_fetch_row($result);
                        $rank = $i+1;
                        if($row == 0){ $row ='DW';
                        }
                        if($row == 1){ $row ='SM';
                        }
                        if($row == 16){ $row ='DK';
                        }
                        if($row == 18){ $row ='BK';
                        }
                        if($row == 32){ $row ='Elf';
                        }
                        if($row == 33){ $row ='ME';
                        }
                        if($row == 48){ $row ='MG';
                        }
                        if($row == 64){ $row ='DL';
                        }
                        if($row == 17){ $row ='DL';
                        }
                        if($row == 96){ $row ='FR';
                        }
                        echo "<tr>
                        <td valign=top align=center class=style1>$rank</td>
            <td valign=top align=left class=style5>$row</td>
            <td valign=top align=center class=style2>:</td>
            <td valign=top align=center class=style4>$row</td>
            </tr>";
                        }
                ?>
    </table>
    <tr>
    <td align="center" valign="top" bgcolor=""></td><br>

</tr>
<!-->
<div id="ie5menu" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5()">
<div class="menuitems" url="javascript:history.go(0)">Atualizar</div>
<div class="menuitems" url="javascript:history.go(-1)">Voltar</div>
<div class="menuitems" url="info.php">Principal</div>
</div>
<!-->
<script language="JavaScript1.2">
document.oncontextmenu=showmenuie5
if (document.all&&window.print)
document.body.onclick=hidemenuie5
</script>
</table>

<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>
</body>
<script language="JavaScript1.2" type="text/javascript">
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
function MM_popupMsg(msg) { //v1.0
alert(msg);
}
</script>
<script type="text/javascript">
<!--
//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message=" ";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>
</html>



admin โพสต์ 2018-9-22 21:14:33

ลองใช้
        <?php
        $query = mssql_query("SELECT TOP 5 Name,cLevel,mlevel,Grand_Resets from MuOnline.dbo.Character order by Grand_Resets desc , mlevel desc , cLevel desc");
        for($i=0;$i < mssql_num_rows($query);++$i)
                        {
        $row = mssql_fetch_row($query);
        $rank = $i+1;
        echo'
<tr id="Ranktab1">
    <td width="1%"><span>'.$rank.'</span></td>
    <td width="20%"><span>'.$row.'</span></td>
    <td width="50%"><span>'.$row.' [ <font color="#FF4646">'.$row.'</font> ]</span></td>
    <td width="30%"><span>[ <font color="#FF4646">'.$row.'</font> ]</span></td>
    </tr>'; } ?>

bezaza2525 โพสต์ 2018-10-23 12:42:56

ขอบคุณคับบบบบ
หน้า: [1]
ดูในรูปแบบกติ: [สอบถาม] เกี่ยวกับสคริปหน้าเว็บโชว์ Reset-Ranking-PK

Flag Counter