close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Insert/Edit Image not working

Thread began 11/24/2010 10:12 am by mrs | Last modified 11/25/2010 3:06 pm by neilo | 1932 views | 5 replies |

mrs

Insert/Edit Image not working

For some reason, I have lost the ability to upload images through the editor. The upload button has disappeared and I don't know why.

I have an error:

Notice: Use of undefined constant php - assumed 'php' in \\NAS37ENT\domains\e\ewguk.com\user\htdocs\_admin\news\tbl_news_Update.php on line 128



Line 128 is:

<?php?>



And it sits in this block of code:

<?php
$Paramfld_id_WADAtbl_news = "-1";
if (isset($_GET['fld_id'])) {
$Paramfld_id_WADAtbl_news = (get_magic_quotes_gpc()) ? $_GET['fld_id'] : addslashes($_GET['fld_id']);
}
mysql_select_db($database_con_evo, $con_evo);
$query_WADAtbl_news = sprintf("SELECT fld_id, fld_division, fld_image, fld_headline, fld_intro, fld_content, fld_show FROM tbl_news WHERE fld_id = %s", GetSQLValueString($Paramfld_id_WADAtbl_news, "int"));
$WADAtbl_news = mysql_query($query_WADAtbl_news, $con_evo) or die(mysql_error());
$row_WADAtbl_news = mysql_fetch_assoc($WADAtbl_news);
$totalRows_WADAtbl_news = mysql_num_rows($WADAtbl_news);?>
<?php
$maxRows_WADADynListtbl_division = 1000;
$pageNum_WADADynListtbl_division = 0;
if (isset($_GET['pageNum_WADADynListtbl_division'])) {
$pageNum_WADADynListtbl_division = $_GET['pageNum_WADADynListtbl_division'];
}
$startRow_WADADynListtbl_division = $pageNum_WADADynListtbl_division * $maxRows_WADADynListtbl_division;

mysql_select_db($database_con_evo, $con_evo);
$query_WADADynListtbl_division = "SELECT fld_id, fld_division FROM tbl_division ORDER BY fld_division";
$query_limit_WADADynListtbl_division = sprintf("%s LIMIT %d, %d", $query_WADADynListtbl_division, $startRow_WADADynListtbl_division, $maxRows_WADADynListtbl_division);
$WADADynListtbl_division = mysql_query($query_limit_WADADynListtbl_division, $con_evo) or die(mysql_error());
$row_WADADynListtbl_division = mysql_fetch_assoc($WADADynListtbl_division);

if (isset($_GET['totalRows_WADADynListtbl_division'])) {
$totalRows_WADADynListtbl_division = $_GET['totalRows_WADADynListtbl_division'];
} else {
$all_WADADynListtbl_division = mysql_query($query_WADADynListtbl_division);
$totalRows_WADADynListtbl_division = mysql_num_rows($all_WADADynListtbl_division);
}
$totalPages_WADADynListtbl_division = ceil($totalRows_WADADynListtbl_division/$maxRows_WADADynListtbl_division)-1;?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../../_dataimages/",
'FileName' => "[FileName]",
'DefaultFileName' => "".((isset($_POST["fld_image"]))?$_POST["fld_image"]:"") ."",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php?> <<<<<---------------------------------------------////////////
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "fld_image2", "0", "", "false", $WA_UploadResult1_Params);
}
?>
<?php
// WA Application Builder Update
if (isset($_POST["Update"])) // Trigger
{
$WA_connection = $con_evo;
$WA_table = "tbl_news";
$WA_redirectURL = "tbl_news_Detail.php?fld_id=".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."";
$WA_keepQueryString = false;
$WA_indexField = "fld_id";
$WA_fieldNamesStr = "fld_division|fld_image|fld_headline|fld_intro|fld_content|fld_show";
$WA_fieldValuesStr = "".((isset($_POST["fld_division"]))?$_POST["fld_division"]:"") ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."" . "|" . "".((isset($_POST["fld_headline"]))?$_POST["fld_headline"]:"") ."" . "|" . "".((isset($_POST["fld_intro"]))?$_POST["fld_intro"]:"") ."" . "|" . "".((isset($_POST["fld_content"]))?$_POST["fld_content"]:"") ."" . "|" . "".((isset($_POST["fld_show"]))?$_POST["fld_show"]:"") ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''|',none,''|',none,''";
$WA_comparisonStr = "=|=|=|=|=|=";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);

$WA_where_fieldValuesStr = "".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."";
$WA_where_columnTypesStr = "none,none,NULL";
$WA_where_comparisonStr = "=";
$WA_where_fieldNames = explode("|", $WA_indexField);
$WA_where_fieldValues = explode("|", $WA_where_fieldValuesStr);
$WA_where_columns = explode("|", $WA_where_columnTypesStr);
$WA_where_comparisons = explode("|", $WA_where_comparisonStr);

$WA_connectionDB = $database_con_evo;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$updateParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WhereObj = WA_AB_generateWhereClause($WA_where_fieldNames, $WA_where_columns, $WA_where_fieldValues, $WA_where_comparisons );
$WA_Sql = "UPDATE `" . $WA_table . "` SET " . $updateParamsObj->WA_setValues . " WHERE " . $WhereObj->sqlWhereClause . "";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}
?>


What's going on here then?

Sign in to reply to this post

Dani Chankhour

To fix the error you are getting you need to remove that line of code from your page:

<?php?>

Let me know if you still can't upload after fixing the error.

Sign in to reply to this post

mrs

OK so I removed that line of code, and the error code at the top of the page has now disappeared, however, that hasn't rectified my problem of the upload not being available. This is on the update page. See image attached.

There is a problem on the insert page too. I have html editor applied there and the upload tab works to a degree, but the link tab has the browse button which when it is clicked it opens a new window but the page cannot be found!

I've checked the files created by html editor, and they all seem to be present, so I have no idea about how to rectify this.

Sign in to reply to this post

mrs

Just to confirm, the problem is both local and remote

Sign in to reply to this post

mrs

I just came to check if any response had been made and found the image I had tried to upload didn't, so I have uploaded it again... cor, I'm even having trouble with the upload interface here!

I assume it is because the image was about 380 pixels deep instead of 280. Can you up the size of the image dimensions for uploading because I have had to reduce image size so much that you are unable to see what is in them!

Anyway, my problem of the image upload not working in the html editor still exists! Could you please advise?

Thanks.

Sign in to reply to this post

neilo

Hiya, Did you enable Advanced File Management via the 'Customise Global Settings' button in the editor interface?

Sign in to reply to this post

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...