Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-18-2004, 09:01 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default some help

ok im using a php file as way to have an image displayed. i want it to like <img src="http://www.blah.com/blah.php?do=image&id=666">
but it doesnt work. it only works if its just blah.php and nothing after it, is there anyway around this or fix?

heres my code:
PHP Code:
if($do=="image"){
if(empty(
$a)){
header("Location: $vboptions[bburl]/images/error.gif");
}
else{
header("Location: $settings[imagelink]");
}

Reply With Quote
  #2  
Old 03-19-2004, 03:02 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone?
Reply With Quote
  #3  
Old 03-20-2004, 02:49 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

please can someone tell me how to get around this?
Reply With Quote
  #4  
Old 03-21-2004, 07:06 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone, pleaseeeee
Reply With Quote
  #5  
Old 03-22-2004, 12:43 AM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

heres my code:
PHP Code:
if($do=="image"){
if(empty(
$a)){
header("Location: $vboptions[bburl]/images/error.gif");
}
else{
header("Location: $settings[imagelink]");
}

Reply With Quote
  #6  
Old 03-22-2004, 01:37 AM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Err.. there's not really enough code there to determine much, however, I don't see where you've assigned "$do" to anything, or even "$a" for that matter.

Might wanna start off with:
PHP Code:
if ($_POST['do'] == 'image'

And work your way from there.
Reply With Quote
  #7  
Old 03-22-2004, 01:39 AM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well someone is linking to this file so it would $_REQUEST['do'] anyways, wouldnt it?
Reply With Quote
  #8  
Old 03-23-2004, 02:18 AM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

plzzz i could really use some help on this one
Reply With Quote
  #9  
Old 03-23-2004, 03:41 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about posting more of the code? You're leaving us at empty when you specify variables that have no origin.

vBulletin files should always structure around the following syntax:
PHP Code:
<?php

error_reporting
(E_ALL & ~E_NOTICE);

define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''filename');

$phrasegroups = array();

$specialtemplates = array();

$globaltemplates = array(
    
'template_1'
);

$actiontemplates = array();

require_once(
'./global.php');

if (
$_REQUEST['do'] == 'something')
{

// do stuff

}

// etc.

?>
Reply With Quote
  #10  
Old 03-23-2004, 06:51 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

heres where it originates from: the $a comes from a link
PHP Code:
<?PHP
error_reporting
(E_ALL & ~E_NOTICE);
include(
'./global.php');
$globaltemplates = array(
'STANDARD_REDIRECT',
'STANDARD_ERROR',
);
$fsettings$DB_site->query("SELECT * FROM affiliates_settings");
$settings$DB_site->fetch_array($fsettings);

if(
$_REQUEST['do']=="image"){
if(empty(
$_REQUEST['a'])){
header("Location: $vboptions[bburl]/images/error.gif");
}
else{
header("Location: $settings[imagelink]");
}
}
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 02:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04700 seconds
  • Memory Usage 2,267KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete