Page 1 of 1

Problem reading strings?

Posted: Wed Mar 15, 2006 5:38 pm
by LG-2
This is really wierd... I am trying to as the file upload it generates the html and then send it to MySQL... now this is the full script along with the other submit stuff:

Code: Select all

<?php
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
// 		http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".

include_once('Smarty.class.php');
$main_smarty = new Smarty;

include('config.php');
include(mnminclude.'html1.php');
include(mnminclude.'ts.php');
include(mnminclude.'link.php');
include(mnminclude.'tags.php');
include(mnminclude.'smartyvariables.php');

$main_smarty->assign('Story_Content_Tags_To_Allow', htmlspecialchars(Story_Content_Tags_To_Allow));

force_authentication();

//this is for direct links from weblogs
if(empty($_POST['phase']) && !empty($_GET['url'])) {
	$_POST['phase'] = 1;
	$_POST['url'] = $_GET['url'];
	$_POST['randkey'] = rand(10000,10000000);
	if(!empty($_GET['trackback'])) 
		$_POST['trackback'] = $_GET['trackback'];


		echo "----" . $_GET['url'] . "--------\n";
}

do_header(_(PLIGG_Visual_Submit_Header), "post", $main_smarty);

if(isset($_POST["phase"])) {
	switch ($_POST["phase"]) {
		case 1:
			do_submit1();
			break;
		case 2:
			do_submit2();
			break;
		case 3:
			do_submit3();
			break;
	}
} else {
	do_submit0();
}

do_footer($main_smarty);
exit;

function do_upload() {
$filefullurl = "http://zumbalo.com/files";
$abpath = "/home2/zumbalo/www/files"; //Absolute path to where images are uploaded. No trailing slash
$sizelim = "no"; //Do you want size limit, yes or no
$size = "25000000"; //What do you want size limited to be if there is one

//all image types to upload
$cert1 = "image/pjpeg"; //Jpeg type 1
$cert2 = "image/jpeg"; //Jpeg type 2
$cert3 = "image/gif"; //Gif type
$cert4 = "image/png"; //PNG type
$cert5 = "image/bmp"; //bmp type
$cert6 = "audio/mpeg"; //MP3 Sound type
$cert7 = "audio/wav"; //WAV Sound type
$cert8 = "video/x-ms-asf"; //Windos Media Audio type
$cert9 = "audio/midi"; //WAV Sound type
$cert10 = "video/x-ms-wmv"; //Windos Media Video type
$cert11 = "video/x-msvideo"; //AVI Video type
$cert12 = "video/mpeg"; //MPG type
$cert13 = "video/mpeg"; //MPEG type
$cert14 = "video/quicktime"; // QuickTimeVideo 
$cert15 = "application/x-shockwave-flash"; // SWF

$fileslog = "";
$random1 = rand(1, 999999999);
//begin upload 1

//checks if file exists
if ($img1_name == "") {
echo "No seleccionastes un file para subir... Trata otra vez.<br>";
}
if ($_FILES['img1']['name'] != "") {
//checks if file exists
if (file_exists($_FILES['img1']['name'])) {
$fileslog .= "El file ya existe.<br>";
} else {

//checks if files to big
if ($sizelim == "yes") {
if ($_FILES['img1']['size'] > $size) {
echo "El file es muy grande.<br>";
}
}

//Checks if file is valid
if (($img1_type == $cert1) or ($img1_type == $cert2) or ($img1_type == $cert3) or ($img1_type == $cert4) or ($img1_type == $cert5) or ($img1_type == $cert6) or ($img1_type == $cert7) or ($img1_type == $cert8) or ($img1_type == $cert9) or ($img1_type == $cert10) or ($img1_type == $cert11) or ($img1_type == $cert12) or ($img1_type == $cert13) or ($img1_type == $cert14) or ($img1_type == $cert15)) {
if (($img1_type == $cert1) or ($img1_type == $cert2)) {
$img1_name = $random1 . ".jpeg";
}
if ($img1_type == $cert3) {
$img1_name = $random1 . ".gif";
}
if ($img1_type == $cert4) {
$img1_name = $random1 . ".png";
}
if ($img1_type == $cert5) {
$img1_name = $random1 . ".bmp";
}
if ($img1_type == $cert6) {
$img1_name = $random1 . ".mp3";
}
if ($img1_type == $cert7) {
$img1_name = $random1 . ".wav";
}
if ($img1_type == $cert8) {
$img1_name = $random1 . ".wma";
}
if ($img1_type == $cert9) {
$img1_name = $random1 . ".midi";
}
if ($img1_type == $cert10) {
$img1_name = $random1 . ".wmv";
}
if ($img1_type == $cert11) {
$img1_name = $random1 . ".avi";
}
if ($img1_type == $cert12) {
$img1_name = $random1 . ".mpg";
}
if ($img1_type == $cert13) {
$img1_name = $random1 . ".mpeg";
}
if ($img1_type == $cert14) {
$img1_name = $random1 . ".mov";
}
if ($img1_type == $cert15) {
$img1_name = $random1 . ".swf";
}
@move_uploaded_file($_FILES['img1']['tmp_name'], $abpath . '/' . $img1_name) ;
if (file_exists($abpath . '/' . $img_name)){
 if (($_FILES['img1']['size']) > 10240) {
$image1size = round($_FILES['img1']['size']/1024000, 2);
$rounded = "MB";
}
 if (($_FILES['img1']['size']) < 1024000) {
$image1size = round($_FILES['img1']['size']/1024, 2);
$rounded = "KB";
}
$fileslog .= "$img1_name ($image1size $rounded) subio al servidor exitosamente.<br>";
$fileset = "1";
// Files LG-2...
	$file_url = "$fullurl/$img1_name";
    $file_size = "$image1size $rounded";
	$file_date = date("F j, Y, g:i a");
	$file_rname= $_FILES['img1']['name'];
	$query = "INSERT INTO files SET file_url='$file_url', file_name='$img1_name', file_size='$file_size', file_rname='$file_rname', file_date='$file_date'";
// Files End
}
} else {
echo "El file no es valido!<br>";
}
}
}
/* Now the code happen... It will add the database whatever HTML code each upload file it needs so then it can be outputted to the page.. 
Nice huh? LG-2! */

// Images
if (($img1_type == $cert1) or ($img1_type == $cert2) or ($img1_type == $cert3) or ($img1_type == $cert4) or ($img1_type == $cert5)) 
{
	$link_field2 = "<p><a href='$filefullurl/$img1_name' alt='Ver Imagen Grande'><img src='$filefullurl/$img1_name' width='200' height='200'></a></p>";
}
// Audio
if (($img1_type == $cert6) or ($img1_type == $cert7) or ($img1_type == $cert8) or ($img1_type == $cert9)) 
{
	$link_field2 = "<embed src='$filefullurl/$img1_name' width='140' height='40' autostart='false' loop='FALSE'></embed><br /><strong><a href='$filefullurl/$img1_name'>Si el file no funciona, Bajalo.</a></strong>";
}
// Video
if (($img1_type == $cert10) or ($img1_type == $cert11) or ($img1_type == $cert12) or ($img1_type == $cert13)) 
{
	$link_field2 = "<object id='MediaPlayer1' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows® Media Player components...' type='application/x-oleobject' width='320' height='285'> <param name='fileName' value='$filefullurl/$img1_name'> <param name='animationatStart' value='true'> <param name='transparentatStart' value='true'> <param name='autoStart' value='true'> <param name='showControls' value='true'> <param name='Volume' value='-20'> <embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='$filefullurl/$img1_name' width=320 height=285 autostart=1 showcontrols=1 volume=-20></embed> </object><br /><strong><a href='$filefullurl/$img1_name'>Si el file no funciona, Bajalo.</a></strong>";
}
// Quicktime Video
if (($img1_type == $cert14)) 
{
	$link_field2 = "<OBJECT CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' WIDTH='400' HEIGHT='340' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'><PARAM NAME='controller' VALUE='TRUE'><PARAM NAME='type' VALUE='video/quicktime'><PARAM NAME='autoplay' VALUE='true'><PARAM NAME='target' VALUE='myself'><PARAM NAME='src' VALUE='$filefullurl/$img1_name'><PARAM NAME='pluginspage' VALUE='http://www.apple.com/quicktime/download/index.html'><EMBED WIDTH='480' HEIGHT='340' CONTROLLER='TRUE' TARGET='myself' SRC='$filefullurl/$img1_name' type='video/quicktime'  PLUGINSPAGE='http://www.apple.com/quicktime/download/'></EMBED></OBJECT><br /><strong><a href='$filefullurl/$img1_name'>Si el file no funciona, Bajalo.</a></strong>";
}
// Flash
if (($img1_type == $cert15)) 
{
	$link_field2 = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='410' height='370' title='Flash'><param name='movie' value='$filefullurl/$img1_name'><param name='quality' value='high'><embed src='$filefullurl/$img1_name' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='416' height='369'></embed></object>";
}
}

function do_submit0() {
	global $main_smarty;
	do_navbar(_(PLIGG_Visual_Navbar_Step1_Var1) . '»'. _(PLIGG_Visual_Navbar_Step1_Var2), $main_smarty);
	$main_smarty->assign('submit_rand', rand(10000,10000000));
	$main_smarty->display('submit_step_1.tpl');
}

function do_submit1() {
	global $main_smarty, $db, $dblang, $current_user;

	$url = trim($_POST['url']);
	$linkres=new Link;

	$main_smarty->assign('submit_url', $url);

	$edit = false;
	$linkres->get($url);
	$trackback=$linkres->trackback;
	$linkres->randkey = $_POST['randkey'];
	do_navbar(_(PLIGG_Visual_Navbar_Step2_Var1) . '»'. _(PLIGG_Visual_Navbar_Step2_Var2), $main_smarty);
	
	if(!$linkres->valid) {
		$main_smarty->assign('submit_error', 'invalidurl');
		$main_smarty->display('submit_errors.tpl');
		//$main_smarty->display('submit_empty_submit_form.tpl');
		return;
	}
	
	if($linkres->duplicates($url) > 0) {
		$main_smarty->assign('submit_search', getmyurl("search", htmlentities($url)));
		$main_smarty->assign('submit_error', 'dupeurl');
		$main_smarty->display('submit_errors.tpl');
		return;
	}
	$linkres->status='discard';
	$linkres->author=$current_user->user_id;
	$linkres->store();

	$main_smarty->assign('enable_tags', Enable_Tags);
	
	$main_smarty->assign('submit_url_title', $linkres->url_title);
	$main_smarty->assign('submit_id', $linkres->id);
	$main_smarty->assign('submit_type', $linkres->type());
	if(isset($link_title)){$main_smarty->assign('submit_title', $link_title);}
	if(isset($link_content)){$main_smarty->assign('submit_content', $link_content);}
	$main_smarty->assign('submit_trackback', $trackback);

	$main_smarty->assign('submit_link_field1', $linkres->link_field1);
	$main_smarty->assign('submit_link_field2', $linkres->link_field2);
	$main_smarty->assign('submit_link_field3', $linkres->link_field3);
	$main_smarty->assign('submit_link_field4', $linkres->link_field4);
	$main_smarty->assign('submit_link_field5', $linkres->link_field5);
	$main_smarty->assign('submit_link_field6', $linkres->link_field6);
	$main_smarty->assign('submit_link_field7', $linkres->link_field7);
	$main_smarty->assign('submit_link_field8', $linkres->link_field8);
	$main_smarty->assign('submit_link_field9', $linkres->link_field9);
	$main_smarty->assign('submit_link_field10', $linkres->link_field10);
	$main_smarty->assign('submit_link_field11', $linkres->link_field11);
	$main_smarty->assign('submit_link_field12', $linkres->link_field12);
	$main_smarty->assign('submit_link_field13', $linkres->link_field13);
	$main_smarty->assign('submit_link_field14', $linkres->link_field14);
	$main_smarty->assign('submit_link_field15', $linkres->link_field15);

	$catsql = mysql_query("SELECT category_id, category_name FROM categories WHERE category_lang='$dblang' ORDER BY category_name ASC");
	$categories = array();
	while ($rows = mysql_fetch_array ($catsql, MYSQL_ASSOC)) array_push ($categories, $rows);
	$main_smarty->assign('categories', $categories);

	$main_smarty->display('submit_step_2.tpl');
}

function do_submit2() {
	global $db, $main_smarty, $dblang;

	$linkres=new Link;
	$linkres->id=$link_id = $_POST['id'];
	$linkres->read();
	$linkres->category=$_POST['category'];
	$linkres->title = strip_tags(trim($_POST['title']));
	$linkres->tags = tags_normalize_string(strip_tags(trim($_POST['tags'])));
	$linkres->content = strip_tags(trim($_POST['bodytext']), Story_Content_Tags_To_Allow);
	$linkres->link_field1 = trim($_POST['link_field1']);
	$linkres->link_field2 = trim($_POST['link_field2']);
	$linkres->link_field3 = trim($_POST['link_field3']);
	$linkres->link_field4 = trim($_POST['link_field4']);
	$linkres->link_field5 = trim($_POST['link_field5']);
	$linkres->link_field6 = trim($_POST['link_field6']);
	$linkres->link_field7 = trim($_POST['link_field7']);
	$linkres->link_field8 = trim($_POST['link_field8']);
	$linkres->link_field9 = trim($_POST['link_field9']);
	$linkres->link_field10 = trim($_POST['link_field10']);
	$linkres->link_field11 = trim($_POST['link_field11']);
	$linkres->link_field12 = trim($_POST['link_field12']);
	$linkres->link_field13 = trim($_POST['link_field13']);
	$linkres->link_field14 = trim($_POST['link_field14']);
	$linkres->link_field15 = trim($_POST['link_field15']);
	
	if (link_errors($linkres)) {
		echo '<form id="thisform">';
		echo '<input type=button onclick="window.history.go(-1)" value="'._(PLIGG_Visual_Submit_Step3_Modify).'">';
		echo '</form>';
		return;
	}


	$linkres->store();
	tags_insert_string($linkres->id, $dblang, $linkres->tags);
	$linkres->read();
	$edit = true;
	$link_title = $linkres->title;
	$link_content = $linkres->content;
	$link_title = stripslashes(strip_tags(trim($_POST['title'])));
	//$link_content = stripslashes(strip_tags(trim($_POST['bodytext'])));

	do_navbar(_(PLIGG_Visual_Submit_Step3_Navbar_Var1) . '»'. _(PLIGG_Visual_Submit_Step3_Navbar_Var2), $main_smarty);
	
	$main_smarty->display('submit_step_3-1.tpl');

	$linkres->print_summary();

	$main_smarty->assign('tags', $linkres->tags);
	if (!empty($linkres->tags)) {
		$tags_words = str_replace(",", ", ", $linkres->tags);
		$tags_url = urlencode($linkres->tags);
		$main_smarty->assign('tags_words', $tags_words);
		$main_smarty->assign('tags_url', $tags_url);
	}

	$main_smarty->assign('submit_url', $url);
	$main_smarty->assign('submit_url_title', $linkres->url_title);
	$main_smarty->assign('submit_id', $linkres->id);
	$main_smarty->assign('submit_type', $linkres->type());
	$main_smarty->assign('submit_title', $link_title);
	$main_smarty->assign('submit_content', $link_content);
	$main_smarty->assign('submit_trackback', $trackback);
	$main_smarty->display('submit_step_3-2.tpl');
}

function do_submit3() {
	global $db;

	$linkres=new Link;

	$linkres->id=$link_id = $_POST['id'];
	$linkres->read();
	//if (link_errors($linkres)) {
	//	echo '<form id="thisform">';
	//	echo '<input type=button onclick="window.history.go(-2)" value="'._(PLIGG_Visual_Submit_Step3_Modify).'">';
	//	return;
	//}
	$linkres->status='queued';
	$linkres->store_basic();
	if(!empty($_POST['trackback'])) {
		require_once(mnminclude.'trackback.php');
		$trackres = new Trackback;
		$trackres->url=trim($_POST['trackback']);
		$trackres->link=$linkres->id;
		$trackres->title=$linkres->title;
		$trackres->author=$linkres->author;
		$trackres->content=$linkres->content;
		$res = $trackres->send();
	}

	header("Location: " . getmyurl('shakeit'));
	die;

}

function link_errors($linkres)
{
	global $main_smarty;
	$error = false;
	// Errors
	if($_POST['randkey'] !== $linkres->randkey) {
		$main_smarty->assign('submit_error', 'badkey');
		$main_smarty->display('submit_errors.tpl');
		$error = true;
	}
	if($linkres->status != 'discard') {
		$main_smarty->assign('submit_error', 'hashistory');
		$main_smarty->assign('submit_error_history', $linkres->status);
		$main_smarty->display('submit_errors.tpl');
		$error = true;
	}
	if(strlen($linkres->title) < PLIGG_Var_Submit_MinTitleLen  || strlen($linkres->content) < PLIGG_Var_Submit_MinContentLen ) {
		$main_smarty->assign('submit_error', 'incomplete');
		$main_smarty->display('submit_errors.tpl');
		$error = true;
	}
	if(preg_match('/.*http:\//', $linkres->title)) {
		$main_smarty->assign('submit_error', 'urlintitle');
		$main_smarty->display('submit_errors.tpl');
		$error = true;
	}
	if(!$linkres->category > 0) {
		$main_smarty->assign('submit_error', 'nocategory');
		$main_smarty->display('submit_errors.tpl');
		$error = true;
	}
	return $error;
}
?>
This is the upload function its not wanting to read from:

Code: Select all

function do_upload() {
$filefullurl = "http://zumbalo.com/files";
$abpath = "/home2/zumbalo/www/files"; //Absolute path to where images are uploaded. No trailing slash
$sizelim = "no"; //Do you want size limit, yes or no
$size = "25000000"; //What do you want size limited to be if there is one

//all image types to upload
$cert1 = "image/pjpeg"; //Jpeg type 1
$cert2 = "image/jpeg"; //Jpeg type 2
$cert3 = "image/gif"; //Gif type
$cert4 = "image/png"; //PNG type
$cert5 = "image/bmp"; //bmp type
$cert6 = "audio/mpeg"; //MP3 Sound type
$cert7 = "audio/wav"; //WAV Sound type
$cert8 = "video/x-ms-asf"; //Windos Media Audio type
$cert9 = "audio/midi"; //WAV Sound type
$cert10 = "video/x-ms-wmv"; //Windos Media Video type
$cert11 = "video/x-msvideo"; //AVI Video type
$cert12 = "video/mpeg"; //MPG type
$cert13 = "video/mpeg"; //MPEG type
$cert14 = "video/quicktime"; // QuickTimeVideo 
$cert15 = "application/x-shockwave-flash"; // SWF

$fileslog = "";
$random1 = rand(1, 999999999);
//begin upload 1

//checks if file exists
if ($img1_name == "") {
echo "No seleccionastes un file para subir... Trata otra vez.<br>";
}
if ($_FILES['img1']['name'] != "") {
//checks if file exists
if (file_exists($_FILES['img1']['name'])) {
$fileslog .= "El file ya existe.<br>";
} else {

//checks if files to big
if ($sizelim == "yes") {
if ($_FILES['img1']['size'] > $size) {
echo "El file es muy grande.<br>";
}
}

//Checks if file is valid
if (($img1_type == $cert1) or ($img1_type == $cert2) or ($img1_type == $cert3) or ($img1_type == $cert4) or ($img1_type == $cert5) or ($img1_type == $cert6) or ($img1_type == $cert7) or ($img1_type == $cert8) or ($img1_type == $cert9) or ($img1_type == $cert10) or ($img1_type == $cert11) or ($img1_type == $cert12) or ($img1_type == $cert13) or ($img1_type == $cert14) or ($img1_type == $cert15)) {
if (($img1_type == $cert1) or ($img1_type == $cert2)) {
$img1_name = $random1 . ".jpeg";
}
if ($img1_type == $cert3) {
$img1_name = $random1 . ".gif";
}
if ($img1_type == $cert4) {
$img1_name = $random1 . ".png";
}
if ($img1_type == $cert5) {
$img1_name = $random1 . ".bmp";
}
if ($img1_type == $cert6) {
$img1_name = $random1 . ".mp3";
}
if ($img1_type == $cert7) {
$img1_name = $random1 . ".wav";
}
if ($img1_type == $cert8) {
$img1_name = $random1 . ".wma";
}
if ($img1_type == $cert9) {
$img1_name = $random1 . ".midi";
}
if ($img1_type == $cert10) {
$img1_name = $random1 . ".wmv";
}
if ($img1_type == $cert11) {
$img1_name = $random1 . ".avi";
}
if ($img1_type == $cert12) {
$img1_name = $random1 . ".mpg";
}
if ($img1_type == $cert13) {
$img1_name = $random1 . ".mpeg";
}
if ($img1_type == $cert14) {
$img1_name = $random1 . ".mov";
}
if ($img1_type == $cert15) {
$img1_name = $random1 . ".swf";
}
@move_uploaded_file($_FILES['img1']['tmp_name'], $abpath . '/' . $img1_name) ;
if (file_exists($abpath . '/' . $img_name)){
 if (($_FILES['img1']['size']) > 10240) {
$image1size = round($_FILES['img1']['size']/1024000, 2);
$rounded = "MB";
}
 if (($_FILES['img1']['size']) < 1024000) {
$image1size = round($_FILES['img1']['size']/1024, 2);
$rounded = "KB";
}
$fileslog .= "$img1_name ($image1size $rounded) subio al servidor exitosamente.<br>";
$fileset = "1";
// Files LG-2...
	$file_url = "$fullurl/$img1_name";
    $file_size = "$image1size $rounded";
	$file_date = date("F j, Y, g:i a");
	$file_rname= $_FILES['img1']['name'];
	$query = "INSERT INTO files SET file_url='$file_url', file_name='$img1_name', file_size='$file_size', file_rname='$file_rname', file_date='$file_date'";
// Files End
}
} else {
echo "El file no es valido!<br>";
}
}
}
/* Now the code happen... It will add the database whatever HTML code each upload file it needs so then it can be outputted to the page.. 
Nice huh? LG-2! */

// Images
if (($img1_type == $cert1) or ($img1_type == $cert2) or ($img1_type == $cert3) or ($img1_type == $cert4) or ($img1_type == $cert5)) 
{
	$link_field2 = "<p><a href='$filefullurl/$img1_name' alt='Ver Imagen Grande'><img src='$filefullurl/$img1_name' width='200' height='200'></a></p>";
}
// Audio
if (($img1_type == $cert6) or ($img1_type == $cert7) or ($img1_type == $cert8) or ($img1_type == $cert9)) 
{
	$link_field2 = "<embed src='$filefullurl/$img1_name' width='140' height='40' autostart='false' loop='FALSE'></embed><br /><strong><a href='$filefullurl/$img1_name'>Si el file no funciona, Bajalo.</a></strong>";
}
// Video
if (($img1_type == $cert10) or ($img1_type == $cert11) or ($img1_type == $cert12) or ($img1_type == $cert13)) 
{
	$link_field2 = "<object id='MediaPlayer1' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows® Media Player components...' type='application/x-oleobject' width='320' height='285'> <param name='fileName' value='$filefullurl/$img1_name'> <param name='animationatStart' value='true'> <param name='transparentatStart' value='true'> <param name='autoStart' value='true'> <param name='showControls' value='true'> <param name='Volume' value='-20'> <embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='$filefullurl/$img1_name' width=320 height=285 autostart=1 showcontrols=1 volume=-20></embed> </object><br /><strong><a href='$filefullurl/$img1_name'>Si el file no funciona, Bajalo.</a></strong>";
}
// Quicktime Video
if (($img1_type == $cert14)) 
{
	$link_field2 = "<OBJECT CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' WIDTH='400' HEIGHT='340' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'><PARAM NAME='controller' VALUE='TRUE'><PARAM NAME='type' VALUE='video/quicktime'><PARAM NAME='autoplay' VALUE='true'><PARAM NAME='target' VALUE='myself'><PARAM NAME='src' VALUE='$filefullurl/$img1_name'><PARAM NAME='pluginspage' VALUE='http://www.apple.com/quicktime/download/index.html'><EMBED WIDTH='480' HEIGHT='340' CONTROLLER='TRUE' TARGET='myself' SRC='$filefullurl/$img1_name' type='video/quicktime'  PLUGINSPAGE='http://www.apple.com/quicktime/download/'></EMBED></OBJECT><br /><strong><a href='$filefullurl/$img1_name'>Si el file no funciona, Bajalo.</a></strong>";
}
// Flash
if (($img1_type == $cert15)) 
{
	$link_field2 = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='410' height='370' title='Flash'><param name='movie' value='$filefullurl/$img1_name'><param name='quality' value='high'><embed src='$filefullurl/$img1_name' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='416' height='369'></embed></object>";
}
}
All the MySQL is added throught another file... but mYsql is not the problem. Is something in submit.php not wanting to execute the strings right...

function submit2 is the one that shows a summary of what you uploaded and submit1 shows the upload form along with other fields.
Do I have to split the upload functions?

Posted: Fri Mar 17, 2006 8:31 am
by jmut
Could you clarify what exactly is the problem.
You cannot get data to DB or having problem from DB back to site?
Is data stored correctly in DB...magic_quotes etc?