Pincers (Public library of include files)

Classes

Checkout the code in the examples for technical explanations!

SelectList.class.asp

Take the pain out of creating dynamically generated select lists. SelectList.class.eg.asp

As in all the examples refer to the code for comments for further information!

XSLT.class.asp

The XSLT class facilitates XSL transformations in a few lines of code. This class also has the added benefit of caching the transformation object for additional speed.

XSLT.class.eg.asp

This is an example of how simple it can be to use the XSL Class, it uses an external BBC RSS news feed (a URL) for the XML file.

XSLT.class.eg2.asp

In this example I create a dynamic select list that pre selects option be passing parameters to the XSL template.

XSLT.class.eg3.asp

In this example i'm creating XML from a database. I'm using the RSxmlDom function in the MakeRS.fun.asp file to return a MSXML DOM Document Object containing the XML from a ADO Save. ADO produces crappy XML - so I'm going to clean it up with a XSL template.

SaveForm2XML.class.asp

This class facilitated the saving of HTML forms to XML. The XML can be saved to server memory (Session), the file system or be returned to your scripts as a stream (XML DOM). This is great for saving form info over multiple screens then adding all the user submissions on 1 processing page. Also handy for file system backups of captured user data.

example

Crypt.class.asp & SaveVar.class.asp

These classes facilitate saving variables as a string (and setting vars from that string) and encrypting (decrypting) strings. This is handy for storing login info in a cookie rather than a session (No more timeouts), or a dotnet type viewstate.

Crypt.class.eg.asp

validate.class.asp

This ASP validation class simplifies server side validation! As an added extra it will also generate client side JavaScript (saving server round trips).

validate.class.eg.asp

CreateRS.calss.asp

Being a lazy bastard I wrote this class to return a recordset and to automatically generate a status and navigation bar.

CreateRS.calss.eg.asp

emailReferer.class.asp

A class for generating a email a friend page.

emailReferer.class.eg.asp

Functions

MakeRS.fun.asp

Create a recordset in 1 line: (With ADOError catching)

Set rs_abc = MakeRS("SELECT Bla Bla", con_DBConnection)

This file also contains the functions:

Others

  1. CheckSafe.fun.asp - Stop SQL injection
  2. OrdinalSuffix.fun.asp - generate an ordinal suffix for an integer, 1st, 2nd, 3rd, etc.
  3. shell.fun.asp - Run a command on the server
  4. shortcuts.fun.asp - Lazy boy strikes again. Cant be asked to write Response.Write("nor me")? -use print("nice and quick") well as some others instead.
  5. URLDecode.fun.asp - Reverse a HTMLEncode
  6. global.templ.asp - Rename to global.config.asp use to set global variables