Beitrag Autor: punkerwelle
Beitrag ID: 281
Beitrag Info
Antworten gibt es 33 zu diesem Beitrag und er wurde 2813 mal aufgerufen.  Es sind auch Dateien angehängt.
Thema ansehen
fusion-mods » PHP-Fusion 7.02.xx » Infusionen 7.02
AnfangDu befindest dich auf Seite 12Vorblättern
 Thema drucken
PDP keine Scoresabzüge für Premium User Gruppe möglich?
punkerwelle
hallo, ich habe bei mir im Pro DOwnload System den Variablen scores abzug eingebaut, was auch alles funktioniert.meine Frage
ist es irgendwie möglich das eine von mir festgelegte Usergruppe keine Scores abgezogen bekommt?
 
http://punkerwelle.com/
punkerwelle
und wo genau baue ich es ein? welche datei?

baue ich es in die file.php, bekomme ich ne weiße seite.
Bearbeitet von punkerwelle am 07.12.2015 um 12:47
 
http://punkerwelle.com/
Rolly8-HL
Habe das bei mir in die PDP schallah22 theme.php eingebaut, wo genau es da bei Dir hin muss musst Du Dir da mal raus suchen.


Download Code
  Optionen:

Code markieren
if (score_account_stand() < $data['cost']) {
   
if (checkgroup(2) ){   
      $down_link = '<form action="file.php" method="get">
<input type="hidden" name="did" value="'.$down_link['did'].'" />
<input type="hidden" name="file_id" value="'.$down_link['file'].'" />
<input type="image" src="'.INFUSIONS.'pro_download_panel/themes/schallah22/icons/download_prem.png" value="'.$locale['PDP201'].'" /><br />'.$locale['PDP201'].'<br />
<font color="#FF0000">( Dieser '.$locale['PDP201'].' Kostet: '.$data['cost'].' Score )<br />( Du hast keine '.$data['cost'].' Score )<br />
<font color="#090">( Diese Gruppe ist frei von '.$locale['PDP201'].' Kosten )</font>   
<br /><font color="#FF0000">( Dein Scorstand: '.score_account_stand().' )</font><br />
</form>';
//kein Abzug    Gruppe
   } else {
      $down_link = '<image src="'.INFUSIONS.'pro_download_panel/themes/schallah22/icons/download_no.png"  /><br />
'.$locale['PDP201'].'<br /><br />
<font color="#FF0000">( Dieser '.$locale['PDP201'].' Kostet: '.$data['cost'].' Score )<br />( Du hast keine '.$data['cost'].' Score )<br />( Dein Scorstand: '.score_account_stand().' )</font>';
}

} else {
if (checkgroup(2) ){   
      $down_link = '<form action="file.php" method="get">
<input type="hidden" name="did" value="'.$down_link['did'].'" />
<input type="hidden" name="file_id" value="'.$down_link['file'].'" />
<input type="image" src="'.INFUSIONS.'pro_download_panel/themes/schallah22/icons/download_prem.png" value="'.$locale['PDP201'].'" /><br />'.$locale['PDP201'].'<br />
<font color="#FF0000">( Dieser '.$locale['PDP201'].' Kostet: '.$data['cost'].' Scores )</font><br />
<font color="#090">( Diese Gruppe ist frei von '.$locale['PDP201'].' Kosten )</font>   
<br />Dein Scorstand: '.score_account_stand().'<br />
</form>';
//kein Abzug    Gruppe

   } else {
      $down_link = '<form action="file.php" method="get">
<input type="hidden" name="did" value="'.$down_link['did'].'" />
<input type="hidden" name="file_id" value="'.$down_link['file'].'" />
<input type="image" src="'.INFUSIONS.'pro_download_panel/themes/schallah22/icons/download.png" value="'.$locale['PDP201'].'" /><br />'.$locale['PDP201'].'<br />
<font color="#FF0000">( Dieser '.$locale['PDP201'].' Kostet: '.$data['cost'].' Scores )</font>   
<br />Dein Scorstand: '.score_account_stand().'<br /></form>';
}
}


   } else {
      $down_link = parseubb($pdp->settings['download_restricted']);
      if(FUSION_VERSION!='FF') {
         $down_link = nl2br($down_link);
      }
   }


ID 2 = Premium bei mir, schallah22 und hemes/schallah22/icons/download_prem.png musst Du Dir selbst anpassen.
Rolly8-HL hat folgende Datei angehängt:
Du hast nicht die Berechtigung die Anhänge dieses Themas zu sehen.
Klicke hier um dich zu Registrieren
oder klicke zum Einloggen hier!!

Bearbeitet von matze am 04.06.2017 um 17:57
[b]Gruß Rolly8-HL[/b]
Was für Andere Wichtig ist muss für mich nicht genauso Wichtig sein!
Bin Dickkopf Unbelehrbar mache aus Protest nicht das was andere für Richtig halten!
Das gibt einem zu Denken oder?
 
https://rolly8-hl.de
punkerwelle
ich häng mal meine Theme an, da ich nicht weiß wo es genau hin muss. und auch schon einiges Modifiziert ist


Download Code
  Optionen:

Code markieren
<?php
/***************************************************************************
 *   Professional Download System                                          *
 *                                                                         *
 *   Copyright (C) 2006-2009 Artur Wiebe                                   *
 *   wibix@gmx.de                                                          *
 *   http://wibix.de/                                                      *
 *                                                                         *
 *   Scoreabzugerweiterung by Harlekin                                     *
 *   harlekin67@gmx.de                                                     *
 *   http://www.harlekin-power.de                                          *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/
if(!defined('IN_FUSION')) {
   die;
}

$theme_icons = INFUSIONS.'pro_download_panel/themes/schallah/icons/';


function pdp_render_cats($catid, $in_down, &$path, &$cats)
{
   global $locale, $theme_icons;

   // path
   $level = 0;
   $path_str = "";
   foreach($path as $data) {
      if($data['id']==$catid && !$in_down) {
         $path_str .= str_repeat(" ", $level*4)."<img src='".$theme_icons."/folder.png' alt='-' /> <b>".$data['name']."</b><br>\n";
      } else {
         $path_str .= str_repeat(" ", $level*4)."<img src='".$theme_icons."/folder_grey.png' alt='-' /> <a href='?catid=".$data['id']."'>"
               .$data['name']."</a><br>\n";
      }
      ++$level;
   }

   // wibix do not show sub cats on a specific download
   echo "<p><table border='0' width='100%' cellspacing='1'"
      ." cellpadding='2' class='tbl-border'>\n"
      ."<tr><td class='tbl2'>$path_str</td>";
   if(count($cats)) {
      echo "<td width='1%' valign='bottom' class='tbl2'>"
         ."<b>".$locale['PDP222']."</b></td>"
         ."<td width='1%' valign='bottom' class='tbl2'>"
         ."<b>".$locale['pdp_downloads']."</b></td>";
   }
   echo "</tr>\n";
   
   // child cats
   $level = ($level*15)."px";
   foreach($cats as $id => $data) {
      echo "<tr>\n"
         ."<td class='tbl1'><div style='margin-left:$level'>"
            ."<img src='".$theme_icons."/folder_grey.png' alt='-' />"
            ." <b><a href='".FUSION_SELF."?catid=$id'>"
            .$data['name']."</a></b>";
      if(!empty($data['desc'])) {
         echo "<br><span class='small2'>".$data['desc']
            ."</span>";
      }
      echo "</div></td>\n"
         ."<td align='center' class='tbl2' valign='top'>"
            .($data['cnt_cats']
               ? $data['cnt_cats'] : "")."</td>\n"
         ."<td align='center' class='tbl2' valign='top'>"
            .($data['cnt_downs']
               ? $data['cnt_downs'] : "")."</td>\n"
         ."</tr>\n";
   }
   echo "</table></p>
  \n";
}


function pdp_render_downs(&$downs, $rowstart, $per_page, $count, $link)
{
   global $locale, $theme_icons;

   foreach($downs as $data) {
      if($data['is_new']) {
         $new = ' <img src="'.$theme_icons.'new.png"'
            .' alt="'.$locale['pdp_new'].'" style="vertical-align:middle;" />';
      } else {
         $new = "";
      }
      echo "<br>";
      echo '
<table border="0" width="100%">
<tr>
   <td width="1%"><img src="'.$theme_icons.'project.png" alt="FIXME" /></td>
   <td><b><a href="'.$data['href'].'">'.$data['name'].'</a></b>'.$new.'<br />'
   /*   ."<span class='small2'>"
         .($data['user_id']
            ? $locale['PDP214']." <a href='profile.php?id="
               .$data['user_id']."'>"
               .$data['user_name']."</a> "
            : "")
         .showdate("shortdate", $data['mtime'])."</span>"*/
   ."</td>
   <td align='right' style='white-space:nowrap;'>"
      .$locale['pdp_downloads'].": ".$data['downloads']."<br />"
         .$locale['PDP021'].": ".$data['comments']."</td>
</tr>
<tr>
   <td colspan='3'>".$data['desc']."</td>
</tr>
</table>";
   }

   if($count > $per_page) {
      echo '
<p style="text-align:center;">'
   .makePageNav($rowstart, $per_page, $count, 3, $link).'
</p>';
   }
echo "<br>";
echo "<hr>";
// Statisitk Start
echo "<br>";
echo "<br>";
   $downloads = ff_db_count("(*)", DB_PDP_DOWNLOADS, "");
   $files = ff_db_count("(*)", DB_PDP_FILES, "");
   $klicks = dbquery("SELECT SUM(dl_count) FROM ".DB_PDP_DOWNLOADS);
   $hits = dbquery("SELECT SUM(count_visitors) FROM ".DB_PDP_DOWNLOADS);
   $pics = ff_db_count("(*)", DB_PDP_IMAGES, "");
   $query_id = dbquery("SELECT file_timestamp
      FROM ".DB_PDP_FILES."
      ORDER BY file_timestamp DESC LIMIT 1");
   if(dbrows($query_id)) {
      $mtime = array_shift(dbarray($query_id));
   } else {
      $mtime = 0;
   }
   
/*   $dl_size_Bytes = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Bytes'");
   $dl_size_Kb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Kb'");
    $dl_size_Mb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Mb'");
   $dl_size_Gb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Gb'");   */

   
  echo "
  <table style='text-align: left; width: 80%;' border='0'
   cellpadding='0' cellspacing='0'>
      <tr>
        <td><center><img src='".$theme_icons."statistic.png' alt='statistic.png' /></center></td>
        <td>
               ".$locale["pdp_downloads"].": <strong>".$downloads."</strong><br>
              ".$locale['PDP820'].": <strong>".ff_db_count('(*)', DB_PDP_CATS, '')."</strong><br>             
               ".$locale["PDP019"].": <strong>".$files."</strong><br>
               ".$locale["PDP015"].": <strong>".$pics."</strong><br>
               ".$locale["PDP223"].": <strong>".dbresult($hits,0)."</strong><br>";
                             
              /* echo "
              Bytes: <strong>".dbresult($dl_size_Bytes,0)."</strong>Bytes<br>
               Kb: <strong>".dbresult($dl_size_Kb,0)."</strong>Kb<br>
               Mb: <strong>".dbresult($dl_size_Mb,0)."</strong>Mb<br>
              Gb: <strong>".dbresult($dl_size_Gb,0)."</strong>Gb<br>";  */
         echo "
        </td>
       
        <td>";
     
             
              // Top Download
              $downs = array();
              pdpCore::get_downloads($get, 'dl_count DESC', 0, 2, true, $downs, false); // Anzahl top Downloads
             
              echo '
              <table width="100%" cellspacing="0" cellpadding="0" border="0">
              <tbody>';
              foreach($downs as $data) {
                 echo '
              <tr>
                 <td><img src="'.$theme_icons.'top_18.png" alt="top.png" /> <a href="'.INFUSIONS.'pro_download_panel/download.php?did='.$data['id'].'" title="'.$data['name'].'">'
                    .trimlink($data['name'], 32).'</a></td>
                 <td align="right">['.pdpCore::format_number($data['downloads']).']</td>
              </tr>';
              }
              echo '
              </tbody>
              </table>';
                   
        echo "
        </td>
        </tr>
        </table><br>";
     if($mtime) {
     echo "<center><small>".$locale['PDP052'].": ".showdate('shortdate', $mtime);
    echo "</small></center><hr>";
     };

// Statisitk Ende
}


function pdp_render_download($id, $data, $links, $files, $images, $old_data)
{
   global $locale, $pdp;

   $down_link = '';
   if(!$data['can_download']) {
      ;
   } elseif(!empty($old_data['down']) || !empty($old_data['link_extern'])){
      $down_link = array(
         'did'   => $id,
         'file'   => 0,
      );
   } elseif(count($files)) {
      $latest_download = array_shift($files);
      $down_link = array(
         'did'   => $id,
         'file'   => $latest_download['id'],
      );
      $old_ver = $latest_download['ver'];
      $old_size = $latest_download['size'];
      array_unshift($files, $latest_download);
   }

   if(is_array($down_link)) {
      if (score_account_stand() < $data['cost']) {
      $down_link = '
<image src="'.INFUSIONS.'pro_download_panel/themes/schallah/icons/download_no.png"  /><br />
'.$locale['PDP201'].'<br /><br />
<font color="#FFFFFF">'.$locale['PDP201'].' Kosten: '.$data['cost'].' Coins </font><br><font color="#FF0000">Du hast nur noch '.score_account_stand().'  Coins<br /></font><br><font color="#FF0000">Coins kannst du bei uns zb. durchs Uploaden Sammeln (500 Coins / Upload) <br>oder aber durch eine kleine Spende käuflich erwerben.</span><br />';
} else {
      $down_link = '
<form action="file.php" method="get">
<input type="hidden" name="did" value="'.$down_link['did'].'" />
<input type="hidden" name="file_id" value="'.$down_link['file'].'" />
<input type="image" src="'.INFUSIONS.'pro_download_panel/themes/schallah/icons/download.png" value="'.$locale['PDP201'].'" /><br />'.$locale['PDP201'].'<br /><br />
<font color="#FFFFFF">'.$locale['PDP201'].'kosten: '.$data['cost'].' Coins</font>   
<br /><font color="#00FF00">Guthaben: '.score_account_stand().' Coins</font><br /></form>';
}

   } else {
      $down_link = parseubb($pdp->settings['download_restricted']);
      if(FUSION_VERSION!='FF') {
         $down_link = nl2br($down_link);
      }
   }

   if(!empty($data['pic'])) {
      $pic = $data['pic'];
      $pic_id = 0;
   } elseif(count($images)) {
      $first_pic = $images[0];
      $pic = $first_pic['url'];
      $pic_id = $first_pic['id'];
   } else {
      $pic = "";
   }
   echo "<p><font size='+1'><b>".$data['name']."</b></font>\n";
   echo "<hr />

<table border='0' cellspacing='0' width='100%' cellpadding='0'>
<tr>
   <td valign='top' colspan='2'>".$data['desc']."</td>
   <td width='150' valign='top' rowspan='2' align='right'>
   <table class='tbl-border' cellspacing='1' cellpadding='0' width='145'>";
// kosten
#if(!empty($data['cost'])) {
#echo "<tr>
#<td align='center' class='tbl2'><br />
#<img alt='Downloads' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/cash.png'><br />
#Du brauchst: ".$data['cost']."<br />Coins</td>
#</tr>";
#}else{
#echo "<tr>
#<td align='center' class='tbl2'><br />
#<img alt='Downloads' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/cash.png'><br />
#Du brauchst: 0<br />Coins</td>
#
#</tr>";
#}

// screenshot
if(!empty($pic)) {
   echo "<tr>
    <td align='center' class='tbl2'>
    <img alt='Screenshot' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/screenshot.png'><br />
    <a href='image.php?did=".$id."&pic_id=$pic_id'>
    ".$locale['PDP028']."</a></td>
</tr>";
}

// homepage
if(!empty($data['homepage'])) {
   echo "<tr>
    <td class='tbl2' align='center'>
    <img alt='Homepage' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/www.png'><br />
    <a href='".$data['homepage']."'"." target='_blank'>   
    ".$locale['PDP020']."</a></td>";
}

//genre
if(!empty($data['genre'])) {
   echo "<tr>
       <td class='tbl2' align='center'>
  <img alt='genre' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/genre.jpg'><br />
  ".$data['genre']."</td>
</tr>\n";
}

//Ausgabe der Sprache des Downloads
if ($data['language']=="England"){
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/en.jpg" width="60" height="32" alt="England" /><br />';
echo "".$locale['pdp_english']."</td>";

} elseif ($data['language']=="Deutschland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/de.jpg" width="60" height="32" alt="Deutschland" /><br />';
echo "".$locale['pdp_deutsch']."</td>";

} elseif ($data['language']=="Albanien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/alb.jpg" width="60" height="32" alt="Albanien" /><br />';
echo "".$locale['pdp_albanien']."</td>";

} elseif ($data['language']=="Argentinien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/arg.jpg" width="60" height="32" alt="Argentinien" /><br />';
echo "".$locale['pdp_argentinien']."</td>";

} elseif ($data['language']=="Australien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/australien.jpg" width="60" height="32" alt="Australien" /><br />';
echo "".$locale['pdp_australien']."</td>";

} elseif ($data['language']=="Belgien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/bel.jpg" width="60" height="32" alt="Belgien" /><br />';
echo "".$locale['pdp_belgien']."</td>";

} elseif ($data['language']=="Brasilien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/bra.jpg" width="60" height="32" alt="Brasilien" /><br />';
echo "".$locale['pdp_brasilien']."</td>";

} elseif ($data['language']=="Bulgarien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/bul.jpg" width="60" height="32" alt="Bulgarien" /><br />';
echo "".$locale['pdp_bulgarien']."</td>";

} elseif ($data['language']=="China") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/china.jpg" width="60" height="32" alt="China" /><br />';
echo "".$locale['pdp_china']."</td>";

} elseif ($data['language']=="Chile") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/chile.jpg" width="60" height="32" alt="Chile" /><br />';
echo "".$locale['pdp_chile']."</td>";

} elseif ($data['language']=="Daenemark") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/dan.jpg" width="60" height="32" alt="Daenemark" /><br />';
echo "".$locale['pdp_daenemark']."</td>";

} elseif ($data['language']=="Estland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/estland.jpg" width="60" height="32" alt="Estland" /><br />';
echo "".$locale['pdp_estland']."</td>";

} elseif ($data['language']=="Finnland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/fin.jpg" width="60" height="32" alt="Finnland" /><br />';
echo "".$locale['pdp_finnland']."</td>";

} elseif ($data['language']=="Frankreich") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/fra.jpg" width="60" height="32" alt="Frankreich" /><br />';
echo "".$locale['pdp_france']."</td>";

} elseif ($data['language']=="Griechenland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/gri.jpg" width="60" height="32" alt="Griechenland" /><br />';
echo "".$locale['pdp_griechenland']."</td>";

} elseif ($data['language']=="Italien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/ita.jpg" width="60" height="32" alt="Italien" /><br />';
echo "".$locale['pdp_italien']."</td>";

} elseif ($data['language']=="Indien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/indi.jpg" width="60" height="32" alt="Indien" /><br />';
echo "".$locale['pdp_indien']."</td>";

} elseif ($data['language']=="Indonesien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/indo.jpg" width="60" height="32" alt="Indonesien" /><br />';
echo "".$locale['pdp_indonesien']."</td>";

} elseif ($data['language']=="Israel") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/isr.jpg" width="60" height="32" alt="Israel" /><br />';
echo "".$locale['pdp_israel']."</td>";

} elseif ($data['language']=="Iran") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/iran.jpg" width="60" height="32" alt="Iran" /><br />';
echo "".$locale['pdp_iran']."</td>";

} elseif ($data['language']=="Irland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/irl.jpg" width="60" height="32" alt="Irland" /><br />';
echo "".$locale['pdp_irland']."</td>";

} elseif ($data['language']=="Island") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/isl.jpg" width="60" height="32" alt="Island" /><br />';
echo "".$locale['pdp_island']."</td>";

} elseif ($data['language']=="Jamaic") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/jam.jpg" width="60" height="32" alt="Jamaica" /><br />';
echo "".$locale['pdp_jamaica']."</td>";

} elseif ($data['language']=="Japan") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/jap.jpg" width="60" height="32" alt="Japan" /><br />';
echo "".$locale['pdp_japan']."</td>";

} elseif ($data['language']=="Kanada") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/kan.jpg" width="60" height="32" alt="Kanada" /><br />';
echo "".$locale['pdp_kanada']."</td>";

} elseif ($data['language']=="Kolumbien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/kol.jpg" width="60" height="32" alt="Kolumbien" /><br />';
echo "".$locale['pdp_kolumbien']."</td>";

} elseif ($data['language']=="Korea") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/kor.jpg" width="60" height="32" alt="Korea" /><br />';
echo "".$locale['pdp_korea']."</td>";

} elseif ($data['language']=="Kroatien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/kroatien.jpg" width="60" height="32" alt="Kroatien" /><br />';
echo "".$locale['pdp_kroatien']."</td>";

} elseif ($data['language']=="Malaysia") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/malaysia.jpg" width="60" height="32" alt="Malaysia" /><br />';
echo "".$locale['pdp_malaysia']."</td>";


} elseif ($data['language']=="Mexiko") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/mex.jpg" width="60" height="32" alt="Mexiko" /><br />';
echo "".$locale['pdp_mexico']."</td>";

} elseif ($data['language']=="Niederlande") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/nie.jpg" width="60" height="32" alt="Niederlande" /><br />';
echo "".$locale['pdp_niederlande']."</td>";

} elseif ($data['language']=="Norwegen") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/nor.jpg" width="60" height="32" alt="Norwegen" /><br />';
echo "".$locale['pdp_norwegen']."</td>";

} elseif ($data['language']=="Neuseeland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/neu.jpg" width="60" height="32" alt="Neuseeland" /><br />';
echo "".$locale['pdp_neuseeland']."</td>";

} elseif ($data['language']=="Oesterreich") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/austria.jpg" width="60" height="32" alt="Oesterreich" /><br />';
echo "".$locale['pdp_austria']."</td>";

} elseif ($data['language']=="Peru") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/peru.jpg" width="60" height="32" alt="Peru" /><br />';
echo "".$locale['pdp_peru']."</td>";

} elseif ($data['language']=="Polen") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/pol.jpg" width="60" height="32" alt="Polen" /><br />';
echo "".$locale['pdp_polen']."</td>";

} elseif ($data['language']=="Portugal") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/por.jpg" width="60" height="32" alt="Portugal" /><br />';
echo "".$locale['pdp_portugal']."</td>";

} elseif ($data['language']=="Russland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/rus.jpg" width="60" height="32" alt="Russland" /><br />';
echo "".$locale['pdp_russland']."</td>";

} elseif ($data['language']=="Rumaenien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/rum.jpg" width="60" height="32" alt="Rumaenien" /><br />';
echo "".$locale['pdp_rumaenien']."</td>";

} elseif ($data['language']=="Schweden") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/schweden.jpg" width="60" height="32" alt="Schweden" /><br />';
echo "".$locale['pdp_schweden']."</td>";

} elseif ($data['language']=="Spanien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/spa.jpg" width="60" height="32" alt="Spanien" /><br />';
echo "".$locale['pdp_spanien']."</td>";

} elseif ($data['language']=="Schweiz") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/schweiz.jpg" width="60" height="32" alt="Schweiz" /><br />';
echo "".$locale['pdp_schweiz']."</td>";

} elseif ($data['language']=="Schottland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/schottland.jpg" width="60" height="32" alt="Schottland" /><br />';
echo "".$locale['pdp_schottland']."</td>";

} elseif ($data['language']=="Schweden") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/schweden.jpg" width="60" height="32" alt="Schweden" /><br />';
echo "".$locale['pdp_schweden']."</td>";

} elseif ($data['language']=="Serbien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/serbien.jpg" width="60" height="32" alt="Serbien" /><br />';
echo "".$locale['pdp_serbien']."</td>";

} elseif ($data['language']=="Slowakei") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/slowakei.jpg" width="60" height="32" alt="Slowakei" /><br />';
echo "".$locale['pdp_slowakei']."</td>";

} elseif ($data['language']=="Slowenien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/slo.jpg" width="60" height="32" alt="Slowenien" /><br />';
echo "".$locale['pdp_slowenien']."</td>";

} elseif ($data['language']=="Taiwan") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/taiwan.jpg" width="60" height="32" alt="Taiwan" /><br />';
echo "".$locale['pdp_taiwan']."</td>";

} elseif ($data['language']=="Thailand") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/thailand.jpg" width="60" height="32" alt="Thailand" /><br />';
echo "".$locale['pdp_thailand']."</td>";

} elseif ($data['language']=="Tunesien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/tun.jpg" width="60" height="32" alt="Tunesien" /><br />';
echo "".$locale['pdp_tunesien']."</td>";

} elseif ($data['language']=="Tuerkei") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/tuerkei.jpg" width="60" height="32" alt="Tuerkei" /><br />';
echo "".$locale['pdp_tuerkei']."</td>";

} elseif ($data['language']=="Tschechien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/tsc.jpg" width="60" height="32" alt="Tschechien" /><br />';
echo "".$locale['pdp_tschechien']."</td>";

} elseif ($data['language']=="Ungarn") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/ung.jpg" width="60" height="32" alt="Ungarn" /><br />';
echo "".$locale['pdp_ungarn']."</td>";

} elseif ($data['language']=="USA") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/usa.jpg" width="60" height="32" alt="USA" /><br />';
echo "".$locale['pdp_usa']."</td>";

} elseif ($data['language']=="Ukraine") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/ukraine.jpg" width="60" height="32" alt="Ukraine" /><br />';
echo "".$locale['pdp_ukraine']."</td>";

} else {
echo'<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/empty_language.png" width="60" height="32" alt="N/A" /><br />';
echo "".$locale['pdp_nicht_angegeben']."</td>";
}

// download count

if (iADMIN){
echo "<tr>
   <td align='center' class='tbl2'>
  <img alt='Downloads' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/downloads.png'><br />
  ".$locale['pdp_downloads'].": "
      .pdpCore::format_number($data['count'])."</td>
</tr>";
}
// version
if(!empty($old_data['version'])) {
   echo "<tr><td class='tbl2' align='center'>".$locale['PDP018']
      .":<br />".$old_data['version']."</td>";
}
// FIXME TODO
if(!empty($old_data['size'])) {
   echo "<tr><td align='center' class='tbl2'>"
      .$locale['PDP029'].":<br />".$old_data['size']."</td></tr>";
}
if(!empty($data['license'])) {
   echo "<tr>
   <td align='center' class='tbl2'><br />
  <img alt='Lizenz' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/lizenz.png'><br />
  ".$data['license']."</td>
</tr>";
}

// who posted and when.
echo "<tr><td align='center' class='tbl2'>
  <img alt='History' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/history.png'><br />
  "/*.($data['user_id']
      ?  "<a href='profile.php?id=".$data['user_id']."'>"
         .$data['user_name']."</a><br />"
      : "") */
   .showdate("shortdate", $data['mtime'])."</td>
</tr>\n";

//---------------------------------
//format
if(!empty($data['format'])) {
   echo "<tr>
   <td class='tbl2' align='center'>
  <img alt='format' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/format.png'><br />
  Format: ".$data['format']."</td>
</tr>\n";
}

//jahr
if(!empty($data['jahr'])) {
   echo "<tr>
   <td class='tbl2' align='center'>
  <img alt='jahr' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/jahr.jpg'><br />
  Erscheinungsjahr: ".$data['jahr']."</td>
</tr>\n";
}

//bitrate
if(!empty($data['bitrate'])) {
   echo "<tr>
   <td class='tbl2' align='center'>
  <img alt='bitrate' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/bitrate.png'><br />
  Bitrate: ".$data['bitrate']." kbps</td>
</tr>\n";
}

//groesse
if(!empty($data['groesse'])) {
   echo "<tr>
   <td class='tbl2' align='center'>
  <img alt='groesse' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/groesse.jpg'><br />
  Größe: ".$data['groesse']." MB</td>
</tr>\n";
}

//Avatarausgabe / Uploaderausgabe
echo "<tr><td class='tbl1' align='center' colspan='1'>Uploader:<br>";
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='".$data['user_id']."' ORDER BY user_avatar LIMIT 1");
if (dbrows($result)) {
while($data2 = dbarray($result)) {
if (empty($data2['user_avatar'])){
echo '<img style="width: 50px; height: 50px;" src="'.IMAGES.'avatars/noavatar50.png">';
} else {
echo '<img style="width: 50px; height: 50px;" src="'.IMAGES.'avatars/'.$data2['user_avatar'].'">';
}
}} else { echo '<img style="width: 50px; height: 50px;" src="'.IMAGES.'avatars/noavatar50.png">'; }
echo"<br>".($data['user_id'] ?  "<a href='profile.php?id=".$data['user_id']."'>"
         .$data['user_name']."</a><br />"
      : "")."</td></tr>\n";

//Passwort
if(!empty($data['passwort'])) {
   echo "<tr>
   <td class='tbl2' align='center'>
  <img alt='passwort' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/passwort.png'><br />
  ".$data['passwort']."</td>
</tr>\n";
}


if($data['allow_notify']) {
if($data['can_subscribe']) {
   echo "<tr>
   <td class='tbl2' align='center'>".($data['is_subscribing']
      ? "<a href='include/do_did.php?did=".$id."&subscibe=0'>".$locale['PDP060']."</a>"
      : "<a href='include/do_did.php?did=".$id."&subscibe=1'>".$locale['PDP059']."</a>")
      ."</td>
</tr>\n";
}
}

echo "</table></td>
</tr><tr><td align='center' valign='bottom'>".$down_link."</td>
</tr><tr><td align='center' class='tbl0'>
<a href='".BASEDIR."infusions/mw_buy_points_panel/mw_buy_points.php'/>
<img src='".INFUSIONS."pro_download_panel/themes/schallah/icons/img9.png' style='border:0px' height='56' width='96px' alt'Coins Kaufen' title='Coins kaufen'/>
<a href='".BASEDIR."infusions/mw_buy_points_panel/mw_buy_points.php'/></a></center></td><br />
</table>
<hr />\n";

// report broken downloads
   echo "<div align='left'>";
   if(iPDP_BROKEN) {
      echo " <a href='".BASEDIR."forum/viewforum.php?forum_id=70'>".$locale['PDP024']

         ."</a> <br />";
   }

//include INFUSIONS. 'beschwerde_system_panel/beschwerde_system_panel2.php';   
   // edit link
   if(count($links)) {
      echo "<b>".$locale['pdp_edit'].":</b> [ "
         .implode(" | ", $links)." ]";
   }
   echo "</div>\n";


   

// Statisitk Start
echo "<br>";

   $downloads = ff_db_count("(*)", DB_PDP_DOWNLOADS, "");
   $files = ff_db_count("(*)", DB_PDP_FILES, "");
   $klicks = dbquery("SELECT SUM(dl_count) FROM ".DB_PDP_DOWNLOADS);
   $hits = dbquery("SELECT SUM(count_visitors) FROM ".DB_PDP_DOWNLOADS);
   $pics = ff_db_count("(*)", DB_PDP_IMAGES, "");
   $query_id = dbquery("SELECT file_timestamp
      FROM ".DB_PDP_FILES."
      ORDER BY file_timestamp DESC LIMIT 1");
   if(dbrows($query_id)) {
      $mtime = array_shift(dbarray($query_id));
   } else {
      $mtime = 0;
   }
   
/*   $dl_size_Bytes = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Bytes'");
   $dl_size_Kb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Kb'");
    $dl_size_Mb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Mb'");
   $dl_size_Gb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Gb'");   */

   
  echo "
  <table style='text-align: left; width: 80%;' border='0'
   cellpadding='0' cellspacing='0'>
      <tr>
        <td><center><img src='".INFUSIONS."pro_download_panel/themes/schallah/icons/statistic.png' alt='statistic.png' /></center></td>
        <td>
               ".$locale["pdp_downloads"].": <strong>".$downloads."</strong><br>
                ".$locale['PDP820'].": <strong>".ff_db_count('(*)', DB_PDP_CATS, '')."</strong><br>             
               ".$locale["PDP019"].": <strong>".$files."</strong><br>
               ".$locale["PDP015"].": <strong>".$pics."</strong><br>
               ".$locale["PDP223"].": <strong>".dbresult($hits,0)."</strong><br>";
                             
              /* echo "
              Bytes: <strong>".dbresult($dl_size_Bytes,0)."</strong>Bytes<br>
               Kb: <strong>".dbresult($dl_size_Kb,0)."</strong>Kb<br>
               Mb: <strong>".dbresult($dl_size_Mb,0)."</strong>Mb<br>
              Gb: <strong>".dbresult($dl_size_Gb,0)."</strong>Gb<br>";  */
         echo "
        </td>
       
        <td>";
     
             
              // Top Download
              $downs = array();
              pdpCore::get_downloads($get, 'dl_count DESC', 0, 5, true, $downs, false); // Anzahl top Downloads
             
              echo '
              <table width="100%" cellspacing="0" cellpadding="0" border="0">
              <tbody>';
              foreach($downs as $data) {
                 echo '
              <tr>
                 <td><img src="'.INFUSIONS.'pro_download_panel/themes/schallah/icons/top_18.png" alt="top.png" /> <a href="'.INFUSIONS.'pro_download_panel/download.php?did='.$data['id'].'" title="'.$data['name'].'">'
                    .trimlink($data['name'], 32).'</a></td>
                 <td align="right">['.pdpCore::format_number($data['downloads']).']</td>
              </tr>';
              }
              echo '
              </tbody>
              </table>';
                   
        echo "
        </td>
        </tr>
        </table><br>";
     if($mtime) {
     echo "<center><small>".$locale['PDP052'].": ".showdate('shortdate', $mtime);
    echo "</small></center><hr>";
     };

// Statisitk Ende

}



function pdp_render_menu($user_links, $admin_links)
{
   global $locale, $stext, $theme_icons;

   if(isset($_GET['stext'])) {
      $stext = stripinput($_GET['stext']);
   } else {
      $stext = '';
   }

   $more_user_links = array();

   $user_links['home'] = '<a href="download.php"><img alt="'.$locale['PDP037'].'" src="'.$theme_icons.'home.png" border="0" /><br />'.$locale['PDP037'].'</a>';
   $user_links['cats'] = '<a href="download.php?catid=0"><img alt="'.$locale['PDP820'].'" src="'.$theme_icons.'cat.png" border="0" /><br />'.$locale['PDP820'].'</a>';
   unset($user_links['search']);
   if(isset($user_links['new'])) {
      $more_user_links[] = $user_links['new'];
      unset($user_links['new']);
   }
   if(isset($user_links['profile'])) {
//      $user_links['profile'] = '<a href="profile.php"><img alt="'.$locale['PDP160'].'" src="'.$theme_icons.'profile.png" border="0" /><br />'.$locale['PDP160'].'</a>';
      $more_user_links[] = $user_links['profile'];
      unset($user_links['profile']);
   }


   echo '     
<table style="text-align: left;" border="0" cellpadding="5" cellspacing="0" align="left">
<tr>   
       <td valign="bottom" align="center">'.implode('</td>'."\n\t".'<td valign="bottom" align="center">', array_values($user_links)).'</td>
</tr>
</table>';

   echo '
<div style="float:right; text-align:right;">
<div>'.implode(' | ', $admin_links).'</div>

<form action="search.php" method="get">
<p>
<input type="text" size="15" maxlength="15" name="stext" class="textbox" value="'.$stext.'" />
<input type="image" src="'.$theme_icons.'search.png" value="'.$locale['PDP040'].'" style="vertical-align:bottom;" />
</p>
</form>
</div>

<div style="clear:both;"></div>

<hr />
';
   if(count($more_user_links)) {
      echo '
<p>
   '.implode(' | ', $more_user_links).'
</p>';
   }
}


?>

Bearbeitet von matze am 04.06.2017 um 22:23
 
http://punkerwelle.com/
punkerwelle
ich häng mal meine Theme an, da ich nicht weiß wo es genau hin muss. bekomme immer ne schwarze seite.


Download Code
  Optionen:

Code markieren
<?php
/***************************************************************************
 *   Professional Download System                                          *
 *                                                                         *
 *   Copyright (C) 2006-2009 Artur Wiebe                                   *
 *   wibix@gmx.de                                                          *
 *   http://wibix.de/                                                      *
 *                                                                         *
 *   Scoreabzugerweiterung by Harlekin                                     *
 *   harlekin67@gmx.de                                                     *
 *   http://www.harlekin-power.de                                          *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/
if(!defined('IN_FUSION')) {
   die;
}

$theme_icons = INFUSIONS.'pro_download_panel/themes/schallah/icons/';


function pdp_render_cats($catid, $in_down, &$path, &$cats)
{
   global $locale, $theme_icons;

   // path
   $level = 0;
   $path_str = "";
   foreach($path as $data) {
      if($data['id']==$catid && !$in_down) {
         $path_str .= str_repeat(" ", $level*4)."<img src='".$theme_icons."/folder.png' alt='-' /> <b>".$data['name']."</b><br>\n";
      } else {
         $path_str .= str_repeat(" ", $level*4)."<img src='".$theme_icons."/folder_grey.png' alt='-' /> <a href='?catid=".$data['id']."'>"
               .$data['name']."</a><br>\n";
      }
      ++$level;
   }

   // wibix do not show sub cats on a specific download
   echo "<p><table border='0' width='100%' cellspacing='1'"
      ." cellpadding='2' class='tbl-border'>\n"
      ."<tr><td class='tbl2'>$path_str</td>";
   if(count($cats)) {
      echo "<td width='1%' valign='bottom' class='tbl2'>"
         ."<b>".$locale['PDP222']."</b></td>"
         ."<td width='1%' valign='bottom' class='tbl2'>"
         ."<b>".$locale['pdp_downloads']."</b></td>";
   }
   echo "</tr>\n";
   
   // child cats
   $level = ($level*15)."px";
   foreach($cats as $id => $data) {
      echo "<tr>\n"
         ."<td class='tbl1'><div style='margin-left:$level'>"
            ."<img src='".$theme_icons."/folder_grey.png' alt='-' />"
            ." <b><a href='".FUSION_SELF."?catid=$id'>"
            .$data['name']."</a></b>";
      if(!empty($data['desc'])) {
         echo "<br><span class='small2'>".$data['desc']
            ."</span>";
      }
      echo "</div></td>\n"
         ."<td align='center' class='tbl2' valign='top'>"
            .($data['cnt_cats']
               ? $data['cnt_cats'] : "")."</td>\n"
         ."<td align='center' class='tbl2' valign='top'>"
            .($data['cnt_downs']
               ? $data['cnt_downs'] : "")."</td>\n"
         ."</tr>\n";
   }
   echo "</table></p>
  \n";
}


function pdp_render_downs(&$downs, $rowstart, $per_page, $count, $link)
{
   global $locale, $theme_icons;

   foreach($downs as $data) {
      if($data['is_new']) {
         $new = ' <img src="'.$theme_icons.'new.png"'
            .' alt="'.$locale['pdp_new'].'" style="vertical-align:middle;" />';
      } else {
         $new = "";
      }
      echo "<br>";
      echo '
<table border="0" width="100%">
<tr>
   <td width="1%"><img src="'.$theme_icons.'project.png" alt="FIXME" /></td>
   <td><b><a href="'.$data['href'].'">'.$data['name'].'</a></b>'.$new.'<br />'
   /*   ."<span class='small2'>"
         .($data['user_id']
            ? $locale['PDP214']." <a href='profile.php?id="
               .$data['user_id']."'>"
               .$data['user_name']."</a> "
            : "")
         .showdate("shortdate", $data['mtime'])."</span>"*/
   ."</td>
   <td align='right' style='white-space:nowrap;'>"
      .$locale['pdp_downloads'].": ".$data['downloads']."<br />"
         .$locale['PDP021'].": ".$data['comments']."</td>
</tr>
<tr>
   <td colspan='3'>".$data['desc']."</td>
</tr>
</table>";
   }

   if($count > $per_page) {
      echo '
<p style="text-align:center;">'
   .makePageNav($rowstart, $per_page, $count, 3, $link).'
</p>';
   }
echo "<br>";
echo "<hr>";
// Statisitk Start
echo "<br>";
echo "<br>";
   $downloads = ff_db_count("(*)", DB_PDP_DOWNLOADS, "");
   $files = ff_db_count("(*)", DB_PDP_FILES, "");
   $klicks = dbquery("SELECT SUM(dl_count) FROM ".DB_PDP_DOWNLOADS);
   $hits = dbquery("SELECT SUM(count_visitors) FROM ".DB_PDP_DOWNLOADS);
   $pics = ff_db_count("(*)", DB_PDP_IMAGES, "");
   $query_id = dbquery("SELECT file_timestamp
      FROM ".DB_PDP_FILES."
      ORDER BY file_timestamp DESC LIMIT 1");
   if(dbrows($query_id)) {
      $mtime = array_shift(dbarray($query_id));
   } else {
      $mtime = 0;
   }
   
/*   $dl_size_Bytes = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Bytes'");
   $dl_size_Kb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Kb'");
    $dl_size_Mb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Mb'");
   $dl_size_Gb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Gb'");   */

   
  echo "
  <table style='text-align: left; width: 80%;' border='0'
   cellpadding='0' cellspacing='0'>
      <tr>
        <td><center><img src='".$theme_icons."statistic.png' alt='statistic.png' /></center></td>
        <td>
               ".$locale["pdp_downloads"].": <strong>".$downloads."</strong><br>
              ".$locale['PDP820'].": <strong>".ff_db_count('(*)', DB_PDP_CATS, '')."</strong><br>             
               ".$locale["PDP019"].": <strong>".$files."</strong><br>
               ".$locale["PDP015"].": <strong>".$pics."</strong><br>
               ".$locale["PDP223"].": <strong>".dbresult($hits,0)."</strong><br>";
                             
              /* echo "
              Bytes: <strong>".dbresult($dl_size_Bytes,0)."</strong>Bytes<br>
               Kb: <strong>".dbresult($dl_size_Kb,0)."</strong>Kb<br>
               Mb: <strong>".dbresult($dl_size_Mb,0)."</strong>Mb<br>
              Gb: <strong>".dbresult($dl_size_Gb,0)."</strong>Gb<br>";  */
         echo "
        </td>
       
        <td>";
     
             
              // Top Download
              $downs = array();
              pdpCore::get_downloads($get, 'dl_count DESC', 0, 2, true, $downs, false); // Anzahl top Downloads
             
              echo '
              <table width="100%" cellspacing="0" cellpadding="0" border="0">
              <tbody>';
              foreach($downs as $data) {
                 echo '
              <tr>
                 <td><img src="'.$theme_icons.'top_18.png" alt="top.png" /> <a href="'.INFUSIONS.'pro_download_panel/download.php?did='.$data['id'].'" title="'.$data['name'].'">'
                    .trimlink($data['name'], 32).'</a></td>
                 <td align="right">['.pdpCore::format_number($data['downloads']).']</td>
              </tr>';
              }
              echo '
              </tbody>
              </table>';
                   
        echo "
        </td>
        </tr>
        </table><br>";
     if($mtime) {
     echo "<center><small>".$locale['PDP052'].": ".showdate('shortdate', $mtime);
    echo "</small></center><hr>";
     };

// Statisitk Ende
}


function pdp_render_download($id, $data, $links, $files, $images, $old_data)
{
   global $locale, $pdp;

   $down_link = '';
   if(!$data['can_download']) {
      ;
   } elseif(!empty($old_data['down']) || !empty($old_data['link_extern'])){
      $down_link = array(
         'did'   => $id,
         'file'   => 0,
      );
   } elseif(count($files)) {
      $latest_download = array_shift($files);
      $down_link = array(
         'did'   => $id,
         'file'   => $latest_download['id'],
      );
      $old_ver = $latest_download['ver'];
      $old_size = $latest_download['size'];
      array_unshift($files, $latest_download);
   }

   if(is_array($down_link)) {
      if (score_account_stand() < $data['cost']) {
      $down_link = '
<image src="'.INFUSIONS.'pro_download_panel/themes/schallah/icons/download_no.png"  /><br />
'.$locale['PDP201'].'<br /><br />
<font color="#FFFFFF">'.$locale['PDP201'].' Kosten: '.$data['cost'].' Coins </font><br><font color="#FF0000">Du hast nur noch '.score_account_stand().'  Coins<br /></font><br><font color="#FF0000">Coins kannst du bei uns zb. durchs Uploaden Sammeln (500 Coins / Upload) <br>oder aber durch eine kleine Spende käuflich erwerben.</span><br />';
} else {
      $down_link = '
<form action="file.php" method="get">
<input type="hidden" name="did" value="'.$down_link['did'].'" />
<input type="hidden" name="file_id" value="'.$down_link['file'].'" />
<input type="image" src="'.INFUSIONS.'pro_download_panel/themes/schallah/icons/download.png" value="'.$locale['PDP201'].'" /><br />'.$locale['PDP201'].'<br /><br />
<font color="#FFFFFF">'.$locale['PDP201'].'kosten: '.$data['cost'].' Coins</font>   
<br /><font color="#00FF00">Guthaben: '.score_account_stand().' Coins</font><br /></form>';
}

   } else {
      $down_link = parseubb($pdp->settings['download_restricted']);
      if(FUSION_VERSION!='FF') {
         $down_link = nl2br($down_link);
      }
   }

   if(!empty($data['pic'])) {
      $pic = $data['pic'];
      $pic_id = 0;
   } elseif(count($images)) {
      $first_pic = $images[0];
      $pic = $first_pic['url'];
      $pic_id = $first_pic['id'];
   } else {
      $pic = "";
   }
   echo "<p><font size='+1'><b>".$data['name']."</b></font>\n";
   echo "<hr />

<table border='0' cellspacing='0' width='100%' cellpadding='0'>
<tr>
   <td valign='top' colspan='2'>".$data['desc']."</td>
   <td width='150' valign='top' rowspan='2' align='right'>
   <table class='tbl-border' cellspacing='1' cellpadding='0' width='145'>";
// kosten
#if(!empty($data['cost'])) {
#echo "<tr>
#<td align='center' class='tbl2'><br />
#<img alt='Downloads' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/cash.png'><br />
#Du brauchst: ".$data['cost']."<br />Coins</td>
#</tr>";
#}else{
#echo "<tr>
#<td align='center' class='tbl2'><br />
#<img alt='Downloads' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/cash.png'><br />
#Du brauchst: 0<br />Coins</td>
#
#</tr>";
#}

// screenshot
if(!empty($pic)) {
   echo "<tr>
    <td align='center' class='tbl2'>
    <img alt='Screenshot' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/screenshot.png'><br />
    <a href='image.php?did=".$id."&pic_id=$pic_id'>
    ".$locale['PDP028']."</a></td>
</tr>";
}

// homepage
if(!empty($data['homepage'])) {
   echo "<tr>
    <td class='tbl2' align='center'>
    <img alt='Homepage' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/www.png'><br />
    <a href='".$data['homepage']."'"." target='_blank'>   
    ".$locale['PDP020']."</a></td>";
}

//genre
if(!empty($data['genre'])) {
   echo "<tr>
       <td class='tbl2' align='center'>
  <img alt='genre' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/genre.jpg'><br />
  ".$data['genre']."</td>
</tr>\n";
}

//Ausgabe der Sprache des Downloads
if ($data['language']=="England"){
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/en.jpg" width="60" height="32" alt="England" /><br />';
echo "".$locale['pdp_english']."</td>";

} elseif ($data['language']=="Deutschland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/de.jpg" width="60" height="32" alt="Deutschland" /><br />';
echo "".$locale['pdp_deutsch']."</td>";

} elseif ($data['language']=="Albanien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/alb.jpg" width="60" height="32" alt="Albanien" /><br />';
echo "".$locale['pdp_albanien']."</td>";

} elseif ($data['language']=="Argentinien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/arg.jpg" width="60" height="32" alt="Argentinien" /><br />';
echo "".$locale['pdp_argentinien']."</td>";

} elseif ($data['language']=="Australien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/australien.jpg" width="60" height="32" alt="Australien" /><br />';
echo "".$locale['pdp_australien']."</td>";

} elseif ($data['language']=="Belgien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/bel.jpg" width="60" height="32" alt="Belgien" /><br />';
echo "".$locale['pdp_belgien']."</td>";

} elseif ($data['language']=="Brasilien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/bra.jpg" width="60" height="32" alt="Brasilien" /><br />';
echo "".$locale['pdp_brasilien']."</td>";

} elseif ($data['language']=="Bulgarien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/bul.jpg" width="60" height="32" alt="Bulgarien" /><br />';
echo "".$locale['pdp_bulgarien']."</td>";

} elseif ($data['language']=="China") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/china.jpg" width="60" height="32" alt="China" /><br />';
echo "".$locale['pdp_china']."</td>";

} elseif ($data['language']=="Chile") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/chile.jpg" width="60" height="32" alt="Chile" /><br />';
echo "".$locale['pdp_chile']."</td>";

} elseif ($data['language']=="Daenemark") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/dan.jpg" width="60" height="32" alt="Daenemark" /><br />';
echo "".$locale['pdp_daenemark']."</td>";

} elseif ($data['language']=="Estland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/estland.jpg" width="60" height="32" alt="Estland" /><br />';
echo "".$locale['pdp_estland']."</td>";

} elseif ($data['language']=="Finnland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/fin.jpg" width="60" height="32" alt="Finnland" /><br />';
echo "".$locale['pdp_finnland']."</td>";

} elseif ($data['language']=="Frankreich") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/fra.jpg" width="60" height="32" alt="Frankreich" /><br />';
echo "".$locale['pdp_france']."</td>";

} elseif ($data['language']=="Griechenland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/gri.jpg" width="60" height="32" alt="Griechenland" /><br />';
echo "".$locale['pdp_griechenland']."</td>";

} elseif ($data['language']=="Italien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/ita.jpg" width="60" height="32" alt="Italien" /><br />';
echo "".$locale['pdp_italien']."</td>";

} elseif ($data['language']=="Indien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/indi.jpg" width="60" height="32" alt="Indien" /><br />';
echo "".$locale['pdp_indien']."</td>";

} elseif ($data['language']=="Indonesien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/indo.jpg" width="60" height="32" alt="Indonesien" /><br />';
echo "".$locale['pdp_indonesien']."</td>";

} elseif ($data['language']=="Israel") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/isr.jpg" width="60" height="32" alt="Israel" /><br />';
echo "".$locale['pdp_israel']."</td>";

} elseif ($data['language']=="Iran") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/iran.jpg" width="60" height="32" alt="Iran" /><br />';
echo "".$locale['pdp_iran']."</td>";

} elseif ($data['language']=="Irland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/irl.jpg" width="60" height="32" alt="Irland" /><br />';
echo "".$locale['pdp_irland']."</td>";

} elseif ($data['language']=="Island") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/isl.jpg" width="60" height="32" alt="Island" /><br />';
echo "".$locale['pdp_island']."</td>";

} elseif ($data['language']=="Jamaic") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/jam.jpg" width="60" height="32" alt="Jamaica" /><br />';
echo "".$locale['pdp_jamaica']."</td>";

} elseif ($data['language']=="Japan") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/jap.jpg" width="60" height="32" alt="Japan" /><br />';
echo "".$locale['pdp_japan']."</td>";

} elseif ($data['language']=="Kanada") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/kan.jpg" width="60" height="32" alt="Kanada" /><br />';
echo "".$locale['pdp_kanada']."</td>";

} elseif ($data['language']=="Kolumbien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/kol.jpg" width="60" height="32" alt="Kolumbien" /><br />';
echo "".$locale['pdp_kolumbien']."</td>";

} elseif ($data['language']=="Korea") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/kor.jpg" width="60" height="32" alt="Korea" /><br />';
echo "".$locale['pdp_korea']."</td>";

} elseif ($data['language']=="Kroatien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/kroatien.jpg" width="60" height="32" alt="Kroatien" /><br />';
echo "".$locale['pdp_kroatien']."</td>";

} elseif ($data['language']=="Malaysia") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/malaysia.jpg" width="60" height="32" alt="Malaysia" /><br />';
echo "".$locale['pdp_malaysia']."</td>";


} elseif ($data['language']=="Mexiko") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/mex.jpg" width="60" height="32" alt="Mexiko" /><br />';
echo "".$locale['pdp_mexico']."</td>";

} elseif ($data['language']=="Niederlande") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/nie.jpg" width="60" height="32" alt="Niederlande" /><br />';
echo "".$locale['pdp_niederlande']."</td>";

} elseif ($data['language']=="Norwegen") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/nor.jpg" width="60" height="32" alt="Norwegen" /><br />';
echo "".$locale['pdp_norwegen']."</td>";

} elseif ($data['language']=="Neuseeland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/neu.jpg" width="60" height="32" alt="Neuseeland" /><br />';
echo "".$locale['pdp_neuseeland']."</td>";

} elseif ($data['language']=="Oesterreich") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/austria.jpg" width="60" height="32" alt="Oesterreich" /><br />';
echo "".$locale['pdp_austria']."</td>";

} elseif ($data['language']=="Peru") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/peru.jpg" width="60" height="32" alt="Peru" /><br />';
echo "".$locale['pdp_peru']."</td>";

} elseif ($data['language']=="Polen") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/pol.jpg" width="60" height="32" alt="Polen" /><br />';
echo "".$locale['pdp_polen']."</td>";

} elseif ($data['language']=="Portugal") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/por.jpg" width="60" height="32" alt="Portugal" /><br />';
echo "".$locale['pdp_portugal']."</td>";

} elseif ($data['language']=="Russland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/rus.jpg" width="60" height="32" alt="Russland" /><br />';
echo "".$locale['pdp_russland']."</td>";

} elseif ($data['language']=="Rumaenien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/rum.jpg" width="60" height="32" alt="Rumaenien" /><br />';
echo "".$locale['pdp_rumaenien']."</td>";

} elseif ($data['language']=="Schweden") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/schweden.jpg" width="60" height="32" alt="Schweden" /><br />';
echo "".$locale['pdp_schweden']."</td>";

} elseif ($data['language']=="Spanien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/spa.jpg" width="60" height="32" alt="Spanien" /><br />';
echo "".$locale['pdp_spanien']."</td>";

} elseif ($data['language']=="Schweiz") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/schweiz.jpg" width="60" height="32" alt="Schweiz" /><br />';
echo "".$locale['pdp_schweiz']."</td>";

} elseif ($data['language']=="Schottland") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/schottland.jpg" width="60" height="32" alt="Schottland" /><br />';
echo "".$locale['pdp_schottland']."</td>";

} elseif ($data['language']=="Schweden") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/schweden.jpg" width="60" height="32" alt="Schweden" /><br />';
echo "".$locale['pdp_schweden']."</td>";

} elseif ($data['language']=="Serbien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/serbien.jpg" width="60" height="32" alt="Serbien" /><br />';
echo "".$locale['pdp_serbien']."</td>";

} elseif ($data['language']=="Slowakei") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/slowakei.jpg" width="60" height="32" alt="Slowakei" /><br />';
echo "".$locale['pdp_slowakei']."</td>";

} elseif ($data['language']=="Slowenien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/slo.jpg" width="60" height="32" alt="Slowenien" /><br />';
echo "".$locale['pdp_slowenien']."</td>";

} elseif ($data['language']=="Taiwan") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/taiwan.jpg" width="60" height="32" alt="Taiwan" /><br />';
echo "".$locale['pdp_taiwan']."</td>";

} elseif ($data['language']=="Thailand") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/thailand.jpg" width="60" height="32" alt="Thailand" /><br />';
echo "".$locale['pdp_thailand']."</td>";

} elseif ($data['language']=="Tunesien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/tun.jpg" width="60" height="32" alt="Tunesien" /><br />';
echo "".$locale['pdp_tunesien']."</td>";

} elseif ($data['language']=="Tuerkei") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/tuerkei.jpg" width="60" height="32" alt="Tuerkei" /><br />';
echo "".$locale['pdp_tuerkei']."</td>";

} elseif ($data['language']=="Tschechien") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/tsc.jpg" width="60" height="32" alt="Tschechien" /><br />';
echo "".$locale['pdp_tschechien']."</td>";

} elseif ($data['language']=="Ungarn") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/ung.jpg" width="60" height="32" alt="Ungarn" /><br />';
echo "".$locale['pdp_ungarn']."</td>";

} elseif ($data['language']=="USA") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/usa.jpg" width="60" height="32" alt="USA" /><br />';
echo "".$locale['pdp_usa']."</td>";

} elseif ($data['language']=="Ukraine") {
echo '<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/ukraine.jpg" width="60" height="32" alt="Ukraine" /><br />';
echo "".$locale['pdp_ukraine']."</td>";

} else {
echo'<tr>
<td class="tbl2" align="center">'.$locale['PDP_Sprache'].'<br>
<img src="'.INFUSIONS.'pro_download_panel/images/empty_language.png" width="60" height="32" alt="N/A" /><br />';
echo "".$locale['pdp_nicht_angegeben']."</td>";
}

// download count

if (iADMIN){
echo "<tr>
   <td align='center' class='tbl2'>
  <img alt='Downloads' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/downloads.png'><br />
  ".$locale['pdp_downloads'].": "
      .pdpCore::format_number($data['count'])."</td>
</tr>";
}
// version
if(!empty($old_data['version'])) {
   echo "<tr><td class='tbl2' align='center'>".$locale['PDP018']
      .":<br />".$old_data['version']."</td>";
}
// FIXME TODO
if(!empty($old_data['size'])) {
   echo "<tr><td align='center' class='tbl2'>"
      .$locale['PDP029'].":<br />".$old_data['size']."</td></tr>";
}
if(!empty($data['license'])) {
   echo "<tr>
   <td align='center' class='tbl2'><br />
  <img alt='Lizenz' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/lizenz.png'><br />
  ".$data['license']."</td>
</tr>";
}

// who posted and when.
echo "<tr><td align='center' class='tbl2'>
  <img alt='History' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/history.png'><br />
  "/*.($data['user_id']
      ?  "<a href='profile.php?id=".$data['user_id']."'>"
         .$data['user_name']."</a><br />"
      : "") */
   .showdate("shortdate", $data['mtime'])."</td>
</tr>\n";

//---------------------------------
//format
if(!empty($data['format'])) {
   echo "<tr>
   <td class='tbl2' align='center'>
  <img alt='format' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/format.png'><br />
  Format: ".$data['format']."</td>
</tr>\n";
}

//jahr
if(!empty($data['jahr'])) {
   echo "<tr>
   <td class='tbl2' align='center'>
  <img alt='jahr' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/jahr.jpg'><br />
  Erscheinungsjahr: ".$data['jahr']."</td>
</tr>\n";
}

//bitrate
if(!empty($data['bitrate'])) {
   echo "<tr>
   <td class='tbl2' align='center'>
  <img alt='bitrate' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/bitrate.png'><br />
  Bitrate: ".$data['bitrate']." kbps</td>
</tr>\n";
}

//groesse
if(!empty($data['groesse'])) {
   echo "<tr>
   <td class='tbl2' align='center'>
  <img alt='groesse' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/groesse.jpg'><br />
  Größe: ".$data['groesse']." MB</td>
</tr>\n";
}

//Avatarausgabe / Uploaderausgabe
echo "<tr><td class='tbl1' align='center' colspan='1'>Uploader:<br>";
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='".$data['user_id']."' ORDER BY user_avatar LIMIT 1");
if (dbrows($result)) {
while($data2 = dbarray($result)) {
if (empty($data2['user_avatar'])){
echo '<img style="width: 50px; height: 50px;" src="'.IMAGES.'avatars/noavatar50.png">';
} else {
echo '<img style="width: 50px; height: 50px;" src="'.IMAGES.'avatars/'.$data2['user_avatar'].'">';
}
}} else { echo '<img style="width: 50px; height: 50px;" src="'.IMAGES.'avatars/noavatar50.png">'; }
echo"<br>".($data['user_id'] ?  "<a href='profile.php?id=".$data['user_id']."'>"
         .$data['user_name']."</a><br />"
      : "")."</td></tr>\n";

//Passwort
if(!empty($data['passwort'])) {
   echo "<tr>
   <td class='tbl2' align='center'>
  <img alt='passwort' src='".INFUSIONS."pro_download_panel/themes/schallah/icons/passwort.png'><br />
  ".$data['passwort']."</td>
</tr>\n";
}


if($data['allow_notify']) {
if($data['can_subscribe']) {
   echo "<tr>
   <td class='tbl2' align='center'>".($data['is_subscribing']
      ? "<a href='include/do_did.php?did=".$id."&subscibe=0'>".$locale['PDP060']."</a>"
      : "<a href='include/do_did.php?did=".$id."&subscibe=1'>".$locale['PDP059']."</a>")
      ."</td>
</tr>\n";
}
}

echo "</table></td>
</tr><tr><td align='center' valign='bottom'>".$down_link."</td>
</tr><tr><td align='center' class='tbl0'>
<a href='".BASEDIR."infusions/mw_buy_points_panel/mw_buy_points.php'/>
<img src='".INFUSIONS."pro_download_panel/themes/schallah/icons/img9.png' style='border:0px' height='56' width='96px' alt'Coins Kaufen' title='Coins kaufen'/>
<a href='".BASEDIR."infusions/mw_buy_points_panel/mw_buy_points.php'/></a></center></td><br />
</table>
<hr />\n";

// report broken downloads
   echo "<div align='left'>";
   if(iPDP_BROKEN) {
      echo " <a href='".BASEDIR."forum/viewforum.php?forum_id=70'>".$locale['PDP024']

         ."</a> <br />";
   }

//include INFUSIONS. 'beschwerde_system_panel/beschwerde_system_panel2.php';   
   // edit link
   if(count($links)) {
      echo "<b>".$locale['pdp_edit'].":</b> [ "
         .implode(" | ", $links)." ]";
   }
   echo "</div>\n";


   

// Statisitk Start
echo "<br>";

   $downloads = ff_db_count("(*)", DB_PDP_DOWNLOADS, "");
   $files = ff_db_count("(*)", DB_PDP_FILES, "");
   $klicks = dbquery("SELECT SUM(dl_count) FROM ".DB_PDP_DOWNLOADS);
   $hits = dbquery("SELECT SUM(count_visitors) FROM ".DB_PDP_DOWNLOADS);
   $pics = ff_db_count("(*)", DB_PDP_IMAGES, "");
   $query_id = dbquery("SELECT file_timestamp
      FROM ".DB_PDP_FILES."
      ORDER BY file_timestamp DESC LIMIT 1");
   if(dbrows($query_id)) {
      $mtime = array_shift(dbarray($query_id));
   } else {
      $mtime = 0;
   }
   
/*   $dl_size_Bytes = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Bytes'");
   $dl_size_Kb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Kb'");
    $dl_size_Mb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Mb'");
   $dl_size_Gb = dbquery("SELECT SUM(file_size) FROM ".DB_PDP_FILES." WHERE file_size LIKE '%Gb'");   */

   
  echo "
  <table style='text-align: left; width: 80%;' border='0'
   cellpadding='0' cellspacing='0'>
      <tr>
        <td><center><img src='".INFUSIONS."pro_download_panel/themes/schallah/icons/statistic.png' alt='statistic.png' /></center></td>
        <td>
               ".$locale["pdp_downloads"].": <strong>".$downloads."</strong><br>
                ".$locale['PDP820'].": <strong>".ff_db_count('(*)', DB_PDP_CATS, '')."</strong><br>             
               ".$locale["PDP019"].": <strong>".$files."</strong><br>
               ".$locale["PDP015"].": <strong>".$pics."</strong><br>
               ".$locale["PDP223"].": <strong>".dbresult($hits,0)."</strong><br>";
                             
              /* echo "
              Bytes: <strong>".dbresult($dl_size_Bytes,0)."</strong>Bytes<br>
               Kb: <strong>".dbresult($dl_size_Kb,0)."</strong>Kb<br>
               Mb: <strong>".dbresult($dl_size_Mb,0)."</strong>Mb<br>
              Gb: <strong>".dbresult($dl_size_Gb,0)."</strong>Gb<br>";  */
         echo "
        </td>
       
        <td>";
     
             
              // Top Download
              $downs = array();
              pdpCore::get_downloads($get, 'dl_count DESC', 0, 5, true, $downs, false); // Anzahl top Downloads
             
              echo '
              <table width="100%" cellspacing="0" cellpadding="0" border="0">
              <tbody>';
              foreach($downs as $data) {
                 echo '
              <tr>
                 <td><img src="'.INFUSIONS.'pro_download_panel/themes/schallah/icons/top_18.png" alt="top.png" /> <a href="'.INFUSIONS.'pro_download_panel/download.php?did='.$data['id'].'" title="'.$data['name'].'">'
                    .trimlink($data['name'], 32).'</a></td>
                 <td align="right">['.pdpCore::format_number($data['downloads']).']</td>
              </tr>';
              }
              echo '
              </tbody>
              </table>';
                   
        echo "
        </td>
        </tr>
        </table><br>";
     if($mtime) {
     echo "<center><small>".$locale['PDP052'].": ".showdate('shortdate', $mtime);
    echo "</small></center><hr>";
     };

// Statisitk Ende

}



function pdp_render_menu($user_links, $admin_links)
{
   global $locale, $stext, $theme_icons;

   if(isset($_GET['stext'])) {
      $stext = stripinput($_GET['stext']);
   } else {
      $stext = '';
   }

   $more_user_links = array();

   $user_links['home'] = '<a href="download.php"><img alt="'.$locale['PDP037'].'" src="'.$theme_icons.'home.png" border="0" /><br />'.$locale['PDP037'].'</a>';
   $user_links['cats'] = '<a href="download.php?catid=0"><img alt="'.$locale['PDP820'].'" src="'.$theme_icons.'cat.png" border="0" /><br />'.$locale['PDP820'].'</a>';
   unset($user_links['search']);
   if(isset($user_links['new'])) {
      $more_user_links[] = $user_links['new'];
      unset($user_links['new']);
   }
   if(isset($user_links['profile'])) {
//      $user_links['profile'] = '<a href="profile.php"><img alt="'.$locale['PDP160'].'" src="'.$theme_icons.'profile.png" border="0" /><br />'.$locale['PDP160'].'</a>';
      $more_user_links[] = $user_links['profile'];
      unset($user_links['profile']);
   }


   echo '     
<table style="text-align: left;" border="0" cellpadding="5" cellspacing="0" align="left">
<tr>   
       <td valign="bottom" align="center">'.implode('</td>'."\n\t".'<td valign="bottom" align="center">', array_values($user_links)).'</td>
</tr>
</table>';

   echo '
<div style="float:right; text-align:right;">
<div>'.implode(' | ', $admin_links).'</div>

<form action="search.php" method="get">
<p>
<input type="text" size="15" maxlength="15" name="stext" class="textbox" value="'.$stext.'" />
<input type="image" src="'.$theme_icons.'search.png" value="'.$locale['PDP040'].'" style="vertical-align:bottom;" />
</p>
</form>
</div>

<div style="clear:both;"></div>

<hr />
';
   if(count($more_user_links)) {
      echo '
<p>
   '.implode(' | ', $more_user_links).'
</p>';
   }
}


?>

Bearbeitet von matze am 05.06.2017 um 12:49
 
http://punkerwelle.com/
Rolly8-HL
Etwa Zeile 225 - 245 austauschen, der sieht SO bei Dir aus.

Download Code
  Optionen:

Code markieren
    if (score_account_stand() < $data['cost']) {
      $down_link = '
<image src="'.INFUSIONS.'pro_download_panel/themes/schallah/icons/download_no.png"  /><br />
'.$locale['PDP201'].'<br /><br />
<font color="#FFFFFF">'.$locale['PDP201'].' Kosten: '.$data['cost'].' Coins </font><br><font color="#FF0000">Du hast nur noch '.score_account_stand().'  Coins<br /></font><br><font color="#FF0000">Coins kannst du bei uns zb. durchs Uploaden Sammeln (500 Coins / Upload) <br>oder aber durch eine kleine Spende käuflich erwerben.</span><br />';
} else {
      $down_link = '
<form action="file.php" method="get">
<input type="hidden" name="did" value="'.$down_link['did'].'" />
<input type="hidden" name="file_id" value="'.$down_link['file'].'" />
<input type="image" src="'.INFUSIONS.'pro_download_panel/themes/schallah/icons/download.png" value="'.$locale['PDP201'].'" /><br />'.$locale['PDP201'].'<br /><br />
<font color="#FFFFFF">'.$locale['PDP201'].'kosten: '.$data['cost'].' Coins</font>   
<br /><font color="#00FF00">Guthaben: '.score_account_stand().' Coins</font><br /></form>';
}

   } else {
      $down_link = parseubb($pdp->settings['download_restricted']);
      if(FUSION_VERSION!='FF') {
         $down_link = nl2br($down_link);
      }
   }

Bearbeitet von matze am 05.06.2017 um 12:49
[b]Gruß Rolly8-HL[/b]
Was für Andere Wichtig ist muss für mich nicht genauso Wichtig sein!
Bin Dickkopf Unbelehrbar mache aus Protest nicht das was andere für Richtig halten!
Das gibt einem zu Denken oder?
 
https://rolly8-hl.de
punkerwelle
eigenbaut ist es .
aber ich werde trotzdem auf derfile.php seite geleitet wo ich die Scorekosten zustimmen muss. scores werden dann auch abgezogen.
muss da noch an anderer stelle was angepasst werden?
ich vermute in der file.php muss noch was rein. weil die coins erst da abgezogen werden?
Bearbeitet von punkerwelle am 07.12.2015 um 15:49
 
http://punkerwelle.com/
Rolly8-HL
Könnte nur die file.php sein

Download Code
  Optionen:

Code markieren
   } else {
if (checkgroup(1)){
//kein Abzug    Gruppe 1
   } else {
score_free(\"Download\", \"PDPDL\", \"\".$kosten.\"\", 9999999, \"N\", 0, 0);
}

[b]Gruß Rolly8-HL[/b]
Was für Andere Wichtig ist muss für mich nicht genauso Wichtig sein!
Bin Dickkopf Unbelehrbar mache aus Protest nicht das was andere für Richtig halten!
Das gibt einem zu Denken oder?
 
https://rolly8-hl.de
punkerwelle
wie baue ich es da genau ein? bekomme immer ne weiße seite? meine file.php ist im anhang


Download Code
  Optionen:

Code markieren
<?php
/***************************************************************************
 *   Professional Download System                                          *
 *                                                                         *
 *   Copyright (C) pirdani                                                 *
 *   pirdani@hotmail.de                                                    *
 *   http://pirdani.de/                                                    *
 *                                                                         *
 *   Copyright (C) 2005 EdEdster (Stefan Noss)                             *
 *   http://edsterathome.de/                                               *
 *                                                                         *
 *   Copyright (C) 2006-2009 Artur Wiebe                                   *
 *   wibix@gmx.de                                                          *
 *   http://wibix.de/                                                      *
 *                                                                         *
 *   Scoreabzugerweiterung by Harlekin                                     *
 *   harlekin67@gmx.de                                                     *
 *   http://www.harlekin-power.de                                          *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/
require_once('include/common.php');
if(!$download->id) {
   fallback('download.php');
}
if(!$download->can_download) {
   $download->fallback_download();
}

/*
if(function_exists("pdp_start_download")) {
   pdp_start_download($download->id);
}
*/




if(isset($_GET['file_id']) && isNum($_GET['file_id'])) {
   $file_id = $_GET['file_id'];
} else {
   $file_id = 0;
}


$result = dbarray(dbquery("SELECT * FROM ".DB_PDP_DOWNLOADS." WHERE download_id='".$download->id."'"));
$name = $result['dl_name'];
$kosten = $result['dl_cost'];
if ( score_account_stand() < $kosten )
  {
    $download->fallback_download();
  }

/*
 *
 */

if($file_id) {
   $res = dbquery("SELECT file_id, file_url
      FROM ".DB_PDP_FILES."
      WHERE file_id='$file_id' AND download_id='".$download->id."'
         AND file_status='0'");
   if(!dbrows($res)) {
      $download->fallback_download();
   }
   $file = dbarray($res);
} else {
   $res = dbquery("SELECT file_id, file_url
      FROM ".DB_PDP_FILES."
      WHERE download_id='".$download->id."' AND file_status='0'
      ORDER BY file_timestamp DESC
      LIMIT 1");
   if(!dbrows($res)) {
      $download->fallback_download();
   }
   $file = dbarray($res);
}

if($download->data['lizenz_okay']=='N' || isset($_GET['dlok'])) {
   $url = "";
   $filename = "";
   $parse_url = true;

   if(!empty($file['file_url'])) {
      $url = $file['file_url'];
   } elseif(!empty($download->data['down'])) {
      $url = $download->data['down'];
   } else {
      $url = $download->data['link_extern'];
      $parse_url = false;
   }

   if($parse_url) {
      if(pdp_is_external($url)) {
         $downlink = $url;
      } else {
         $downlink = $pdp->settings['upload_file'].$download->data['dir_files'].$url;
         $filename = pdp_cleanup_filename($url);
      }
   } else {
      $downlink = $url;
   }

   dbquery("UPDATE ".DB_PDP_DOWNLOADS."
                SET                         
                dl_count=dl_count+1         
                WHERE download_id='".$download->id."'");
        dbquery("UPDATE ".DB_PDP_FILES."               
                SET                                     
                download_count=download_count+1         
                WHERE file_id='".$file['file_id']."'   
                        AND download_id='".$download->id."'");

//Eintrag welcher User was geladen hat start
dbquery("INSERT INTO ".DB_PREFIX."hp_userdownloadlog VALUES ('', '".$userdata['user_name']."', '".$name."', '".$kosten."', '".time()."')");
//Eintrag welcher User was geladen hat stop
//Eintrag welcher User was geladen hat2 start
include_once INFUSIONS."download_core/function.php";
DC_LOG(iMEMBER ? $userdata['user_id'] : 0, $download->id);
//Eintrag welcher User was geladen hat2 stop
//PN den Administrator
//dbquery("INSERT INTO ".DB_MESSAGES." VALUES('', '1,', '1', 'PN Download', '  ".$userdata['user_name']."   hat folgendes Album heruntergeladen:<strong> ".$name."</strong>', '0', '0', '0', '".time()."', '0')");
//


                //Scores hinzufügen   
                  //score_positive("DOWNL");
                //Scores abziehen   
                  //score_negative("DOWNL");
//Scores abziehen
            score_free("Download", "PDPDL", "".$kosten."", 9999999, "N", 0, 0);     
               

        if(empty($filename)) {
                fallback($downlink);
        } else { 
           

                error_reporting(0);
                require_once(INCLUDES.'class.httpdownload.php');

//              @ini_set('zlib.output_compression', 'Off');
                while(@ob_end_clean());                   

                $object = new httpdownload;
                if(!$object->set_byfile($downlink)) {
                        fallback('error.php?type=missing_file');
                }                                               
                $object->use_resume = true;                     
                if(!$object->download()) {                     
                        die('FIXME:FUCK!');                     
                }                                               

                exit;
        }
 

// show license
} else {
   opentable($pdp->settings['title']);
   echo '
<div align="text-align:center;">
<p>
   <a href="download.php?did='.$download->id.'">'.$locale['PDP026'].'</a>
</p>
</div>';

   // get from database
   if($download->data['license_id']) {
      $res = dbquery("SELECT license_text, license_name"
         ." FROM ".DB_PDP_LICENSES.""
         ." WHERE license_id='".$download->data['license_id']."'");
      $data = dbarray($res);

      echo "<p><h2>".$data['license_name']."</h2>\n"
         ."<div style='max-height:320px; overflow:auto;'"
            ." class='textbox'>\n"
         .stripslash($data['license_text'])
         ."\n</div>\n";

   //
   } else {
      if($download->data['lizenz_url']) {
         echo "<p><b>".$locale['PDP402']."</b>";
         echo "<p><b>".$locale['PDP404']."</b>";
         echo "<p><a href='http://".$download->data['lizenz_url']."'>"
            .$locale['pdp_license']."</a>";

      } else {
         echo "<b>\n";
         if($download->data['lizenz_packet']=="Y") {
            echo "<p>".$locale['PDP402'];
            echo "<p>".$locale['PDP403'];
         } else {
            echo "<p>".$locale['PDP406'];
         }
         echo "</b>\n";
      }
   }

   // confirm dialog
   echo "
<div align='center'>
<form method='GET' action='".FUSION_SELF."'>
<input type='hidden' name='did' value='".$download->id."'>
<input type='hidden' name='file_id' value='$file_id'>

<p>
   <label><input type='checkbox' name='dlok'> ".$locale['PDP400']."</label>
</p>

<p>
   <input type='submit' class='button' value='".$locale['PDP401']."'"
      ." class='button' />
</p>

</form>
</div>\n";
   closetable();
require_once('include/die.php');
}

?>

Bearbeitet von matze am 05.06.2017 um 12:50
 
http://punkerwelle.com/
Rolly8-HL
file.php suche

Download Code
  Optionen:

Code markieren
            score_free(\"Download\", \"PDPDL\", \"\".$kosten.\"\", 9999999, \"N\", 0, 0);     
               

        if(empty($filename)) {
                fallback($downlink);
        } else {

ersetze mit

Download Code
  Optionen:

Code markieren
   if(empty($filename)) {
      fallback($downlink);
      
   } else {
if (checkgroup(1)){
//kein Abzug    Gruppe 1
   } else {
score_free(\"Download\", \"PDPDL\", \"\".$kosten.\"\", 9999999, \"N\", 0, 0);
}


versuche das mal so.
[b]Gruß Rolly8-HL[/b]
Was für Andere Wichtig ist muss für mich nicht genauso Wichtig sein!
Bin Dickkopf Unbelehrbar mache aus Protest nicht das was andere für Richtig halten!
Das gibt einem zu Denken oder?
 
https://rolly8-hl.de
punkerwelle
passt noch nicht. jetzt werden niemanden mehr scores abgezogen.
 
http://punkerwelle.com/
Rolly8-HL
Also bei mir geht das wer Prem ist zahlt nichts wer kein Prem ist zahlt
[b]Gruß Rolly8-HL[/b]
Was für Andere Wichtig ist muss für mich nicht genauso Wichtig sein!
Bin Dickkopf Unbelehrbar mache aus Protest nicht das was andere für Richtig halten!
Das gibt einem zu Denken oder?
 
https://rolly8-hl.de
punkerwelle
komisch bei mir nicht. es wird niemanden was abgezogen
können sie mal die ganze datei posten? hab meine Modifiziert. vllt passt da irgendwas nicht

meine sieht genau so aus

Download Code
  Optionen:

Code markieren
/***************************************************************************
 *   Professional Download System                                          *
 *                                                                         *
 *   Copyright (C) pirdani                                                 *
 *   pirdani@hotmail.de                                                    *
 *   http://pirdani.de/                                                    *
 *                                                                         *
 *   Copyright (C) 2005 EdEdster (Stefan Noss)                             *
 *   http://edsterathome.de/                                               *
 *                                                                         *
 *   Copyright (C) 2006-2009 Artur Wiebe                                   *
 *   wibix@gmx.de                                                          *
 *   http://wibix.de/                                                      *
 *                                                                         *
 *   Scoreabzugerweiterung by Harlekin                                     *
 *   harlekin67@gmx.de                                                     *
 *   http://www.harlekin-power.de                                          *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/
require_once('include/common.php');
if(!$download->id) {
   fallback('download.php');
}
if(!$download->can_download) {
   $download->fallback_download();
}

/*
if(function_exists(\"pdp_start_download\")) {
   pdp_start_download($download->id);
}
*/




if(isset($_GET['file_id']) && isNum($_GET['file_id'])) {
   $file_id = $_GET['file_id'];
} else {
   $file_id = 0;
}


$result = dbarray(dbquery(\"SELECT * FROM \".DB_PDP_DOWNLOADS.\" WHERE download_id='\".$download->id.\"'\"));
$name = $result['dl_name'];
$kosten = $result['dl_cost'];
if ( score_account_stand() < $kosten )
  {
    $download->fallback_download();
  }

/*
 *
 */

if($file_id) {
   $res = dbquery(\"SELECT file_id, file_url
      FROM \".DB_PDP_FILES.\"
      WHERE file_id='$file_id' AND download_id='\".$download->id.\"'
         AND file_status='0'\");
   if(!dbrows($res)) {
      $download->fallback_download();
   }
   $file = dbarray($res);
} else {
   $res = dbquery(\"SELECT file_id, file_url
      FROM \".DB_PDP_FILES.\"
      WHERE download_id='\".$download->id.\"' AND file_status='0'
      ORDER BY file_timestamp DESC
      LIMIT 1\");
   if(!dbrows($res)) {
      $download->fallback_download();
   }
   $file = dbarray($res);
}

if($download->data['lizenz_okay']=='N' || isset($_GET['dlok'])) {
   $url = \"\";
   $filename = \"\";
   $parse_url = true;

   if(!empty($file['file_url'])) {
      $url = $file['file_url'];
   } elseif(!empty($download->data['down'])) {
      $url = $download->data['down'];
   } else {
      $url = $download->data['link_extern'];
      $parse_url = false;
   }

   if($parse_url) {
      if(pdp_is_external($url)) {
         $downlink = $url;
      } else {
         $downlink = $pdp->settings['upload_file'].$download->data['dir_files'].$url;
         $filename = pdp_cleanup_filename($url);
      }
   } else {
      $downlink = $url;
   }

   dbquery(\"UPDATE \".DB_PDP_DOWNLOADS.\"
                SET                         
                dl_count=dl_count+1         
                WHERE download_id='\".$download->id.\"'\");
        dbquery(\"UPDATE \".DB_PDP_FILES.\"               
                SET                                     
                download_count=download_count+1         
                WHERE file_id='\".$file['file_id'].\"'   
                        AND download_id='\".$download->id.\"'\");

//Eintrag welcher User was geladen hat start
dbquery(\"INSERT INTO \".DB_PREFIX.\"hp_userdownloadlog VALUES ('', '\".$userdata['user_name'].\"', '\".$name.\"', '\".$kosten.\"', '\".time().\"')\");
//Eintrag welcher User was geladen hat stop
//Eintrag welcher User was geladen hat2 start
include_once INFUSIONS.\"download_core/function.php\";
DC_LOG(iMEMBER ? $userdata['user_id'] : 0, $download->id);
//Eintrag welcher User was geladen hat2 stop
//PN den Administrator
//dbquery(\"INSERT INTO \".DB_MESSAGES.\" VALUES('', '1,', '1', 'PN Download', '  \".$userdata['user_name'].\"   hat folgendes Album heruntergeladen: \".$name.\"', '0', '0', '0', '\".time().\"', '0')\");
//


                //Scores hinzufügen   
                  //score_positive(\"DOWNL\");
                //Scores abziehen   
                  //score_negative(\"DOWNL\");
//Scores abziehen
if(empty($filename)) {
                fallback($downlink);
     
   } else {
if (checkgroup(14)){
   } else {
            score_free(\"Download\", \"PDPDL\", \"\".$kosten.\"\", 9999999, \"N\", 0, 0);
}
           

                error_reporting(0);
                require_once(INCLUDES.'class.httpdownload.php');

//              @ini_set('zlib.output_compression', 'Off');
                while(@ob_end_clean());                   

                $object = new httpdownload;
                if(!$object->set_byfile($downlink)) {
                        fallback('error.php?type=missing_file');
                }                                               
                $object->use_resume = true;                     
                if(!$object->download()) {                     
                        die('FIXME:FUCK!');                     
                }                                               

                exit;
        }
 

// show license
} else {
   opentable($pdp->settings['title']);
   echo '
';

   // get from database
   if($download->data['license_id']) {
      $res = dbquery(\"SELECT license_text, license_name\"
         .\" FROM \".DB_PDP_LICENSES.\"\"
         .\" WHERE license_id='\".$download->data['license_id'].\"'\");
      $data = dbarray($res);

      echo \"

\".$data['license_name'].\"

\n\"
         .\"
            .\" class='textbox'>\n\"
         .stripslash($data['license_text'])
         .\"\n
\n\";

   //
   } else {
      if($download->data['lizenz_url']) {
         echo \"

\".$locale['PDP402'].\"\";
         echo \"

\".$locale['PDP404'].\"\";
         echo \"

data['lizenz_url'].\"'>\"
            .$locale['pdp_license'].\"
\";

      } else {
         echo \"\n\";
         if($download->data['lizenz_packet']==\"Y\") {
            echo \"

\".$locale['PDP402'];
            echo \"

\".$locale['PDP403'];
         } else {
            echo \"

\".$locale['PDP406'];
         }
         echo \"
\n\";
      }
   }

   // confirm dialog
   echo \"



id.\"'>



   




          .\" class='button' />




\n\";
   closetable();
require_once('include/die.php');
}

?>
 
http://punkerwelle.com/
Rolly8-HL
Versuche Dein Glück
Rolly8-HL hat folgende Datei angehängt:
Du hast nicht die Berechtigung die Anhänge dieses Themas zu sehen.
Klicke hier um dich zu Registrieren
oder klicke zum Einloggen hier!!

[b]Gruß Rolly8-HL[/b]
Was für Andere Wichtig ist muss für mich nicht genauso Wichtig sein!
Bin Dickkopf Unbelehrbar mache aus Protest nicht das was andere für Richtig halten!
Das gibt einem zu Denken oder?
 
https://rolly8-hl.de
matze
Im PDP-System gibt es auch eine ,,theme_funcs.php,, wenn ich mich jetzt nicht irre.Schau da mal Bitte qpunkerwelle ob auch dort der variable Scoreabzug verbaut ist. Wenn er dort auch verbaut ist , musst du auch die Variable, für das was du vor hast auch dort definieren. Darin liegt jetzt meine Vermutung, das es nicht klappt. Der Name der Datei sagt ja schon alles aus, das die verschiedenen Themen vom PDP-System auch ihren Funktionen gerecht werden.
fusion-mods.de/userbar/userbar-1.png
 
https://fusion-mods.de
punkerwelle
nein dort ist er nicht verbaut
 
http://punkerwelle.com/
matze
Und was machste wenn du das Thema im PDP-system wechselst?
fusion-mods.de/userbar/userbar-1.png
 
https://fusion-mods.de
punkerwelle
tue ich ja nicht hab nur das eine theme installiert. die anderen hab ich runtergeworfen.
 
http://punkerwelle.com/
matze
Muss ich mir mal wieder auf die Testseite heute installieren. Dann kann ich dir mehr sagen.Und werde mal deine Datei testen die du angehangen hast.
fusion-mods.de/userbar/userbar-1.png
 
https://fusion-mods.de
punkerwelle
sonst ohne die IF checkgroup abfrage geht ja der scoreabzug in der file.php

muss also an diesen code abschnitt liegen?
 
http://punkerwelle.com/
AnfangDu befindest dich auf Seite 12Vorblättern
Springe ins Forum: