Anatoly
|
| Posted: 09/14/2002, 8:05 PM |
|
I liked article WYSIWYG Editor Integration in CodeCharge. I want to place this code to my site. But while translating with PHP to ASP I have mistakes all time. Could you help how to change a code of the project so that it worked on ASP?
|
|
|
 |
Rubino
|
| Posted: 09/17/2002, 7:16 PM |
|
I also had problems with the translation to ASP....
|
|
|
 |
fcy
|
| Posted: 09/20/2002, 8:40 PM |
|
Yes, I also have trouble...I can get it to the point of retreiving the data and editing but cannot get it to insert or update. ANY HELP WOULD BE APPRECIATED.
#############################################################################33
Here is my attempt at the asp in Custom Action...his original PHP from the Article is Below I used table Documents instead of wysywyg.
'-------------------------------
' Load all form fields into variables
'-------------------------------
fldContent = get_param("Content")
'-------------------------------
' Validate fields
'-------------------------------
if sAction = "insert" or sAction = "update" then
If len(swysiErr) > 0 then
exit sub
end if
end if
'-------------------------------
'-------------------------------
' Create SQL statement
'-------------------------------
select case sAction
case "insert"
sSQL = "insert into Documents (" &_
"Content)" &_
" values (" &_
tosql(fldContent, "Text") &_
")"
case "update"
sSQL = "update Documents set " & _
"[Content]=" & tosql(fldContent, "Text")& _
sSQL = sSQL & " where " & sWhere
case "delete"
sSQL = "delete from wysiwyg where " & sWhere
end select
'-------------------------------
#########################################################################
PHP
//-------------------------------
// Load all form fields into variables
//-------------------------------
$fldcontent = get_param("content");
//-------------------------------
// Validate fields
//-------------------------------
if($sAction == "insert" || $sAction == "update")
{
if(strlen($swysiwygErr)) return;
}
//-------------------------------
//-------------------------------
// Create SQL statement
//-------------------------------
switch(strtolower($sAction))
{
case "insert":
$sSQL = "insert into wysiwyg (" .
"content)" .
" values (" .
tosql($fldcontent, "Text") .
")";
break;
case "update":
$sSQL = "update wysiwyg set " .
"content=" . tosql($fldcontent, "Text");
$sSQL .= " where " . $sWhere;
break;
case "delete":
$sSQL = "delete from wysiwyg where " . $sWhere;
break;
}
//-------------------------------
|
|
|
 |
fcy
|
| Posted: 09/20/2002, 8:40 PM |
|
Yes, I also have trouble...I can get it to the point of retreiving the data and editing but cannot get it to insert or update. ANY HELP WOULD BE APPRECIATED.
#############################################################################33
Here is my attempt at the asp in Custom Action...his original PHP from the Article is Below I used table Documents instead of wysywyg.
'-------------------------------
' Load all form fields into variables
'-------------------------------
fldContent = get_param("Content")
'-------------------------------
' Validate fields
'-------------------------------
if sAction = "insert" or sAction = "update" then
If len(swysiErr) > 0 then
exit sub
end if
end if
'-------------------------------
'-------------------------------
' Create SQL statement
'-------------------------------
select case sAction
case "insert"
sSQL = "insert into Documents (" &_
"Content)" &_
" values (" &_
tosql(fldContent, "Text") &_
")"
case "update"
sSQL = "update Documents set " & _
"[Content]=" & tosql(fldContent, "Text")& _
sSQL = sSQL & " where " & sWhere
case "delete"
sSQL = "delete from wysiwyg where " & sWhere
end select
'-------------------------------
#########################################################################
PHP
//-------------------------------
// Load all form fields into variables
//-------------------------------
$fldcontent = get_param("content");
//-------------------------------
// Validate fields
//-------------------------------
if($sAction == "insert" || $sAction == "update")
{
if(strlen($swysiwygErr)) return;
}
//-------------------------------
//-------------------------------
// Create SQL statement
//-------------------------------
switch(strtolower($sAction))
{
case "insert":
$sSQL = "insert into wysiwyg (" .
"content)" .
" values (" .
tosql($fldcontent, "Text") .
")";
break;
case "update":
$sSQL = "update wysiwyg set " .
"content=" . tosql($fldcontent, "Text");
$sSQL .= " where " . $sWhere;
break;
case "delete":
$sSQL = "delete from wysiwyg where " . $sWhere;
break;
}
//-------------------------------
|
|
|
 |
Fred
|
| Posted: 09/20/2002, 9:06 PM |
|
trying to keep visible
|
|
|
 |
|