Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Conversion Issues From Standard phpNuke
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

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

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.

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
montego
Site Admin



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

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

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.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Joe UKS







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

Excellent!! Thanks for your help - it seems to have worked Smile
 
montego







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

RavensScripts
 
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.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Conversion Issues From Standard phpNuke

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©