vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   am i doing this wrong? (conditionals) (https://vborg.vbsupport.ru/showthread.php?t=66046)

sabret00the 06-10-2004 07:21 PM

am i doing this wrong? (conditionals)
 
can you spot anything wrong with this code?
PHP Code:

                  if ($action==report
                  {
                  if (
$bbuserinfo[usergroupid] > 0
                      {
                   eval(
"\$report_form = \"".fetch_template("confessions_reportform")."\";");
  
                      if (
$confirm==report
                         {
                       if (
$bbuserinfo[usergroupid] > && $action == 'report' && $confessionid && $reason)
                       {
                           
$body "Please review confession $confessionid and take 
                           appropriate action as you see fit\n\nReason given:\n
                        
$reason\n\n$confessionurl\n\nThank You\n$bbuserinfo[username]";
  
                        
vbmail($vboptions[$webmasteremail], 'Reporting A Confession'$body,
                           
"From: \"$bbtitle Mailer\" <$vboptions[webmasteremail]>");
                       }
                         }
                      }
                      else
                      {
                      
$url "../confessions/";
                   eval(
print_standard_redirect("confess_error_shouldnotbehere"));
                      }
                  } 

it's within this
PHP Code:

            if ($confessionid!='')
  {
  ...
  } 

the second php tag opens the page "?confessionid=$confessionid"
where as the top php tag will go to ?confessionid=$confessionid&action=report" well should do anyway however it doesn't seem to want too and lastly since the '&action=report' is a form, the submitted data will go to "?confessionid=$confessionid&action=report&confirm =report"

Xenon 06-10-2004 07:35 PM

erm, have you globalized the get / post parameters before using them here?

also alwasy put strings like report into '' :)

sabret00the 06-10-2004 08:14 PM

yup, and i fixed the strings, but i can't figure out the problem, i just seem to be getting redicted back to the index, even when i comment out the redirect that should take me there.

sabret00the 06-10-2004 08:15 PM

found the problem it was some duplicate code i had up earlier in the script :o

Xenon 06-10-2004 08:35 PM

*gg*

such things can happen ^^

sabret00the 06-10-2004 08:39 PM

always to me :( lol

Xenon 06-10-2004 08:41 PM

Well, that's called Murphy's law


All times are GMT. The time now is 05:51 AM.

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.01559 seconds
  • Memory Usage 1,729KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete