Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - news authorization
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

news authorization

 Post Reply Post Reply
Author
Zeffy View Drop Down
Groupie
Groupie


Joined: 19 February 2003
Location: United States
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote Zeffy Quote  Post ReplyReply Direct Link To This Post Topic: news authorization
    Posted: 09 March 2003 at 5:37pm

<% @Language=VBScript %>
<html>
<head><title>TEAM COBALT :: Add News</title>
<style>
A
{color:blue;text-decoration: none;}
a:hover
{color:#FFFFFF;}
TD
{FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: verdan}
</style>
</head>
<%
IF request.form("Flag")="OK" THEN
Fr=request.form("From")
Fr=Replace(Fr, "'", "''")
Su=request.form("Subject")
Su=Replace(Su, "'", "''")
Co=request.form("Comment")
Co=Replace(Co, "'", "''")
Ti=FormatDateTime(Now)

'String1
Set objConn = Server.CreateObject("ADODB.Connection")
strConnection = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("*****.mdb") & ";User ID=*****; Password=*****;"
objConn.Open(strConnection)
 
SQLstmt = "INSERT INTO myowngb (fr,subject,comment,ti)"
SQLstmt = SQLstmt & " VALUES ("
SQLstmt = SQLstmt & "'" & Fr & "',"
SQLstmt = SQLstmt & "'" & Su & "',"
SQLstmt = SQLstmt & "'" & Co & "',"
SQLstmt = SQLstmt & "'" & Ti & "'"
SQLstmt = SQLstmt & ")"

set RS = objConn.Execute(SQLstmt)
objConn.Close

Set RS = Nothing
Set objConn = Nothing

response.write("<BR><CENTER>")
response.write("Thank you!</CENTER><BR><BR>")

ELSE
%>
<center>
<img src="http://www.team-cobalt.com/images/headnews.jpg">
<Body background="http://www.team-cobalt.com/images/tcbg.jpg">
<form method="POST" action="signgb.asp">
<table border="1" width="500" bgcolor="lightblue" bordercolor=cyan cellpadding="0" cellspacing="1">
    <tr>
      <td>
        <table border="0" width="500" bgcolor="skyblue" align="center">
          <tr>
            <td width="25%" align="right" bordercolor="#663333"><b><font >Poster: </font></b>&nbsp;
            </td>
            <td width="75%">
              <input type="text" name="From" size="25">
            </td>
          </tr>
          <tr>
            <td width="25%" align="right"><b><font >Title: </font></b>&nbsp;
            </td>
            <td width="75%">
              <input type="text" name="Subject" size="25">
            </td>
          </tr>
          <tr>
            <td width="25%" align="right" valign="top"><b><font >News: </font></b>&nbsp;
            </td>
            <td width="75%">
              <textarea name="Comment" cols=25 rows=5 WRAP=SOFT></textarea>
            </td>
          </tr>
          <tr>
            <td height="60" align="right" colspan="2">
              <p align="center">
                <input type="hidden" value="OK" name="Flag">
                <input type="submit" value="Submit" name="submit">
                <input type="reset" value="Reset" name="reset">
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  </form>
<% END IF %>
<CENTER>
<table border="1" width="500" bgcolor="skyblue" bordercolor=cyan cellpadding="0" cellspacing="1">
<tr><td><a href="viewgb.asp"><center>View News</a>
 <b> ::: </b>
<a href="signgb.asp">Add News</a>
</CENTER>

</body>
</html>

is there a an easy way to make an Authorization code for this.... like make a new <input type=text name=auth size=25> and then have a part of this script only allow the script to work if it has the right auth code?? please help me... this is a modded guestbook that i turned into a news thing... check it out at www.team-cobalt.com/news/viewgb.asp

Back to Top
Zeffy View Drop Down
Groupie
Groupie


Joined: 19 February 2003
Location: United States
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote Zeffy Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2003 at 5:51pm

hey



Edited by Zeffy
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.