Sollte es probleme mit eurem passwortern geben dann nutzt bitte die Passwort vergessen funktion MFG Saugjunkie
Dear visitor, welcome to BT-Technik. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
<? /* // +--------------------------------------------------------------------------+ // | Project: NVTracker - NetVision BitTorrent Tracker | // +--------------------------------------------------------------------------+ // | This file is part of NVTracker. NVTracker is based on BTSource, | // | originally by RedBeard of TorrentBits, extensively modified by | // | Gartenzwerg. | // | | // | NVTracker 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. | // | | // | NVTracker is distributed in the hope that it will be useful, | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with NVTracker; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | // +--------------------------------------------------------------------------+ // | Obige Zeilen dürfen nicht entfernt werden! Do not remove above lines! | // +--------------------------------------------------------------------------+ */ ob_start("ob_gzhandler"); require_once("include/bittorrent.php"); require_once("include/benc.php"); hit_start(); function hex2bin($hexdata) { for ($i=0;$i<strlen($hexdata);$i+=2) { $bindata.=chr(hexdec(substr($hexdata,$i,2))); } return $bindata; } function err($msg) { benc_resp(array("failure reason" => array(type => "string", value => $msg))); hit_end(); exit(); } function benc_resp($d) { benc_resp_raw(benc(array(type => "dictionary", value => $d))); } function benc_resp_raw($x) { header("Content-Type: text/plain"); header("Pragma: no-cache"); print($x); } function check_ip_limit() { global $userid; // Check IP limit $res = mysql_query("SELECT DISTINCT(ip) AS ip FROM peers WHERE userid=$userid"); $count = 0; $found = FALSE; while ($row = mysql_fetch_assoc($res)) { $count++; if ($row["ip"] == $ip) { $found = TRUE; break; } } if (!$found && $count >= $GLOBALS["MAX_PASSKEY_IPS"]) err("Zu viele unterschiedliche IPs fuer diesen Benutzer (max ".$GLOBALS["MAX_PASSKEY_IPS"].")"); } if (in_array($_SERVER["HTTP_USER_AGENT"], $GLOBALS["BAN_USERAGENTS"])) err("Du benutzt einen gebannten Client. Bitte lies die FAQ!"); $req = "info_hash:peer_id:!ip:port:uploaded:downloaded:left:!event"; if ($GLOBALS["CLIENT_AUTH"] == CLIENT_AUTH_PASSKEY) { if ($GLOBALS["PASSKEY_SOURCE"] == PASSKEY_USE_PARAM) { $req .= ":passkey"; // Using announce.php?passkey={KEY} will lead to an incorrect parameter list, // so the first parameter appended by the client gets appended to the passkey parameter. // This match will extract the parameter to $_GET if (preg_match("/^([a-f0-9]{16})\\?(.*?)\\=(.*)$/is", $_GET["passkey"], $m)) { $_GET["passkey"] = $m[1]; $_GET[$m[2]] = $m[3]; } } if ($GLOBALS["PASSKEY_SOURCE"] == PASSKEY_USE_SUBDOMAIN) { preg_match("/^([a-f0-9]{16})\\./i", $_SERVER["HTTP_HOST"], $m); if (strlen($m[1])==16) $passkey = $m[1]; else err("Fehlender Parameter fuer Announce: passkey"); } } foreach (explode(":", $req) as $x) { if ($x[0] == "!") { $x = substr($x, 1); $opt = 1; } else $opt = 0; if (!isset($_GET[$x])) { if (!$opt) err("Fehlender Parameter fuer Announce: $x"); continue; } $GLOBALS[$x] = unesc($_GET[$x]); } foreach (array("info_hash","peer_id") as $x) { if (strlen($GLOBALS[$x]) != 20) err("Ungueltiger Wert fuer $x (" . strlen($GLOBALS[$x]) . " - " . urlencode($GLOBALS[$x]) . ")"); } foreach ($GLOBALS["BAN_PEERIDS"] as $banned_id) { if (substr($GLOBALS["peer_id"],0,strlen($banned_id)) == $banned_id) err("Du benutzt einen gebannten Client. Bitte lies das FAQ!"); } $ip = getip(); $origip = $ip; $port = 0 + $port; $origport = $port; $downloaded = 0 + $downloaded; $uploaded = 0 + $uploaded; $left = 0 + $left; $rsize = 50; foreach(array("num want", "numwant", "num_want") as $k) { if (isset($_GET[$k])) { $rsize = 0 + $_GET[$k]; break; } } $agent = $_SERVER["HTTP_USER_AGENT"]; // Deny access made with a browser... if (ereg("^Mozilla\\/", $agent) || ereg("^Opera\\/", $agent) || ereg("^Links ", $agent) || ereg("^Lynx\\/", $agent)) err("Dieser Torrent ist dem Tracker nicht bekannt"); if (!$port || $port > 0xffff) err("Ungueltiges TCP-Port"); if (!isset($event)) $event = ""; $seeder = ($left == 0) ? "yes" : "no"; dbconn(false); hit_count(); $res = mysql_query("SELECT id, name, category, banned, free, activated, seeders + leechers AS numpeers, UNIX_TIMESTAMP(added) AS ts FROM torrents WHERE " . hash_where("info_hash", $info_hash)); $torrent = mysql_fetch_assoc($res); if (!$torrent) err("Dieser Torrent ist dem Tracker nicht bekannt"); if ($torrent["activated"] != "yes") err("Dieser Torrent ist dem Tracker nicht bekannt"); $torrentid = $torrent["id"]; $fields = "seeder, peer_id, agent, ip, port, uploaded, downloaded, userid, UNIX_TIMESTAMP(last_action) AS ts"; $numpeers = $torrent["numpeers"]; $limit = ""; if ($numpeers > $rsize) $limit = "ORDER BY RAND() LIMIT $rsize"; $res = mysql_query("SELECT $fields FROM peers WHERE torrent = $torrentid AND connectable = 'yes' $limit"); $resp = "d" . benc_str("interval") . "i" . $GLOBALS["ANNOUNCE_INTERVAL"] . "e" . benc_str("peers") . "l"; unset($self); while ($row = mysql_fetch_assoc($res)) { $row["peer_id"] = hash_pad($row["peer_id"]); if ($row["peer_id"] === $peer_id) { $userid = $row["userid"]; $self = $row; continue; } $resp .= "d" . benc_str("ip") . benc_str($row["ip"]) . benc_str("peer id") . benc_str($row["peer_id"]) . benc_str("port") . "i" . $row["port"] . "e" . "e"; } $resp .= "ee"; $selfwhere = "torrent = $torrentid AND " . hash_where("peer_id", $peer_id); if (!isset($self)) { $res = mysql_query("SELECT $fields FROM peers WHERE $selfwhere"); $row = mysql_fetch_assoc($res); if ($row) { $userid = $row["userid"]; $self = $row; } } //// Up/down stats //////////////////////////////////////////////////////////// if (!isset($self)) { if ($GLOBALS["CLIENT_AUTH"] == CLIENT_AUTH_PASSKEY) { $rz = mysql_query("SELECT id, uploaded, downloaded, class, tlimitseeds, tlimitleeches, tlimitall FROM users WHERE passkey=".sqlesc(hex2bin($passkey))." AND enabled = 'yes' ORDER BY last_access DESC LIMIT 1") or err("Tracker error 2"); if ($MEMBERSONLY && mysql_num_rows($rz) == 0) err("Ungueltiger PassKey. Lies das FAQ!"); } else { $rz = mysql_query("SELECT id, uploaded, downloaded, class, tlimitseeds, tlimitleeches, tlimitall FROM users WHERE ip=".sqlesc($ip)." AND enabled = 'yes' ORDER BY last_access DESC LIMIT 1") or err("Tracker error 2"); if ($MEMBERSONLY && mysql_num_rows($rz) == 0) err("Unbekannte IP. Lies das FAQ!"); } $az = mysql_fetch_assoc($rz); $userid = $az["id"]; // Wartezeit prüfen $wait = get_wait_time($az["id"], $torrentid, FALSE, $left); if (($left > 0 || !$GLOBALS["ONLY_LEECHERS_WAIT"]) && $wait) err("Wartezeit (noch " . ($wait) . "h) - Bitte lies das FAQ!"); // Torrent-Limit prüfen // $az["tlimitall"] < 0 entspricht unlimitiert! if ($az["tlimitall"] >= 0) { $arr = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) AS cnt FROM peers WHERE userid=$userid")); $numtorrents = $arr["cnt"]; $arr = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) AS cnt FROM peers WHERE userid=$userid AND seeder='yes'")); $seeds = $arr["cnt"]; $leeches = $numtorrents - $seeds; $limit = get_torrent_limits($az); if ( ($limit["total"] > 0) &&(($numtorrents >= $limit["total"]) || ($left == 0 && $seeds >= $limit["seeds"]) || ($left > 0 && $leeches >= $limit["leeches"]))) err("Maximales Torrent-Limit erreicht ($limit[seeds] Seeds, $limit[leeches] Leeches, $limit[total] Gesamt)"); } check_ip_limit(); // Create traffic log entry if not existent $res = mysql_query("SELECT * FROM `traffic` WHERE `userid`=$userid AND `torrentid`=$torrentid"); if (@mysql_num_rows($res) == 0) mysql_query("INSERT INTO `traffic` (`userid`,`torrentid`) VALUES ($userid, $torrentid)"); } else { // We won't check the IP again, since this would disrupt a user's download if he // uses another IP to continue browsing on the tracker. if ($GLOBALS["CLIENT_AUTH"] == CLIENT_AUTH_PASSKEY) { $res = mysql_query("SELECT passkey,id FROM users WHERE id=$userid AND enabled = 'yes'"); $pkrow = mysql_fetch_assoc($res); $passkey = hex2bin($passkey); if ($passkey != $pkrow["passkey"]) err("Ungueltiger PassKey. Lies das FAQ!"); check_ip_limit(); } // Get the last uploaded amount from user account for reference and store it in $last_up $rst = mysql_query("SELECT class, uploaded FROM users WHERE id = $userid") or err("Tracker error 5"); $art = mysql_fetch_array($rst); $last_up = $art["uploaded"]; $class = $art["class"]; $upthis = max(0, $uploaded - $self["uploaded"]); $downthis = max(0, $downloaded - $self["downloaded"]); $arr = mysql_fetch_assoc(mysql_query("SELECT UNIX_TIMESTAMP(last_action) AS lastaction FROM peers WHERE $selfwhere")); $interval = time() - $arr["lastaction"]; if ($interval == 0) $interval = 1; // If speed is higher than 4 MB/sec, the user is apparently cheating. // Frustrate him by adding his desired upload to his download ^^ if (($upthis / $interval) > $GLOBALS["RATIOFAKER_THRESH"]) { // Teamnachricht wegen Cheatens by ANThRaX $mod_msg = "[b]Der Benutzer [url=".$DEFAULTBASEURL."/userdetails.php?id=".$CURUSER["id"]."]".$CURUSER["username"]."[/url] hat eventuell ein Ratio Faker Tool verwendet: ".mksize($upthis)." Upload, Fake Rate: ".mksize($upthis / $interval)."/sek"; $userid = $CURUSER['id']; $subject = "Eventuell Ratio Faker Tool Verwendet"; $message = sqlesc($mod_msg); $subject = sqlesc($subject); mysql_query("INSERT INTO staffmessages (sender, added, msg, subject) VALUES($userid, NOW(), $message, $subject)") or sqlerr(__FILE__, __LINE__); } if ($upthis > 0 || $downthis > 0) { // Update traffic for current torrent if ($self["seeder"] == "yes") mysql_query("UPDATE `traffic` SET `downloaded`=`downloaded`+$downthis, `uploaded`=`uploaded`+$upthis, `uploadtime`=`uploadtime`+$interval WHERE `userid`=$userid AND `torrentid`=$torrentid"); else mysql_query("UPDATE `traffic` SET `downloaded`=`downloaded`+$downthis, `uploaded`=`uploaded`+$upthis, `downloadtime`=`downloadtime`+$interval,`uploadtime`=`uploadtime`+$interval WHERE `userid`=$userid AND `torrentid`=$torrentid"); mysql_query("UPDATE users SET uploaded = uploaded + $upthis". ($torrent['free']=='no'?", downloaded = downloaded + $downthis ":' '). "WHERE id=$userid") or err("Tracker error 3"); } } // Initial sanity check xMB/s for 1 second if( $upthis > 1572864 ){ // Work out time difference $rrr = @mysql_query( "SELECT UNIX_TIMESTAMP(last_action) AS ts FROM peers WHERE $selfwhere" ); $aaa = @mysql_fetch_assoc( $rrr ); $starttime = $self['ts']; $endtime = $aaa['ts']; $diff = $endtime - $starttime; // Normalise to prevent divide by zero. $rate = $upthis / ( $diff + 1 ); // Currently 2MB/s. Increase to 5MB/s once finished testing. if( $rate >= 1572864 ){ $sss = @mysql_query( "SELECT class FROM users WHERE id=$userid" ); $uuu = @mysql_fetch_assoc( $sss ); $class = $uuu['class']; if ($class < UC_MODERATOR) { $rate = mksize($rate); $client = $agent; $userip = getip(); auto_enter_cheater($userid, $rate, $upthis, $diff, $torrentid, $client, $userip, $last_up); } } } // Bad user? If yes, we'll provide him with an invalid peer list :) $acctdata = mysql_fetch_assoc(mysql_query("SELECT baduser FROM accounts WHERE userid=$userid")); if ($acctdata["baduser"]==1) { $resarr = bdec($resp); for ($I=0; $I<count($resarr["value"]["peers"]["value"]); $I++) { $tmpip = $resarr["value"]["peers"]["value"][$I]["value"]["ip"]["value"]; $resarr["value"]["peers"]["value"][$I]["value"]["port"]["value"] += mt_rand(100,250); $rndnum = mt_rand(1,254); $resarr["value"]["peers"]["value"][$I]["value"]["ip"]["value"] = preg_replace("/\\.(\\d{1,3})$/", ".$rndnum", $tmpip); } $resp = benc($resarr); $rndnum = mt_rand(1,254); $ip = preg_replace("/\\.(\\d{1,3})$/", ".$rndnum", $ip); $port += mt_rand(100,250); } /////////////////////////////////////////////////////////////////////////////// #============================= #Client ban hack v2, by beeman #============================= $uagent = $_SERVER['HTTP_USER_AGENT']; $bua = mysql_query("SELECT agent FROM banned_agent") or err('Tracker error (1)'); while ($nea = mysql_fetch_array($bua)) { $n = $nea['agent']; $nr = preg_replace("/\//", "\/", $n); $neadle = "/\b$nr\b/i"; if (preg_match($neadle, $uagent)) { err("Gebannter Client. Bitte geh auf $BASEURL für eine Liste der erlaubten clienten"); } } //End client ban hack /////////////////////////////////////////////////////////////////////////////// function portblacklisted($port) { // direct connect if ($port >= 411 && $port <= 413) return true; // bittorrent if ($port >= 6881 && $port <= 6889) return true; // kazaa if ($port == 1214) return true; // gnutella if ($port >= 6346 && $port <= 6347) return true; // emule if ($port == 4662) return true; // winmx if ($port == 6699) return true; return false; } $updateset = array(); if ($event == "stopped") { if (isset($self)) { mysql_query("DELETE FROM peers WHERE $selfwhere"); if (mysql_affected_rows()) { if ($self["seeder"] == "yes") $updateset[] = "seeders = seeders - 1"; else $updateset[] = "leechers = leechers - 1"; } $up = ($self["uploaded"]); $down = ($self["downloaded"]); mysql_query("UPDATE snatched SET seeder = 'no', last_action = NOW(), ruploaded = ruploaded + $up, rdownloaded = rdownloaded + $down where userid = '$userid' and torrentid = '$torrentid'"); } mysql_query("INSERT INTO startstoplog (userid,event,`datetime`,torrent,ip,peerid,useragent) VALUES ($userid,'stop',NOW(),$torrentid,".sqlesc($_SERVER["REMOTE_ADDR"]).",".sqlesc($peer_id).",".sqlesc($agent).")"); $announcedelay = @mysql_fetch_assoc(@mysql_query("SELECT * FROM `announcedelay` WHERE `peer_id`=".sqlesc($peer_id))); if (is_array($announcedelay)) { if ($announcedelay["first"] && $announcedelay["second"] && $announcedelay["quantity"]) { $duration1 = $announcedelay["second"]-$announcedelay["first"]; $duration2 = time() - $announcedelay["second"]; if ($duration1 < 310 && $duration2 < 10 && $uploaded - $announcedelay["quantity"] == 0) { write_modcomment($userid, 0, "announce.php: Evtl. Ratiomaker 0.5+ benutzt: ".mksize($uploaded)." Upload / ".mksize($downloaded)." Download, Fake Rate: ".mksize($uploaded / $duration1)."/sek, Delays: {$duration1}s / {$duration2}s"); } } } $resp = benc_resp(array("failure reason" => array(type => "string", value => "Kein Fehler - Torrent gestoppt."))); } else { if ($event == "completed") { $updateset[] = "times_completed = times_completed + 1"; mysql_query("INSERT INTO completed (user_id, torrent_id, torrent_name, torrent_category, complete_time) VALUES ($userid, $torrentid, ".sqlesc($torrent["name"]).", ".$torrent["category"].", NOW())"); mysql_query("INSERT INTO snatched (torrentid,userid,ruploaded,rdownloaded,seeder,completedat,finished) VALUES ($torrentid,$userid,$uploaded,$downloaded,'yes',NOW(),'yes')"); } if (isset($self)) { $announcedelay = @mysql_fetch_assoc(@mysql_query("SELECT * FROM `announcedelay` WHERE `peer_id`=".sqlesc($peer_id))); if (is_array($announcedelay)) { if ($announcedelay["second"] == 0) mysql_query("UPDATE `announcedelay` SET `second`=UNIX_TIMESTAMP(),`quantity`=$uploaded WHERE `peer_id`=".sqlesc($peer_id)); } mysql_query("UPDATE peers SET uploaded = $uploaded, downloaded = $downloaded, to_go = $left, last_action = NOW(), seeder = '$seeder'" . ($seeder == "yes" && $self["seeder"] != $seeder ? ", finishedat = " . time() : ""). ", ip = " . sqlesc($ip) . " WHERE $selfwhere"); if (mysql_affected_rows() && $self["seeder"] != $seeder) { if ($seeder == "yes") { $updateset[] = "seeders = seeders + 1"; $updateset[] = "leechers = leechers - 1"; } else { $updateset[] = "seeders = seeders - 1"; $updateset[] = "leechers = leechers + 1"; } } } else { if (portblacklisted($origport)) err("Der TCP-Port $origport ist nicht erlaubt."); else { $sockres = @fsockopen($origip, $origport, $errno, $errstr, 5); if (!$sockres) $connectable = "no"; else { $connectable = "yes"; @fclose($sockres); } } $ret = mysql_query("INSERT INTO peers (connectable, torrent, peer_id, ip, port, uploaded, downloaded, to_go, started, last_action, seeder, userid, agent, uploadoffset, downloadoffset) VALUES ('$connectable', $torrentid, " . sqlesc($peer_id) . ", " . sqlesc($ip) . ", $port, $uploaded, $downloaded, $left, NOW(), NOW(), '$seeder', $userid, " . sqlesc($agent) . ", $uploaded, $downloaded)"); if ($ret) { if ($seeder == "yes") $updateset[] = "seeders = seeders + 1"; else $updateset[] = "leechers = leechers + 1"; } mysql_query("INSERT INTO startstoplog (userid,event,`datetime`,torrent,ip,peerid,useragent) VALUES ($userid,'start',NOW(),$torrentid,".sqlesc($_SERVER["REMOTE_ADDR"]).",".sqlesc($peer_id).",".sqlesc($agent).")"); mysql_query("INSERT INTO announcedelay (peer_id, first) VALUES (".sqlesc($peer_id).", UNIX_TIMESTAMP())"); mysql_query("DELETE FROM announcedelay WHERE `first`<UNIX_TIMESTAMP()-900"); } } if ($seeder == "yes") { if ($torrent["banned"] != "yes") $updateset[] = "visible = 'yes'"; $updateset[] = "last_action = NOW()"; } if (count($updateset)) mysql_query("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $torrentid"); benc_resp_raw($resp); hit_end(); ?> |
![]() |
PHP Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
<?
/*
// +--------------------------------------------------------------------------+
// | Project: NVTracker - NetVision BitTorrent Tracker |
// +--------------------------------------------------------------------------+
// | This file is part of NVTracker. NVTracker is based on BTSource, |
// | originally by RedBeard of TorrentBits, extensively modified by |
// | Gartenzwerg. |
// | |
// | NVTracker 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. |
// | |
// | NVTracker is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with NVTracker; if not, write to the Free Software Foundation, |
// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +--------------------------------------------------------------------------+
// | Obige Zeilen dürfen nicht entfernt werden! Do not remove above lines! |
// +--------------------------------------------------------------------------+
*/
ob_start("ob_gzhandler");
require_once("include/bittorrent.php");
require_once("include/benc.php");
hit_start();
function hex2bin($hexdata) {
for ($i=0;$i<strlen($hexdata);$i+=2) {
$bindata.=chr(hexdec(substr($hexdata,$i,2)));
}
return $bindata;
}
function err($msg)
{
benc_resp(array("failure reason" => array(type => "string", value => $msg)));
hit_end();
exit();
}
function benc_resp($d)
{
benc_resp_raw(benc(array(type => "dictionary", value => $d)));
}
function benc_resp_raw($x)
{
header("Content-Type: text/plain");
header("Pragma: no-cache");
print($x);
}
function check_ip_limit() {
global $userid;
// Check IP limit
$res = mysql_query("SELECT DISTINCT(ip) AS ip FROM peers WHERE userid=$userid");
$count = 0;
$found = FALSE;
while ($row = mysql_fetch_assoc($res)) {
$count++;
if ($row["ip"] == $ip) {
$found = TRUE;
break;
}
}
if (!$found && $count >= $GLOBALS["MAX_PASSKEY_IPS"])
err("Zu viele unterschiedliche IPs fuer diesen Benutzer (max ".$GLOBALS["MAX_PASSKEY_IPS"].")");
}
if (in_array($_SERVER["HTTP_USER_AGENT"], $GLOBALS["BAN_USERAGENTS"]))
err("Du benutzt einen gebannten Client. Bitte lies die FAQ!");
$req = "info_hash:peer_id:!ip:port:uploaded:downloaded:left:!event";
if ($GLOBALS["CLIENT_AUTH"] == CLIENT_AUTH_PASSKEY) {
if ($GLOBALS["PASSKEY_SOURCE"] == PASSKEY_USE_PARAM) {
$req .= ":passkey";
// Using announce.php?passkey={KEY} will lead to an incorrect parameter list,
// so the first parameter appended by the client gets appended to the passkey parameter.
// This match will extract the parameter to $_GET
if (preg_match("/^([a-f0-9]{16})\\?(.*?)\\=(.*)$/is", $_GET["passkey"], $m)) {
$_GET["passkey"] = $m[1];
$_GET[$m[2]] = $m[3];
}
}
if ($GLOBALS["PASSKEY_SOURCE"] == PASSKEY_USE_SUBDOMAIN) {
preg_match("/^([a-f0-9]{16})\\./i", $_SERVER["HTTP_HOST"], $m);
if (strlen($m[1])==16)
$passkey = $m[1];
else
err("Fehlender Parameter fuer Announce: passkey");
}
}
foreach (explode(":", $req) as $x)
{
if ($x[0] == "!")
{
$x = substr($x, 1);
$opt = 1;
}
else
$opt = 0;
if (!isset($_GET[$x]))
{
if (!$opt)
err("Fehlender Parameter fuer Announce: $x");
continue;
}
$GLOBALS[$x] = unesc($_GET[$x]);
}
foreach (array("info_hash","peer_id") as $x)
{
if (strlen($GLOBALS[$x]) != 20)
err("Ungueltiger Wert fuer $x (" . strlen($GLOBALS[$x]) . " - " . urlencode($GLOBALS[$x]) . ")");
}
foreach ($GLOBALS["BAN_PEERIDS"] as $banned_id)
{
if (substr($GLOBALS["peer_id"],0,strlen($banned_id)) == $banned_id)
err("Du benutzt einen gebannten Client. Bitte lies das FAQ!");
}
$ip = getip();
$origip = $ip;
$port = 0 + $port;
$origport = $port;
$downloaded = 0 + $downloaded;
$uploaded = 0 + $uploaded;
$left = 0 + $left;
$rsize = 50;
foreach(array("num want", "numwant", "num_want") as $k)
{
if (isset($_GET[$k]))
{
$rsize = 0 + $_GET[$k];
break;
}
}
$agent = $_SERVER["HTTP_USER_AGENT"];
// Deny access made with a browser...
if (ereg("^Mozilla\\/", $agent) || ereg("^Opera\\/", $agent) || ereg("^Links ", $agent) || ereg("^Lynx\\/", $agent))
err("Dieser Torrent ist dem Tracker nicht bekannt");
if (!$port || $port > 0xffff)
err("Ungueltiges TCP-Port");
if (!isset($event))
$event = "";
$seeder = ($left == 0) ? "yes" : "no";
dbconn(false);
hit_count();
$res = mysql_query("SELECT id, name, category, banned, free, activated, seeders + leechers AS numpeers, UNIX_TIMESTAMP(added) AS ts FROM torrents WHERE " . hash_where("info_hash", $info_hash));
$torrent = mysql_fetch_assoc($res);
if (!$torrent)
err("Dieser Torrent ist dem Tracker nicht bekannt");
if ($torrent["activated"] != "yes")
err("Dieser Torrent ist dem Tracker nicht bekannt");
$torrentid = $torrent["id"];
$fields = "seeder, peer_id, agent, ip, port, uploaded, downloaded, userid, UNIX_TIMESTAMP(last_action) AS ts";
$numpeers = $torrent["numpeers"];
$limit = "";
if ($numpeers > $rsize)
$limit = "ORDER BY RAND() LIMIT $rsize";
$res = mysql_query("SELECT $fields FROM peers WHERE torrent = $torrentid AND connectable = 'yes' $limit");
$resp = "d" . benc_str("interval") . "i" . $GLOBALS["ANNOUNCE_INTERVAL"] . "e" . benc_str("peers") . "l";
unset($self);
while ($row = mysql_fetch_assoc($res))
{
$row["peer_id"] = hash_pad($row["peer_id"]);
if ($row["peer_id"] === $peer_id)
{
$userid = $row["userid"];
$self = $row;
continue;
}
$resp .= "d" .
benc_str("ip") . benc_str($row["ip"]) .
benc_str("peer id") . benc_str($row["peer_id"]) .
benc_str("port") . "i" . $row["port"] . "e" .
"e";
}
$resp .= "ee";
$selfwhere = "torrent = $torrentid AND " . hash_where("peer_id", $peer_id);
if (!isset($self))
{
$res = mysql_query("SELECT $fields FROM peers WHERE $selfwhere");
$row = mysql_fetch_assoc($res);
if ($row)
{
$userid = $row["userid"];
$self = $row;
}
}
//// Up/down stats ////////////////////////////////////////////////////////////
if (!isset($self))
{
if ($GLOBALS["CLIENT_AUTH"] == CLIENT_AUTH_PASSKEY) {
$rz = mysql_query("SELECT id, uploaded, downloaded, class, tlimitseeds, tlimitleeches, tlimitall FROM users WHERE passkey=".sqlesc(hex2bin($passkey))." AND enabled = 'yes' ORDER BY last_access DESC LIMIT 1") or err("Tracker error 2");
if ($MEMBERSONLY && mysql_num_rows($rz) == 0)
err("Ungueltiger PassKey. Lies das FAQ!");
} else {
$rz = mysql_query("SELECT id, uploaded, downloaded, class, tlimitseeds, tlimitleeches, tlimitall FROM users WHERE ip=".sqlesc($ip)." AND enabled = 'yes' ORDER BY last_access DESC LIMIT 1") or err("Tracker error 2");
if ($MEMBERSONLY && mysql_num_rows($rz) == 0)
err("Unbekannte IP. Lies das FAQ!");
}
$az = mysql_fetch_assoc($rz);
$userid = $az["id"];
// Wartezeit prüfen
$wait = get_wait_time($az["id"], $torrentid, FALSE, $left);
if (($left > 0 || !$GLOBALS["ONLY_LEECHERS_WAIT"]) && $wait)
err("Wartezeit (noch " . ($wait) . "h) - Bitte lies das FAQ!");
// Torrent-Limit prüfen
// $az["tlimitall"] < 0 entspricht unlimitiert!
if ($az["tlimitall"] >= 0) {
$arr = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) AS cnt FROM peers WHERE userid=$userid"));
$numtorrents = $arr["cnt"];
$arr = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) AS cnt FROM peers WHERE userid=$userid AND seeder='yes'"));
$seeds = $arr["cnt"];
$leeches = $numtorrents - $seeds;
$limit = get_torrent_limits($az);
if ( ($limit["total"] > 0)
&&(($numtorrents >= $limit["total"])
|| ($left == 0 && $seeds >= $limit["seeds"])
|| ($left > 0 && $leeches >= $limit["leeches"])))
err("Maximales Torrent-Limit erreicht ($limit[seeds] Seeds, $limit[leeches] Leeches, $limit[total] Gesamt)");
}
check_ip_limit();
// Create traffic log entry if not existent
$res = mysql_query("SELECT * FROM `traffic` WHERE `userid`=$userid AND `torrentid`=$torrentid");
if (@mysql_num_rows($res) == 0)
mysql_query("INSERT INTO `traffic` (`userid`,`torrentid`) VALUES ($userid, $torrentid)");
}
else
{
// We won't check the IP again, since this would disrupt a user's download if he
// uses another IP to continue browsing on the tracker.
if ($GLOBALS["CLIENT_AUTH"] == CLIENT_AUTH_PASSKEY) {
$res = mysql_query("SELECT passkey,id FROM users WHERE id=$userid AND enabled = 'yes'");
$pkrow = mysql_fetch_assoc($res);
$passkey = hex2bin($passkey);
if ($passkey != $pkrow["passkey"])
err("Ungueltiger PassKey. Lies das FAQ!");
check_ip_limit();
}
// Get the last uploaded amount from user account for reference and store it in $last_up
$rst = mysql_query("SELECT class, uploaded FROM users WHERE id = $userid") or err("Tracker error 5");
$art = mysql_fetch_array($rst);
$last_up = $art["uploaded"];
$class = $art["class"];
$upthis = max(0, $uploaded - $self["uploaded"]);
$downthis = max(0, $downloaded - $self["downloaded"]);
$arr = mysql_fetch_assoc(mysql_query("SELECT UNIX_TIMESTAMP(last_action) AS lastaction FROM peers WHERE $selfwhere"));
$interval = time() - $arr["lastaction"];
if ($interval == 0) $interval = 1;
// If speed is higher than 4 MB/sec, the user is apparently cheating.
// Frustrate him by adding his desired upload to his download ^^
if (($upthis / $interval) > $GLOBALS["RATIOFAKER_THRESH"]) {
// Teamnachricht wegen Cheatens by ANThRaX
$mod_msg = "[b]Der Benutzer [url=".$DEFAULTBASEURL."/userdetails.php?id=".$CURUSER["id"]."]".$CURUSER["username"]."[/url] hat eventuell ein Ratio Faker Tool verwendet: ".mksize($upthis)." Upload, Fake Rate: ".mksize($upthis / $interval)."/sek";
$userid = $CURUSER['id'];
$subject = "Eventuell Ratio Faker Tool Verwendet";
$message = sqlesc($mod_msg);
$subject = sqlesc($subject);
mysql_query("INSERT INTO staffmessages (sender, added, msg, subject) VALUES($userid, NOW(), $message, $subject)") or sqlerr(__FILE__, __LINE__);
}
if ($upthis > 0 || $downthis > 0) {
// Update traffic for current torrent
if ($self["seeder"] == "yes")
mysql_query("UPDATE `traffic` SET `downloaded`=`downloaded`+$downthis, `uploaded`=`uploaded`+$upthis, `uploadtime`=`uploadtime`+$interval WHERE `userid`=$userid AND `torrentid`=$torrentid");
else
mysql_query("UPDATE `traffic` SET `downloaded`=`downloaded`+$downthis, `uploaded`=`uploaded`+$upthis, `downloadtime`=`downloadtime`+$interval,`uploadtime`=`uploadtime`+$interval WHERE `userid`=$userid AND `torrentid`=$torrentid");
mysql_query("UPDATE users SET uploaded = uploaded + $upthis". ($torrent['free']=='no'?", downloaded = downloaded + $downthis ":' '). "WHERE id=$userid") or err("Tracker error 3");
}
}
// Initial sanity check xMB/s for 1 second
if( $upthis > 1572864 ){
// Work out time difference
$rrr = @mysql_query( "SELECT UNIX_TIMESTAMP(last_action) AS ts FROM peers WHERE $selfwhere" );
$aaa = @mysql_fetch_assoc( $rrr );
$starttime = $self['ts'];
$endtime = $aaa['ts'];
$diff = $endtime - $starttime;
// Normalise to prevent divide by zero.
$rate = $upthis / ( $diff + 1 );
// Currently 2MB/s. Increase to 5MB/s once finished testing.
if( $rate >= 1572864 ){
$sss = @mysql_query( "SELECT class FROM users WHERE id=$userid" );
$uuu = @mysql_fetch_assoc( $sss );
$class = $uuu['class'];
if ($class < UC_MODERATOR)
{
$rate = mksize($rate);
$client = $agent;
$userip = getip();
auto_enter_cheater($userid, $rate, $upthis, $diff, $torrentid, $client, $userip, $last_up);
}
}
}
// Bad user? If yes, we'll provide him with an invalid peer list :)
$acctdata = mysql_fetch_assoc(mysql_query("SELECT baduser FROM accounts WHERE userid=$userid"));
if ($acctdata["baduser"]==1) {
$resarr = bdec($resp);
for ($I=0; $I<count($resarr["value"]["peers"]["value"]); $I++) {
$tmpip = $resarr["value"]["peers"]["value"][$I]["value"]["ip"]["value"];
$resarr["value"]["peers"]["value"][$I]["value"]["port"]["value"] += mt_rand(100,250);
$rndnum = mt_rand(1,254);
$resarr["value"]["peers"]["value"][$I]["value"]["ip"]["value"] =
preg_replace("/\\.(\\d{1,3})$/", ".$rndnum", $tmpip);
}
$resp = benc($resarr);
$rndnum = mt_rand(1,254);
$ip = preg_replace("/\\.(\\d{1,3})$/", ".$rndnum", $ip);
$port += mt_rand(100,250);
}
///////////////////////////////////////////////////////////////////////////////
#=============================
#Client ban hack v2, by beeman
#=============================
$uagent = $_SERVER['HTTP_USER_AGENT'];
$bua = mysql_query("SELECT agent FROM banned_agent") or err('Tracker error (1)');
while ($nea = mysql_fetch_array($bua))
{
$n = $nea['agent'];
$nr = preg_replace("/\//", "\/", $n);
$neadle = "/\b$nr\b/i";
if (preg_match($neadle, $uagent))
{
err("Gebannter Client. Bitte geh auf $BASEURL für eine Liste der erlaubten clienten");
}
}
//End client ban hack
///////////////////////////////////////////////////////////////////////////////
function portblacklisted($port)
{
// direct connect
if ($port >= 411 && $port <= 413) return true;
// bittorrent
if ($port >= 6881 && $port <= 6889) return true;
// kazaa
if ($port == 1214) return true;
// gnutella
if ($port >= 6346 && $port <= 6347) return true;
// emule
if ($port == 4662) return true;
// winmx
if ($port == 6699) return true;
return false;
}
$updateset = array();
if ($event == "stopped")
{
if (isset($self))
{
mysql_query("DELETE FROM peers WHERE $selfwhere");
if (mysql_affected_rows())
{
if ($self["seeder"] == "yes")
$updateset[] = "seeders = seeders - 1";
else
$updateset[] = "leechers = leechers - 1";
}
$up = ($self["uploaded"]);
$down = ($self["downloaded"]);
mysql_query("UPDATE snatched SET seeder = 'no', last_action = NOW(), ruploaded = ruploaded + $up, rdownloaded = rdownloaded + $down where userid = '$userid' and torrentid = '$torrentid'");
}
mysql_query("INSERT INTO startstoplog (userid,event,`datetime`,torrent,ip,peerid,useragent) VALUES ($userid,'stop',NOW(),$torrentid,".sqlesc($_SERVER["REMOTE_ADDR"]).",".sqlesc($peer_id).",".sqlesc($agent).")");
$announcedelay = @mysql_fetch_assoc(@mysql_query("SELECT * FROM `announcedelay` WHERE `peer_id`=".sqlesc($peer_id)));
if (is_array($announcedelay)) {
if ($announcedelay["first"] && $announcedelay["second"] && $announcedelay["quantity"]) {
$duration1 = $announcedelay["second"]-$announcedelay["first"];
$duration2 = time() - $announcedelay["second"];
if ($duration1 < 310 && $duration2 < 10 && $uploaded - $announcedelay["quantity"] == 0) {
write_modcomment($userid, 0, "announce.php: Evtl. Ratiomaker 0.5+ benutzt: ".mksize($uploaded)." Upload / ".mksize($downloaded)." Download, Fake Rate: ".mksize($uploaded / $duration1)."/sek, Delays: {$duration1}s / {$duration2}s");
}
}
}
$resp = benc_resp(array("failure reason" => array(type => "string", value => "Kein Fehler - Torrent gestoppt.")));
}
else
{
if ($event == "completed") {
$updateset[] = "times_completed = times_completed + 1";
mysql_query("INSERT INTO completed (user_id, torrent_id, torrent_name, torrent_category, complete_time) VALUES ($userid, $torrentid, ".sqlesc($torrent["name"]).", ".$torrent["category"].", NOW())");
mysql_query("INSERT INTO snatched (torrentid,userid,ruploaded,rdownloaded,seeder,completedat,finished) VALUES ($torrentid,$userid,$uploaded,$downloaded,'yes',NOW(),'yes')");
}
if (isset($self))
{
$announcedelay = @mysql_fetch_assoc(@mysql_query("SELECT * FROM `announcedelay` WHERE `peer_id`=".sqlesc($peer_id)));
if (is_array($announcedelay)) {
if ($announcedelay["second"] == 0)
mysql_query("UPDATE `announcedelay` SET `second`=UNIX_TIMESTAMP(),`quantity`=$uploaded WHERE `peer_id`=".sqlesc($peer_id));
}
mysql_query("UPDATE peers SET uploaded = $uploaded, downloaded = $downloaded, to_go = $left, last_action = NOW(), seeder = '$seeder'"
. ($seeder == "yes" && $self["seeder"] != $seeder ? ", finishedat = " . time() : "") . " WHERE $selfwhere");
if (mysql_affected_rows() && $self["seeder"] != $seeder)
{
if ($seeder == "yes")
{
$updateset[] = "seeders = seeders + 1";
$updateset[] = "leechers = leechers - 1";
}
else
{
$updateset[] = "seeders = seeders - 1";
$updateset[] = "leechers = leechers + 1";
}
}
}
else
{
if (portblacklisted($origport))
err("Der TCP-Port $origport ist nicht erlaubt.");
else
{
$sockres = @fsockopen($origip, $origport, $errno, $errstr, 5);
if (!$sockres)
$connectable = "no";
else
{
$connectable = "yes";
@fclose($sockres);
}
}
$ret = mysql_query("INSERT INTO peers (connectable, torrent, peer_id, ip, port, uploaded, downloaded, to_go, started, last_action, seeder, userid, agent, uploadoffset, downloadoffset) VALUES ('$connectable', $torrentid, " . sqlesc($peer_id) . ", " . sqlesc($ip) . ", $port, $uploaded, $downloaded, $left, NOW(), NOW(), '$seeder', $userid, " . sqlesc($agent) . ", $uploaded, $downloaded)");
if ($ret)
{
if ($seeder == "yes")
$updateset[] = "seeders = seeders + 1";
else
$updateset[] = "leechers = leechers + 1";
}
mysql_query("INSERT INTO startstoplog (userid,event,`datetime`,torrent,ip,peerid,useragent) VALUES ($userid,'start',NOW(),$torrentid,".sqlesc($_SERVER["REMOTE_ADDR"]).",".sqlesc($peer_id).",".sqlesc($agent).")");
mysql_query("INSERT INTO announcedelay (peer_id, first) VALUES (".sqlesc($peer_id).", UNIX_TIMESTAMP())");
mysql_query("DELETE FROM announcedelay WHERE `first`<UNIX_TIMESTAMP()-900");
}
}
if ($seeder == "yes")
{
if ($torrent["banned"] != "yes")
$updateset[] = "visible = 'yes'";
$updateset[] = "last_action = NOW()";
}
if (count($updateset))
mysql_query("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $torrentid");
benc_resp_raw($resp);
hit_end();
?>
|
![]() |
PHP Source code |
1 2 3 4 5 |
if(empty($action)) {
echo "<td class=\"tablea\">Kopf anstrengen und Nachdenken</td>";
}else{
echo "<td class=\"tablea\">Kopf zuviel angestrenkt nun Qualmt er ;)</td>";
}
|
This post has been edited 1 times, last edit by "privatxxl" (Jan 4th 2008, 3:30pm)
![]() |
PHP Source code |
1 2 3 4 5 |
if(empty($action)) {
echo "<td class=\"tablea\">Kopf anstrengen und Nachdenken</td>";
}else{
echo "<td class=\"tablea\">Kopf zuviel angestrenkt nun Qualmt er ;)</td>";
}
|
This post has been edited 1 times, last edit by "Christoph680" (Jan 4th 2008, 4:49pm)
![]() |
PHP Source code |
1 2 3 4 5 |
if(empty($action)) {
echo "<td class=\"tablea\">Kopf anstrengen und Nachdenken</td>";
}else{
echo "<td class=\"tablea\">Kopf zuviel angestrenkt nun Qualmt er ;)</td>";
}
|
Quoted
Es existiert ein Interesse an der generellen Rezession der Applikation relativ primitiver Methoden komplementär zur Favorisierung adäquater komplexer Algorithmen.
Übersetzt: Warum einfach wenns auch kompliziert geht
This post has been edited 2 times, last edit by "Christoph680" (Jan 4th 2008, 5:44pm)
This post has been edited 1 times, last edit by "binnett69" (Jan 4th 2008, 6:04pm)
![]() |
PHP Source code |
1 2 3 4 5 |
if(empty($action)) {
echo "<td class=\"tablea\">Kopf anstrengen und Nachdenken</td>";
}else{
echo "<td class=\"tablea\">Kopf zuviel angestrenkt nun Qualmt er ;)</td>";
}
|
![]() |
PHP Source code |
1 2 3 4 5 |
if(empty($action)) {
echo "<td class=\"tablea\">Kopf anstrengen und Nachdenken</td>";
}else{
echo "<td class=\"tablea\">Kopf zuviel angestrenkt nun Qualmt er ;)</td>";
}
|
This post has been edited 1 times, last edit by "Christoph680" (Jan 4th 2008, 9:03pm)
![]() |
PHP Source code |
1 2 3 4 5 |
if(empty($action)) {
echo "<td class=\"tablea\">Kopf anstrengen und Nachdenken</td>";
}else{
echo "<td class=\"tablea\">Kopf zuviel angestrenkt nun Qualmt er ;)</td>";
}
|
Forum Software: Burning Board® 3.1.7, developed by WoltLab® GmbH