R0undd |
10th October 2013 01:08 |
changing logos (automatic)
I found this code. This is old tbdev code. Logos changes automatic.
PHP Code:
<div id='header'> <div class='statusbar'>"; $htmlout .= StatusBar(); $folder = "{$TBDEV['pic_base_url']}/logos/"; $exts = 'jpg jpeg png gif'; $files = array(); $i = -1; if ('' == $folder) $folder = './'; $handle = opendir($folder); $exts = explode(' ', $exts); while (false !== ($file = readdir($handle))) { foreach($exts as $ext) { if (preg_match('/\.'.$ext.'$/i', $file, $test)) { $files[] = $file; ++$i; }}} closedir($handle); mt_srand((double)microtime()*1000000); $rand = mt_rand(0, $i); $htmlout .= " </div> <div class='subheader'> <div class='logo'><img src=".$folder.$files[$rand]." > "; $htmlout .= "</div>
Is it possible to import this tt 2.08?
|