home *** CD-ROM | disk | FTP | other *** search
/ 202.53.64.216 / 202.53.64.216.tar / 202.53.64.216 / revelationindia / adminprayerrequests.asp < prev    next >
Text File  |  2004-09-27  |  7KB  |  262 lines

  1. <!--#include file = "increvelation.asp"-->
  2. <% Response.Buffer = True %>
  3. <SCRIPT LANGUAGE=javascript>
  4. <!--
  5.     // Checks all the checkboxes for deletion
  6.     function CheckAll(frm)
  7.     {
  8.         var i;
  9.         
  10.         if (frm.chkdelete.length > 1)
  11.         {
  12.             for(i=0;i<frm.chkdelete.length;i++)
  13.             {    
  14.                 if (frm.chkdelete[i].checked ==0) 
  15.                     frm.chkdelete[i].checked=1;
  16.             }
  17.         }
  18.         else
  19.             
  20.             frm.chkdelete.checked = 1
  21.             
  22.         
  23.     }
  24.     
  25.     
  26.     //Unchecks all the checked checkboxes    
  27.     function UnCheckAll(frm)
  28.     {
  29.         var i;
  30.         
  31.         
  32.         if (frm.chkdelete.length > 1)
  33.         {
  34.             for(i=0;i<frm.chkdelete.length;i++)
  35.             {
  36.                 if (frm.chkdelete[i].checked==1) 
  37.                     frm.chkdelete[i].checked=0;
  38.             }
  39.         }
  40.         else
  41.             frm.chkdelete.checked = 0        
  42.     }    
  43.     
  44.     
  45.     //Fires alert when delete button is pressed without checking any checkbox for deletion
  46.     function CheckBoxesChecked(frm)
  47.     {
  48.         var i,tflag;
  49.        
  50.         tflag = 500
  51.         
  52.         if (frm.chkdelete.length > 1)
  53.         {
  54.             for(i=0;i<frm.chkdelete.length;i++)
  55.             {
  56.                  if (frm.chkdelete[i].checked == 1)
  57.                  {
  58.                     tflag = 1
  59.                     break;
  60.                  }
  61.                
  62.                         
  63.             }
  64.         }
  65.         else
  66.              if (frm.chkdelete.checked == 1)       
  67.                 tflag = 1
  68.         
  69.         if (tflag != 1)
  70.         {
  71.                     alert("Check/Select the Mail to be Deleted and then Click on Delete Button")
  72.                     return false;
  73.                     
  74.         }
  75.         
  76.                
  77.     }
  78. //-->
  79. </SCRIPT>
  80.  
  81. <%
  82.     if len(session("adminid"))= 0 then
  83.         Response.Redirect "adminlogin.asp"
  84.     end if
  85.     
  86.     if session("flag")<> "Prayer" then
  87.         session("flag")= ""
  88.     end if
  89. %>
  90.  
  91. <%
  92.     dim rsPrayer
  93.     dim pwd,user
  94.     dim yob,age,currentyear
  95.     dim enqid,Flag
  96.     
  97.     
  98.     if len(session("flag"))= 0 then
  99.         Flag = Request.QueryString("flag")    
  100.         session("flag") = Flag
  101.     else
  102.         Flag = session("flag")
  103.     end if
  104.     
  105.     Select case Request.QueryString("Direction")
  106.         
  107.         case ""
  108.             session("currentpage") = 1
  109.             'session("flag") = Flag
  110.         case "Next"
  111.             session("currentpage")=session("currentpage")+1
  112.             'session("flag") = Flag
  113.             
  114.         case "Previous"
  115.             session("currentpage")=session("currentpage")-1
  116.             'session("flag") = Flag
  117.             
  118.     end select
  119.     
  120.     set rsPrayer = server.CreateObject("adodb.recordset")
  121.     set rsPrayer = GetAllEnquiries(Flag)
  122.     
  123.     if rsPrayer.EOF = true and rsPrayer.BOF = true then
  124.         Response.Redirect "adminhome.asp?prayer=fail"
  125.         Response.End
  126.     end if
  127.     
  128.     
  129.     rsPrayer.PageSize = 5
  130.     
  131.     if rsPrayer.BOF = false and rsPrayer.EOF = false then
  132.         rsPrayer.AbsolutePage = CLng(session("currentpage"))
  133.     end if 
  134.     
  135.     
  136. %>
  137.  
  138.     
  139. <html>
  140. <head>
  141. <title>RevelationIndia - GroomList</title>
  142. <style>
  143. A
  144.             {
  145.                 COLOR : white; Text-Decoration : None
  146.             }
  147.  
  148.             A:Hover
  149.             {
  150.                 COLOR : #cc0000;Text-Decoration : None
  151.             }
  152.  
  153. </style>
  154. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  155. </head>
  156. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><!--#include file ="include\admintop.inc"--></TD></TR></TABLE>
  157. <form name = "frmprayer" action = "postdeleteprayerrequests.asp?flag=Prayer" method = "post" onsubmit = "return CheckBoxesChecked(frmprayer)">
  158. <table width="779" border="0" cellspacing="0" cellpadding="0" height="500">
  159.   <tr> 
  160.     <td width="50" rowspan="9" valign="top">
  161.     <%'<!--#include file ="include\lefthome.inc"-->  %>
  162.    </td> 
  163.     <td colspan="2" align="middle" valign="top" rowspan="9" width="700"> 
  164.     <% if Request.QueryString("delprayer") = "success" then %>
  165.             <br><font color=red face = verdana size=2>
  166.             <b>Prayer Requested Deleted !</b>
  167.             </font>
  168.             <br>
  169.     <%end if%>
  170.     <% if Request.QueryString("postreply") = "success" then %>
  171.         <font color=red size=2 face=verdana><b>Reply sent successfully</b></font>
  172.     <%end if%>    
  173.    
  174.    <br><font face = verdana size =4 color = #ad0010><b>List Of Prayer Requests Received<b></font>
  175.     <br>
  176.     <TABLE  border=0 CELLSPACING=1 CELLPADDING=0 align=center width=100% align=center>
  177.     <TR>
  178.         <TD align = left>               
  179.         <%if CLng(session("currentpage")) > 1 then %>
  180.             <A href = "adminprayerrequests.asp?Direction=Previous"><font color=blue size=2 face = verdana><b>Previous</b></font></A>
  181.         <%End if%>
  182.         </TD>
  183.         <TD align = right>
  184.         <%if CLng(session("currentpage")) < rsPrayer.PageCount then %>
  185.         <A href = "adminprayerrequests.asp?Direction=Next"><font color=blue size=2 face = verdana><b>Next</b></font></a>
  186.         <%End if%>
  187.         </TD>
  188.     </TR>
  189. </TABLE>
  190. <br><br><p align = right><font color = blue size=2 face = verdana>
  191. <input type = button name = checkall value = "Check All" onclick = "return CheckAll(frmprayer)">
  192. <input type = button name = uncheckall value = "Uncheck All" onclick = "return UnCheckAll(frmprayer)">
  193. <input type = submit name = delete value = "Delete Checked Mails">
  194. </font></p>
  195.     <TABLE WIDTH="100%" BORDER=1 CELLSPACING=2 CELLPADDING=0 bgcolor = lightgrey align = center>
  196.      <TBODY>
  197.       
  198.     <TR bgcolor = lightsteelblue>
  199.         <TH align = left width=150 height="30"><font face="Verdana" size="2" color = navy>Name</font></TH>
  200.         <TH width=150 height="30"><font face="Verdana" size="2" color = navy>Message</font></TH>
  201.         <TH width=100 height="30"><font face="Verdana" size="2" color = navy>Email</font></TH>
  202.         <TH width=100 height="30"><font face="Verdana" size="2" color = navy>Date Posted</font></TH>
  203.         <TH width=100 height="30"><font face="Verdana" size="2" color = navy>Delete</font></TH>
  204.         
  205.     </TR>
  206.     <TR>
  207.     <%    
  208.        for count=1 to rsPrayer.PageSize 
  209.          if rsPrayer.eof then exit for
  210.                 
  211.        
  212.        'session("password") = " "
  213.        'user = rsPrayer.Fields("username")
  214.        enqid = rsPrayer.Fields("enquiry_id")
  215.        
  216.     
  217.     %>
  218.     
  219.     <TR bgcolor=lightgrey>
  220.     
  221.         <TD height="30"><font face="Verdana" size="2" color = black><%=rsPrayer.Fields("first_name")%></a></font></TD>
  222.         <TD align = left height="30"><A href ="adminprayerrequestsdetails.asp?enqid=<%=enqid%>&Flag=<%=Flag%>"><font face="Verdana" size="2" color = blue><%=left(rsPrayer.Fields("message"),20)%>....</font></TD>
  223.         <TD align = left height="30"><font face="Verdana" size="2" color = black><%=rsPrayer.Fields("email")%></font></TD>
  224.         <TD align = left height="30"><font face="Verdana" size="2" color = black><%=rsPrayer.Fields("edate")%></font></TD>
  225.         <TD align = center height="30"><font face="Verdana" size="2" color = black>
  226.         <INPUT type="checkbox" id=chkdelete name=chkdelete value = "<%=enqid%>">
  227.         </font></TD>
  228.     
  229.     <%
  230.     rsPrayer.MoveNext
  231.     next %>    
  232.     </TR>
  233. </table>
  234. <br>
  235. <TABLE  border=0 CELLSPACING=1 CELLPADDING=0 align=center width=100% align=center>
  236.     <TR>
  237.         <TD align = left>               
  238.         <%if CLng(session("currentpage")) > 1 then %>
  239.             <A href = "adminprayerrequests.asp?Direction=Previous"><font color=blue size=2 face = verdana><b>Previous</b></font></A>
  240.         <%End if%>
  241.         </TD>
  242.         <TD align = right>
  243.         <%if CLng(session("currentpage")) < rsPrayer.PageCount then %>
  244.         <A href = "adminprayerrequests.asp?Direction=Next"><font color=blue size=2 face = verdana><b>Next</b></font></a>
  245.         <%End if%>
  246.         </TD>
  247.     </TR>
  248. </TABLE>
  249. <br>
  250. <input type = button name = back value="Back" onclick = "javascript:history.back(1)" border=0>
  251. <input type = button name = home value="Home" onclick = "location.href='adminhome.asp'" border=0>
  252. </center>
  253. </TR>
  254. </TD>    
  255.     <td width="50" rowspan="9" valign="top" align = right>
  256.     <%'   <!--#include file ="include\right.inc"-->  %>
  257.     </td></TR></TBODY></TABLE>
  258.  <!--#include file ="include\bottom.inc"--> 
  259.  </form>
  260. </body>
  261. </html>
  262.