home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1998-10-26 | 54.2 KB | 1,195 lines
<%@ LANGUAGE=JScript %> <SCRIPT RUNAT="Server" Language="VBScript"> Function vbBeforeToday(indate) if DateDiff("d",indate,Date)>0 then vbBeforeToday = true else vbBeforeToday = false end if end function Function vbStrComp(string1,string2) If StrComp(string1, string2)=0 then vbStrComp=true else vbStrComp=false end if end function Function vbBlank(string1) If string1="" then vbBlank=true else vbBlank=flase end if end function Function vbPrintDate(indate) vbPrintDate=Day(indate)&"/"&month(indate)&"/"&year(indate) end function </script> <% ADSHARK_ASP_VERSION = "2.0.0"; if (!vbBlank(Request.QueryString("aid"))) { adObj=Server.CreateObject("AdShark.Display"); adObj.ClickThru(Request.QueryString("aid")); Response.End(); } if (Request.QueryString("show")=="docs") { header(); docs(); footer(); Response.End(); } if (Request.QueryString("show")=="license") { header(); license(); footer(); Response.End(); } objRegKey = Server.CreateObject("RegObj.Registry"); objRegKey = objRegKey.RegKeyFromString("\\HKEY_LOCAL_MACHINE\\SOFTWARE\\OceanTek\\AdShark\\Data"); connStr = objRegKey.Values.Item(1); objRegKey = ""; conn=Server.CreateObject("ADODB.Connection"); adrs=Server.CreateObject("ADODB.Recordset"); vsrs=Server.CreateObject("ADODB.Recordset"); conn.Open(connStr); vsrs.Open("SELECT * FROM ServerTbl WHERE (rootpath='"+Server.MapPath("/")+"')",conn,3,3); if (vsrs.EOF) { if (Request.Form("proc")=="addnew") { if (!vbStrComp(Request.Form("pass1"),Request.Form("pass2"))) { header(); showerror("The passwords you entered did not match."); footer(); Response.End(); } if (vbBlank(Request.Form("adminname")) || vbBlank(Request.Form("pass1"))) { header(); showerror("You must enter an administrator name and password"); footer(); Response.End(); } vsrs.AddNew(); vsrs("rootpath")=Server.MapPath("/"); vsrs("servername")=Request.ServerVariables("SERVER_NAME"); vsrs("adminuser")=Request.Form("adminname"); vsrs("adminpassword")=Request.Form("pass1"); vsrs("clickthrupath")=Request.ServerVariables("URL"); vsrs.Update(); header(); login(); footer(); Response.End(); } header(); newserver(); footer(); Response.End(); } if (Request.Form("proc")=="login") { if (vbStrComp(Request.Form("adminuser"),vsrs("adminuser")) && vbStrComp(Request.Form("adminpassword"),vsrs("adminpassword"))) { Session("adsharklogin")=vsrs("adminuser").value; } else { header(); showerror("The name and password you entered were incorrect."); footer(); Response.End(); } } if (Session("adsharklogin")!=vsrs("adminuser")) { header(); login(); footer(); Response.End(); } if (Request.Form("proc")=="Confirm") { adrs.Open("SELECT * FROM AdTbl WHERE (id = "+Request.Form("adcode")+")",conn,3,3,0x0001); adrs.Delete(); adrs.Close(); adObj=Server.CreateObject("AdShark.Display"); adObj.LoadAdSharkData(); adObj=""; } if (Request.Form("action")=="Add") { header(); adinfo(0); footer(); Response.End(); } if (Request.Form("action")=="Edit") { if (vbBlank(Request.Form("adcode"))) { header(); showerror("You must select an ad to edit."); footer(); Response.End(); } else { header(); adinfo(Request.Form("adcode")); footer(); Response.End(); } } if (Request.Form("action")=="Delete") { if (vbBlank(Request.Form("adcode"))) { header(); showerror("You must select an ad to delete."); footer(); Response.End(); } else { header(); deletead(Request.Form("adcode")); footer(); Response.End(); } } if (Request.Form("action")=="Test") { if (vbBlank(Request.Form("adcode"))) { header(); showerror("You must select an ad to test."); footer(); Response.End(); } else { header(); adObj=Server.CreateObject("AdShark.Display"); adObj.TestAd(Request.Form("adcode")); adObj=""; %><p> <form action="adshark.asp" method="post"> <input type="submit" value="Done"> </form><% footer(); Response.End(); } } if (Request.Form("action")=="Enter") { if (vbBlank(Request.Form("adname"))) { header(); showerror("You must enter a name for the ad"); footer(); Response.End(); } if (isNaN(Request.Form("weight")) || (Request.Form("weight") <= 0)) { header(); showerror("You must enter a positive number for display weight."); footer(); Response.End(); } if ((isNaN(Request.Form("width")) || (Request.Form("width") <= 0)) && !vbBlank(Request.Form("width"))) { header(); showerror("You must enter a positive number for the banner width."); footer(); Response.End(); } if ((isNaN(Request.Form("height")) || Request.Form("height") <= 0) && !vbBlank(Request.Form("height"))) { header(); showerror("You must enter a positive number for the banner height."); footer(); Response.End(); } if ((isNaN(Request.Form("border")) || Request.Form("border") < 0) && !vbBlank(Request.Form("border"))) { header(); showerror("You must enter a positive number or zero for the banner border."); footer(); Response.End(); } if ((Request.Form("limit")=="clicks" && vbBlank(Request.Form("clickstogo"))) || Request.Form("clickstogo") < 0 || isNaN(Request.Form("clickstogo"))) { header(); showerror("You must enter a positive number, or zero, in the clicks to go field."); footer(); Response.End(); } if (Request.Form("limit")=="clicks" && Request.Form("type")=="code") { header(); showerror("You may not limit a code ad by a number of clicks."); footer(); Response.End(); } if ((Request.Form("limit")=="display" && vbBlank(Request.Form("displaystogo"))) || Request.Form("displaystogo") < 0 || isNaN(Request.Form("displaystogo"))) { header(); showerror("You must enter a positive number, or zero, in the displays to go field."); footer(); Response.End(); } lastdate=new Date(Request.Form("lastdate")); if ((vbBlank(Request.Form("lastdate")) && Request.Form("limit")=="date") || (isNaN(lastdate) && !vbBlank(Request.Form("lastdate")))) { header(); showerror("You did not enter a properly formatted date into the 'last date' field."); footer(); Response.End(); } if (Request.Form("type")!="code" && Request.Form("type")!="image") { header(); showerror("You must choose an ad type, either 'image' or 'code'."); footer(); Response.End(); } if (Request.Form("adcode")==0) { adrs.Open("SELECT * FROM AdTbl",conn,3,3,0x0001); adrs.AddNew(); } else { adrs.Open("SELECT * FROM AdTbl WHERE (id = "+Request.Form("adcode")+")",conn,3,3,0x0001); if (adrs.EOF) { header(); showerror("A database error occured."); footer(); Response.End(); } } adrs("adname")=Request.Form("adname"); if (!vbBlank(Request.Form("category"))) adrs("category")=Request.Form("category"); else adrs("category")=null; if (!vbBlank(Request.Form("logfile"))) adrs("logfile")=Request.Form("logfile"); else adrs("logfile")=null; if (!vbBlank(Request.Form("weight"))) adrs("weight")=Request.Form("weight"); else adrs("weight")=null; if (!vbBlank(Request.Form("type"))) adrs("type")=Request.Form("type"); else adrs("type")=null; if (!vbBlank(Request.Form("src"))) adrs("src")=Request.Form("src"); else adrs("src")=null; if (!vbBlank(Request.Form("href"))) adrs("href")=Request.Form("href"); else adrs("href")=null; if (!vbBlank(Request.Form("height"))) adrs("height")=Request.Form("height"); else adrs("height")=null; if (!vbBlank(Request.Form("width"))) adrs("width")=Request.Form("width"); else adrs("width")=null; if (!vbBlank(Request.Form("border"))) adrs("border")=Request.Form("border"); else adrs("border")=null; if (!vbBlank(Request.Form("alt"))) adrs("alt")=Request.Form("alt"); else adrs("alt")=null; if (!vbBlank(Request.Form("html"))) adrs("html")=Request.Form("html"); else adrs("html")=null; if (!vbBlank(Request.Form("displaystogo"))) adrs("displaystogo")=Request.Form("displaystogo"); else adrs("displaystogo")=null; if (!vbBlank(Request.Form("clickstogo"))) adrs("clickstogo")=Request.Form("clickstogo"); else adrs("clickstogo")=null; if (!vbBlank(Request.Form("lastdate"))) adrs("lastdate")=Request.Form("lastdate"); else adrs("lastdate")=null; if (Request.Form("limit")=="display") adrs("displimit")=true; else adrs("displimit")=false; if (Request.Form("limit")=="clicks") adrs("clicklimit")=true; else adrs("clicklimit")=false; if (Request.Form("clickthru")=="yes") adrs("clickthru")=true; else adrs("clickthru")=false; if (Request.Form("limit")=="date") adrs("datelimit")=true; else adrs("datelimit")=false; adrs("serverid")=vsrs("id"); adrs.Update(); adrs.Close(); adObj=Server.CreateObject("AdShark.Display"); adObj.LoadAdSharkData(); adObj=""; } header(); main(); footer(); Response.End(); function header() { %> <HTML> <HEAD> <TITLE>AdShark Administrator</TITLE> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </HEAD> <BODY BGCOLOR="#FFFFFF" text="#000000" link="#000000" vlink="#000000"> <table border="0" cellspacing="0" cellpadding="8"> <tr> <td bgcolor="#C5C57F" align="right" valign="top"> <p align="right"><font face="Arial, Helvetica, sans-serif"><b><font size="+1">AdShark</font></b></font></p> <font face="Arial, Helvetica, sans-serif" size="-2"><b> <div align="left">Resources <hr> <a href="http://oceantek.com/adshark">Home Page</a> <font color="#CC0000">*</font><br> <a href="adshark.asp?show=docs">Documentation</a><br> <a href="adshark.asp?show=license">License</a><br> <a href="http://oceantek.com/adshark/faq.html">FAQ</a> <font color="#CC0000">*</font><br> </div> <p align="right"><font color="#CC0000">*</font> = External link</p> <p> </p> <div align="left">Version <hr align="left"> adshark.asp <%=ADSHARK_ASP_VERSION%><br> adshark.dll <% adObj=Server.CreateObject("AdShark.Display");Response.Write(adObj.Version());adObj=""%> </div></b></font> </td> <td bgcolor="#7DB7C9" valign="top" width="450"> <p><font face="Arial, Helvetica, sans-serif"><b><font size="+1">Administrator</font></b></font></p> <% } function footer() { %> </td> </tr> <tr> <td bgcolor="#C5C57F" colspan="2" align="right"><font face="Arial, Helvetica, sans-serif" size="-2"><b>AdShark Copyright ©1998:OceanTek, Inc.</b></font> </td> </tr> </table> </BODY> </HTML> <% } function showerror(theError) { %> <font face="Arial, Helvetica, sans-serif" size="-1"><p><%=theError%> <p>Push the 'back' button in your broswer to edit your entries and to try again. <% } function main() { %> <p><font face="Arial, Helvetica, sans-serif" size="-2"><b>Web Server: <%=vsrs("servername")%></b></font></p> <form method="post" action="adshark.asp"> <input type="hidden" name="page" value="adinfo"> <p> <select name="adcode" size="10"> <% adrs.Open("SELECT * FROM AdTbl WHERE (serverid = "+vsrs("id")+") ORDER BY adname",conn,3,1,0x0001); while (!adrs.EOF) { Response.Write("<option value=\""+adrs("id")+"\">"); Response.Write(adrs("adname")); if (adrs("category").value!=null) Response.Write(" ["+adrs("category")+"] "); else Response.Write(" ["+adrs("type")+"] "); Response.Write(adrs("weight")); if (adrs("displimit")==true) if (adrs("displaystogo")==0) Response.Write(" - inactive"); else Response.Write(" - "+adrs("displaystogo")+" displays to go"); if (adrs("clicklimit")==true) if (adrs("clickstogo")==0) Response.Write(" - inactive"); else Response.Write(" - "+adrs("clickstogo")+" clicks to go"); if (adrs("datelimit")==true) if (vbBeforeToday(adrs("lastdate"))) Response.Write(" - inactive"); else Response.Write(" - until "+vbPrintDate(adrs("lastdate"))); Response.Write("</option>"); adrs.MoveNext(); } adrs.Close(); adrs=""; %> </select> </p> <p> <input type="submit" name="action" value="Add"> <input type="submit" name="action" value="Edit"> <input type="submit" name="action" value="Test"> <input type="submit" name="action" value="Delete"> </p> </form> <% } function login() { %> <font face="Arial, Helvetica, sans-serif" size="-1"><b> <p><font size="-2">Please enter the administrator name and password to<br> access the AdShark Administrator for <%=vsrs("servername")%></font></p> </b> <form method="post" action="adshark.asp"> <input type="hidden" name="proc" value="login"> <p> Administrator name:<br> <input type="Text" name="adminuser" maxlength="12" length="12"> <p> Password:<br> <input type="Password" name="adminpassword" maxlength="12" length="12"> <p> <input type="submit" value="Enter"> </font></form></font> <% } function newserver() { %> <font face="Arial, Helvetica, sans-serif" size="-2"><b> <p>This web server, <%=Request.ServerVariables("SERVER_NAME")%>, does not have an AdShark profile.</p> <p>Fill in the information below to create one.</p> </b> <form method="post" action="adshark.asp"> <font size="-1"> <input type="hidden" name="proc" value="addnew"> <p> Administrator name (up to 12 characters, case sensitive):<br> <input type="Text" name="adminname" maxlength="12" length="12"> <p> Password (up to 12 characters, case sensitive):<br> <input type="Password" name="pass1" maxlength="12" length="12"> <p> Password (type again to confirm):<br> <input type="Password" name="pass2" maxlength="12" length="12"> <p> <input type="submit" value="Create Profile"> </font></form></font> <% } function adinfo(adcode) { %> <form method="post" action="adshark.asp"> <input type="hidden" name="adcode" value="<%=adcode%>"> <% if (adcode>0) { adrs.Open("SELECT * FROM AdTbl WHERE (id = "+adcode+")",conn,3,1,0x0001); val=true; } else { val=false; } %> <table border="0" bgcolor="#7DB7C9"> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Name</font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="adname" <% if(val && adrs("adname").value!=null) Response.Write("value=\""+adrs("adname")+"\""); %> size="30"> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Category</font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="category" <% if(val && adrs("category").value!=null) Response.Write("value=\""+adrs("category")+"\""); %> size="30"> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Log</font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="logfile" <% if(val && adrs("logfile").value!=null) Response.Write("value=\""+adrs("logfile")+"\""); %> size="30"> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Weight</font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="weight" <% if(val && adrs("weight").value!=null) Response.Write("value=\""+adrs("weight")+"\""); %> size="30"> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"><b>Image Ad </b> <input type="radio" name="type" value="image" <% if(val) if(adrs("type")=="image") Response.Write("checked");%>> </font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <hr> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Src</font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="src" <% if(val && adrs("src").value!=null) Response.Write("value=\""+adrs("src")+"\""); %> size="30"> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Link</font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="href" <% if(val && adrs("href").value!=null) Response.Write("value=\""+adrs("href")+"\""); %> size="30"> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Height</font></td> <td><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="height" <% if(val && adrs("height").value!=null) Response.Write("value=\""+adrs("height")+"\""); %> size="12"> </font></td> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Width</font></td> <td><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="width" <% if(val && adrs("width").value!=null) Response.Write("value=\""+adrs("width")+"\""); %> size="12"> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Border</font></td> <td><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="border" <% if(val && adrs("border").value!=null) Response.Write("value=\""+adrs("border")+"\""); %> size="12"> </font></td> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Alt</font></td> <td><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="alt" <% if(val && adrs("alt").value!=null) Response.Write("value=\""+adrs("alt")+"\""); %> size="12"> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"> </font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> Track and log click-thrus - <input type="checkbox" name="clickthru" value="yes" <% if(val) if(adrs("clickthru")==true) Response.Write("checked");%>> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"><b>Code Ad</b> <input type="radio" name="type" value="code" <% if(val) if(adrs("type")=="code") Response.Write("checked");%>> </font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <hr> </font></td> </tr> <tr> <td align="right" valign="top"><font face="Arial, Helvetica, sans-serif" size="-1">HTML</font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <textarea name="html" cols="30" rows="4"><% if(val && adrs("html").value!=null) Response.Write(adrs("html")); %></textarea> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"> </font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <hr> </font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"> <b>Limit by </b><input type="radio" name="limit" value="display" <% if(val) if(adrs("displimit")==true) Response.Write("checked");%>> </font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="displaystogo" <% if(val && adrs("displaystogo").value!=null) Response.Write("value=\""+adrs("displaystogo")+"\""); %> size="15"> displays</font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="radio" name="limit" value="clicks" <% if(val) if(adrs("clicklimit")==true) Response.Write("checked");%>> </font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="clickstogo" <% if(val && adrs("clickstogo").value!=null) Response.Write("value=\""+adrs("clickstogo")+"\""); %> size="15"> clicks (image ads only)</font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="radio" name="limit" value="date" <% if(val) if(adrs("datelimit")==true) Response.Write("checked");%>> </font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="text" name="lastdate" <% if(val && adrs("lastdate").value!=null) Response.Write("value=\""+vbPrintDate(adrs("lastdate"))+"\""); %> size="15"> date (month/day/year)</font></td> </tr> <tr> <td bgcolor="#7DB7C9" align="right"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="radio" name="limit" value="none" <% if(val) if(adrs("displimit")==false && adrs("clicklimit")==false && adrs("datelimit")==false) Response.Write("checked");%>> </font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> Unlimited</font></td> </tr> <tr> <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"> </font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <hr> </font></td> </tr> <tr> <td><font face="Arial, Helvetica, sans-serif" size="-1"> </font></td> <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> <input type="submit" name="action" value="Enter"> <input type="submit" name="action" value="Cancel"> </font></td> </tr> </table> </form> <% if (adcode>0) adrs.Close(); %> <% } function deletead(adcode) { adrs.Open("SELECT * FROM AdTbl WHERE (id = "+adcode+")",conn,3,1,0x0001); if (adrs.EOF) { header(); showerror("A database error occured."); footer(); Response.End(); } %> <font face="Arial, Helvetica, sans-serif" size="-1"> <p>Are you sure you want to delete the ad information for:</p> <p> <form method="post" action="adshark.asp"> <input type="hidden" name="adcode" value="<%=adcode%>"> <p>Ad Name: <b><%=adrs("adname")%></b><br> Category: <b><%=adrs("category")%></b> <p> Deleting the ad information will permanently remove it from<br> the AdShark database (log files associated with the ad will<br> still be available). <p> <input type="submit" name="proc" value="Confirm"> <input type="submit" name="proc" value="Cancel"> </font></form></font> <% adrs.Close(); } function docs() { %> <p><font face="Arial, Helvetica, sans-serif"><b><font size="+1">AdShark Documentation</font></b></font></p> <p><b><font face="Arial, Helvetica, sans-serif">Contents</font><font face="Arial, Helvetica, sans-serif" size="+1"><br> </font></b><a href="#introduction">Introduction</a><br> <a href="#requirements">Requirements</a><br> <a href="#installation">Installation</a><br> <a href="#registration">Entering Registration Information</a><br> <a href="#preparing">Preparing Your Site</a><br> <a href="#administrator">Using the AdShark Administrator</a><br> - <a href="#creating">Creating or Editing an Ad</a><br> - <a href="#deleting">Deleting an Ad</a><br> - <a href="#testing">Testing an Ad</a><br> <a href="#displaying">Displaying Ads on Your Site</a><br> - <a href="#summary">Summary of AdShark Scripts</a><br> <a href="#log">The AdShark Log Files</a><br> <a href="#help">Where to Get Help</a></p> <p><font face="Arial, Helvetica, sans-serif"><b><a name="introduction"></a>Introduction</b></font></p> <p>AdShark is a complete web ad management system for active server page (ASP) based Internet and intranet sites.</p> <p>AdShark will randomly rotate all all types of advertisements (including GIF, animated GIF, HTML, DHTML and JAVA) in your site's ASP documents. You decide where the ads go in your layout by inserting a few lines of ASP, and AdShark does the rest. It can handle 'weighted' displays, where some ads get shown more frequently than others, and you can define 'categories' for ads that belong on certain pages or in different parts of your page layout. AdShark can also limit the number of times an ad is shown by displays, click-thrus or by date - and it can generate log files indicating the date, time and IP number of who saw or clicked on the ad.</p> <p>AdShark's log files, generated in W3C extended log file format, can be used for single ads, or shared between as many as you like - so you can provide each of your sponsors with a detailed report of their activity, without any extraneous information. And because the reports are in a standard web log format, you can load them into many web access statistics utilities to analyze usage and produce activity graphs.</p> <p>The password protected AdShark Administrator allows you to enter, edit, remove or test ads from any browser. The administrator also has built in support for virtual servers, so ISPs can perform one installation and allow multiple clients to access AdShark's features.</p> <p>AdShark is supported on Microsoft Internet Information Server (IIS) and Personal Web Server (PWS) version 4.0 or higher running on Windows NT Server, Windows NT Workstation or Windows 9x. AdShark may function on other server platforms that support ASP, however alternate configurations are not officially supported.</p> <p><font face="Arial, Helvetica, sans-serif"><b><a name="requirements"></a>Requirements</b></font></p> <p>AdShark can be used with Microsoft Internet Information Server 4.0 (or greater), Microsoft Personal Web Server 4.0 (or greater) and may also function with other ASP-enabled servers, although it is only officially supported on the Microsoft server family.</p> <p>If you have a previous version of Internet Information Server or Personal Web Server, you can obtain a free upgrade to version 4.0 or better at <a href="http://www.microsoft.com/msdownload/">http://www.microsoft.com/msdownload/</a></p> <p>You will also need Microsoft's Data Access Components 2.0 or higher and the Visual Basic 6 runtime files for portions of AdShark. These files are not included in the distribution because most AdShark users will probably have them already, and therefore not need to reinstall them. If you are sure that you need to install the files, or if you experience errors when running AdShark, they can be obtained from <a href="http://www.microsoft.com/data/mdac2.htm">http://www.microsoft.com/data/mdac2.htm</a> (you can download the typical install) and from <a href="http://support.microsoft.com/download/support/mslfiles/Vbrun60.exe">http://support.microsoft.com/download/support/mslfiles/Vbrun60.exe</a>, respectively.</p> <p>You will need to have your web server installed and running before you install and use AdShark. AdShark will not require significant resources beyond your web server's RAM, hard disk and processor needs (refer to your web server's documentation for its system requirements such as RAM, processor speed, etc.). </p> <p><font face="Arial, Helvetica, sans-serif"><b><a name="installation"></a>Installation</b></font></p> <p>AdShark is distributed as a self-extracting installer. Running the AdShark.exe installer will set up the following files:</p> <table border="0" align="center" cellspacing="3" cellpadding="3" width="90%"> <tr> <td align="right" valign="top">adshark.dll</td> <td align="right" valign="top">-</td> <td>The main AdShark component library.</td> </tr> <tr> <td align="right" valign="top">adshark.asp</td> <td align="right" valign="top">-</td> <td>An ASP script that is used for both banner management and for logging and tracking click-thrus.</td> </tr> <tr> <td align="right" valign="top">adshark.mdb</td> <td align="right" valign="top">-</td> <td>A database file that AdShark uses to maintain settings and ad information</td> </tr> <tr> <td align="right" valign="top">adshkreg.exe</td> <td align="right" valign="top">-</td> <td>Used to activate the registered version of AdShark</td> </tr> <tr> <td align="right" valign="top">adshkdsn.exe</td> <td align="right" valign="top">-</td> <td>Can be used to change the location of the AdShark database</td> </tr> <tr> <td align="right" valign="top">license.txt</td> <td align="right" valign="top">-</td> <td>The AdShark license agreement</td> </tr> <tr> <td align="right" valign="top">docs.html</td> <td align="right" valign="top">-</td> <td>AdShark documentation (this file)</td> </tr> <tr> <td align="right" valign="top">regobj.dll</td> <td align="right" valign="top">-</td> <td>A shared library (in the system directory)</td> </tr> </table> <p align="left">During the installation, you will be prompted to choose the AdShark installation directory. The default is in you program files directory. If you choose a different location, you should make sure the directory<i><b> is not </b></i>under your web server root (usually C:\InetPub\wwwroot). This will prevent non-authorized users from viewing your ad information. You will also be prompted for the location of adshark.asp. This file <b><i>must</i></b> reside under your web root. Virtual server support is built into AdShark - just place a copy of adshark.asp under each virtual server (or place it in a shared virtual directory, such as /Scripts).</p> <p align="left">You can uninstall AdShark using the Add/Remove Programs control panel. </p> <p><font face="Arial, Helvetica, sans-serif"><b><a name="registration"></a>Entering Registration Information</b></font></p> <p>AdShark is distributed as shareware - after you first install, it will print a message under each ad indicating that AdShark is unregistered. To eliminate this message you will need to purchase an AdShark license from <a href="http://oceantek.com/adshark">http://oceantek.com/adshark</a>. </p> <p>When you purchase a license, you will receive a serial number and registration key that is matched to your e-mail address. You must then enter the serial number, key and your e-mail address in the registration utility available under Start Menu -> Programs -> AdShark -> Register.</p> <p><font face="Arial, Helvetica, sans-serif"><b><a name="preparing"></a>Preparing Your Site</b></font></p> <p>Make sure that the server directory adshark.asp resides in, and any directory where .asp documents will use it, have ëScriptí or ëExecuteí permission set in your web server. Please see your web server documentation for information on these settings.</p> <p>Direct your browser (any browser will do) to adshark.asp on your web server. For example, if you installed adshark.asp as C:\inetpub\wwwroot\adshark.asp (the default), you would open <a href="http://www.yourwebserver.com/adshark.asp">http://www.yourwebserver.com/adshark.asp</a> in your browser.</p> <p>The first time you run the administrator, you will be prompted to enter an administrator username and password. This is essential as it will prevent unauthorized users from viewing or altering your ad information. Note that this is not a high security system. AdShark data is only as secure as the installation of Windows NT or 9x that you install it on!</p> <p>Once you have set the administration username and password, you can begin setting up your ads. Each time your return to the administrator, you will be prompted for your login information. </p> <p></p> <p></p> <p></p> <p></p> <p><i>Should you forget or need to alter your login information, you can open the file adshark.mdb directly using Microsoft Access or another ODBC compliant data access tool. The table ëServerTblí contains the login information for each server. Do not modify any of the fields other than ëadminuserí and ëadminpasswordí.</i></p> <p><i>If you move your site to a new directory on your web server, AdShark will not recognize it as the same site. To move your old ad settings to the new directory, find the entry for your site in 'ServerTbl' in the AdShark database and change the 'rootpath' field to match your site's new root directory location.</i></p> <p><font face="Arial, Helvetica, sans-serif"><b><a name="administrator"></a>Using the AdShark Administrator</b></font></p> <p>The AdShark administrator lists all the ads currently available, any categories you have assigned them to, their relative weight, and any display limitations. For example, a banner ad ëOceanTekí might have the following entry:</p> <blockquote> <pre>OceanTek [banner] 400 ñ 21,950 displays to go ^ ^ ^ ^<br>| | | display, click and date info<br>| | |<br>| | ad weight (relative display frequency)<br>| |<br>| ad category (if assigned, otherwise shows ad type)<br>|<br>ad name</pre> </blockquote> <p>Using the buttons at the bottom of the AdShark you can add a new ad, edit an existing ad, delete an ad or test an ad.</p> <p>In addition, the administrator provides links to the AdShark home page, documentation, license and FAQ to provide easy access to those resources while your are using it. The versions of both adshark.asp and adshark.dll are also shown.</p> <p><font face="Arial, Helvetica, sans-serif"><b><font size="-1"><i><a name="creating"></a>Creating or Editing an Ad</i></font></b></font></p> <p>Creating a new ad or editing an ad brings up a page where you can set all of the adís parameters. All the parameters are described below, with indications when parameters are dependent on each other or are optional.</p> <div align="center"> <table border="0" cellspacing="3" cellpadding="3" width="90%"> <tr> <td align="right" valign="top">Name</td> <td valign="top">-</td> <td>Used in the AdShark administrator and in log files to identify the ad. The name is not used when actually displaying the ad to a web user.</td> </tr> <tr> <td align="right" valign="top">Category</td> <td valign="top">-</td> <td>(Optional) Can be used to create 'groups' of ads. For example, if you had a page layout where you wanted large banner ads in one area and smaller ads in another, you could put large ads in a 'banner' group and smaller ads in a 'badge' group.</td> </tr> <tr> <td align="right" valign="top">Log</td> <td valign="top">-</td> <td>(Optional) The location on your server where you would like the display and click log for the ad. If left blank, no log will be kept. The file should be described with a full path (e.g. C:\logs\adshark.log), and the file will be created if it does not exist. Multiple ads can share the same log, if desired. </td> </tr> <tr> <td align="right" valign="top">Weight</td> <td valign="top">-</td> <td>Used to indicate the relative display frequency of different ads. For example, if the weight of ad 'A' is 100, and the total weight of all the ads in the system put together is 1000, ad 'A' will be shown 10% of the time. If ad 'A' is also in a category whose weight total is 200, ad 'A' will be shown 50% of the time that that category is displayed.</td> </tr> <tr> <td align="right" valign="top"><nobr>Image Ad</nobr></td> <td valign="top">-</td> <td>Select this to make this ad an image ad. Image ads consist of a single GIF, animated GIF or JPEG that links to a single specific URL. You can log and limit both displays and clicks for image ads.</td> </tr> <tr> <td align="right" valign="top">Src</td> <td valign="top">-</td> <td>(Image only) The URL of the image file for the ad, e.g. '/ads/adpic.gif' or http://anotherserver/images/ad.jpeg</td> </tr> <tr> <td align="right" valign="top">Link</td> <td valign="top">-</td> <td>(Image only) The URL destination that the ad should link to, e.g. '/productinfo/prodA.htm' or 'http://anothercompany.com'</td> </tr> <tr> <td align="right" valign="top">Height</td> <td valign="top">-</td> <td>(Optional, image only) The vertical size, in pixels, that the ad image should appear in the browser. If left blank, the browser will determine the image size.</td> </tr> <tr> <td align="right" valign="top">Width</td> <td valign="top">-</td> <td>(Optional, image only) Like height, above, but for the horizontal size.</td> </tr> <tr> <td align="right" valign="top">Border</td> <td valign="top">-</td> <td>(Optional, image only) The border width around the image, in pixels. If you do not want a border around the image, enter 0 (zero) for the border.</td> </tr> <tr> <td align="right" valign="top">Log click-thrus</td> <td valign="top">-</td> <td valign="top">(Optional, image only) Record click-thrus in the log file, in addition to displays. This only works if you have specified a log, above.</td> </tr> <tr> <td align="right" valign="top">Code Ad</td> <td valign="top">-</td> <td valign="top">Select this option to make the ad a code ad. Code ads are useful for advertisements that are composed of blocks of HTML, Java applets, or banner and link exchanges.</td> </tr> <tr> <td align="right" valign="top">HTML</td> <td valign="top">-</td> <td valign="top">(Code only) The HTML to send to the browser when this ad is displayed.</td> </tr> <tr> <td align="right" valign="top">Limit by</td> <td valign="top">-</td> <td valign="top">Choose either unlimited, by displays, by click-thrus or by date. This determines when and if the ad will be removed from your rotation. Unlimited ads will never expire (although you can always change the setting manually or delete the ad), limit by displays or clicks will count down from the number you enter into the limit box, and limit by date will stop showing the ad after the specified date. Note that you can only limit by click-thrus</td> </tr> </table> </div> <p> </p> <p>When you have finished editing the ad parameters, click 'Enter' to enter them into the ad rotation. If you omitted any required parameters, you will receive an error message and be prompted to make corrections. If you would like to discard any changes you made, click 'Cancel'</p> <p><font face="Arial, Helvetica, sans-serif"><b><i><font size="-1"><a name="deleting"></a>Deleting an Ad</font></i></b></font></p> <p>To permanently delete an ad from the rotation, select it and then click the 'Delete' button. You will be asked to confirm the deletion. Deleting an ad can not be undone, however it does not delete any log files or images referenced by the ad.</p> <p><font face="Arial, Helvetica, sans-serif" size="-1"><b><i><a name="testing"></a>Testing an Ad</i></b></font></p> <p>You can select an ad from the list and view it as it will appear in a browser by clicking the 'Test' button. This will not count against any display limits, not will it be logged.</p> <p><i>If you test an image ad that is limited by click-thrus, and then click on the test ad, your click will be counted. </i></p> <p><font face="Arial, Helvetica, sans-serif"><b><a name="displaying"></a>Displaying Ads on Your Site</b></font></p> <p>Once you have set up your ads in the administrator, you can start placing them on ASP pages on your site. Examples are given below in VBScript, but AdShark will work just as well with JScript.</p> <p>To display a single randomly selected ad (weighted by the 'weight' parameter), insert this code into your ASP page where you want it to appear:</p> <blockquote> <p><%<br> Set adObj = Server.CreateObject("AdShark.Display")<br> adObj.Ad<br> Set adObj= Nothing<br> %></p> </blockquote> <p>You can limit the randomly selected ad to any category by alternatively using:</p> <blockquote> <p><%<br> Set adObj = Server.CreateObject("AdShark.Display")<br> adObj.Category("category")<br> Set adObj= Nothing<br> %></p> </blockquote> <p>Where "category" is the category name you want to limit the display to.</p> <p>You can also call a specific ad by name (for example, if one of your sponsors paid you for a specific spot on your home page):</p> <blockquote> <p><%<br> Set adObj = Server.CreateObject("AdShark.Display")<br> adObj.AdName("theAd")<br> Set adObj= Nothing<br> %></p> </blockquote> <p>Where "theAd" is the name of the ad you wish to call.</p> <p>If you want to display more than one ad on a page, you should only call Server.CreateObject("AdShark.Display") once. For example, lets assume you've separated your ads into two categories, 'banner' and 'badge'. You want to have a larger 'banner' ad at the top of the page, three 'badge' ads in a part of your layout, and then another random 'banner' ad at the bottom. You would include in your page (the HTML tags are included for illustrative purposes. What appears between <% and %> is the important code):</p> <blockquote> <p><HTML><br> ...<br> </HEAD><br> <BODY><br> <%<br> Set adObj = Server.CreateObject("AdShark.Display")<br> adObj.Category("banner")<br> %><br> ...<br> Some text and layout HTML<br> ...<br> <%<br> adObj.Category("badge")<br> %><br> ...<br> <%<br> adObj.Category("badge")<br> %><br> ...<br> <%<br> adObj.Category("banner")<br> adObj = Nothing<br> %> <br> </BODY><br> </HTML></p> </blockquote> <p>Remember that AdShark will automatically not repeat an ad on a given ASP document until it has already cycled through the entire ad rotation for your site.</p> <p>If you have no ads in the rotation, or specify an ad by name or a category that does not exist, AdShark will do nothing. This is a feature, so you can use it in a production environment without worrying about error messages being displayed or interfering with your HTML layout.</p> <p><font face="Arial, Helvetica, sans-serif"><b><i><font size="-1"><a name="summary"></a>Summary of AdShark Scripts</font></i></b></font></p> <table border="0" width="90%" cellspacing="5" cellpadding="3"> <tr> <td><b>VBScript</b></td> <td><b>JScript</b></td> <td><b>What it Does</b></td> </tr> <tr> <td> <hr> </td> <td> <hr> </td> <td> <hr> </td> </tr> <tr> <td>Set adObj = Server.CreateObject ("AdShark.Display")</td> <td>adObj = Server.CreateObject ("AdShark.Display")</td> <td>Creates a new AdShark object for the current page.</td> </tr> <tr> <td valign="top">Ad</td> <td valign="top">Ad()</td> <td valign="top">Displays a random ad from the site's ad rotation. Displays are weighted by the 'weight' parameter.</td> </tr> <tr> <td valign="top">Category("category")</td> <td valign="top">Category("category")</td> <td valign="top">Displays a random ad from "category". Displays are weighted by the 'weight' parameter.</td> </tr> <tr> <td valign="top">AdName("name")</td> <td valign="top">AdName("name")</td> <td valign="top">Displays a specific ad by the name listed in the administrator.</td> </tr> <tr> <td valign="top">Set adObj = Nothing</td> <td valign="top">adObj = ""</td> <td valign="top">Releases the AdShark object. This is optional, but will increase performance for busy sites.</td> </tr> </table> <p>Remember to enclose all your server-side scripting in <% and %>!</p> <p><font face="Arial, Helvetica, sans-serif"><b><a name="log"></a>The AdShark Log Files</b></font></p> <p>AdShark can log individual ad displays and click-thus to a text file anywhere you indicate on your server. The log file location is specified individually for each ad in your rotation (see 'Creating or Editing an Ad' above). You need not, however, use a different file for each ad. More than one ad can use the same log file simultaneously. The logs are written in the W3C extended log file format, with a few modifications from the standard to facilitate parsing them with standard web site statistics tools. Many commercial and free tools exist that can help you analyze the contents of the log files. A good starting point to find them is through <a href="http://dir.yahoo.com/Business_and_Economy/Companies/Computers/Software/Internet/World_Wide_Web/Log_Analysis_Tools">Yahoo!</a> (WWW:Log Analysis Tools).</p> <p>In the standard W3C format, each line would contain the URL of the document a user requested. As we are interested in ads, and not actual web documents, each line of an AdShark log file contains information about a single ad. The ad is listed by the name you entered in the administrator (converting spaces to underscore characters) preceded by either '/display/' or '/click/'. This enables you to quickly look at display or click data individually in most log analysis programs, as it mimics looking at site access statistics in two different server directories. </p> <p><font face="Arial, Helvetica, sans-serif"><b><a name="help"></a>Where to Get Help</b></font></p> <p>If you have difficulty using AdShark, please check for product or documentation updates and FAQs on the AdShark home page at <a href="http://oceantek.com/adshark">http://oceantek.com/adshark</a>. If you are a registered user, you can get technical support via e-mail to <a href="mailto:adshark@oceantek.com">adshark@oceantek.com</a>. Be sure to include your serial number in the subject line of the message.</p> <p><a href="adshark.asp">Back to the AdShark Administrator</a> <% } function license() { %> <font face="Arial, Helvetica, sans-serif" size="-1"> OCEANTEK, INC. ADSHARK LICENSE AGREEMENT & LIMITED WARRANTY <p> This legal document is an agreement between you, the end user, and OceanTek, Inc. By installing the program files, scripts or documentation, you agree to be bound by the terms of the Software License and Limited Warranty. If you do not agree to the terms presented in this agreement, DO NOT OPEN OR INSTALL the product. <p> COPYRIGHT<br> This Software is protected by the copyright laws of the United States and international copyright treaties. Unauthorized copying of the Software, including executable files, scripts and documentation either in their original or modified form, is expressly forbidden. You may be held legally responsible for any copyright infringement which has been encouraged or caused by the failure to abide by the terms of this License. This license and your right to use the product terminate automatically if you violate any part of this agreement. In the event of termination, you must immediately destroy all copies of the product or return them to OceanTek, Inc. <p> GRANT OF LICENSE <p> If you are using the Software free of charge, the following grant applies: <p> OceanTek, Inc. grants you a license to use its accompanying Software free of charge. You may not: modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction) the compiled executable code included in the Software; redistribute derivative works based on the Software; copy the Software; rent, lease, transfer or otherwise transfer right to the Software; or remove any proprietary notices or labels on the Software. You are not entitled to product support or assistance. <p> If you have purchased a single domain license from OceanTek, Inc., the following grant applies: <p> Subject to payment of applicable license fees, OceanTek, Inc. hereby grants to you a license to use its accompanying Software product on one web site, defined as the collection of HTML documents, scripts, application and executable files accessible via HTTP on a single computer, and at a single network address (URL). You may use the Software on any number of pages or scripts within the single web site. The Software is licensed as a single product. Its component parts may not be separated for use on more than one web site. One back up copy of the Software may be made. You may not: permit other individuals to use the Software except under the terms listed above and any such use would be limited to the original single web site specified above; modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction) the compiled executable code included in the Software; redistribute derivative works based on the Software; copy the Software (except as specified above); rent, lease, transfer or otherwise transfer right to the Software; or remove any proprietary notices or labels on the Software. You are entitled to to product support via electronic mail for issues pertaining to the installation, setup and general use of the software, for a period of ninety (90) days from the date of purchase. <p> If you have purchased a multiple domain, single server license from OceanTek, Inc., the following grant applies: <p> Subject to payment of applicable license fees, OceanTek, Inc. hereby grants to you a license to use its accompanying Software product on one web server, defined as the single physical server or personal computer accessible via HTTP. You may use the Software on any number of virtual domains, pages or scripts hosted on the single server. The Software is licensed as a single product. Its component parts may not be separated for use on more than one web site. One back up copy of the Software may be made. You may not: permit other individuals to use the Software except under the terms listed above and any such use would be limited to the original single web site specified above; modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction) the compiled executable code included in the Software; redistribute derivative works based on the Software; copy the Software (except as specified above); rent, lease, transfer or otherwise transfer right to the Software; or remove any proprietary notices or labels on the Software. You are entitled to to product support via electronic mail for issues pertaining to the installation, setup and general use of the software, for a period of ninety (90) days from the date of purchase. <p> TERMINATION<br> The license will terminate automatically if you fail to comply with the limitations described herein. On termination, you must destroy all copies of the Software and Documentation, or return them to OceanTek, Inc. <p> LIMITED WARRANTY <p> If you are using the Software free of charge, the following warranty applies: <p> OCEANTEK INC. MAKES NO WARRANTY EXPRESS OR IMPLIED, AS TO ANY MATTER WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTIBILITY OR FITNESS FOR A PARTICULAR PURPOSE. <p> If you have purchased a single domain, or multiple domain, single server license from OceanTek, Inc., the following warranty applies: <p> You assume all responsibility for the selection of the Software as appropriate to achieve the results you intend. Due to the complex nature of the computer Software, OceanTek, Inc. does not warrant that the Licensed Programs are completely error free, will operate without interruption, or are compatible with all equipment and Software configurations. You expressly assume all risk for use of the Software. Repair, replacement or refund (at the option of OceanTek, Inc.) is the exclusive remedy. If you have purchased a license, OceanTek, Inc. warrants that the Software shall perform substantially as described in its documentation for a period of thirty (30) days from the date of purchase. This Limited Warranty is void if the noncompliance has resulted from accident, abuse, neglect, or misapplication.<br> <p> LIMITATION OF LIABILITY<br> TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT, SHALL OCEANTEK, INC. OR ITS SUPPLIERS OR RESELLERS BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF OCEANTEK INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Some states do not allow the exclusion or limitation of incidental or consequential damages, so this limitation may not apply to you.<br> <p> VENUE<br> Each party submits to the jurisdiction and venue of any New York State or federal court generally serving the New York County area with respect to the subject matter of this license. <p> <a href="adshark.asp">Back to the AdShark Administrator</a> </font> <% } %>