Visualizzazione dei risultati da 1 a 3 su 3

Visualizzazione discussione

  1. #1
    Utente di HTML.it
    Registrato dal
    May 2004
    Messaggi
    37

    richiamare file per data e non per nome

    salve a tutti,
    ho questo codice che richiama i file in una cartella ordinandoli per nome. avrei bisogno che i file vengano richiamati per data di creazione, come posso correggerlo ? grazie !

    <?
    //file che genera il falso video php
    //si ottiene facendo un refresh continuo della pagina conuna nuova immagine
    //si chiama nel seguente modo:


    ?>
    <HTML>
    <HEAD>
    <TITLE>Video</TITLE>
    </HEAD>
    <BODY BGCOLOR="#000000" onload="update();">
    <img name="foto" src="../senegal/webcam.jpg">
    <div class="mid" id="HiddenDiv" style="DISPLAY: none" >
    <center>
    <input type="button" value="Rivedi il video" display="" onClick="rivedi();">
    </center>
    </div>
    <!-- Code for slideshow -->


    <SCRIPT LANGUAGE="JavaScript">


    <!-- Begin
    // Specify the image files
    var Pic = new Array();
    // to add more images, just continue
    // the pattern, adding to the array below
    //intanto carica l'immagine iniziale


    <?
    $as="../" . $_REQUEST['code'] . "/senegal/";
    $i=0;
    foreach (glob($as . "*.jpg") as $filename) {?>
    Pic[<?echo $i;?>] = "<?echo $filename;$i++;?>";<? echo "\n";
    }
    ?>
    //document.getElementById("HiddenDiv").style.display = 'none';
    // do not edit anything below this line
    var t;
    var j = 0;
    var p = Pic.length;
    var preLoad = new Array();
    for (i = 0; i < p; i++) {
    preLoad[i] = new Image();
    preLoad[i].src = Pic[i];
    }
    //ho caricato tutte le foto in preLoad[]
    index = 0;
    function update(){
    if (preLoad[index]!= null){
    document.images['foto'].src = preLoad[index].src;
    index++;
    setTimeout(update, 500);
    }else {document.getElementById("HiddenDiv").style.displa y='block';}




    }
    function rivedi(){
    document.getElementById("HiddenDiv").style.display = 'none';
    index = 0;
    update();
    }




    // End -->
    </script>


    </BODY>
    </HTML>
    <? /*
    <img name="foto">
    <script type="text/javascript">


    var images = [],
    index = 0;


    <?
    $as="../" . $_REQUEST['code'] . "/senegal/";
    $i=0;
    foreach (glob($as . "*.jpg") as $filename) {?>
    images[<?echo $i;?>] = "<?echo $filename;$i++;?>";<? echo "\n";
    }
    ?>
    function update(){
    if (images[index]!= null){
    document.images['foto'].src = images[index] + "?time=" + new Date();
    index++;
    setTimeout(update, 1000);
    }


    }
    update();


    </script>*/?>
    Ultima modifica di lanfur; 16-07-2014 a 10:23

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.