PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
Joe UKS
New Member
New Member


Joined: Jan 12, 2006
Posts: 2

PostPosted: Tue Jul 24, 2007 10:39 am Reply with quote Back to top

Hi,

I've recently installed RN and am unable to get my custom built modules working. When I go into admin for the module it comes up with "access denied". I've searched various topics on here but can not find what I need to do to get them working. I guess the code required needs to be changed but I don't know what....?

Could someone please advise......?


Here are some examples of code from my admin - modules file:

Code:
if ( !defined('ADMIN_FILE') )
{
   die ("Access Denied");
}
global $prefix, $db, $bgcolor2;
$aid = trim($aid);
$result = $db->sql_query("select radminreviews, radminsuper from ".$prefix."_authors where aid='$aid'");
list($radminreviews, $radminsuper) = $db->sql_fetchrow($result);

if (($radminreviews==1) OR ($radminsuper==1)) {




Code:
function events_post($id,$title,$sub_title,$date,$time,$where,$price,$phone,$email,$website,$details,$arenas,$flyer) {
    global $prefix, $db, $bgcolor2,$user, $cookie;
    include("header.php");
    GraphicAdmin();
   
   $date_p = mktime (0,0,0,$date[1],$date[0],$date[2]);

   $title = strip_tags(mysql_escape_string($title),'<b>,<i>');
   $sub_title = strip_tags(mysql_escape_string($sub_title),'<b>,<i>');
   $time = strip_tags(mysql_escape_string($time),'<b>,<i>');
   $where = strip_tags(mysql_escape_string($where),'<b>,<i>');
   $price = strip_tags(mysql_escape_string($price),'<b>,<i>');
   $phone = strip_tags(mysql_escape_string($phone),'<b>,<i>');
   $email = strip_tags(mysql_escape_string($email),'<b>,<i>');
   $website = strip_tags(mysql_escape_string($website),'<b>,<i>');
   $details = strip_tags(mysql_escape_string($details),'<b>,<i>');
   $flyer = strip_tags(mysql_escape_string($flyer));
   for ($i=0; $i<6; $i++) {
      $arenas[$i][name] = strip_tags($arenas[$i][name],'<b>,<i>');
      $arenas[$i][details] = strip_tags($arenas[$i][details],'<b>,<i>');
   }
   $arenas_p = addslashes(serialize($arenas));

   if ($id) {
      $db->sql_query("UPDATE `events` SET
         `title`='$title',`sub_title`='$sub_title',`date`='$date_p',
         `time`='$time',`where`='$where',`price`='$price',
         `phone`='$phone',`email`='$email',`website`='$website',
         `details`='$details',`arenas`='$arenas_p',`flyer`='$flyer'
         WHERE `id`='$id' LIMIT 1");
   }
   else {
      cookiedecode($user);
      $db->sql_query("INSERT INTO `events` (`id`,`pend`,`user_id`,`title`,`sub_title`,`date`,`time`,`where`,`price`,`phone`,`email`,`website`,`details`,`arenas`,`flyer`)
         VALUES ('','0','$cookie[0]','$title','$sub_title','$date_p','$time','$where','$price','$phone','$email','$website',   '$details','$arenas_p','$flyer')");
   }

   Header("Location: admin.php?op=events");

}



Thanks
Joe
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Tue Jul 24, 2007 11:10 am Reply with quote Back to top

I don't think radminreviews is a standard Nuke column on the authors table. That may be causing the SQL statement to fail and denying you access. Take a look at one of the standard modules admin/index.php files and use that as a model.
View user's profile Send private message
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9071
Location: Arizona

PostPosted: Wed Jul 25, 2007 5:48 am Reply with quote Back to top

Joe UKS, yes, it looks like you came from a pre 7.5 version of nuke. With 7.5, the individual module "radmin___" columns were removed. Even 7.6 changed the administration a bit more, but I cannot recall how. So, like Gremmie said, take one of the provided modules as a model.
View user's profile Send private message Visit poster's website
Joe UKS
New Member
New Member


Joined: Jan 12, 2006
Posts: 2

PostPosted: Wed Jul 25, 2007 7:02 am Reply with quote Back to top

Excellent!! Thanks for your help - it seems to have worked Smile
View user's profile Send private message
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9071
Location: Arizona

PostPosted: Wed Jul 25, 2007 6:50 pm Reply with quote Back to top

RavensScripts
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

View next topic
View previous topic
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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum