TEST VERSION
Changelog
leave test
Score
'.$lang['DEMO'].''; if ($_GET['view']!='PLAYER' && $_GET['view']!='HELP') {echo '

'.$lang[$_GET['view']].'

';} else {echo '
';} if ($EDIT_PLAYER>-1){ echo ''; if ($COUNTDOWN>-1){ echo $lang['MY:LOGIN_EXPIRE'].' '.msToText($COUNTDOWN*1000,false).'
'; } echo ' '.$lang['MY:LOGOUT'].'
'; } // ****************************************************************************** if ($_GET['view']=='CUBE'){?>
Evothings Home Troubleshooting Test 3

Scanning Paused

-1){ if (isset($_POST['addfriend'])){ $resultFRE = dotazSQL("SELECT serial, profile FROM `sc_profiles` WHERE id='".intval($_POST['addfriend'])."'"); $rowFRE = mysql_fetch_array($resultFRE, MYSQL_ASSOC); dotazSQL("INSERT IGNORE INTO sc_friends (id_profile, friend_serial, friend_profile) VALUES ('".$EDIT_PLAYER."', '".$rowFRE['serial']."',".$rowFRE['profile'].')'); } } //Pocet zaznamu $zaznamu_na_stranku=30; /*if (isset($_GET['player_id'])){ //Kdyz ma zobrazit hrace, zjisti na ktere strance je $result = dotazSQL("SELECT * FROM sc_profiles WHERE active=1 ".$where); $row = mysql_fetch_array($result, MYSQL_ASSOC); $_GET['side']=intval(1+($row['rank']-1)/$zaznamu_na_stranku); //&side='.intval(1+($row['rank']-1)/80). //if (mysql_num_rows($result)==1) $_GET['player_id']=$row['id']; } */ //side if (!isset($_GET['side'])) $_GET['side']=1; if ($_GET['side']<1) $_GET['side']=1; $poc=0; if (!isset($_GET['player_id'])) $_GET['player_id']=-1; $result = dotazSQL("SELECT COUNT(*) FROM sc_profiles WHERE active=1 ".$where); $pocet_zaznamu=mysql_result($result, 0); $FRIE=""; if ($EDIT_PLAYER>-1) $FRIE=", (SELECT count(*) FROM sc_friends WHERE id_profile=".$EDIT_PLAYER." AND sc_profiles.serial=sc_friends.friend_serial AND sc_profiles.profile=sc_friends.friend_profile) as friend"; $result = dotazSQL("SELECT *, IFNULL((SELECT CONCAT(GROUP_CONCAT(rank ORDER BY rank SEPARATOR ',' ) ,',x') FROM sc_scores_best LEFT JOIN sc_games ON sc_games.id=sc_scores_best.id_game WHERE rank<5 AND public=0 AND sc_profiles.id=sc_scores_best.id_profile),'x') as medal". $FRIE." FROM sc_profiles WHERE active=1 ".$where." ORDER BY ".$sort."last_upload desc, serial, profile limit ".(($_GET['side']-1)*$zaznamu_na_stranku).",".$zaznamu_na_stranku); //Next/Prev side echo " "; //SEM NAJEDE PO NACTENI STRANKY echo '
'; echo ''; echo ''; echo ''; echo $lang['SEARCH']." ".''; echo ''.$lang['PAGE'].':'; echo ''; echo ''.$_GET['side'].'/'.(1+(intval(($pocet_zaznamu-1)/$zaznamu_na_stranku))).''; echo '=($pocet_zaznamu/$zaznamu_na_stranku) ? ' disabled' :'').'>'; echo '

'; echo '
'; echo '
'; //kvuli add to friend echo ''; echo ''; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $poc++; $TD=''; //IKONA end $FRIE=''; if ($EDIT_PLAYER>-1) { if ($EDIT_PLAYER !=$row['id']){ if ($row['friend'] =='0'){ $FRIE= ''; }else{ $FRIE=' '.$lang['MY_FRIEND'].''; } } } echo $TD.'">'.$row['nick'].''.$FRIE.''; echo $TD.'">'.$row['serial'].'_'.$row['profile'].''; echo $TD.'">'; if ($row['medal']){ $arrmedal=explode(",",$row['medal']); echo ''; foreach ($arrmedal as $value) { if ($value!='x') echo 'icon'; } echo ''; } echo ' '; echo $TD.' center">'.($row['hof_rank']==0 ? '': $row['hof_rank'].'. ('.$row['hof_points'].' '.$lang['POINTS'].')').''; // echo $TD.' center">'.$row['fw'].''; echo $TD.' center">'.ScoreDatum($row['last_upload']).''; echo $TD.' center">'.ScoreDatum($row['created']).''; } echo '
  '.$lang['TAB:NICK'].''.($_GET['sort']=='NICK' ? ' ↓':'').' '.($_GET['sort']=='SERIAL' ? ' ↓':'').' '.$lang['TAB:MEDAL'].''.($_GET['sort']=='MEDAL' ? ' ↓':'').' '.$lang['TAB:HOF_RANK/POINTS'].''.($_GET['sort']=='HOF' ? ' ↓':'').' '.$lang['TAB:LAST_UPLOAD'].''.($_GET['sort']=='LAST' ? ' ↓':'').' '.$lang['TAB:PLAYER_CREATED'].'
'; echo ''; //IKONA start echo $TD.'">'; if (!is_null($row['icon'])){ echo 'icon'; }else{ //echo ' '; echo 'icon'; } echo '
'; ?> '; echo '  '.$lang['TAB:NAME'].''.$lang['TAB:TOP_SCORE'].''; $id_game_pred=''; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { if ($id_game_pred==$row['id_game_ok']){ /*echo ''.$TD.' colspan=3> '; echo $TD.'>'.$row['rank'].'. '.ScoreToText($row,$row['flags']).' ('.$row['nick'].')'; //echo $TD.'>'.$row['description'].''; echo '';*/ //echo '
'; }else{ $poc++; $TD='0) $TD=''; echo ''; //Ikona turnaje echo $TD.'>'; if ($row['tou_active']) echo 'pohar'; echo ''; //IKONA start echo $TD.'>'; if (!is_null($row['icon'])){ echo 'icon'; }else{ echo ' '; } echo ''; //IKONA end echo $TD.'>'.$row['name_'.$lng].($row['game_ver']=='1.0' ? '' : ' v'.$row['game_ver']).''; if ($row['public'] & 1) echo '
'.$lang['TAB:GAME_DENIED_NEW_SCORE']; echo ''; //echo $TD.'>'.$row['public'].''; //echo $TD.'>'.$row['name_'.$lng].''; echo $TD.'>'; //echo $TD.'>'.$row['description'].''; //echo $TD.'>'.$row['flags'].''; //echo $TD.'>'.$row['hash'].''; //echo $TD.'>'.$row['update'].''; } if($row['rank']<>'') echo '
 '.ScoreToText($row,$row['flags']).''.$row['rank'].'.'.$row['nick'].'
'; $id_game_pred=$row['id_game_ok']; } echo ''; // ****************************************************************************** }elseif ($_GET['view']=='PLAYER' || $_GET['view']=='MY_PROFILE'){ echo " "; //SEM NAJEDE PO NACTENI STRANKY if ($_GET['view']=='MY_PROFILE'){ // ****** view=MY_PROFILE if ($EDIT_PLAYER>-1 && isset($_POST['id'])){ if ($_POST['id']==$EDIT_PLAYER){ // V PORADKU if (isset($_POST['save_user'])){ // ******** ULOZ DATA ********** //echo 'Data uložena'; //HIST (0,'sc_games',"id",$_POST['id']); $_POST['about'] = strip_tags($_POST['about'], '

'); $_POST['city'] = strip_tags($_POST['city'], ''); dotazSQL("UPDATE sc_profiles SET country='$_POST[country]', city='$_POST[city]', born='$_POST[born]', sex='$_POST[sex]', about='$_POST[about]' WHERE id=".$EDIT_PLAYER); //RebuildBestScores(); } if (isset($_POST['send_mail_on'])) $result = dotazSQL("UPDATE sc_profiles SET send_mail=1 WHERE id=".$EDIT_PLAYER); if (isset($_POST['send_mail_off'])) $result = dotazSQL("UPDATE sc_profiles SET send_mail=0 WHERE id=".$EDIT_PLAYER); if (isset($_POST['mail_newsletter_on'])) $result = dotazSQL("UPDATE sc_profiles SET mail_newsletter=1 WHERE id=".$EDIT_PLAYER); if (isset($_POST['mail_newsletter_off'])) $result = dotazSQL("UPDATE sc_profiles SET mail_newsletter=0 WHERE id=".$EDIT_PLAYER); if (isset($_POST['remove_login'])){ // ******** SMAZE MAIL ********** dotazSQL("UPDATE sc_profiles SET pass=NULL, mail_verified=NULL, send_mail=0 WHERE id=".$EDIT_PLAYER); } if (isset($_POST['remove_friend'])){ dotazSQL("DELETE FROM sc_friends WHERE id_profile='".$EDIT_PLAYER."' AND CONCAT(friend_serial,'_',friend_profile)='".$_POST['remove_friend']."'"); } if (isset($_POST['create_login'])){ // ******** OVER MAIL ********** function check_email($email) { $atom = '[-a-z0-9!#$%&\'*+/=?^_`{|}~]'; // znaky tvorící uživatelské jméno $domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // jedna komponenta domény return preg_match("(^$atom+(\\.$atom+)*@($domain?\\.)+$domain\$)i", $email); } $_POST['mail']=strtolower($_POST['mail']); // KONTROLA MAILU if (!check_email($_POST['mail'])){ $msg_mail=$lang['MAIL_MSG:ERR']; } if (mysql_num_rows(dotazSQL("SELECT mail FROM `sc_profiles` WHERE mail='".$_POST['mail']."' AND id<>".$EDIT_PLAYER))!=0){ $msg_mail=$lang['MAIL_MSG:EXIST']; } // KONTROLA HESLA if (strlen($_POST['pass'])<5){ $msg_pass=$lang['MAIL_MSG:PASS_SHORT']; } //ULOZI MAIL A HESLO, POSLE MAIL if ($msg_mail=='' && $msg_pass==''){ function generateRandomString($length = 50) { return substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length/strlen($x)) )),1,$length); //return bin2hex(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $mail_aes128_init_iv_key,$EDIT_PLAYER , MCRYPT_MODE_ECB)); } $randomtxt=generateRandomString(); dotazSQL("UPDATE sc_profiles SET mail='".$_POST['mail']."', pass_no_verify='".crypt($_POST['pass'],$EDIT_PLAYER)."', mail_verified='$randomtxt' WHERE id=".$EDIT_PLAYER); $resultMAIN = dotazSQL("SELECT * FROM `sc_profiles` WHERE id=".$EDIT_PLAYER); $rowMAIN = mysql_fetch_array($resultMAIN, MYSQL_ASSOC); $lng_html=($lng=='en' ? '' : $lng.'/'); $lng_html=str_replace('cz','cs',$lng_html); $odkaz_mail='http://www.futurocube.com/'.$lng_html.'score/?mailverify='.$randomtxt.'&mail='.$rowMAIN['mail']; //$zprava = "Zažádali jste na serveru $_SERVER[SERVER_NAME] o ověření e-mailové adresy, to učiníte navštívením tohoto odkazu:$odkaz_mail Pokud o služby serveru zájem nemáte, tak tuto zprávu prosím ignorujte."; $zprava = ''.sprintf($lang['MAIL_VERIFY:BODY'],$rowMAIN['nick'],$rowMAIN['serial'].'_'.$rowMAIN['profile'],$odkaz_mail).''; /*$hlavicky = "MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit"; mail($_POST["mail"], "Overeni adresy", $zprava, $hlavicky);*/ SendMail($_POST['mail'], $lang['MAIL_VERIFY:SUBJECT'], $zprava); } } } } $resultMAIN = dotazSQL("SELECT * FROM `sc_profiles` WHERE id=".$EDIT_PLAYER); if (mysql_num_rows($resultMAIN)!=1){ if (isset($_COOKIE['logmail'])) $logmail=$_COOKIE['logmail']; if (isset($_POST['logmail'])) $logmail=$_POST['logmail']; if (!isset($logmail)) $logmail=''; if (isset($msg_login)) echo ''.$msg_login; echo '

E-mail:
'.$lang['MY:PASSWORD'].'

'; if ($EVO) echo 'Připojit kostku'; echo '

'.$lang['HOW_EDIT_PROFILE'].'

'; echo ''; exit; } }else{ // *************** view=PLAYER if (isset($_GET['player_serial'])){ $resultMAIN = dotazSQL("SELECT * FROM `sc_profiles` WHERE CONCAT(serial,'_',profile)='".$_GET['player_serial']."'"); }else{ if (isset($_GET['player_id'])){ $resultMAIN = dotazSQL("SELECT * FROM `sc_profiles` WHERE id=".$_GET['player_id']); }else{ echo $lang['NO_PLAYER'].''; exit; } } if (mysql_num_rows($resultMAIN)!=1){ echo $lang['NO_PLAYER'].''; exit; } } $rowMAIN = mysql_fetch_array($resultMAIN, MYSQL_ASSOC); echo ''; } echo '
'; //IKONA if (!is_null($rowMAIN['icon'])) echo 'icon'; else echo '
unknown'.$lang['EMPTY_ICON_HELP'].'
'; echo '

'; echo $rowMAIN['nick']; if ($rowMAIN['sex']!=0) echo '  '; // PRIDAT DO PRATEL if (($EDIT_PLAYER>-1) && ($EDIT_PLAYER!=$rowMAIN['id'])) { if (isset($_GET['addfriend'])){ $result = dotazSQL("INSERT IGNORE INTO sc_friends (id_profile, friend_serial, friend_profile) VALUES ('".$EDIT_PLAYER."', '".$rowMAIN['serial']."',".$rowMAIN['profile'].')'); } $result = dotazSQL("SELECT * FROM `sc_friends` WHERE friend_serial='".$rowMAIN['serial']."' AND friend_profile=".$rowMAIN['profile']." AND id_profile='$EDIT_PLAYER'"); if (mysql_num_rows($result)==0){ echo ''.$lang['MY_FRIEND_ADD'].''; }else{ echo ''.$lang['MY_FRIEND'].''; } } echo '

'; echo ''; echo ''; echo ''; echo ''; echo ''.'
'.$lang['TAB:SERIAL'].': '.$rowMAIN['serial'].'_'.$rowMAIN['profile'].'
'.$rowMAIN['fw'].' '.$rowMAIN['fw_text'].'
'.$lang['TAB:PLAYER_CREATED'].': '.ScoreDatum($rowMAIN['created']).'
'.$lang['TAB:LAST_UPLOAD'].': '.ScoreDatum($rowMAIN['last_upload']).'
'.''.$lang['HOF'].''.': '; if ($rowMAIN['hof_rank']>0) echo ''.$rowMAIN['hof_rank'].'. '.$lang['IN:PLACE'].' ('.$rowMAIN['hof_points'].' '.$lang['POINTS'].') '; echo '
'.sprintf($lang['TAB:ALL_PLAYERS_ON_CUBE'],'',''); echo '
'; function VLOZ_DO_TABULKY($label,$tex){ if ($tex!='') echo '
'.$label.''.$tex.'
'; VLOZ_DO_TABULKY($lang['TAB:COUNTRY'].":",$rowMAIN['country']); VLOZ_DO_TABULKY($lang['TAB:CITY'].":",$rowMAIN['city']); VLOZ_DO_TABULKY($lang['TAB:BORN'].":",$rowMAIN['born']); VLOZ_DO_TABULKY($lang['TAB:ABOUT'].":",$rowMAIN['about']); //if ($rowMAIN['sex']!=0) echo ''; echo '
Sex:
'; echo ''; if ($EDIT_PLAYER==$rowMAIN['id'] && $_GET['view']=='MY_PROFILE'){ // **************** EDIT PLAYER start ************************* function VLOZ_INPUT_TEXT($name,$label,$size,$za) { $default=$GLOBALS['rowMAIN'][$name]; echo ''.$label.''.$za.''; } function VLOZ_INPUT_AREA($name,$label,$size,$za){ $default=$GLOBALS['rowMAIN'][$name]; echo ''.$label.''.$za.''; } ?> '; echo ''; // (((((((((((((((((((( PROFIL ))))))))))))))))))))))))) echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; if ($COUNTDOWN>-1) { if ($rowMAIN['mail_verified']=='OK'){ echo ''; //}elseif (is_null($rowMAIN['mail_verified'])){ }else{ if (!is_null($rowMAIN['mail_verified'])){ echo ''; echo ''; }else{ echo ''; if (isset($_POST['mail'])) $rowMAIN['mail']=$_POST['mail']; VLOZ_INPUT_TEXT('mail','Mail:','',' '.$msg_mail.''); echo ''; echo ''; } } }else{ echo ''; } if ($rowMAIN['mail_verified']=='OK'){ echo ''; } echo ''; echo ''; echo ''; echo ''; echo ''; //VLOZ_INPUT_TEXT('country','Country:','30',''); //VLOZ_INPUT_TEXT('born','year born:','4',''); echo ''; include 'countries.php'; echo ''; VLOZ_INPUT_TEXT('city',$lang['TAB:CITY'].':','30',''); echo ''; //VLOZ_INPUT_TEXT('sex','sex:','30',''); VLOZ_INPUT_AREA('about',$lang['TAB:ABOUT'].':','5',''); echo ''; //VYPISE KAMARADY $vsichni=''; echo '

'.$lang['MY:LOGIN_TITLE'].'

'.$rowMAIN['mail'].' '.$lang['MY:LOGIN_MAIL_VERIFED'].'

'.$lang['MY:LOGIN_TEXT_2'].'
'.$lang['MY:LOGIN_TEXT_4'].'
'.$lang['MY:LOGIN_TEXT_3'].'
'.$lang['MY:PASSWORD'].' '.$msg_pass.''; //echo '
'.$lang['MY:LOGIN_TEXT_1'].'
'.$lang['MAIL_NEWSLETTER'].' '.$rowMAIN['mail'].':

'.$lang['MY:INFO_TITLE'].'

'.$lang['MY:OPT_WOMAN'].'   '.$lang['MY:OPT_MAN'].'   '.$lang['MY:OPT_EMPTY'].'
'.$lang['TAB:COUNTRY'].':
'.$lang['TAB:BORN'].':
 
'; // (((((((((((((((((((( KAMARADI ))))))))))))))))))))))))) if (isset($_POST['addfriend'])){ $resultFRE = dotazSQL("SELECT serial, profile FROM `sc_profiles` WHERE id='".intval($_POST['addfriend'])."'"); $rowFRE = mysql_fetch_array($resultFRE, MYSQL_ASSOC); dotazSQL("INSERT IGNORE INTO sc_friends (id_profile, friend_serial, friend_profile) VALUES ('".$EDIT_PLAYER."', '".$rowFRE['serial']."',".$rowFRE['profile'].')'); } echo '
'; echo ''; echo '
'; echo $lang['MY:SEND_MAIL_ONOFF']; if ($rowMAIN['mail_verified']!="OK") { echo ' '; echo '
'.$lang['MY:MAIL_NOT_SET'].'
'; }elseif ($rowMAIN['send_mail']==0){ //echo 'VYPNUTO
'; //echo ''; echo ' '; }else{ //echo 'ZAPNUTO
'; //echo ''; echo ' '; } echo '
'; echo '

'.$lang['MY:MY_FRIENDS'].'

'; // Moji kamarádi: //$result = dotazSQL("SELECT *, (SELECT nick FROM sc_profiles WHERE serial=sc_friends.friend_serial AND profile=sc_friends.friend_profile) as nick FROM `sc_friends` WHERE id_profile=$EDIT_PLAYER"); $result = dotazSQL("SELECT nick, icon, friend_profile ,friend_serial FROM `sc_friends` LEFT JOIN sc_profiles ON serial=sc_friends.friend_serial AND profile=sc_friends.friend_profile WHERE id_profile=$EDIT_PLAYER ORDER BY hof_points desc, hof_rank"); echo ''; $poc=0; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $SERI=$row['friend_serial'].'_'.$row['friend_profile']; $poc++; $TD=''.$TD.' style="width:100%">'.$row['nick'].''.$TD.'>'; $vsichni.=';'.$SERI; } if ($poc==0) echo ''.$lang['MY:NO_FRIEND'].''; echo '
'.$TD.'>'; echo 'icon'; echo '
'; if ($vsichni!='') echo '
'.$lang['MY:RANK_MY_FRIENDS'].''; echo '

'.$lang['MY:HAVE_FRIEND'].'

'; //Má mě mezi kamarády: echo ''; $result = dotazSQL("SELECT * FROM sc_profiles WHERE id in (SELECT id_profile FROM `sc_friends` WHERE friend_serial='".$rowMAIN['serial']."' AND friend_profile='".$rowMAIN['profile']."') ORDER BY hof_points desc, hof_rank"); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $poc++; $TD=''.$TD.'>'; echo ''.$row['nick'].'  
'; echo ''.$TD.'>'; $resultFR = dotazSQL("SELECT * FROM `sc_friends` WHERE friend_serial='".$row['serial']."' AND friend_profile=".$row['profile']." AND id_profile='".$rowMAIN['id']."'"); if (mysql_num_rows($resultFR)==0){ echo ''; }else{ echo ''.$lang['MY_FRIEND'].''; } echo ''; } echo '
'.$TD.' style="width:30px">'; echo 'icon'; echo '
'; echo '
'; echo $lang['MY:SEARCH_FRIEND'].": ".''; echo '
'; //TABULKA S POROVNANIM KAMARADU echo '

'.$lang['MY:RANK_FRIENDS'].'

'; //Pořadí mezi kamarády: $result = dotazSQL("SELECT * FROM `sc_scores_best` where id_profile=$EDIT_PLAYER OR id_profile in (SELECT (SELECT id FROM sc_profiles WHERE serial=sc_friends.friend_serial AND profile=sc_friends.friend_profile) as id FROM `sc_friends` WHERE id_profile=$EDIT_PLAYER) ORDER BY id_game, rank"); $id_game=0; $num_game=0; echo ''; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { //$SERI=$row['friend_serial'].'_'.$row['friend_profile']; if ($row['id_game']!=$id_game) { $resultG = dotazSQL("SELECT name_".$lng." as name,flags, public FROM `sc_games` where id=".$row['id_game']); $rowG = mysql_fetch_array($resultG, MYSQL_ASSOC); if ($rowG['public']==0){ if ($id_game!=0) echo '
'; if($num_game++ % 3 ==0) echo ''; echo ''; echo ''; } $id_game=$row['id_game']; $rakloc=1; } if ($rowG['public']==0) { echo ''.$row['nick'].''; echo ''; } } echo '
'.$rowG['name'].'
'; echo $rakloc++.'. '.$row['rank'].'.'; echo ''.ScoreToText($row,$rowG['flags']).'
'; if (!isset($_POST['tab'])) { if ($rowMAIN['mail_verified']=='OK'){ $_POST['tab']="1"; }else{ $_POST['tab']="0"; } } echo ''; echo '
'; // **************** EDIT PLAYER end ************************* } // (((((((((((((((((((( VYSLEDKY ))))))))))))))))))))))))) ?> 0 ORDER BY score desc"); $poc=0; $pocT=0; if ($_GET['view']!='MY_PROFILE') echo $lang['TAB:TITLE_GAMES']; echo ''; echo ''; $TAB_TURNAJE=''; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { //VÝPIS TURNAJŮ start if ($row['tou_active']){ //$resultTOU = dotazSQL("SELECT MAX(SCORE) as score,prim,second,level,achivem,seed FROM sc_scores WHERE id_profile=".$rowMAIN['id']." AND id_game=".$row['id']." AND date BETWEEN '".$row['tou_from']."' AND '".$row['tou_to']."' GROUP BY id_game,id_profile"); $resultTOU = dotazSQL("SELECT score,prim,second,level,achivem,seed FROM sc_scores WHERE id_profile=".$rowMAIN['id']." AND id_game=".$row['id']." AND date BETWEEN '".$row['tou_from']."' AND '".$row['tou_to']."' ORDER BY score desc, date LIMIT 1"); $rowTOU = mysql_fetch_array($resultTOU, MYSQL_ASSOC); if (!is_null($rowTOU['score'])){ //MA SKORE V TURNAJI $pocT++; $TD=''; $TAB_TURNAJE.= $TD.'>'.$row['tou_name'].''; $TAB_TURNAJE.= '
'.datumzSQL($row['tou_from'],'j.n.Y G:i','j.n.Y').' - '.datumzSQL($row['tou_to'],'j.n.Y G:i','j.n.Y').''; $TAB_TURNAJE.= $TD.'>'.$row['name_'.$lng].' v'.$row['game_ver'].''; $TAB_TURNAJE.= $TD.'>'.ScoreToText($rowTOU,$row['flags']).''; } } //VÝPIS TURNAJŮ end $poc++; $TD=''; //IKONA start echo $TD.' style="vertical-align:top;padding-top:2px">'; if (!is_null($row['icon'])){ echo 'icon'; }else{ echo ' '; } echo ''; //IKONA end echo $TD.' style="vertical-align:top;padding-top:20px">'.$row['name_'.$lng].' v'.$row['game_ver'].''; if ($row['public'] & 1) echo '
'.$lang['TAB:GAME_DENIED_NEW_SCORE']; echo ''; echo $TD; if ($row['rank']<5) { echo ' style="vertical-align:top;padding-top:5px;text-align:center;">'.$row['rank'].'.'.''; echo 'icon'; }else{ echo ' style="vertical-align:top;padding-top:20px;text-align:center;">'.$row['rank'].'.'; } echo ''.$TD.' style="vertical-align:top;padding-top:20px;text-align:center;">'; if ($row['rank']<=100) echo (POW(100-($row['rank']-1),2)); echo ' '.$TD.'>'; echo '
 '.$lang['TAB:GAME'].''.$lang['TAB:RANK'].''.$lang['TAB:HOF_POINTS'].''.$lang['TAB:SCORE'].'
pohar'; $TAB_TURNAJE.= $TD.'>'.(is_null($row['icon']) ? ' ': 'icon').'
0) $TD=''; //Ikona turnaje //echo $TD.' style="vertical-align:top;padding-top:10px">'; //echo $TD.'> 
'.ScoreToText($row,$row['flags']).' '.ScoreDatum($row['date']).'
'; //echo $TD.'>'; $resultDETAIL = dotazSQL("SELECT * FROM sc_scores WHERE sc_scores.id_profile=".$rowMAIN['id']." AND id_game=".$row['id']." ORDER BY score desc, date"); $poc2=0; echo ''; while ($rowDETAIL = mysql_fetch_array($resultDETAIL, MYSQL_ASSOC)) { echo ''; if (mysql_num_rows($resultDETAIL)==1) echo ''; } echo ''; echo ''.$TD.' style="vertical-align:top;">
'.$lang['TAB:SCORE_MORE'].'
'; } echo ''; if ($_GET['view']!='MY_PROFILE') echo $lang['TAB:TITLE_TOURN']; echo ''; echo ''; echo $TAB_TURNAJE.'
  '.$lang['TOURNAMENT'].''.$lang['TAB:GAME'].''.$lang['TAB:SCORE'].'
'; if ($_GET['view']!='MY_PROFILE') echo '
'; // ****************************************************************************** }elseif ($_GET['view']=='GAME'){ //echo '

MENU A

'; if (isset($_GET['player_serial'])){ $result = dotazSQL("SELECT * FROM `sc_profiles` WHERE CONCAT(serial,'_',profile)='".$_GET['player_serial']."'"); $row = mysql_fetch_array($result, MYSQL_ASSOC); if (mysql_num_rows($result)==1) $_GET['player_id']=$row['id']; } //$result = dotazSQL("SELECT *, MAX(score) FROM `sc_scores` INNER JOIN sc_profiles ON sc_scores.id_profile=sc_profiles.id where id_game=".$_GET['id']." GROUP BY id_profile ORDER BY score DESC"); if(isset($_GET['game_hash'])) { $resultH = dotazSQL("SELECT id_game FROM `sc_games_hash` WHERE hash='".$_GET['game_hash']."'"); if (mysql_num_rows($resultH)==1) $_GET['game_id']=mysql_result($resultH, 0); } if (isset($_GET['game_id'])){ $resultMAIN = dotazSQL("SELECT * FROM `sc_games` WHERE id=".$_GET['game_id']); }else{ echo $lang['NO_GAME'].''; exit; } if (mysql_num_rows($resultMAIN)!=1){ echo $lang['NO_GAME'].''; exit; } $rowMAIN = mysql_fetch_array($resultMAIN, MYSQL_ASSOC); ?> '; //IKONA if (!is_null($rowMAIN['icon'])) echo 'icon'; echo '

'; echo $rowMAIN['name_'.$lng]. ' v'.$rowMAIN['game_ver'].'

'; echo '
'; echo '

'.$rowMAIN['description_'.$lng]; echo '

'; ?> Hashe přiřazené tého hře:
'; while ($rowH = mysql_fetch_array($resultH, MYSQL_ASSOC)) { echo $rowH['hash'].' '.GameVer($rowH['game_ver']).' Created '.$rowH['created'].'
'; } */ echo '

'; if ($rowMAIN['public']>=8) echo 'no public
'; if ($rowMAIN['public'] & 1) echo ''.$lang['TAB:GAME_DENIED_NEW_SCORE'].'
'; echo '

'; //Pocet zaznamu $zaznamu_na_stranku=80; if (isset($_GET['player_id'])){ //Kdyz ma zobrazit hrace, zjisti na ktere strance je $result = dotazSQL("SELECT rank FROM `sc_scores_best` WHERE id_game=".$rowMAIN['id']." AND id_profile='".$_GET['player_id']."'"); $row = mysql_fetch_array($result, MYSQL_ASSOC); $_GET['side']=intval(1+($row['rank']-1)/$zaznamu_na_stranku); //&side='.intval(1+($row['rank']-1)/80). //if (mysql_num_rows($result)==1) $_GET['player_id']=$row['id']; } //side if (!isset($_GET['side'])) $_GET['side']=1; if ($_GET['side']<1) $_GET['side']=1; $result = dotazSQL("SELECT COUNT(*) FROM `sc_scores_best` WHERE id_game=".$rowMAIN['id']); $pocet_zaznamu=mysql_result($result, 0); $result = dotazSQL("SELECT * FROM `sc_scores_best` WHERE id_game=".$rowMAIN['id']." ORDER BY rank limit ".(($_GET['side']-1)*$zaznamu_na_stranku).",".$zaznamu_na_stranku); //Next/Prev side echo '
'; echo ''; echo ''; echo ''.$lang['PAGE'].':'; echo ''; echo ''.$_GET['side'].'/'.(1+(intval(($pocet_zaznamu-1)/$zaznamu_na_stranku))).''; echo '=($pocet_zaznamu/$zaznamu_na_stranku) ? ' disabled' :'').'>'; echo '
'; //Next/Prev side end //$result = dotazSQL("SELECT * FROM `sc_scores_best` WHERE id_game=".$rowMAIN['id']." ORDER BY rank limit 80"); echo ''; echo ''; $poc=0; if (!isset($_GET['player_id'])) $_GET['player_id']=-1; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $poc++; $TD=''; echo $TD.' center">'.$row['rank'].'.'; echo $TD.' right">'.ScoreToText($row,$rowMAIN['flags']).' '; echo $TD.' center">'.ScoreDatum($row['date']).''; } echo '
'.$lang['TAB:PLAYER'].''.$lang['TAB:RANK'].''.$lang['TAB:SCORE'].''.$lang['TAB:SCORE_DATE'].'
'.$TD.'">'.$TD.'">'.$TD.'">'.$row['nick'].'
'; // ****************************************************************************** }elseif ($_GET['view']=='TOURNAMENTS'){ echo 'pohar'; printf ($lang['TOURNAMENT_EXPL'],'
 
','
 
','
 
','
'); //$poc=0; $resultMAIN = dotazSQL("SELECT *, IF(CURRENT_TIMESTAMP'; echo '  '.$lang['TAB:GAME'].''.$lang['TAB:TOURN_FROM_TO'].''.$lang['TAB:TOP_SCORE'].''; while ($rowMAIN = mysql_fetch_array($resultMAIN, MYSQL_ASSOC)) { $TD=''; //IKONA start echo $TD.'">'; if (!is_null($rowMAIN['icon'])){ echo 'icon'; }else{ echo ' '; } echo ''; //IKONA end echo $TD.'">'; echo ''.$rowMAIN['tou_name'].''; if ($rowMAIN['public'] & 1) echo '
'.$lang['TAB:GAME_DENIED_NEW_SCORE']; echo ''; echo $TD.'">'; //echo ''.$rowMAIN['name_'.$lng].' v'.GameVer($rowMAIN['game_ver']).''; echo $rowMAIN['name_'.$lng].' v'.$rowMAIN['game_ver']; echo ''; //echo $TD.'">'.$rowMAIN['name_'.$lng].''; echo $TD.' center">'.datumzSQL($rowMAIN['tou_from'],'j.n.y G:i','j.n.y').' - '.datumzSQL($rowMAIN['tou_to'],'j.n.y G:i','j.n.y').''; echo $TD.'">'; $where="id_game=".$rowMAIN['id']." AND date BETWEEN '".$rowMAIN['tou_from']."' AND '".$rowMAIN['tou_to']."'"; $result = dotazSQL("SELECT id_game,id_profile, score,prim,second,level,achivem,seed,date, (SELECT nick FROM sc_profiles WHERE id=t1.id_profile) as nick FROM sc_scores as t1 WHERE ".$where." AND score=(SELECT MAX(score) FROM sc_scores WHERE ".$where." AND t1.id_profile=id_profile ) GROUP BY id_profile ORDER BY score DESC, date, id_profile limit 3"); $poc=0; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $poc++; echo $poc.'. '.ScoreToText($row,$rowMAIN['flags']).' '.$row['nick'].'
'; } echo ''; } echo ''; // ****************************************************************************** }elseif ($_GET['view']=='TOURNAMENT'){ if(isset($_GET['game_hash'])) { $resultMAIN = dotazSQL("SELECT * FROM `sc_games` WHERE hash='".$_GET['game_hash']."'"); }else{ if (isset($_GET['game_id'])){ $resultMAIN = dotazSQL("SELECT * FROM `sc_games` WHERE id=".$_GET['game_id']); }else{ echo $lang['NO_GAME'].''; exit; } } if (isset($_GET['player_serial'])){ $result = dotazSQL("SELECT * FROM `sc_profiles` WHERE CONCAT(serial,'_',profile)='".$_GET['player_serial']."'"); $row = mysql_fetch_array($result, MYSQL_ASSOC); if (mysql_num_rows($result)==1) $_GET['player_id']=$row['id']; } if (mysql_num_rows($resultMAIN)!=1){ echo $lang['NO_GAME'].''; exit; } $rowMAIN = mysql_fetch_array($resultMAIN, MYSQL_ASSOC); echo '
'; //IKONA if (!is_null($rowMAIN['icon'])) echo 'icon'; echo '

'; echo $rowMAIN['tou_name'].'

'; echo datumzSQL($rowMAIN['tou_from'],'j.n.Y G:i','j.n.Y').' - '.datumzSQL($rowMAIN['tou_to'],'j.n.Y G:i','j.n.Y').'
'; echo '

'.$rowMAIN['tou_description'].'

'; echo '

'.$lang['TOURNAMENT_LINK_TO_GAME'].' '; echo ''.$rowMAIN['name_'.$lng].''; if ($rowMAIN['public']>=8) echo '

no public
'; if ($rowMAIN['public'] & 1) echo '

'.$lang['TAB:GAME_DENIED_NEW_SCORE'].'
'; echo '

'; echo '

'.$lang['TOURNAMENT_TABLE'].'

'; $where="id_game=".$rowMAIN['id']." AND date BETWEEN '".$rowMAIN['tou_from']."' AND '".$rowMAIN['tou_to']."'"; $result = dotazSQL("SELECT id_game,id_profile, score,prim,second,level,achivem,seed,date, (SELECT nick FROM sc_profiles WHERE id=t1.id_profile) as nick FROM sc_scores as t1 WHERE ".$where." AND score=(SELECT MAX(score) FROM sc_scores WHERE ".$where." AND t1.id_profile=id_profile ) GROUP BY id_profile ORDER BY score DESC, date, id_profile"); echo ''; echo ''; $poc=0; if (!isset($_GET['player_id'])) $_GET['player_id']=-1; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $poc++; $TD=''; echo $TD.' center">'.$poc.'.'; echo $TD.'">'.ScoreToText($row,$rowMAIN['flags']).' '; echo $TD.' center">'.ScoreDatum($row['date']).''; } echo '
'.$lang['TAB:PLAYER'].''.$lang['TAB:RANK'].''.$lang['TAB:SCORE'].''.$lang['TAB:SCORE_DATE'].'
'.$TD.'">'.$TD.'">'.$row['nick'].'
'; // ****************************************************************************** }elseif ($_GET['view']=='HOF'){ $result = dotazSQL("SELECT * FROM sc_profiles WHERE hof_rank>0 AND active>0 ORDER BY hof_rank desc"); echo 'icon'; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { if (is_null($row['icon'])) $row['icon']="img/unknown.gif"; //if (is_null($row['icon'])) $row['icon']="http://lorempixel.com/400/200/?".$row['hof_rank']; $i=$row['hof_rank']; switch ($i){ case 1: HOFprofil(314,292,1,$row,false); break; case 2: HOFprofil(150,322,1,$row,false); break; case 3: HOFprofil(480,350,1,$row,false); break; //Had ridci case ($i<20): HOFprofil(630+(240*sin(($i-4)/5)),320+(90*cos(($i-4)/5)),1-$i/40,$row); break; case ($i<34): HOFprofil(630-(240*sin(($i-20)/7)),200+(30*cos(($i-20)/7)),1-$i/34,$row); break; //Had ridci end /*case ($i<20): HOFprofil(300+$i*3,630 + sqrt(($i-4)*5000),1-$i/20,$row); break;*/ /*case ($i<40): HOFprofil(630+(240*sin(($i-4)/12)),220+(90*cos(($i-4)/12)),1-$i/60,$row); break;*/ /* case ($i<60): HOFprofil((470-(sqrt($i)-60)*10),63-(70*cos((sqrt($i)-4)/12)),1-$i/60,$row); //HOFprofil((470-($i-60)*10),63-(70*cos(($i-4)/12)),1-$i/60,$row); break;*/ } } // echo 'Přehled všech hráčů v síni slávy ZDE'; echo 'TEST
'; printf ($lang['HOF_LINK_TO_TABLE'],'').''; // ****************************************************************************** }elseif ($_GET['view']=='HELP'){ echo $lang['HELP_TEXT']; } ?>