Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004
    Location
    Lincoln, Lincolnshire
    Posts
    2,662
    Tokens
    98
    Habbo
    Carlsta

    Latest Awards:

    Default Carlstac.com // Multiple Uploader Help!?!?!

    How can i change this coding to make a multiple uploader

    The index code is:

    PHP Code:
    <html>
    <
    head>
    <
    title>Carlstac.com // Uploader</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <
    link rel='shortcut icon' href='http://www.carlstac.com/uploader/favicon.ico'>
    </
    head>
    <
    center>
    <
    body bgcolor='#272f80' background='bg.gif'>
    <
    br>
    <
    div align="center">
    <
    table border='0' cellpadding='2' cellspacing='2' width='749' bgcolor='white' height="421">
    <
    body bgcolor='white'>
    <
    tr>
        <
    td style="padding: 0" height="411" width="739">
    <
    table cellpadding="0" cellspacing="0" width="742" height="414">
        <!-- 
    MSCellFormattingTableID="13" -->
        <
    body bgcolor='white'>
        <
    tr>
            <
    td colspan="2" height="3">
            <
    img alt="" width="742" height="3" src="MsoPnl_sh_l_1316.jpg"></td>
        </
    tr>
        <
    tr>
            <
    td width="3">
            <
    img alt="" width="3" height="411" src="MsoPnl_sh_t_1317.jpg"></td>
            <
    td height="411" width="739">
            <
    table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
                <
    tr>
                    <
    td height="100%" width="100%" valign="middle">
                    <!-- 
    MSCellFormattingType="content" -->
                    <
    table cellpadding="0" cellspacing="0" width="739" height="411">
                        <!-- 
    MSCellFormattingTableID="12" -->
                        <
    body bgcolor='white'>
                        <
    tr>
                            <
    td width="3">
                            <
    img alt="" width="3" height="408" src="MsoPnl_sh_b_1215.jpg"></td>
                            <
    td height="408" width="736">
                            <
    table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
                                <
    tr>
                                    <
    td height="100%" width="100%" valign="middle">
                                    <!-- 
    MSCellFormattingType="content" -->
                                    <
    table cellpadding="0" cellspacing="0" width="736" height="408">
                                        <!-- 
    MSCellFormattingTableID="11" -->
                                        <
    body bgcolor='white'>
                                        <
    tr>
                                            <
    td colspan="2" height="3">
                                            <
    img alt="" width="736" height="3" src="MsoPnl_sh_t_1112.jpg"></td>
                                        </
    tr>
                                        <
    tr>
                                            <
    td width="733">
                                            <
    table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
                                                <
    tr>
                                                    <
    td height="100%" width="100%" valign="middle">
                                                    <!-- 
    MSCellFormattingType="content" -->
                                                    <
    table cellpadding="0" cellspacing="0" width="733" height="405">
                                                        <!-- 
    MSCellFormattingTableID="10" -->
                                                        <
    body bgcolor='white'>
                                                        <
    tr>
                                                            <
    td width="730">
                                                            <
    table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
                                                                <
    tr>
                                                                    <
    td width="100%" height="100%" valign="middle">
                                                                    <!-- 
    MSCellFormattingType="content" -->
                                                                    <
    link rel="stylesheet" href="http://www.carlstac.com/uploader/style.css" type="text/css">
                                                                    <
    p align="center">
                                                                    <
    br>
                                                                    <
    a href="http://carlstac.com/uploader">
                                                                    <
    img src="carlstac.png" height="115" width="350" border="0" alt=" "></a>
                                                                    </
    p><center>
                                                                    <
    body bgcolor='white'>
                                                                    <
    p>
                                                                    <
    img src="ff.gif" height="10" width="8" alt=" ">&nbsp;&nbsp;<class="menu" href="./">Home</a>&nbsp;
                                                                    <
    img src="ff.gif" height="10" width="8" alt=" ">&nbsp;&nbsp;<class="menu" title="Click here to advertise with us" href="mailto:[email protected]?subject=EasyImageHoster">Advertise 
                                                                    with us
    </a>&nbsp;
                                                                    <
    img src="ff.gif" height="10" width="8" alt=" ">&nbsp;<class="menu" href="./">Terms 
                                                                    
    and Conditions</a>&nbsp;
                                                                    <
    img src="ff.gif" height="10" width="8" alt=" "></p>
                                                                    
    Uploader accepts 
                                                                    the following 
                                                                    file extensions 
                                                                    only
    :<br><b>JPG 
                                                                    
    PNG BMP PSD RAR ZIP SWF MP3 WAV TXT FLV </b><br>
                                                                    <
    p>Select a 
                                                                    file to 
                                                                    upload
    <br>Max 
                                                                    file size is set 
                                                                    at 3072 KB 
    (3MB)<br>
                                                                    </
    p>
                                                                    <
    form method="post" enctype="multipart/form-data" action="basic.php">
                                                                        <
    INPUT TYPE="file" NAME="userfile" size="27">                                                            
                                                                        <
    br><br><br>
                                                                        <
    input type="submit" value="Upload" name="upload">
                                                                    </
    form><center>
                                                                    (
    cCarlstac.com<br>
                                                                    
    EasyImageHoster 
                                                                    1.32 
    (c2006 by
                                                                    
    <a href='mailto:[email protected]'>
                                                                    <
    span style="font-size: 9pt">
                                                                    
    GENTOO TPAX</span></font></a>
                                                                    </
    td>
                                                                    </
    tr>
                                                                </
    table>
                                                            </
    td>
                                                            <
    td height="402" width="3">
                                                            <
    img alt="" width="3" height="402" src="MsoPnl_sh_b_1011.jpg"></td>
                                                        </
    tr>
                                                        <
    tr>
                                                            <
    td colspan="2" height="3">
                                                            <
    img alt="" width="733" height="3" src="MsoPnl_sh_r_1010.jpg"></td>
                                                        </
    tr>
                                                        </
    table>
                                                    </
    td>
                                                    </
    tr>
                                                </
    table>
                                            </
    td>
                                            <
    td height="405" width="3">
                                            <
    img alt="" width="3" height="405" src="MsoPnl_sh_r_1113.jpg"></td>
                                        </
    tr>
                                        </
    table>
                                    </
    td>
                                    </
    tr>
                                </
    table>
                            </
    td>
                        </
    tr>
                        <
    tr>
                            <
    td colspan="2" height="3">
                            <
    img alt="" width="739" height="3" src="MsoPnl_sh_l_1214.jpg"></td>
                        </
    tr>
                        </
    table>
                    </
    td>
                    </
    tr>
                </
    table>
            </
    td>
        </
    tr>
        </
    table>
    </
    td>
    </
    tr>
    </
    table></div
    The php basic file is!

    PHP Code:
    <?
    // --------------------- (C) 2006 by TPAX --------------------- //
    // ------- PLEASE DO NOT REMOVE MY (C) FROM THE SCRIPT -------- // 
    // ------------------------- THANX :) ------------------------- //

    include "config.php";

    if (!isset(
    $_FILES['userfile'])) exit;
    if (
    is_uploaded_file($_FILES['userfile']['tmp_name'])) {
    if (
    $_FILES['userfile']['size']>$max_size

        echo 
    "<font color=\"#333333\" face=\"Geneva, Arial, Helvetica, sans-serif\">File is too big !</font><br>\n"; exit; 
    }

    if ((
    $_FILES['userfile']['type']=="image/gif") || 
    (
    $_FILES['userfile']['type']=="image/pjpeg") || 
    (
    $_FILES['userfile']['type']=="image/jpg") || 
    (
    $_FILES['userfile']['type']=="image/png") ||
    (
    $_FILES['userfile']['type']=="image/bmp") ||
    (
    $_FILES['userfile']['type']=="image/psd") ||
    (
    $_FILES['userfile']['type']=="application/x-rar-compressed") ||
    (
    $_FILES['userfile']['type']=="application/zip") ||
    (
    $_FILES['userfile']['type']=="application/octet-stream") ||
    (
    $_FILES['userfile']['type']=="application/x-shockwave-flash") ||
    (
    $_FILES['userfile']['type']=="audio/mp3") ||
    (
    $_FILES['userfile']['type']=="audio/wav") ||
    (
    $_FILES['userfile']['type']=="text/txt") ||
    (
    $_FILES['userfile']['type']=="video/x-FLV"))
    {

    // generate random signs
    $zufall rand(1,9);
    $zufall2 rand(1,26);
    $buchstaben = array(     "1" => "arx",
                    
    "2" => "opt",
                    
    "3" => "bwy",
                    
    "4" => "cqs",
                    
    "5" => "viu",
                    
    "6" => "rgh",
                    
    "7" => "jdv",
                    
    "8" => "klz",
                    
    "9" => "bfi", );

    $buchstaben2 = array(    "1" => "a",
                    
    "2" => "b",
                    
    "3" => "c",
                    
    "4" => "d",
                    
    "5" => "e",
                    
    "6" => "f",
                    
    "7" => "g",
                    
    "8" => "h",
                    
    "9" => "i",
                    
    "10" => "j",
                    
    "11" => "k",
                    
    "12" => "l",
                    
    "13" => "m",
                    
    "14" => "n",
                    
    "15" => "o",
                    
    "16" => "p",
                    
    "17" => "q",
                    
    "18" => "r",
                    
    "19" => "s",
                    
    "20" => "t",
                    
    "21" => "u",
                    
    "22" => "v",
                    
    "23" => "w",
                    
    "24" => "x",
                    
    "25" => "y",
                    
    "26" => "z", );

    $unikat $buchstaben[$zufall] . time() . $buchstaben2[$zufall2];

    // upload progress
    $file $_FILES['userfile']['name'];
    $new_bild $unikat.substr($filestrrpos($file"."));
    $res move_uploaded_file($_FILES['userfile']['tmp_name'], "./" $path $new_bild);

    if (!
    $res

        echo 
    "<font color=\"#333333\" face=\"Geneva, Arial, Helvetica, sans-serif\">Didn't work, please try again</font><br>\n"; exit; 


    else 
    {
    ?>
    <br>
    <?

    //set url variables
    $imgf $new_bild;
    $thbf $tpath.$imgf;
    $urlf 'http://' .$domain .'/' .$path .$imgf;

    //create thumbnails
    function createthumb($name,$filename,$new_w,$new_h)
    {
    $system=explode('.',$name);

    if (
    preg_match('/jpg|jpeg|JPG/',$system[1]))
    {
        
    $src_img=imagecreatefromjpeg($name);
    }

    if (
    preg_match('/png|PNG/',$system[1]))
    {
        
    $src_img=imagecreatefrompng($name);
    }

    if (
    preg_match('/gif|GIF/',$system[1]))
    {
        
    $src_img=imagecreatefromgif($name);
    }

    $old_x=imageSX($src_img);
    $old_y=imageSY($src_img);

    if (
    $old_x $old_y
    {
        
    $thumb_w=$new_w;
        
    $thumb_h=$old_y*($new_h/$old_x);
    }

    if (
    $old_x $old_y
    {
        
    $thumb_w=$old_x*($new_w/$old_y);
        
    $thumb_h=$new_h;
    }

    if (
    $old_x == $old_y
    {
        
    $thumb_w=$new_w;
        
    $thumb_h=$new_h;
    }

    $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h);
    imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y); 

    if (
    preg_match("/png/",$system[1]))
    {
        
    imagepng($dst_img,$filename); 

    if (
    preg_match("/gif/",$system[1]))
    {
        
    imagegif($dst_img,$filename);
    }

    else 
    {
        
    imagejpeg($dst_img,$filename); 
    }

    imagedestroy($dst_img); 
    imagedestroy($src_img); 

    }

    createthumb($path.$imgf,$tpath.$imgf,$tsize,$tsize);
    ?>
    <head>
    <script type="text/javascript">
    <!--
    function highlight(field)
        {
        field.focus();
        field.select();
        }
    //-->
    </script>
    <title>EasyImageHoster - www.imagehoster.6x.to</title>
    </head>
    <body bgcolor="#272f80" background='background.gif'>
    <center>
    <table border='0' bgcolor='white'>
    <link rel="STYLESHEET" type="text/css" href="style.css">
    <FORM action="nowhere" method="post">
    <center>
    <tr><td>URL:</td><td><input type="text" name="thetext" onClick='highlight(this);' size="60" value="<? echo 'http://' .$domain .'/' ?>viewer.php?id=<? echo $imgf?>"></td></tr>
    <tr><td>DIRECT URL:</td><td><input type="text" name="thetext" onClick='highlight(this);' size="60" value="<? echo $urlf?>"></td></tr>
    <tr><td>HTML:</td><td><input type="text" name="thetext" onClick='highlight(this);' size="60" value='<a href="<? echo 'http://' .$domain .'/'?>viewer.php?id=<? echo $imgf?>"><img src="<? echo 'http://' .$domain.'/'.$tpath.$imgf?>" border="0"></a>'></td></tr>
    <tr><td>BBCode:</td><td><input type="text" name="thetext" onClick='highlight(this);' size="60" value="[URL=<? echo 'http://' .$domain .'/'?>viewer.php?id=<? echo $imgf?>][IMG]<? echo 'http://' .$domain.'/'.$tpath.$imgf?>[/IMG][/URL]"></td></tr>
    <tr><td>IMAGE:</td><td><a href='viewer.php?id=<? echo $imgf?>'><img src='<? echo $thbf ?>'></a></td></tr>

    <?
    }


    else 

    echo 
    "<font color=\"#333333\" face=\"Geneva, Arial, Helvetica, sans-serif\">You selected a wrong filetype!</font><br>\n"; exit; 
    }

    }

    if (
    $tsize <= 380
    {
        echo 
    "</table>";
        echo 
    "<table border='0' bgcolor='white' width='457'>";
        echo 
    "<tr><td><center><a href='./index.php'>back</a></td></tr>";
        echo 
    "</table>";
        echo 
    "<br><br>";
        echo 
    "</body>";
    }
    ?>
    Then there is also a viewer php file aswell..

    PHP Code:
    <?
    /*
    ====================================
    Script Author: Ash Young <[email protected]>. www.evoluted.net
    Layout: Manny <[email protected]>. www.tenka.co.uk
    ====================================
    */
    $startdir '.';

    /*
    Show Thumbnails? - Set to true if you wish to use the 
    scripts auto-thumbnail generation capabilities.
    This requires that GD2 is installed.
    */
    $showthumbnails true

    /*
    Show Directories - Do you want to make subdirectories available?
    If not set this to false
    */
    $showdirs true;

    /* 
    Force downloads - Do you want to force people to download the files
    rather than viewing them in their browser?
    */
    $forcedownloads false;

    /*
    Hide Files - If you wish to hide certain files or directories 
    then enter their details here. The values entered are matched
    against the file/directory names. If any part of the name 
    matches what is entered below then it is now shown.
    */
    $hide = array(
                    
    'dlf',
                    
    'view.php',
                    
    'index.php',
                    
    'index.html',
                    
    'Thumbs',
                    
    '.htaccess',
                    
    '.htpasswd'
                
    );
                 
    /* 
    Show index files - if an index file is found in a directory
    to you want to display that rather than the listing output 
    from this script?
    */            
    $displayindex false;

    /*
    Allow uploads? - If enabled users will be able to upload 
    files to any viewable directory. You should really only enable
    this if the area this script is in is already password protected.
    */
    $allowuploads false;

    /*
    Overwrite files - If a user uploads a file with the same
    name as an existing file do you want the existing file
    to be overwritten?
    */
    $overwrite true;

    /*
    Index files - The follow array contains all the index files
    that will be used if $displayindex (above) is set to true.
    Feel free to add, delete or alter these
    */

    $indexfiles = array (
                    
    'index.html',
                    
    'index.htm',
                    
    'default.htm',
                    
    'default.html'
                
    );
                
    /*
    File Icons - If you want to add your own special file icons use 
    this section below. Each entry relates to the extension of the 
    given file, in the form <extension> => <filename>. 
    These files must be located within the dlf directory.
    */
    $filetypes = array (
                    
    'png' => 'jpg.gif',
                    
    'jpeg' => 'jpg.gif',
                    
    'bmp' => 'jpg.gif',
                    
    'jpg' => 'jpg.gif'
                    
    'gif' => 'gif.gif',
                    
    'zip' => 'archive.png',
                    
    'rar' => 'archive.png',
                    
    'exe' => 'exe.gif',
                    
    'setup' => 'setup.gif',
                    
    'txt' => 'text.png',
                    
    'htm' => 'html.gif',
                    
    'html' => 'html.gif',
                    
    'fla' => 'fla.gif',
                    
    'swf' => 'swf.gif',
                    
    'xls' => 'xls.gif',
                    
    'doc' => 'doc.gif',
                    
    'sig' => 'sig.gif',
                    
    'fh10' => 'fh10.gif',
                    
    'pdf' => 'pdf.gif',
                    
    'psd' => 'psd.gif',
                    
    'rm' => 'real.gif',
                    
    'mpg' => 'video.gif',
                    
    'mpeg' => 'video.gif',
                    
    'mov' => 'video2.gif',
                    
    'avi' => 'video.gif',
                    
    'eps' => 'eps.gif',
                    
    'gz' => 'archive.png',
                    
    'asc' => 'sig.gif',
                );
                
    /*
    That's it! You are now ready to upload this script to the server.

    Only edit what is below this line if you are sure that you know what you
    are doing!
    */
    error_reporting(0);
    if(!
    function_exists('imagecreatetruecolor')) $showthumbnails false;
    $leadon $startdir;
    if(
    $leadon=='.'$leadon '';
    if((
    substr($leadon, -11)!='/') && $leadon!=''$leadon $leadon '/';
    $startdir $leadon;

    if(
    $_GET['dir']) {
        
    //check this is okay.
        
        
    if(substr($_GET['dir'], -11)!='/') {
            
    $_GET['dir'] = $_GET['dir'] . '/';
        }
        
        
    $dirok true;
        
    $dirnames split('/'$_GET['dir']);
        for(
    $di=0$di<sizeof($dirnames); $di++) {
            
            if(
    $di<(sizeof($dirnames)-2)) {
                
    $dotdotdir $dotdotdir $dirnames[$di] . '/';
            }
            
            if(
    $dirnames[$di] == '..') {
                
    $dirok false;
            }
        }
        
        if(
    substr($_GET['dir'], 01)=='/') {
            
    $dirok false;
        }
        
        if(
    $dirok) {
             
    $leadon $leadon $_GET['dir'];
        }
    }

    if(
    $_GET['download'] && $forcedownloads) {
        
    $file str_replace('/'''$_GET['download']);
        
    $file str_replace('..'''$file);

        if(
    file_exists($leadon $file)) {
            
    header("Content-type: application/x-download");
            
    header("Content-Length: ".filesize($leadon $file)); 
            
    header('Content-Disposition: attachment; filename="'.$file.'"');
            
    readfile($leadon $file);
            die();
        }
    }

    if(
    $allowuploads && $_FILES['file']) {
        
    $upload true;
        if(!
    $overwrite) {
            if(
    file_exists($leadon.$_FILES['file']['name'])) {
                
    $upload false;
            }
        }
        
        if(
    $upload) {
            
    move_uploaded_file($_FILES['file']['tmp_name'], $leadon $_FILES['file']['name']);
        }
    }

    $opendir $leadon;
    if(!
    $leadon$opendir '.';
    if(!
    file_exists($opendir)) {
        
    $opendir '.';
        
    $leadon $startdir;
    }

    clearstatcache();
    if (
    $handle opendir($opendir)) {
        while (
    false !== ($file readdir($handle))) { 
            
    //first see if this file is required in the listing
            
    if ($file == "." || $file == "..")  continue;
            
    $discard false;
            for(
    $hi=0;$hi<sizeof($hide);$hi++) {
                if(
    strpos($file$hide[$hi])!==false) {
                    
    $discard true;
                }
            }
            
            if(
    $discard) continue;
            if (@
    filetype($leadon.$file) == "dir") {
                if(!
    $showdirs) continue;
            
                
    $n++;
                if(
    $_GET['sort']=="date") {
                    
    $key = @filemtime($leadon.$file) . ".$n";
                }
                else {
                    
    $key $n;
                }
                
    $dirs[$key] = $file "/";
            }
            else {
                
    $n++;
                if(
    $_GET['sort']=="date") {
                    
    $key = @filemtime($leadon.$file) . ".$n";
                }
                elseif(
    $_GET['sort']=="size") {
                    
    $key = @filesize($leadon.$file) . ".$n";
                }
                else {
                    
    $key $n;
                }
                
    $files[$key] = $file;
                
                if(
    $displayindex) {
                    if(
    in_array(strtolower($file), $indexfiles)) {
                        
    header("Location: $file");
                        die();
                    }
                }
            }
        }
        
    closedir($handle); 
    }

    //sort our files
    if($_GET['sort']=="date") {
        @
    ksort($dirsSORT_NUMERIC);
        @
    ksort($filesSORT_NUMERIC);
    }
    elseif(
    $_GET['sort']=="size") {
        @
    natcasesort($dirs); 
        @
    ksort($filesSORT_NUMERIC);
    }
    else {
        @
    natcasesort($dirs); 
        @
    natcasesort($files);
    }

    //order correctly
    if($_GET['order']=="desc" && $_GET['sort']!="size") {$dirs = @array_reverse($dirs);}
    if(
    $_GET['order']=="desc") {$files = @array_reverse($files);}
    $dirs = @array_values($dirs); $files = @array_values($files);


    ?>
    <!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>Directory Listing of <?=dirname($_SERVER['PHP_SELF']).'/'.$leadon;?></title>
    <link rel="stylesheet" type="text/css" href="dlf/styles.css" />
    <?
    if($showthumbnails) {
    ?>
    <script language="javascript" type="text/javascript">
    <!--
    function o(n, i) {
        document.images['thumb'+n].src = 'dlf/i.php?f='+i;

    }

    function f(n) {
        document.images['thumb'+n].src = 'dlf/trans.gif';
    }
    //-->
    </script>
    <?
    }
    ?>
    </head>
    <body>
    <div id="container">
      <h1>Directory Listing of <?=dirname($_SERVER['PHP_SELF']).'/'.$leadon;?></h1>
      <div id="breadcrumbs"> <a href="<?=$_SERVER['PHP_SELF'];?>">home</a> 
      <?
          $breadcrumbs 
    split('/'$leadon);
          if((
    $bsize sizeof($breadcrumbs))>0) {
              
    $sofar '';
              for(
    $bi=0;$bi<($bsize-1);$bi++) {
                
    $sofar $sofar $breadcrumbs[$bi] . '/';
                echo 
    ' &gt; <a href="'.$_SERVER['PHP_SELF'].'?dir='.urlencode($sofar).'">'.$breadcrumbs[$bi].'</a>';
            }
          }
      
        
    $baseurl $_SERVER['PHP_SELF'] . '?dir='.$_GET['dir'] . '&amp;';
        
    $fileurl 'sort=name&amp;order=asc';
        
    $sizeurl 'sort=size&amp;order=asc';
        
    $dateurl 'sort=date&amp;order=asc';
        
        switch (
    $_GET['sort']) {
            case 
    'name':
                if(
    $_GET['order']=='asc'$fileurl 'sort=name&amp;order=desc';
                break;
            case 
    'size':
                if(
    $_GET['order']=='asc'$sizeurl 'sort=size&amp;order=desc';
                break;
                
            case 
    'date':
                if(
    $_GET['order']=='asc'$dateurl 'sort=date&amp;order=desc';
                break;  
            default:
                
    $fileurl 'sort=name&amp;order=desc';
                break;
        }
      
    ?>
      </div>
      <div id="listingcontainer">
        <div id="listingheader"> 
        <div id="headerfile"><a href="<?=$baseurl $fileurl;?>">File</a></div>
        <div id="headersize"><a href="<?=$baseurl $sizeurl;?>">Size</a></div>
        <div id="headermodified"><a href="<?=$baseurl $dateurl;?>">Last Modified</a></div>
        </div>
        <div id="listing">
        <?
        $class 
    'b';
        if(
    $dirok) {
        
    ?>
        <div><a href="<?=$_SERVER['PHP_SELF'].'?dir='.urlencode($dotdotdir);?>" class="<?=$class;?>"><img src="dlf/dirup.png" alt="Folder" /><strong>..</strong> <em>-</em> <?=date ("M d Y h:i:s A"filemtime($dotdotdir));?></a></div>
        <?
            
    if($class=='b'$class='w';
            else 
    $class 'b';
        }
        
    $arsize sizeof($dirs);
        for(
    $i=0;$i<$arsize;$i++) {
        
    ?>
        <div><a href="<?=$_SERVER['PHP_SELF'].'?dir='.urlencode($leadon.$dirs[$i]);?>" class="<?=$class;?>"><img src="dlf/folder.png" alt="<?=$dirs[$i];?>" /><strong><?=$dirs[$i];?></strong> <em>-</em> <?=date ("M d Y h:i:s A"filemtime($leadon.$dirs[$i]));?></a></div>
        <?
            
    if($class=='b'$class='w';
            else 
    $class 'b';    
        }
        
        
    $arsize sizeof($files);
        for(
    $i=0;$i<$arsize;$i++) {
            
    $icon 'unknown.png';
            
    $ext strtolower(substr($files[$i], strrpos($files[$i], '.')+1));
            
    $supportedimages = array('gif''png''jpeg''jpg');
            
    $thumb '';
            
            if(
    $showthumbnails && in_array($ext$supportedimages)) {
                
    $thumb '<span><img src="dlf/trans.gif" alt="'.$files[$i].'" name="thumb'.$i.'" /></span>';
                
    $thumb2 ' onmouseover="o('.$i.', \''.urlencode($leadon $files[$i]).'\');" onmouseout="f('.$i.');"';
                
            }
            
            if(
    $filetypes[$ext]) {
                
    $icon $filetypes[$ext];
            }
            
            
    $filename $files[$i];
            if(
    strlen($filename)>43) {
                
    $filename substr($files[$i], 040) . '...';
            }
            
            
    $fileurl $leadon $files[$i];
            if(
    $forcedownloads) {
                
    $fileurl $_SESSION['PHP_SELF'] . '?dir=' urlencode($leadon) . '&download=' urlencode($files[$i]);
            }

        
    ?>
        <div><a href="<?=$fileurl;?>" class="<?=$class;?>"<?=$thumb2;?>><img src="dlf/<?=$icon;?>" alt="<?=$files[$i];?>" /><strong><?=$filename;?></strong> <em><?=round(filesize($leadon.$files[$i])/1024);?>KB</em> <?=date ("M d Y h:i:s A"filemtime($leadon.$files[$i]));?><?=$thumb;?></a></div>
        <?
            
    if($class=='b'$class='w';
            else 
    $class 'b';    
        }    
        
    ?></div>
        <?
        
    if($allowuploads) {
            
    $phpallowuploads = (bool) ini_get('file_uploads');        
            
    $phpmaxsize ini_get('upload_max_filesize');
            
    $phpmaxsize trim($phpmaxsize);
            
    $last strtolower($phpmaxsize{strlen($phpmaxsize)-1});
            switch(
    $last) {
                case 
    'g':
                    
    $phpmaxsize *= 1024;
                case 
    'm':
                    
    $phpmaxsize *= 1024;
            }
        
        
    ?>
        <div id="upload">
            <div id="uploadtitle"><strong>File Upload</strong> (Max Filesize: <?=$phpmaxsize;?>KB)</div>
            <div id="uploadcontent">
                <?
                
    if($phpallowuploads) {
                
    ?>
                <form method="post" action="<?=$_SERVER['PHP_SELF'];?>?dir=<?=urlencode($leadon);?>" enctype="multipart/form-data">
                <input type="file" name="file" /> <input type="submit" value="Upload" />
                </form>
                <?
                
    }
                else {
                
    ?>
                File uploads are disabled in your php.ini file. Please enable them.
                <?
                
    }
                
    ?>
            </div>
            
        </div>
        <?
        
    }
        
    ?>
      </div>
    </div>
    <div id="copy">Directory Listing Script &copy;2005 <a href="http://evoluted.net/">Ash Young</a>. Design by <a href="http://www.tenka.co.uk/">Manny</a>.</div>
    </body>
    </html>
    Edited by L&#181;ke (Forum Moderator): Thread Moved From Website Designing. Please post in the correct section next time, Thanks .
    Last edited by Lµke; 23-02-2007 at 01:43 PM.
    » Carlsta «
    » Currently Got 1571 Reputation Points «



  2. #2
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    Sos Carl, cnt help u with this coding, i've tried editing every line in the needed file you change it in, still nothing.

  3. #3
    Join Date
    Jul 2004
    Location
    Sunshine Coast, Queensland, AU
    Posts
    1,830
    Tokens
    467

    Latest Awards:

    Default

    You would duplicate this
    <form method="post" enctype="multipart/form-data" action="basic.php">
    <INPUT TYPE="file" NAME="userfile" size="27">
    and then you would have to add it to the posting sequence

  4. #4
    Join Date
    Oct 2004
    Location
    Lincoln, Lincolnshire
    Posts
    2,662
    Tokens
    98
    Habbo
    Carlsta

    Latest Awards:

    Default

    Tried duplicating that..
    But then where do i add it
    » Carlsta «
    » Currently Got 1571 Reputation Points «



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •