home *** CD-ROM | disk | FTP | other *** search
/ Child Computer / Child_Computer.iso / turath / Programs / _Files / cgi-bin / search_engine_turath.pl < prev   
Encoding:
Text File  |  2001-09-15  |  7.2 KB  |  259 lines

  1.  
  2. $server_url    = "http://www.turath.com";
  3.  
  4. @unwanted_files = ("Error(.*)html",
  5.  
  6.            "error(.*)html",
  7.            "Test(.*)html",
  8.            "Backup(.*)html",
  9.            "Feedback(.*)html",
  10.            "images(.*)html",
  11.            "image(.*)html",
  12.            "stats(.*)html",
  13.            "archive(.*)html");
  14. #
  15. # The following are routines that print the HTML code related to
  16. # various parts of the program.  You can edit the cosmetics of the
  17. # program by altering the code below.  This means you can alter
  18. # the cosmetics without directly altering the code in the
  19. # actual search_engine.pl program.
  20. #
  21.  
  22. ############################################################
  23. #
  24. # subroutine: PrintHeaderHTML
  25. #   Usage:
  26. #     &PrintHeaderHTML;
  27. #
  28. #   Parameters:
  29. #     None
  30. #
  31. #   Output:
  32. #     Prints the HTML code for the header of the keyword
  33. #     return results
  34. #
  35. ############################################################
  36.  
  37. sub PrintHeaderHTML
  38. {
  39.  
  40. print <<__HEADERHTML__;
  41.  
  42.  
  43. <html dir="rtl">
  44. <head>
  45. <meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
  46. <title>Σ╩φ╠╔ ╟ß╚═╦</title>
  47. <STYLE TYPE="text/css">
  48. <!--
  49. A:link {
  50.     COLOR: 585986;TEXT-DECORATION: none;FONT-SIZE:12px
  51. }
  52. A:visited {
  53.     COLOR: green;TEXT-DECORATION: none;FONT-SIZE:12px
  54. }
  55. A:active {
  56.     COLOR: red; TEXT-DECORATION: none;FONT-SIZE:12px
  57. }
  58. A:hover {
  59.     COLOR: red; TEXT-DECORATION: underline;Font-size:12px;
  60.     }
  61. TD {
  62.     font-family:MS Sans Serif,Times New Roman (Arabic),Tahoma (Arabic);
  63.     font-style:normal; font-variant:normal; font-size:14px;}
  64.     BODY    {FONT-FAMILY:MS Sans Serif;}
  65. .ALL {CURSOR:hand;}
  66.  
  67. -->
  68. </style>
  69. </head>
  70. <body background="_Img/BG1.gif" bgproperties="fixed" LEFTMARGIN=0 TOPMARGIN=0>
  71. <TR><TD>
  72. <TABLE BORDER="1" Width="100%" cellspacing="0" cellpadding="0" bordercolor="#2d8a58">
  73. <!-- HEADER Table -->
  74. <TR><TD>
  75. <table border="0" cellspacing=0 cellpadding=0 width=100% bgcolor="#2d8a58">
  76. <TR><TD>
  77. <table cellspacing=0 cellpadding=0 border=0 width=60%><TR>
  78.        <TD align="center"><A HREF="home.htm"
  79.        STYLE="font-family:Tahoma (Arabic);font-size:13px;color:white">╟ß╒▌═╔ ╟ß╤╞φ╙φ╔</TD><TD width="1px">|</TD>
  80.        <TD align="center"><A HREF="programs.htm"
  81.        STYLE="font-family:Tahoma (Arabic);font-size:13px;color:white">╚╤╟π╠ ╟ß╩╤╟╦</A></TD><TD width="1px">|</TD>
  82.        <TD align="center"><A HREF="contacts.htm"
  83.        STYLE="font-family:Tahoma (Arabic);font-size:13px;color:white">╟ßµ▀ß╟┴ µ╟ßπµ╥┌µΣ</A></TD><TD width="1px">|</TD>
  84.        <TD align="center"><A HREF="aboutUs.htm#callus"
  85.        STYLE="font-family:Tahoma (Arabic);font-size:13px;color:white">ßß┼╩╒╟ß ╚Σ╟</A></TD><TD width="1px">|</TD>
  86.        <TD align="center"><A HREF="aboutUs.htm" STYLE="font-family:Tahoma (Arabic);font-size:13px;color:white">┌Σ ╟ß╩╤╟╦</A></TD>
  87.       </TD></TR></table></TD>
  88. </TR>
  89. <TR><TD colspan=9 bgcolor="#F7d878"><img src="_Img/points.gif"></TD></TR>
  90. </table>
  91. <P> 
  92. <!-- BODY TABLE -->
  93. <table border="0" width="100%" cellspacing="3"
  94.   cellpadding="3"><tr><td width="70%" valign="top">
  95.   <Div align="center" style="font-family:Times New Roman;font-size:24px"><B>
  96. Σ╩╟╞╠ ╟ß╚═╦ ......
  97. </B></DIV>
  98. __HEADERHTML__
  99.  
  100. } # End of PrintHeaderHTML
  101.  
  102. ############################################################
  103. #
  104. # subroutine: PrintFooterHTML
  105. #   Usage:
  106. #     &PrintFooterHTML;
  107. #
  108. #   Parameters:
  109. #     None
  110. #
  111. #   Output:
  112. #     Prints the HTML code for the footer of the keyword
  113. #     return results
  114. #
  115. ############################################################
  116.  
  117. sub PrintFooterHTML
  118. {
  119. print <<__FOOTERHTML__;
  120.  
  121. </td><td width="30%" align="left" valign="top">
  122. <table bordercolor="#2d8a58"
  123. cellspacing="0" cellpadding="0" border="1" width="100%">
  124.   <tr><td align="center" bgcolor="#2d8a58">
  125.   <font color="white">╠╧φ╧ ╟ß╚╤╟π╠</font></td></tr>
  126.   <tr><td align="center"><Iframe
  127. src=new_prog.htm frameborder="0"width="100%" height="200px"></Iframe>
  128.   </table>
  129. </td></tr>
  130.   </table>
  131. <!-- Start About -->
  132. <hr size="2" color="#2d8a58" width="400" align="center">
  133. <div align="center"><center>
  134. <span><A HREF="home.htm" target="_self">╟ß╒▌═╔ ╟ß╤╞φ╙φ╔</A> -
  135. <A HREF="programs.htm" target="_self">╚╤╟π╠ ╟ß╩╤╟╦</A> -
  136. <A HREF="contacts.htm" target="_self">╟ßµ▀ß╟┴ µ╟ßπµ╥┌µΣ </A> -
  137. <A HREF="aboutUs.htm" target="_self">┌Σ ╟ß╩╤╟╦</A></span><table border="0"
  138. cellspacing="0" cellpadding="0">
  139.   <tr>
  140.     <td rowspan="2" align="left"><Img
  141.     src="_Imgs/copylogo.gif" border=0></Td>
  142.     <td align="right"><font size="1">╠πφ┌ ╟ß═▐µ▐ π═▌µ┘╔ 2001 ©
  143.     π╤▀╥ ╟ß╩╤╟╦ ß├╚═╟╦ ╟ß═╟╙╚ ╟ß┬ßφ</font></td>
  144.   </tr>
  145.   <tr>
  146.     <td align="center"><font size="1"> Copyright 2001 All Turath Center Computer
  147.     Research All Right Reserved</font></td>
  148.   </tr>
  149.   <tr>
  150.     <td align="center" colspan="2"><font size="1">ß├▌╓ß ╩╒▌═ ßπµ▐┌ ╟ß╩╤╟╦ φ╠╚ ├Σ
  151.     ╩▀µΣ ├╚┌╟╧ ╟ß╘╟╘╔<font color="red"> 600 * 800</font></font></td>
  152.   </tr>
  153.   </table>
  154. </center></div>
  155. <BR>
  156. <!-- End About -->
  157. </TD></TR>
  158. </TABLE>  <!-- BIG TABLE-->
  159. </body>
  160. </html>
  161.  
  162. __FOOTERHTML__
  163.  
  164. } # End of PrintFooterHTML
  165.  
  166. ############################################################
  167. #
  168. # subroutine: PrintNoHitsBodyHTML
  169. #   Usage:
  170. #     &PrintNoHitsBodyHTML;
  171. #
  172. #   Parameters:
  173. #     None
  174. #
  175. #   Output:
  176. #     Prints the HTML code for the body of the keyword
  177. #     search if no results were found
  178. #
  179. ############################################################
  180.  
  181. sub PrintNoHitsBodyHTML
  182. {
  183.     print <<__NOHITS__;
  184.  
  185.  
  186. <div align="center" style="font-family:Times New Roman;font-size:22px;color:red"><B>
  187. ß╟ φµ╠╧ Σ╩╟╞╠ ßσ╨╟ ╟ß╚═╦ ß┌╧π µ╠µ╧σ ▌φ ╟ßπµ▐┌<br>
  188. ╟ß╤╠╟┴ ╟ßπ═╟µß╔ π╤╔ ├╬╤∞<br>
  189. ╘▀╤╟ ß╥φ╟╤╩▀π</B></div>
  190. <P>
  191. __NOHITS__
  192.  
  193. } # End of PrintNoHitsBodyHTML
  194.  
  195. ############################################################
  196. #
  197. # subroutine: PrintBodyHTML
  198. #   Usage:
  199. #     &PrintBodyHTML;
  200. #
  201. #   Parameters:
  202. #     None
  203. #
  204. #   Output:
  205. #     Prints the HTML code for the body of the keyword
  206. #     search result set
  207. #
  208. ############################################################
  209.  
  210.  
  211. sub PrintBodyHTML
  212. {
  213.     local($filename, $title, $description) = @_;
  214.  
  215. print <<__BODYHTML__;
  216. <! -- Print Result -->
  217. <LI>
  218. <A HREF="$server_url/$filename">$title</A>
  219. </LI>
  220. __BODYHTML__
  221.  
  222. } # End of PrintBodyHTML
  223.  
  224. ############################################################
  225. #
  226. # subroutine: PrintNoKeywordHTML
  227. #   Usage:
  228. #     &PrintNoKeywordHTML;
  229. #
  230. #   Parameters:
  231. #     None
  232. #
  233. #   Output:
  234. #     Prints the HTML code for a form allowing the user
  235. #     to enter a keyword since no keyword was alreay entered
  236. #
  237. ############################################################
  238.  
  239. sub PrintNoKeywordHTML
  240. {
  241. print <<__NOKEYHTML__;
  242.  
  243. <div align="center">
  244. <FORM METHOD="POST" ACTION="/cgi-bin/search_engine_turath.cgi" name="frmFind">
  245. <table bordercolor="#2d8a58" cellspacing="0" cellpadding="0" border="1"
  246. width="50%">
  247. <tr><td align="center" bgcolor="#2d8a58"><font color="white">π═╤▀ ╟ß╚═╦</font>
  248. </td></tr>
  249. <TR><TD align="center" valign="center">
  250. <input src="_Img/find.gif" type="image" align="absMiddle">  
  251. <input type="text" value="╟╚═╦ σΣ╟" SIZE="15" NAME="keywords" MAXLENGTH="80">
  252. <br><INPUT TYPE=checkbox NAME="exact_match"> σß ╩╤φ╧ ╩╪╟╚▐ ╟ß▀ßπ╔
  253. </TD></TR></table>
  254. </FORM>
  255. </div>
  256.  
  257. __NOKEYHTML__
  258.  
  259. } # End of PrintNoKeywordHTML