Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 08-08-2002, 09:43 AM
Powerless Powerless is offline
 
Join Date: Aug 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do i add this php code to headers

How do add this Php code to headers in other to read from a file, thanx in advance

<?php
$fp = fopen ("/home/theplacement/public_html/forum/storepl.cpl", "r");
$bytes = 900000;
$buffer = fread($fp, $bytes);
fclose ($fp);
print $buffer;

?>
Reply With Quote
  #2  
Old 08-08-2002, 10:32 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Powerless, please go to this page and enter your username, to show you are licensed. (you will need to use your customer number and password to access that page)
Thank you.
Reply With Quote
  #3  
Old 08-08-2002, 04:08 PM
cybrcyfr cybrcyfr is offline
 
Join Date: Aug 2002
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I recently purchased vB and have the same issue!

I need to have a conditional statement in the header...

PHP Code:
<? if ($bbuserinfo[userid]!=0)
{
?><a href="<? echo $siteRoot; ?>/forums/member.php?action=logout"><B>Logout</B></a><? }
  else
{
?><a href="<? echo $siteRoot; ?>/login.php"><B>Login</B></a><? }

Help!
Reply With Quote
  #4  
Old 08-08-2002, 04:47 PM
cybrcyfr cybrcyfr is offline
 
Join Date: Aug 2002
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, got it working after a few hours.

Had to do everything in the "PHP Parsed Code", and create a bunch of string variables and write them out to the headers. It doesn't really follow the development style of the site, but I guess it works...

Parsed Code
PHP Code:
// ****  Lets find out what usergroup this user belongs to... ****
//6 = Admin
//8 = NewsAdmin
//9 = ScriptsAdmin
if ($bbuserinfo[usergroupid] == 6){
    
$strMenuFile "adminmenu";
}elseif (
$bbuserinfo[usergroupid] == 8){
    
$strMenuFile "newsmenu";
}elseif (
$bbuserinfo[usergroupid] == 9){
    
$strMenuFile "scriptsmenu";
}else{
    
$strMenuFile "menu";
}

if (
$bbuserinfo[userid]!=0)
{
 
$strLoggedInMsg " You are logged in as $bbuserinfo[username]";
 
$strLogInOutLink "/forums/member.php?action=logout";
 
$strLogInOutText "<B>Logout</B>";
}else{
 
$strLoggedInMsg "";
 
$strLogInOutLink "/login.php";
 
$strLogInOutText "<B>Login</B>";

Header Code
PHP Code:
&nbsp;$strLoggedInMsg

<a href="{siteRoot}$LogInOutLink">$strLogInOutText</a
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:59 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04151 seconds
  • Memory Usage 2,189KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete