vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   some help (https://vborg.vbsupport.ru/showthread.php?t=62646)

AN-net 03-18-2004 09:01 PM

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]");
}



AN-net 03-19-2004 03:02 PM

anyone?

AN-net 03-20-2004 02:49 PM

please can someone tell me how to get around this?

AN-net 03-21-2004 07:06 PM

anyone, pleaseeeee:)

AN-net 03-22-2004 12:43 AM

heres my code:
PHP Code:

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



magnus 03-22-2004 01:37 AM

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.

AN-net 03-22-2004 01:39 AM

well someone is linking to this file so it would $_REQUEST['do'] anyways, wouldnt it?;)

AN-net 03-23-2004 02:18 AM

plzzz i could really use some help on this one:)

Velocd 03-23-2004 03:41 AM

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.

?>


AN-net 03-23-2004 06:51 PM

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]");
}
}



All times are GMT. The time now is 02:13 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.02791 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete