Fix saving with apostrophes

This commit is contained in:
james 2009-10-15 21:58:51 +00:00
parent 566ae2d67f
commit b2e7797a24

View File

@ -129,11 +129,11 @@ case 'dialog_choose':
case 'email_save':
print_r($_POST);
$id = intval($_POST['emails_id']);
$name = mysql_real_escape_string($_POST['name']);
$description = mysql_real_escape_string($_POST['description']);
$from = mysql_real_escape_string($_POST['from']);
$subject = mysql_real_escape_string($_POST['subject']);
$bodyhtml = mysql_real_escape_string($_POST['bodyhtml']);
$name = mysql_real_escape_string(stripslashes($_POST['name']));
$description = mysql_real_escape_string(stripslashes($_POST['description']));
$from = mysql_real_escape_string(stripslashes($_POST['from']));
$subject = mysql_real_escape_string(stripslashes($_POST['subject']));
$bodyhtml = mysql_real_escape_string(stripslashes($_POST['bodyhtml']));
$type = mysql_real_escape_string($_POST['type']);
$key = mysql_real_escape_string($_POST['key']);
$fcid = mysql_real_escape_string($_POST['fcid']);
@ -229,7 +229,7 @@ case 'dialog_edit':
<td colspan="2" class="input">
<table width="100%"><tr><td width="85%">
<div id="fck">
<textarea id="bodyhtml" name="bodyhtml" rows=6 cols=80><?=$bodyhtml?>hi</textarea>
<textarea id="bodyhtml" name="bodyhtml" rows=6 cols=80><?=$bodyhtml?></textarea>
</div>
</td><td width="15%">
<select name="insert_field" size="20" style="height:300" >
@ -253,6 +253,9 @@ case 'dialog_edit':
<script type="text/javascript">
var comm_dialog_edit_saved = false;
$("#comm_dialog_edit_save_button").click(function () {
var oFCKeditor = FCKeditorAPI.GetInstance('bodyhtml') ;
var value = oFCKeditor.GetHTML();
$('#bodyhtml').val(value);
$("#debug").load("<?=$config['SFIABDIRECTORY']?>/admin/communication.php?action=email_save", $("#comm_dialog_edit_form").serializeArray(),
function() {
comm_dialog_edit_saved = true;
@ -294,9 +297,8 @@ case 'dialog_edit':
oFCKeditor.ToolbarSet = 'sfiab';
oFCKeditor.Width="100%";
oFCKeditor.Height=300;
$('#fck').html(oFCKeditor.CreateHtml());
// oFCKeditor.ReplaceTextarea() ;
// $('#fck').html(oFCKeditor.CreateHtml());
oFCKeditor.ReplaceTextarea() ;
</script>
<?
exit;