uid; } //userid_by_name function select_file_type($un) { print ""; } //select_file_type function select_csoportok($ezt = 0) { global $user_type; print ""; } //select_csoportok function select_hirtype($ezt = 0) { global $user_type; print ""; } //select_hirtype function select_arch_type() { print ""; } //sat function hirek_item($tid,$type) { $pin = mysql_connect("localhost", "peter", "peter02") or die("Hiba MySQL csatlakozás közben. A hiba oka:" . mysql_error()); mysql_select_db(_DB) or die("Adatbazis nem elerheto, hiba oka:" . mysql_error()); $query = "SELECT * FROM hirek WHERE hid=".$tid; $result = mysql_query ($query) or die ("Query failed"); $row = mysql_fetch_object ($result); $temp="\$temp=\$row->".$type.";"; eval($temp); return $temp; } //hirek_item function tipusok_item($tid,$type) { $pin = mysql_connect("localhost", "peter", "peter02") or die("Hiba MySQL csatlakozás közben. A hiba oka:" . mysql_error()); mysql_select_db(_DB) or die("Adatbazis nem elerheto, hiba oka:" . mysql_error()); $query = "SELECT * FROM tipusok WHERE tid=".$tid; $result = mysql_query ($query) or die ("Query failed"); $row = mysql_fetch_object ($result); $temp="\$temp=\$row->".$type.";"; eval($temp); return $temp; } //ti function altipusok_item($ttid,$type) { $pin = mysql_connect("localhost", "peter", "peter02") or die("Hiba MySQL csatlakozás közben. A hiba oka:" . mysql_error()); mysql_select_db(_DB) or die("Adatbazis nem elerheto, hiba oka:" . mysql_error()); $query = "SELECT * FROM altipusok WHERE ttid=".$ttid; $result = mysql_query ($query) or die ("Query failed"); $row = mysql_fetch_object ($result); $temp="\$temp=\$row->".$type.";"; eval($temp); return $temp; } //ati function file_item($fid,$type) { $pin = mysql_connect("localhost", "peter", "peter02") or die("Hiba MySQL csatlakozás közben. A hiba oka:" . mysql_error()); mysql_select_db(_DB) or die("Adatbazis nem elerheto, hiba oka:" . mysql_error()); $query = "SELECT * FROM upload WHERE uid=".$fid; $result = mysql_query ($query) or die ("Query failed"); $row = mysql_fetch_object ($result); $temp="\$temp=\$row->".$type.";"; eval($temp); return $temp; } //fl function site_item($type) { $pin = mysql_connect("localhost", "peter", "peter02") or die("Hiba MySQL csatlakozás közben. A hiba oka:" . mysql_error()); mysql_select_db(_DB) or die("Adatbazis nem elerheto, hiba oka:" . mysql_error()); $query = "SELECT * FROM site_struct"; $result = mysql_query ($query) or die ("Query failed"); $row = mysql_fetch_object ($result); $temp="\$temp=\$row->".$type.";"; eval($temp); return $temp; } //fl function filetype_item($fid,$type) { $pin = mysql_connect("localhost", "peter", "peter02") or die("Hiba MySQL csatlakozás közben. A hiba oka:" . mysql_error()); mysql_select_db(_DB) or die("Adatbazis nem elerheto, hiba oka:" . mysql_error()); $query = "SELECT * FROM filetype WHERE fid=".$fid; $result = mysql_query ($query) or die ("Query failed"); $row = mysql_fetch_object ($result); $temp="\$temp=\$row->".$type.";"; eval($temp); return $temp; } //fl function user_item($uid,$type) { $pin = mysql_connect("localhost", "peter", "peter02") or die("Hiba MySQL csatlakozás közben. A hiba oka:" . mysql_error()); mysql_select_db(_DB) or die("Adatbazis nem elerheto, hiba oka:" . mysql_error()); $query = "SELECT * FROM users WHERE uid=".$uid; $result = mysql_query ($query) or die ("Query failed"); $row = mysql_fetch_object ($result); $temp="\$temp=\$row->".$type.";"; eval($temp); return $temp; } //ui function download_list($tid,$ttid,$user_name) { print "
"; $pin = mysql_connect("localhost", "peter", "peter02") or die("Hiba MySQL csatlakozás közben. A hiba oka:" . mysql_error()); mysql_select_db(_DB) or die("Adatbazis nem elerheto, hiba oka:" . mysql_error()); //if ($user_name=="") $query = "select * from upload where checked=1 and tid=".$tid." order by u_date DESC"; //else // $query = "select * from upload where tid=".$tid." order by name"; if ($ttid) $query = "select * from upload where checked=1 and ttid=".$ttid." order by u_date DESC"; //else // $query = "select * from upload where ttid=".$ttid." order by name"; $result = mysql_query ($query) or die ("Query failed"); while ($row = mysql_fetch_object ($result)) { if (($user_name!="")||($user_name==""&&$row->ttid!=1)) { print ""; print ""; print ""; print ""; print ""; print ""; print ""; } } print "
".$row->name."".$this->altipusok_item($row->ttid,"name")."".round($row->fsize/1024)." kb".$this->filetype_item($row->filetype,"name")."
"; if ($row->checked) print ""; else print ""; print "
"; } //download_list function search_list($item,$type,$un) { $pin = mysql_connect("localhost", "peter", "peter02") or die("Hiba MySQL csatlakozás közben. A hiba oka:" . mysql_error()); mysql_select_db(_DB) or die("Adatbazis nem elerheto, hiba oka:" . mysql_error()); switch ($type) { case 1: $query = "SELECT * FROM upload WHERE tid=1 AND (note like \"%".$item."%\" OR name like \"%".$item."%\") ORDER BY u_date DESC"; break; case 2: $query = "SELECT * FROM upload WHERE tid=2 AND name like \"%".$item."%\" ORDER BY u_date DESC"; break; case 3: $query = "SELECT * FROM hirek WHERE cim like \"%".$item."%\" OR body like \"%".$item."%\" OR kopf like \"%".$item."%\" ORDER BY u_date DESC"; break; } //type $result = mysql_query ($query) or die ("Query failed"); if ($un!="") print "Összesen ".mysql_num_rows($result)." találat.

"; while ($row = mysql_fetch_object ($result)) { if (!isset($row->ttid)) $row->ttid=0; if (($un!="")||($un==""&&$row->ttid!=1)) { if ($type ==1 || $type == 2) { print " ".$row->name." ".$row->u_date."
"; print "Filetípus : ".$this->filetype_item($row->filetype,"name")." Fileméret : ".(round($row->fsize)/1024)." kb"; } if ($type == 3) { print "".$row->cim."
".$row->u_date." I ".$row->author."
"; $row->body = ereg_replace('<([^>]|\n)*>', '', $row->body); print htmlspecialchars(substr($row->body,0,100))." ... "; } print "

"; } } } //search_list function counter($table) { $pin = mysql_connect("localhost", "peter", "peter02") or die("Hiba MySQL csatlakozás közben. A hiba oka:" . mysql_error()); mysql_select_db(_DB) or die("Adatbazis nem elerheto, hiba oka:" . mysql_error()); $query = "select * from ".$table; $result = mysql_query ($query) or die ("Query failed"); return mysql_num_rows($result); } //counter function nums2date($ev,$ho,$nap) //szamok mysql datumma { if (($nap<10)&&($nap[0]!="0")) $nap="0".$nap; if (($ho<10)&&($ho[0]!="0")) $ho="0".$ho; return $ev."-".$ho."-".$nap; } //nums2date function nums2datetime($ev,$ho,$nap,$ora,$perc) //szamok mysql datumma { if (($nap<10)&&($nap[0]!="0")) $nap="0".$nap; if (($ho<10)&&($ho[0]!="0")) $ho="0".$ho; if (($ora<10)&&($ora[0]!="0")) $ora="0".$ora; if (($perc<10)&&($perc[0]!="0")) $perc="0".$perc; return $ev."-".$ho."-".$nap." ".$ora.":".$perc.":00"; } //nums2date } //misc ?>