View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Help integrating DFP into site.

Thread began 8/19/2009 8:35 am by chrisbjax | Last modified 8/21/2009 1:01 pm by chrisbjax | 1575 views | 4 replies

chrisbjax

Still not working.

I've been working on this all day, and I still don't understand whats wrong.

Would someone mind looking at my code, to tell me where the issue lies. I'm following the instructions verbatim, reading, and re-reading them to make sure I haven't missed a step, yet this product doesn't seem upload a file. I'm beeen watching both the global WA debug and the php debug, and it just doesn't work..

php:
<?php require_once('../../../Connections/conUDS.php'); ?>

<?php 
require_once("../../../WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  if (
PHP_VERSION 6) {
    
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

mysql_select_db($database_conUDS$conUDS);
$query_rsAttach "SELECT * FROM supportgrid";
$rsAttach mysql_query($query_rsAttach$conUDS) or die(mysql_error());
$row_rsAttach mysql_fetch_assoc($rsAttach);
$totalRows_rsAttach mysql_num_rows($rsAttach);?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_2 Start
$WA_UploadResult1_Params["WA_UploadResult1_2"] = array(
    
'UploadFolder' => "uploads",
    
'FileName' => "[FileName]",
    
'DefaultFileName' => "../../../images/misc/space.gif",
    
'ResizeType' => "0",
    
'ResizeWidth' => "0",
    
'ResizeHeight' => "0",
    
'ResizeFillColor' => "" );
// WA_UploadResult1_2 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult1");
if(isset(
$_POST["submit"])){
    
WA_DFP_UploadFiles("WA_UploadResult1""attachment""0""""false"$WA_UploadResult1_Params);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script  src="../../../WA_DigitalFilePro/jquery-blockui-formprocessing.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test Upload Form</title>
</head>

<body>
<h1>Test Upload Form</h1>
<div id="test1_ProgressWrapper">
<form  action="" method="post" name="test" id="test1">
<input name="attachment" type="file" id="attachment" />
<input name="submit" type="submit" id="submit" value="submit" />
</form>
</div>
<h2>WA Debug Info</h2>
<div>
<?php echo WA_DFP_AllUploadsDebug(); ?>
</div>
<div id="test1_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('test1', 'test1_ProgressMessageWrapper', WADFP_Theme_Options['BigSpin:CaboSunset']);
</script>
<div id="test1_ProgressMessage" >

    <p style="margin:10px; padding:5px;" ><img  src="../../../WA_DigitalFilePro/images/cabo-largespin.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>

</div>
</div>
<h2>PHP Debug</h2>
<div>
<?php
error_reporting
(E_ALL);
ini_set('display_errors','on');
?>
</div>
</body>
</html>
<?php
mysql_free_result
($rsAttach);
?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...