vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Using the vBulletin Input Cleaner (https://vborg.vbsupport.ru/showthread.php?t=119372)

Billspaintball 01-22-2007 03:44 AM

Ohhh just what I was looking for.

Thanks Alan, its all clear now :D

ccasselman 02-14-2007 02:33 PM

Is there anyway I can use this class for an external script?

How would I approach that?

chad

Adrian. 02-24-2007 02:53 PM

Does this work on vB 3.0.x?

I can't seem to get it working. :(

adhari_com 04-07-2007 06:54 AM

Thank you so much for the great useful info, but I need to ask the TYPE_NOHTML does get rid of the <script> entry?

cashpath 04-23-2007 08:45 PM

Does this still work?

I put this..

Code:

        $vbulletin->input->clean_array_gpc
        ('g', array(
          'year' => TYPE_UINT,
          'week' => TYPE_UINT,
          'teamid' => TYPE_UNIT,
      'team_ident' => TYPE_UNIT,
          'pid' => TYPE_UINT,
          'page' => TYPE_NOHTML));
$team_ident=$vbulletin->GPC['team_ident'];

And when I pass
Code:

{url}?team_ident=thisisatest
I get a mysql error
Code:

Invalid SQL:
SELECT * FROM table_teams WHERE id=thisisatest


foxfirediego 10-01-2007 09:55 AM

Quote:

Originally Posted by cashpath (Post 1234277)
Does this still work?

I put this..

Code:

        $vbulletin->input->clean_array_gpc
        ('g', array(
          'year' => TYPE_UINT,
          'week' => TYPE_UINT,
          'teamid' => TYPE_UNIT,
      'team_ident' => TYPE_UNIT,
          'pid' => TYPE_UINT,
          'page' => TYPE_NOHTML));
$team_ident=$vbulletin->GPC['team_ident'];

And when I pass
Code:

{url}?team_ident=thisisatest
I get a mysql error
Code:

Invalid SQL:
SELECT * FROM table_teams WHERE id=thisisatest


a lil too late :p
yes, works!
try this out:
PHP Code:

$vbulletin->input->clean_array_gpc('g', array(
      
'year' => TYPE_INT,
      
'week' => TYPE_INT,
      
'teamid' => TYPE_INT,
      
'team_ident' => TYPE_INT,
      
'pid' => TYPE_INT,
      
'page' => TYPE_NOHTML));

$team_ident $vbulletin->GPC['team_ident']; 

HTML Code:

{url}?team_ident=$team_ident
OR
HTML Code:

{url}?team_ident=$vbulletin->GPC['team_ident']
also, escape ur mysql statement:
Code:

SELECT * FROM table_teams WHERE id = " . $db->escape_string($vbulletin->GPC['team_ident']) . "

Blaine0002 11-30-2007 09:10 PM

Can you define the maxes for both int and num?

Im using num for a post
When i enter 9999999999999 it passes -15304950.76
When i enter 999999999999 it passes 2764471.32
When i enter 99999999999 it passes 13161348.12
When i enter 9999999999 it passes -7273800.68
When i enter 999999999 it passes 12157520.92
When i enter 99999999 it passes 14100653.08
When i enter 9999999 it finally passes 9999999

Whats going on here??

NOTE: before it is displayed it is passed thru this. (truncates the number to 2 decimals without rounding.
Quote:

function truncate($number, $places){
return intval($mynumber * pow(10,$places))/pow(10,$places);
}
$vbulletin->GPC['num'] = truncate($vbulletin->GPC['num'], 2);
--------------- Added [DATE]1196465816[/DATE] at [TIME]1196465816[/TIME] ---------------

Seems my Truncate function was causing it, But now it passes numbers like
1.0E+17

How do i restrict it from doing this and just passing the number?

ForgotenDynasty 11-19-2008 09:38 PM

How can I use a cleaned variable in a template

Jafo232 12-10-2008 06:36 PM

Does TYPE_NOHTML really clean HTML? I mean, take out script tags, etc?

Adem GEN? 03-08-2009 01:39 AM

Hello,
I could not understand the full

Options delete:
checkbox = submit OR Delete text link

Code safe deleted for?

PHP Code:

("DELETE FROM " TABLE_PREFIX "table_name
            WHERE xxx_id = '"
.$_GET['id_delete']."'"); 

Thanks


All times are GMT. The time now is 03:00 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.01285 seconds
  • Memory Usage 1,749KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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