vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   print_delete_confirmation function parameters (https://vborg.vbsupport.ru/showthread.php?t=96589)

rubzebest 09-20-2005 03:13 AM

print_delete_confirmation function parameters
 
in admincalendar.php the code below is used:
PHP Code:

if ($_REQUEST['do'] == 'remove')
{
    
$vbulletin->input->clean_array_gpc('r', array('calendarid'     => TYPE_INT));

    
print_delete_confirmation('calendar'$vbulletin->GPC['calendarid'], 'admincalendar''kill''calendar'0);


when I use my own admin file (adminfoo.php) this doesn't work :S?
PHP Code:

if ($_REQUEST['do'] == 'remove')
{
    
$vbulletin->input->clean_array_gpc('r', array('foorid'     => TYPE_INT));

    
print_delete_confirmation('foo'$vbulletin->GPC['fooid'], 'adminfoo''kill''foo'0);


how come? the phrase uses is not bound to the calendar, so why don't i see the message?

when I use this code:
PHP Code:

if ($_REQUEST['do'] == 'add' or $_REQUEST['do'] == 'edit')
{
    
$vbulletin->input->clean_array_gpc('r', array('fooid' => TYPE_INT)); 

the
PHP Code:

$vbulletin->GPC['fooid'

doesn't have a value and I have to use this
PHP Code:

$vbulletin->GPC['fooid'] = intval($_GET['m']); 

to get the value.
when I use this however:
PHP Code:

if ($_POST['do'] == 'update')
{
            
$vbulletin->input->clean_array_gpc('r', array('fooid'  => TYPE_INT)); 

the
PHP Code:

$vbulletin->GPC['fooid'

has a value :S...
Anyone that can explain this behavior?
The code is all from vB 3.5 RC3 admincalendar.php...

Marco van Herwaarden 09-20-2005 05:03 AM

You must add a phrase called 'are_you_sure_want_to_delete_<TABLENAME>_x'

About fooid not having a value, are you passing fooid to the script at that stage?

rubzebest 09-21-2005 01:04 PM

Thanks for your phrase tip :).

I pass this fooid value to the script indeed. What suprised me is that, depending on which if condition I use, this fooid has an empty value :ermm: ...

I noticed that vBa CMPS circumvents this problem by using it's own function instead of the built in vBulletin function. But to me, that is a strange workaround...

Andreas 09-21-2005 01:18 PM

Quote:

Originally Posted by rubzebest
doesn't have a value and I have to use this
PHP Code:

$vbulletin->GPC['fooid'] = intval($_GET['m']); 

to get the value.
when I use this however:

Do you want m or fooid?

rubzebest 09-22-2005 07:25 PM

I found the error, in the javascript I defined the variable as m not as fooid :o. Thanks for your help :)!


All times are GMT. The time now is 01:28 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.01173 seconds
  • Memory Usage 1,742KB
  • 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
  • (8)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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