<% '''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '' Copyright 2004 by Robert Aung. '' '' All rights reserved. No part of this work may be '' reproduced, stored, or transmitted in any form, '' without prior written permission. '' '' Neither this page, nor any part of it, may be '' modified, copied, distributed, displayed, reproduced, '' published, licensed, sold, placed on a web site, '' or used to create derivitive works without the '' express written consent of the author. Any use '' of this page is subject to the terms of a license '' agreement with the author. '' '' To obtain a license for this software, contact the '' author at robert.aung@verizon.net. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Response.Buffer = True dim message dim file_upload_id, newpwd, magic file_upload_id = request.form("file_upload_id") newpwd = request.form("newpwd") magic = request.form("magic") if request.cookies("siteadmin") = "yes" then if len(file_upload_id) > 0 then dim cn, rs, cmd set cn = server.CreateObject("ADODB.Connection") set rs = server.CreateObject("ADODB.Recordset") set cmd = server.CreateObject("ADODB.Command") cn.ConnectionString = connectstring cn.Open if cn.State = 1 then dim newmagic Randomize newmagic = round(rnd * 10000) cmd.activeconnection = cn cmd.CommandText = _ "update file_upload_general set password = ?, magic = ? " & _ "where file_upload_id = ? and magic = ?" cmd(0) = newpwd cmd(1) = newmagic cmd(2) = file_upload_id cmd(3) = magic cmd.execute response.redirect "filelist-admin.asp" else message = "
There was an error connecting to the database server.

Please back up your browser and try again.
" end if rs.Close Set rs = Nothing else message = "
No file specified.

Please back up your browser and try again.
" end if else message = "
You are not allowed to administer this site.
" end if %> <%=message%>