php.de

Zurück   php.de > Webentwicklung > PHP Einsteiger > PHP Tipps 2005-2

 
 
LinkBack Themen-Optionen Thema bewerten
Alt 24.06.2005, 17:38  
Gast
 
Beiträge: n/a
Standard [Erledigt] Downloads nicht anzeigen lassen...

Hallo,

ich habe ein kleines Problem. Ich habe ein Download Script. Die einzeknen Downloads, haben sogenannte Seeder / Leecher Werte. Das heißt es wird angezeigt wieviel Seeder (Leite die, die Datei fertig haben und Uploaden) und Leecher (Die gerade am Laden sind und zu Seedern werden). So leider können manche Downloads diese Werte nicht anzeigen. Sie Seeder / Leecher Werte werden in einer MySQL Datenbank gespeichert. Ist es möglich, alle Downloads, die keine Seeder / Leecher Werte anzeigen automatisch zu löschen? Wenn ja wie?

Ich habe euch mal die PHP Dateiu angehangen, womit die Seeder / Leecher Werte gesucht und angezeigt werden.

PHP-Code:
<?php

if(getenv("HTTP_X_FORWARDED_FOR")){            // Ip des Users einlesen
  
$ips=explode(";",getenv("HTTP_X_FORWARDED_FOR"));
}else{
  
$ipsexplode(";",getenv("REMOTE_ADDR"));
}

$ip    $ips[0];
$jetzt time();

mysql_query("DELETE FROM cm_dl_ipsperre WHERE zeit < '$jetzt'");

if (isset(
$_GET['do']) && $_GET['do'] == "rat" && isset($_GET['show'])) {
  
$rated checkUserRat($_GET['show'], $ip);
  if (!
$rated) {
    
$rat $_POST['rating'];
    
$pid $_GET['show'];
    
$getbewerter mysql_query("SELECT bewerter FROM cm_dl_info WHERE id = '$pid'");
    
$dat mysql_fetch_row($getbewerter);
    
$nbewerter $dat[0] + 1;
    if (
mysql_query("UPDATE cm_dl_info SET bewertung = bewertung + '$rat', bewerter = '$nbewerter' WHERE id = '$pid'")) {
      
setcookie ("rated[$pid]""1"time() + 100 24 60 60);
      
$then $jetzt 24*60*60;
      
mysql_query("INSERT INTO cm_dl_ipsperre (ip, pid, zeit) VALUES ('$ip', '$pid', '$then')");
    }
  }
}

$getsett  mysql_query("SELECT * FROM cm_dl_settings WHERE setting = 'umbruch'");               //Settings einlesen
$numsett  mysql_num_rows($getsett);
$settings mysql_fetch_row($getsett);
$sumbru   $settings[2];
$group    $_GET['group'];
$gruppedb mysql_query("SELECT * FROM cm_dl_gruppen WHERE id = '$group' ");
$part     mysql_fetch_row($gruppedb);

if(!isset(
$_GET['page']) && !isset($_GET['show'])){                           //testen ob eine bestimmte Seite verlangt wird
  
$infodb mysql_query("SELECT * FROM cm_dl_info WHERE gruppeid = '$group' ORDER BY name");
  
$numinfos mysql_num_rows($infodb);
  
$main str_replace("{part}"strtolower($part[1]), $main);
  if(
$numinfos == 0){                              //Testen ob Daten vorhanden sind
    
$posts '<center>NOCH keine Daten vorhanden</center>';
  }else{
    
$posts "";
    
$max   $numinfos;
    if(
$numinfos $sumbru){
      
$posts .= join('',file("html/seiten.htm"));
      
$max $sumbru;
      
$maxs ceil($numinfos $sumbru);
      
$posts str_replace("{page}""1 von ".$maxs$posts);
      
$pages '';
      for(
$i 1$i <=$maxs$i++){
        if (
$i == 1){
          
$pages .= $i.' ';
        }else{
          
$pages .= '<a href = "?site=main.php&group='.$group.'&page='.$i.'">'.$i.'</a> ';
        }
      }
      
$posts str_replace("{pages}"$pages$posts);
    }
    for(
$i=0;$i<$max;$i++){                 //Infos einlesen
      
$info mysql_fetch_array($infodb);
      
$id $info[0];
      
$lastupdate $info[lastupdate];
      
$rated checkUserRat($id$ip);
      if (
$rated) {
        
$posts .= join(''file("html/postwor.htm"));
      } else {
        
$posts .= join(''file("html/post.htm"));
      }
      
$name      $info[2];
      
$lang      $info[3];
      
$pic       $info[4];
      
$text      $info[5];
      
$poster    $info[6];
      
$downloads $info[7];
      
$pswd $info['pswd'];

      if (
$info[10] == 0) { $info[10] = 1; }

      
$rating round($info[8]/$info[10],0);
      
$posts str_replace("{title}"stripslashes($name), $posts);
      
$posts str_replace("{lang}"'gfx/'.$lang.'.gif'$posts);
      
$posts str_replace("{pic}"$pic$posts);
      
$posts str_replace("{id}"$id$posts);
      
$posts str_replace("{pswd}"$pswd$posts);
      
$posts str_replace("{show}"""$posts);

      if( 
$info[11] == "")
        
$posts str_replace("{quality}"'[i]Unbekannt[/i]'$posts);
      else
        
$posts str_replace("{quality}"$info[11], $posts);

      if( 
$info[13] == "")
        
$posts str_replace("{genre}"'[i]Unbekannt[/i]'$posts);
      else
        
$posts str_replace("{genre}"$info[13], $posts);

      
$posts str_replace("{info}",  '[i]Unbekannt[/i]'$posts);
      
$posts str_replace("{poster}"$poster$posts);
      
$posts str_replace("{downloads}"$downloads$posts);
      
$stars '';
      
$a 0;

      while(
$a $rating){
        if(
$a <= $rating){
          
$a += 2;
          
$stars .= '[img]gfx/star.gif[/img]';
        }else{
          
$a += 1;
          
$stars .= '[img]gfx/hstar.gif[/img]';
        }
      }

      if (
$rating == 0) { $stars "-"; }

      
$posts str_replace("{stars}"$stars$posts);
      
$linksdb mysql_query("SELECT * FROM cm_dl_links WHERE infoid = '$id' ORDER BY name");
      
$anzlinks mysql_num_rows($linksdb);
      if(
$anzlinks == 0){                      //Testen ob Links vorhanden sind
        
$links '              <center>Keine Links vorhanden</center>';
      }else{
        
$links '';

        for(
$d=0;$d<$anzlinks;$d++){
          
$getlinks mysql_fetch_array($linksdb);    //Links einlesen und speicherm

// 05/05 - check for valid http link to torrentfile and get seeder/leecher
          
if(strpos($getlinks[link], "http://") !== FALSE) {
            if(
$getlinks['lastupdate'] != date("HdmY")) {
              if((
$getlinks['tracker'] == "") || ($getlinks['infohash'] == "") || ($getlinks['tracker'] == "http://")) {
                
$src encodeurl($getlinks[link]);
                include 
"t_dectorrent.php";
                echo 
"\n";
                @
mysql_query("UPDATE cm_dl_links SET tracker='$tracker' , infohash='$infohash' WHERE id = '".$getlinks[id]."' LIMIT 2;");
              }
              if(
$getlinks[infohash] != "") { $infohash $getlinks[infohash]; }
              if(
$getlinks[tracker]  != "") { $tracker  $getlinks[tracker]; }
              include 
"t_asktracker.php";
              echo 
"\n";

// 24/05
              
if(($seeder 0) || ($leecher 0)) {
                @
mysql_query("UPDATE cm_dl_links SET deadsince='' WHERE id = '".$getlinks[id]."' LIMIT 1;");
              }

              @
mysql_query("UPDATE cm_dl_links SET lastupdate='".date("HdmY")."' , seeder=$seeder , leecher=$leecher WHERE id = '".$getlinks[id]."' LIMIT 2;");

              
$getlinks[seeder]  = $seeder+0;
              
$getlinks[leecher] = $leecher+0;
            }
          } else {
            if(
$getlinks[deadsince] == "") {
              @
mysql_query("UPDATE cm_dl_links SET deadsince='".date("HdmY")."' WHERE id = '".$getlinks[id]."' LIMIT 1;");
            }
          }

          
$add "";

// 05/05 - add up all found seeder/leecher for global seeder/leecher info
          
$leecher_ges += $getlinks[leecher]+0;
          
$seeder_ges  += $getlinks[seeder]+0;

          if(
$getlinks[5] != ""){ $add stripslashes("[$getlinks[5]]"); }

// 05/05 - add seeder/leecher to link
          
if(($getlinks[seeder] > 0) || ($getlinks[leecher] > 0)) {
            
$add .= " <font color='orange'>[b]".$getlinks[seeder]."/".$getlinks[leecher]."[/b]</font>";
          }

          if(
$getlinks[4] == ""){
            
$links .= '<a onclick = "javascript:window.open(\'main.php?iid='.$id.'&dl='.$getlinks[0].'\',\'Fenster2\',\'width=300,height=200,scrollbars=0,left=0,top=0\');return false"  href = "main.php?iid='.$id.'&dl='.$getlinks[0].'" target = "_blanc">'.stripslashes($getlinks[1]).'</a> ('.$getlinks[2].' klicks)'.$add.'
'
."\n";
          }else{
            
$links .= '<a onclick = "javascript:window.open(\'main.php?iid='.$id.'&dl='.$getlinks[0].'\',\'Fenster2\',\'width=300,height=200,scrollbars=0,left=0,top=0\');return false"  href = "main.php?iid='.$id.'&dl='.$getlinks[0].'" target = "_blanc">'.stripslashes($getlinks[4]).'</a> ('.$getlinks[2].' klicks)'.$add.'
'
."\n";
          }
        }

// 05/05 - add global seeder/leecher info to DB
        
if($lastupdate != date("HdmY")) {
          echo 
"<!-- DEBUG: updated leecher/seeder info in main-db-entry (S:";
          echo 
$seeder_ges."/L:".$leecher_ges.") -->\n";

// 24/05
          
if(($leecher_ges 0) || ($seeder_ges 0)) {
            @
mysql_query("UPDATE cm_dl_info SET deadsince='' WHERE id = '".$id."' LIMIT 1;");
          } else if(
$info[deadsince] == "") {
            @
mysql_query("UPDATE cm_dl_info SET deadsince='".date("HdmY")."' WHERE id = '".$id."' LIMIT 1;");
          }

          @
mysql_query("UPDATE cm_dl_info SET lastupdate='".date("HdmY")."' , seeder=".($seeder_ges+0)." , leecher=".($leecher_ges+0)." WHERE id = '".$id."' LIMIT 1;");
        }

      }
      
$posts str_replace("{links}"$links$posts);
    }
  }
}elseif(isset(
$_GET['page']) && !isset($_GET['show'])){
  
$main str_replace("{part}"strtolower($part[1]), $main);
  
$infodb mysql_query("SELECT * FROM cm_dl_info WHERE gruppeid = '$group' ORDER BY name");
  
$numinfos mysql_num_rows($infodb);
  if(
$numinfos $sumbru $_GET['page'] - $sumbru){                              //Testen ob Daten vorhanden sind
    
$posts '<center>Keine Daten vorhanden</center>';
  }else{
    
$posts "";
    
$bis $sumbru $_GET['page'];
    
$von $bis $sumbru;
    
$posts .= join('',file("html/seiten.htm"));
    
$maxs ceil($numinfos $sumbru);
    
$posts str_replace("{page}"$_GET['page']." von ".$maxs$posts);
    
$pages '';

    for(
$i 1$i <=$maxs$i++){
      if (
$i == $_GET['page']){
        
$pages .= $i.' ';
      }else{
        
$pages .= '<a href = "?site=main.php&group='.$group.'&page='.$i.'">'.$i.'</a> ';
      }
    }

    
$posts str_replace("{pages}"$pages$posts);
    if(
$bis $numinfos){ $bis $numinfos; }

    for(
$i=0;$i<$bis;$i++){                 //Infos einlesen
      
$info mysql_fetch_array($infodb);
      if(
$i >= $von){
        
$id $info[0];
        
$lastupdate $info[lastupdate];
        
$rated checkUserRat($id$ip);
        if (
$rated) {
          
$posts .= join(''file("html/postwor.htm"));
        } else {
          
$posts .= join(''file("html/post.htm"));
        }
        
$name      $info[2];
        
$lang      $info[3];
        
$pic       $info[4];
        
$text      $info[5];
        
$poster    $info[6];
        
$downloads $info[7];
        
$pswd      $info['pswd'];


        if (
$info[10] == 0) { $info[10] = 1; }
        
$rating round($info[8]/$info[10],0);
        
$posts str_replace("{title}"stripslashes($name), $posts);
        
$posts str_replace("{lang}"'gfx/'.$lang.'.gif'$posts);
        
$posts str_replace("{pic}"$pic$posts);
        
$posts str_replace("{id}"$id$posts);
        
$posts str_replace("{show}"""$posts);
        
$posts str_replace("{pswd}"$pswd$posts);

        if( 
$info[11] == "")
          
$posts str_replace("{quality}"'[i]Unknown[/i]'$posts);
        else
          
$posts str_replace("{quality}"$info[11], $posts);

        if( 
$info[13] == "")
          
$posts str_replace("{genre}"'[i]Unknown[/i]'$posts);
        else
          
$posts str_replace("{genre}"$info[13], $posts);

        
$posts str_replace("{info}"stripslashes(nl2br($text)), $posts);
        
$posts str_replace("{poster}"$poster$posts);
        
$posts str_replace("{downloads}"$downloads$posts);
        
$stars '';
        
$a 0;

        while(
$a $rating){
          if(
$a <= $rating){
            
$a += 2;
            
$stars .= '[img]gfx/star.gif[/img]';
          }else{
            
$a += 1;
            
$stars .= '[img]gfx/hstar.gif[/img]';
          }
        }

        if (
$rating == 0) { $stars "-"; }

        
$posts str_replace("{stars}"$stars$posts);
        
$linksdb mysql_query("SELECT * FROM cm_dl_links WHERE infoid = '$id' ORDER BY name");
        
$anzlinks mysql_num_rows($linksdb);
        if(
$anzlinks == 0){                      //Testen ob Links vorhanden sind
          
$links '              <center>Keine Links vorhanden</center>';
        }else{
          
$links '';
          for(
$d=0;$d<$anzlinks;$d++){
            
$getlinks mysql_fetch_array($linksdb);    //Links einlesen und speicherm

// 05/05 - check for valid http link to torrentfile and get seeder/leecher
            
if(strpos($getlinks[link], "http://") !== FALSE) {
                if(
$getlinks['lastupdate'] != date("HdmY")) {
                if((
$getlinks['tracker'] == "") || ($getlinks['infohash'] == "") || ($getlinks['tracker'] == "http://")) {
                    
$src encodeurl($getlinks[link]);
                    include 
"t_dectorrent.php";
                    echo 
"\n";
                    @
mysql_query("UPDATE cm_dl_links SET tracker='$tracker' , infohash='$infohash' WHERE id = '".$getlinks[id]."' LIMIT 1;");
                  }
                  if(
$getlinks[infohash] != "") { $infohash $getlinks[infohash]; }
                  if(
$getlinks[tracker]  != "") { $tracker  $getlinks[tracker]; }
                  include 
"t_asktracker.php";
                  echo 
"\n";

// 24/05
                  
if(($seeder 0) || ($leecher 0)) {
                    @
mysql_query("UPDATE cm_dl_links SET deadsince='' WHERE id = '".$getlinks[id]."' LIMIT 1;");
                  }

                  @
mysql_query("UPDATE cm_dl_links SET lastupdate='".date("HdmY")."' , seeder=$seeder , leecher=$leecher WHERE id = '".$getlinks[id]."' LIMIT 1;");

                  
$getlinks[seeder]  = $seeder+0;
                  
$getlinks[leecher] = $leecher+0;
                }
              } else {
                if(
$getlinks[deadsince] == "") {
                  @
mysql_query("UPDATE cm_dl_links SET deadsince='".date("HdmY")."' WHERE id = '".$getlinks[id]."' LIMIT 1;");
                }
              }

              
$add "";

// 05/05 - add up all found seeder/leecher for global seeder/leecher info
              
$leecher_ges += $getlinks[leecher]+0;
              
$seeder_ges  += $getlinks[seeder]+0;

              if(
$getlinks[5] != ""){ $add stripslashes("[$getlinks[5]]"); }

// 05/05 - add seeder/leecher to link
              
if(($getlinks[seeder] > 0) || ($getlinks[leecher] > 0)) {
                
$add .= " (S:".$getlinks[seeder]."/L:".$getlinks[leecher].")";
              }

              if(
$getlinks[4] == ""){
                
$links .= '<a onclick = "javascript:window.open(\'main.php?iid='.$id.'&dl='.$getlinks[0].'\',\'Fenster2\',\'width=300,height=200,scrollbars=0,left=0,top=0\');return false"  href = "main.php?iid='.$id.'&dl='.$getlinks[0].'" target = "_blanc">'.stripslashes($getlinks[1]).'</a> ('.$getlinks[2].' klicks)'.$add.'
'
."\n";
              }else{
                
$links .= '<a onclick = "javascript:window.open(\'main.php?iid='.$id.'&dl='.$getlinks[0].'\',\'Fenster2\',\'width=300,height=200,scrollbars=0,left=0,top=0\');return false"  href = "main.php?iid='.$id.'&dl='.$getlinks[0].'" target = "_blanc">'.stripslashes($getlinks[4]).'</a> ('.$getlinks[2].' klicks)'.$add.'
'
."\n";
              }
            }

// 05/05 - add global seeder/leecher info to DB
            
if($lastupdate != date("HdmY") || ($info[seeder] <> $seeder_ges) || ($info[leecher] <> $leecher_ges)) {
              echo 
"";

// 24/05
              
if(($leecher_ges 0) || ($seeder_ges 0)) {
                @
mysql_query("UPDATE cm_dl_info SET deadsince='' WHERE id = '".$id."' LIMIT 1;");
              } else if(
$info[deadsince] == "") {
                @
mysql_query("UPDATE cm_dl_info SET deadsince='".date("HdmY")."' WHERE id = '".$id."' LIMIT 1;");
              }

              @
mysql_query("UPDATE cm_dl_info SET lastupdate='".date("HdmY")."' , seeder=".($seeder_ges+0)." , leecher=".($leecher_ges+0)." WHERE id = '".$id."' LIMIT 1;");
            }

          }
        
$posts str_replace("{links}"$links$posts);
      }
    }
  }
}else{
  
$showid $_GET['show'];
  
$id $showid;
  
$infodb mysql_query("SELECT * FROM cm_dl_info WHERE id = '$showid'");
  
$numinfos mysql_num_rows($infodb);
  if(
$numinfos == 0){                              //Testen ob Daten vorhanden sind
    
$posts 'Der Download existiert nicht';
  }else{
    
$info mysql_fetch_array($infodb);       //Infos einlesen
    
$lastupdate $info[lastupdate];
    
$main str_replace("{part}"strtolower(stripslashes($info[2])), $main);
    
$rated checkUserRat($id$ip);
    if (
$rated) {
      
$posts .= join(''file("html/postwor.htm"));
    } else {
      
$posts .= join(''file("html/post.htm"));
    }
    
$posts str_replace("{title}"stripslashes($info[2]), $posts);
    
$posts str_replace("{lang}"'gfx/'.$info[3].'.gif'$posts);
    
$posts str_replace("{pic}"$info[4], $posts);
    
$posts str_replace("{id}"$id$posts);
    
$posts str_replace("{show}""show=$id&"$posts);

    
$posts str_replace("{pswd}"$info['pswd'], $posts);


    if( 
$info[11] == "")
      
$posts str_replace("{quality}"'[i]Unknown[/i]'$posts);
    else
      
$posts str_replace("{quality}"$info[11], $posts);

    if( 
$info[13] == "")
      
$posts str_replace("{genre}"'[i]Unknown[/i]'$posts);
    else
      
$posts str_replace("{genre}"$info[13], $posts);

    
$posts str_replace("{info}"stripslashes(nl2br($info[5])), $posts);
    
$posts str_replace("{poster}"$info[6], $posts);
    
$posts str_replace("{downloads}"$info[7], $posts);
    
$stars '';

    if (
$info[10] == 0) { $info[10] = 1; }

    
$rating round($info[8]/$info[10],0);
    
$a 0;

    while(
$a $rating){
      if(
$a <= $rating){
        
$a += 2$stars .= '[img]gfx/star.gif[/img]';
      }else{
        
$a += 1$stars .= '[img]gfx/hstar.gif[/img]';
      }
    }

    if (
$rating == 0) { $stars "-"; }
    
$posts str_replace("{stars}"$stars$posts);
    
$linksdb mysql_query("SELECT * FROM cm_dl_links WHERE infoid = '$showid' ORDER BY name");
    
$anzlinks mysql_num_rows($linksdb);
    if(
$anzlinks == 0){                      //Testen ob Links vorhanden sind
      
$links '              Keine Links vorhanden';
    }else{
      
$links '';
      
$seeder_ges  0;
      
$leecher_ges 0;
      for(
$d=0;$d<$anzlinks;$d++){
        
$getlinks mysql_fetch_array($linksdb);    //Links einlesen und speicherm

// 05/05 - check for valid http link to torrentfile and get seeder/leecher
        
if(strpos($getlinks[link], "http://") !== FALSE) {
            if(
$getlinks['lastupdate'] != date("HdmY")) {
                if((
$getlinks['tracker'] == "") || ($getlinks['infohash'] == "") || ($getlinks['tracker'] == "http://")) {
                
$src encodeurl($getlinks[link]);
                include 
"t_dectorrent.php";
                echo 
"\n";
                @
mysql_query("UPDATE cm_dl_links SET tracker='$tracker' , infohash='$infohash' WHERE id = '".$getlinks[id]."' LIMIT 1;");
              }
              if(
$getlinks[infohash] != "") { $infohash $getlinks[infohash]; }
              if(
$getlinks[tracker]  != "") { $tracker  $getlinks[tracker]; }
              include 
"t_asktracker.php";
              echo 
"\n";

// 24/05
              
if(($seeder 0) || ($leecher 0)) {
                @
mysql_query("UPDATE cm_dl_links SET deadsince='' WHERE id = '".$getlinks[id]."' LIMIT 1;");
              }

              @
mysql_query("UPDATE cm_dl_links SET lastupdate='".date("HdmY")."' , seeder=$seeder , leecher=$leecher WHERE id = '".$getlinks[id]."' LIMIT 1;");
              
$getlinks[seeder]  = $seeder+0;
              
$getlinks[leecher] = $leecher+0;
            }
          } else {
            if(
$getlinks[deadsince] == "") {
              @
mysql_query("UPDATE cm_dl_links SET deadsince='".date("HdmY")."' WHERE id = '".$getlinks[id]."' LIMIT 1;");
            }
          }

        
$add "";

// 05/05 - add up all found seeder/leecher for global seeder/leecher info
        
$leecher_ges += $getlinks[leecher]+0;
        
$seeder_ges  += $getlinks[seeder]+0;

        if(
$getlinks[5] != ""){
          
$add stripslashes("[$getlinks[5]]");
        }

// 05/05 - add seeder/leecher to link
        
if(($getlinks[seeder] > 0) || ($getlinks[leecher] > 0)) {
          
$add .= " » <font color='orange'>[b]".$getlinks[seeder]."/".$getlinks[leecher]."[/b]</font>";
        }

        if(
$getlinks[4] == ""){
          
$links .= '<a href = "?site=main.php&show='.$id.'&iid='.$id.'&dl='.$getlinks[0].'">'.stripslashes($getlinks[1]).'</a> ('.$getlinks[2].' klicks)'.$add.'
'
."\n";
        }else{
          
$links .= '<a href = "?site=main.php&show='.$id.'&iid='.$id.'&dl='.$getlinks[0].'">'.stripslashes($getlinks[4]).'</a> ('.$getlinks[2].' klicks)'.$add.'
'
."\n";
        }
      }

// 05/05 - add global seeder/leecher info to DB
      
if($lastupdate != date("HdmY") || ($info[seeder] <> $seeder_ges) || ($info[leecher] <> $leecher_ges)) {
        echo 
"<!-- DEBUG: updated leecher/seeder info in main-db-entry (S:";
        echo 
$seeder_ges."/L:".$leecher_ges.") -->\n";

// 24/05
        
if(($leecher_ges 0) || ($seeder_ges 0)) {
          @
mysql_query("UPDATE cm_dl_info SET deadsince='' WHERE id = '".$id."' LIMIT 1;");
        } else if(
$info[deadsince] == "") {
          @
mysql_query("UPDATE cm_dl_info SET deadsince='".date("HdmY")."' WHERE id = '".$id."' LIMIT 1;");
        }

        @
mysql_query("UPDATE cm_dl_info SET lastupdate='".date("HdmY")."' , seeder=".($seeder_ges+0)." , leecher=".($leecher_ges+0)." WHERE id = '".$id."' LIMIT 1;");
      }

    }
    
$posts str_replace("{links}"$links$posts);
  }
}

$main str_replace("{input}"$posts$main);

//   ###  ## ##  ####    ###  ####  ##   ###   ####    ###
//  ##    ## ##  ## ##  ##     ##       ## ##  ## ##  ##
//  ###   ## ##  ## ##  ##     ##   ##  ## ##  ## ##    ##
//  ##     ####  ## ##   ###   ##   ##   ###   ## ##  ###
function checkUserRat($pid$ip) {
  
$rated false;
  if (isset(
$_COOKIE['rated'][$pid])) { $rated true; }
  
$testuser mysql_query("SELECT count(id) FROM cm_dl_ipsperre WHERE ip = '$ip' AND pid = '$pid'");
  
$data mysql_fetch_row($testuser);
  if (
$data[0] != 0) { $rated true; }
  return 
$rated;
}

function 
encodeurl($url) {
//  $parts = explode('/', $url);
//  for($i=1;$i<count($parts);$i++) { $parts[$i] = rawurlencode($parts[$i]); }
//  return implode('/', $parts);
  
return str_replace(" ""%20"$url);
}

?>
Bin leider noch in der PHP Anfangsphase und hoffe das ihr mir helfen könnt.

MfG, FortunaFan
 
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

 


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Daten aus MySQL korrekt anzeigen sams9 PHP Tipps 2008 21 19.06.2008 20:58
RTF mit PHP auslesen und anzeigen möglich ? RaBastel PHP Tipps 2008 8 10.03.2008 10:03
Mehrere div's mit gleichen ID anzeigen / ausblenden phpbeginner HTML, Usability und Barrierefreiheit 9 06.09.2007 02:48
Baumstruktur anzeigen PHP-Fortgeschrittene 13 31.03.2006 21:37
Anzeigen wenn keine Einträge in Datenbank! c-bass PHP Tipps 2006 6 22.03.2006 13:49
Daten aus Datenbank auslesen und in PHP-Seite anzeigen PHP Tipps 2005-2 1 28.08.2005 20:16
Schleifendurchlauf anzeigen Lia PHP Tipps 2005 9 03.06.2005 10:43
Datenbankabfrage: Ergebnisse anzeigen PHP Tipps 2005 5 07.04.2005 10:31
Emails anzeigen mit PHP Tobias Beitragsarchiv 43 04.04.2005 06:57
Session-anzahl anzeigen lassen Jojo1 PHP Tipps 2005 21 30.03.2005 14:57
Formular nach UPDATE anzeigen PHP Tipps 2004-2 5 22.12.2004 02:06
Downloads Gruppen zuweißen? imported_dex PHP Tipps 2004-2 9 12.11.2004 22:29
[Erledigt] Cookie - Seite anzeigen / nicht anzeigen PHP Tipps 2004-2 2 11.11.2004 15:59
Alle Datenbanken und Tabellen anzeigen anzeigen imported_Lumio PHP Tipps 2004 4 13.09.2004 14:26
[Erledigt] &quot;echte&quot; Downloads zählen: wie geht sowas? PHP Tipps 2004 22 28.06.2004 09:50

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
downloads nicht anzeigen

Alle Zeitangaben in WEZ +1. Es ist jetzt 20:34 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.