/////////////////////// // TTMTT TEAM // /////////////////////// include( "license.php" ); session_start( ); $myname = $_SESSION['mynamenew8']; $myuid = $_SESSION['myuidnew8']; $loggedin = $_SESSION['loggedinnew8']; require( "config.php" ); require( "function.php" ); $timeoutseconds = $cookies_time; $timestamp = time( ); $timeout = $timestamp - $timeoutseconds; $ip = $_SERVER['REMOTE_ADDR']; $resultip = mysql_query( "SELECT ip FROM useronline WHERE ip='{$ip}'" ); $userip = mysql_num_rows( $resultip ); if ( $userip == 0 ) { mysql_query( "UPDATE options SET visitors=visitors+1 ,enddtrafic='{$timestamp}'" ); $year = date( "Y" ); $mth = date( "m" ); $day = date( "d" ); if ( !( $getfilsvisiors = mysql_query( "select `count_visitors` from month_stats where `mth`='".$mth."' and `year`='".$year."'" ) ) ) { exit( mysql_error( ) ); } if ( 0 < mysql_num_rows( $getfilsvisiors ) ) { if ( !mysql_query( "update month_stats set count_visitors=count_visitors+1 where `mth`='".$mth."' and `year`='".$year."'" ) ) { exit( mysql_error( ) ); } if ( !mysql_query( "update month_days_stats set count_visitors=count_visitors+1 where `day`='".$day."'" ) ) { exit( mysql_error( ) ); } } else { if ( !mysql_query( "insert into month_stats values('".$mth."', '".$year."', '1', '1', '1', '1')" ) ) { exit( mysql_error( ) ); } if ( !mysql_query( "update month_days_stats set count_visits='1',count_visitors='1',count_files='1' where `day`='".$day."'" ) ) { exit( mysql_error( ) ); } if ( !mysql_query( "update month_days_stats set count_visits='0',count_visitors='0',count_files='0' where `day`!='".$day."'" ) ) { exit( mysql_error( ) ); } } } $insert = mysql_query( "INSERT INTO useronline VALUES ('{$timestamp}','{$ip}')" ); $delete = mysql_query( "DELETE FROM useronline WHERE timestamp<{$timeout}" ); $year = date( "Y" ); $mth = date( "m" ); $day = date( "d" ); if ( !( $getfilsvisits = mysql_query( "select `count_visits` from month_stats where `mth`='".$mth."' and `year`='".$year."'" ) ) ) { exit( mysql_error( ) ); } if ( 0 < mysql_num_rows( $getfilsvisits ) ) { if ( !mysql_query( "update month_stats set count_visits=count_visits+1 where `mth`='".$mth."' and `year`='".$year."'" ) ) { exit( mysql_error( ) ); } if ( !mysql_query( "update month_days_stats set count_visits=count_visits+1 where `day`='".$day."'" ) ) { exit( mysql_error( ) ); } } else { if ( !mysql_query( "insert into month_stats values('".$mth."', '".$year."', '1', '1', '1', '1')" ) ) { exit( mysql_error( ) ); } if ( !mysql_query( "update month_days_stats set count_visits='1',count_visitors='1',count_files='1' where `day`='".$day."'" ) ) { exit( mysql_error( ) ); } if ( !mysql_query( "update month_days_stats set count_visits='0',count_visitors='0',count_files='0' where `day`!='".$day."'" ) ) { exit( mysql_error( ) ); } } if ( file_exists( "./upgrade.php" ) || file_exists( "./install.php" ) ) { exit( "


خطأ : ملف تنصيب الاسكربت او ترقية الاصدارة مازال موجود . يرجى حذفه مسبقاً" ); } $mod = $_GET['mod']; $mod = preg_replace( "/'\\/<>\"/", "", $mod ); $mod = strip_tags( $mod ); switch ( $mod ) { case "callus" : $cincode = rand( 100, 900 ); break; case "tellus" : $filename = $_GET['s']; $filename = preg_replace( "/'\\/<>\"/", "", $filename ); $filename = strip_tags( $filename ); $cincode = rand( 100, 900 ); break; case "register" : if ( $loggedin ) { ob_start( ); $erorresult .= "
عفوا انت مسجل لدينا مسبقا"; break; } else { if ( !$mopt[registerstat] ) { $erorresult .= "
عفوا التسجيل مغلق حاليا بالموقع"; break; } else { $cincode = rand( 100, 900 ); break; } } case "login" : session_start( ); if ( $loggedin ) { ob_start( ); $erorresult .= "
عفوا انت مسجل لديناحاليا ."; break; } else { break; } case "ext" : $group_list .= "\r\n \t\r\n \t"; if ( !( $querygroup = mysql_query( "SELECT * FROM groups ORDER BY group_id" ) ) ) { exit( mysql_error( ) ); } while ( $rm = mysql_fetch_array( $querygroup ) ) { if ( $rm[group_download] == 1 ) { $fst = ""; } else { $fst = ""; } if ( $rm[group_autodel] == 1 ) { $fsto = ""; } else { $fsto = ""; } $group_list .= "\r\n \t\t\r\n\t\t\t"; } $group_list .= "
\r\n \t
\r\n \t{$sayegr}\r\n \t\t
\r\n \t\t
\r\n \t\t{$sayegr_tmp}\r\n \t\t\t
"; session_start( ); $group_ext = mysql_query( "select * from ext_file order by id asc" ); while ( $extarray = mysql_fetch_array( $group_ext ) ) { $name = $extarray['ext_name']; $size = $extarray['ext_size']; $allow = $extarray['ext_allow']; $fsize = $size; if ( $allow == 1 ) { $fst = ""; } else { $fst = ""; } $ext_table .= " {$sayext2} "; } break; case "userinfo" : if ( !( $queryb = mysql_query( "SELECT count(user) as ct FROM images WHERE user='{$myuid}'" ) ) ) { exit( "Query failed." ); } $line = mysql_fetch_array( $queryb ); $totalcountfiles = $line[ct]; if ( !( $queryx = mysql_query( "SELECT * FROM users WHERE uid='{$myuid}'" ) ) ) { exit( mysql_error( ) ); } $x = mysql_fetch_array( $queryx ); $groupid = $x[usr_group]; $group_sizex = $x[usr_size]; $group_bandwithx = $x[usr_bandwith]; $group_autodelx = $x[usr_autodel]; $group_downloadx = $x[usr_download]; $group_uploadsizex = $x[usr_uploadsize]; $group_speedx = $x[usr_speed]; $group_loadtimex = $x[usr_loadtime]; if ( !( $querygroup = mysql_query( "select* from groups where group_id='{$groupid}'" ) ) ) { exit( mysql_error( ) ); } $bcgroup = mysql_fetch_row( $querygroup ); $group_idx = $bcgroup[0]; $group_namex = $bcgroup[1]; $toltalallowed = $group_sizex * 1048576; $toltarficallowed = $group_bandwithx * 1048576; if ( $group_autodelx == 1 ) { $fst = "\r\n "; } else { $fst = "\r\n "; } if ( $group_downloadx == 1 ) { $ofst = "\r\n "; } else { $ofst = "\r\n "; } if ( !( $SQL = mysql_query( " select sum(filesize) from images WHERE user='{$myuid}'" ) ) ) { exit( mysql_error( ) ); } $cc = mysql_fetch_array( $SQL ); $all_count = $cc['0']; $totalcount = $all_count / $toltalallowed * 100; $totalcountsize = ceil( $totalcount ); $all_countsizefile = file_size( $all_count ); if ( !( $SQLtrafic = mysql_query( " select * from users WHERE uid='{$myuid}'" ) ) ) { exit( mysql_error( ) ); } $cctarfic = mysql_fetch_row( $SQLtrafic ); $all_trafic = $cctarfic[16]; $all_countrafic = number_format( $all_trafic ); $totaltrafic = $all_trafic / $toltarficallowed * 100; $totalusedtrafic = ceil( $totaltrafic ); $allbandusr = file_size( $all_trafic ); $max = $totalcountsize; $max2 = 100 - $max; if ( $max < 25 ) { $col = "#A2AA00"; } else if ( $max < 50 ) { $col = "#008000"; } else if ( $max < 75 ) { $col = "#FE5A56"; } else if ( $max < 90 ) { $col = "#FE5A56"; } else { $col = "#FF0000"; } $tablecolor .= "\r\n \t
\r\n \t
\r\n \t\r\n \r\n \r\n \r\n \t
\r\n

{$max} %

\r\n \t\r\n \r\n \r\n \r\n \r\n \t
  
\r\n \t
\r\n\t\t
"; $cbm = $totalusedtrafic; $cbm2 = 100 - $cbm; if ( $cbm < 25 ) { $col = "#A2AA00"; } else if ( $cbm < 50 ) { $col = "#008000"; } else if ( $cbm < 75 ) { $col = "#FE5A56"; } else if ( $cbm < 90 ) { $col = "#FE5A56"; } else { $col = "#FF0000"; } $tabletrafic .= "\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \t
\r\n

{$cbm} %

\r\n \t\r\n \r\n \r\n \r\n \r\n \t
  
\r\n \t
\r\n\t
"; break; case "logout" : session_destroy( ); $main_form .= ""; break; case "sitesupport" : $sitelink = $mopt[server_url]."sitesform.php"; $siteimg = $mopt[server_url]."sitload.gif"; break; case "role" : if ( !( $query_options = mysql_query( "SELECT * FROM options" ) ) ) { exit( mysql_error( ) ); } $mopt = mysql_fetch_array( $query_options ); $erorresult = $mopt[private_msg]; break; case "adv" : if ( !( $query_options = mysql_query( "SELECT * FROM options" ) ) ) { exit( mysql_error( ) ); } $mopt = mysql_fetch_array( $query_options ); $erorresult = $mopt[adv_msg]; break; case "sendpass" : $cincode = rand( 100, 900 ); break; case "editmember" : if ( !( $queryusr = mysql_query( "SELECT * FROM users WHERE uid='{$myuid}'" ) ) ) { exit( mysql_error( ) ); } $x = mysql_fetch_row( $queryusr ); $password = $x[2]; $email = $x[3]; $num_file_page = $x[5]; $sort_file = $x[6]; $tn_file = $x[7]; $usr_writetxt = $x[17]; $usr_writestat = $x[18]; $usr_writepostion = $x[19]; $usr_writesize = $x[20]; $sort_menu .= ""; $tn_menu .= ""; $writestat_menu .= ""; $postion_menu .= ""; break; case "delmember" : $query = "SELECT * FROM users WHERE uid='{$myuid}'"; if ( !( $result = mysql_query( $query ) ) ) { exit( "Error in query: {$query}. ".mysql_error( ) ); } $x = mysql_fetch_row( $result ); $uid = $x[0]; $username = $x[1]; $password = $x[2]; $email = $x[3]; break; case "msg" : require( "result.php" ); break; case "memberfiles" : require( "memberfiles.php" ); break; case "download" : require( "download.php" ); break; case "stats" : if ( $mopt[stats_menu] ) { $query = mysql_query( "SELECT count(filename) as ct from images" ); $line = mysql_fetch_array( $query ); $totalfiles = $line[ct]; $queryuser = mysql_query( "SELECT count(uid) from users" ); $line = mysql_fetch_array( $queryuser ); $totalcount = $line[0]; $result = mysql_query( "SELECT ip FROM useronline" ); $user = mysql_num_rows( $res
hiddzbrbrejbsdacmetfcxavunzxiyn