Thread: just a question
View Single Post
  #11 (permalink)  
Old June 18th, 2004, 02:37 AM
gmoney060 gmoney060 is offline
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gmoney060 Send a message via MSN to gmoney060
Default

This is the whole script of the 1 and only page. Sorry I am not much more help, but I am more of a beginer.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>

<title>Top Deck Cards - Admin</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
<%
        'Declare Varables
        Dim dbname
        Dim ObjConn
        Dim tdcaddnew
        Dim tdcupdate
        Dim tdcdelete
        Dim tdcGETnews
        Dim tdcVIEWdates

        'Open DSNless connection to the banner database
        dbName = "/fpdb/news.mdb"
        ObjConn= "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & Server.MapPath(dbName)

        'Executes if AddNew Button was clicked
        If Not isEmpty(Request.Form("addnew")) Then
            Set tdcaddnew = Server.CreateObject("ADODB.RecordSet")
            tdcaddnew.Open "Select * from news_messages",objconn,1,2
            tdcaddnew.AddNew
            tdcaddnew("tdcmessage") = Request.Form("message")
            tdcaddnew("tdcdate") = Request.Form("startdate")
            tdcaddnew("tdcopendate") = Request.Form("startdate")
            tdcaddnew("tdcclosedate") = Request.Form("enddate")
            tdcaddnew.Update
            tdcaddnew.close
            Set tdcaddnew = nothing
        End If

        'Executes if Update Button was clicked
        If Not isEmpty(Request.Form("update")) Then
            set tdcupdate = Server.CreateObject("ADODB.RecordSet")
            tdcupdate.Open "Select * from news_messages where tdcnumber=" & Request.Form("dates"),objconn,1,2
            If Not tdcupdate.EOF Then
                tdcupdate("tdcmessage") = Request.Form("message")
                tdcupdate("tdcdate") = Request.Form("startdate")
                tdcupdate("tdcopendate") = Request.Form("startdate")
                tdcupdate("tdcclosedate") = Request.Form("enddate")
                tdcupdate.Update
            Else
                Response.Write("<b>No records were found to update</b>")
            End If
            tdcupdate.Close
            tdcupdate = nothing
        End If

        'Executes if Delete Button was clicked
        If Not isEmpty(request.Form("delete")) Then
            set tdcdelete = Server.CreateObject("ADODB.RecordSet")
            tdcdelete.Open "Select * from news_messages where tdcnumber=" & Request.Form("dates"), objconn,1,2
            If Not tdcdelete.EOF Then
                tdcdelete.Delete
            Else
                Response.Write("<b>No records were found to update</b>")
            End If
            tdcdelete.Close
            tdcdelete = nothing
        End If

        Set tdcGETnews = Server.CreateObject("ADODB.RecordSet")
        tdcGETnews.Open "Select * from news_messages order by tdcdate",ObjConn,1,2
    %>
<body onLoad="MM_preloadImages('/images/images/baseball_guy.gif')">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="246" rowspan="3"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image10','','/images/images/baseball_guy.gif',1)"><img src="/images/images/wizard_guy.gif" name="Image10" width="246" height="123" border="0"></a></td>
    <td width="60" height="66"><img src="/images/images/last_name.gif" width="60" height="66"></td>
    <td valign="top"> <div align="right"><strong>6238 Main
        Street<br>
        Downers Grove, IL 60516<br>
        </strong> <strong>(630) 435-9900</strong></div></td>
  </tr>
  <tr>
    <td height="26" colspan="2"><a href="http://www.topdeckcards.com/#"><img src="/images/images/welcome.gif" width="59" height="26" border="0" onMouseOver="showit(0)"></a><img src="/images/images/sports.gif" onMouseOver="showit(1)" width="48" height="26"><img src="/images/images/card_games.gif" onMouseOver="showit(2)" width="76" height="26"><img src="/images/images/other_games.gif" onMouseOver="showit(3)" width="81" height="26"><img src="/images/images/supplies.gif" onMouseOver="showit(4)" width="57" height="26"><a href="http://www.topdeckcards.com/events.asp"><img src="/images/images/events.gif" width="50" height="26" border="0" onMouseOver="showit(5)"></a><img src="/images/images/about_us.gif" width="62" height="26" border="0" onMouseOver="showit(6)"><img src="/images/images/links.gif" width="43" height="26" border="0" onMouseOver="showit(7)"><a href="/admin/welcome.asp"><img src="http://www.topdeckcards.com/images/images/admin.gif" width="42" height="26" border="0" onMouseOver="showit(8)"></a></td>
  </tr>
  <tr>
    <td height="31" colspan="2" background="/images/images/bar_background.gif"><div align="left" id="describe"onMouseover="clear_delayhide()" onMouseout="resetit(event)">
        <div align="left">
          <script language="JavaScript1.2">
/*
Tabs Menu (mouseover)- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use
*/
var submenu=new Array()
//Set submenu contents. Expand as needed. For each content, make sure everything exists on ONE LINE. Otherwise, there will be JS errors.
submenu[0]=''
submenu[1]='<b>Baseball Boxes</a> | Baseball Singles</a> | Basketball Boxes</a> | Basketball Singles</a> | Hockey Boxes</a> | Hockey Singles</a> | Football Boxes</a> | Football Singles</a> | Other Collectibles</a></b>'
submenu[2]='<b>Magic Boxes</a> | Magic Singles</a> | Warlord Boxes</a> | Warlord Singles</a> | MLB Showdown Boxes</a> | Magi Nation Boxes</a> | YuGiOh Singles</a> | Yu-Gi-Oh Boxes</a> | Yu-Gi-Oh Singles</a> | Pokemon Boxes</a></b>'
submenu[3]='<b>Dungeons & Dragons</a> | MechWarrior</a> | Hero Clix</a> | Mage Knight</a></b>'
submenu[4]='<b>All Supplies</a> | Card Board Boxes</a> | Carrying Cases</a></b>'
submenu[5]=''
submenu[6]=''
submenu[7]=''
submenu='<b><a href="http://www.topdeckcards.com/admin/mailing_edit.asp">Mailing List Editor</a> | <a href="http://www.topdeckcards.com/admin/mass_email.asp">Mass E-mailer</a> | <a href="http://www.topdeckcards.com/admin/event_edit.asp">Events Editor</a> | <a href="http://www.topdeckcards.com/admin/add_news.asp">News Editor</a></b>'
var delay_hide=1
/////No need to edit beyond here
var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers? document.dep1.document.dep2 : ""
function showit(which){
clear_delayhide()
thecontent=(which==-1)? "" : submenu[which]
if (document.getElementById||document.all)
menuobj.innerHTML=thecontent
else if (document.layers){
menuobj.document.write(thecontent)
menuobj.document.close()
}
}
function resetit(e){
if (document.all&&!menuobj.contains(e.toElement))
delayhide=setTimeout("showit(-1)",delay_hide)
else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhide=setTimeout("showit(-1)",delay_hide)
}
function clear_delayhide(){
if (window.delayhide)
clearTimeout(delayhide)
}
function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
        </script>
        </div>
      </div></td>
  </tr>
</table>
<div align="center"><br>
  <br>
  <table width="600" cellpadding="0" cellspacing="0">
    <tr>
      <td width="9" height="27"><img src="/images/images/left_header.gif" width="9" height="27"></td>
      <td width="100%" height="26" background="/images/images/back_header.gif"><div align="center"><strong>Mailing
          List Editor</strong></div></td>
      <td width="9"><img src="/images/images/right_header.gif" width="9" height="27"></td>
    </tr>
  </table>
  <table width="600" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td bgcolor="#333333"><table width="100%" border="0" cellspacing="1" cellpadding="1">
          <tr>
            <td width="100%" bgcolor="#FFFFFF"><div align="center"><form method="POST" action="news_add.asp">
                  <br>
                  <%
        tdcVIEWdates=""
        Do While NOT tdcGETnews.EOF
        tdcVIEWdates=tdcVIEWdates & "<option value=" & tdcGETnews("tdcnumber") & ">" & tdcGETnews("tdcopendate") & " <---> " & tdcGETnews("tdcclosedate") & "</option>"
        tdcGETnews.MoveNext
        Loop
        Set tdcGETnews = nothing
      %>
                  <b> </b> <br>

      <select size="8" name="dates" onDblClick="submit()"><%=tdcVIEWdates %></select> <br>
      <input type="submit" value="View" name="View"></p>
      <%If NOT isEmpty(Request.Form("dates")) Then
        Set tdcGETnews = Server.CreateObject("ADODB.RecordSet")
        tdcGETnews.Open "Select * from news_messages Where tdcnumber=" & Request.Form("dates"),ObjConn,1,2
        If Not tdcGETnews.EOF Then
       %>
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="52%" id="AutoNumber1">
                    <tr>
                      <td width="34%" align="right"><b>Message:&nbsp;&nbsp;
                        </b> </td>
                      <td width="66%"> <input name="message" type="text" id="message" value="<%=tdcGETnews("tdcmessage") %>" size="30"></td>
                    </tr>
                    <tr>
                      <td width="34%" align="right" height="10"> <b>
                        Start Time:&nbsp;</b>&nbsp;</td>
                      <td width="66%" height="10" align="center"><div align="left">
                          <input name="startdate" type="text" id="startdate" value="<%=tdcGETnews("tdcopendate") %>" size="10">
                        </div></td>
                    </tr>
                    <tr>
                      <td align="right" height="10"><b>End
                        Date:&nbsp;</b>&nbsp;</td>
                      <td width="66%" height="10" align="center">
<div align="left">
                          <input name="enddate" type="text" id="enddate" value="<%=tdcGETnews("tdcclosedate") %>" size="10">
                        </div></td>
                    </tr>
                  </table>
      <p>
      <input type="hidden" name="Number" value=<%=tdcGETnews("tdcnumber") %>>
      <input name="addnew" type="submit" id="addnew" value="Add New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input type="submit" value="Update" name="Update">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<input type="submit" value="Delete" name="Delete">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input type="submit" value="Clear" name="Clear"><br>
      <br>
      &nbsp;</p>
      <%
        End If
        tdcGETnews.close
        Set tdcGETnews = nothing
        Else %>
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="52%" id="AutoNumber1">
                    <tr>
                      <td width="34%" align="right"><b><b>Message:&nbsp;&nbsp;
                        </b> </b></td>
                      <td width="66%"> <input name="message" type="text" id="message" size="30"></td>
                    </tr>
                    <tr>
                      <td width="34%" align="right" height="10"> <b>
                        </b><b>Start
                        Time:&nbsp;</b>&nbsp;</td>
                      <td width="66%" height="10" align="center"><div align="left">
                          <input name="startdate" type="text" id="startdate" size="10">
                        </div></td>
                    </tr>
                    <tr>
                      <td align="right" height="10"><b>End
                        Date:&nbsp;</b>&nbsp;</td>
                      <td width="66%" height="10" align="center">
<div align="left">
                          <input name="enddate" type="text" id="enddate" size="10">
                        </div></td>
                    </tr>
                  </table>
      <p>
      <input name="addnew" type="submit" id="addnew" value="Add New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input type="submit" value="Clear" name="Clear">
                  </p>
        <%
        End If
        %>
 </form></div></td>
          </tr>
        </table></td>
    </tr>
  </table>
<p>&nbsp;</p></div>
</body>
</html>