Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

lbdw_panel aidlink and userdata

Asked Modified Viewed 1,737 times
C
cmedia
C
cmedia 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
asked
Junior Member

I have an addon called Login Box Dialog Window Panel http://www.php-fusion.co.uk/infusions...don_id=498 and in Error Log I find 2 errors that bothers me because "Admin Panel" link doesn't work. I attached a printscreen with errors and here is lbdw_panel.php
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright © 2002 - 2012 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: lbdw_panel.php
| Version: 1.0
| Author: jikaka
| Site: www.rusfusion.ru
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

if (file_exists(INFUSIONS."lbdw_panel/locale/".$settings['locale'].".php")) {
   include INFUSIONS."lbdw_panel/locale/".$settings['locale'].".php";
} else {
   include INFUSIONS."lbdw_panel/locale/English.php";
}

add_to_head("
<link type='text/css' href='".INFUSIONS."lbdw_panel/css/styles.css' media='screen' rel='stylesheet' />
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'></script>
<script src='".INFUSIONS."lbdw_panel/js/scripts.js' type='text/javascript'></script>
");

if (iMEMBER) {
   $msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0' AND message_folder='0'");
   echo THEME_BULLET." <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['global_120']."</a>\n";
   echo THEME_BULLET." <a href='".BASEDIR."messages.php' class='side'>".$locale['global_121']."</a>\n";
   echo THEME_BULLET." <a href='".BASEDIR."members.php' class='side'>".$locale['global_122']."</a>\n";

   
   if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
      echo THEME_BULLET." <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['global_123']."</a><br />\n";
   }

   echo THEME_BULLET." <a href='".BASEDIR."index.php?logout=yes' class='side'>".$locale['global_124']."</a>\n";

   if ($msg_count) {
      echo "<div style='text-align:center;margin-top:15px;'>\n";
      echo "<strong><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count);
      echo ($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</a></strong>\n";
      echo "</div>\n";
   }

   if (iADMIN && checkrights("SU")) {
      $subm_count = dbcount("(submit_id)", DB_SUBMISSIONS);

      if ($subm_count) {
         echo "<div style='text-align:center;margin-top:15px;'>\n";
         echo "<strong><a href='".ADMIN."submissions.php".$aidlink."' class='side'>".sprintf($locale['global_125'], $subm_count);
         echo ($subm_count == 1 ? $locale['global_128'] : $locale['global_129'])."</a></strong>\n";
         echo "</div>\n";
      }
   }

} else {
   if (!preg_match('/login.php/i',FUSION_SELF)) {
      $action_url = FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "");
      if (isset($_GET['redirect']) && strstr($_GET['redirect'], "/")) {
         $action_url = cleanurl(urldecode($_GET['redirect']));
      }
      

      echo "<div class='btn-sign'><a href='#login-box' class='login-window'>".$locale['lbdw002']."</a></div>\n";
      echo "<div id='login-box' class='login-popup'>\n";
      echo "<a href='#' class='close'><img src='".INFUSIONS."lbdw_panel/images/close_pop.png' class='btn_close' title='".$locale['lbdw003']."' alt='".$locale['lbdw004']."' /></a>\n";
      echo "<form method='post' name='loginform' class='signin' action='".$action_url."'>\n";
      echo "<fieldset class='box'>\n";
      echo "<label class='username'>\n";
      echo "<span>".$locale['lbdw005']."</span>\n";
      echo "<input id='username' name='user_name' value='' type='text' autocomplete='on' placeholder='".$locale['lbdw005']."'>\n";
      echo "</label>\n";
      echo "<label class='password'>\n";
      echo "<span>".$locale['lbdw006']."</span>\n";
      echo "<input id='password' name='user_pass' value='' type='password' placeholder='".$locale['lbdw006']."'>\n";
      echo "</label>\n";
      echo "<button class='submit button-popup' name='login' type='submit'>".$locale['lbdw007']."</button>\n";
      echo "<p><a class='forgot' href='".BASEDIR."lostpassword.php'>".$locale['lbdw008']."</a></p>\n";
      echo "<p><a class='reg' href='".BASEDIR."register.php'>".$locale['lbdw009']."</a></p>\n";
      echo "</fieldset>\n";
      echo "</form>\n";
      echo "</div>\n";

   }
}
?>
cmedia attached the following file:
error_log.png [No information available / 43 Downloads]
0 replies

3 posts

C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Hi,

On the line After this...

if (iMEMBER) {


Add..

global $aidlink, $userdata;


That'll fix it but technically that should really be in your theme.

Regards
0 replies
C
cmedia
C
cmedia 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
answered
Junior Member

Yeah, I guess. Thanks Craig!
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Your welcome cmedia! :G
0 replies

Category Forum

Panels and Infusions

Labels

None yet

Statistics

  • Views 0 views
  • Posts 3 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
C
C
cmedia 10
  • Junior Member, joined since
  • Contributed 23 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet