The Arcade issue.

Home › Forums › Club Information › General Discussion › The Arcade issue.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1237
    Adam Faulkner
    Participant

    I 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

    | http://www.e107.org/

    |

    | ©Stephen Sherlock

    | http://www.krooze.net/

    | 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 .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘.KROOZEARCADE_70.’: ‘.$result[‘game_title’].’
    ‘.KROOZEARCADE_41.’: ‘.$result[‘game_description’].’
    ‘.KROOZEARCADE_42.’: ‘.$result[‘game_controls’].’
    ‘.KROOZEARCADE_68.’: ‘.$result[‘times_played’].’
    ‘;

    if ($result[‘game_enable’] == ‘0’) {

    $text .= ”.KROOZEARCADE_91.’!’;

    } else {

    $text .= ”.KROOZEARCADE_83.”;

    }

    $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 .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘.KROOZEARCADE_93.’ ‘.(date(‘M’, mktime(0, 0, 0, (date(‘m’, time())-1), 1, (date(‘Y’, time()))))).’: ‘.$result[‘user_name’].’
    ‘.KROOZEARCADE_94.’: ‘.$result[‘score’].’
    ‘.KROOZEARCADE_95.’: ‘.$datescored.’

    ‘;

    }

    $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 .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘.KROOZEARCADE_93.’ ‘.(date(‘M’, mktime(0, 0, 0, (date(‘m’, time())-1), 1, (date(‘Y’, time()))))).’: ‘.$result[‘user_name’].’
    ‘.KROOZEARCADE_94.’: ‘.$result[‘score’].’
    ‘.KROOZEARCADE_95.’: ‘.$datescored.’

    ‘;

    }

    $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 .= ‘

    ‘;

     

    for ($i=0; $i

    $result = $sql->db_fetch();

    $datescored = date(‘d/m/Y H:i’, $result[‘date_scored’]);

    $text .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘;

    $text .= ‘

    ‘;

    }

    $text .= ‘

    ‘.KROOZEARCADE_100.’ ‘.KROOZEARCADE_101.’ ‘.KROOZEARCADE_87.’ ‘.KROOZEARCADE_95.’
    ‘.($i+1).’ ‘.$result[‘user_name’].’ ‘.$result[‘score’].’ ‘.$datescored.’

    ‘;

    }

     

    $title = ‘‘.$result[‘game_title’].’ ‘.KROOZEARCADE_102.’‘;

    $ns->tablerender($title, $text);

     

    require_once(FOOTERF);

    ?>

     

     

     

    $ = $ i dont know why it does that.

     

     

    phpmyadmin.bmp

    [ Edited ]

    #9838
    Adam Faulkner
    Participant

    i 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 :)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.