ilch Forum » Allgemein » HTML, PHP, SQL,... » Download_Bewertung mit Progressbar

Geschlossen
  1. #1
    User Pic
    MOODFOR Mitglied
    Registriert seit
    25.06.2014
    Beiträge
    177
    Beitragswertungen
    2 Beitragspunkte
    Ich habe länger gesucht und anscheinend wurde noch kein Modul veröffentlicht, welche die Download_Bewertung von iLCH modifiziert.

    Mann kan ja zwischen 1-10 und 10 wählen, oben wird dann schließlich die Gesamtbewertung angezeigt. Zum Beispiel "Rating 9,125". Ich würde die Gesamtbewertung gerne in einer Porgressbar ( mit Prozent % ) darstellen.


    Das "Artikelsys_1.2.1 " von "Neo" hat genau eine solche Progressbar :

    gesperrtes Bild

    Diese Progressbar sollte nun auch in der download_übersicht in einer zusätzlichen Spalte untergebracht werden. ( zwischen "files" und "datum" )

    Genau so, nur halt in einer eigenen Spalte ( ist schlecht gegimpt, ich weiß lachen )

    gesperrtes Bild


    Ich glaube dafür werden diese Dateien benötigt :

    <?php
    #   Copyright by: Manuel
    #   Support: www.ilch.de
    
    
    defined ('main') or die ( 'no direct access' );
    
    
    function get_cats_title ( $catsar ) {
      $l = '';
        foreach($catsar as $k => $v) {
          if ( $k != '' AND $v != '' ) {
              $l = $v.' :: '.$l;
            }
        }
        return ($l);
    }
    
    function get_cats_urls ( $catsar ) {
      $l = '';
        foreach($catsar as $k => $v) {
          if ( $k != '' AND $v != '' ) {
              $l = '<a class="smalfont" href="?downloads-'.$k.'">'.$v.'</a><b> &raquo; </b>'.$l;
            }
        }
        return ($l);
    }
    
    function get_cats_array ( $cid , $ar ) {
        if ( empty($cid) ) {
          return ($ar);
        } else {
          $erg = db_query("SELECT cat,id,name FROM prefix_downcats WHERE id = ".$cid);
            $row = db_fetch_assoc($erg);
            $ar[$row['id']] = $row['name'];
          return ( get_cats_array($row['cat'],$ar) );
        }
        if ( $r ) {
          return ($l);
        }
    }
    
    function get_download_size($file) {
      $sizes = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB");
      $size = @filesize($file); if ($size == 0) { return('n/a'); } else {
      return (round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $sizes[$i]); }
    }
    
    function count_files ($cid) {
      $zges = 0;
        $e = db_query("SELECT id FROM prefix_downcats WHERE cat = ".$cid);
        if ( db_num_rows($e) > 0 ) {
          while ($r = db_fetch_assoc($e) ) {
            $zges = $zges + count_files ( $r['id'] );
          }
        }
        $zges = $zges + db_count_query("SELECT COUNT(*) FROM prefix_downloads WHERE cat = ".$cid);
        return ( $zges );
    }
    
    function icUpload () {
    
          $name = escape($_POST['name'],'string');
            $version = escape($_POST['version'],'string');
            $autor = escape($_POST['autor'],'string');
            $surl = escape($_POST['surl'],'string');
            $ssurl = escape($_POST['ssurl'],'string');
          $url = ( empty($_POST['url']) ? '' : escape($_POST['url'],'string') );
            $desc = escape($_POST['desc'],'string');
            $descl = escape($_POST['descl'],'textarea');
    
          if (empty($name)) {
            return ('keinen Namen angegeben.');
          }
    
          if (empty($desc) or empty($descl)) {
            return ('kein langer oder/und kein kurzer Text angegeben.');
          }
    
          if (empty($url) AND empty($_FILES['file']['name'])) {
            return ('Keine Datei oder Link angegeben.');
          }
    
            if (!empty ($_FILES['file']['name']) ) {
    
                $rtype = trim(ic_mime_type ($_FILES['file']['tmp_name']));
            $fname = escape($_FILES['file']['name'],'string');
            $fende = preg_replace("/.+\.([a-zA-Z]+)$/", "\\1", $fname);
            $fende = strtolower($fende);
    
                if ( $_FILES['file']['size'] > 80000000 ) { # 80 mb (80 000 000)
              return ('Die Datei darf NICHT gr&ouml;sser als 80 MBytes sein.');
            }
    
            if (
                  ($fende != 'rar' AND $fende != 'zip' AND $fende != 'tar')
    
              OR (
              $rtype != 'application/x-rar' AND
              $rtype != 'application/x-zip' AND
              $rtype != 'application/x-tar')
    
                ) {
              return ('Die Datei darf nur die Endungen: .zip, .tar oder .rar haben.');
            }
    
            $fname = str_replace ('.'.$fende, '', $fname);
            $fname = preg_replace("/[^a-zA-Z0-9]/", "", $fname);
            $fname = $fname.'.'.$fende;
    
            if (file_exists( 'include/downs/downloads/user_upload/'.$fname ) ) {
              return ('Die Datei existiert bereits und kann nicht &uuml;berschrieben werden.');
            }
    
            if ( move_uploaded_file($_FILES['file']['tmp_name'], 'include/downs/downloads/user_upload/'.$fname) ) {
              $url = 'include/downs/downloads/user_upload/'.$fname;
              @chmod($url, 0777);
                  }
          }
    
          if (empty($url)) {
            return ('Keine Datei oder Link angegeben');
          }
    
          db_query("INSERT INTO prefix_downloads (`time`,`cat`,`creater`,`version`,`url`,surl,`ssurl`,`name`,`desc`,`descl`,pos) VALUES (NOW(),-1,'".$autor."','".$version."','".$url."','".$surl."','".$ssurl."','".$name."','".$desc."','".$descl."','0')");
    
          return (true);
    }
    
    switch ( $menu->get(1) ) {
      default :
            $cid = ( $menu->get(1) ? escape($menu->get(1), 'integer') : 0 );
            $erg = db_query("SELECT cat,name FROM prefix_downcats WHERE id = ".$cid." ORDER BY pos");
            if ( db_num_rows($erg) > 0 ) {
              $row = db_fetch_assoc($erg);
                $array = get_cats_array($row['cat'],'');
                if ( !empty($array) ) {
                  $titelzw = get_cats_title($array);
                  $namezw = get_cats_urls($array);
                } else {
                  $titelzw = '';
                    $namezw = '';
                }
              $cattitle = ':: '.$titelzw.$row['name'];
                $catname = '<b> &raquo; </b>'.$namezw.$row['name'];
            } else {
              $cattitle = '';
                $catname = '';
            }
            $title = $allgAr['title'].' :: Downloads '.$cattitle;
        $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>'.$catname;
        $design = new design ( $title , $hmenu );
          $design->header();
            $tpl = new tpl ('downloads' );
        $tpl->set('cid', $cid);
        $erg = db_query("SELECT id,name,`desc` FROM prefix_downcats WHERE cat = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
        if ( db_num_rows($erg) > 0 ) {
              $tpl->out(1); $class = 'Cnorm';
                while ($row = db_fetch_assoc($erg) ) {
                  $row['files'] = count_files($row['id']);
                  $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                    $row['class'] = $class;
                  $tpl->set_ar_out($row,2);
          }
              $tpl->out(3);
            }
    
        # sortierung festlegen
        $sortierung = 'pos ASC';
        $DOM = 'ASC';
        $POM = 'ASC';
        $DAM = 'ASC';
    
        switch ($menu->get(2)) {
          case 'positionDESC' : $sortierung = 'pos DESC'; break;
          case 'positionASC' : $sortierung = 'pos ASC';  $POM = 'DESC'; break;
          case 'downsDESC' : $sortierung = 'downs DESC'; break;
          case 'downsASC' : $sortierung = 'downs ASC'; $DOM = 'DESC'; break;
          case 'dateDESC' : $sortierung = 'time DESC'; break;
          case 'dateASC' : $sortierung = 'time ASC'; $DAM = 'DESC'; break;
        }
    
        $tpl->set ('POM', $POM);
        $tpl->set ('DOM', $DOM);
        $tpl->set ('DAM', $DAM);
    
            $erg = db_query("select id,name,version,ssurl,`desc`,downs,DATE_FORMAT(time,'%d.%m.%Y') as datum from prefix_downloads WHERE cat = ".$cid." ORDER BY ".$sortierung);
            if ( db_num_rows($erg) > 0 ) {
              $tpl->out(4); $class = 'Cnorm';
                while($row = db_fetch_assoc($erg) ) {
            # smal screenshot url
                    $row['ssurl'] = ( (file_exists($row['ssurl']) AND $row['ssurl'] != '') ? '<img src="'.$row['ssurl'].'" alt="'.$row['name'].' '.$row['version'].'" title="'.$row['name'].' '.$row['version'].'" style="float:left; border: none; padding-right:3px;" />' : '' );
            $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                    $row['class'] = $class;
                  $tpl->set_ar_out($row,5);
                }
                $tpl->out(6);
            }
    
        if ( $cid == 0 AND $allgAr['archiv_down_userupload'] == 1 AND loggedin() AND is_writeable ( 'include/downs/downloads/user_upload' ) ) {
          $tpl->out(7);
        }
    
            $design->footer();
          break;
        case 'show' :
    
        $fid = escape($menu->get(2), 'integer');
    
        # kommentar add
        if ((loggedin() OR chk_antispam ('downloads')) AND !empty($_POST['name']) AND !empty($_POST['text']) ) {
          $_POST['text'] = escape($_POST['text'],'textarea');
          $_POST['name'] = escape($_POST['name'],'string');
          db_query("INSERT INTO `prefix_koms` VALUES ('',".$fid.",'dloads','".$_POST['name']."','".$_POST['text']."')");
        }
        # kommentar loeschen
        if ($menu->getA(3) == 'd' AND is_numeric($menu->getE(3)) AND has_right(-9, 'archiv-downloads')) {
          $kommentar_id = escape($menu->getE(3),'integer');
          db_query("DELETE FROM `prefix_koms`WHERE uid = ".$fid." AND cat = 'dloads' AND id = ".$kommentar_id)OR die('dl22');
        }
    
        $erg = db_query("SELECT prefix_downloads.cat,ssurl,surl,url,hits,vote_klicks,vote_wertung,prefix_downloads.name,version,creater,downs,descl,prefix_downloads.id,DATE_FORMAT(time,'%d.%m.%Y') as datum FROM prefix_downloads LEFT JOIN prefix_downcats ON prefix_downcats.id = prefix_downloads.cat WHERE prefix_downloads.id = ".$fid." AND (".$_SESSION['authright']." <= prefix_downcats.recht OR (prefix_downloads.cat = 0 AND prefix_downcats.recht IS NULL))");
        if (@db_num_rows($erg) <> 1) {
          $title = $allgAr['title'].' :: Downloads ';
          $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>';
          $design = new design ( $title , $hmenu );
          $design->header();
          echo 'Der Download wurde nicht gefunden';
          $design->footer(1);
        }
    
            $row = db_fetch_assoc($erg);
    
        # umfrage einen hoch zaehlen ...
        if ( $menu->getA(3) == 'z' AND is_numeric($menu->getE(3)) AND !isset ($_SESSION['downDoVote'][$row['id']]) AND loggedin() ) {
          $_SESSION['downDoVote'][$row['id']] = 'o';
          $row['vote_wertung'] = round ( ( ( $row['vote_wertung'] * $row['vote_klicks'] ) + $menu->getE(3) ) / ( $row['vote_klicks'] + 1 ) , 3 );
          $row['vote_klicks']++;
          db_query("UPDATE prefix_downloads SET vote_wertung = ".$row['vote_wertung'].", vote_klicks = ".$row['vote_klicks']." WHERE id = ".$row['id']);
        }
        if ( !isset ($_SESSION['downDoKlick'][$row['id']]) ) {
          $_SESSION['downDoKlick'][$row['id']] = 'o';
          db_query("UPDATE prefix_downloads SET hits = hits +1 WHERE id = ".$fid);
        }
    
            $cid = $row['cat'];
            $erg1 = db_query("SELECT id,cat,name FROM prefix_downcats WHERE id = ".$cid);
            if ( db_num_rows($erg1) > 0 ) {
              $row1 = db_fetch_assoc($erg1);
                $array = get_cats_array($row1['cat'],'');
                if ( !empty($array) ) {
                  $titelzw = get_cats_title($array);
                  $namezw = get_cats_urls($array);
                } else {
                  $titelzw = '';
                    $namezw = '';
                }
              $cattitle = ':: '.$titelzw.$row1['name'].' :: '.$row['name'].' '.$row['version'];
                $catname = '<b> &raquo; </b>'.$namezw.'<a class="smalfont" href="?downloads-'.$row1['id'].'">'.$row1['name'].'</a><b> &raquo; </b>'.$row['name'].' '.$row['version'];
            } else {
              $cattitle = '';
                $catname = '';
            }
            $tpl = new tpl ('downloads_show' );
            $row['ssurl'] = ( $row['ssurl'] != '' ? '<img src="'.$row['ssurl'].'" alt="'.$row['name'].' '.$row['version'].'" title="'.$row['name'].' '.$row['version'].'" style="float:left; border: none; padding-right:5px;" />' : '' );
        $row['surl']  = ( empty($row['surl']) ? '' : '&nbsp;&nbsp;&nbsp; <a href="'.$row['surl'].'" target="_blank">Demo/Screenshot</a>' );
            $row['size']  = get_download_size($row['url']);
            $row['descl'] = bbcode($row['descl']);
            $row['version_kl'] = (empty($row['version'])?'':'('.$row['version'].')');
        $title = $allgAr['title'].' :: Downloads '.$cattitle;
        $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>'.$catname;
        $design = new design ( $title , $hmenu );
        $design->header();
        $row['uname'] = get_n($_SESSION['authid']);
        $row['ANTISPAM'] = (loggedin()?'':get_antispam ('downloads', 0));
        $tpl->set_ar_out($row,0);
        # kommentar show
        $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['id']." AND cat = 'dloads' ORDER BY id DESC");
        $ergAnz1 = db_num_rows($erg2);
        if ( $ergAnz1 == 0 ) {
        echo '<br /><br /> <b>'.$lang['nocomments'].'</b><br />';
        $tpl->out(1);
        } else {
        $tpl->out(1);
        $zahl = $ergAnz1;
        while ($row2 = db_fetch_assoc($erg2)) {
        $row2['text'] = bbcode(trim($row2['text']));
        if (has_right(-9, 'archiv-downloads')) {
        $row2['text'] .= '<a href="index.php?downloads-show-'.$row['id'].'-d'.$row2['id'].'"><img src="include/images/icons/del.gif" alt="löschen" border="0" title="löschen" /></a>';
        }
        $tpl->set_ar_out(array('name' => $row2['name'], 'text' => $row2['text'], 'zahl' => $zahl ),2);
        $zahl--;
        }
        }
        $tpl->out(3);
        # kommentar show ende
        $design->footer();
            //Download erlauben
            $_SESSION['download'][$fid] = true;
          break;
        case 'down' :
            $fid = intval($menu->get(2));
            if (!isset($_SESSION['download'][$fid])) {
                header('Location: ' . 'http://' . $_SERVER["HTTP_HOST"] . dirname($_SERVER["SCRIPT_NAME"]) . '/index.php?downloads');
                break;
            }
            $qry = db_query("SELECT d.`url`, IFNULL(c.`recht`,0) AS recht FROM `prefix_downloads` d LEFT JOIN `prefix_downcats` c ON c.`id` = d.`cat` WHERE d.`id` = $fid");
            $row = db_fetch_assoc($qry);
            $url = 'http://' . $_SERVER["HTTP_HOST"] . dirname($_SERVER["SCRIPT_NAME"]) . '/index.php?downloads';
            if ($qry !== false and has_right($row['recht'])) {
                db_query("UPDATE prefix_downloads SET downs = downs +1 WHERE id = " . $fid);
                if (file_exists($row['url'])) {
                    header('Content-type: application/octet-stream');
                    header('Content-Disposition: attachment; filename="' . basename($row['url']) . '"');
                    readfile($row['url']);
                    exit;
                } else {
                    $url = iurlencode($row['url']);
                }
                $error = false;
            }
            header('Location: ' . $url);
            break;
      case 'upload' :
        if ( $allgAr['archiv_down_userupload'] == 1 AND loggedin() AND is_writeable ( 'include/downs/downloads/user_upload' ) ) {
          $title = $allgAr['title'].' :: Downloads :: User - Upload';
          $hmenu = '<a class="smalfont" href="?downloads">Downloads</a><b> &raquo; </b>User - Upload';
          $design = new design ( $title , $hmenu );
            $design->header();
    
          $re = icUpload();
            if ($re === true) {
            echo 'Erfolgreich eingetragen! ... ein Moderator oder Admin dieser Seite wird den Download in n&auml;chster Zeit freischalten.';
          } else {
            echo '<b>Error:</b><br />'.$re;
          }
    
          $design->footer();
        }
        break;
    }
    ?>


    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
                    <th width="80%" align="center"><b>{_lang_category}</b></th>
        <th width="20%" align="center">{_lang_files}</th>
            </tr>
            {EXPLODE}
            <tr class="{class}">
              <td><a href="index.php?downloads-{id}">{name}</a><br /><span class="smalfont">»&nbsp;{desc}</span></td>
                    <td align="center">{files}</td>
            </tr>
            {EXPLODE}
    </table>
    <br /><br />
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
                    <th width="65%" align="center"><b><a href="index.php?downloads-{cid}-position{POM}">{_lang_files}</b></a></th>
        <th width="20%" align="center"><a href="index.php?downloads-{cid}-date{DAM}">{_lang_date}</a></th>
        <th width="15%" align="center"><a href="index.php?downloads-{cid}-downs{DOM}">{_lang_downs}</a></th>
            </tr>
      {EXPLODE}
       <tr class="{class}">
               <td><a href="index.php?downloads-show-{id}">{ssurl}{name} {version}</a><br /><span class="smalfont">»&nbsp;{desc}</span></td>
                     <td align="center">{datum}</td>
         <td align="center">{downs}</td>
             </tr>
       {EXPLODE}
    </table>
    
    
    {EXPLODE}
    <p></p><p></p>
    <form action="index.php?downloads-upload" method="POST" enctype="multipart/form-data">
      <fieldset>
        <legend><b>{_lang_fileup}</b></legend>
              <label style="width:100px; float:left;">{_lang_name}</label><input type="text" name="name" maxlength="50" value="" /><br />
              <label style="width:100px; float:left;">{_lang_version}</label><input type="text" name="version" maxlength="10" size="11" value="" /><br />
              <label style="width:100px; float:left;">{_lang_author}</label><input type="text" name="autor" maxlength="50" value="" /><br />
              <label style="width:100px; float:left;">{_lang_linkor}</label><input type="text" name="url" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_upload}</label><input type="file" name="file" size="28" /><br />
              <label style="width:100px; float:left;">{_lang_demolink}</label><input type="text" name="surl" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_preview}</label><input type="text" name="ssurl" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_shortdesc}</label><input type="text" name="desc" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_desc}</label><textarea cols="40" rows="4" name="descl"></textarea><br />
              <label style="width:100px; float:left;"></label><input type="submit" value="Absenden" name="sub"><br />
      </fieldset>
    </form>


    <script language="JavaScript" type="text/javascript">
    <!--
    function doVote(n1,did) {
      document.location.href="index.php?downloads-show-" + did + "-z"+n1;
    }
    //-->
    </script>
    
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
            <th colspan="4" align="center"><b>{name} {version}</b></th>
        </tr><tr>
          <td class="Cmite">{_lang_name} (Version)</td>
            <td class="Cnorm">{name} {version_kl}</td>
        <td class="Cmite" colspan="2" valign="top">{_lang_voting} {vote_wertung}
      </tr><tr>
          <td class="Cmite">{_lang_author}</td>
            <td class="Cnorm">{creater}</td>
        <td class="Cnorm" rowspan="2" colspan="2" align="center">
        <table class="border" border="0" cellspacing="1" cellpadding="0">
          <tr>
            <td class="Cdark" onClick="doVote(1,{id})" style="cursor:pointer">&nbsp;1&nbsp;</td>
            <td class="Cmite" onClick="doVote(2,{id})" style="cursor:pointer">&nbsp;2&nbsp;</td>
            <td class="Cdark" onClick="doVote(3,{id})" style="cursor:pointer">&nbsp;3&nbsp;</td>
            <td class="Cmite" onClick="doVote(4,{id})" style="cursor:pointer">&nbsp;4&nbsp;</td>
            <td class="Cdark" onClick="doVote(5,{id})" style="cursor:pointer">&nbsp;5&nbsp;</td>
            <td class="Cmite" onClick="doVote(6,{id})" style="cursor:pointer">&nbsp;6&nbsp;</td>
            <td class="Cdark" onClick="doVote(7,{id})" style="cursor:pointer">&nbsp;7&nbsp;</td>
            <td class="Cmite" onClick="doVote(8,{id})" style="cursor:pointer">&nbsp;8&nbsp;</td>
            <td class="Cdark" onClick="doVote(9,{id})" style="cursor:pointer">&nbsp;9&nbsp;</td>
            <td class="Cmite" onClick="doVote(10,{id})" style="cursor:pointer">&nbsp;10&nbsp;</td>
          </tr>
        </table>
        </td>
        </tr><tr>
          <td class="Cmite">{_lang_date}</td>
            <td class="Cnorm">{datum}</td>
      </tr><tr>
          <td class="Cmite" width="110">{_lang_size}</td>
            <td class="Cnorm">{size}</td>
        <td class="Cmite" width="110">{_lang_voter}</td>
            <td class="Cnorm">{vote_klicks}</td>
        </tr><tr>
          <td class="Cmite">{_lang_downloads}</td>
            <td class="Cnorm">{downs}</td>
          <td class="Cmite">{_lang_seenfrom}</td>
            <td class="Cnorm">{hits}</td>
        </tr>
    </table>
    <p></p>
    <b><center><a href="index.php?downloads-down-{id}">{_lang_download}</a>{surl}</center></b>
    <p></p>
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
    <tr>
    <th class="Cdark">{_lang_desc}</th>
    </tr>
    <td class="Cnorm">{ssurl}{descl}</td>
    </tr>
    <tr>
    <td class="Cnorm">
    <form action="index.php?downloads-show-{id}" method="POST">
    <fieldset>
    <legend>{_lang_writecomment}</legend>
    <input type="text" name="name" value="{uname}" /> <input type="submit" value="{_lang_enter}"><br />
    <textarea cols="50" rows="2" name="text"></textarea><br />
    {ANTISPAM}
    </fieldset>
    </form>
    </td>
    </tr>
    <tr>
    <td class="Cnorm">
    {EXPLODE}
    {EXPLODE}
    <span class="Cmite" style="width:100%;display:block;"><span style="display:block;padding:2px 2px 2px 5px;"># <b>{zahl}</b> von {name}</span> </span>
    <span class="Cnorm" style="width:100%;display:block;"><span style="display:block;padding:4px 4px 4px 6px;">{text}</span> </span>
    <br />
    {EXPLODE}
    </td>
    </tr>
    
    </table>


    Wie macht man sowas ?

    Vielen Dank lächeln


    verwendete ilch Version: 1.1 P
    The government pretend,
    they your friend. And then when you steal some shit,they put you in jail
    0 Mitglieder finden den Beitrag gut.
  2. #2
    User Pic
    FeTTsack Hall Of Fame
    Registriert seit
    27.06.2012
    Beiträge
    188
    Beitragswertungen
    26 Beitragspunkte
    schau mal hier drauf: getbootstrap.com/components/#progress

    und um das richtig anzeigen zu können musst du halt nur die %-Werte richtig berechnen lassen und einfügen. Die anzeige übernimmt dann Bootstrap für dich zwinker

    darfst nur nicht vergessen bootstrap in dein design einzufügen lächeln
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
    
    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>


    sonst schau ich mir das mal heut abend an und zeig dir wie genau man das im code einfügen muss, wenn es selbst nicht schafst lächeln

    lg fetti
    1 Mitglieder finden den Beitrag gut.
  3. #3
    User Pic
    blackcoder Entwickler
    Registriert seit
    22.05.2014
    Beiträge
    2.414
    Beitragswertungen
    394 Beitragspunkte
    1 Mitglieder finden den Beitrag gut.
  4. #4
    User Pic
    MOODFOR Mitglied
    Registriert seit
    25.06.2014
    Beiträge
    177
    Beitragswertungen
    2 Beitragspunkte
    Danke lächeln
    Also ich wüsste jetzt, wie man eine solche Progressbar in eine einfache HTML Seite einbindet, doch wie ich das in die Download_Bewertung und Übersicht integriere kann ich nicht gänzlich nachvollziehen. weinen

    Gibt´s einen richtigen Unterscheid zwischen der Bootstrap Progressbar und der HTML5 Progressbar ?


    Zuletzt modifiziert von HATEFRONT am 13.05.2015 - 18:11:51
    The government pretend,
    they your friend. And then when you steal some shit,they put you in jail
    0 Mitglieder finden den Beitrag gut.
  5. #5
    User Pic
    dastiii Mitglied
    Registriert seit
    27.12.2005
    Beiträge
    2.354
    Beitragswertungen
    84 Beitragspunkte
    Ist das so ausreichend?

    gesperrtes Bild
    i.imgur.com/MX9E3jI.png
    0 Mitglieder finden den Beitrag gut.
  6. #6
    User Pic
    Ahrtas Moderator
    Registriert seit
    17.12.2007
    Beiträge
    2.368
    Beitragswertungen
    210 Beitragspunkte
    Wäre es nicht besser ohne das "%"-Prozent, so würde man denken ah okey noch 14.5% bis 100%, aber wofür überhaupt?

    Progressbar ist okey, aber ich denke der Download mit 85% ist genauso gut wie mit 100% vorallem weil das Ganze auch von der Bewerteraktivität und deren Geschmack abhängt, ich denke nicht dass sie jeden Download nach Funktionalität/Code bewerten. zwinker
    1 Mitglieder finden den Beitrag gut.
  7. #7
    User Pic
    dastiii Mitglied
    Registriert seit
    27.12.2005
    Beiträge
    2.354
    Beitragswertungen
    84 Beitragspunkte
    Ist mir relativ egal, muss ja jeder selber wissen, wie er es haben möchte.

    Aber durch das dicke und fette 'Bewertung' darüber, muss man meiner Meinung nach schon ein vehementer Intelligenzverweigerer sein, wenn man das nicht kapiert. :_P

    gesperrtes Bild
    i.imgur.com/DalZgqp.png

    gesperrtes Bild
    i.imgur.com/X9Lm8IJ.png
    1 Mitglieder finden den Beitrag gut.
  8. #8
    User Pic
    MOODFOR Mitglied
    Registriert seit
    25.06.2014
    Beiträge
    177
    Beitragswertungen
    2 Beitragspunkte
    WOW, Dankeschön lächeln
    Ich finde diese Darstellung am besten.

    gesperrtes Bild
    The government pretend,
    they your friend. And then when you steal some shit,they put you in jail
    0 Mitglieder finden den Beitrag gut.
  9. #9
    User Pic
    dastiii Mitglied
    Registriert seit
    27.12.2005
    Beiträge
    2.354
    Beitragswertungen
    84 Beitragspunkte
    Okay,

    dann einmal die Unterschiede der downloads_show.htm in include/templates/: tobi.science/downloads_show_diff.htm
    (in allen Zeilen, die gelb hinterlegt sind, wurden Änderungen vorgenommen).

    Anschließend dann noch der CSS Kram, der in die style.css deines Designs kommt:
    #download_wertung_container {
      height:100%;
      width:100%;
      border: 1px solid #333;
      margin-left: -1px;
      position: relative;
    }
    
    #download_wertung {
      height: 100%;
      text-align: center;
      /*background-color: #888;*/
    }
    
    #download_wertung.low { background-color: #FF5050; }
    #download_wertung.mid { background-color: #FFFF66; }
    #download_wertung.high { background-color: #00CC66; }
    
    #download_wertung_text {
      position: absolute;
      margin: 0 auto;
      left:0;
      right: 0;
      width: 80px;
    }
    
    #download_wertung_text div {
      position: relative;
      text-align:center;
      color: #000;
    }


    Standardmäßige sind die unterschiedlichen Farben aktiviert, ändern sich mit jedem Drittel:

    i.imgur.com/bzJ4Zkd.png
    i.imgur.com/wPuHhyY.png
    i.imgur.com/e4CPktu.png

    Wenn du das nicht möchtest, einfach den if-Teil nach '// Decides which background-color to use' in der downloads_show.htm und den CSS-Code für die Klassen low, mid, high in der style.css rausschmeißen. Anschließend noch die Standardhintergrundfarbe bei #download_wertung auskommentieren.

    Andere CSS-Sachen müssten eventuell dann noch angepasst werden. Probier es einfach mal aus, aber mach vorher einer Backup deiner Dateien.

    Wenn sonst noch was ist, einfach Bescheid geben.

    PS: Wegen der Downloadübersicht, schau' ich noch einmal.
    -----------------------
    Alternativ noch einmal die komplette, neue downloads_show.htm:
    <script language="JavaScript" type="text/javascript">
    <!--
    function doVote(n1,did) {
      document.location.href="index.php?downloads-show-" + did + "-z"+n1;
    }
    //-->
    </script>
    
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
    		<th colspan="4" align="center"><b>{name} {version}</b></th>
    	</tr><tr>
    	  <td class="Cmite">{_lang_name}</td>
    		<td class="Cnorm">{name}</td>
        <td class="Cmite" colspan="2" valign="top" align="center"><strong>{_lang_voting}</strong></td>
      </tr><tr>
    	  <td class="Cmite">Version</td>
    		<td class="Cnorm">{version_kl}</td>
        <td class="Cmite" colspan="2" valign="top">
          <div id="download_wertung_container">
            <div id="download_wertung_text"></div>
            <div id="download_wertung">&nbsp;</div>
          </div>
        </td>
        <script>
          // Retrieves the elements we need to manipulate from the DOM
          var el = document.getElementById('download_wertung');
          var container = document.getElementById('download_wertung_text');
    
          // Calculates the percentage and generates the text
          var percent = {vote_wertung} * 10;
          var points = String(Math.round(percent * 10) / 10).replace(/\./g, ',');
          var pointsText = points + " / 100";
    
          var htmlClass = "";
    
          // Decides which background-color to use
          if (percent <= 33) {
            htmlClass = "low";
          } else if (percent > 33 && percent < 66) {
            htmlClass = "mid";
          } else {
            htmlClass = "high";
          }
    
          // Sets the width and color/class of the progressbar
          el.style.width = percent + "%";
          el.className = htmlClass;
    
          // Adds the points to the DOM
          container.innerHTML = '<div>' + pointsText + '</div>';
        </script>
      </tr><tr>
    	  <td class="Cmite">{_lang_author}</td>
    		<td class="Cnorm">{creater}</td>
        <td class="Cnorm" rowspan="2" colspan="2" align="center">
        <table class="border" border="0" cellspacing="1" cellpadding="0">
          <tr>
            <td class="Cdark" onClick="doVote(1,{id})" style="cursor:pointer">&nbsp;1&nbsp;</td>
            <td class="Cmite" onClick="doVote(2,{id})" style="cursor:pointer">&nbsp;2&nbsp;</td>
            <td class="Cdark" onClick="doVote(3,{id})" style="cursor:pointer">&nbsp;3&nbsp;</td>
            <td class="Cmite" onClick="doVote(4,{id})" style="cursor:pointer">&nbsp;4&nbsp;</td>
            <td class="Cdark" onClick="doVote(5,{id})" style="cursor:pointer">&nbsp;5&nbsp;</td>
            <td class="Cmite" onClick="doVote(6,{id})" style="cursor:pointer">&nbsp;6&nbsp;</td>
            <td class="Cdark" onClick="doVote(7,{id})" style="cursor:pointer">&nbsp;7&nbsp;</td>
            <td class="Cmite" onClick="doVote(8,{id})" style="cursor:pointer">&nbsp;8&nbsp;</td>
            <td class="Cdark" onClick="doVote(9,{id})" style="cursor:pointer">&nbsp;9&nbsp;</td>
            <td class="Cmite" onClick="doVote(10,{id})" style="cursor:pointer">&nbsp;10&nbsp;</td>
          </tr>
        </table>
        </td>
    	</tr><tr>
    	  <td class="Cmite">{_lang_date}</td>
    		<td class="Cnorm">{datum}</td>
      </tr><tr>
    	  <td class="Cmite" width="110">{_lang_size}</td>
    		<td class="Cnorm">{size}</td>
        <td class="Cmite" width="110">{_lang_voter}</td>
    		<td class="Cnorm">{vote_klicks}</td>
    	</tr><tr>
    	  <td class="Cmite">{_lang_downloads}</td>
    		<td class="Cnorm">{downs}</td>
    	  <td class="Cmite">{_lang_seenfrom}</td>
    		<td class="Cnorm">{hits}</td>
    	</tr>
    </table>
    <p></p>
    <b><center><a href="index.php?downloads-down-{id}">{_lang_download}</a>{surl}</center></b>
    <p></p>
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr>
    	  <th class="Cdark">{_lang_desc}</th>
      </tr>
    		<td class="Cnorm">{ssurl}{descl}</td>
    	</tr>
    </table>



    Zuletzt modifiziert von dastiii am 14.05.2015 - 17:38:18
    1 Mitglieder finden den Beitrag gut.
  10. #10
    User Pic
    MOODFOR Mitglied
    Registriert seit
    25.06.2014
    Beiträge
    177
    Beitragswertungen
    2 Beitragspunkte
    Dankeschön, funktioniert perfekt.

    Ich habe das folgendermaßen eingefügt ;

    <script language="JavaScript" type="text/javascript">
    <!--
    function doVote(n1,did) {
      document.location.href="index.php?downloads-show-" + did + "-z"+n1;
    }
    //-->
    </script>
    
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
            <th colspan="4" align="center"><b>{name} {version}</b></th>
        </tr><tr>
          <td class="Cmite">{_lang_name}</td>
            <td class="Cnorm">{name}</td>
        <td class="Cmite" colspan="2" valign="top" align="center"><strong>{_lang_voting}</strong></td>
      </tr><tr>
          <td class="Cmite">Version</td>
            <td class="Cnorm">{version_kl}</td>
        <td class="Cmite" colspan="2" valign="top">
          <div id="download_wertung_container">
            <div id="download_wertung_text"></div>
            <div id="download_wertung">&nbsp;</div>
          </div>
        </td>
        <script>
          // Retrieves the elements we need to manipulate from the DOM
          var el = document.getElementById('download_wertung');
          var container = document.getElementById('download_wertung_text');
    
          // Calculates the percentage and generates the text
          var percent = {vote_wertung} * 10;
          var points = String(Math.round(percent * 10) / 10).replace(/\./g, ',');
          var pointsText = points + " / 100";
    
          var htmlClass = "";
    
          // Decides which background-color to use
          if (percent <= 33) {
            htmlClass = "low";
          } else if (percent > 33 && percent < 66) {
            htmlClass = "mid";
          } else {
            htmlClass = "high";
          }
    
          // Sets the width and color/class of the progressbar
          el.style.width = percent + "%";
          el.className = htmlClass;
    
          // Adds the points to the DOM
          container.innerHTML = '<div>' + pointsText + '</div>';
        </script>
      </tr><tr>
          <td class="Cmite">{_lang_author}</td>
            <td class="Cnorm">{creater}</td>
        <td class="Cnorm" rowspan="2" colspan="2" align="center">
        <table class="border" border="0" cellspacing="1" cellpadding="0">
          <tr>
            <td class="Cdark" onClick="doVote(1,{id})" style="cursor:pointer">&nbsp;1&nbsp;</td>
            <td class="Cmite" onClick="doVote(2,{id})" style="cursor:pointer">&nbsp;2&nbsp;</td>
            <td class="Cdark" onClick="doVote(3,{id})" style="cursor:pointer">&nbsp;3&nbsp;</td>
            <td class="Cmite" onClick="doVote(4,{id})" style="cursor:pointer">&nbsp;4&nbsp;</td>
            <td class="Cdark" onClick="doVote(5,{id})" style="cursor:pointer">&nbsp;5&nbsp;</td>
            <td class="Cmite" onClick="doVote(6,{id})" style="cursor:pointer">&nbsp;6&nbsp;</td>
            <td class="Cdark" onClick="doVote(7,{id})" style="cursor:pointer">&nbsp;7&nbsp;</td>
            <td class="Cmite" onClick="doVote(8,{id})" style="cursor:pointer">&nbsp;8&nbsp;</td>
            <td class="Cdark" onClick="doVote(9,{id})" style="cursor:pointer">&nbsp;9&nbsp;</td>
            <td class="Cmite" onClick="doVote(10,{id})" style="cursor:pointer">&nbsp;10&nbsp;</td>
          </tr>
        </table>
        </td>
        </tr><tr>
          <td class="Cmite">{_lang_date}</td>
            <td class="Cnorm">{datum}</td>
      </tr><tr>
          <td class="Cmite" width="110">{_lang_size}</td>
            <td class="Cnorm">{size}</td>
        <td class="Cmite" width="110">{_lang_voter}</td>
            <td class="Cnorm">{vote_klicks}</td>
        </tr><tr>
          <td class="Cmite">{_lang_downloads}</td>
            <td class="Cnorm">{downs}</td>
          <td class="Cmite">{_lang_seenfrom}</td>
            <td class="Cnorm">{hits}</td>
        </tr>
    </table>
    <p></p>
    <b><center><a href="index.php?downloads-down-{id}">{_lang_download}</a>{surl}</center></b>
    <p></p>
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
    <tr>
    <th class="Cdark">{_lang_desc}</th>
    </tr>
    <td class="Cnorm">{ssurl}{descl}</td>
    </tr>
    <tr>
    <td class="Cnorm">
    <form action="index.php?downloads-show-{id}" method="POST">
    <fieldset>
    <legend>{_lang_writecomment}</legend>
    <input type="text" name="name" value="{uname}" /> <input type="submit" value="{_lang_enter}"><br />
    <textarea cols="50" rows="2" name="text"></textarea><br />
    {ANTISPAM}
    </fieldset>
    </form>
    </td>
    </tr>
    <tr>
    <td class="Cnorm">
    {EXPLODE}
    {EXPLODE}
    <span class="Cmite" style="width:100%;display:block;"><span style="display:block;padding:2px 2px 2px 5px;"># <b>{zahl}</b> von {name}</span> </span>
    <span class="Cnorm" style="width:100%;display:block;"><span style="display:block;padding:4px 4px 4px 6px;">{text}</span> </span>
    <br />
    {EXPLODE}
    </td>
    </tr>
    
    </table>


    ZitatZitat
    PS: Wegen der Downloadübersicht, schau' ich noch einmal.


    Dankeschön lächeln
    The government pretend,
    they your friend. And then when you steal some shit,they put you in jail
    0 Mitglieder finden den Beitrag gut.
  11. #11
    User Pic
    dastiii Mitglied
    Registriert seit
    27.12.2005
    Beiträge
    2.354
    Beitragswertungen
    84 Beitragspunkte
    So?

    gesperrtes Bild
    i.imgur.com/jlkbcTf.png

    Oder auf irgendeine Weise anders? Sortieren funktioniert selbstverständlich auch.

    EDIT: Ich mach es mal so fertig, also:

    Downloadübersicht (index.php?downloads)

    Komplette, geänderte downloads.htm:
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
    		<th width="80%" align="center"><b>{_lang_category}</b></th>
        <th width="20%" align="center">{_lang_files}</th>
    	</tr>
    	{EXPLODE}
    	<tr class="{class}">
    	  <td><a href="index.php?downloads-{id}">{name}</a><br /><span class="smalfont">&raquo;&nbsp;{desc}</span></td>
    		<td align="center">{files}</td>
    	</tr>
    	{EXPLODE}
    </table>
    <br /><br />
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
    		<th width="65%" align="center"><b><a href="index.php?downloads-{cid}-position{POM}">{_lang_files}</b></a></th>
        <th width="20%" align="center"><a href="index.php?downloads-{cid}-rating{RAM}">{_lang_voting}</a></th>
        <th width="15%" align="center"><a href="index.php?downloads-{cid}-downs{DOM}">{_lang_downs}</a></th>
    	</tr>
      {EXPLODE}
       <tr class="{class}">
    	   <td valign="top"><a href="index.php?downloads-show-{id}">{ssurl}{name} {version}</a><br /><span class="smalfont">&raquo;&nbsp;{desc}</span></td>
         <td>
           <div class="download_wertung_container list">
             <div class="download_wertung_text">{vote_progressbar_text}</div>
             <div class="download_wertung {vote_progressbar_class}" style="width: {vote_progressbar_value}%;">&nbsp;</div>
           </div>
         </td>
         <td align="center">{downs}</td>
    	 </tr>
       {EXPLODE}
    </table>
    
    
    {EXPLODE}
    <p></p><p></p>
    <form action="index.php?downloads-upload" method="POST" enctype="multipart/form-data">
      <fieldset>
        <legend><b>{_lang_fileup}</b></legend>
    	  <label style="width:100px; float:left;">{_lang_name}</label><input type="text" name="name" maxlength="50" value="" /><br />
    	  <label style="width:100px; float:left;">{_lang_version}</label><input type="text" name="version" maxlength="10" size="11" value="" /><br />
    	  <label style="width:100px; float:left;">{_lang_author}</label><input type="text" name="autor" maxlength="50" value="" /><br />
    	  <label style="width:100px; float:left;">{_lang_linkor}</label><input type="text" name="url" size="40" maxlength="100" value="" /><br />
    	  <label style="width:100px; float:left;">{_lang_upload}</label><input type="file" name="file" size="28" /><br />
    	  <label style="width:100px; float:left;">{_lang_demolink}</label><input type="text" name="surl" size="40" maxlength="100" value="" /><br />
    	  <label style="width:100px; float:left;">{_lang_preview}</label><input type="text" name="ssurl" size="40" maxlength="100" value="" /><br />
    	  <label style="width:100px; float:left;">{_lang_shortdesc}</label><input type="text" name="desc" size="40" maxlength="100" value="" /><br />
    	  <label style="width:100px; float:left;">{_lang_desc}</label><textarea cols="40" rows="4" name="descl"></textarea><br />
    	  <label style="width:100px; float:left;"></label><input type="submit" value="Absenden" name="sub"><br />
      </fieldset>
    </form>
    Änderungen an downloads.htm
    @@ -14,17 +14,22 @@
     <br /><br />
     {EXPLODE}
     <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
       <tr class="Chead">
     		<th width="65%" align="center"><b><a href="index.php?downloads-{cid}-position{POM}">{_lang_files}</b></a></th>
    -    <th width="20%" align="center"><a href="index.php?downloads-{cid}-date{DAM}">{_lang_date}</a></th>
    +    <th width="20%" align="center"><a href="index.php?downloads-{cid}-rating{RAM}">{_lang_voting}</a></th>
         <th width="15%" align="center"><a href="index.php?downloads-{cid}-downs{DOM}">{_lang_downs}</a></th>
     	</tr>
       {EXPLODE}
        <tr class="{class}">
    -	   <td><a href="index.php?downloads-show-{id}">{ssurl}{name} {version}</a><br /><span class="smalfont">&raquo;&nbsp;{desc}</span></td>
    -		 <td align="center">{datum}</td>
    +	   <td valign="top"><a href="index.php?downloads-show-{id}">{ssurl}{name} {version}</a><br /><span class="smalfont">&raquo;&nbsp;{desc}</span></td>
    +     <td>
    +       <div class="download_wertung_container list">
    +         <div class="download_wertung_text">{vote_progressbar_text}</div>
    +         <div class="download_wertung {vote_progressbar_class}" style="width: {vote_progressbar_value}%;">&nbsp;</div>
    +       </div>
    +     </td>
          <td align="center">{downs}</td>
     	 </tr>
        {EXPLODE}
     </table>

    Downloadansicht (index.php?downloads-show-x)

    Komplette, geänderte downloads_show.htm:
    <script language="JavaScript" type="text/javascript">
    <!--
    function doVote(n1,did) {
      document.location.href="index.php?downloads-show-" + did + "-z"+n1;
    }
    //-->
    </script>
    
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
    		<th colspan="4" align="center"><b>{name} {version}</b></th>
    	</tr><tr>
    	  <td class="Cmite">{_lang_name}</td>
    		<td class="Cnorm">{name}</td>
        <td class="Cmite" colspan="2" valign="top" align="center"><strong>{_lang_voting}</strong></td>
      </tr><tr>
    	  <td class="Cmite">Version</td>
    		<td class="Cnorm">{version_kl}</td>
        <td class="Cmite" colspan="2" valign="top">
          <div class="download_wertung_container">
            <div class="download_wertung_text">{vote_progressbar_text}</div>
            <div class="download_wertung {vote_progressbar_class}" style="width: {vote_progressbar_value}%;">&nbsp;</div>
          </div>
        </td>
      </tr><tr>
    	  <td class="Cmite">{_lang_author}</td>
    		<td class="Cnorm">{creater}</td>
        <td class="Cnorm" rowspan="2" colspan="2" align="center">
        <table class="border" border="0" cellspacing="1" cellpadding="0">
          <tr>
            <td class="Cdark" onClick="doVote(1,{id})" style="cursor:pointer">&nbsp;1&nbsp;</td>
            <td class="Cmite" onClick="doVote(2,{id})" style="cursor:pointer">&nbsp;2&nbsp;</td>
            <td class="Cdark" onClick="doVote(3,{id})" style="cursor:pointer">&nbsp;3&nbsp;</td>
            <td class="Cmite" onClick="doVote(4,{id})" style="cursor:pointer">&nbsp;4&nbsp;</td>
            <td class="Cdark" onClick="doVote(5,{id})" style="cursor:pointer">&nbsp;5&nbsp;</td>
            <td class="Cmite" onClick="doVote(6,{id})" style="cursor:pointer">&nbsp;6&nbsp;</td>
            <td class="Cdark" onClick="doVote(7,{id})" style="cursor:pointer">&nbsp;7&nbsp;</td>
            <td class="Cmite" onClick="doVote(8,{id})" style="cursor:pointer">&nbsp;8&nbsp;</td>
            <td class="Cdark" onClick="doVote(9,{id})" style="cursor:pointer">&nbsp;9&nbsp;</td>
            <td class="Cmite" onClick="doVote(10,{id})" style="cursor:pointer">&nbsp;10&nbsp;</td>
          </tr>
        </table>
        </td>
    	</tr><tr>
    	  <td class="Cmite">{_lang_date}</td>
    		<td class="Cnorm">{datum}</td>
      </tr><tr>
    	  <td class="Cmite" width="110">{_lang_size}</td>
    		<td class="Cnorm">{size}</td>
        <td class="Cmite" width="110">{_lang_voter}</td>
    		<td class="Cnorm">{vote_klicks}</td>
    	</tr><tr>
    	  <td class="Cmite">{_lang_downloads}</td>
    		<td class="Cnorm">{downs}</td>
    	  <td class="Cmite">{_lang_seenfrom}</td>
    		<td class="Cnorm">{hits}</td>
    	</tr>
    </table>
    <p></p>
    <b><center><a href="index.php?downloads-down-{id}">{_lang_download}</a>{surl}</center></b>
    <p></p>
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr>
    	  <th class="Cdark">{_lang_desc}</th>
      </tr>
    		<td class="Cnorm">{ssurl}{descl}</td>
    	</tr>
    </table>
    Änderungen an downloads_show.htm
    @@ -8,13 +8,22 @@ function doVote(n1,did) {
     
     <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
       <tr class="Chead">
     		<th colspan="4" align="center"><b>{name} {version}</b></th>
     	</tr><tr>
    -	  <td class="Cmite">{_lang_name} (Version)</td>
    -		<td class="Cnorm">{name} {version_kl}</td>
    -    <td class="Cmite" colspan="2" valign="top">{_lang_voting} {vote_wertung}
    +	  <td class="Cmite">{_lang_name}</td>
    +		<td class="Cnorm">{name}</td>
    +    <td class="Cmite" colspan="2" valign="top" align="center"><strong>{_lang_voting}</strong></td>
    +  </tr><tr>
    +	  <td class="Cmite">Version</td>
    +		<td class="Cnorm">{version_kl}</td>
    +    <td class="Cmite" colspan="2" valign="top">
    +      <div class="download_wertung_container">
    +        <div class="download_wertung_text">{vote_progressbar_text}</div>
    +        <div class="download_wertung {vote_progressbar_class}" style="width: {vote_progressbar_value}%;">&nbsp;</div>
    +      </div>
    +    </td>
       </tr><tr>
     	  <td class="Cmite">{_lang_author}</td>
     		<td class="Cnorm">{creater}</td>
         <td class="Cnorm" rowspan="2" colspan="2" align="center">
         <table class="border" border="0" cellspacing="1" cellpadding="0">

    downloads.php
    Komplette, geänderte downloads.php:
    <?php
    #   Copyright by: Manuel
    #   Support: www.ilch.de
    
    
    defined ('main') or die ( 'no direct access' );
    
    
    function get_cats_title ( $catsar ) {
      $l = '';
    	foreach($catsar as $k => $v) {
    	  if ( $k != '' AND $v != '' ) {
    		  $l = $v.' :: '.$l;
    		}
    	}
    	return ($l);
    }
    
    function get_cats_urls ( $catsar ) {
      $l = '';
    	foreach($catsar as $k => $v) {
    	  if ( $k != '' AND $v != '' ) {
    		  $l = '<a class="smalfont" href="?downloads-'.$k.'">'.$v.'</a><b> &raquo; </b>'.$l;
    		}
    	}
    	return ($l);
    }
    
    function get_cats_array ( $cid , $ar ) {
    	if ( empty($cid) ) {
    	  return ($ar);
    	} else {
    	  $erg = db_query("SELECT cat,id,name FROM prefix_downcats WHERE id = ".$cid);
    		$row = db_fetch_assoc($erg);
    		$ar[$row['id']] = $row['name'];
    	  return ( get_cats_array($row['cat'],$ar) );
    	}
    	if ( $r ) {
    	  return ($l);
    	}
    }
    
    function get_download_size($file) {
      $sizes = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB");
      $size = @filesize($file); if ($size == 0) { return('n/a'); } else {
      return (round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $sizes[$i]); }
    }
    
    function count_files ($cid) {
      $zges = 0;
    	$e = db_query("SELECT id FROM prefix_downcats WHERE cat = ".$cid);
    	if ( db_num_rows($e) > 0 ) {
    	  while ($r = db_fetch_assoc($e) ) {
    	    $zges = $zges + count_files ( $r['id'] );
    	  }
    	}
    	$zges = $zges + db_count_query("SELECT COUNT(*) FROM prefix_downloads WHERE cat = ".$cid);
    	return ( $zges );
    }
    
    function icUpload () {
    
          $name = escape($_POST['name'],'string');
    	    $version = escape($_POST['version'],'string');
    	    $autor = escape($_POST['autor'],'string');
    	    $surl = escape($_POST['surl'],'string');
    	    $ssurl = escape($_POST['ssurl'],'string');
          $url = ( empty($_POST['url']) ? '' : escape($_POST['url'],'string') );
    	    $desc = escape($_POST['desc'],'string');
    	    $descl = escape($_POST['descl'],'textarea');
    
          if (empty($name)) {
            return ('keinen Namen angegeben.');
          }
    
          if (empty($desc) or empty($descl)) {
            return ('kein langer oder/und kein kurzer Text angegeben.');
          }
    
          if (empty($url) AND empty($_FILES['file']['name'])) {
            return ('Keine Datei oder Link angegeben.');
          }
    
    	    if (!empty ($_FILES['file']['name']) ) {
    
    		    $rtype = trim(ic_mime_type ($_FILES['file']['tmp_name']));
            $fname = escape($_FILES['file']['name'],'string');
            $fende = preg_replace("/.+\.([a-zA-Z]+)$/", "\\1", $fname);
            $fende = strtolower($fende);
    
    		    if ( $_FILES['file']['size'] > 2097000 ) { # 2 mb (2 097 152)
              return ('Die Datei darf NICHT gr&ouml;sser als 2 MBytes sein.');
            }
    
            if (
    		      ($fende != 'rar' AND $fende != 'zip' AND $fende != 'tar')
    
              OR (
              $rtype != 'application/x-rar' AND
              $rtype != 'application/x-zip' AND
              $rtype != 'application/x-tar')
    
    		    ) {
              return ('Die Datei darf nur die Endungen: .zip, .tar oder .rar haben.');
            }
    
            $fname = str_replace ('.'.$fende, '', $fname);
            $fname = preg_replace("/[^a-zA-Z0-9]/", "", $fname);
            $fname = $fname.'.'.$fende;
    
            if (file_exists( 'include/downs/downloads/user_upload/'.$fname ) ) {
              return ('Die Datei existiert bereits und kann nicht &uuml;berschrieben werden.');
            }
    
            if ( move_uploaded_file($_FILES['file']['tmp_name'], 'include/downs/downloads/user_upload/'.$fname) ) {
              $url = 'include/downs/downloads/user_upload/'.$fname;
              @chmod($url, 0777);
    			  }
          }
    
          if (empty($url)) {
            return ('Keine Datei oder Link angegeben');
          }
    
          db_query("INSERT INTO prefix_downloads (`time`,`cat`,`creater`,`version`,`url`,surl,`ssurl`,`name`,`desc`,`descl`,pos) VALUES (NOW(),-1,'".$autor."','".$version."','".$url."','".$surl."','".$ssurl."','".$name."','".$desc."','".$descl."','0')");
    
          return (true);
    }
    
    function addProgressBar($row) {
      $row['vote_progressbar_value'] = $row['vote_wertung']  * 10;
      $row['vote_progressbar_text'] = str_replace('.', ',', (string) round($row['vote_progressbar_value'], 1)) . " / 100";
    
      if ($row['vote_progressbar_value'] <= 33) {
        $htmlClass = "low";
      } else if ($row['vote_progressbar_value'] > 33 && $row['vote_progressbar_value'] < 66) {
        $htmlClass = "mid";
      } else {
        $htmlClass = "high";
      }
    
      $row['vote_progressbar_class'] = $htmlClass;
    
      return $row;
    }
    
    switch ( $menu->get(1) ) {
      default :
    		$cid = ( $menu->get(1) ? escape($menu->get(1), 'integer') : 0 );
    		$erg = db_query("SELECT cat,name FROM prefix_downcats WHERE id = ".$cid." ORDER BY pos");
    		if ( db_num_rows($erg) > 0 ) {
    		  $row = db_fetch_assoc($erg);
    			$array = get_cats_array($row['cat'],'');
    			if ( !empty($array) ) {
    			  $titelzw = get_cats_title($array);
    			  $namezw = get_cats_urls($array);
    			} else {
    			  $titelzw = '';
    				$namezw = '';
    			}
    		  $cattitle = ':: '.$titelzw.$row['name'];
    			$catname = '<b> &raquo; </b>'.$namezw.$row['name'];
    		} else {
    		  $cattitle = '';
    			$catname = '';
    		}
    		$title = $allgAr['title'].' :: Downloads '.$cattitle;
        $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>'.$catname;
        $design = new design ( $title , $hmenu );
    	  $design->header();
    		$tpl = new tpl ('downloads' );
        $tpl->set('cid', $cid);
        $erg = db_query("SELECT id,name,`desc` FROM prefix_downcats WHERE cat = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
        if ( db_num_rows($erg) > 0 ) {
    		  $tpl->out(1); $class = 'Cnorm';
    			while ($row = db_fetch_assoc($erg) ) {
    			  $row['files'] = count_files($row['id']);
    			  $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
    				$row['class'] = $class;
    			  $tpl->set_ar_out($row,2);
          }
    		  $tpl->out(3);
    		}
    
        # sortierung festlegen
        $sortierung = 'pos ASC';
        $DOM = 'ASC';
        $POM = 'ASC';
        $DAM = 'ASC';
        $RAM = 'ASC';
    
        switch ($menu->get(2)) {
          case 'positionDESC' : $sortierung = 'pos DESC'; break;
          case 'positionASC' : $sortierung = 'pos ASC';  $POM = 'DESC'; break;
          case 'downsDESC' : $sortierung = 'downs DESC'; break;
          case 'downsASC' : $sortierung = 'downs ASC'; $DOM = 'DESC'; break;
          case 'dateDESC' : $sortierung = 'time DESC'; break;
          case 'dateASC' : $sortierung = 'time ASC'; $DAM = 'DESC'; break;
          case 'ratingDESC' : $sortierung = 'vote_wertung DESC'; break;
          case 'ratingASC' : $sortierung = 'vote_wertung ASC'; $RAM = 'DESC'; break;
        }
    
        $tpl->set ('POM', $POM);
        $tpl->set ('DOM', $DOM);
        $tpl->set ('DAM', $DAM);
        $tpl->set ('RAM', $RAM);
    
    		$erg = db_query("select id,name,version,vote_wertung,ssurl,`desc`,downs,DATE_FORMAT(time,'%d.%m.%Y') as datum from prefix_downloads WHERE cat = ".$cid." ORDER BY ".$sortierung);
    		if ( db_num_rows($erg) > 0 ) {
    		  $tpl->out(4); $class = 'Cnorm';
    			while($row = db_fetch_assoc($erg) ) {
            # smal screenshot url
    				$row['ssurl'] = ( (file_exists($row['ssurl']) AND $row['ssurl'] != '') ? '<img src="'.$row['ssurl'].'" alt="'.$row['name'].' '.$row['version'].'" title="'.$row['name'].' '.$row['version'].'" style="float:left; border: none; padding-right:3px;" />' : '' );
            $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
    				$row['class'] = $class;
            $row = addProgressBar($row);
    			  $tpl->set_ar_out($row,5);
    			}
    			$tpl->out(6);
    		}
    
        if ( $cid == 0 AND $allgAr['archiv_down_userupload'] == 1 AND loggedin() AND is_writeable ( 'include/downs/downloads/user_upload' ) ) {
          $tpl->out(7);
        }
    
    		$design->footer();
    	  break;
    	case 'show' :
    
        $fid = escape($menu->get(2), 'integer');
        $erg = db_query("SELECT prefix_downloads.cat,ssurl,surl,url,hits,vote_klicks,vote_wertung,prefix_downloads.name,version,creater,downs,descl,prefix_downloads.id,DATE_FORMAT(time,'%d.%m.%Y') as datum FROM prefix_downloads LEFT JOIN prefix_downcats ON prefix_downcats.id = prefix_downloads.cat WHERE prefix_downloads.id = ".$fid." AND (".$_SESSION['authright']." <= prefix_downcats.recht OR (prefix_downloads.cat = 0 AND prefix_downcats.recht IS NULL))");
        if (@db_num_rows($erg) <> 1) {
          $title = $allgAr['title'].' :: Downloads ';
          $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>';
          $design = new design ( $title , $hmenu );
          $design->header();
          echo 'Der Download wurde nicht gefunden';
          $design->footer(1);
        }
    
    		$row = db_fetch_assoc($erg);
    
        # umfrage einen hoch zaehlen ...
        if ( $menu->getA(3) == 'z' AND is_numeric($menu->getE(3)) AND !isset ($_SESSION['downDoVote'][$row['id']]) AND loggedin() ) {
          $_SESSION['downDoVote'][$row['id']] = 'o';
          $row['vote_wertung'] = round ( ( ( $row['vote_wertung'] * $row['vote_klicks'] ) + $menu->getE(3) ) / ( $row['vote_klicks'] + 1 ) , 3 );
          $row['vote_klicks']++;
          db_query("UPDATE prefix_downloads SET vote_wertung = ".$row['vote_wertung'].", vote_klicks = ".$row['vote_klicks']." WHERE id = ".$row['id']);
        }
        if ( !isset ($_SESSION['downDoKlick'][$row['id']]) ) {
          $_SESSION['downDoKlick'][$row['id']] = 'o';
          db_query("UPDATE prefix_downloads SET hits = hits +1 WHERE id = ".$fid);
        }
    
    		$cid = $row['cat'];
    		$erg1 = db_query("SELECT id,cat,name FROM prefix_downcats WHERE id = ".$cid);
    		if ( db_num_rows($erg1) > 0 ) {
    		  $row1 = db_fetch_assoc($erg1);
    			$array = get_cats_array($row1['cat'],'');
    			if ( !empty($array) ) {
    			  $titelzw = get_cats_title($array);
    			  $namezw = get_cats_urls($array);
    			} else {
    			  $titelzw = '';
    				$namezw = '';
    			}
    		  $cattitle = ':: '.$titelzw.$row1['name'].' :: '.$row['name'].' '.$row['version'];
    			$catname = '<b> &raquo; </b>'.$namezw.'<a class="smalfont" href="?downloads-'.$row1['id'].'">'.$row1['name'].'</a><b> &raquo; </b>'.$row['name'].' '.$row['version'];
    		} else {
    		  $cattitle = '';
    			$catname = '';
    		}
    		$tpl = new tpl ('downloads_show' );
    		$row['ssurl'] = ( $row['ssurl'] != '' ? '<img src="'.$row['ssurl'].'" alt="'.$row['name'].' '.$row['version'].'" title="'.$row['name'].' '.$row['version'].'" style="float:left; border: none; padding-right:5px;" />' : '' );
        $row['surl']  = ( empty($row['surl']) ? '' : '&nbsp;&nbsp;&nbsp; <a href="'.$row['surl'].'" target="_blank">Demo/Screenshot</a>' );
    		$row['size']  = get_download_size($row['url']);
    		$row['descl'] = bbcode($row['descl']);
    		$row['version_kl'] = (empty($row['version'])?'':'('.$row['version'].')');
        $row = addProgressBar($row);
        $title = $allgAr['title'].' :: Downloads '.$cattitle;
        $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>'.$catname;
        $design = new design ( $title , $hmenu );
    	  $design->header();
    		$tpl->set_ar_out($row,0);
        $design->footer();
    		//Download erlauben
    		$_SESSION['download'][$fid] = true;
    	  break;
    	case 'down' :
    		$fid = intval($menu->get(2));
    		if (!isset($_SESSION['download'][$fid])) {
    			header('Location: ' . 'http://' . $_SERVER["HTTP_HOST"] . dirname($_SERVER["SCRIPT_NAME"]) . '/index.php?downloads');
    			break;
    		}
    		$qry = db_query("SELECT d.`url`, IFNULL(c.`recht`,0) AS recht FROM `prefix_downloads` d LEFT JOIN `prefix_downcats` c ON c.`id` = d.`cat` WHERE d.`id` = $fid");
    		$row = db_fetch_assoc($qry);
    		$url = 'http://' . $_SERVER["HTTP_HOST"] . dirname($_SERVER["SCRIPT_NAME"]) . '/index.php?downloads';
    		if ($qry !== false and has_right($row['recht'])) {
    			db_query("UPDATE prefix_downloads SET downs = downs +1 WHERE id = " . $fid);
    			if (file_exists($row['url'])) {
    				header('Content-type: application/octet-stream');
    				header('Content-Disposition: attachment; filename="' . basename($row['url']) . '"');
    				readfile($row['url']);
    				exit;
    			} else {
    				$url = iurlencode($row['url']);
    			}
    			$error = false;
    		}
    		header('Location: ' . $url);
    		break;
      case 'upload' :
        if ( $allgAr['archiv_down_userupload'] == 1 AND loggedin() AND is_writeable ( 'include/downs/downloads/user_upload' ) ) {
          $title = $allgAr['title'].' :: Downloads :: User - Upload';
          $hmenu = '<a class="smalfont" href="?downloads">Downloads</a><b> &raquo; </b>User - Upload';
          $design = new design ( $title , $hmenu );
    	    $design->header();
    
          $re = icUpload();
    	    if ($re === true) {
            echo 'Erfolgreich eingetragen! ... ein Moderator oder Admin dieser Seite wird den Download in n&auml;chster Zeit freischalten.';
          } else {
            echo '<b>Error:</b><br />'.$re;
          }
    
          $design->footer();
        }
        break;
    }
    ?>
    Änderungen an downloads.php
    @@ -125,10 +125,27 @@ function icUpload () {
           db_query("INSERT INTO prefix_downloads (`time`,`cat`,`creater`,`version`,`url`,surl,`ssurl`,`name`,`desc`,`descl`,pos) VALUES (NOW(),-1,'".$autor."','".$version."','".$url."','".$surl."','".$ssurl."','".$name."','".$desc."','".$descl."','0')");
     
           return (true);
     }
     
    +function addProgressBar($row) {
    +  $row['vote_progressbar_value'] = $row['vote_wertung']  * 10;
    +  $row['vote_progressbar_text'] = str_replace('.', ',', (string) round($row['vote_progressbar_value'], 1)) . " / 100";
    +
    +  if ($row['vote_progressbar_value'] <= 33) {
    +    $htmlClass = "low";
    +  } else if ($row['vote_progressbar_value'] > 33 && $row['vote_progressbar_value'] < 66) {
    +    $htmlClass = "mid";
    +  } else {
    +    $htmlClass = "high";
    +  }
    +
    +  $row['vote_progressbar_class'] = $htmlClass;
    +
    +  return $row;
    +}
    +
     switch ( $menu->get(1) ) {
       default :
     		$cid = ( $menu->get(1) ? escape($menu->get(1), 'integer') : 0 );
     		$erg = db_query("SELECT cat,name FROM prefix_downcats WHERE id = ".$cid." ORDER BY pos");
     		if ( db_num_rows($erg) > 0 ) {
    @@ -168,32 +185,37 @@ switch ( $menu->get(1) ) {
         # sortierung festlegen
         $sortierung = 'pos ASC';
         $DOM = 'ASC';
         $POM = 'ASC';
         $DAM = 'ASC';
    +    $RAM = 'ASC';
     
         switch ($menu->get(2)) {
           case 'positionDESC' : $sortierung = 'pos DESC'; break;
           case 'positionASC' : $sortierung = 'pos ASC';  $POM = 'DESC'; break;
           case 'downsDESC' : $sortierung = 'downs DESC'; break;
           case 'downsASC' : $sortierung = 'downs ASC'; $DOM = 'DESC'; break;
           case 'dateDESC' : $sortierung = 'time DESC'; break;
           case 'dateASC' : $sortierung = 'time ASC'; $DAM = 'DESC'; break;
    +      case 'ratingDESC' : $sortierung = 'vote_wertung DESC'; break;
    +      case 'ratingASC' : $sortierung = 'vote_wertung ASC'; $RAM = 'DESC'; break;
         }
     
         $tpl->set ('POM', $POM);
         $tpl->set ('DOM', $DOM);
         $tpl->set ('DAM', $DAM);
    +    $tpl->set ('RAM', $RAM);
     
    -		$erg = db_query("select id,name,version,ssurl,`desc`,downs,DATE_FORMAT(time,'%d.%m.%Y') as datum from prefix_downloads WHERE cat = ".$cid." ORDER BY ".$sortierung);
    +		$erg = db_query("select id,name,version,vote_wertung,ssurl,`desc`,downs,DATE_FORMAT(time,'%d.%m.%Y') as datum from prefix_downloads WHERE cat = ".$cid." ORDER BY ".$sortierung);
     		if ( db_num_rows($erg) > 0 ) {
     		  $tpl->out(4); $class = 'Cnorm';
     			while($row = db_fetch_assoc($erg) ) {
             # smal screenshot url
     				$row['ssurl'] = ( (file_exists($row['ssurl']) AND $row['ssurl'] != '') ? '<img src="'.$row['ssurl'].'" alt="'.$row['name'].' '.$row['version'].'" title="'.$row['name'].' '.$row['version'].'" style="float:left; border: none; padding-right:3px;" />' : '' );
             $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
     				$row['class'] = $class;
    +        $row = addProgressBar($row);
     			  $tpl->set_ar_out($row,5);
     			}
     			$tpl->out(6);
     		}
     
    @@ -252,10 +274,11 @@ switch ( $menu->get(1) ) {
     		$row['ssurl'] = ( $row['ssurl'] != '' ? '<img src="'.$row['ssurl'].'" alt="'.$row['name'].' '.$row['version'].'" title="'.$row['name'].' '.$row['version'].'" style="float:left; border: none; padding-right:5px;" />' : '' );
         $row['surl']  = ( empty($row['surl']) ? '' : '&nbsp;&nbsp;&nbsp; <a href="'.$row['surl'].'" target="_blank">Demo/Screenshot</a>' );
     		$row['size']  = get_download_size($row['url']);
     		$row['descl'] = bbcode($row['descl']);
     		$row['version_kl'] = (empty($row['version'])?'':'('.$row['version'].')');
    +    $row = addProgressBar($row);
         $title = $allgAr['title'].' :: Downloads '.$cattitle;
         $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>'.$catname;
         $design = new design ( $title , $hmenu );
     	  $design->header();
     		$tpl->set_ar_out($row,0);
    @@ -302,6 +325,6 @@ switch ( $menu->get(1) ) {
     
           $design->footer();
         }
         break;
     }
    -?>
    \ No newline at end of file
    +?>


    CSS

    Abschließend noch diesen CSS-Code in die style.css des aktiven Designs einfügen:
    .download_wertung_container {
      height:100%;
      width:100%;
      margin-left: -1px;
      position: relative;
    }
    
    .download_wertung_container.list {
      border-bottom: 2px solid #333;
    }
    
    .download_wertung {
      height: 100%;
      text-align: center;
    }
    
    .download_wertung.low { background-color: #FF5050; }
    .download_wertung.mid { background-color: #FFFF66; }
    .download_wertung.high { background-color: #00CC66; }
    
    .download_wertung_text {
      position: absolute;
      text-align: center;
      margin: 0 auto;
      left:0;
      right: 0;
      width: 70px;
    }
    
    .download_wertung_text div {
      position: relative;
      text-align:center;
      color: #000;
    }
    Achtung: Sind jetzt statt IDs Klassen. Dementsprechend auch den alten Code von oben raus und diesen rein, bzw. alle # durch . ersetzen.

    Ganz wichtig: Bevor irgendwelche Änderungen vorgenommen werden, unbedingt ein Backup machen. Es kann immer sein, dass ich eventuell irgendetwas übersehen habe, als ich alles in diesen Beitrag kopiert habe. Ansonsten sollte es eigentlich problemlos funktionieren, vorausgesetzt es waren vorher keine Download-Modifizierungen installiert. In diesem Fall bitte die Änderungen manuell durchführen. Sollte die Ausgabe von git nicht reichen (Alle 'Änderungen' Snippets), bitte ein Programm wie WinMerge nutzen, und nach den Unterschieden suchen.

    Bei Fragen, fragen.


    Zuletzt modifiziert von dastiii am 17.05.2015 - 09:30:04
    2 Mitglieder finden den Beitrag gut.
  12. #12
    User Pic
    MOODFOR Mitglied
    Registriert seit
    25.06.2014
    Beiträge
    177
    Beitragswertungen
    2 Beitragspunkte
    Dankeschönlächeln echt lieb von dir.
    Ich mache irgendetwas grundlegend falsch, meine Dateien sind für Kommentare modifiziert worden. Nach dem einfügen, wird diese Funktion falsch dargestellt.


    Meine Dateien :
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
                    <th width="80%" align="center"><b>{_lang_category}</b></th>
        <th width="20%" align="center">{_lang_files}</th>
            </tr>
            {EXPLODE}
            <tr class="{class}">
              <td><a href="index.php?downloads-{id}">{name}</a><br /><span class="smalfont">»&nbsp;{desc}</span></td>
                    <td align="center">{files}</td>
            </tr>
            {EXPLODE}
    </table>
    <br /><br />
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
                    <th width="65%" align="center"><b><a href="index.php?downloads-{cid}-position{POM}">{_lang_files}</b></a></th>
        <th width="20%" align="center"><a href="index.php?downloads-{cid}-date{DAM}">{_lang_date}</a></th>
        <th width="15%" align="center"><a href="index.php?downloads-{cid}-downs{DOM}">{_lang_downs}</a></th>
            </tr>
      {EXPLODE}
       <tr class="{class}">
               <td><a href="index.php?downloads-show-{id}">{ssurl}{name} {version}</a><br /><span class="smalfont">»&nbsp;{desc}</span></td>
                     <td align="center">{datum}</td>
         <td align="center">{downs}</td>
             </tr>
       {EXPLODE}
    </table>
    
    
    {EXPLODE}
    <p></p><p></p>
    <form action="index.php?downloads-upload" method="POST" enctype="multipart/form-data">
      <fieldset>
        <legend><b>{_lang_fileup}</b></legend>
              <label style="width:100px; float:left;">{_lang_name}</label><input type="text" name="name" maxlength="50" value="" /><br />
              <label style="width:100px; float:left;">{_lang_version}</label><input type="text" name="version" maxlength="10" size="11" value="" /><br />
              <label style="width:100px; float:left;">{_lang_author}</label><input type="text" name="autor" maxlength="50" value="" /><br />
              <label style="width:100px; float:left;">{_lang_linkor}</label><input type="text" name="url" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_upload}</label><input type="file" name="file" size="28" /><br />
              <label style="width:100px; float:left;">{_lang_demolink}</label><input type="text" name="surl" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_preview}</label><input type="text" name="ssurl" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_shortdesc}</label><input type="text" name="desc" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_desc}</label><textarea cols="40" rows="4" name="descl"></textarea><br />
              <label style="width:100px; float:left;"></label><input type="submit" value="Absenden" name="sub"><br />
      </fieldset>
    </form>


    <?php
    #   Copyright by: Manuel
    #   Support: www.ilch.de
    
    
    defined ('main') or die ( 'no direct access' );
    
    
    function get_cats_title ( $catsar ) {
      $l = '';
        foreach($catsar as $k => $v) {
          if ( $k != '' AND $v != '' ) {
              $l = $v.' :: '.$l;
            }
        }
        return ($l);
    }
    
    function get_cats_urls ( $catsar ) {
      $l = '';
        foreach($catsar as $k => $v) {
          if ( $k != '' AND $v != '' ) {
              $l = '<a class="smalfont" href="?downloads-'.$k.'">'.$v.'</a><b> &raquo; </b>'.$l;
            }
        }
        return ($l);
    }
    
    function get_cats_array ( $cid , $ar ) {
        if ( empty($cid) ) {
          return ($ar);
        } else {
          $erg = db_query("SELECT cat,id,name FROM prefix_downcats WHERE id = ".$cid);
            $row = db_fetch_assoc($erg);
            $ar[$row['id']] = $row['name'];
          return ( get_cats_array($row['cat'],$ar) );
        }
        if ( $r ) {
          return ($l);
        }
    }
    
    function get_download_size($file) {
      $sizes = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB");
      $size = @filesize($file); if ($size == 0) { return('n/a'); } else {
      return (round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $sizes[$i]); }
    }
    
    function count_files ($cid) {
      $zges = 0;
        $e = db_query("SELECT id FROM prefix_downcats WHERE cat = ".$cid);
        if ( db_num_rows($e) > 0 ) {
          while ($r = db_fetch_assoc($e) ) {
            $zges = $zges + count_files ( $r['id'] );
          }
        }
        $zges = $zges + db_count_query("SELECT COUNT(*) FROM prefix_downloads WHERE cat = ".$cid);
        return ( $zges );
    }
    
    function icUpload () {
    
          $name = escape($_POST['name'],'string');
            $version = escape($_POST['version'],'string');
            $autor = escape($_POST['autor'],'string');
            $surl = escape($_POST['surl'],'string');
            $ssurl = escape($_POST['ssurl'],'string');
          $url = ( empty($_POST['url']) ? '' : escape($_POST['url'],'string') );
            $desc = escape($_POST['desc'],'string');
            $descl = escape($_POST['descl'],'textarea');
    
          if (empty($name)) {
            return ('keinen Namen angegeben.');
          }
    
          if (empty($desc) or empty($descl)) {
            return ('kein langer oder/und kein kurzer Text angegeben.');
          }
    
          if (empty($url) AND empty($_FILES['file']['name'])) {
            return ('Keine Datei oder Link angegeben.');
          }
    
            if (!empty ($_FILES['file']['name']) ) {
    
                $rtype = trim(ic_mime_type ($_FILES['file']['tmp_name']));
            $fname = escape($_FILES['file']['name'],'string');
            $fende = preg_replace("/.+\.([a-zA-Z]+)$/", "\\1", $fname);
            $fende = strtolower($fende);
    
                if ( $_FILES['file']['size'] > 80000000 ) { # 80 mb (80 000 000)
              return ('Die Datei darf NICHT gr&ouml;sser als 80 MBytes sein.');
            }
    
            if (
                  ($fende != 'rar' AND $fende != 'zip' AND $fende != 'tar')
    
              OR (
              $rtype != 'application/x-rar' AND
              $rtype != 'application/x-zip' AND
              $rtype != 'application/x-tar')
    
                ) {
              return ('Die Datei darf nur die Endungen: .zip, .tar oder .rar haben.');
            }
    
            $fname = str_replace ('.'.$fende, '', $fname);
            $fname = preg_replace("/[^a-zA-Z0-9]/", "", $fname);
            $fname = $fname.'.'.$fende;
    
            if (file_exists( 'include/downs/downloads/user_upload/'.$fname ) ) {
              return ('Die Datei existiert bereits und kann nicht &uuml;berschrieben werden.');
            }
    
            if ( move_uploaded_file($_FILES['file']['tmp_name'], 'include/downs/downloads/user_upload/'.$fname) ) {
              $url = 'include/downs/downloads/user_upload/'.$fname;
              @chmod($url, 0777);
                  }
          }
    
          if (empty($url)) {
            return ('Keine Datei oder Link angegeben');
          }
    
          db_query("INSERT INTO prefix_downloads (`time`,`cat`,`creater`,`version`,`url`,surl,`ssurl`,`name`,`desc`,`descl`,pos) VALUES (NOW(),-1,'".$autor."','".$version."','".$url."','".$surl."','".$ssurl."','".$name."','".$desc."','".$descl."','0')");
    
          return (true);
    }
    
    switch ( $menu->get(1) ) {
      default :
            $cid = ( $menu->get(1) ? escape($menu->get(1), 'integer') : 0 );
            $erg = db_query("SELECT cat,name FROM prefix_downcats WHERE id = ".$cid." ORDER BY pos");
            if ( db_num_rows($erg) > 0 ) {
              $row = db_fetch_assoc($erg);
                $array = get_cats_array($row['cat'],'');
                if ( !empty($array) ) {
                  $titelzw = get_cats_title($array);
                  $namezw = get_cats_urls($array);
                } else {
                  $titelzw = '';
                    $namezw = '';
                }
              $cattitle = ':: '.$titelzw.$row['name'];
                $catname = '<b> &raquo; </b>'.$namezw.$row['name'];
            } else {
              $cattitle = '';
                $catname = '';
            }
            $title = $allgAr['title'].' :: Downloads '.$cattitle;
        $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>'.$catname;
        $design = new design ( $title , $hmenu );
          $design->header();
            $tpl = new tpl ('downloads' );
        $tpl->set('cid', $cid);
        $erg = db_query("SELECT id,name,`desc` FROM prefix_downcats WHERE cat = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
        if ( db_num_rows($erg) > 0 ) {
              $tpl->out(1); $class = 'Cnorm';
                while ($row = db_fetch_assoc($erg) ) {
                  $row['files'] = count_files($row['id']);
                  $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                    $row['class'] = $class;
                  $tpl->set_ar_out($row,2);
          }
              $tpl->out(3);
            }
    
        # sortierung festlegen
        $sortierung = 'pos ASC';
        $DOM = 'ASC';
        $POM = 'ASC';
        $DAM = 'ASC';
    
        switch ($menu->get(2)) {
          case 'positionDESC' : $sortierung = 'pos DESC'; break;
          case 'positionASC' : $sortierung = 'pos ASC';  $POM = 'DESC'; break;
          case 'downsDESC' : $sortierung = 'downs DESC'; break;
          case 'downsASC' : $sortierung = 'downs ASC'; $DOM = 'DESC'; break;
          case 'dateDESC' : $sortierung = 'time DESC'; break;
          case 'dateASC' : $sortierung = 'time ASC'; $DAM = 'DESC'; break;
        }
    
        $tpl->set ('POM', $POM);
        $tpl->set ('DOM', $DOM);
        $tpl->set ('DAM', $DAM);
    
            $erg = db_query("select id,name,version,ssurl,`desc`,downs,DATE_FORMAT(time,'%d.%m.%Y') as datum from prefix_downloads WHERE cat = ".$cid." ORDER BY ".$sortierung);
            if ( db_num_rows($erg) > 0 ) {
              $tpl->out(4); $class = 'Cnorm';
                while($row = db_fetch_assoc($erg) ) {
            # smal screenshot url
                    $row['ssurl'] = ( (file_exists($row['ssurl']) AND $row['ssurl'] != '') ? '<img src="'.$row['ssurl'].'" alt="'.$row['name'].' '.$row['version'].'" title="'.$row['name'].' '.$row['version'].'" style="float:left; border: none; padding-right:3px;" />' : '' );
            $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                    $row['class'] = $class;
                  $tpl->set_ar_out($row,5);
                }
                $tpl->out(6);
            }
    
        if ( $cid == 0 AND $allgAr['archiv_down_userupload'] == 1 AND loggedin() AND is_writeable ( 'include/downs/downloads/user_upload' ) ) {
          $tpl->out(7);
        }
    
            $design->footer();
          break;
        case 'show' :
    
        $fid = escape($menu->get(2), 'integer');
    
        # kommentar add
        if ((loggedin() OR chk_antispam ('downloads')) AND !empty($_POST['name']) AND !empty($_POST['text']) ) {
          $_POST['text'] = escape($_POST['text'],'textarea');
          $_POST['name'] = escape($_POST['name'],'string');
          db_query("INSERT INTO `prefix_koms` VALUES ('',".$fid.",'dloads','".$_POST['name']."','".$_POST['text']."')");
        }
        # kommentar loeschen
        if ($menu->getA(3) == 'd' AND is_numeric($menu->getE(3)) AND has_right(-9, 'archiv-downloads')) {
          $kommentar_id = escape($menu->getE(3),'integer');
          db_query("DELETE FROM `prefix_koms`WHERE uid = ".$fid." AND cat = 'dloads' AND id = ".$kommentar_id)OR die('dl22');
        }
    
        $erg = db_query("SELECT prefix_downloads.cat,ssurl,surl,url,hits,vote_klicks,vote_wertung,prefix_downloads.name,version,creater,downs,descl,prefix_downloads.id,DATE_FORMAT(time,'%d.%m.%Y') as datum FROM prefix_downloads LEFT JOIN prefix_downcats ON prefix_downcats.id = prefix_downloads.cat WHERE prefix_downloads.id = ".$fid." AND (".$_SESSION['authright']." <= prefix_downcats.recht OR (prefix_downloads.cat = 0 AND prefix_downcats.recht IS NULL))");
        if (@db_num_rows($erg) <> 1) {
          $title = $allgAr['title'].' :: Downloads ';
          $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>';
          $design = new design ( $title , $hmenu );
          $design->header();
          echo 'Der Download wurde nicht gefunden';
          $design->footer(1);
        }
    
            $row = db_fetch_assoc($erg);
    
        # umfrage einen hoch zaehlen ...
        if ( $menu->getA(3) == 'z' AND is_numeric($menu->getE(3)) AND !isset ($_SESSION['downDoVote'][$row['id']]) AND loggedin() ) {
          $_SESSION['downDoVote'][$row['id']] = 'o';
          $row['vote_wertung'] = round ( ( ( $row['vote_wertung'] * $row['vote_klicks'] ) + $menu->getE(3) ) / ( $row['vote_klicks'] + 1 ) , 3 );
          $row['vote_klicks']++;
          db_query("UPDATE prefix_downloads SET vote_wertung = ".$row['vote_wertung'].", vote_klicks = ".$row['vote_klicks']." WHERE id = ".$row['id']);
        }
        if ( !isset ($_SESSION['downDoKlick'][$row['id']]) ) {
          $_SESSION['downDoKlick'][$row['id']] = 'o';
          db_query("UPDATE prefix_downloads SET hits = hits +1 WHERE id = ".$fid);
        }
    
            $cid = $row['cat'];
            $erg1 = db_query("SELECT id,cat,name FROM prefix_downcats WHERE id = ".$cid);
            if ( db_num_rows($erg1) > 0 ) {
              $row1 = db_fetch_assoc($erg1);
                $array = get_cats_array($row1['cat'],'');
                if ( !empty($array) ) {
                  $titelzw = get_cats_title($array);
                  $namezw = get_cats_urls($array);
                } else {
                  $titelzw = '';
                    $namezw = '';
                }
              $cattitle = ':: '.$titelzw.$row1['name'].' :: '.$row['name'].' '.$row['version'];
                $catname = '<b> &raquo; </b>'.$namezw.'<a class="smalfont" href="?downloads-'.$row1['id'].'">'.$row1['name'].'</a><b> &raquo; </b>'.$row['name'].' '.$row['version'];
            } else {
              $cattitle = '';
                $catname = '';
            }
            $tpl = new tpl ('downloads_show' );
            $row['ssurl'] = ( $row['ssurl'] != '' ? '<img src="'.$row['ssurl'].'" alt="'.$row['name'].' '.$row['version'].'" title="'.$row['name'].' '.$row['version'].'" style="float:left; border: none; padding-right:5px;" />' : '' );
        $row['surl']  = ( empty($row['surl']) ? '' : '&nbsp;&nbsp;&nbsp; <a href="'.$row['surl'].'" target="_blank">Demo/Screenshot</a>' );
            $row['size']  = get_download_size($row['url']);
            $row['descl'] = bbcode($row['descl']);
            $row['version_kl'] = (empty($row['version'])?'':'('.$row['version'].')');
        $title = $allgAr['title'].' :: Downloads '.$cattitle;
        $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>'.$catname;
        $design = new design ( $title , $hmenu );
        $design->header();
        $row['uname'] = get_n($_SESSION['authid']);
        $row['ANTISPAM'] = (loggedin()?'':get_antispam ('downloads', 0));
        $tpl->set_ar_out($row,0);
        # kommentar show
        $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['id']." AND cat = 'dloads' ORDER BY id DESC");
        $ergAnz1 = db_num_rows($erg2);
        if ( $ergAnz1 == 0 ) {
        echo '<br /><br /> <b>'.$lang['nocomments'].'</b><br />';
        $tpl->out(1);
        } else {
        $tpl->out(1);
        $zahl = $ergAnz1;
        while ($row2 = db_fetch_assoc($erg2)) {
        $row2['text'] = bbcode(trim($row2['text']));
        if (has_right(-9, 'archiv-downloads')) {
        $row2['text'] .= '<a href="index.php?downloads-show-'.$row['id'].'-d'.$row2['id'].'"><img src="include/images/icons/del.gif" alt="löschen" border="0" title="löschen" /></a>';
        }
        $tpl->set_ar_out(array('name' => $row2['name'], 'text' => $row2['text'], 'zahl' => $zahl ),2);
        $zahl--;
        }
        }
        $tpl->out(3);
        # kommentar show ende
        $design->footer();
            //Download erlauben
            $_SESSION['download'][$fid] = true;
          break;
        case 'down' :
            $fid = intval($menu->get(2));
            if (!isset($_SESSION['download'][$fid])) {
                header('Location: ' . 'http://' . $_SERVER["HTTP_HOST"] . dirname($_SERVER["SCRIPT_NAME"]) . '/index.php?downloads');
                break;
            }
            $qry = db_query("SELECT d.`url`, IFNULL(c.`recht`,0) AS recht FROM `prefix_downloads` d LEFT JOIN `prefix_downcats` c ON c.`id` = d.`cat` WHERE d.`id` = $fid");
            $row = db_fetch_assoc($qry);
            $url = 'http://' . $_SERVER["HTTP_HOST"] . dirname($_SERVER["SCRIPT_NAME"]) . '/index.php?downloads';
            if ($qry !== false and has_right($row['recht'])) {
                db_query("UPDATE prefix_downloads SET downs = downs +1 WHERE id = " . $fid);
                if (file_exists($row['url'])) {
                    header('Content-type: application/octet-stream');
                    header('Content-Disposition: attachment; filename="' . basename($row['url']) . '"');
                    readfile($row['url']);
                    exit;
                } else {
                    $url = iurlencode($row['url']);
                }
                $error = false;
            }
            header('Location: ' . $url);
            break;
      case 'upload' :
        if ( $allgAr['archiv_down_userupload'] == 1 AND loggedin() AND is_writeable ( 'include/downs/downloads/user_upload' ) ) {
          $title = $allgAr['title'].' :: Downloads :: User - Upload';
          $hmenu = '<a class="smalfont" href="?downloads">Downloads</a><b> &raquo; </b>User - Upload';
          $design = new design ( $title , $hmenu );
            $design->header();
    
          $re = icUpload();
            if ($re === true) {
            echo 'Erfolgreich eingetragen! ... ein Moderator oder Admin dieser Seite wird den Download in n&auml;chster Zeit freischalten.';
          } else {
            echo '<b>Error:</b><br />'.$re;
          }
    
          $design->footer();
        }
        break;
    }
    ?>



    <script language="JavaScript" type="text/javascript">
    <!--
    function doVote(n1,did) {
      document.location.href="index.php?downloads-show-" + did + "-z"+n1;
    }
    //-->
    </script>
    
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
            <th colspan="4" align="center"><b>{name} {version}</b></th>
        </tr><tr>
          <td class="Cmite">{_lang_name}</td>
            <td class="Cnorm">{name}</td>
        <td class="Cmite" colspan="2" valign="top" align="center"><strong>{_lang_voting}</strong></td>
      </tr><tr>
          <td class="Cmite">Version</td>
            <td class="Cnorm">{version_kl}</td>
        <td class="Cmite" colspan="2" valign="top">
          <div id="download_wertung_container">
            <div id="download_wertung_text"></div>
            <div id="download_wertung">&nbsp;</div>
          </div>
        </td>
        <script>
          // Retrieves the elements we need to manipulate from the DOM
          var el = document.getElementById('download_wertung');
          var container = document.getElementById('download_wertung_text');
    
          // Calculates the percentage and generates the text
          var percent = {vote_wertung} * 10;
          var points = String(Math.round(percent * 10) / 10).replace(/\./g, ',');
          var pointsText = points + " / 100";
    
          var htmlClass = "";
    
          // Decides which background-color to use
          if (percent <= 33) {
            htmlClass = "low";
          } else if (percent > 33 && percent < 66) {
            htmlClass = "mid";
          } else {
            htmlClass = "high";
          }
    
          // Sets the width and color/class of the progressbar
          el.style.width = percent + "%";
          el.className = htmlClass;
    
          // Adds the points to the DOM
          container.innerHTML = '<div>' + pointsText + '</div>';
        </script>
      </tr><tr>
          <td class="Cmite">{_lang_author}</td>
            <td class="Cnorm">{creater}</td>
        <td class="Cnorm" rowspan="2" colspan="2" align="center">
        <table class="border" border="0" cellspacing="1" cellpadding="0">
          <tr>
            <td class="Cdark" onClick="doVote(1,{id})" style="cursor:pointer">&nbsp;1&nbsp;</td>
            <td class="Cmite" onClick="doVote(2,{id})" style="cursor:pointer">&nbsp;2&nbsp;</td>
            <td class="Cdark" onClick="doVote(3,{id})" style="cursor:pointer">&nbsp;3&nbsp;</td>
            <td class="Cmite" onClick="doVote(4,{id})" style="cursor:pointer">&nbsp;4&nbsp;</td>
            <td class="Cdark" onClick="doVote(5,{id})" style="cursor:pointer">&nbsp;5&nbsp;</td>
            <td class="Cmite" onClick="doVote(6,{id})" style="cursor:pointer">&nbsp;6&nbsp;</td>
            <td class="Cdark" onClick="doVote(7,{id})" style="cursor:pointer">&nbsp;7&nbsp;</td>
            <td class="Cmite" onClick="doVote(8,{id})" style="cursor:pointer">&nbsp;8&nbsp;</td>
            <td class="Cdark" onClick="doVote(9,{id})" style="cursor:pointer">&nbsp;9&nbsp;</td>
            <td class="Cmite" onClick="doVote(10,{id})" style="cursor:pointer">&nbsp;10&nbsp;</td>
          </tr>
        </table>
        </td>
        </tr><tr>
          <td class="Cmite">{_lang_date}</td>
            <td class="Cnorm">{datum}</td>
      </tr><tr>
          <td class="Cmite" width="110">{_lang_size}</td>
            <td class="Cnorm">{size}</td>
        <td class="Cmite" width="110">{_lang_voter}</td>
            <td class="Cnorm">{vote_klicks}</td>
        </tr><tr>
          <td class="Cmite">{_lang_downloads}</td>
            <td class="Cnorm">{downs}</td>
          <td class="Cmite">{_lang_seenfrom}</td>
            <td class="Cnorm">{hits}</td>
        </tr>
    </table>
    <p></p>
    <b><center><a href="index.php?downloads-down-{id}">{_lang_download}</a>{surl}</center></b>
    <p></p>
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
    <tr>
    <th class="Cdark">{_lang_desc}</th>
    </tr>
    <td class="Cnorm">{ssurl}{descl}</td>
    </tr>
    <tr>
    <td class="Cnorm">
    <form action="index.php?downloads-show-{id}" method="POST">
    <fieldset>
    Comments
    <legend>{_lang_writecomment}</legend>
    <input type="text" name="name" value="{uname}" /> <input type="submit" value="{_lang_enter}"><br />
    <textarea cols="50" rows="2" name="text"></textarea><br />
    {ANTISPAM}
    </fieldset>
    </form>
    </td>
    </tr>
    <tr>
    <td class="Cnorm">
    {EXPLODE}
    {EXPLODE}
    <span class="Cmite" style="width:100%;display:block;"><span style="display:block;padding:2px 2px 2px 5px;"># <b>{zahl}</b> von {name}</span> </span>
    <span class="Cnorm" style="width:100%;display:block;"><span style="display:block;padding:4px 4px 4px 6px;">{text}</span> </span>
    <br />
    {EXPLODE}
    </td>
    </tr>
    
    </table>


    WinMerge ist ja echt cool lächeln
    The government pretend,
    they your friend. And then when you steal some shit,they put you in jail
    0 Mitglieder finden den Beitrag gut.
  13. #13
    User Pic
    dastiii Mitglied
    Registriert seit
    27.12.2005
    Beiträge
    2.354
    Beitragswertungen
    84 Beitragspunkte
    Teste mal bitte:

    downloads.php
    <?php
    #   Copyright by: Manuel
    #   Support: www.ilch.de
     
     
    defined ('main') or die ( 'no direct access' );
     
     
    function get_cats_title ( $catsar ) {
      $l = '';
        foreach($catsar as $k => $v) {
          if ( $k != '' AND $v != '' ) {
              $l = $v.' :: '.$l;
            }
        }
        return ($l);
    }
     
    function get_cats_urls ( $catsar ) {
      $l = '';
        foreach($catsar as $k => $v) {
          if ( $k != '' AND $v != '' ) {
              $l = '<a class="smalfont" href="?downloads-'.$k.'">'.$v.'</a><b> &raquo; </b>'.$l;
            }
        }
        return ($l);
    }
     
    function get_cats_array ( $cid , $ar ) {
        if ( empty($cid) ) {
          return ($ar);
        } else {
          $erg = db_query("SELECT cat,id,name FROM prefix_downcats WHERE id = ".$cid);
            $row = db_fetch_assoc($erg);
            $ar[$row['id']] = $row['name'];
          return ( get_cats_array($row['cat'],$ar) );
        }
        if ( $r ) {
          return ($l);
        }
    }
     
    function get_download_size($file) {
      $sizes = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB");
      $size = @filesize($file); if ($size == 0) { return('n/a'); } else {
      return (round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $sizes[$i]); }
    }
     
    function count_files ($cid) {
      $zges = 0;
        $e = db_query("SELECT id FROM prefix_downcats WHERE cat = ".$cid);
        if ( db_num_rows($e) > 0 ) {
          while ($r = db_fetch_assoc($e) ) {
            $zges = $zges + count_files ( $r['id'] );
          }
        }
        $zges = $zges + db_count_query("SELECT COUNT(*) FROM prefix_downloads WHERE cat = ".$cid);
        return ( $zges );
    }
     
    function icUpload () {
     
          $name = escape($_POST['name'],'string');
            $version = escape($_POST['version'],'string');
            $autor = escape($_POST['autor'],'string');
            $surl = escape($_POST['surl'],'string');
            $ssurl = escape($_POST['ssurl'],'string');
          $url = ( empty($_POST['url']) ? '' : escape($_POST['url'],'string') );
            $desc = escape($_POST['desc'],'string');
            $descl = escape($_POST['descl'],'textarea');
     
          if (empty($name)) {
            return ('keinen Namen angegeben.');
          }
     
          if (empty($desc) or empty($descl)) {
            return ('kein langer oder/und kein kurzer Text angegeben.');
          }
     
          if (empty($url) AND empty($_FILES['file']['name'])) {
            return ('Keine Datei oder Link angegeben.');
          }
     
            if (!empty ($_FILES['file']['name']) ) {
     
                $rtype = trim(ic_mime_type ($_FILES['file']['tmp_name']));
            $fname = escape($_FILES['file']['name'],'string');
            $fende = preg_replace("/.+\.([a-zA-Z]+)$/", "\\1", $fname);
            $fende = strtolower($fende);
     
                if ( $_FILES['file']['size'] > 80000000 ) { # 80 mb (80 000 000)
              return ('Die Datei darf NICHT gr&ouml;sser als 80 MBytes sein.');
            }
     
            if (
                  ($fende != 'rar' AND $fende != 'zip' AND $fende != 'tar')
     
              OR (
              $rtype != 'application/x-rar' AND
              $rtype != 'application/x-zip' AND
              $rtype != 'application/x-tar')
     
                ) {
              return ('Die Datei darf nur die Endungen: .zip, .tar oder .rar haben.');
            }
     
            $fname = str_replace ('.'.$fende, '', $fname);
            $fname = preg_replace("/[^a-zA-Z0-9]/", "", $fname);
            $fname = $fname.'.'.$fende;
     
            if (file_exists( 'include/downs/downloads/user_upload/'.$fname ) ) {
              return ('Die Datei existiert bereits und kann nicht &uuml;berschrieben werden.');
            }
     
            if ( move_uploaded_file($_FILES['file']['tmp_name'], 'include/downs/downloads/user_upload/'.$fname) ) {
              $url = 'include/downs/downloads/user_upload/'.$fname;
              @chmod($url, 0777);
                  }
          }
     
          if (empty($url)) {
            return ('Keine Datei oder Link angegeben');
          }
     
          db_query("INSERT INTO prefix_downloads (`time`,`cat`,`creater`,`version`,`url`,surl,`ssurl`,`name`,`desc`,`descl`,pos) VALUES (NOW(),-1,'".$autor."','".$version."','".$url."','".$surl."','".$ssurl."','".$name."','".$desc."','".$descl."','0')");
     
          return (true);
    }
    
    function addProgressBar($row) {
      $row['vote_progressbar_value'] = $row['vote_wertung']  * 10;
      $row['vote_progressbar_text'] = str_replace('.', ',', (string) round($row['vote_progressbar_value'], 1)) . " / 100";
    
      if ($row['vote_progressbar_value'] <= 33) {
        $htmlClass = "low";
      } else if ($row['vote_progressbar_value'] > 33 && $row['vote_progressbar_value'] < 66) {
        $htmlClass = "mid";
      } else {
        $htmlClass = "high";
      }
    
      $row['vote_progressbar_class'] = $htmlClass;
    
      return $row;
    }
     
    switch ( $menu->get(1) ) {
      default :
            $cid = ( $menu->get(1) ? escape($menu->get(1), 'integer') : 0 );
            $erg = db_query("SELECT cat,name FROM prefix_downcats WHERE id = ".$cid." ORDER BY pos");
            if ( db_num_rows($erg) > 0 ) {
              $row = db_fetch_assoc($erg);
                $array = get_cats_array($row['cat'],'');
                if ( !empty($array) ) {
                  $titelzw = get_cats_title($array);
                  $namezw = get_cats_urls($array);
                } else {
                  $titelzw = '';
                    $namezw = '';
                }
              $cattitle = ':: '.$titelzw.$row['name'];
                $catname = '<b> &raquo; </b>'.$namezw.$row['name'];
            } else {
              $cattitle = '';
                $catname = '';
            }
            $title = $allgAr['title'].' :: Downloads '.$cattitle;
        $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>'.$catname;
        $design = new design ( $title , $hmenu );
          $design->header();
            $tpl = new tpl ('downloads' );
        $tpl->set('cid', $cid);
        $erg = db_query("SELECT id,name,`desc` FROM prefix_downcats WHERE cat = ".$cid." AND recht >= ".$_SESSION['authright']." ORDER BY pos");
        if ( db_num_rows($erg) > 0 ) {
              $tpl->out(1); $class = 'Cnorm';
                while ($row = db_fetch_assoc($erg) ) {
                  $row['files'] = count_files($row['id']);
                  $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                    $row['class'] = $class;
                  $tpl->set_ar_out($row,2);
          }
              $tpl->out(3);
            }
     
        # sortierung festlegen
        $sortierung = 'pos ASC';
        $DOM = 'ASC';
        $POM = 'ASC';
        $DAM = 'ASC';
        $RAM = 'ASC';
     
        switch ($menu->get(2)) {
          case 'positionDESC' : $sortierung = 'pos DESC'; break;
          case 'positionASC' : $sortierung = 'pos ASC';  $POM = 'DESC'; break;
          case 'downsDESC' : $sortierung = 'downs DESC'; break;
          case 'downsASC' : $sortierung = 'downs ASC'; $DOM = 'DESC'; break;
          case 'dateDESC' : $sortierung = 'time DESC'; break;
          case 'dateASC' : $sortierung = 'time ASC'; $DAM = 'DESC'; break;
          case 'ratingDESC' : $sortierung = 'vote_wertung DESC'; break;
          case 'ratingASC' : $sortierung = 'vote_wertung ASC'; $RAM = 'DESC'; break;
        }
     
        $tpl->set ('POM', $POM);
        $tpl->set ('DOM', $DOM);
        $tpl->set ('DAM', $DAM);
        $tpl->set ('RAM', $RAM);
     
            $erg = db_query("select id,name,version,ssurl,vote_wertung,`desc`,downs,DATE_FORMAT(time,'%d.%m.%Y') as datum from prefix_downloads WHERE cat = ".$cid." ORDER BY ".$sortierung);
            if ( db_num_rows($erg) > 0 ) {
              $tpl->out(4); $class = 'Cnorm';
                while($row = db_fetch_assoc($erg) ) {
            # smal screenshot url
                    $row['ssurl'] = ( (file_exists($row['ssurl']) AND $row['ssurl'] != '') ? '<img src="'.$row['ssurl'].'" alt="'.$row['name'].' '.$row['version'].'" title="'.$row['name'].' '.$row['version'].'" style="float:left; border: none; padding-right:3px;" />' : '' );
            $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
                    $row['class'] = $class;
                    
                  $row = addProgressBar($row);
                  $tpl->set_ar_out($row,5);
                }
                $tpl->out(6);
            }
     
        if ( $cid == 0 AND $allgAr['archiv_down_userupload'] == 1 AND loggedin() AND is_writeable ( 'include/downs/downloads/user_upload' ) ) {
          $tpl->out(7);
        }
     
            $design->footer();
          break;
        case 'show' :
     
        $fid = escape($menu->get(2), 'integer');
     
        # kommentar add
        if ((loggedin() OR chk_antispam ('downloads')) AND !empty($_POST['name']) AND !empty($_POST['text']) ) {
          $_POST['text'] = escape($_POST['text'],'textarea');
          $_POST['name'] = escape($_POST['name'],'string');
          db_query("INSERT INTO `prefix_koms` VALUES ('',".$fid.",'dloads','".$_POST['name']."','".$_POST['text']."')");
        }
        # kommentar loeschen
        if ($menu->getA(3) == 'd' AND is_numeric($menu->getE(3)) AND has_right(-9, 'archiv-downloads')) {
          $kommentar_id = escape($menu->getE(3),'integer');
          db_query("DELETE FROM `prefix_koms`WHERE uid = ".$fid." AND cat = 'dloads' AND id = ".$kommentar_id)OR die('dl22');
        }
     
        $erg = db_query("SELECT prefix_downloads.cat,ssurl,surl,url,hits,vote_klicks,vote_wertung,prefix_downloads.name,version,creater,downs,descl,prefix_downloads.id,DATE_FORMAT(time,'%d.%m.%Y') as datum FROM prefix_downloads LEFT JOIN prefix_downcats ON prefix_downcats.id = prefix_downloads.cat WHERE prefix_downloads.id = ".$fid." AND (".$_SESSION['authright']." <= prefix_downcats.recht OR (prefix_downloads.cat = 0 AND prefix_downcats.recht IS NULL))");
        if (@db_num_rows($erg) <> 1) {
          $title = $allgAr['title'].' :: Downloads ';
          $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>';
          $design = new design ( $title , $hmenu );
          $design->header();
          echo 'Der Download wurde nicht gefunden';
          $design->footer(1);
        }
     
            $row = db_fetch_assoc($erg);
     
        # umfrage einen hoch zaehlen ...
        if ( $menu->getA(3) == 'z' AND is_numeric($menu->getE(3)) AND !isset ($_SESSION['downDoVote'][$row['id']]) AND loggedin() ) {
          $_SESSION['downDoVote'][$row['id']] = 'o';
          $row['vote_wertung'] = round ( ( ( $row['vote_wertung'] * $row['vote_klicks'] ) + $menu->getE(3) ) / ( $row['vote_klicks'] + 1 ) , 3 );
          $row['vote_klicks']++;
          db_query("UPDATE prefix_downloads SET vote_wertung = ".$row['vote_wertung'].", vote_klicks = ".$row['vote_klicks']." WHERE id = ".$row['id']);
        }
        if ( !isset ($_SESSION['downDoKlick'][$row['id']]) ) {
          $_SESSION['downDoKlick'][$row['id']] = 'o';
          db_query("UPDATE prefix_downloads SET hits = hits +1 WHERE id = ".$fid);
        }
     
            $cid = $row['cat'];
            $erg1 = db_query("SELECT id,cat,name FROM prefix_downcats WHERE id = ".$cid);
            if ( db_num_rows($erg1) > 0 ) {
              $row1 = db_fetch_assoc($erg1);
                $array = get_cats_array($row1['cat'],'');
                if ( !empty($array) ) {
                  $titelzw = get_cats_title($array);
                  $namezw = get_cats_urls($array);
                } else {
                  $titelzw = '';
                    $namezw = '';
                }
              $cattitle = ':: '.$titelzw.$row1['name'].' :: '.$row['name'].' '.$row['version'];
                $catname = '<b> &raquo; </b>'.$namezw.'<a class="smalfont" href="?downloads-'.$row1['id'].'">'.$row1['name'].'</a><b> &raquo; </b>'.$row['name'].' '.$row['version'];
            } else {
              $cattitle = '';
                $catname = '';
            }
            $tpl = new tpl ('downloads_show' );
            $row['ssurl'] = ( $row['ssurl'] != '' ? '<img src="'.$row['ssurl'].'" alt="'.$row['name'].' '.$row['version'].'" title="'.$row['name'].' '.$row['version'].'" style="float:left; border: none; padding-right:5px;" />' : '' );
        $row['surl']  = ( empty($row['surl']) ? '' : '&nbsp;&nbsp;&nbsp; <a href="'.$row['surl'].'" target="_blank">Demo/Screenshot</a>' );
            $row['size']  = get_download_size($row['url']);
            $row['descl'] = bbcode($row['descl']);
            $row['version_kl'] = (empty($row['version'])?'':'('.$row['version'].')');
        $title = $allgAr['title'].' :: Downloads '.$cattitle;
        $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>'.$catname;
        $design = new design ( $title , $hmenu );
        $design->header();
        $row['uname'] = get_n($_SESSION['authid']);
        $row['ANTISPAM'] = (loggedin()?'':get_antispam ('downloads', 0));
        $row = addProgressBar($row);
        $tpl->set_ar_out($row,0);
        # kommentar show
        $erg2 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$row['id']." AND cat = 'dloads' ORDER BY id DESC");
        $ergAnz1 = db_num_rows($erg2);
        if ( $ergAnz1 == 0 ) {
        echo '<br /><br /> <b>'.$lang['nocomments'].'</b><br />';
        $tpl->out(1);
        } else {
        $tpl->out(1);
        $zahl = $ergAnz1;
        while ($row2 = db_fetch_assoc($erg2)) {
        $row2['text'] = bbcode(trim($row2['text']));
        if (has_right(-9, 'archiv-downloads')) {
        $row2['text'] .= '<a href="index.php?downloads-show-'.$row['id'].'-d'.$row2['id'].'"><img src="include/images/icons/del.gif" alt="löschen" border="0" title="löschen" /></a>';
        }
        $tpl->set_ar_out(array('name' => $row2['name'], 'text' => $row2['text'], 'zahl' => $zahl ),2);
        $zahl--;
        }
        }
        $tpl->out(3);
        # kommentar show ende
        $design->footer();
            //Download erlauben
            $_SESSION['download'][$fid] = true;
          break;
        case 'down' :
            $fid = intval($menu->get(2));
            if (!isset($_SESSION['download'][$fid])) {
                header('Location: ' . 'http://' . $_SERVER["HTTP_HOST"] . dirname($_SERVER["SCRIPT_NAME"]) . '/index.php?downloads');
                break;
            }
            $qry = db_query("SELECT d.`url`, IFNULL(c.`recht`,0) AS recht FROM `prefix_downloads` d LEFT JOIN `prefix_downcats` c ON c.`id` = d.`cat` WHERE d.`id` = $fid");
            $row = db_fetch_assoc($qry);
            $url = 'http://' . $_SERVER["HTTP_HOST"] . dirname($_SERVER["SCRIPT_NAME"]) . '/index.php?downloads';
            if ($qry !== false and has_right($row['recht'])) {
                db_query("UPDATE prefix_downloads SET downs = downs +1 WHERE id = " . $fid);
                if (file_exists($row['url'])) {
                    header('Content-type: application/octet-stream');
                    header('Content-Disposition: attachment; filename="' . basename($row['url']) . '"');
                    readfile($row['url']);
                    exit;
                } else {
                    $url = iurlencode($row['url']);
                }
                $error = false;
            }
            header('Location: ' . $url);
            break;
      case 'upload' :
        if ( $allgAr['archiv_down_userupload'] == 1 AND loggedin() AND is_writeable ( 'include/downs/downloads/user_upload' ) ) {
          $title = $allgAr['title'].' :: Downloads :: User - Upload';
          $hmenu = '<a class="smalfont" href="?downloads">Downloads</a><b> &raquo; </b>User - Upload';
          $design = new design ( $title , $hmenu );
            $design->header();
     
          $re = icUpload();
            if ($re === true) {
            echo 'Erfolgreich eingetragen! ... ein Moderator oder Admin dieser Seite wird den Download in n&auml;chster Zeit freischalten.';
          } else {
            echo '<b>Error:</b><br />'.$re;
          }
     
          $design->footer();
        }
        break;
    }
    ?>


    downloads.htm
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
                    <th width="80%" align="center"><b>{_lang_category}</b></th>
        <th width="20%" align="center">{_lang_files}</th>
            </tr>
            {EXPLODE}
            <tr class="{class}">
              <td><a href="index.php?downloads-{id}">{name}</a><br /><span class="smalfont">»&nbsp;{desc}</span></td>
                    <td align="center">{files}</td>
            </tr>
            {EXPLODE}
    </table>
    <br /><br />
    {EXPLODE}
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
        <th width="65%" align="center"><b><a href="index.php?downloads-{cid}-position{POM}">{_lang_files}</b></a></th>
        <th width="20%" align="center"><a href="index.php?downloads-{cid}-rating{RAM}">{_lang_voting}</a></th>
        <th width="15%" align="center"><a href="index.php?downloads-{cid}-downs{DOM}">{_lang_downs}</a></th>
      </tr>
      {EXPLODE}
      <tr class="{class}">
         <td><a href="index.php?downloads-show-{id}">{ssurl}{name} {version}</a><br /><span class="smalfont">»&nbsp;{desc}</span></td>
         <td>
           <div class="download_wertung_container list">
             <div class="download_wertung_text">{vote_progressbar_text}</div>
             <div class="download_wertung {vote_progressbar_class}" style="width: {vote_progressbar_value}%;">&nbsp;</div>
           </div>
         </td>
         <td align="center">{downs}</td>
      </tr>
      {EXPLODE}
    </table>
     
     
    {EXPLODE}
    <p></p><p></p>
    <form action="index.php?downloads-upload" method="POST" enctype="multipart/form-data">
      <fieldset>
        <legend><b>{_lang_fileup}</b></legend>
              <label style="width:100px; float:left;">{_lang_name}</label><input type="text" name="name" maxlength="50" value="" /><br />
              <label style="width:100px; float:left;">{_lang_version}</label><input type="text" name="version" maxlength="10" size="11" value="" /><br />
              <label style="width:100px; float:left;">{_lang_author}</label><input type="text" name="autor" maxlength="50" value="" /><br />
              <label style="width:100px; float:left;">{_lang_linkor}</label><input type="text" name="url" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_upload}</label><input type="file" name="file" size="28" /><br />
              <label style="width:100px; float:left;">{_lang_demolink}</label><input type="text" name="surl" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_preview}</label><input type="text" name="ssurl" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_shortdesc}</label><input type="text" name="desc" size="40" maxlength="100" value="" /><br />
              <label style="width:100px; float:left;">{_lang_desc}</label><textarea cols="40" rows="4" name="descl"></textarea><br />
              <label style="width:100px; float:left;"></label><input type="submit" value="Absenden" name="sub"><br />
      </fieldset>
    </form>


    downloads_show.htm
    <script language="JavaScript" type="text/javascript">
    <!--
    function doVote(n1,did) {
      document.location.href="index.php?downloads-show-" + did + "-z"+n1;
    }
    //-->
    </script>
     
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
      <tr class="Chead">
            <th colspan="4" align="center"><b>{name} {version}</b></th>
        </tr><tr>
          <td class="Cmite">{_lang_name}</td>
            <td class="Cnorm">{name}</td>
        <td class="Cmite" colspan="2" valign="top" align="center"><strong>{_lang_voting}</strong></td>
      </tr><tr>
          <td class="Cmite">Version</td>
            <td class="Cnorm">{version_kl}</td>
        <td class="Cmite" colspan="2" valign="top">
          <div class="download_wertung_container">
            <div class="download_wertung_text">{vote_progressbar_text}</div>
            <div class="download_wertung {vote_progressbar_class}" style="width: {vote_progressbar_value}%;">&nbsp;</div>
          </div>
        </td>
      </tr><tr>
          <td class="Cmite">{_lang_author}</td>
            <td class="Cnorm">{creater}</td>
        <td class="Cnorm" rowspan="2" colspan="2" align="center">
        <table class="border" border="0" cellspacing="1" cellpadding="0">
          <tr>
            <td class="Cdark" onClick="doVote(1,{id})" style="cursor:pointer">&nbsp;1&nbsp;</td>
            <td class="Cmite" onClick="doVote(2,{id})" style="cursor:pointer">&nbsp;2&nbsp;</td>
            <td class="Cdark" onClick="doVote(3,{id})" style="cursor:pointer">&nbsp;3&nbsp;</td>
            <td class="Cmite" onClick="doVote(4,{id})" style="cursor:pointer">&nbsp;4&nbsp;</td>
            <td class="Cdark" onClick="doVote(5,{id})" style="cursor:pointer">&nbsp;5&nbsp;</td>
            <td class="Cmite" onClick="doVote(6,{id})" style="cursor:pointer">&nbsp;6&nbsp;</td>
            <td class="Cdark" onClick="doVote(7,{id})" style="cursor:pointer">&nbsp;7&nbsp;</td>
            <td class="Cmite" onClick="doVote(8,{id})" style="cursor:pointer">&nbsp;8&nbsp;</td>
            <td class="Cdark" onClick="doVote(9,{id})" style="cursor:pointer">&nbsp;9&nbsp;</td>
            <td class="Cmite" onClick="doVote(10,{id})" style="cursor:pointer">&nbsp;10&nbsp;</td>
          </tr>
        </table>
        </td>
        </tr><tr>
          <td class="Cmite">{_lang_date}</td>
            <td class="Cnorm">{datum}</td>
      </tr><tr>
          <td class="Cmite" width="110">{_lang_size}</td>
            <td class="Cnorm">{size}</td>
        <td class="Cmite" width="110">{_lang_voter}</td>
            <td class="Cnorm">{vote_klicks}</td>
        </tr><tr>
          <td class="Cmite">{_lang_downloads}</td>
            <td class="Cnorm">{downs}</td>
          <td class="Cmite">{_lang_seenfrom}</td>
            <td class="Cnorm">{hits}</td>
        </tr>
    </table>
    <p></p>
    <b><center><a href="index.php?downloads-down-{id}">{_lang_download}</a>{surl}</center></b>
    <p></p>
    <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3">
    <tr>
    <th class="Cdark">{_lang_desc}</th>
    </tr>
    <td class="Cnorm">{ssurl}{descl}</td>
    </tr>
    <tr>
    <td class="Cnorm">
    <form action="index.php?downloads-show-{id}" method="POST">
    <fieldset>
    Comments
    <legend>{_lang_writecomment}</legend>
    <input type="text" name="name" value="{uname}" /> <input type="submit" value="{_lang_enter}"><br />
    <textarea cols="50" rows="2" name="text"></textarea><br />
    {ANTISPAM}
    </fieldset>
    </form>
    </td>
    </tr>
    <tr>
    <td class="Cnorm">
    {EXPLODE}
    {EXPLODE}
    <span class="Cmite" style="width:100%;display:block;"><span style="display:block;padding:2px 2px 2px 5px;"># <b>{zahl}</b> von {name}</span> </span>
    <span class="Cnorm" style="width:100%;display:block;"><span style="display:block;padding:4px 4px 4px 6px;">{text}</span> </span>
    <br />
    {EXPLODE}
    </td>
    </tr>
     
    </table>
    1 Mitglieder finden den Beitrag gut.
  14. #14
    User Pic
    MOODFOR Mitglied
    Registriert seit
    25.06.2014
    Beiträge
    177
    Beitragswertungen
    2 Beitragspunkte
    Sorry, für die späte Antwort. Ich musste viel zu viel arbeiten.
    Dankeschön, funktioniert und sieht richtig gut aus.

    Danke nochmal ! lachen
    The government pretend,
    they your friend. And then when you steal some shit,they put you in jail
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu HTML, PHP, SQL,...

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten