pic_functions.asp dosyasını aşağıdaki ile değiştir
----------------------------------------------------------
<hr align="center" width="95%" color="<%= strHeadCellColor %>">
<TABLE border="0" width="95%" cellspacing="1" cellpadding="6" align="center">
<TR>
<%
'************************************** 1. BLOK BAŞLANGICI ****************************************
%>
<TD>
<%sub displaypic%>
<table border="0" width="100%" cellspacing="1" cellpadding="6" align="center">
<tr>
<td align="center" width="100%">
<font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>">
<a href="pic_display.asp?id=<%=intpicID%>"><%=strpicTitle%>[/url]<%if ShareCheck = "ok" then%> <a href="javascript:openWindow('pic_pop_share.asp?id=<%=intpicID%>')"><img src="images/icons/icon_pencil.gif" alt="Resmi Paylaş." border=0 hspace=0>[/url]<%end if%><% if dateSince >= 0 then response.write " <img src=Images/new.gif>"%>
<font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize-1 %>" color="<%= strDefaultFontColor %>">(Eklendiği Tarih : <%=formatdatetime(strPostDate, 2)%> Hit : <%=intHit%><% GetRating(intLinkID) %>)</font>
<%=strDesc%></font>
</td>
</tr>
<% if strTURL <> "" and strTURL <> "http://" and strTURL <> " " then%>
<tr>
<td align="center" width="100%"><a href="pic_display.asp?id=<%=intpicID%>">
<img src="pic_show.asp?picid=<% =intpicID%>&type=1" border="1" width="200" height="148">[/url]</td>
</tr>
<%end if%>
</table>
<%end sub%>
</TD>
<%
'************************************** 1. BLOK SONU ****************************************
'************************************** 2. BLOK BAŞLANGICI ****************************************
%>
<TD>
<%sub displaypic2%>
<table border="0" width="100%" cellspacing="1" cellpadding="6" align="center">
<tr>
<td align="center" width="100%">
<font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>">
<a href="pic_display.asp?id=<%=intpicID%>"><%=strpicTitle%>[/url]<%if ShareCheck = "ok" then%> <a href="javascript:openWindow('pic_pop_share.asp?id=<%=intpicID%>')"><img src="images/icons/icon_pencil.gif" alt="Resmi Paylaş." border=0 hspace=0>[/url]<%end if%><% if dateSince >= 0 then response.write " <img src=Images/new.gif>"%>
<font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize-1 %>" color="<%= strDefaultFontColor %>">
(Eklendiği Tarih : <%=formatdatetime(strPostDate, 2)%> Hit : <%=intHit%><% GetRating(intLinkID) %>)</font>
<%=strDesc%></font>
</td>
</tr>
<% if strTURL <> "" and strTURL <> "http://" and strTURL <> " " then%>
<tr>
<td align="center" width="100%"><a href="pic_display.asp?id=<%=intpicID%>">
<img src="pic_show.asp?picid=<% =intpicID%>&type=1" border="1" width="200" height="148">[/url]</td>
</tr>
<%end if%>
</table>
<%end sub%>
</TD>
<%
'************************************** 2. BLOK SONU ****************************************
%>
</TR>
</TABLE>
<hr align="center" width="95%" color="<%= strHeadCellColor %>">
<%
function GetRating(picID)
strSQL = "SELECT VOTES, RATING FROM pic WHERE pic_ID = " & intpicID
set rspicRating = server.CreateObject("adodb.recordset")
rspicRating.Open strSQL, my_Conn
dim intVotes
dim intRating
intVotes = rspicRating("VOTES")
intRating = rspicRating("RATING")
rspicRating.Close
set rspicRating = nothing
if intVotes > 0 then
intRating = Round(intRating/intVotes)
Response.Write(" Oylama: " & intRating & " Oy: " & intVotes)
end if
end function
%>
**********************************************************************************
pic_showall.aspaşağıdaki ile değiştir****************************************************************************
<%
CurPageType = "pictures"
CurPageInfoChk = "1"
function CurPageInfo ()
strOnlineQueryString = ChkActUsrUrl(chkString(Request.QueryString,"sqlstring"))
PageName = chkString(Request.QueryString("parent_name"), "sqlstring") & ": " & chkString(Request.QueryString("sub_name"), "sqlstring") & " in Pictures"
PageAction = "Viewing
"
PageLocation = "pic_showall.asp?" & strOnlineQueryString & ""
CurPageInfo = PageAction & " " & "<a href=" & PageLocation & ">" & PageName & "[/url]"
end function
%>
<!-- #INCLUDE FILE="config.asp" -->
<!-- #INCLUDE FILE="inc_functions.asp" -->
<!-- #INCLUDE FILE="inc_top.asp" -->
<!-- #INCLUDE FILE="inc_ADOVBS.asp" -->
<!-- #INCLUDE FILE="pic_functions.asp" -->
<%
cat_name = chkString(Request.QueryString("parent_name"), "sqlstring")
sub_name = chkString(Request.QueryString("sub_name"), "sqlstring")
if Request.QueryString("parent_id") <> "" or Request.QueryString("parent_id") <> " " then
if IsNumeric(Request.QueryString("parent_id")) = True then
parent = cLng(Request.QueryString("parent_id"))
else
my_Conn.close
set my_Conn = nothing
Response.Redirect("pic.asp")
end if
end if
if Request.QueryString("cat_id") <> "" or Request.QueryString("cat_id") <> " " then
if IsNumeric(Request.QueryString("cat_id")) = True then
cat = cLng(Request.QueryString("cat_id"))
else
my_Conn.close
set my_Conn = nothing
Response.Redirect("pic.asp")
end if
end if
if cat = "" then
my_Conn.close
set my_Conn = nothing
Response.Redirect("pic.asp")
end if
mwpThemeTableCustomCode = " border=""1"" cellpadding=""0"" cellspacing=""0"" style=""border-collapse: collapse"" align=""center"" width=""99%"""
mwpThemeSmallBlock_open()%>
<tr>
<td width="100%"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<img src="Images/nav_icon.gif" align="absbottom" border="0"> <a href="default.asp">Ana Sayfa[/url] >> <a href="pic.asp">Resimler[/url] >> <a href="pic_showsub.asp?cat_id=<%=parent%>&Cat=<% =ChkString(Request.QueryString("parent_name"),"urlpath") %>"><%= chkString(cat_name, "display")%>[/url] >> <%=sub_name%></td>
</tr>
<%mwpThemeSmallBlock_close()%>
<table border="0" width="99%" align="center"
<tr>
<td width="180" valign="top"><!-- #include file="pic_menu.asp" --></td>
<td width="100%" valign="top">
<%
Dim iPageSize
Dim iPageCount
Dim iPageCurrent
Dim strOrderBy
Dim strSQL
Dim objPagingConn
Dim objPagingRS
Dim iRecordsShown
Dim I
iPageSize = 6
'set page size
If Request.QueryString("page") = "" Then
iPageCurrent = 1
Else
iPageCurrent = cLng(Request.QueryString("page"))
End If
If Request.QueryString("order") = "" Then
strOrderBy = "pic_id"
Else
strOrderBy = chkString(Request.QueryString("order"),"sqlstring")
End If
strSQL = "SELECT PIC_ID, TITLE, POST_DATE, DESCRIPTION, HIT, COPYRIGHT, HIT, OWNER, TURL From PIC where Category=" & cat & " and show = 1 order by PIC_ID desc"
Set objPagingRS = Server.CreateObject("ADODB.Recordset")
objPagingRS.PageSize = iPageSize
objPagingRS.CacheSize = iPageSize
objPagingRS.Open strSQL, my_Conn, adOpenStatic, adLockReadOnly, adCmdText
reccount = objPagingRS.recordcount
iPageCount = objPagingRS.PageCount
If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
If iPageCurrent < 1 Then iPageCurrent = 1
mwpThemeBlock_open()
response.write "<tr><td>"
If iPageCount = 0 Then
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="<%= strTableBorderColor %>" align="center">
<tr>
<td align="left" <%= mwpThemeBlock_subTitleCell %>>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><%=cat_name%>[/url]: <%=sub_name%> ( 0 resim)</font>
</td>
</tr>
</table>
<%
Response.Write "<center><font color=red size=3>Resim bulunamadı!</font></center>"
Else
objPagingRS.AbsolutePage = iPageCurrent
if reccount = 1 then
tTitle = cat_name &"[/url]: " & sub_name & " ( " & reccount & " file)"
else
tTitle = cat_name &"[/url]: " & sub_name & " ( " & reccount & " files)"
end if
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="<%= strTableBorderColor %>" align="center">
<tr>
<td align="left" <%= mwpThemeBlock_subTitleCell %>>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><%=cat_name%>[/url]: <%=sub_name%> (<%=reccount%><% if reccount = 1 then %> resim<% else %> resim<% end if %><font size="<% =strFooterFontSize%>"> özel resimler de dahil</font>)</font>
</td>
</tr>
</table>
<%
iRecordsShown = 0
Do While iRecordsShown < iPageSize And Not objPagingRS.EOF
'************************************** 1. BLOK BAŞLANGICI ****************************************
ShareCheck = "no"
strPicOwner = objPagingRS("OWNER")
if strPicOwner = "0" or instr(strPicOwner,("|" & getMemberNumber(STRdbntUserName) & "|")) then
if instr(strPicOwner,("|" & getMemberNumber(STRdbntUserName) & "|")) then
ShareCheck = "ok"
end if
strpicTitle = objPagingRS("TItle")
strDESC = objPagingRS("DESCRIPTION")
intpicID = objPagingRS("PIC_ID")
intHit = objPagingRS("HIT")
strPostDate = strtodate(objPagingRS("POST_DATE"))
dateSince=DateDiff("d", strForumDateAdjust, strPostDate)+7
if not len(trim(objPagingRS("TURL"))) = 7 or objPagingRS("TURL") = "" then
strTURL = objPagingRS("TURL")
end if
%>
<table border="0" width="100%" cellspacing="1" cellpadding="6" align="center">
<tr>
<td>
<%call displaypic%>
</td>
<%
'************************************** 1. BLOK SONU ****************************************
'************************************** 2. BLOK BAŞLANGICI ****************************************
%>
<%end if
iRecordsShown = iRecordsShown + 1
objPagingRS.MoveNext
ShareCheck = "no"
strPicOwner = objPagingRS("OWNER")
if strPicOwner = "0" or instr(strPicOwner,("|" & getMemberNumber(STRdbntUserName) & "|")) then
if instr(strPicOwner,("|" & getMemberNumber(STRdbntUserName) & "|")) then
ShareCheck = "ok"
end if
strpicTitle = objPagingRS("TItle")
strDESC = objPagingRS("DESCRIPTION")
intpicID = objPagingRS("PIC_ID")
intHit = objPagingRS("HIT")
strPostDate = strtodate(objPagingRS("POST_DATE"))
dateSince=DateDiff("d", strForumDateAdjust, strPostDate)+7
if not len(trim(objPagingRS("TURL"))) = 7 or objPagingRS("TURL") = "" then
strTURL = objPagingRS("TURL")
end if
%>
<td>
<%if not objPagingRS.EOF then
call displaypic2
end if
%>
</td>
<%
'************************************** 2. BLOK SONU ****************************************
%>
</tr>
</table>
<%end if
iRecordsShown = iRecordsShown + 1
objPagingRS.MoveNext
Loop
End If
objPagingRS.Close
Set objPagingRS = Nothing
If iPageCurrent = iPageCount and iPageCurrent > 1 Then
%>
<p align=center><a HREF="pic_showall.asp?page=<%= iPageCurrent - 1 %>&order=<%= Server.URLEncode(strOrderBy) %>&cat_id=<%=cat%>&parent_id=<%=parent%>&parent_name=<%=cat_name%>&sub_name=<%=sub_name%>"><font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>">Önceki Sayfa</font>[/url]<font size="<%= strDefaultFontSize %>" face="<%= strDefaultFontFace %>"> | Sonraki Sayfa</font></p>
<%
End If
If iPageCurrent < iPageCount and iPageCurrent = 1 Then
%>
<p align=center><font size="<%= strDefaultFontSize %>" face="<%= strDefaultFontFace %>">Önceki Sayfa | </font><a HREF="pic_showall.asp?page=<%= iPageCurrent + 1 %>&order=<%= Server.URLEncode(strOrderBy) %>&cat_id=<%=cat%>&parent_id=<%=parent%>&parent_name=<%=cat_name%>&sub_name=<%=sub_name%>"><font size="<%= strDefaultFontSize %>" face="<%= strDefaultFontFace %>">Sonraki Sayfa</font>[/url]</p>
</center>
<%
End If
If iPageCurrent < iPageCount and iPageCurrent > 1 Then
%>
<p align=center><a HREF="pic_showall.asp?page=<%= iPageCurrent - 1 %>&order=<%= Server.URLEncode(strOrderBy) %>&cat_id=<%=cat%>&parent_id=<%=parent%>&parent_name=<%=cat_name%>&sub_name=<%=sub_name%>"><font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>">Önceki Sayfa</font>[/url] | <a HREF="pic_showall.asp?page=<%= iPageCurrent + 1 %>&order=<%= Server.URLEncode(strOrderBy) %>&cat_id=<%=cat%>&parent_id=<%=parent%>&parent_name=<%=cat_name%>&sub_name=<%=sub_name%>"><font size="<%= strDefaultFontSize %>" face="<%= strDefaultFontFace %>">Sonraki Sayfa</font>[/url]</p>
</center>
<%
End If
if iPagecount = 0 then iPageCount = 1
%>
<center>
<font face="<%= strDefaultFontFace %>" size="<%= strFooterFontSize %>">Sayfa <%= iPageCurrent %> / <%= iPageCount %> </font>
</font>
<a href="pic_add_form.asp?cat_id=<%=cat%>&cat_name=<%=ChkString(Request.QueryString("sub_name"),"urlpath")%>&parent_id=<%=parent%>&parent_name=<%=ChkString(Request.QueryString("parent_name"),"urlpath")%>"><font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>">Resim Ekleyin</font>[/url]
</center>
<%
response.write "</td></tr></table>"
mwpThemeBlock_close()%>
</td>
</tr>
</table>
<!-- #INCLUDE FILE="pic_affiliates.asp" -->
<!-- #INCLUDE FILE="inc_footer.asp" -->