trafix: I did what you said but the database doesn't get filled with the data
Here's what I got now:
PHP Code:
/*======================================================================*\
|| #################################################################### ||
|| # vBGarage v3.1.1 # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000?2004 magnus. All Rights Reserved. # ||
|| # https://vborg.vbsupport.ru/showthread.php?t=63681 # ||
|| #################################################################### ||
\*======================================================================*/
// Updated by: noppid @ www.lakecs.com
// This is not official or for distrubtion.
// added length limit to text field
// added striping of html and php code from user text input fields
// strip tags code from php.net and vBulletin
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'vbgarage');
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
'user',
'cpglobal',
'posting'
);
// get special data templates from the datastore
$specialtemplates = array(
'smiliecache',
'bbcodecache'
);
// pre-cache templates used by all actions
$globaltemplates = array(
'vbgarage_editgarage',
'vbgarage_editimagebits',
'vbgarage_imagebits',
'vbgarage_listbits',
'vbgarage_listgarage',
'vbgarage_popup',
'vbgarage_viewgarage'
);
// pre-cache templates used by specific actions
$actiontemplates = array();
if (!$bbuserinfo['userid'])
{
print_no_permission();
}
if ($permissions['genericpermissions'] & CANVBGARAGE) {
if (empty($year) OR empty($make) OR empty($id))
{
eval (print_standard_error('error_requiredfields'));
}
if (!empty($_FILES['src']['tmp_name'])) {
$name = $_FILES['src']['name'];
//(nop) not implemented in this version
//$data = addslashes( gzcompress(fread(fopen($_FILES['src']['tmp_name'], "r"), filesize($_FILES['src']['tmp_name'])), 1) );
$data = addslashes( fread(fopen($_FILES['src']['tmp_name'], "r"), filesize($_FILES['src']['tmp_name'])) );
$type = $_FILES['src']['type'];