All pastes #968289 Raw Edit

Untitled

public php v1 · immutable
·published 2008-04-02 22:52 UTC
rendered paste body
function addon_forms_uploader_admin(){	echo "<pre>";	print_r($_POST);	echo "</pre>";	global $conn, $config;	require_once($config['basepath'].'/include/misc.inc.php');	$misc = new Misc();		/*** CHECK TO SEE IF FILE EXISTS ***/	$sql = sprintf("SELECT %s FROM %s WHERE %s = '%s'",														'id',														$config['table_prefix'].'addon_forms',														'filename',														$_POST['filename']);	$recordSet = $conn->Execute($sql);	if ($recordSet === false) {		$misc->log_error($sql);	}	$num = $recordSet->RecordCount();	if ( isset($_POST['overwrite']) AND $_POST['overwrite'] != '1') {		if ( $num > 0 ){			$display = "<strong> That filename already exists, please either delete the file or choose a diffent name";			$display .= addon_forms_upload_admin();			return $display;		}	}