<?php
$path_to_images = "banners/";
$num_to_rotate = ALL;
function getJSRandomized($path, $list, $num) {
$str = '"';
mt_srand( (double)microtime() * 1000000 );
shuffle($list);
if ( $num == "ALL" ) $num = count($list);
for ($i=0; $i<$num; $i++) {
$str .= $path . $list[$i] . '", "';
}
$str = substr($str, 0, -3);
return $str;
}
function getImagesList($path) {
$ctr = 0;
if ( $img_dir = @opendir($path) ) {
while ( false !== ($img_file = readdir($img_dir)) ) {
if ( preg_match("/(\.gif|\.jpg)$/", $img_file) ) {
$images[$ctr] = $img_file;
$ctr++;
}
}
closedir($img_dir);
return $images;
} else {
return false;
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="icon" href="../favicon.ico" />
<link href="templates/NoseBleed/NoseBleed.css" rel="stylesheet" type="text/css">
<script src="js/dw_rotator.js" type="text/javascript"></script>
<script src="js/dw_random.js" type="text/javascript"></script>
</head>
<body bgcolor="#FFFFFF" text="#111111" link="#9F0002" vlink="#9F0002" leftmargin="0" topmargin="0" onload="dw_Rotator.start()">
<a name="top"></a>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<table width="780" height="100%" cellspacing="0" cellpadding="10" border="0" align="center">
<tr>
<td class="bodyline" valign="top">
<table width="717" height="231" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><a href="{U_INDEX}">
<img src="banners/default/default.jpg" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
</tr>
<tr align="center">
<td>
<?php
if ( $image_list = getImagesList($path_to_images) )
{
<script type="text/javascript">
var imgList = [
<?php echo getJSRandomized($path_to_images, $image_list, $num_to_rotate); ?>
];
var rotator1 = new dw_RandRotator(30000);
rotator1.setUpImage(imgList, null, null, false);
</script>
}
else {
<script type="text/javascript">dw_Rotator.start = function() {};</script>
}
?>
</tr>
</table>
<table width="715" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><a href="{U_FAQ}" class="mainmenu">{L_FAQ}</a> <a href="{U_SEARCH}" class="mainmenu">{L_SEARCH}</a> <a href="{U_MEMBERLIST}" class="mainmenu">{L_MEMBERLIST}</a> <a href="{U_GROUP_CP}" class="mainmenu">{L_USERGROUPS}</a> <a href="{U_PROFILE}" class="mainmenu">{L_PROFILE}</a> <a href="{U_PRIVATEMSGS}" class="mainmenu">{PRIVATE_MESSAGE_INFO}</a></td><td align="right"><span class="mainmenu"><a href="{U_LOGIN_LOGOUT}" class="mainmenu">{L_LOGIN_LOGOUT}</a>
<!-- BEGIN switch_user_logged_out -->
<a href="{U_REGISTER}" class="mainmenu">{L_REGISTER}</a>
<!-- END switch_user_logged_out --></span></td>
</tr>
</table>