%
M_UAdd = fun_chkRight("Gallery","A")
if M_UAdd = 0 then %>
<% response.end
end if%>
<%
Function fixquotes(theString)
fixquotes = Replace(theString,"'","''")
End Function
EMsg = ""
heading = fixquotes(Trim(request.form("heading")))
if heading = "" Then EMsg = " * * Enter heading for photo gallery
"
imgname = fixquotes(Trim(request.form("imgname")))
display = fixquotes(Trim(request.form("display")))
if Trim(EMsg) = "" Then
logdate = date() & " " & time()
if EMsg = "" Then
con.BeginTrans
strSQL = "insert into photo_gallary (heading, imgname, display, logdate, updated) values ('" & heading & "', '" & imgname & "', '" & display & "', '" & logdate & "', '" & logdate & "')"
'response.write inserUser
con.Execute(strSQL)
set rs = Server.CreateObject("ADODB.Recordset")
strSQL="select top 1 galid from photo_gallary order by galid desc"
rs.Open strSQL, con, 3, 3
if not rs.EOF Then
galid = rs("galid")
end if
rs.Close
activity = "Gallery Added - " & galid
ActivityLog Session("loginId"), Session("userId"), "Gallary", "A", "photo_gallary", "galid", galid, activity, logdate, logdate
con.CommitTrans
end if
end if
set rs = nothing
con.Close
set con = nothing
if Trim(EMsg) = "" Then
Response.Redirect "galV.asp?id=" & Server.URLEncode(galid)
else
%>
| New Photo Gallery | |
| Your Form was not submitted. Please check & provide following details |
|
| <%=Trim(EMsg)%> | |