home *** CD-ROM | disk | FTP | other *** search
/ ftp.sunet.sepub/pictures / 2014.11.ftp.sunet.se-pictures.tar / ftp.sunet.se / pub / pictures / ACiD-artpacks / www / mirrors / acheron / cgi-bin / show_Channels.cgi < prev    next >
Text File  |  1999-02-20  |  12KB  |  233 lines

  1. #!/usr/bin/perl
  2.  
  3. require ("cgi-lib.pl") or die "Could not open or find cgi-lib.pl\n";
  4.  
  5. # declare variables
  6. $current_ip = "nothing";
  7.  
  8. $filename = "channels.txt";
  9.  
  10. # call initial functions
  11. &Get_request_types;
  12. &Analyse_file;
  13.  
  14. #########################################################################
  15.  
  16. sub Get_request_types {
  17.         
  18. &ReadParse(*input);
  19. $chan_cat = ($input{'Category'});
  20.  
  21. }
  22.  
  23. #########################################################################
  24.  
  25. sub Analyse_file {
  26.  
  27. print &Header;
  28. print &Top("test");
  29. $output = "STDOUT";
  30. print $output "<p><font size=4><b>$chan_cat</b></font><p>";
  31.  
  32. open (LOGFILE, "<channels.txt") || die "Could not open or find $filename\n";
  33.  
  34.     foreach $line (<LOGFILE>) {
  35.     ($category, $name, $server, $desc) = split(' : ', $line);
  36.  
  37.         if ($category eq $chan_cat) {
  38.             print $output "<B>$name ($server)</B><br>";
  39.             print $output "$desc<p>";
  40.         }
  41.     }
  42.  
  43.     &Bottom;
  44.     close(LOGFILE);
  45.  
  46. }
  47.  
  48. #########################################################################
  49.  
  50. #_____Module Returns the Output Document Type______#
  51. sub Header
  52. {
  53.         return "Content-type: text/html\n\n";
  54. }   
  55.  
  56. #_____Module Returns the Output Document Head_______#
  57. sub Top
  58. {
  59.         my ($title) = @_;
  60.         return <<"ENDPRINT";
  61.  
  62. <HTML>
  63. <TITLE>acheron.org // irc channels</TITLE>
  64. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  65. <META name="author" content="dangermouse / design cubed">
  66. <META name="keywords" content="acheron, art, art scene, lit, literature, ansi, vga, hi rez, news, interviews, articles, australian, ice, acid, dangermouse, rgt, regurgitator, underground art scene, underground artscene, artscene, hirez, ascii, ansi art, ANSI, ANSI ART, ANSI art">
  67. <META name="description" content="acheron is an art scene web page dedicated to bringing the scene up to date information about groups, packs, and general happenings. Selections include: articles, files, gallery, news, interviews, biographies, irc, etc..">
  68.  
  69. </HEAD>
  70.  
  71. <BODY link="#FFCC00" vlink="#FF9900" alink="#FFFFFF" text="#cccccc" BGCOLOR="#000000">
  72. <base target="_top">
  73. <a name="top"></a> 
  74. <div align="center">
  75.   <table border="0" width="655" cellspacing="0" cellpadding="0">
  76.     <tr> 
  77.       <td valign="top" width="36" align="right"><img src="../images/left-2.gif" width="35" height="168" align="baseline" alt="acheron.org"><br>
  78.         <br>
  79.       </td>
  80.       <td width="618"> 
  81.         <table border="0" width="618" cellspacing="0" cellpadding="0" align="center">
  82.           <tr> 
  83.             <td width="131" valign="top" bgcolor="#660000" align="left"> <img src="../images/top-2.gif" width="131" height="74" alt="acheron.org"><br>
  84.               <img src="../images/mid-2.gif" width="131" height="94" alt="acheron.org"><br>
  85.               <table width="123" cellspacing="0" cellpadding="0" border="0">
  86.                 <tr> 
  87.                   <td align="right" width="100%"> <font face="Arial, Helvetica, sans-serif" size="2"><b> 
  88.                     <font color="#FFFFFF">ACHERON.ORG</font></b></font><br>
  89.                     <font face="Arial, Helvetica, sans-serif" size="1">informing the underground art scene</font><br>
  90.                     <form name="mainOptions">
  91.                       <div align="right"> 
  92.                         <p><font size="2" face="Arial, Helvetica, sans-serif"><b>sections</b></font> 
  93.                           <br>
  94.                           <select name="select" onchange="top.location.href = document.mainOptions.select.options[document.mainOptions.select.options.selectedIndex].value">
  95.                             <option value="http://www.acheron.org/index.shtml">select</option>
  96.             <option value="http://www.acheron.org/index.shtml">home</option>
  97.                             <option value="http://www.acheron.org/artshop/artshop.shtml">art shop</option>
  98.                             <option value="http://www.acheron.org/articles/articles.shtml">articles</option>
  99.                             <option value="http://www.acheron.org/discussions/board.html">discussions</option>
  100.                             <option value="http://www.acheron.org/interviews/interviews.shtml">interviews</option>
  101.             <option value="http://www.acheron.org/channels/channels.shtml">irc channels</option>
  102.             <option value="http://www.acheron.org/links/links.shtml">links</option>
  103.                             <option value="http://www.acheron.org/news/news.shtml">news</option>
  104.             <option value="http://www.acheron.org/photos/photos.shtml">photos</option>
  105.                             <option value="http://www.acheron.org/reviews/reviews.shtml">reviews</option>
  106.                             <option value="http://www.acheron.org/tutes/tutes.shtml">tutorials</option>
  107.             <option value="http://www.acheron.org/index.shtml">----</option>
  108.                             <option value="http://www.acheron.org/search.shtml">search</option>
  109.                             <option value="http://www.acheron.org/staff.shtml">staff</option>
  110.                             <option value="http://www.acheron.org/submit.shtml">submit</option>
  111.                           </select>
  112.                       </div>
  113.                     </form>
  114.                     </td>
  115.                 </tr>
  116.               </table>
  117.               <br>
  118. <table width="123" cellspacing="0" cellpadding="0" border="0">
  119.                 <tr> 
  120.                   <td align="right" width="100%"> <font face="Arial, Helvetica, sans-serif" size="2"><b> 
  121.                     <font color="#FFFFFF">LATEST NEWS</font></b></font><br>
  122.                     <font face="Arial, Helvetica, sans-serif" size="1">Data not available, check <a href="http://www.acheron.org/index.shtml">front page</a></font>
  123. </td></tr></table><br>
  124. <table width="123" cellspacing="0" cellpadding="0" border="0">
  125.                 <tr> 
  126.                   <td align="right" width="100%"> <font face="Arial, Helvetica, sans-serif" size="2"><b> 
  127.                     <font color="#FFFFFF">LATEST PACKS</font></b></font><br>
  128.                     <font face="Arial, Helvetica, sans-serif" size="1">Data not available, check <a href="http://www.acheron.org/index.shtml">front page</a></font>
  129. </td></tr></table><br>
  130.  
  131.             </td>
  132.             <td width="8" valign="top" bgcolor="#330000"><img src="../images/blckfiller.gif" width="8" height="60"></td>
  133.             <td width="479" valign="top" bgcolor="#000000"> 
  134. <br>
  135.               <table border="0" width="470" align="center" cellspacing="0" cellpadding="0">
  136.                 <tr>
  137.                   <td width="5"> </td>
  138.                   <td width="465">
  139. <script language="javascript">    
  140.  
  141. <!--
  142.  
  143. var randHostNr = Math.round(Math.random() * 100);
  144.  
  145. if (randHostNr > 0 && randHostNr <= 25) { 
  146.     var filename = "element2.gif"; var banner_name = "element2"; var desc = "Element Design?"; 
  147. } else { 
  148.     if (randHostNr > 25 && randHostNr <= 50) { 
  149.          var filename = "hirez.gif"; var banner_name = "hirez"; var desc = "Hirez has the answers!"; 
  150.     } else { 
  151.         if (randHostNr > 50 && randHostNr <= 75) { 
  152.              var filename = "element.gif"; var banner_name = "element"; var desc = "Element Design - Fast. Affordable hosting packages..."; 
  153.         } else { 
  154.              var filename = "vtagban.gif"; var banner_name = "vtag"; var desc = "VTAG - Virtual Textmode Art Gallery"; 
  155.         }
  156.     }   
  157. }
  158.  
  159. code = '<table border="0" width="478" align="center" cellspacing="0" cellpadding="0"><tr><td width="478"><CENTER>';
  160. code +='<a href="http://www.acheron.org/cgi-bin/redir.cgi?Host=www.acheron.org&Banner_name=' + banner_name + '" target="_top">';
  161. code +='<img src="http://www.acheron.org/images/ads/' + filename + '" height=60 width=468 alt="' + desc + '"></a>';
  162. code +='<br><a href="http://www.acheron.org/cgi-bin/redir.cgi?Host=www.acheron.org&Banner_name=' + banner_name + '" target="_top"><font size=1 face=Arial>' + desc + '</font></a>';
  163. code +='<img src="http://www.acheron.org/cgi-bin/exposure.cgi?Host=www.acheron.org&Banner_name=' + banner_name + '" width=1 height=1 border=0><BR>';
  164. code +='</CENTER></td></tr></table>';
  165.  
  166. document.write(code);
  167.  
  168. //-->
  169.  
  170. </script>
  171. <p>
  172. <b><font size="4" face="Arial, Helvetica, sans-serif">irc channels<br>
  173.                     </font></b><font size="4" face="Arial, Helvetica, sans-serif"> 
  174.                     <font size="2"><a href="http://www.acheron.org"> acheron.org</a> 
  175.                     > <a href="/channels/channels.shtml">irc channels</a></font></font></td>
  176.                 </tr>
  177.               </table>
  178.               <br>
  179.               <table border="0" width="470" align="center" cellspacing="0" cellpadding="0">
  180.                 <tr> 
  181.                   <td width="5"> </td>
  182.                   <td width="465"> <font face="Arial, Helvetica, sans-serif" size="2">
  183.  
  184. ENDPRINT
  185. }
  186.  
  187. #_____Module Returns the Output Document Bottom______#
  188. sub Bottom
  189. {
  190.        
  191. $output = "STDOUT";
  192. print $output "</td></tr></table></td></tr></table></td><td width=1><img src=../artgallery/images/trans_dot.gif width=1 height=1></td></tr></table>";
  193. print $output "<table border=0 width=655 cellspacing=0 cellpadding=0><tr> ";
  194. print $output "<td valign=top width=36 align=right> </td><td width=618> ";
  195. print $output "<table border=0 width=618 cellspacing=0 cellpadding=0 align=center><tr> ";
  196. print $output "<td width=131 valign=top bgcolor=#660000 align=left> ";
  197. print $output "<img src=http://www.acheron.org/images/botside.gif width=131 height=17><br>";
  198. print $output "<table width=126 cellspacing=0 cellpadding=0 border=0><tr><td align=right width=100%> ";
  199. print $output "<form name=bottomOptions>";
  200. print $output "<b><font face=Arial, Helvetica, sans-serif size=2>sections</font></b><br>";
  201. print $output "<select name=\"select\" onchange=\"top.location.href = document.bottomOptions.select.options[document.bottomOptions.select.options.selectedIndex].value\">";
  202. print $output "<option value=http://www.acheron.org/index.shtml>select</option>";
  203. print $output "<option value=http://www.acheron.org/index.shtml>home</option>";
  204. print $output "<option value=http://www.acheron.org/artshop/artshop.shtml>art shop</option>";
  205. print $output "<option value=http://www.acheron.org/articles/articles.shtml>articles</option>";
  206. print $output "<option value=http://www.acheron.org/discussions/board.html>discussions</option>";
  207. print $output "<option value=http://www.acheron.org/interviews/interviews.shtml>interviews</option>";
  208. print $output "<option value=http://www.acheron.org/channels/channels.shtml>irc channels</option>";
  209. print $output "<option value=http://www.acheron.org/links/links.shtml>links</option>";
  210. print $output "<option value=http://www.acheron.org/news/news.shtml>news</option>";
  211. print $output "<option value=http://www.acheron.org/photos/photos.shtml>photos</option>";
  212. print $output "<option value=http://www.acheron.org/reviews/reviews.shtml>reviews</option>";
  213. print $output "<option value=http://www.acheron.org/tutes/tutes.shtml>tutorials</option>";
  214. print $output "<option value=http://www.acheron.org/index.shtml>----</option>";
  215. print $output "<option value=http://www.acheron.org/search.shtml>search</option>";
  216. print $output "<option value=http://www.acheron.org/staff.shtml>staff</option>";
  217. print $output "<option value=http://www.acheron.org/submit.shtml>submit</option>";
  218. print $output "</select></form><p> </p>";
  219. print $output "</td></tr></table></td>";
  220. print $output "<td width=8 bgcolor=#330000> </td><td width=478 valign=top bgcolor=#000000> ";
  221. print $output "<div align=center><br></div>";
  222. print $output "<table border=0 width=470 align=center cellspacing=0 cellpadding=0><tr> ";
  223. print $output "<td width=5> </td>";
  224. print $output "<td width=465><font face=Arial, Helvetica, sans-serif size=1>© copyright 1997-1999 <a href=mailto:acheron\@acheron.org>Dangermouse</a> aka ";
  225. print $output "<a href=mailto:darryllyons\@ozemail.com.au>Darryl Lyons</a><br><a href=http://www.acheron.org/staff.shtml>Staff</a> ";
  226. print $output "| <a href=http://www.acheron.org/link.shtml>Link to us</a> | <a href=http://www.acheron.org/other.shtml>Other sites</a>: ";
  227. print $output "<a href=http://www.acheron.org/><B>acheron.org</B></a> | <a href=http://www.hirez.org>hirez.org</a> | gamefreaks.com (coming) | ";
  228. print $output "<a href=http://www.acheron.org/jlh/>jlh</a>";
  229. print $output "</font> </td></tr></table>";
  230. print $output "</td></tr></table></td><td width=1><img src=../../images/trans_dot.gif width=1 height=1></td></tr></table>";
  231. print $output "</div></BODY></HTML>";
  232.  
  233. }