לוגו אתר Fresh          
 
 
  אפשרות תפריט  ראשי     אפשרות תפריט  צ'אט     אפשרות תפריט  מבזקים     אפשרות תפריט  צור קשר     חץ שמאלה ברוכים הבאים לפורום ASP חץ ימינה  

לך אחורה   לובי הפורומים > מחשבים > ASP
שמור לעצמך קישור לדף זה באתרי שמירת קישורים חברתיים
 
כלי אשכול חפש באשכול זה



  #1  
ישן 06-07-2005, 18:13
צלמית המשתמש של coolroy
  משתמש זכר coolroy coolroy אינו מחובר  
מנהל פורום פלאש
 
חבר מתאריך: 04.03.05
הודעות: 5,834
מספור לוח תוצאות

יש לי לוח תוצאות:
http://n.domaindlx.com/coolroyworks...thilob/view.asp
והנה הקוד שלו:


קוד:
<%@ Language="VBScript" %> <% Option Explicit %> <%Dim RecordsPerPage,currentpage,u,pages,rs1,rs2 currentpage = Request.QueryString("currentpage") IF currentpage ="" OR currentpage < 1 Then currentpage = 1 END IF RecordsPerPage = 50 %> <!--#include file="inc_head.asp"--> <!--#include file="dbconn.asp"--> <% Dim sql,rsShowGB,total sql = "SELECT * FROM mess ORDER BY score DESC" Set rsShowGB = Server.CreateObject("ADODB.Recordset") rsShowGB.Open sql, dbconn, 3, 3 total = rsShowGB.RecordCount %> <% rsShowGB.PageSize = RecordsPerPage If NOT rsShowGB.EOF Then rsShowGB.AbsolutePage = currentpage If rsShowGB.EOF Then %> <center> <table width="300" cellspacing="0" bgcolor="#cccccc" Align="center" border> <tr> <td> <center><font size="3" class="font"><b>No entries found in High Scores</b></font></center> </td> </tr> </table> <%Else For u=1 to RecordsPerPage IF rsShowGB.EOF Then Exit For%> <table width="700" cellspacing="0" bgcolor="#cccccc" Align="center" border="0"> <tr> </tr> <tr> <td width="30%"> <table width="30%" cellspacing="0" border="0"> <tr> <td bgcolor="#999999"> <font size="2" class="font"><!-- name --> <%=rsShowGB("postedby")%> </font> </td> <td bgcolor="#666666"> <font size="2" class="font"> <!-- score --> <%=rsShowGB("score")%> </font> </td> </tr> </table> </td> </tr> </table> </center> <% rsShowGB.movenext Next%> <% pages = int(total/RecordsPerPage) IF (total MOD RecordsPerPage) <> "0" Then pages = pages + 1 END IF rs2 = int(currentpage*RecordsPerPage) rs1 = int(rs2-RecordsPerPage+1) %> <br> <table width="700" cellspacing="0" height="10" Align="center"> <tr> <td bgcolor="#DDDDDD" width="20%"> <font size="2"><%IF currentpage = "1" Then%>PREVIOUS<%ELSE%><a href="?currentpage=<%=currentpage-1%>">PREVIOUS</a><%END IF%> </font> </td> <td bgcolor="#DDDDDD" width="30%"> <font size="2">Showing High Scores <%=rs1%> To <%IF int(currentpage) = int(pages) Then%><%=total%><%ELSE%><%=rs2%> <%END IF%> Of <%=total%></font> </td> <td bgcolor="#DDDDDD" Align="right" width="30%"> <font size="2">Page <%=currentpage%> Of <%=pages%> </font> </td> <td bgcolor="#DDDDDD" Align="right" width="20%"> <font size="2"><%IF int(currentpage) < int(pages) Then%><a href="?currentpage=<%=currentpage+1%>">NEXT</a><%ELSE%>NEXT<%END IF%> </font> </td> </tr> </table> <%END IF%> <!--#include file="inc_footer.asp"-->




אני רוצה שכל תוצאה תקבל מספור אז ניסיתי לעשות זאת:



קוד:
<% response.write(u) %>





וזה לא עובד לי...
מישהו יכול לעזור לי בעניין?
חזרה לפורום
  #4  
ישן 07-07-2005, 11:37
צלמית המשתמש של Eran
  משתמש זכר Eran Eran אינו מחובר  
 
חבר מתאריך: 27.02.02
הודעות: 4,536
שלח הודעה דרך ICQ אל Eran
אמממ
בתגובה להודעה מספר 3 שנכתבה על ידי coolroy שמתחילה ב "אתה יכול להגיד לי בדיוק איזה..."

בתחילת הדף תוסיף
Dim RecordsPerPage,currentpage,u,pages,rs1,rs2,mone

באמצע בערך
קוד PHP:
 <%Else
For 
u=1 to RecordsPerPage 
IF rsShowGB.EOF Then Exit For
mone mone 1
%> 


וקצת מתחת לזה, בתחילת הטבלה השניה, מעל השם תוסיף
קוד PHP:
 <table width="30%" cellspacing="0" border="0">
<
tr>
<
td bgcolor="Black">
<
font size="2" class="font"><b><!-- מונה--> <%=mone> </b></font>
</
td>
<
td bgcolor="#999999">
<
font size="2" class="font"><!-- name --> <%=rsShowGB("postedby")%> </font>
</
td


זה רק להוסיף!
_____________________________________

[התמונה הבאה מגיעה מקישור שלא מתחיל ב https ולכן לא הוטמעה בדף כדי לשמור על https תקין: http://fresh.clanteam.com/list.png]

[התמונה הבאה מגיעה מקישור שלא מתחיל ב https ולכן לא הוטמעה בדף כדי לשמור על https תקין: http://fresh.clanteam.com/?https://2010-uploaded.fresh.co.il/2010/09/21/52868411.gif,http://www.boredpanda.com/blog/wp-content/themes/mimbo2.2/images/subscribe-panda-605px.png]

חזרה לפורום
  #7  
ישן 07-07-2005, 14:47
צלמית המשתמש של coolroy
  משתמש זכר coolroy coolroy אינו מחובר  
מנהל פורום פלאש
 
חבר מתאריך: 04.03.05
הודעות: 5,834
לא עובד
בתגובה להודעה מספר 1 שנכתבה על ידי coolroy שמתחילה ב "מספור לוח תוצאות"

הנה מה שעשיתי:

קוד:
<%@ Language="VBScript" %> <% Option Explicit %> <%Dim RecordsPerPage,currentpage,u,pages,rs1,rs2,mone currentpage = Request.QueryString("currentpage") IF currentpage ="" OR currentpage < 1 Then currentpage = 1 END IF RecordsPerPage = 50 %> <!--#include file="inc_head.asp"--> <!--#include file="dbconn.asp"--> <% Dim sql,rsShowGB,total sql = "SELECT * FROM mess ORDER BY score DESC" Set rsShowGB = Server.CreateObject("ADODB.Recordset") rsShowGB.Open sql, dbconn, 3, 3 total = rsShowGB.RecordCount %> <% rsShowGB.PageSize = RecordsPerPage If NOT rsShowGB.EOF Then rsShowGB.AbsolutePage = currentpage If rsShowGB.EOF Then %> <center> <table width="300" cellspacing="0" bgcolor="#cccccc" Align="center" border> <tr> <td> <center><font size="3" class="font"><b>No entries found in High Scores</b></font></center> </td> </tr> </table> <%Else For u=1 to RecordsPerPage IF rsShowGB.EOF Then Exit For%> <%Else For u=1 to RecordsPerPage IF rsShowGB.EOF Then Exit For mone = mone + 1 %> <table width="700" cellspacing="0" bgcolor="#cccccc" Align="center" border="0"> <tr> </tr> <tr> <td width="30%"> <table width="30%" cellspacing="0" border="0"> <tr> <td bgcolor="#999999"><%mone=%> <font size="2" class="font"><!-- name --> <%=rsShowGB("postedby")%> </font> </td> <td bgcolor="#666666"> <font size="2" class="font"> <!-- score --> <%=rsShowGB("score")%> </font> </td> </tr> </table> </td> </tr> </table> </center> <% rsShowGB.movenext Next%> <% pages = int(total/RecordsPerPage) IF (total MOD RecordsPerPage) <> "0" Then pages = pages + 1 END IF rs2 = int(currentpage*RecordsPerPage) rs1 = int(rs2-RecordsPerPage+1) %> <br> <table width="700" cellspacing="0" height="10" Align="center"> <tr> <td bgcolor="#DDDDDD" width="20%"> <font size="2"><%IF currentpage = "1" Then%>PREVIOUS<%ELSE%><a href="?currentpage=<%=currentpage-1%>">PREVIOUS</a><%END IF%> </font> </td> <td bgcolor="#DDDDDD" width="30%"> <font size="2">Showing High Scores <%=rs1%> To <%IF int(currentpage) = int(pages) Then%><%=total%><%ELSE%><%=rs2%> <%END IF%> Of <%=total%></font> </td> <td bgcolor="#DDDDDD" Align="right" width="30%"> <font size="2">Page <%=currentpage%> Of <%=pages%> </font> </td> <td bgcolor="#DDDDDD" Align="right" width="20%"> <font size="2"><%IF int(currentpage) < int(pages) Then%><a href="?currentpage=<%=currentpage+1%>">NEXT</a><%ELSE%>NEXT<%END IF%> </font> </td> </tr> </table> <%END IF%> <!--#include file="inc_footer.asp"-->
חזרה לפורום
  #10  
ישן 08-07-2005, 13:54
צלמית המשתמש של Eran
  משתמש זכר Eran Eran אינו מחובר  
 
חבר מתאריך: 27.02.02
הודעות: 4,536
שלח הודעה דרך ICQ אל Eran
תשרשר פעם הבאה :)
בתגובה להודעה מספר 9 שנכתבה על ידי coolroy שמתחילה ב "ניסיתי אבל עדיין לא עובד..."

קוד PHP:
 <%@ Language="VBScript" %>
 <% 
Option Explicit %>
<%
Dim RecordsPerPage,currentpage,u,pages,rs1,rs2,mone
currentpage 
Request.QueryString("currentpage")
IF 
currentpage ="" OR currentpage 1 Then
currentpage 
1
END 
IF
RecordsPerPage 50
%>
<!--
#include file="inc_head.asp"-->
<!--#include file="dbconn.asp"-->
<%
  
Dim sql,rsShowGB,total
  sql 
"SELECT * FROM mess ORDER BY score DESC"
  
Set rsShowGB Server.CreateObject("ADODB.Recordset")
  
rsShowGB.Open sqldbconn33
 total 
rsShowGB.RecordCount
%>

<%
rsShowGB.PageSize RecordsPerPage
If NOT rsShowGB.EOF Then rsShowGB.AbsolutePage currentpage
If rsShowGB.EOF Then
%>
<
center>
 <
table width="300" cellspacing="0" bgcolor="#cccccc" Align="center" border>
   <
tr>
     <
td>
       <
center><font size="3" class="font"><b>No entries found in High Scores</b></font></center>
     </
td>
   </
tr>
 </
table>
<%Else
 For 
u=1 to RecordsPerPage 
   
IF rsShowGB.EOF Then Exit For%>

<%Else
For 
u=1 to RecordsPerPage 
IF rsShowGB.EOF Then Exit For
mone mone 1
%> 
 <
table width="700" cellspacing="0" bgcolor="#cccccc" Align="center" border="0">
<
tr><td width="30%">
<
table width="30%" cellspacing="0" border="0">
<
tr>
<
td bgcolor="Black">
<
font size="2" class="font"><b><!-- מונה--> <%=mone> </b></font>
</
td>
<
td bgcolor="#999999">
<
font size="2" class="font"><!-- name --> <%=rsShowGB("postedby")%> </font>
</
td
<
td bgcolor="#666666">
   <
font size="2" class="font"> <!-- score --> <%=rsShowGB("score")%>    </font>
           </
td>
         </
tr>
       </
table>
     </
td
   </
tr>
 </
table>
</
center>
 <%  
rsShowGB.movenext
 Next
%>

<%
pages int(total/RecordsPerPage)
IF (
total MOD RecordsPerPage) <> "0" Then
   pages 
pages 1
END 
IF
rs2 int(currentpage*RecordsPerPage)
rs1 int(rs2-RecordsPerPage+1)
%>
<
br>
 <
table width="700" cellspacing="0" height="10" Align="center">
   <
tr>
     <
td bgcolor="#DDDDDD" width="20%">
       <
font size="2"><%IF currentpage "1" Then%>PREVIOUS<%ELSE%><a href="?currentpage=<%=currentpage-1%>">PREVIOUS</a><%END IF%> </font>
     </
td>
     <
td bgcolor="#DDDDDD" width="30%">
       <
font size="2">Showing High Scores <%=rs1%> To <%IF int(currentpage) = int(pagesThen%><%=total%><%ELSE%><%=rs2%>  <%END IF%> Of <%=total%></font>
     </
td>
     <
td bgcolor="#DDDDDD" Align="right" width="30%">
       <
font size="2">Page <%=currentpage%> Of <%=pages%> </font>
     </
td>
     <
td bgcolor="#DDDDDD" Align="right" width="20%">
       <
font size="2"><%IF int(currentpage) < int(pagesThen%><a href="?currentpage=<%=currentpage+1%>">NEXT</a><%ELSE%>NEXT<%END IF%> </font>
     </
td>
   </
tr
 </
table>
<%
END IF%>
<!--
#include file="inc_footer.asp"--> 

אם זה מחזיר שגיאה אז תרשום כאן את השגיאה...
_____________________________________

[התמונה הבאה מגיעה מקישור שלא מתחיל ב https ולכן לא הוטמעה בדף כדי לשמור על https תקין: http://fresh.clanteam.com/list.png]

[התמונה הבאה מגיעה מקישור שלא מתחיל ב https ולכן לא הוטמעה בדף כדי לשמור על https תקין: http://fresh.clanteam.com/?https://2010-uploaded.fresh.co.il/2010/09/21/52868411.gif,http://www.boredpanda.com/blog/wp-content/themes/mimbo2.2/images/subscribe-panda-605px.png]

חזרה לפורום

כלי אשכול חפש באשכול זה
חפש באשכול זה:

חיפוש מתקדם
מצבי תצוגה דרג אשכול זה
דרג אשכול זה:

מזער את תיבת המידע אפשרויות משלוח הודעות
אתה לא יכול לפתוח אשכולות חדשים
אתה לא יכול להגיב לאשכולות
אתה לא יכול לצרף קבצים
אתה לא יכול לערוך את ההודעות שלך

קוד vB פעיל
קוד [IMG] פעיל
קוד HTML כבוי
מעבר לפורום



כל הזמנים המוצגים בדף זה הם לפי איזור זמן GMT +2. השעה כעת היא 03:25

הדף נוצר ב 0.19 שניות עם 10 שאילתות

הפורום מבוסס על vBulletin, גירסא 3.0.6
כל הזכויות לתוכנת הפורומים שמורות © 2024 - 2000 לחברת Jelsoft Enterprises.
כל הזכויות שמורות ל Fresh.co.il ©

צור קשר | תקנון האתר