File: D:/web/itpartnership/RandomQ/Admin/index_q.asp
<!--#include file="../config.asp"-->
<%
IF NOT Session("RQ_LOGIN") = "True" THEN
Response.Redirect "index.asp"
Response.End
END IF
%>
<!--#include file="inc_header.asp"-->
<script language="JavaScript1.1" type="text/javascript">
function askData(ID) {
if (confirm("Delete Selected Quote" )) {
window.location.replace("del.asp?ID=" + ID );
}
}
</script>
<table width="80%" align="center" cellpadding="2" cellspacing="0" border="0"><tr><td>
<a href="q_add.asp" style="text-decoration: none;font-size: 10px;">Add New Quote</a>
</td></tr></table>
<br />
<table width="80%" align="center" cellpadding="2" cellspacing="0" border="1" bordercolor="#BCC5C4" style="border-collapse:collapse;"><tr><td valign="middle" align="center">
<table width="100%" align="center" cellpadding="2" cellspacing="0" border="1" bordercolor="WhiteSmoke" style="border-collapse:collapse;"><tr>
<td colspan="2"> </td>
<td width="20">
<table cellpadding="0" cellspacing="0" border="0"><tr>
<td><b>ID</b> </td>
<td width="8" valign="middle"><a href="?sort=1a"><img src="img/arrow_down.gif" width="8" height="7" alt="Ascending Sort" border="0"></a></td>
<td width="8" valign="middle"><a href="?sort=1b"><img src="img/arrow_up.gif" width="8" height="7" alt="Descending Sort" border="0"></a></td>
</tr></table>
</td>
<td>
<table cellpadding="0" cellspacing="0" border="0"><tr>
<td><b>PREVIEW</b> </td>
<td width="8" valign="middle"><a href="?sort=2a"><img src="img/arrow_down.gif" width="8" height="7" alt="Ascending Sort" border="0"></a></td>
<td width="8" valign="middle"><a href="?sort=2b"><img src="img/arrow_up.gif" width="8" height="7" alt="Descending Sort" border="0"></a></td>
</tr></table>
</td>
<td>
<table align="center" cellpadding="0" cellspacing="0" border="0"><tr>
<td><b>ACTIVE</b> </td>
<td width="8" valign="middle"><a href="?sort=3a"><img src="img/arrow_down.gif" width="8" height="7" alt="Ascending Sort" border="0"></a></td>
<td width="8" valign="middle"><a href="?sort=3b"><img src="img/arrow_up.gif" width="8" height="7" alt="Descending Sort" border="0"></a></td>
</tr></table>
</td>
<td width="15"> </td>
</tr>
<%Dim SQL, RS, strRETURNED_DATA, EOF_VAL, intNUM_COL, intNUM_ROW, intROW_COUNTER, fldQ, ACT, I, ID, SORT, ORD
SORT = Request.QueryString("sort")
SELECT CASE SORT
CASE "1a"
ORD = " ID ASC"
CASE "1b"
ORD = " ID DESC"
CASE "2a"
ORD = " fldMEMO ASC"
CASE "2b"
ORD = " fldMEMO DESC"
CASE "3a"
ORD = " fldACTIVE ASC"
CASE "3b"
ORD = " fldACTIVE DESC"
CASE ELSE
ORD = " ID DESC"
END SELECT
SQL = "SELECT ID, fldMEMO, fldACTIVE FROM TABLE_Q ORDER BY " & ORD
Call OPEN_DB()
Set RS = MyConn_RQ.Execute(SQL)
IF NOT RS.EOF THEN
strRETURNED_DATA = RS.getrows
ELSE
EOF_VAL = True
END IF
RS.close
Set RS = Nothing
MyConn_RQ.close
Set MyConn_RQ = Nothing
IF Not EOF_VAL = True Then
intNUM_COL = Ubound(strRETURNED_DATA,1)
intNUM_ROW = Ubound(strRETURNED_DATA,2)
FOR intROW_COUNTER = 0 TO intNUM_ROW
ID = strRETURNED_DATA(0,intROW_COUNTER)
fldQ = STRIP_CODE(strRETURNED_DATA(1,intROW_COUNTER))
ACT = CONVERT_TXT(Trim(strRETURNED_DATA(2,intROW_COUNTER)))
fldQ_ALL = fldQ
IF Len(fldQ) > 85 THEN
fldQ = Mid(fldQ,1,85) & " ... "
END IF
I = I + 1
%>
<tr onmouseover="bgColor='WhiteSmoke'" onmouseout="bgColor='White'">
<td width="15"><a href="q_edit.asp?ID=<%=ID%>"><img src="img/ico_edit.gif" width="15" height="15" alt="Edit Quote" border="0"></a></td>
<td width="15"><a style="cursor:hand;" onclick="askData('<%=ID%>')"><img src="img/ico_del.gif" width="15" height="15" alt="" border="0" name="image<%=ID%>" onmouseover="image<%=ID%>.src='img/ico_del_on.gif';" onmouseout="image<%=ID%>.src='img/ico_del.gif';"></a></td>
<td align="center" ><%=I%></td>
<td style="cursor:hand;" onclick="window.location='q_view.asp?ID=<%=ID%>'" title="<%=APO_FULL(fldQ_ALL)%>"><%=fldQ%></td>
<td align="center"><%=ACT%></td>
<td width="15"><a href="q_view.asp?ID=<%=ID%>"><img src="img/ico_view_2.gif" width="15" height="15" alt="" border="0"></a></td>
</tr>
<%
NEXT
END IF
IF I = 0 Then %>
<tr><td colspan="6">No quotes were found.</td></tr>
<% End If %>
</table>
</td></tr></table>
<br />
<!--
DEVELOPED BY EXPINION.NET, RELEASED UNDER GPL
NOT FOR SALE
http://www.expinion.net/
-->
<!--#include file="inc_footer.asp"-->