Liberum Help Desk
The free, open source solution for the web-based help desk.

dodelete.asp - does anyone have the file or code please?

rated by 0 users
This post has 2 Replies | 4 Followers

Top 500 Contributor
Posts 1
Davewgill Posted: 08-06-2010 2:57 AM

I've a load of test tickets I want to delete but can't find the file online anywhere.  Did find the viewall.asp with come mods on the old forum but need the dodelete to ..ehh delete...

Many thanks....

Top 50 Contributor
Posts 6

I've found this code... not sure is what you're looking for.

 

<%@ LANGUAGE="VBScript" %>
<%
'Option Explicit
'Buffer the response, so Response.Expires can be used
Response.Buffer = TRUE
%>

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<!--
Liberum Help Desk, Copyright (C) 2000-2001 Doug Luxem
Liberum Help Desk comes with ABSOLUTELY NO WARRANTY
Please view the license.html file for the full GNU General Public License.

Filename: dodelete.asp
Date: $Date: 2005/01/15 23:49:20 $
Version: $Revision: 1.50.2.2.2.1 $
Purpose: This page deletes selected problem(s) for the rep or another selected rep.
-->

<!-- #include file = "../public.asp" -->
<%
Dim cnnDB, sid
Set cnnDB = CreateCon
sid = GetSid

%>

<head>
<link rel="stylesheet" type="text/css" href="../default.css">
</head>
<body>
<%
' Check if user has permissions for this page
Call CheckRep(cnnDB, sid)

' Determine if a rep_id has been entered by form or in the
' URL. If not, just query on the rep's own id.
Dim rep_id
if Len(Request.QueryString("rep_id")) > 0 Then
rep_id = Cint(Request.QueryString("rep_id"))
Elseif Len(Request.Form("rep_id")) > 0 Then
rep_id = Cint(Request.Form("rep_id"))
Else
rep_id = sid
End If
'_________________________________________________________________________________

Dim strDeleteList

strDeleteList = Request.Form("Delete")

If strDeleteList = "" Then
'No items to delete
Response.Write "Je hebt niets aangevinkt om te deleten!"
Else
'Open a connection to the database

listStr = "SELECT * FROM problems"

Set listRes = SQLQuery(cnnDB, listStr)

'Now, use the SQL set notation to delete all of the records
'specified by strDeleteList
Dim strSQL
strSQL = "DELETE FROM problems WHERE [id] IN (" & strDeleteList & ")"

cnnDB.Execute strSQL

'Clean up

cnnDB.Close


'Display to the user that the product have been deleted.

' Response.Write Request("Delete").Count & " problemen zijn verwijderd uit de database..."

End If

Response.Redirect("viewall.asp")

%>

Page 1 of 1 (3 items) | RSS
Copyright © Doug Luxem 2000-2010
Powered by Community Server (Non-Commercial Edition), by Telligent Systems