Ok... I'll bite... But I can't guarantee the no mischief part ;-)
Here's the beginning of a simple record editor.

<html>
 <head>
  <title>Simple UniObjects File Read</title>
 </head>
<body>
<h3>ASP UniObjects Item Display</h3>
<form action="?"  name="Testfrm" method=post>
 <table>
  <tr>
   <td>
    <table border=0>
     <tr><td>Server</td><td><input type=text name="server" value="<%=
request("server") %>"></td></tr>
     <tr><td>Account</td><td><input type=text name="account" value="<%=
request("account") %>"></td></tr>
    </table>
   </td>
   <td>
    <table border=0>
     <tr><td>UserName</td><td><input type=text name="user" value="<%=
request("user") %>"></td></tr>
     <tr><td>Password</td><td><input type=text name="pwd"
value=""></td></tr>
    </table>
   </td>
   <td>
    <table border=0>
     <tr><td>FileName</td><td><input type=text name="FileName" value="<%=
request("FileName") %>"></td></tr>
     <tr><td>ItemID</td><td><input type=text name="ItemID" value="<%=
request("ItemID") %>"></td></tr>
    </table>
   </td>
  </tr>
  <tr>
   <td align=center colspan=3>
    <table border=0>
     <tr><td>&nbsp;</td><td><input type=submit></td></tr>
    </table>
   </td>
  </tr>
 </table>
</form>


<%
  if request.form("server") <> "" then
     Dim Sess, Text
     Set Sess = CreateObject("Universe.session.1")  '     Universe.session.1
or
     Sess.HostName = request("server")
     Sess.UserName = request("user")
     Sess.AccountPath = request("account")
     Sess.Password = request("pwd")
     ' Now connect
     Sess.connect
     '
     if Sess.error then
     response.write "<SCRIPT LANGUAGE='JavaScript1.1'>"
     response.write "alert('Cannot connect to Database..." & Sess.ERROR &
"')"
     response.write "</SCRIPT>"
     response.write "<h1>[" & Sess.hostname & "] - Database Error</h1>"

     else
        '
        ' Setup and read the record
        '
     Set File = Sess.OpenFile(request("filename"))
     File.RecordId = request("ItemID")
     File.Read
     AMS = File.record.Count()
%>
<form>
<TEXTAREA Name=text COLS=80 ROWS=25>
<%
     '
     ' Display item in a text box
     '
     for AM = 1 to AMS
        response.write File.record.Field(AM) & vbcrlf
     next
%>
</TEXTAREA>
<%
     end if
  end if
%>

<br>
<br>
You can see how easily this could be modified to create an ASP file
editor.<br>
Of course another dangerous tool to allow public access with no encryption.
<br>
IMHO<br>
</body>
</html>

----- Original Message ----- 
From: "Wendy Smoak" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, February 15, 2005 5:38 PM
Subject: RE: [U2] UV to Web interface


> [EMAIL PROTECTED] wrote:
>
> > The example is just a way to get started.
>
> Okay, in my excitement that someone was posting an ASP example, I didn't
> look all that closely at it.
> http://www.pickwiki.com/cgi-bin/wiki.pl?SimpleASP
>
> Perhaps a 'safer' example is in order.  Instead of showing how to
> execute any colon prompt command, how about prompting for a filename and
> record ID, then reading and printing the contents of the record?
>
> Then at least someone who tries this out and loses interest, but leaves
> the example code on a public web server, won't be exposing his system to
> *quite* so much mischief.
>
> -- 
> Wendy Smoak
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to