Home › Forums › Club Information › General Discussion › The Arcade issue.
- This topic has 1 reply, 1 voice, and was last updated 20 years, 7 months ago by
Adam Faulkner.
-
AuthorPosts
-
March 22, 2006 at 1:17 pm #1237
Adam FaulknerParticipantI am sure that the problem is right here. But i dont see anything wrong with it. Help me out.
<?php
/*
+---------------------------------------------------------------+
| KroozeArcade for e107 v0.7
| Compatible with all games from www.ibproarcade.com
|
| A plugin for the e107 website system
|
| ©Stephen Sherlock
| aterlatus@krooze.net
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
+---------------------------------------------------------------+
*/
require_once('../../class2.php');
require_once(HEADERF);
require_once('language/'.e_LANGUAGE.'.php');
// Print navigation menu
$text = '';
$text .= ''.KROOZEARCADE_1.'';
if (isset($_GET['catid'])) {
$sql->mySQLresult = @mysql_query('SELECT category_name FROM '.MPREFIX.'arcade_categories WHERE cat_id=''.$_GET['catid'].'';');
$row = $sql->db_Fetch();
$text .= ' --> '.$row['category_name'].'';
}
if (isset($_GET['gameid'])) {
$sql->mySQLresult = @mysql_query('SELECT game_title FROM '.MPREFIX.'arcade_games WHERE game_id=''.$_GET['gameid'].'';');
$row = $sql->db_Fetch();
$text .= ' --> '.$row['game_title'].'';
}
$title = '[b]'.KROOZEARCADE_38.'[/b]';
$ns -> tablerender($title, $text);
$text = '';
if (isset($_GET['gameid'])) { $_POST['gameid'] = $_GET['gameid']; }
if (isset($_GET['playing_game'])) {
$sql->mySQLresult = @mysql_query('UPDATE '.MPREFIX.'arcade_games SET times_played = times_played + 1 WHERE game_id = ''.$_POST['gameid'].'';');
$text .= ''.KROOZEARCADE_89.'';
} elseif (!isset($_POST['gameid'])) {
$text = ''.KROOZEARCADE_90.'!';
} else {
$sql->db_Select('arcade_games WHERE game_id=''.$_POST['gameid'].''', 'game_filename, game_title, game_description, game_controls, times_played, game_enable, display_height, display_width');
$result = $sql->db_Fetch();
$text .= '
‘;
$text .= ‘
‘.KROOZEARCADE_70.’: ‘.$result[‘game_title’].’ ‘;
$text .= ‘
‘.KROOZEARCADE_41.’: ‘.$result[‘game_description’].’ ‘;
$text .= ‘
‘.KROOZEARCADE_42.’: ‘.$result[‘game_controls’].’ ‘;
$text .= ‘
‘.KROOZEARCADE_68.’: ‘.$result[‘times_played’].’ ‘;
$text .= ‘
‘; if ($result[‘game_enable’] == ‘0’) {
$text .= ”.KROOZEARCADE_91.’!’;
} else {
$text .= ”.KROOZEARCADE_83.”;
}
$text .= ‘
‘;
$text .= ‘
‘;
}
$title = ‘‘.KROOZEARCADE_38.’ – ‘.KROOZEARCADE_82.’‘;
$ns -> tablerender($title, $text);
// Get score order
$sql->db_select(‘arcade_games WHERE game_id=”.$_POST[‘gameid’].”’, ‘reverse_score_order’);
$result = $sql->db_Fetch();
if ($result[‘reverse_score_order’] == 1) {
$scoreorder = ‘ASC’;
} else {
$scoreorder = ‘DESC’;
}
// Highest score of all time
$text = ”;
$monthstart = mktime(0, 0, 0, (date(‘m’, time())-1), 1, (date(‘Y’, time())));
$monthend = mktime(23, 59, 59, (date(‘m’, time())), 0, (date(‘Y’, time())));
$sql->mySQLresult = @mysql_query(‘SELECT c.score, c.date_scored, g.game_title, u.user_name, g.game_filename FROM ‘.MPREFIX.’arcade_champs c, ‘.MPREFIX.’user u, ‘.MPREFIX.’arcade_games g WHERE g.game_id=”.$_POST[‘gameid’].” and c.game_id=”.$_POST[‘gameid’].” and c.user_id = u.user_id ORDER BY c.score ‘.$scoreorder.’ LIMIT 0,1;’);
$rows = $sql->db_Rows();
if ($rows == 0) {
$text .= KROOZEARCADE_92.’!’;
} else {
$result = $sql->db_fetch();
$datescored = date(‘d/m/Y H:i’, $result[‘date_scored’]);
$text .= ‘
‘;
$text .= ‘
‘.KROOZEARCADE_93.’ ‘.(date(‘M’, mktime(0, 0, 0, (date(‘m’, time())-1), 1, (date(‘Y’, time()))))).’: ‘.$result[‘user_name’].’ ‘;
$text .= ‘
‘.KROOZEARCADE_94.’: ‘.$result[‘score’].’ ‘;
$text .= ‘
‘.KROOZEARCADE_95.’: ‘.$datescored.’ ‘;
$text .= ‘
‘;
}
$title = ‘‘.KROOZEARCADE_96.’ ‘.$result[‘game_title’].’‘;
$ns->tablerender($title, $text);
// Display highest score last month
$text = ”;
$monthstart = mktime(0, 0, 0, (date(‘m’, time())-1), 1, (date(‘Y’, time())));
$monthend = mktime(23, 59, 59, (date(‘m’, time())), 0, (date(‘Y’, time())));
$sql->mySQLresult = @mysql_query(‘SELECT s.score, s.date_scored, g.game_title, u.user_name, g.game_filename FROM ‘.MPREFIX.’arcade_scores s, ‘.MPREFIX.’user u, ‘.MPREFIX.’arcade_games g WHERE g.game_id=”.$_POST[‘gameid’].” and s.game_id=”.$_POST[‘gameid’].” and s.user_id = u.user_id and s.date_scored > ‘.$monthstart.’ and s.date_scored
$rows = $sql->db_Rows();
if ($rows == 0) {
$text .= KROOZEARCADE_97.’ ‘.(date(‘M’, mktime(0, 0, 0, (date(‘m’, time())-1), 1, (date(‘Y’, time()))))).’!’;
} else {
$result = $sql->db_fetch();
$datescored = date(‘d/m/Y H:i’, $result[‘date_scored’]);
$text .= ‘
‘;
$text .= ‘
‘.KROOZEARCADE_93.’ ‘.(date(‘M’, mktime(0, 0, 0, (date(‘m’, time())-1), 1, (date(‘Y’, time()))))).’: ‘.$result[‘user_name’].’ ‘;
$text .= ‘
‘.KROOZEARCADE_94.’: ‘.$result[‘score’].’ ‘;
$text .= ‘
‘.KROOZEARCADE_95.’: ‘.$datescored.’ ‘;
$text .= ‘
‘;
}
$title = ‘‘.KROOZEARCADE_98.’ ‘.$result[‘game_title’].’‘;
$ns->tablerender($title, $text);
// Display high score table
$text = ”;
$monthstart = mktime(0, 0, 0, (date(‘m’, time())), 1, (date(‘Y’, time())));
$sql->mySQLresult = @mysql_query(‘SELECT s.score, s.date_scored, g.game_title, u.user_name FROM ‘.MPREFIX.’arcade_scores s, ‘.MPREFIX.’user u, ‘.MPREFIX.’arcade_games g WHERE g.game_id=”.$_POST[‘gameid’].” and s.game_id=”.$_POST[‘gameid’].” and s.user_id = u.user_id and s.date_scored > ‘.$monthstart.’ ORDER BY s.score ‘.$scoreorder.’ LIMIT 0,10;’);
$rows = $sql->db_Rows();
if ($rows == 0) {
$text .= KROOZEARCADE_99.’ ‘.$result[‘game_title’].’ ‘.KROOZEARCADE_79.’.’;
} else {
$text .= ‘
‘;
$text .= ‘
‘.KROOZEARCADE_100.’ ‘.KROOZEARCADE_101.’ ‘.KROOZEARCADE_87.’ ‘.KROOZEARCADE_95.’ ‘;
for ($i=0; $i
$result = $sql->db_fetch();
$datescored = date(‘d/m/Y H:i’, $result[‘date_scored’]);
$text .= ‘
‘; $text .= ‘
‘.($i+1).’ ‘;
$text .= ‘
‘.$result[‘user_name’].’ ‘;
$text .= ‘
‘.$result[‘score’].’ ‘;
$text .= ‘
‘.$datescored.’ ‘;
$text .= ‘
‘;
}
$text .= ‘
‘;
}
$title = ‘‘.$result[‘game_title’].’ ‘.KROOZEARCADE_102.’‘;
$ns->tablerender($title, $text);
require_once(FOOTERF);
?>
$ = $ i dont know why it does that.

[ Edited ]
March 22, 2006 at 1:22 pm #9838
Adam FaulknerParticipanti would have said that it would be because the database isnt allowing the input of a number 2*** but it doesnt seem to be the case because you can have an integer (11) and im no expert on php by far so im just going to ask for help before i go mess it all up

-
AuthorPosts
- You must be logged in to reply to this topic.