|
Last change
on this file was 47, checked in by george, 18 years ago |
|
Listování stránek u aktualit.
Zjednodušení generování hlavního menu do funkcí.
Doplnění položek konfigurace.
|
|
File size:
914 bytes
|
| Line | |
|---|
| 1 | <?php
|
|---|
| 2 | include('../global.php');
|
|---|
| 3 | ?>
|
|---|
| 4 |
|
|---|
| 5 | function getAppVersion()
|
|---|
| 6 | {
|
|---|
| 7 | appname = navigator.appName;
|
|---|
| 8 | appversion = navigator.appVersion;
|
|---|
| 9 | majorver = appversion.substring(0, 1);
|
|---|
| 10 | if ( (appname == "Netscape") && ( majorver >= 3 ) ) return 1;
|
|---|
| 11 | if ( (appname == "Microsoft Internet Explorer") && (majorver >= 4) ) return 1;
|
|---|
| 12 | return 0;
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | function swtch(num, imgname)
|
|---|
| 16 | {
|
|---|
| 17 | if (getAppVersion())
|
|---|
| 18 | {
|
|---|
| 19 | document[imgname].src = img[num].src;
|
|---|
| 20 | }
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | <?php
|
|---|
| 24 | echo('imgsrc = new Array();');
|
|---|
| 25 | foreach($Menu as $Index => $MenuItem)
|
|---|
| 26 | {
|
|---|
| 27 | echo('imgsrc['.($Index*2+1).'] = "'.$Config['Web']['BaseURL'].'images/'.$MenuItem[2].'.jpg";');
|
|---|
| 28 | echo('imgsrc['.($Index*2+2).'] = "'.$Config['Web']['BaseURL'].'images/'.$MenuItem[2].'2.jpg";');
|
|---|
| 29 | }
|
|---|
| 30 |
|
|---|
| 31 | ?>
|
|---|
| 32 |
|
|---|
| 33 | if (getAppVersion())
|
|---|
| 34 | {
|
|---|
| 35 | img = new Array();
|
|---|
| 36 | for (i = 0; i < imgsrc.length; i++)
|
|---|
| 37 | {
|
|---|
| 38 | img[i] = new Image();
|
|---|
| 39 | img[i].src = imgsrc[i];
|
|---|
| 40 | }
|
|---|
| 41 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.