Az oldal utoljára frissítve ".date('Y-m-d H:i:s', filemtime($cachefile))."
"); end_main_frame(); stdfoot(); exit; } ob_start(); } function cache_save ($file = 'cachefile') { global $rootpath,$cache; $cachefile = $rootpath.$cache . '/'.$file.'.html'; $fp = fopen($cachefile, 'w'); // save the contents of output buffer to the file fwrite($fp, ob_get_contents()); // close the file fclose($fp); // Send the output to the browser ob_end_flush(); } //--------------------------------- //---- CACHE MOD v0.1 by xam //--------------------------------- //--------------------------------- //---- Browser detection v0.1 by xam //--------------------------------- function checkbrowser(){ unset($browser); if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') ) { if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Netscape') ) { $browser = true; } else if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') ) { $browser = true; } else { $browser = true; } }else $browser = false; if (!$browser) Print ("Ha nem sikerül bejelentkeznie ellenőrizze a sütik beállításait. A sütiknek engedélyezve kell lenniük ugyanis ebben van hordozva azon információk amelyek a bejelentkezéshez szükségesek.
"); } //--------------------------------- //---- Browser detection v0.1 by xam //--------------------------------- //------------------------------------ //---- Secure Mail System v0.4 by xam //------------------------------------ function safe_email($email) { $email = str_replace("<","",$email); $email = str_replace(">","",$email); $email = str_replace("\'","",$email); $email = str_replace('\"',"",$email); $email = str_replace("\\\\","",$email); return $email; } function check_email ($email) { # Check EMail Function v.02 by xam! if(ereg("^([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", $email)) return true; else return false; } function sent_mail($to,$fromname,$fromemail,$subject,$body,$type = "confirmation",$showmsg=true,$multiple=false,$multiplemail='') { global $rootpath,$SITENAME,$SITEEMAIL,$smtptype,$smtp,$smtp_host,$smtp_port,$smtp_from,$smtpaddress,$smtpport,$accountname,$accountpassword; # Sent Mail Function v.05 by xam (This function to help avoid spam-filters.) if ($smtptype == 'default') { @mail($to, $subject, $body, "Feladó: $SITEEMAIL", "-f$SITEEMAIL") or stderr("Hiba", "Nem sikerült elküldeni az üzenetet. Vegye fel a kapcsolatot az Adminisztrátorral."); }elseif ($smtptype == 'advanced') { # Is the OS Windows or Mac or Linux? if (strtoupper(substr(PHP_OS,0,3)=='WIN')) { $eol="\r\n"; $windows = true; } elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')) $eol="\r"; else $eol="\n"; $mid = md5(getip() . $fromname); $name = $_SERVER["SERVER_NAME"]; $headers .= "Feladó: $fromname <$fromemail>".$eol; $headers .= "Válasz: $fromname <$fromemail>".$eol; $headers .= "Visszatérési útvonal: $fromname <$fromemail>".$eol; $headers .= "Üzenet-ID: <$mid thesystem@$name>".$eol; $headers .= "X-Mailer: PHP v".phpversion().$eol; $headers .= "MIME-Version: 1.0".$eol; $headers .= "X-feladó: PHP".$eol; if ($multiple) $headers .= "Bcc: $multiplemail.$eol"; if ($smtp == "yes") { ini_set('SMTP', $smtp_host); ini_set('smtp_port', $smtp_port); if ($windows) ini_set('sendmail_from', $smtp_from); } @mail($to,$subject,$body,$headers) or stderr("Hiba", "Nem sikerült elküldeni az üzenetet. Vegye fel a kapcsolatot az Adminisztrátorral."); ini_restore(SMTP); ini_restore(smtp_port); if ($windows) ini_restore(sendmail_from); }elseif ($smtptype == 'external') { require ($rootpath . 'include/smtp/smtp.lib.php'); $mail = new smtp; $mail->debug(false); $mail->open($smtpaddress, $smtpport); $mail->auth($accountname, $accountpassword); $mail->from($SITEEMAIL); $mail->to($to); $mail->subject($subject); $mail->body($body); $mail->send(); $mail->close(); } if ($showmsg) { if ($type == "confirmation") stderr("Kész", "A megerősítő E-mail sikeresen elküldve a ". htmlspecialchars($to) .".\n" . "Kérem várjon néhány percet az üzenet megérkezéséig.",false); else if ($type == "details") stderr("Kész", "Az új fiók részleteit sikeresen elküldtük a ". htmlspecialchars($to) .".\n" . "Kérem várjon néhány percet az üzenet megérkezéséig.",false); }else return true; } //------------------------------------ //---- Secure Mail System v0.4 by xam //------------------------------------ //--------------------------------- //---- Login Attempts v0.1 by xam //--------------------------------- function failedloginscheck ($type = 'Login') { global $maxloginattempts; $total = 0; $ip = sqlesc(getip()); $Query = mysql_query("SELECT SUM(attempts) FROM loginattempts WHERE ip=$ip") or sqlerr(__FILE__, __LINE__); list($total) = mysql_fetch_array($Query); if ($total >= $maxloginattempts) { mysql_query("UPDATE loginattempts SET banned = 'yes' WHERE ip=$ip") or sqlerr(__FILE__, __LINE__); stderr("$type Zárolva! (Elérte a maximális $type próbálkozások számát)", "A rendszer ezt többszöri sikertelen bejelentkezésnek minősítette ezért az IP cím tiltva lett!"); } } function failedlogins ($type = 'login', $recover = false, $head = true) { $ip = sqlesc(getip()); $added = sqlesc(get_date_time()); $a = (@mysql_fetch_row(@mysql_query("select count(*) from loginattempts where ip=$ip"))) or sqlerr(__FILE__, __LINE__); if ($a[0] == 0) mysql_query("INSERT INTO loginattempts (ip, added, attempts) VALUES ($ip, $added, 1)") or sqlerr(__FILE__, __LINE__); else mysql_query("UPDATE loginattempts SET attempts = attempts + 1 where ip=$ip") or sqlerr(__FILE__, __LINE__); if ($recover) mysql_query("UPDATE loginattempts SET type = 'recover' WHERE ip = $ip") or sqlerr(__FILE__, __LINE__); if ($type == 'silent') return; elseif ($type == 'login') stderr("Bejelentkezés nem sikerült","Hiba: A felhasználói név vagy jelszó nem megfelelő!// Itt volt a Támogatás, de töröltem ?> |
if($CURUSER['downloaded'] > 0) { // Make sure there is a download value
// Set the ratio threshold based on user class
switch (get_user_class())
{
case UC_USER:
case UC_POWER_USER: $ratio = 1.00;
break;
case UC_VIP: $ratio = 0.30;
break;
case UC_UPLOADER:
case UC_MODERATOR: $ratio = 0.70;
break;
case UC_ADMINISTRATOR:
case UC_SYSOP:
case UC_STAFFLEADER: $ratio = 0.00;
break;
}
// Override ratio if donor, but only if existing ratio is higher than 0.70
if($CURSUSER['donor']=='yes' && $ratio > 0.70) $ratio = 0.70;
// Do remember warned users they are warned and for how long... [by fedepeco]
if ($CURUSER['leechwarn'] == 'yes') {
$leechwarnuntil = $CURUSER['leechwarnuntil'];
print(" |
\n"); } // End MOD... } if ($unread) { print("
\n"); } if ($CURUSER) { $rel = sql_query("SELECT COUNT(*) FROM users WHERE status = 'pending' AND invited_by = ".mysql_real_escape_string($CURUSER[id])) or sqlerr(__FILE__, __LINE__); $arro = mysql_fetch_row($rel); $number = $arro[0]; if ($number > 0) { print("
\n"); } } if ($offlinemsg) { $settings_script_name = substr($_SERVER[SCRIPT_FILENAME], -12 , 12); if ($settings_script_name != "settings.php" AND $settings_script_name != "announce.php") { print("
\n"); } } if (get_user_class() > UC_MODERATOR) { $resa = mysql_query("select count(id) as numreports from reports WHERE dealtwith=0"); $arra = mysql_fetch_assoc($resa); $numreports = $arra[numreports]; if ($numreports){ print("
|
" . htmlspecialchars($x) . "
\n"); stdfoot(); exit(); } function mksecret($len = 20) { $ret = ""; for ($i = 0; $i < $len; $i++) $ret .= chr(mt_rand(0, 255)); return $ret; } function httperr($code = 404) { header("HTTP/1.0 404 Nem található"); print("$pager
$pagerstr
$pagerstr
$pager
$pager
\n"; $pagerbottom = $pagertop; } $start = $page * $rpp; return array($pagertop, $pagerbottom, "LIMIT $start,$rpp"); } function downloaderdata($res) { $rows = array(); $ids = array(); $peerdata = array(); while ($row = mysql_fetch_assoc($res)) { $rows[] = $row; $id = $row["id"]; $ids[] = $id; $peerdata[$id] = array(downloaders => 0, seeders => 0, comments => 0); } if (count($ids)) { $allids = implode(",", $ids); $res = mysql_query("SELECT COUNT(*) AS c, torrent, seeder FROM peers WHERE torrent IN ($allids) GROUP BY torrent, seeder"); while ($row = mysql_fetch_assoc($res)) { if ($row["seeder"] == "yes") $key = "seeders"; else $key = "downloaders"; $peerdata[$row["torrent"]][$key] = $row["c"]; } $res = mysql_query("SELECT COUNT(*) AS c, torrent FROM comments WHERE torrent IN ($allids) GROUP BY torrent"); while ($row = mysql_fetch_assoc($res)) { $peerdata[$row["torrent"]]["comments"] = $row["c"]; } } return array($rows, $peerdata); } function commenttable($rows) { global $CURUSER; begin_main_frame(); begin_frame(); $count = 0; foreach ($rows as $row) { print("#" . $row["id"] . " "); if (isset($row["username"])) { $title = $row["title"]; if ($title == "") $title = get_user_class_name($row["class"]); else $title = htmlspecialchars(trim($title)); print("" . htmlspecialchars($row["username"]) . "" . ($row["donor"] == "yes" ? "" : "") . ($row["warned"] == "yes" ? "" : "") . " ($title)\n"); } else print("(orphaned)\n"); print(" ekkor írta " . $row["added"] . " GMT" . ($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [Szerkesztés]" : "") . (get_user_class() >= UC_MODERATOR ? "- [Törlés]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? "- [Eredeti megjelenítése]" : "") . "
\n"); $avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars(trim($row["avatar"])) : ""); if (!$avatar) $avatar = "pic/default_avatar.gif"; $text = format_comment($row["text"]); if ($row["editedby"]) $text .= "Utoljára módosította $row[username] at $row[editedat] GMT
\n"; begin_table(true); $dt = gmtime() - 180; $dt = sqlesc(get_date_time($dt)); print("Kategória | Név / Hozzáadva | if ($CURUSER["downloadpos"] != "no") print(""); if ($wait) { print("Várakozás | \n"); } if ($variant == "mytorrents") { print("Szerkesztés | \n"); print("Látható | \n"); } ?>Feldolgozás | Méret / Letöltve | if ($variant == "index") print("Feltöltő | \n"); ?> if ($CURUSER['class']>=UC_MODERATOR) { ?>Művelet | } ?> print("||||||||||||||||||||
"); if (isset($row["cat_name"])) { print(""); if (isset($row["cat_pic"]) && $row["cat_pic"] != "") print(""); else print($row["cat_name"]); print(""); } else print("-"); print(" | \n"); $dispname = htmlspecialchars(trim($row["name"])); $count_dispname=strlen($dispname); $max_lenght_of_torrent_name="35"; // maximum lenght if($count_dispname > $max_lenght_of_torrent_name){ $short_torrent_name_alt="title=\"$dispname\""; $dispname=substr($dispname, 0, $max_lenght_of_torrent_name) . "..."; }else $short_torrent_name_alt="title=\"$dispname\""; print("" : "");
$timezone = $row["added"];
if (sql_timestamp_to_unix_timestamp($row["added"]) >= $last_browse)
print("\">$dispname $thisisfree " . str_replace(" ", " ", $timezone) . ""); else print("\">$dispname $thisisfree " . str_replace(" ", " ", $timezone) . ""); if ($variant == "index") if ($CURUSER["downloadpos"] != "no") //print(" | \n"); if ($wait) { $elapsed = floor((gmtime() - strtotime($row["added"])) / 3600); if ($elapsed < $wait) { $color = dechex(floor(127*($wait - $elapsed)/48 + 128)*65536); print(" | Szerkesztés\n"); print(" | \n"); if ($variant == "mytorrents") { print(""); if ($row["visible"] == "no") print("no"); else print("yes"); print(" | \n"); } if ($row["type"] == "single") print("" . $row["numfiles"] . " | \n"); else { if ($variant == "index") print("" . $row["numfiles"] . " | \n"); else print("" . $row["numfiles"] . " | \n"); } if (!$row["comments"]) print("" . $row["comments"] . " | \n"); else { if ($variant == "index") print("" . $row["comments"] . " | \n"); else print("" . $row["comments"] . " | \n"); } if ($row["seeders"]) { if ($variant == "index") { if ($row["leechers"]) $ratio = $row["seeders"] / $row["leechers"]; else $ratio = 1; print("" . $row["seeders"] . " | \n"); } else print("" . $row["seeders"] . " | \n"); } else print("" . $row["seeders"] . " | \n"); if ($row["leechers"]) { if ($variant == "index") print("" . number_format($row["leechers"]) . (isset($peerlink) ? "" : "") . " | \n"); else print("" . $row["leechers"] . " | \n"); } else print("0 | \n"); /* print(""); if (!isset($row["rating"])) print("---"); else { $rating = round($row["rating"] * 2) / 2; $rating = ratingpic($row["rating"]); if (!isset($rating)) print("---"); else print($rating); } print(" | \n"); */ /* $ttl = (28*24) - floor((gmtime() - sql_timestamp_to_unix_timestamp($row["added"])) / 3600); if ($ttl == 1) $ttl .= "$ttl | \n"); */ // Progressbar Mod $seedersProgressbar = array(); $leechersProgressbar = array(); $resProgressbar = mysql_query("SELECT p.seeder, p.to_go, t.size FROM torrents AS t LEFT JOIN peers AS p ON t.id = p.torrent WHERE p.torrent = '$id'") or sqlerr(); $progressPerTorrent = 0; $iProgressbar = 0; while ($rowProgressbar = mysql_fetch_array($resProgressbar)) { $progressPerTorrent += sprintf("%.2f", 100 * (1 - ($rowProgressbar["to_go"] / $rowProgressbar["size"]))); $iProgressbar++; } if ($iProgressbar == 0) $iProgressbar = 1; $progressTotal = sprintf("%.2f", $progressPerTorrent / $iProgressbar); $picProgress = get_percent_completed_image(floor($progressTotal))."$picProgress | \n"); // End Progress Bar mod /* // Totalspeed mod $resSpeed = mysql_query("SELECT seeders,leechers FROM torrents WHERE $where visible='yes' and id = $id ORDER BY added DESC LIMIT 15") or sqlerr(__FILE__, __LINE__); if ($rowTmp = mysql_fetch_row($resSpeed)) list($seedersTmp,$leechersTmp) = $rowTmp; if ($seedersTmp >= 1 && $leechersTmp >= 1){ $speedQ = mysql_query("SELECT (t.size * t.times_completed + SUM(p.downloaded)) / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(added)) AS totalspeed FROM torrents AS t LEFT JOIN peers AS p ON t.id = p.torrent WHERE p.seeder = 'no' AND p.torrent = '$id' GROUP BY t.id ORDER BY added ASC LIMIT 15") or sqlerr(__FILE__, __LINE__); $a = mysql_fetch_assoc($speedQ); $totalspeed = mksize($a["totalspeed"]) . "/s"; } else $totalspeed = "No Traffic"; print "$totalspeed | \n"; // End Totalspeed mod */ // print("" . $row["views"] . " | \n"); // print("" . $row["hits"] . " | \n"); $_s = ""; if ($row["times_completed"] != 1) $_s = "s"; print("" . str_replace(" ", " ", mksize($row["size"])) . " " . number_format($row["times_completed"]) . " x | \n");
if ($variant == "index") {
if ($row["anonymous"] == "yes") {
print("[Névtelen] | \n"); } else { print("" . (isset($row["username"]) ? ("" . htmlspecialchars($row["username"]) . "") : "(ismeretlen)") . " | \n"); } } if ($CURUSER['class'] >= UC_MODERATOR) { print("Törlés\n"); print(" / Szerkesztés | \n"); print("
Ingyenes letöltés (Csak a feltöltés számoljuk!)
\n");
return $rows;
}
// IPLogger
function iplogger() {
GLOBAL $HTTP_SERVER_VARS, $CURUSER, $iplog2;
if ($iplog2 == "yes") {
$ip = getip();
$res = mysql_query("SELECT * FROM ips WHERE ip = '".mysql_real_escape_string($ip)."' AND userid = ".mysql_real_escape_string($CURUSER[id])) or die(mysql_error());
if (mysql_num_rows($res) == 0 ) {
mysql_query("INSERT INTO ips(userid, ip) VALUES (".mysql_real_escape_string($CURUSER[id]).", '".mysql_real_escape_string($ip)."')") or die(mysql_error());
}
return;
}
return;
}
// END IPLogger
function hash_pad($hash) {
return str_pad($hash, 20);
}
function hash_where($name, $hash) {
$shhash = preg_replace('/ *$/s', "", $hash);
return "($name = " . sqlesc($hash) . " OR $name = " . sqlesc($shhash) . ")";
}
function get_user_icons($arr, $big = false)
{
if ($big)
{
$donorpic = "starbig.gif";
$leechwarnpic = "warnedbig.gif";
$warnedpic = "warnedbig3.gif";
$disabledpic = "disabledbig.gif";
$style = "style='margin-left: 4pt'";
}
else
{
$donorpic = "star.gif";
$leechwarnpic = "warned.gif";
$warnedpic = "warned3.gif";
$disabledpic = "disabled.gif";
$style = "style=\"margin-left: 2pt\"";
}
$pics = $arr["donor"] == "yes" ? "" : "";
if ($arr["enabled"] == "yes")
$pics .= ($arr["leechwarn"] == "yes" ? "" : "") . ($arr["warned"] == "yes" ? "" : "");
else
$pics .= "\n";
return $pics;
}
//----------
// Progress Bar Image Generator
//-----------------------------
// Dynamic image created by Dumpy Dooby
// Original code by johim
// ------------------------------------------------
function get_percent_completed_image($p) {
$maxpx = "45"; // Maximum amount of pixels for the progress bar
if ($p == 0) $progress = "";
if ($p == 100) $progress = "";
if ($p >= 1 && $p <= 30) $progress = "";
if ($p >= 31 && $p <= 65) $progress = "";
if ($p >= 66 && $p <= 99) $progress = "";
return "" . $progress ."";
}
//----------
// END Progress Bar Image Generator
//---------------------------------
//---------------------------------
//---- Website Settings v0.2 by xam
//---------------------------------
function ReadConfig ($configname) {
if (strstr($configname, ',')) {
$configlist = explode(',', $configname);
foreach ($configlist as $key=>$configname) {
ReadConfig(trim($configname));
}
} else {
$configname = basename($configname);
$path = './config/'.$configname;
if (!file_exists($path)) {
stderr("HIBA", "Fájl [".htmlspecialchars($configname)."] nem létezik!.
Before the setup starts, please ensure that you have properly configured file and directory access permissions. Please see below.
chmod 777 CONFIG (config directory).
chmod 777 CONFIG/main (the file which save the main settings).",false);
}
$fp = fopen($path, 'r');
$content = '';
while (!feof($fp)) {
$content .= fread($fp, 102400);
}
fclose($fp);
if (empty($content)) {
if ($configname == 'XAM') {
Header("Location: index.php");
die;
}
return array();
}
$tmp = @unserialize($content);
if (empty($tmp)) {
if ($configname == 'XAM') {
Header("Location: index.php");
die;
}
stderr("HIBA", "A fájl nem olvasható [".htmlspecialchars($configname)."]!.
Before the setup starts, please ensure that you have properly configured file and directory access permissions. Please see below.
chmod 777 CONFIG (config directory).
chmod 777 CONFIG/main (the file which save the main settings).",false);
}
$GLOBALS[$configname] = $tmp;
return true;
}
}
function WriteConfig ($configname, $config) {
$configname = basename($configname);
$path = './config/'.$configname;
if (!file_exists($path) || !is_writable ($path)) {
stdmsg("HIBA", "Cannot read file [".htmlspecialchars($configname)."]!.
Before the setup starts, please ensure that you have properly configured file and directory access permissions. Please see below.
chmod 777 CONFIG (config directory).
chmod 777 CONFIG/main (the file which save the main settings).",false);
}
$data = @serialize($config);
if (empty($data)) {
stdmsg("HIBA", "Cannot serialize file [".htmlspecialchars($configname)."]
Before the setup starts, please ensure that you have properly configured file and directory access permissions. Please see below.
chmod 777 CONFIG (config directory).
chmod 777 CONFIG/main (the file which save the main settings).",false);
}
$fp = @fopen ($path, 'w');
if (!$fp) {
stdmsg("HIBA", "Cannot open file [".htmlspecialchars($configname)."] to save info!.
Before the setup starts, please ensure that you have properly configured file and directory access permissions. Please see below.
chmod 777 CONFIG (config directory).
chmod 777 CONFIG/main (the file which save the main settings).",false);
}
$Res = @fwrite($fp, $data);
if (empty($Res)) {
stdmsg("HIBA", "Cannot save info in file (error in serialisation) [".htmlspecialchars($configname)."] to save info!.
Before the setup starts, please ensure that you have properly configured file and directory access permissions. Please see below.
chmod 777 CONFIG (config directory).
chmod 777 CONFIG/main (the file which save the main settings).",false);
}
fclose($fp);
return true;
}
function GetVar ($name) {
if ( is_array($name) ) {
foreach ($name as $var) GetVar ($var);
} else {
if ( !isset($_REQUEST[$name]) )
return false;
if ( get_magic_quotes_gpc() ) {
$_REQUEST[$name] = ssr($_REQUEST[$name]);
}
$GLOBALS[$name] = $_REQUEST[$name];
return $GLOBALS[$name];
}
}
function ssr ($arg) {
if (is_array($arg)) {
foreach ($arg as $key=>$arg_bit) {
$arg[$key] = ssr($arg_bit);
}
} else {
$arg = stripslashes($arg);
}
return $arg;
}
//---------------------------------
//---- Website Settings v0.2 by xam
//---------------------------------
function parked()
{
global $CURUSER;
if ($CURUSER["parked"] == "yes")
stderr("Hozzáférés megtagadva!", "Az ön fiókja fel van függesztve.");
}
function quote_smart($value)
{
// Stripslashes
if (get_magic_quotes_gpc()) {
$value = stripslashes($value);
}
// Quote if not a number or a numeric string
if (!is_numeric($value)) {
$value = "'" . mysql_real_escape_string($value) . "'";
}
return $value;
}
?>
Partneroldalak:
Domain regisztráció tár és szerverszolgáltatások: domain domainnév tárhely e-mail, imap, pop3
www.webtar.hu
www.micropay.hu
www.ingyenweb.hu
www.videok.hu
www.antikvárium.hu
www.ftpdir.hu
www.fotók.hu
www.randi.hu
www.licit.hu
www.napivicc.hu
www.gyertyalang.hu
www.helyesírás.hu
Domain regisztráció