home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / tema / SW602 / Winbase / EShop_demo / SIDEBAR.WWW < prev    next >
Text File  |  2000-03-16  |  12KB  |  293 lines

  1. {$$3219667260 .                              }<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  2.  
  3. <html>
  4. <head>
  5. <meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; CHARSET=WINDOWS-1250">
  6. <title>Food Selection Outline</title>
  7. <STYLE TYPE="text/css">
  8. <!--
  9.  .orange { font-size: 9pt; font-family: Arial CE, Arial, HelveticaE, Helvetica CE, Helvetica; color: #ff8000 }
  10.  .yellow { font-size: 9pt; font-family: Arial CE, Arial, HelveticaE, Helvetica CE, Helvetica; color: #ffff00 }
  11.  .blue { font-size: 9pt; font-family: Arial CE, Arial, HelveticaE, Helvetica CE, Helvetica; color: #BDE7FF }
  12.  .white { font-size: 8pt; font-family: Arial CE, Arial, HelveticaE, Helvetica CE, Helvetica; color: #FFFFFF }
  13.  A { font-family: Arial CE, Arial, HelveticaE, Helvetica CE, Helvetica; font-size: 9pt; cursor: auto ; color: #FFFFFF; text-decoration: underline; }
  14.  A:hover { text-decoration: underline; color:#ff8000 }
  15. -->
  16. </STYLE>
  17.  
  18. <script type="text/javascript" language="JavaScript1.1">
  19. // ** BEGIN OUTLINE AUTHOR-ADUSTABLE SPECIFICATIONS **//
  20.  
  21. // size of horizontal indent per level
  22. var indentPixels = 10
  23.  
  24. // art files and sizes for three widget styles
  25. // (all three widgets must have same height/width)
  26. var collapsedWidget = "/catalog/plus.gif"
  27. var expandedWidget = "/catalog/minus.gif"
  28. var endpointWidget = "/catalog/end.gif"
  29. var widgetWidth = 9
  30. var widgetHeight = 9
  31.  
  32. // Target for documents loaded when user clicks on a link.
  33. // Specify your target frame name here.
  34. var displayTarget = "plocha"
  35.  
  36. // Create array object containing outline content and attributes.
  37. // To adapt outline for your use, modify this table.
  38. // Start the array with [1], and continue without gaps to your last item.
  39. // The order of the five parameters:
  40. //    1. Boolean (true or false) whether _next_ item is indented.
  41. //    2. String to display in outline entry (including <FONT> or style tags).
  42. //    3. URL of link for outline entry; Use empty string ("") for no link
  43. //    4. Integer of indentation level (0 is leftmost margin level)
  44. //    5. String for status line during onMouseOver (apostrophes require \\')
  45. var db = new Array()
  46. <%begindetail skupiny%>
  47. db[<%CurrentRecord%>] = new dbRecord(<%if CurrentRecord<skupiny#-1%><%if ((uroven<skupiny[CurrentRecord+1].uroven) AND (NOT last))%>true<%else%>false<%endif%><%else%>false<%endif%>,"<%nazev_sk%>","<%wb_url%>/cenikmn.wbc?wbegin=0&jmeno=<%jmeno%>&heslo=<%heslo%>&objednavka=<%objednavka%>&cena=<%cena;-102%>&cenaDPH=<%cenaDPH;-102%>&w_nazev=&check_kod=<%kod_skupiny%>&id_cenik=-1&W_mnoz=0",<%uroven%>,"")
  48. <%enddetail%>
  49. // add more records to complete your outline
  50. // ** END AUTHOR-ADJUSTABLE SPECIFICATIONS **//
  51.  
  52. // object constructor for each outline entry
  53. function dbRecord(mother,display,URL,indent,statusMsg){
  54.     this.mother = mother   // is this item a parent?
  55.     this.display = display // text to display
  56.     this.URL = URL         // link tied to text; if empty string, item appears as straight text
  57.     this.indent = indent   // how many levels nested?
  58.     this.statusMsg = statusMsg  // descriptive text for status bar 
  59.     return this
  60. }
  61.  
  62. // pre-load all images into cache
  63. var fillerImg = new Image(1,1)
  64. fillerImg.src = "/catalog/filler.gif"
  65. var collapsedImg = new Image(widgetWidth,widgetHeight)
  66. collapsedImg.src = collapsedWidget
  67. var expandedImg = new Image(widgetWidth,widgetHeight)
  68. expandedImg.src = expandedWidget
  69. var endpointImg = new Image(widgetWidth,widgetHeight)
  70. endpointImg.src = endpointWidget
  71.  
  72. // ** functions that get and set persistent cookie data **
  73. // set cookie data
  74. var mycookie = document.cookie
  75. function setCurrState(setting) {
  76.         mycookie = document.cookie = "currState=" + escape(setting)
  77. }
  78. // retrieve cookie data
  79. function getCurrState() {
  80.         var label = "currState="
  81.         var labelLen = label.length
  82.         var cLen = mycookie.length
  83.         var i = 0
  84.         while (i < cLen) {
  85.                 var j = i + labelLen
  86.                 if (mycookie.substring(i,j) == label) {
  87.                         var cEnd = mycookie.indexOf(";",j)
  88.                         if (cEnd ==     -1) {
  89.                                 cEnd = mycookie.length
  90.                         }
  91.                         return unescape(mycookie.substring(j,cEnd))
  92.                 }
  93.                 i++
  94.         }
  95.         return ""
  96. }
  97.  
  98. // **function that updates persistent storage of state**
  99. // toggles an outline mother entry, storing new value in the cookie
  100. function toggle(n) {
  101.     if (n != 0) {
  102.         var newString = ""
  103.         var currState = getCurrState() // of whole outline
  104.         var expanded = currState.charAt(n-1) // of clicked item
  105.         newString += currState.substring(0,n-1)
  106.         newString += expanded ^ 1 // Bitwise XOR clicked item
  107.         newString += currState.substring(n,currState.length)
  108.         setCurrState(newString) // write new state back to cookie
  109.     }
  110. }
  111.  
  112. // **functions used in assembling updated outline**
  113. // returns the proper GIF file name for each entry's control
  114. function getGIF(n) {
  115.     var mom = db[n].mother  // is entry a parent?
  116.     var expanded = getCurrState().charAt(n-1) // of clicked item
  117.     if (!mom) {
  118.         return endpointWidget
  119.     } else {
  120.         if (expanded == 1) {
  121.             return expandedWidget
  122.         }
  123.     }
  124.     return collapsedWidget
  125. }
  126.  
  127. // returns the proper status line text based on the icon style
  128. function getGIFStatus(n) {
  129.     var mom = db[n].mother  // is entry a parent
  130.     var expanded = getCurrState().charAt(n-1) // of rolled item
  131.     if (!mom) {
  132.         return "Äßdnß pod°φzenß polo₧ka"
  133.     } else {
  134.         if (expanded == 1) {
  135.             return "Kliknutφm z·₧φte menu"
  136.         }
  137.     }
  138.     return "Kliknutφm rozvinete menu"
  139. }
  140.  
  141. // initialize 'current state' storage field
  142. if (getCurrState() == "" || getCurrState().length != (db.length-1)) {
  143.     initState = ""
  144.     for (i = 1; i < db.length; i++) {
  145.         initState += "0"
  146.     }
  147.     setCurrState(initState)
  148. }
  149.  
  150. </script>
  151. </head>
  152.  
  153. <%wbc%>
  154. ErrorTemplate: err.htw
  155.  
  156. SQLStatement: platbaEXB
  157. + SELECT EP_EXPANDIA.useok
  158. + FROM EP_EXPANDIA
  159.  
  160. SQLStatement: platbaSET
  161. + SELECT max(EP_SETKB.useok) AS USEOK
  162. + FROM EP_SETKB
  163.  
  164. SQLStatement: skupiny
  165. + SELECT S_zbozi_sk.id_skupiny,S_zbozi_sk.nazev_sk,S_zbozi_sk.kod_skupiny,S_zbozi_sk.last,S_zbozi_sk.uroven,S_zbozi_sk.poradi
  166. + FROM S_zbozi_sk,Sys_par
  167. + WHERE (S_zbozi_sk.uroven<Sys_par.N_INTRSKUP)
  168. + ORDER BY S_zbozi_sk.poradi,S_zbozi_sk.kod_skupiny
  169.  
  170. SQLStatement: sys_par
  171. + SELECT logo_url
  172. + FROM sys_par
  173. <%/wbc%>
  174.  
  175. <BODY leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 BGCOLOR="#004080" >
  176. <CENTER>
  177. <table border="0" cellspacing="0" cellpadding="0">
  178. <!-- <tr>
  179. <td width="117"
  180. align="CENTER"><a href="<%wb_url%>/plocha_top.htw?jmeno=<%jmeno%>&heslo=<%heslo%>&objednavka=<%objednavka%>&cena=<%cena%>&cenaDPH=<%cenaDPH%>"
  181. TARGET="plocha"><img src="/catalog/home.gif" width=30 height=23 border=0 
  182. alt="TOP LIST - nep°ehlΘdn∞te!!"></a></td> 
  183. </tr> -->
  184. <%if (jmeno="") OR (jmeno="NOVY") %>  
  185. <tr><td width="140" valign="TOP"  align="CENTER" class="yellow"><b>Nep°ihlßÜen!</b></td></tr>
  186. <%else%>  
  187. <tr><td width="140" valign="TOP"  align="CENTER" class="yellow"><b>P°ihlßÜen</b></td></tr>
  188. <%endif%>  
  189.  
  190. <tr><td><BR></td></tr>
  191. <tr>
  192.     <td width="140" valign="TOP" class="orange"><b>Zvolte skupinu zbo₧φ:</b></td>
  193. </tr>
  194. <tr>
  195. <td align="left">
  196. <SCRIPT LANGUAGE="JavaScript1.1">
  197. <!-- start
  198. // build new outline based on the values of the cookie
  199. // and data points in the outline data array.
  200. // This fires each time the user clicks on a control,
  201. // because the HREF for each one reloads the current document.
  202. var newOutline = ""
  203. var prevIndentDisplayed = 0
  204. var showMyDaughter = 0
  205. // cycle through each entry in the outline array
  206. for (var i = 1; i < db.length; i++) {
  207.     var theGIF = getGIF(i)  // get the image
  208.     var theGIFStatus = getGIFStatus(i)  // get the status message
  209.     var currIndent = db[i].indent   // get the indent level
  210.     var expanded = getCurrState().charAt(i-1) // current state
  211.     // display entry only if it meets one of three criteria
  212.     if (currIndent == 0 || currIndent <= prevIndentDisplayed || (showMyDaughter == 1 && (currIndent - prevIndentDisplayed == 1))) {
  213.         newOutline += "<IMG SRC=\"" + fillerImg.src + "\" HEIGHT = 1 WIDTH =" + (indentPixels * currIndent) + ">"
  214.         // if( theGIF!=endpointWidget ) {
  215.             newOutline += "<A HREF=\"javascript:history.go(0)\" onMouseOver=\"window.status=\'" + theGIFStatus + "\';return true;\" onClick=\"toggle(" + i + ");return " + (theGIF != endpointWidget) + "\">"
  216.             newOutline += "<IMG SRC=\"" + theGIF + "\" HEIGHT=" + widgetHeight + " WIDTH=" + widgetWidth + " BORDER=0></A>"
  217.         // }
  218.         if (db[i].URL == "" || db[i].URL == null) {
  219.             newOutline += " " + db[i].display + " <BR>"// no link, just a listed item
  220.         } else {
  221.             newOutline += " <A HREF=\"" + db[i].URL + "\" TARGET=\"" + displayTarget + "\" onMouseOver=\"window.status=\'" + db[i].statusMsg + "\';return true;\">" + db[i].display + "</A> <BR>"
  222.         }
  223.         prevIndentDisplayed = currIndent
  224.         showMyDaughter = expanded
  225.         if (db.length > 25) {
  226.             document.write(newOutline)
  227.             newOutline = ""
  228.         }
  229.     }
  230. }
  231. document.write(newOutline)
  232.  
  233. // end -->
  234. </SCRIPT>
  235. <NOSCRIPT>
  236. <%begindetail skupiny%>
  237. <%if uroven!=0%>  <%endif%><a href="<%wb_url%>/cenikmn.wbc?wbegin=0&jmeno=<%jmeno%>&heslo=<%heslo%>&objednavka=<%objednavka%>&cena=<%cena;-102%>&cenaDPH=<%cenaDPH;-102%>&w_nazev=&check_kod=<%kod_skupiny%>&id_cenik=0&W_mnoz=0" target="plocha"><font size="-2" color="#FFFFFF"><%nazev_sk%></font></a><br>
  238. <%enddetail%>
  239. </NOSCRIPT>
  240. </SPAN>
  241. </td>
  242. </tr>
  243. <tr><td> </td></tr>
  244. <tr>
  245. <td width="140" align="CENTER" valign="BOTTOM">
  246. <a href="http://www.software602.cz/produkty/eshop/eshop.htm" target="_blank"><img src="/catalog/l_webcat.gif" border=0 alt="Pou₧φvßte aplikaci 602 E" width=115 height=50></a>
  247. </td>
  248. </tr> 
  249. <tr><td> </td></tr>
  250. <%if platbaEXB.useok=TRUE  %>
  251. <tr>
  252. <td width="140" align="CENTER" valign="BOTTOM"><a href="http://www.ebanka.cz" target="_blank"><img src="/catalog/ebanka.gif" border=0 alt="Aplikace umo₧≥uje platbu p°es Expandia Banku, a.s." ></a></td>
  253. </tr> 
  254. <%endif%>
  255. <tr><td> </td></tr>
  256. <%if platbaSET.useok=TRUE %>
  257. <tr>
  258. <td width="140" align="CENTER" valign="BOTTOM"><a href="http://www.set.cz/Content/01popis/" target="_blank"><img src="/catalog/ecmc.gif" border=0 alt="Aplikace umo₧≥uje platbu p°es SET KomerΦnφ Banky" ></a></td>
  259. </tr> 
  260. <%endif%>
  261. <tr><td> </td></tr>
  262. <tr>
  263. <td width="140" align="CENTER" valign="BOTTOM"><img src="/catalog/Copyleft.gif" border=0 ></td>
  264. </tr> 
  265. </table>
  266. </CENTER>
  267. </BODY>
  268. <!-- 
  269.     -------------------------------------------------------------------------
  270.                 OUTLINE STYLE TABLE OF CONTENTS in JAVASCRIPT
  271.                                 Version 2.0
  272.                     by Danny Goodman (dannyg@dannyg.com)
  273.                     Analyzed and described at length in
  274.                              "JavaScript Bible"
  275.                               by Danny Goodman
  276.                       (IDG Books ISBN 0-7645-3022-4)
  277.     
  278.     This program is Copyright 1996 by Danny Goodman.  You may adapt
  279.     this outliner for your Web pages, provided these opening credit
  280.     lines (down to the lower dividing line) are in your outliner HTML document.
  281.     You may not reprint or redistribute this code without permission from 
  282.     the author.
  283.     -------------------------------------------------------------------------
  284.      21 February 1997  Added intelligence so that clicking on a fully nested
  285.                        widget icon does not cause the outline to reload. 
  286.                        
  287.      24 October 1997   Script speedup for Navigator 4, reduces access to cookie
  288. -->
  289.  
  290.  
  291. </HTML><font color="#004080">
  292.  
  293.