home *** CD-ROM | disk | FTP | other *** search
/ Internet 53 / INTERNET53.iso / pc / software / windows / building / adshark / adshark.exe / ADSHARK.ASP next >
Encoding:
Text File  |  1998-10-26  |  54.2 KB  |  1,195 lines

  1. <%@ LANGUAGE=JScript %>
  2.  
  3. <SCRIPT RUNAT="Server" Language="VBScript">
  4. Function vbBeforeToday(indate)
  5.     if DateDiff("d",indate,Date)>0 then
  6.         vbBeforeToday = true
  7.     else
  8.         vbBeforeToday = false
  9.     end if
  10. end function
  11.  
  12. Function vbStrComp(string1,string2)
  13.     If StrComp(string1, string2)=0 then
  14.         vbStrComp=true
  15.     else
  16.         vbStrComp=false
  17.     end if
  18. end function
  19.  
  20. Function vbBlank(string1)
  21.     If string1="" then
  22.         vbBlank=true
  23.     else
  24.         vbBlank=flase
  25.     end if
  26. end function
  27.  
  28. Function vbPrintDate(indate)
  29.     vbPrintDate=Day(indate)&"/"&month(indate)&"/"&year(indate)
  30. end function
  31. </script>
  32.  
  33. <%
  34.  
  35. ADSHARK_ASP_VERSION = "2.0.0";
  36.  
  37. if (!vbBlank(Request.QueryString("aid"))) {
  38.     adObj=Server.CreateObject("AdShark.Display");
  39.     adObj.ClickThru(Request.QueryString("aid"));
  40.     Response.End();
  41. }
  42.  
  43. if (Request.QueryString("show")=="docs") {
  44.     header();
  45.     docs();
  46.     footer();
  47.     Response.End();
  48. }
  49.  
  50. if (Request.QueryString("show")=="license") {
  51.     header();
  52.     license();
  53.     footer();
  54.     Response.End();
  55. }
  56.  
  57. objRegKey = Server.CreateObject("RegObj.Registry");
  58. objRegKey = objRegKey.RegKeyFromString("\\HKEY_LOCAL_MACHINE\\SOFTWARE\\OceanTek\\AdShark\\Data");
  59. connStr = objRegKey.Values.Item(1);
  60. objRegKey = "";
  61.     
  62. conn=Server.CreateObject("ADODB.Connection");
  63. adrs=Server.CreateObject("ADODB.Recordset");
  64. vsrs=Server.CreateObject("ADODB.Recordset");
  65. conn.Open(connStr);
  66. vsrs.Open("SELECT * FROM ServerTbl WHERE (rootpath='"+Server.MapPath("/")+"')",conn,3,3);
  67. if (vsrs.EOF) {
  68.     if (Request.Form("proc")=="addnew") {
  69.         if (!vbStrComp(Request.Form("pass1"),Request.Form("pass2"))) {
  70.             header();
  71.             showerror("The passwords you entered did not match.");
  72.             footer();
  73.             Response.End();
  74.         }
  75.         if (vbBlank(Request.Form("adminname")) || vbBlank(Request.Form("pass1"))) {
  76.             header();
  77.             showerror("You must enter an administrator name and password");
  78.             footer();
  79.             Response.End();
  80.         }
  81.         vsrs.AddNew();
  82.         vsrs("rootpath")=Server.MapPath("/");
  83.         vsrs("servername")=Request.ServerVariables("SERVER_NAME");
  84.         vsrs("adminuser")=Request.Form("adminname");
  85.         vsrs("adminpassword")=Request.Form("pass1");
  86.         vsrs("clickthrupath")=Request.ServerVariables("URL");
  87.         vsrs.Update();
  88.         header();
  89.         login();
  90.         footer();
  91.         Response.End();
  92.     }
  93.     header();
  94.     newserver();
  95.     footer();
  96.     Response.End();
  97. }
  98. if (Request.Form("proc")=="login") {
  99.     if (vbStrComp(Request.Form("adminuser"),vsrs("adminuser")) && vbStrComp(Request.Form("adminpassword"),vsrs("adminpassword"))) {
  100.         Session("adsharklogin")=vsrs("adminuser").value;
  101.     } else {
  102.         header();
  103.         showerror("The name and password you entered were incorrect.");
  104.         footer();
  105.         Response.End();
  106.     }
  107. }
  108. if (Session("adsharklogin")!=vsrs("adminuser")) {
  109.     header();
  110.     login();
  111.     footer();
  112.     Response.End();
  113. }
  114. if (Request.Form("proc")=="Confirm") {
  115.     adrs.Open("SELECT * FROM AdTbl WHERE (id = "+Request.Form("adcode")+")",conn,3,3,0x0001);
  116.     adrs.Delete();
  117.     adrs.Close();
  118.     adObj=Server.CreateObject("AdShark.Display");
  119.     adObj.LoadAdSharkData();
  120.     adObj="";
  121. }
  122. if (Request.Form("action")=="Add") {
  123.     header();
  124.     adinfo(0);
  125.     footer();
  126.     Response.End();
  127. }
  128. if (Request.Form("action")=="Edit") {
  129.     if (vbBlank(Request.Form("adcode"))) {
  130.         header();
  131.         showerror("You must select an ad to edit.");
  132.         footer();
  133.         Response.End();
  134.     } else {
  135.         header();
  136.         adinfo(Request.Form("adcode"));
  137.         footer();
  138.         Response.End();
  139.     }
  140. }
  141. if (Request.Form("action")=="Delete") {
  142.     if (vbBlank(Request.Form("adcode"))) {
  143.         header();
  144.         showerror("You must select an ad to delete.");
  145.         footer();
  146.         Response.End();
  147.     } else {
  148.         header();
  149.         deletead(Request.Form("adcode"));
  150.         footer();
  151.         Response.End();
  152.     }
  153. }
  154. if (Request.Form("action")=="Test") {
  155.     if (vbBlank(Request.Form("adcode"))) {
  156.         header();
  157.         showerror("You must select an ad to test.");
  158.         footer();
  159.         Response.End();
  160.     } else {
  161.         header();
  162.         adObj=Server.CreateObject("AdShark.Display");
  163.         adObj.TestAd(Request.Form("adcode"));
  164.         adObj="";
  165.         %><p>
  166.         <form action="adshark.asp" method="post">
  167.         <input type="submit" value="Done">
  168.         </form><%
  169.         footer();
  170.         Response.End();
  171.     }
  172. }
  173. if (Request.Form("action")=="Enter") {
  174.     if (vbBlank(Request.Form("adname"))) {
  175.         header();
  176.         showerror("You must enter a name for the ad");
  177.         footer();
  178.         Response.End();
  179.     }
  180.     if (isNaN(Request.Form("weight")) || (Request.Form("weight") <= 0)) {
  181.         header();
  182.         showerror("You must enter a positive number for display weight.");
  183.         footer();
  184.         Response.End();
  185.     }
  186.     if ((isNaN(Request.Form("width")) || (Request.Form("width") <= 0)) && !vbBlank(Request.Form("width"))) {
  187.         header();
  188.         showerror("You must enter a positive number for the banner width.");
  189.         footer();
  190.         Response.End();
  191.     }
  192.     if ((isNaN(Request.Form("height")) || Request.Form("height") <= 0) && !vbBlank(Request.Form("height"))) {
  193.         header();
  194.         showerror("You must enter a positive number for the banner height.");
  195.         footer();
  196.         Response.End();
  197.     }
  198.     if ((isNaN(Request.Form("border")) || Request.Form("border") < 0) && !vbBlank(Request.Form("border"))) {
  199.         header();
  200.         showerror("You must enter a positive number or zero for the banner border.");
  201.         footer();
  202.         Response.End();
  203.     }
  204.     if ((Request.Form("limit")=="clicks" && vbBlank(Request.Form("clickstogo"))) || Request.Form("clickstogo") < 0 || isNaN(Request.Form("clickstogo"))) {
  205.         header();
  206.         showerror("You must enter a positive number, or zero, in the clicks to go field.");
  207.         footer();
  208.         Response.End();
  209.     }
  210.     if (Request.Form("limit")=="clicks" && Request.Form("type")=="code") {
  211.         header();
  212.         showerror("You may not limit a code ad by a number of clicks.");
  213.         footer();
  214.         Response.End();
  215.     }    if ((Request.Form("limit")=="display" && vbBlank(Request.Form("displaystogo"))) || Request.Form("displaystogo") < 0 || isNaN(Request.Form("displaystogo"))) {
  216.         header();
  217.         showerror("You must enter a positive number, or zero, in the displays to go field.");
  218.         footer();
  219.         Response.End();
  220.     }
  221.     lastdate=new Date(Request.Form("lastdate"));
  222.     if ((vbBlank(Request.Form("lastdate")) && Request.Form("limit")=="date") || (isNaN(lastdate) && !vbBlank(Request.Form("lastdate")))) {
  223.         header();
  224.         showerror("You did not enter a properly formatted date into the 'last date' field.");
  225.         footer();
  226.         Response.End();
  227.     }
  228.     if (Request.Form("type")!="code" && Request.Form("type")!="image") {
  229.         header();
  230.         showerror("You must choose an ad type, either 'image' or 'code'.");
  231.         footer();
  232.         Response.End();
  233.     }
  234.     if (Request.Form("adcode")==0) {
  235.         adrs.Open("SELECT * FROM AdTbl",conn,3,3,0x0001);
  236.         adrs.AddNew();
  237.     } else {
  238.         adrs.Open("SELECT * FROM AdTbl WHERE (id = "+Request.Form("adcode")+")",conn,3,3,0x0001);
  239.         if (adrs.EOF) {
  240.             header();
  241.             showerror("A database error occured.");
  242.             footer();
  243.             Response.End();
  244.         }
  245.     }
  246.     adrs("adname")=Request.Form("adname");
  247.     if (!vbBlank(Request.Form("category"))) adrs("category")=Request.Form("category"); else adrs("category")=null;
  248.     if (!vbBlank(Request.Form("logfile"))) adrs("logfile")=Request.Form("logfile"); else adrs("logfile")=null;
  249.     if (!vbBlank(Request.Form("weight"))) adrs("weight")=Request.Form("weight"); else adrs("weight")=null;
  250.     if (!vbBlank(Request.Form("type"))) adrs("type")=Request.Form("type"); else adrs("type")=null;
  251.     if (!vbBlank(Request.Form("src"))) adrs("src")=Request.Form("src"); else adrs("src")=null;
  252.     if (!vbBlank(Request.Form("href"))) adrs("href")=Request.Form("href"); else adrs("href")=null;
  253.     if (!vbBlank(Request.Form("height"))) adrs("height")=Request.Form("height"); else adrs("height")=null;
  254.     if (!vbBlank(Request.Form("width"))) adrs("width")=Request.Form("width"); else adrs("width")=null;
  255.     if (!vbBlank(Request.Form("border"))) adrs("border")=Request.Form("border"); else adrs("border")=null;
  256.     if (!vbBlank(Request.Form("alt"))) adrs("alt")=Request.Form("alt"); else adrs("alt")=null;
  257.     if (!vbBlank(Request.Form("html"))) adrs("html")=Request.Form("html"); else adrs("html")=null;
  258.     if (!vbBlank(Request.Form("displaystogo"))) adrs("displaystogo")=Request.Form("displaystogo"); else adrs("displaystogo")=null;
  259.     if (!vbBlank(Request.Form("clickstogo"))) adrs("clickstogo")=Request.Form("clickstogo"); else adrs("clickstogo")=null;
  260.     if (!vbBlank(Request.Form("lastdate"))) adrs("lastdate")=Request.Form("lastdate"); else adrs("lastdate")=null;
  261.     if (Request.Form("limit")=="display") adrs("displimit")=true; else adrs("displimit")=false;
  262.     if (Request.Form("limit")=="clicks") adrs("clicklimit")=true; else adrs("clicklimit")=false;
  263.     if (Request.Form("clickthru")=="yes") adrs("clickthru")=true; else adrs("clickthru")=false;
  264.     if (Request.Form("limit")=="date") adrs("datelimit")=true; else adrs("datelimit")=false;
  265.     adrs("serverid")=vsrs("id");
  266.     adrs.Update();
  267.     adrs.Close();
  268.     adObj=Server.CreateObject("AdShark.Display");
  269.     adObj.LoadAdSharkData();
  270.     adObj="";
  271. }
  272. header();
  273. main();
  274. footer();
  275. Response.End();
  276.  
  277. function header() {
  278. %>
  279. <HTML>
  280. <HEAD>
  281. <TITLE>AdShark Administrator</TITLE>
  282. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  283. </HEAD>
  284.  
  285. <BODY BGCOLOR="#FFFFFF" text="#000000" link="#000000" vlink="#000000">
  286. <table border="0" cellspacing="0" cellpadding="8">
  287.   <tr> 
  288.     <td bgcolor="#C5C57F" align="right" valign="top"> 
  289.       <p align="right"><font face="Arial, Helvetica, sans-serif"><b><font size="+1">AdShark</font></b></font></p>
  290.       <font face="Arial, Helvetica, sans-serif" size="-2"><b>
  291.       <div align="left">Resources 
  292.         <hr>
  293.         <a href="http://oceantek.com/adshark">Home Page</a> <font color="#CC0000">*</font><br>
  294.         <a href="adshark.asp?show=docs">Documentation</a><br>
  295.         <a href="adshark.asp?show=license">License</a><br>
  296.         <a href="http://oceantek.com/adshark/faq.html">FAQ</a> <font color="#CC0000">*</font><br>
  297.         </div>
  298.       <p align="right"><font color="#CC0000">*</font> = External link</p>
  299.       <p> </p>
  300.       
  301.       <div align="left">Version 
  302.         <hr align="left">
  303.       adshark.asp <%=ADSHARK_ASP_VERSION%><br>
  304.       adshark.dll <% adObj=Server.CreateObject("AdShark.Display");Response.Write(adObj.Version());adObj=""%>
  305.       </div></b></font> 
  306.     </td>
  307.     <td bgcolor="#7DB7C9" valign="top" width="450"> 
  308.       <p><font face="Arial, Helvetica, sans-serif"><b><font size="+1">Administrator</font></b></font></p>
  309. <%
  310. }
  311.  
  312. function footer() {
  313. %>
  314.     </td>
  315.   </tr>
  316.   <tr> 
  317.     <td bgcolor="#C5C57F" colspan="2" align="right"><font face="Arial, Helvetica, sans-serif" size="-2"><b>AdShark™ 
  318.       Copyright ©1998:OceanTek, Inc.</b></font> </td>
  319.   </tr>
  320. </table>
  321. </BODY>
  322. </HTML>
  323. <%
  324. }
  325.  
  326.  
  327. function showerror(theError) {
  328. %>
  329. <font face="Arial, Helvetica, sans-serif" size="-1"><p><%=theError%>
  330. <p>Push the 'back' button in your broswer to edit your entries and to try again.
  331. <%
  332. }
  333.  
  334.  
  335. function main() { 
  336. %>
  337.       <p><font face="Arial, Helvetica, sans-serif" size="-2"><b>Web Server: <%=vsrs("servername")%></b></font></p>
  338.       <form method="post" action="adshark.asp">
  339.       <input type="hidden" name="page" value="adinfo">
  340.         <p>
  341.           <select name="adcode" size="10">
  342.           <%
  343.           adrs.Open("SELECT * FROM AdTbl WHERE (serverid = "+vsrs("id")+") ORDER BY adname",conn,3,1,0x0001);
  344.  
  345.           while (!adrs.EOF) {
  346.               Response.Write("<option value=\""+adrs("id")+"\">");
  347.             Response.Write(adrs("adname"));
  348.             if (adrs("category").value!=null) Response.Write(" ["+adrs("category")+"] "); else Response.Write(" ["+adrs("type")+"] ");
  349.             Response.Write(adrs("weight"));
  350.             if (adrs("displimit")==true)
  351.                 if (adrs("displaystogo")==0) Response.Write(" - inactive");
  352.                 else Response.Write(" - "+adrs("displaystogo")+" displays to go");
  353.             if (adrs("clicklimit")==true)
  354.                 if (adrs("clickstogo")==0) Response.Write(" - inactive");
  355.                 else Response.Write(" - "+adrs("clickstogo")+" clicks to go");
  356.             if (adrs("datelimit")==true)
  357.                 if (vbBeforeToday(adrs("lastdate"))) Response.Write(" - inactive");
  358.                 else Response.Write(" - until "+vbPrintDate(adrs("lastdate")));
  359.             Response.Write("</option>");
  360.             adrs.MoveNext();
  361.           }
  362.           adrs.Close();
  363.           adrs="";
  364.           %>
  365.           </select>
  366.         </p>
  367.         <p> 
  368.           <input type="submit" name="action" value="Add">
  369.           <input type="submit" name="action" value="Edit">
  370.           <input type="submit" name="action" value="Test">
  371.           <input type="submit" name="action" value="Delete">
  372.         </p>
  373.       </form>
  374. <%
  375. }
  376.  
  377. function login() {
  378. %>
  379.     <font face="Arial, Helvetica, sans-serif" size="-1"><b>
  380.     <p><font size="-2">Please enter the administrator name and password to<br>
  381.     access the AdShark Administrator for <%=vsrs("servername")%></font></p>
  382.     </b>
  383.     <form method="post" action="adshark.asp">
  384.     <input type="hidden" name="proc" value="login">
  385.     <p>
  386.     Administrator name:<br>
  387.     <input type="Text" name="adminuser" maxlength="12" length="12">
  388.     <p>
  389.     Password:<br>
  390.     <input type="Password" name="adminpassword" maxlength="12" length="12">
  391.     <p>
  392.     <input type="submit" value="Enter">
  393.     </font></form></font>
  394. <%
  395. }
  396.  
  397.  
  398. function newserver() {
  399. %>
  400.     <font face="Arial, Helvetica, sans-serif" size="-2"><b>
  401.     <p>This web server, <%=Request.ServerVariables("SERVER_NAME")%>,
  402.     does not have an AdShark profile.</p>
  403.     <p>Fill in the information below to create one.</p>
  404.     </b>
  405.     <form method="post" action="adshark.asp">
  406.     <font size="-1">
  407.     <input type="hidden" name="proc" value="addnew">
  408.     <p>
  409.     Administrator name (up to 12 characters, case sensitive):<br>
  410.     <input type="Text" name="adminname" maxlength="12" length="12">
  411.     <p>
  412.     Password (up to 12 characters, case sensitive):<br>
  413.     <input type="Password" name="pass1" maxlength="12" length="12">
  414.     <p>
  415.     Password (type again to confirm):<br>
  416.     <input type="Password" name="pass2" maxlength="12" length="12">
  417.     <p>
  418.     <input type="submit" value="Create Profile">
  419.     </font></form></font>
  420. <%
  421. }
  422.  
  423. function adinfo(adcode) {
  424. %>
  425.       <form method="post" action="adshark.asp">
  426.       <input type="hidden" name="adcode" value="<%=adcode%>">
  427.       <%
  428.       if (adcode>0) {
  429.           adrs.Open("SELECT * FROM AdTbl WHERE (id = "+adcode+")",conn,3,1,0x0001);
  430.         val=true;
  431.       } else {
  432.           val=false;
  433.       }
  434.       %>
  435.         <table border="0" bgcolor="#7DB7C9">
  436.           <tr> 
  437.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Name</font></td>
  438.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  439.               <input type="text" name="adname" <% if(val && adrs("adname").value!=null) Response.Write("value=\""+adrs("adname")+"\""); %> size="30">
  440.             </font></td>
  441.           </tr>
  442.           <tr> 
  443.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Category</font></td>
  444.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  445.               <input type="text" name="category" <% if(val && adrs("category").value!=null) Response.Write("value=\""+adrs("category")+"\""); %> size="30">
  446.             </font></td>
  447.           </tr>
  448.           <tr> 
  449.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Log</font></td>
  450.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  451.               <input type="text" name="logfile" <% if(val && adrs("logfile").value!=null) Response.Write("value=\""+adrs("logfile")+"\""); %> size="30">
  452.             </font></td>
  453.           </tr>
  454.           <tr> 
  455.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Weight</font></td>
  456.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  457.               <input type="text" name="weight" <% if(val && adrs("weight").value!=null) Response.Write("value=\""+adrs("weight")+"\""); %> size="30">
  458.             </font></td>
  459.           </tr>
  460.           <tr> 
  461.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"><b>Image 
  462.               Ad </b> 
  463.               <input type="radio" name="type" value="image" <% if(val) if(adrs("type")=="image") Response.Write("checked");%>>
  464.             </font></td>
  465.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  466.               <hr>
  467.             </font></td>
  468.           </tr>
  469.           <tr> 
  470.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Src</font></td>
  471.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  472.               <input type="text" name="src" <% if(val && adrs("src").value!=null) Response.Write("value=\""+adrs("src")+"\""); %> size="30">
  473.             </font></td>
  474.           </tr>
  475.           <tr> 
  476.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Link</font></td>
  477.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  478.               <input type="text" name="href" <% if(val && adrs("href").value!=null) Response.Write("value=\""+adrs("href")+"\""); %> size="30">
  479.             </font></td>
  480.           </tr>
  481.           <tr> 
  482.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Height</font></td>
  483.             <td><font face="Arial, Helvetica, sans-serif" size="-1"> 
  484.               <input type="text" name="height" <% if(val && adrs("height").value!=null) Response.Write("value=\""+adrs("height")+"\""); %> size="12">
  485.             </font></td>
  486.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Width</font></td>
  487.             <td><font face="Arial, Helvetica, sans-serif" size="-1"> 
  488.               <input type="text" name="width" <% if(val && adrs("width").value!=null) Response.Write("value=\""+adrs("width")+"\""); %> size="12">
  489.             </font></td>
  490.           </tr>
  491.           <tr> 
  492.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Border</font></td>
  493.             <td><font face="Arial, Helvetica, sans-serif" size="-1"> 
  494.               <input type="text" name="border" <% if(val && adrs("border").value!=null) Response.Write("value=\""+adrs("border")+"\""); %> size="12">
  495.             </font></td>
  496.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">Alt</font></td>
  497.             <td><font face="Arial, Helvetica, sans-serif" size="-1"> 
  498.               <input type="text" name="alt" <% if(val && adrs("alt").value!=null) Response.Write("value=\""+adrs("alt")+"\""); %> size="12">
  499.             </font></td>
  500.           </tr>
  501.           <tr>
  502.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"> </font></td>
  503.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  504.               Track and log click-thrus - <input type="checkbox" name="clickthru" value="yes" <% if(val) if(adrs("clickthru")==true) Response.Write("checked");%>>
  505.             </font></td>
  506.           </tr>
  507.           <tr> 
  508.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"><b>Code 
  509.               Ad</b> 
  510.               <input type="radio" name="type" value="code" <% if(val) if(adrs("type")=="code") Response.Write("checked");%>>
  511.             </font></td>
  512.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  513.               <hr>
  514.             </font></td>
  515.           </tr>
  516.           <tr> 
  517.             <td align="right" valign="top"><font face="Arial, Helvetica, sans-serif" size="-1">HTML</font></td>
  518.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  519.               <textarea name="html" cols="30" rows="4"><% if(val && adrs("html").value!=null) Response.Write(adrs("html")); %></textarea>
  520.             </font></td>
  521.           </tr>
  522.           <tr> 
  523.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"> </font></td>
  524.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  525.               <hr>
  526.             </font></td>
  527.           </tr>
  528.           <tr> 
  529.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">
  530.               <b>Limit by </b><input type="radio" name="limit" value="display" <% if(val) if(adrs("displimit")==true) Response.Write("checked");%>>
  531.             </font></td>
  532.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  533.               <input type="text" name="displaystogo" <% if(val && adrs("displaystogo").value!=null) Response.Write("value=\""+adrs("displaystogo")+"\""); %> size="15">
  534.               displays</font></td>
  535.           </tr>
  536.           <tr> 
  537.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">
  538.               <input type="radio" name="limit" value="clicks" <% if(val) if(adrs("clicklimit")==true) Response.Write("checked");%>>
  539.             </font></td>
  540.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  541.               <input type="text" name="clickstogo" <% if(val && adrs("clickstogo").value!=null) Response.Write("value=\""+adrs("clickstogo")+"\""); %> size="15">
  542.               clicks (image ads only)</font></td>
  543.           </tr>
  544.           <tr> 
  545.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1">
  546.               <input type="radio" name="limit" value="date"  <% if(val) if(adrs("datelimit")==true) Response.Write("checked");%>>
  547.             </font></td>
  548.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  549.               <input type="text" name="lastdate" <% if(val && adrs("lastdate").value!=null) Response.Write("value=\""+vbPrintDate(adrs("lastdate"))+"\""); %> size="15">
  550.               date (month/day/year)</font></td>
  551.           </tr>
  552.           <tr> 
  553.             <td bgcolor="#7DB7C9" align="right"><font face="Arial, Helvetica, sans-serif" size="-1">
  554.               <input type="radio" name="limit" value="none"  <% if(val) if(adrs("displimit")==false && adrs("clicklimit")==false && adrs("datelimit")==false) Response.Write("checked");%>>
  555.             </font></td>
  556.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  557.               Unlimited</font></td>
  558.           </tr>
  559.           <tr> 
  560.             <td align="right"><font face="Arial, Helvetica, sans-serif" size="-1"> </font></td>
  561.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1"> 
  562.               <hr>
  563.             </font></td>
  564.           </tr>
  565.           <tr>
  566.             <td><font face="Arial, Helvetica, sans-serif" size="-1"> </font></td>
  567.             <td colspan="3"><font face="Arial, Helvetica, sans-serif" size="-1">
  568.               <input type="submit" name="action" value="Enter">
  569.               <input type="submit" name="action" value="Cancel">
  570.             </font></td>
  571.           </tr>
  572.         </table>
  573.       </form>
  574.       <% if (adcode>0) adrs.Close(); %>
  575. <%
  576. }
  577.  
  578. function deletead(adcode) {
  579.  
  580. adrs.Open("SELECT * FROM AdTbl WHERE (id = "+adcode+")",conn,3,1,0x0001);
  581. if (adrs.EOF) {
  582.     header();
  583.     showerror("A database error occured.");
  584.     footer();
  585.     Response.End();
  586. }
  587. %>
  588. <font face="Arial, Helvetica, sans-serif" size="-1">
  589.     <p>Are you sure you want to delete the ad information for:</p>
  590.     <p>
  591.     <form method="post" action="adshark.asp">
  592.     <input type="hidden" name="adcode" value="<%=adcode%>">
  593.     <p>Ad Name: <b><%=adrs("adname")%></b><br>
  594.     Category: <b><%=adrs("category")%></b>
  595.     <p>
  596.     Deleting the ad information will permanently remove it from<br>
  597.     the AdShark database (log files associated with the ad will<br>
  598.     still be available).
  599.     <p>
  600.     <input type="submit" name="proc" value="Confirm"> <input type="submit" name="proc" value="Cancel">
  601.     </font></form></font>
  602. <%
  603. adrs.Close();
  604. }
  605.  
  606. function docs() {
  607. %>
  608. <p><font face="Arial, Helvetica, sans-serif"><b><font size="+1">AdShark Documentation</font></b></font></p>
  609. <p><b><font face="Arial, Helvetica, sans-serif">Contents</font><font face="Arial, Helvetica, sans-serif" size="+1"><br>
  610.   </font></b><a href="#introduction">Introduction</a><br>
  611.   <a href="#requirements">Requirements</a><br>
  612.   <a href="#installation">Installation</a><br>
  613.   <a href="#registration">Entering Registration Information</a><br>
  614.   <a href="#preparing">Preparing Your Site</a><br>
  615.   <a href="#administrator">Using the AdShark Administrator</a><br>
  616.   - <a href="#creating">Creating or Editing an Ad</a><br>
  617.   - <a href="#deleting">Deleting an Ad</a><br>
  618.   - <a href="#testing">Testing an Ad</a><br>
  619.   <a href="#displaying">Displaying Ads on Your Site</a><br>
  620.   - <a href="#summary">Summary of AdShark Scripts</a><br>
  621.   <a href="#log">The AdShark Log Files</a><br>
  622.   <a href="#help">Where to Get Help</a></p>
  623. <p><font face="Arial, Helvetica, sans-serif"><b><a name="introduction"></a>Introduction</b></font></p>
  624. <p>AdShark is a complete web ad management system for active server page (ASP) 
  625.   based Internet and intranet sites.</p>
  626. <p>AdShark will randomly rotate all all types of advertisements (including GIF, 
  627.   animated GIF, HTML, DHTML and JAVA) in your site's ASP documents. You decide 
  628.   where the ads go in your layout by inserting a few lines of ASP, and AdShark 
  629.   does the rest. It can handle 'weighted' displays, where some ads get shown more 
  630.   frequently than others, and you can define 'categories' for ads that belong 
  631.   on certain pages or in different parts of your page layout. AdShark can also 
  632.   limit the number of times an ad is shown by displays, click-thrus or by date 
  633.   - and it can generate log files indicating the date, time and IP number of who 
  634.   saw or clicked on the ad.</p>
  635. <p>AdShark's log files, generated in W3C extended log file format, can be used 
  636.   for single ads, or shared between as many as you like - so you can provide each 
  637.   of your sponsors with a detailed report of their activity, without any extraneous 
  638.   information. And because the reports are in a standard web log format, you can 
  639.   load them into many web access statistics utilities to analyze usage and produce 
  640.   activity graphs.</p>
  641. <p>The password protected AdShark Administrator allows you to enter, edit, remove 
  642.   or test ads from any browser. The administrator also has built in support for 
  643.   virtual servers, so ISPs can perform one installation and allow multiple clients 
  644.   to access AdShark's features.</p>
  645. <p>AdShark is supported on Microsoft Internet Information Server (IIS) and Personal 
  646.   Web Server (PWS) version 4.0 or higher running on Windows NT Server, Windows 
  647.   NT Workstation or Windows 9x. AdShark may function on other server platforms 
  648.   that support ASP, however alternate configurations are not officially supported.</p>
  649. <p><font face="Arial, Helvetica, sans-serif"><b><a name="requirements"></a>Requirements</b></font></p>
  650. <p>AdShark can be used with Microsoft Internet Information Server 4.0 (or greater), 
  651.   Microsoft Personal Web Server 4.0 (or greater) and may also function with other 
  652.   ASP-enabled servers, although it is only officially supported on the Microsoft 
  653.   server family.</p>
  654. <p>If you have a previous version of Internet Information Server or Personal Web 
  655.   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>
  656. <p>You will also need Microsoft's Data Access Components 2.0 or higher and the 
  657.   Visual Basic 6 runtime files for portions of AdShark. These files are not included 
  658.   in the distribution because most AdShark users will probably have them already, 
  659.   and therefore not need to reinstall them. If you are sure that you need to install 
  660.   the files, or if you experience errors when running AdShark, they can be obtained 
  661.   from <a href="http://www.microsoft.com/data/mdac2.htm">http://www.microsoft.com/data/mdac2.htm</a> 
  662.   (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>, 
  663.   respectively.</p>
  664. <p>You will need to have your web server installed and running before you install 
  665.   and use AdShark. AdShark will not require significant resources beyond your 
  666.   web server's RAM, hard disk and processor needs (refer to your web server's 
  667.   documentation for its system requirements such as RAM, processor speed, etc.). 
  668. </p>
  669. <p><font face="Arial, Helvetica, sans-serif"><b><a name="installation"></a>Installation</b></font></p>
  670. <p>AdShark is distributed as a self-extracting installer. Running the AdShark.exe 
  671.   installer will set up the following files:</p>
  672. <table border="0" align="center" cellspacing="3" cellpadding="3" width="90%">
  673.   <tr> 
  674.     <td align="right" valign="top">adshark.dll</td>
  675.     <td align="right" valign="top">-</td>
  676.     <td>The main AdShark component library.</td>
  677.   </tr>
  678.   <tr> 
  679.     <td align="right" valign="top">adshark.asp</td>
  680.     <td align="right" valign="top">-</td>
  681.     <td>An ASP script that is used for both banner management and for logging 
  682.       and tracking click-thrus.</td>
  683.   </tr>
  684.   <tr> 
  685.     <td align="right" valign="top">adshark.mdb</td>
  686.     <td align="right" valign="top">-</td>
  687.     <td>A database file that AdShark uses to maintain settings and ad information</td>
  688.   </tr>
  689.   <tr> 
  690.     <td align="right" valign="top">adshkreg.exe</td>
  691.     <td align="right" valign="top">-</td>
  692.     <td>Used to activate the registered version of AdShark</td>
  693.   </tr>
  694.   <tr> 
  695.     <td align="right" valign="top">adshkdsn.exe</td>
  696.     <td align="right" valign="top">-</td>
  697.     <td>Can be used to change the location of the AdShark database</td>
  698.   </tr>
  699.   <tr> 
  700.     <td align="right" valign="top">license.txt</td>
  701.     <td align="right" valign="top">-</td>
  702.     <td>The AdShark license agreement</td>
  703.   </tr>
  704.   <tr> 
  705.     <td align="right" valign="top">docs.html</td>
  706.     <td align="right" valign="top">-</td>
  707.     <td>AdShark documentation (this file)</td>
  708.   </tr>
  709.   <tr>
  710.     <td align="right" valign="top">regobj.dll</td>
  711.     <td align="right" valign="top">-</td>
  712.     <td>A shared library (in the system directory)</td>
  713.   </tr>
  714. </table>
  715. <p align="left">During the installation, you will be prompted to choose the AdShark 
  716.   installation directory. The default is in you program files directory. If you 
  717.   choose a different location, you should make sure the directory<i><b> is not 
  718.   </b></i>under your web server root (usually C:\InetPub\wwwroot). This will prevent 
  719.   non-authorized users from viewing your ad information. You will also be prompted 
  720.   for the location of adshark.asp. This file <b><i>must</i></b> reside under your 
  721.   web root. Virtual server support is built into AdShark - just place a copy of 
  722.   adshark.asp under each virtual server (or place it in a shared virtual directory, 
  723.   such as /Scripts).</p>
  724. <p align="left">You can uninstall AdShark using the Add/Remove Programs control 
  725.   panel. </p>
  726. <p><font face="Arial, Helvetica, sans-serif"><b><a name="registration"></a>Entering 
  727.   Registration Information</b></font></p>
  728. <p>AdShark is distributed as shareware - after you first install, it will print 
  729.   a message under each ad indicating that AdShark is unregistered. To eliminate 
  730.   this message you will need to purchase an AdShark license from <a href="http://oceantek.com/adshark">http://oceantek.com/adshark</a>. 
  731. </p>
  732. <p>When you purchase a license, you will receive a serial number and registration 
  733.   key that is matched to your e-mail address. You must then enter the serial number, 
  734.   key and your e-mail address in the registration utility available under Start 
  735.   Menu -> Programs -> AdShark -> Register.</p>
  736. <p><font face="Arial, Helvetica, sans-serif"><b><a name="preparing"></a>Preparing 
  737.   Your Site</b></font></p>
  738. <p>Make sure that the server directory adshark.asp resides in, and any directory 
  739.   where .asp documents will use it, have ëScriptí or ëExecuteí permission set 
  740.   in your web server. Please see your web server documentation for information 
  741.   on these settings.</p>
  742. <p>Direct your browser (any browser will do) to adshark.asp on your web server. 
  743.   For example, if you installed adshark.asp as C:\inetpub\wwwroot\adshark.asp 
  744.   (the default), you would open <a href="http://www.yourwebserver.com/adshark.asp">http://www.yourwebserver.com/adshark.asp</a> 
  745.   in your browser.</p>
  746. <p>The first time you run the administrator, you will be prompted to enter an 
  747.   administrator username and password. This is essential as it will prevent unauthorized 
  748.   users from viewing or altering your ad information. Note that this is not a 
  749.   high security system. AdShark data is only as secure as the installation of 
  750.   Windows NT or 9x that you install it on!</p>
  751. <p>Once you have set the administration username and password, you can begin setting 
  752.   up your ads. Each time your return to the administrator, you will be prompted 
  753.   for your login information. </p>
  754. <p></p>
  755. <p></p>
  756. <p></p>
  757. <p></p>
  758. <p><i>Should you forget or need to alter your login information, you can open 
  759.   the file adshark.mdb directly using Microsoft Access or another ODBC compliant 
  760.   data access tool. The table ëServerTblí contains the login information for each 
  761.   server. Do not modify any of the fields other than ëadminuserí and ëadminpasswordí.</i></p>
  762. <p><i>If you move your site to a new directory on your web server, AdShark will 
  763.   not recognize it as the same site. To move your old ad settings to the new directory, 
  764.   find the entry for your site in 'ServerTbl' in the AdShark database and change 
  765.   the 'rootpath' field to match your site's new root directory location.</i></p>
  766. <p><font face="Arial, Helvetica, sans-serif"><b><a name="administrator"></a>Using 
  767.   the AdShark Administrator</b></font></p>
  768. <p>The AdShark administrator lists all the ads currently available, any categories 
  769.   you have assigned them to, their relative weight, and any display limitations. 
  770.   For example, a banner ad ëOceanTekí might have the following entry:</p>
  771. <blockquote>
  772.   <pre>OceanTek [banner] 400 ñ 21,950 displays to go
  773. ^         ^       ^     ^<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>
  774. </blockquote>
  775. <p>Using the buttons at the bottom of the AdShark you can add a new ad, edit an 
  776.   existing ad, delete an ad or test an ad.</p>
  777. <p>In addition, the administrator provides links to the AdShark home page, documentation, 
  778.   license and FAQ to provide easy access to those resources while your are using 
  779.   it. The versions of both adshark.asp and adshark.dll are also shown.</p>
  780. <p><font face="Arial, Helvetica, sans-serif"><b><font size="-1"><i><a name="creating"></a>Creating 
  781.   or Editing an Ad</i></font></b></font></p>
  782. <p>Creating a new ad or editing an ad brings up a page where you can set all of 
  783.   the adís parameters. All the parameters are described below, with indications 
  784.   when parameters are dependent on each other or are optional.</p>
  785. <div align="center">
  786.   <table border="0" cellspacing="3" cellpadding="3" width="90%">
  787.     <tr> 
  788.       <td align="right" valign="top">Name</td>
  789.       <td valign="top">-</td>
  790.       <td>Used in the AdShark administrator and in log files to identify the ad. 
  791.         The name is not used when actually displaying the ad to a web user.</td>
  792.     </tr>
  793.     <tr> 
  794.       <td align="right" valign="top">Category</td>
  795.       <td valign="top">-</td>
  796.       <td>(Optional) Can be used to create 'groups' of ads. For example, if you 
  797.         had a page layout where you wanted large banner ads in one area and smaller 
  798.         ads in another, you could put large ads in a 'banner' group and smaller 
  799.         ads in a 'badge' group.</td>
  800.     </tr>
  801.     <tr> 
  802.       <td align="right" valign="top">Log</td>
  803.       <td valign="top">-</td>
  804.       <td>(Optional) The location on your server where you would like the display 
  805.         and click log for the ad. If left blank, no log will be kept. The file 
  806.         should be described with a full path (e.g. C:\logs\adshark.log), and the 
  807.         file will be created if it does not exist. Multiple ads can share the 
  808.         same log, if desired. </td>
  809.     </tr>
  810.     <tr> 
  811.       <td align="right" valign="top">Weight</td>
  812.       <td valign="top">-</td>
  813.       <td>Used to indicate the relative display frequency of different ads. For 
  814.         example, if the weight of ad 'A' is 100, and the total weight of all the 
  815.         ads in the system put together is 1000, ad 'A' will be shown 10% of the 
  816.         time. If ad 'A' is also in a category whose weight total is 200, ad 'A' 
  817.         will be shown 50% of the time that that category is displayed.</td>
  818.     </tr>
  819.     <tr> 
  820.       <td align="right" valign="top"><nobr>Image Ad</nobr></td>
  821.       <td valign="top">-</td>
  822.       <td>Select this to make this ad an image ad. Image ads consist of a single 
  823.         GIF, animated GIF or JPEG that links to a single specific URL. You can 
  824.         log and limit both displays and clicks for image ads.</td>
  825.     </tr>
  826.     <tr> 
  827.       <td align="right" valign="top">Src</td>
  828.       <td valign="top">-</td>
  829.       <td>(Image only) The URL of the image file for the ad, e.g. '/ads/adpic.gif' 
  830.         or http://anotherserver/images/ad.jpeg</td>
  831.     </tr>
  832.     <tr> 
  833.       <td align="right" valign="top">Link</td>
  834.       <td valign="top">-</td>
  835.       <td>(Image only) The URL destination that the ad should link to, e.g. '/productinfo/prodA.htm' 
  836.         or 'http://anothercompany.com'</td>
  837.     </tr>
  838.     <tr> 
  839.       <td align="right" valign="top">Height</td>
  840.       <td valign="top">-</td>
  841.       <td>(Optional, image only) The vertical size, in pixels, that the ad image 
  842.         should appear in the browser. If left blank, the browser will determine 
  843.         the image size.</td>
  844.     </tr>
  845.     <tr> 
  846.       <td align="right" valign="top">Width</td>
  847.       <td valign="top">-</td>
  848.       <td>(Optional, image only) Like height, above, but for the horizontal size.</td>
  849.     </tr>
  850.     <tr> 
  851.       <td align="right" valign="top">Border</td>
  852.       <td valign="top">-</td>
  853.       <td>(Optional, image only) The border width around the image, in pixels. 
  854.         If you do not want a border around the image, enter 0 (zero) for the border.</td>
  855.     </tr>
  856.     <tr> 
  857.       <td align="right" valign="top">Log click-thrus</td>
  858.       <td valign="top">-</td>
  859.       <td valign="top">(Optional, image only) Record click-thrus in the log file, 
  860.         in addition to displays. This only works if you have specified a log, 
  861.         above.</td>
  862.     </tr>
  863.     <tr> 
  864.       <td align="right" valign="top">Code Ad</td>
  865.       <td valign="top">-</td>
  866.       <td valign="top">Select this option to make the ad a code ad. Code ads are 
  867.         useful for advertisements that are composed of blocks of HTML, Java applets, 
  868.         or banner and link exchanges.</td>
  869.     </tr>
  870.     <tr> 
  871.       <td align="right" valign="top">HTML</td>
  872.       <td valign="top">-</td>
  873.       <td valign="top">(Code only) The HTML to send to the browser when this ad 
  874.         is displayed.</td>
  875.     </tr>
  876.     <tr> 
  877.       <td align="right" valign="top">Limit by</td>
  878.       <td valign="top">-</td>
  879.       <td valign="top">Choose either unlimited, by displays, by click-thrus or 
  880.         by date. This determines when and if the ad will be removed from your 
  881.         rotation. Unlimited ads will never expire (although you can always change 
  882.         the setting manually or delete the ad), limit by displays or clicks will 
  883.         count down from the number you enter into the limit box, and limit by 
  884.         date will stop showing the ad after the specified date. Note that you 
  885.         can only limit by click-thrus</td>
  886.     </tr>
  887.   </table>
  888. </div>
  889. <p> </p>
  890. <p>When you have finished editing the ad parameters, click 'Enter' to enter them 
  891.   into the ad rotation. If you omitted any required parameters, you will receive 
  892.   an error message and be prompted to make corrections. If you would like to discard 
  893.   any changes you made, click 'Cancel'</p>
  894. <p><font face="Arial, Helvetica, sans-serif"><b><i><font size="-1"><a name="deleting"></a>Deleting 
  895.   an Ad</font></i></b></font></p>
  896. <p>To permanently delete an ad from the rotation, select it and then click the 
  897.   'Delete' button. You will be asked to confirm the deletion. Deleting an ad can 
  898.   not be undone, however it does not delete any log files or images referenced 
  899.   by the ad.</p>
  900. <p><font face="Arial, Helvetica, sans-serif" size="-1"><b><i><a name="testing"></a>Testing 
  901.   an Ad</i></b></font></p>
  902. <p>You can select an ad from the list and view it as it will appear in a browser 
  903.   by clicking the 'Test' button. This will not count against any display limits, 
  904.   not will it be logged.</p>
  905. <p><i>If you test an image ad that is limited by click-thrus, and then click on 
  906.   the test ad, your click will be counted. </i></p>
  907. <p><font face="Arial, Helvetica, sans-serif"><b><a name="displaying"></a>Displaying 
  908.   Ads on Your Site</b></font></p>
  909. <p>Once you have set up your ads in the administrator, you can start placing them 
  910.   on ASP pages on your site. Examples are given below in VBScript, but AdShark 
  911.   will work just as well with JScript.</p>
  912. <p>To display a single randomly selected ad (weighted by the 'weight' parameter), 
  913.   insert this code into your ASP page where you want it to appear:</p>
  914. <blockquote> 
  915.   <p><%<br>
  916.     Set adObj = Server.CreateObject("AdShark.Display")<br>
  917.     adObj.Ad<br>
  918.     Set adObj= Nothing<br>
  919.     %></p>
  920. </blockquote>
  921. <p>You can limit the randomly selected ad to any category by alternatively using:</p>
  922. <blockquote> 
  923.   <p><%<br>
  924.     Set adObj = Server.CreateObject("AdShark.Display")<br>
  925.     adObj.Category("category")<br>
  926.     Set adObj= Nothing<br>
  927.     %></p>
  928. </blockquote>
  929. <p>Where "category" is the category name you want to limit the display 
  930.   to.</p>
  931. <p>You can also call a specific ad by name (for example, if one of your sponsors 
  932.   paid you for a specific spot on your home page):</p>
  933. <blockquote> 
  934.   <p><%<br>
  935.     Set adObj = Server.CreateObject("AdShark.Display")<br>
  936.     adObj.AdName("theAd")<br>
  937.     Set adObj= Nothing<br>
  938.     %></p>
  939. </blockquote>
  940. <p>Where "theAd" is the name of the ad you wish to call.</p>
  941. <p>If you want to display more than one ad on a page, you should only call Server.CreateObject("AdShark.Display") 
  942.   once. For example, lets assume you've separated your ads into two categories, 
  943.   'banner' and 'badge'. You want to have a larger 'banner' ad at the top of the 
  944.   page, three 'badge' ads in a part of your layout, and then another random 'banner' 
  945.   ad at the bottom. You would include in your page (the HTML tags are included 
  946.   for illustrative purposes. What appears between <% and %> is the important 
  947.   code):</p>
  948. <blockquote>
  949.   <p><HTML><br>
  950.     ...<br>
  951.     </HEAD><br>
  952.     <BODY><br>
  953.     <%<br>
  954.     Set adObj = Server.CreateObject("AdShark.Display")<br>
  955.     adObj.Category("banner")<br>
  956.     %><br>
  957.     ...<br>
  958.     Some text and layout HTML<br>
  959.     ...<br>
  960.     <%<br>
  961.     adObj.Category("badge")<br>
  962.     %><br>
  963.     ...<br>
  964.     <%<br>
  965.     adObj.Category("badge")<br>
  966.     %><br>
  967.     ...<br>
  968.     <%<br>
  969.     adObj.Category("banner")<br>
  970.     adObj = Nothing<br>
  971.     %> <br>
  972.     </BODY><br>
  973.     </HTML></p>
  974. </blockquote>
  975. <p>Remember that AdShark will automatically not repeat an ad on a given ASP document 
  976.   until it has already cycled through the entire ad rotation for your site.</p>
  977. <p>If you have no ads in the rotation, or specify an ad by name or a category 
  978.   that does not exist, AdShark will do nothing. This is a feature, so you can 
  979.   use it in a production environment without worrying about error messages being 
  980.   displayed or interfering with your HTML layout.</p>
  981. <p><font face="Arial, Helvetica, sans-serif"><b><i><font size="-1"><a name="summary"></a>Summary 
  982.   of AdShark Scripts</font></i></b></font></p>
  983. <table border="0" width="90%" cellspacing="5" cellpadding="3">
  984.   <tr> 
  985.     <td><b>VBScript</b></td>
  986.     <td><b>JScript</b></td>
  987.     <td><b>What it Does</b></td>
  988.   </tr>
  989.   <tr> 
  990.     <td> 
  991.       <hr>
  992.     </td>
  993.     <td> 
  994.       <hr>
  995.     </td>
  996.     <td> 
  997.       <hr>
  998.     </td>
  999.   </tr>
  1000.   <tr>
  1001.     <td>Set adObj = Server.CreateObject ("AdShark.Display")</td>
  1002.     <td>adObj = Server.CreateObject ("AdShark.Display")</td>
  1003.     <td>Creates a new AdShark object for the current page.</td>
  1004.   </tr>
  1005.   <tr> 
  1006.     <td valign="top">Ad</td>
  1007.     <td valign="top">Ad()</td>
  1008.     <td valign="top">Displays a random ad from the site's ad rotation. Displays are weighted 
  1009.       by the 'weight' parameter.</td>
  1010.   </tr>
  1011.   <tr> 
  1012.     <td valign="top">Category("category")</td>
  1013.     <td valign="top">Category("category")</td>
  1014.     <td valign="top">Displays a random ad from "category". Displays are weighted 
  1015.       by the 'weight' parameter.</td>
  1016.   </tr>
  1017.   <tr> 
  1018.     <td valign="top">AdName("name")</td>
  1019.     <td valign="top">AdName("name")</td>
  1020.     <td valign="top">Displays a specific ad by the name listed in the administrator.</td>
  1021.   </tr>
  1022.   <tr> 
  1023.     <td valign="top">Set adObj = Nothing</td>
  1024.     <td valign="top">adObj = ""</td>
  1025.     <td valign="top">Releases the AdShark object. This is optional, but will increase performance 
  1026.       for busy sites.</td>
  1027.   </tr>
  1028. </table>
  1029. <p>Remember to enclose all your server-side scripting in <% and %>!</p>
  1030. <p><font face="Arial, Helvetica, sans-serif"><b><a name="log"></a>The AdShark 
  1031.   Log Files</b></font></p>
  1032. <p>AdShark can log individual ad displays and click-thus to a text file anywhere 
  1033.   you indicate on your server. The log file location is specified individually 
  1034.   for each ad in your rotation (see 'Creating or Editing an Ad' above). You need 
  1035.   not, however, use a different file for each ad. More than one ad can use the 
  1036.   same log file simultaneously. The logs are written in the W3C extended log file 
  1037.   format, with a few modifications from the standard to facilitate parsing them 
  1038.   with standard web site statistics tools. Many commercial and free tools exist 
  1039.   that can help you analyze the contents of the log files. A good starting point 
  1040.   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> 
  1041.   (WWW:Log Analysis Tools).</p>
  1042. <p>In the standard W3C format, each line would contain the URL of the document 
  1043.   a user requested. As we are interested in ads, and not actual web documents, 
  1044.   each line of an AdShark log file contains information about a single ad. The 
  1045.   ad is listed by the name you entered in the administrator (converting spaces 
  1046.   to underscore characters) preceded by either '/display/' or '/click/'. This 
  1047.   enables you to quickly look at display or click data individually in most log 
  1048.   analysis programs, as it mimics looking at site access statistics in two different 
  1049.   server directories. </p>
  1050. <p><font face="Arial, Helvetica, sans-serif"><b><a name="help"></a>Where to Get 
  1051.   Help</b></font></p>
  1052. <p>If you have difficulty using AdShark, please check for product or documentation 
  1053.   updates and FAQs on the AdShark home page at <a href="http://oceantek.com/adshark">http://oceantek.com/adshark</a>. 
  1054.   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>. 
  1055.   Be sure to include your serial number in the subject line of the message.</p>
  1056. <p><a href="adshark.asp">Back to the AdShark Administrator</a>
  1057. <%
  1058. }
  1059.  
  1060. function license() {
  1061. %>
  1062. <font face="Arial, Helvetica, sans-serif" size="-1">
  1063. OCEANTEK, INC. ADSHARK LICENSE AGREEMENT & LIMITED WARRANTY
  1064. <p>
  1065. This legal document is an agreement between you, the end user, 
  1066. and OceanTek, Inc. By installing the program files, scripts or 
  1067. documentation, you agree to be bound by the terms of the Software 
  1068. License and Limited Warranty. If you do not agree to the terms 
  1069. presented in this agreement, DO NOT OPEN OR INSTALL the product.
  1070. <p>
  1071. COPYRIGHT<br>
  1072. This Software is protected by the copyright laws of the United States 
  1073. and international copyright treaties. Unauthorized copying of the 
  1074. Software, including executable files, scripts and documentation either 
  1075. in their original or modified form, is expressly forbidden. You may 
  1076. be held legally responsible for any copyright infringement which has 
  1077. been encouraged or caused by the failure to abide by the terms of this 
  1078. License. This license and your right to use the product terminate 
  1079. automatically if you violate any part of this agreement. In the event of 
  1080. termination, you must immediately destroy all copies of the product or 
  1081. return them to OceanTek, Inc.
  1082. <p>
  1083. GRANT OF LICENSE
  1084. <p>
  1085. If you are using the Software free of charge, the following grant applies:
  1086. <p>
  1087. OceanTek, Inc. grants you a license to use its accompanying Software free 
  1088. of charge. You may not: modify, translate, reverse engineer, decompile, 
  1089. disassemble (except to the extent applicable laws specifically prohibit 
  1090. such restriction) the compiled executable code included in the Software; 
  1091. redistribute derivative works based on the Software; copy the Software;
  1092. rent, lease, transfer or otherwise transfer right to the Software; or remove 
  1093. any proprietary notices or labels on the Software. You are not entitled 
  1094. to product support or assistance.
  1095. <p>
  1096. If you have purchased a single domain license from OceanTek, Inc., the 
  1097. following grant applies:
  1098. <p>
  1099. Subject to payment of applicable license fees, OceanTek, Inc. hereby 
  1100. grants to you a license to use its accompanying Software product on 
  1101. one web site, defined as the collection of HTML documents, scripts, 
  1102. application and executable files accessible via HTTP on a single computer, 
  1103. and at a single network address (URL). You may use the Software on any 
  1104. number of pages or scripts within the single web site. The Software is 
  1105. licensed as a single product. Its component parts may not be separated 
  1106. for use on more than one web site. One back up copy of the Software may 
  1107. be made. You may not: permit other individuals to use the Software except 
  1108. under the terms listed above and any such use would be limited to the 
  1109. original single web site specified above; modify, translate, reverse 
  1110. engineer, decompile, disassemble (except to the extent applicable laws 
  1111. specifically prohibit such restriction) the compiled executable code 
  1112. included in the Software; redistribute derivative works based on the 
  1113. Software; copy the Software (except as specified above); rent, lease, 
  1114. transfer or otherwise transfer right to the Software; or remove any 
  1115. proprietary notices or labels on the Software. You are entitled to to
  1116. product support via electronic mail for issues pertaining to the installation,
  1117. setup and general use of the software, for a period of ninety (90) days from
  1118. the date of purchase.
  1119. <p>
  1120. If you have purchased a multiple domain, single server license from 
  1121. OceanTek, Inc., the following grant applies:
  1122. <p>
  1123. Subject to payment of applicable license fees, OceanTek, Inc. hereby 
  1124. grants to you a license to use its accompanying Software product on 
  1125. one web server, defined as the single physical server or personal computer
  1126. accessible via HTTP.   You may use the Software on any number of 
  1127. virtual domains, pages or scripts hosted on the single server. The Software 
  1128. is licensed as a single product. Its component parts may not be separated 
  1129. for use on more than one web site. One back up copy of the Software may 
  1130. be made. You may not: permit other individuals to use the Software except 
  1131. under the terms listed above and any such use would be limited to the 
  1132. original single web site specified above; modify, translate, reverse 
  1133. engineer, decompile, disassemble (except to the extent applicable laws 
  1134. specifically prohibit such restriction) the compiled executable code 
  1135. included in the Software; redistribute derivative works based on the 
  1136. Software; copy the Software (except as specified above); rent, lease, 
  1137. transfer or otherwise transfer right to the Software; or remove any 
  1138. proprietary notices or labels on the Software. You are entitled to to
  1139. product support via electronic mail for issues pertaining to the installation,
  1140. setup and general use of the software, for a period of ninety (90) days from
  1141. the date of purchase.
  1142. <p>
  1143. TERMINATION<br>
  1144. The license will terminate automatically if you fail to comply with the 
  1145. limitations described herein. On termination, you must destroy all copies 
  1146. of the Software and Documentation, or return them to OceanTek, Inc.
  1147. <p>
  1148. LIMITED WARRANTY
  1149. <p>
  1150. If you are using the Software free of charge, the following warranty applies:
  1151. <p>
  1152. OCEANTEK INC. MAKES NO WARRANTY EXPRESS OR IMPLIED, AS TO ANY 
  1153. MATTER WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTIBILITY 
  1154. OR FITNESS FOR A PARTICULAR PURPOSE. 
  1155. <p>
  1156. If you have purchased a single domain, or multiple domain, single server
  1157. license from OceanTek, Inc., the following warranty applies:
  1158. <p>
  1159. You assume all responsibility for the selection of the Software as 
  1160. appropriate to achieve the results you intend. Due to the complex nature 
  1161. of the computer Software, OceanTek, Inc. does not warrant that the 
  1162. Licensed Programs are completely error free, will operate without 
  1163. interruption, or are compatible with all equipment and Software 
  1164. configurations. You expressly assume all risk for use of the Software. 
  1165. Repair, replacement or refund (at the option of OceanTek, Inc.) is the 
  1166. exclusive remedy. If you have purchased a license, OceanTek, Inc. 
  1167. warrants that the Software shall perform substantially as described 
  1168. in its documentation for a period of thirty (30) days from the date of 
  1169. purchase. This Limited Warranty is void if the noncompliance has 
  1170. resulted from accident, abuse, neglect, or misapplication.<br>
  1171. <p>
  1172. LIMITATION OF LIABILITY<br>
  1173. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT, SHALL 
  1174. OCEANTEK, INC. OR ITS SUPPLIERS OR RESELLERS BE LIABLE TO YOU OR ANY 
  1175. OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL 
  1176. DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS 
  1177. OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND 
  1178. ALL OTHER COMMERCIAL DAMAGES OR LOSSES ARISING OUT OF THE USE OF OR 
  1179. INABILITY TO USE THE SOFTWARE, EVEN IF OCEANTEK INC. HAS BEEN ADVISED 
  1180. OF THE POSSIBILITY OF SUCH DAMAGES. Some states do not allow the exclusion 
  1181. or limitation of incidental or consequential damages, so this limitation 
  1182. may not apply to you.<br>
  1183. <p>
  1184. VENUE<br>
  1185. Each party submits to the jurisdiction and venue of any New York State 
  1186. or federal court generally serving the New York County area with respect 
  1187. to the subject matter of this license.
  1188. <p>
  1189. <a href="adshark.asp">Back to the AdShark Administrator</a>
  1190. </font>
  1191.  
  1192. <%
  1193. }
  1194.  
  1195. %>