function get_file($recursif=FALSE, $type="*") { if(empty($type)) $type = "file"; $arr_urlfile = array(); if($type == "*") { $liste_url_type = CFile::get_folder(SS_ADMIN_TO_USERFILE . "/userfiles"); foreach($liste_url_type as $key => $url_type) { array_merge(parent::get_file($url_type, $recursif), $arr_urlfile); } } else { $arr_urlfile = parent::get_file("$type", $recursif); } return array_unique($arr_urlfile); }
function get_img_rand($url_rep) { $liste_img = CFile::get_file($url_rep); $url_img_rand = $liste_img[array_rand($liste_img)]; return $url_img_rand; }
<EMBED src="$url_file" width="250" height="20" hidden="true" autostart="$autostart"/> </object> <![endif]--> <!--[if !IE]> <--> <object type="application/x-shockwave-flash" data="../flash/dewplayer.swf?son=$url_file&autoplay=$autoplay" width="250" height="20"> <param name="bgcolor" value="#ffffff"/> <param name="movie" value="../flash/dewplayer.swf?son=$url_file&autoplay=$autoplay"/> <EMBED src="$url_file" width="250" height="20" hidden="true" autostart="$autostart"/> </object> <!--> <![endif]--> END; break; } $arr_dir = CFile::get_folder("../userfiles/media"); $arr_file = CFile::get_file($url_base); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Document sans titre</title> <link href="../../adm/css/astyle.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../inc/script.js"></script> <style type="text/css"> textarea { width:98%; height:200px; font-family:"Courier New", Courier, monospace; font-size:12px; }
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Module Album photo</title> <link href="css/style.css" rel="stylesheet" type="text/css" /> <script src="prototype/prototype.js" type="text/javascript"></script> <script src="dw_scroll/js/dw_event.js" type="text/javascript"></script> <script src="dw_scroll/js/dw_event.js" type="text/javascript"></script> <script src="dw_scroll/js/dw_scroll.js" type="text/javascript"></script> <script src="dw_scroll/js/dw_scrollbar.js" type="text/javascript"></script> <script src="dw_scroll/js/scroll_controls.js" type="text/javascript"></script> <script src="inc/script.js" type="text/javascript"></script> </head> <?php include("inc/init.php"); if(!empty($_GET['url_album'])) $url_album = $_GET['url_album']; $liste_photo = CFile::get_file($url_album); $url_vue = @CImg::get_img_rand($url_album); ?> </head> <body> <div id="album_photo"> <div id="vue"><img src="load_vue.php?url_file=<?php echo $url_vue ?>" id="img_vue" alt="vue"/></div> <div id="wn"> <div id="lyr1"> <table id="t1"> <tr> <?php foreach ($liste_photo as $url_file) { ?> <td><img src="load_vignette.php?url_file=<?php echo $url_file ?>" onmouseover="show_vue('<?php echo $url_file ?>')" alt="" width="40" height="30"/></td> <?php } ?> </tr>