| 328 | | exec("ls style", $dirindex); |
| 329 | | foreach ($dirindex as $v) { |
| 330 | | if (is_dir("style/".$v) && file_exists("style/".$v."/index.css")) { |
| 331 | | $stylename[] = $v; |
| 332 | | } |
| 333 | | } |
| 334 | | if (count($stylename)) { |
| 335 | | ?> |
| 336 | | <select name="styleswitchselect" id="styleswitchselect" onchange="switchstyle();"> |
| 337 | | <? foreach ($stylename as $v) { ?> |
| 338 | | <? if ($v == $_SESSION["style"]) { $selected="selected=\"selected\""; } else { $selected=""; } ?> |
| 339 | | <option value="<?=$v?>" <?=$selected?>><?=$v?></option> |
| 340 | | <? } ?> |
| 341 | | </select> |
| 342 | | <script language="Javascript1.2" type="text/javascript" src="common/js/styleswitcher.js"></script> |
| 343 | | <? |
| | 328 | if ($dh = opendir("style")) { |
| | 329 | while (false !== ($v = readdir($dh))) { |
| | 330 | if (is_dir("style/".$v) && file_exists("style/".$v."/index.css")) { |
| | 331 | $stylename[] = $v; |
| | 332 | } |
| | 333 | } |
| | 334 | if (count($stylename)) { |
| | 335 | ?> |
| | 336 | <select name="styleswitchselect" id="styleswitchselect" onchange="switchstyle();"> |
| | 337 | <? foreach ($stylename as $v) { ?> |
| | 338 | <? if ($v == $_SESSION["style"]) { $selected="selected=\"selected\""; } else { $selected=""; } ?> |
| | 339 | <option value="<?=$v?>" <?=$selected?>><?=$v?></option> |
| | 340 | <? } ?> |
| | 341 | </select> |
| | 342 | <script language="Javascript1.2" type="text/javascript" src="common/js/styleswitcher.js"></script> |
| | 343 | <? |
| | 344 | } |
| | 345 | } else { |
| | 346 | return false; |