ChanceAce Game- 404 error when trying to admin

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   ChanceAce Game- 404 error when trying to admin
nicruisin
CZ Active Member
nicruisin has been a member for over 20 year's 20 Year Member
uk.gif
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Feb 06, 2004
0.02 posts per day
Posts: 119
Points: 6,632
   
Hi, sorry my first post is a problem! icon_redface.gif

I was trying to install the ChanceAce game for the forums and everything went ok, I had to use the sql I found in another post (maybe that has somewthing to do with it?) but when I go to Forums Admin and click on the link for ChancesAce it gives me a 404 error but it is definately pointing to the right file and the file is there! icon_rolleyes.gif

I'm lost on this one and really want to bump up the cost of playing! icon_biggrin.gif

thanks in advance, ps good work guys I got some really cool stuff here! icon_mrgreen.gif



Back to top Reply with quote
#2   re: ChanceAce Game- 404 error when trying to admin
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Open the admin_chanceace file and look for the following:

if( $userdata['user_level'] != ADMIN )
{
   message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}


The auth is checked by the Forums>admin main page so this isnt needed. For some reason it causes errors on some sites.

Delete it and it should work fine now.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: ChanceAce Game- 404 error when trying to admin
nicruisin
CZ Active Member
nicruisin has been a member for over 20 year's 20 Year Member
uk.gif
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Feb 06, 2004
0.02 posts per day
Posts: 119
Points: 6,632
   
icon_redface.gif

Oh dear that didn't work for me still giving me an error?

Any others ideas?

I'll try a fresh install of it sometimes that sorts out problems for me icon_rolleyes.gif

Just in case it doesn't work and again sorry about this but where in the code can I change the max bet cos at the end of the day I think that that's all I need to do. icon_biggrin.gif

Thanx



Back to top Reply with quote
#4   re: ChanceAce Game- 404 error when trying to admin
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Attach the admin_chanceace.php I will try it out.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: ChanceAce Game- 404 error when trying to admin
nicruisin
CZ Active Member
nicruisin has been a member for over 20 year's 20 Year Member
uk.gif
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Feb 06, 2004
0.02 posts per day
Posts: 119
Points: 6,632
   
Thanks again for this! icon_redface.gif

The link it is trying to send me to is:
/html/modules/Forums/admin/login.php?redirect=admin/admin_chanceace.php&sid=ea6127e69903926c5e79718ddd705111 [/quote]

This is a copy of the admin_chanceace.php
[quote]<?php
/***************************************************************************
*                           admin_chancemachine.php
*                            -------------------
*
***************************************************************************/

/***************************************************************************
*
*   copyright (C) 2002/2003  tHe LiNk
*
*   This program is free software; you can redistribute it and/or
*   modify it under the terms of the GNU General Public License
*   as published by the Free Software Foundation; either version 2
*   of the License, or (at your option) any later version.
*
*   This program is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details.
*
*   http://www.gnu.org/copyleft/gpl.html
*
***************************************************************************/

define('IN_PHPBB', 1);

if(   !empty($setmodules) )
{
   $file = basename(__FILE__);
   $module['Users']['Chance Ace'] = $file;
   return;
}

//
// Lets set the root dir for phpBB
//
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx);
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_chanceace.' . $phpEx);
//
//check for userlevel
//
if( !$userdata['session_logged_in'] )
{
   header('Location: ' . append_sid("login.$phpEx?redirect=admin/admin_chanceace.$phpEx", true));
}


// ChanceAce Admin

if ($_POST['process'] != 'Submit') {

   if ($board_config['chance_onoff'] == 'on') {
      $chanceon = 'checked';
      $chanceoff = '';
   }
   if ($board_config['chance_onoff'] == 'off') {
      $chanceon = '';
      $chanceoff = 'checked';
   }

   $overall = '<form method="POST" action="'.append_sid("admin_chanceace.$phpEx").'">
   <table width="100%" cellpadding="4" cellspacing="1" border="0">
     <tr>
      <th width="50%"  class="thHead" colspan="2"><center>'.$lang['admin_chanceconfig'].'</center></th>
     </tr>
     <tr>
      <td width="75%" class="row1">'.$lang['admin_playprice'].'</td>
      <td width="25%" class="row2"><input type="text" name="playprice" size="20" value="'.$board_config['chance_playprice'].'"></td>
     </tr>
     <tr>
      <td width="75%" class="row1">'.$lang['admin_aceofclubs'].'</td>
      <td width="25%" class="row2"><input type="text" name="aceofclubs" size="20" value="'.$board_config['chance_aceofclubs'].'"></td>
     </tr>
     <tr>
      <td width="75%" class="row1">'.$lang['admin_aceofdiamonds'].'</td>
      <td width="25%" class="row2"><input type="text" name="aceofdiamonds" size="20" value="'.$board_config['chance_aceofdiamonds'].'"></td>
     </tr>
     <tr>
      <td width="75%" class="row1">'.$lang['admin_aceofhearts'].'</td>
      <td width="25%" class="row2"><input type="text" name="aceofhearts" size="20" value="'.$board_config['chance_aceofhearts'].'"></td>
     </tr>
     <tr>
      <td width="75%" class="row1">'.$lang['admin_aceofspades'].'</td>
      <td width="25%" class="row2"><input type="text" name="aceofspades" size="20" value="'.$board_config['chance_aceofspades'].'"></td>
     </tr>
     <tr>
      <td width="75%" class="row1">'.$lang['admin_2hit'].'</td>
      <td width="25%" class="row2"><input type="text" name="minorprize" size="20" value="'.$board_config['chance_minorprize'].'"></td>
     </tr>
     <tr>
      <td width="75%" class="row1">'.$lang['admin_onoff'].'</td>
      <td width="25%" class="row2"><input type="radio" name="R1" value="on" '.$chanceon.'><input type="radio" name="R1" value="off" '.$chanceoff.'></td>
     </tr>
     <tr>
      <td width="50%"  class="catBottom" colspan="2"><center><input type="submit" value="'.$lang['admin_submit'].'" name="process" size="20" class="button"></form></center></td>
     </tr>
   </table>
';
}
if ($_POST['process'] == 'Submit') {

   if ($_POST['R1'] == 'on') {
      $sql = "update " . CONFIG_TABLE . " set config_value='on' where config_name='chance_onoff'";
      if ( !($db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating chance machine config<br>'.mysql_error()); }
   }

   if ($_POST["R1"] == "off") {
      $sql = "update " . CONFIG_TABLE . " set config_value='off' where config_name='chance_onoff'";
      if ( !($db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating chance machine config<br>'.mysql_error()); }
   }
   if ($_POST['playprice'] != NULL) {
      $sql = "update " . CONFIG_TABLE . " set config_value='{$_POST['playprice']}' where config_name='chance_playprice'";
      if ( !($db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating chance machine config<br>'.mysql_error()); }
   }
   if ($_POST['aceofclubs'] != NULL) {
      $sql = "update " . CONFIG_TABLE . " set config_value='{$_POST['aceofclubs']}' where config_name='chance_aceofclubs'";
      if ( !($db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating chance machine config<br>'.mysql_error()); }
   }
   if ($_POST['aceofdiamonds'] != NULL) {
      $sql = "update " . CONFIG_TABLE . " set config_value='{$_POST['aceofdiamonds']}' where config_name='chance_aceofdiamonds'";
      if ( !($db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating chance machine config<br>'.mysql_error()); }
   }
   if ($_POST['aceofhearts'] != NULL) {
      $sql = "update " . CONFIG_TABLE . " set config_value='{$_POST['aceofhearts']}' where config_name='chance_aceofhearts'";
      if ( !($db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating chance machine config<br>'.mysql_error()); }
   }
   if ($_POST['aceofspades'] != NULL) {
      $sql = "update " . CONFIG_TABLE . " set config_value='{$_POST['aceofspades']}' where config_name='chance_aceofspades'";
      if ( !($db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating chance machine config<br>'.mysql_error()); }
   }
   if ($_POST['minorprize'] != NULL) {
      $sql = "update " . CONFIG_TABLE . " set config_value='{$_POST['minorprize']}' where config_name='chance_minorprize'";
      if ( !($db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Updating chance machine config<br>'.mysql_error()); }
   }

   $overall = '
   <table width="100%" cellpadding="4" cellspacing="1" border="0">
     <tr>
      <th width="50%"  class="thHead" colspan="2"><center>'.$lang['admin_chanceconfig'].'</center></th>
     </tr>
     <tr>
      <td class="row1" width="100%">'.$lang['admin_updated'].'. | <b><a href="'.append_sid("admin_chanceace.$phpEx").'">'.$lang['admin_return'].'</a></b></td>
     </tr>
   </table>';

}




// END chance MACHINE ADMIN

$template->assign_vars(array(
   'OVERALL' => "$overall",
   'TTL' => $lang['chance_title'],
   'DESC' => $lang['admin_desc'],
));
$template->set_filenames(array(
   'body' => 'admin/chance_config.tpl')
);
//
// Generate the page
//
$template->pparse('body');

include('page_footer_admin.' . $phpEx);


?>


Thanks


Back to top Reply with quote
#6   re: ChanceAce Game- 404 error when trying to admin
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Delete this from it:

if( !$userdata['session_logged_in'] )
{
header('Location: ' . append_sid("login.$phpEx?redirect=admin/admin_chanceace.$phpEx", true));
}



You dont need to check auth at that point the Forums admin does it anyways.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#7   re: ChanceAce Game- 404 error when trying to admin
nicruisin
CZ Active Member
nicruisin has been a member for over 20 year's 20 Year Member
uk.gif
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Feb 06, 2004
0.02 posts per day
Posts: 119
Points: 6,632
   
icon_biggrin.gif icon_biggrin.gif icon_biggrin.gif icon_biggrin.gif icon_biggrin.gif icon_biggrin.gif icon_biggrin.gif

Hey hey, that's her sweet now!

Thanks v much! icon_mrgreen.gif




_________________


[ Register or login to view links on this board.] [color=red]Cars, babes and cruisin' from the maddest palce of them all... Northern Ireland!
Back to top Reply with quote
#8   re: ChanceAce Game- 404 error when trying to admin
hubson
CZ Newbie
hubson has been a member for over 20 year's 20 Year Member
uk.gif
Age: 49
Gender: Male
Status: Offline
Joined: May 04, 2004
0.00 posts per day
Posts: 14
Points: 50
AIM Address Yahoo Messenger MSN Messenger 
Hi I hope you can help me, I am having this message come up when I try and install

Parse error: parse error in /home/ussmonar/public_html/forums/modules/Forums/chanceace_install.php on line 21



Back to top Reply with quote
#9   re: ChanceAce Game- 404 error when trying to admin
DaveTomneyUK
CZ Active Member
uk.gif
Occupation: PC Technician
Age: 50
Gender: Male
Website:
Status: Offline
Joined: Oct 23, 2003
0.03 posts per day
Posts: 201
Points: 23,202
AIM Address Yahoo Messenger  
What is on line 21 of your install file paste the contents here or send me the file and i'll fix it for you, Upload it here as an attachment or send it me threw Yahoo Messenger.



Back to top Reply with quote
#10   re: ChanceAce Game- 404 error when trying to admin
hubson
CZ Newbie
hubson has been a member for over 20 year's 20 Year Member
uk.gif
Age: 49
Gender: Male
Status: Offline
Joined: May 04, 2004
0.00 posts per day
Posts: 14
Points: 50
AIM Address Yahoo Messenger MSN Messenger 
Hi

Here is the line from the install file

$userdata = session_pagestart($user_ip, PAGE_INDEX, $nukeuser);



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum