View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Irite messes up format (how do i fix this again)

Thread began 3/16/2009 1:21 pm by cgarber101175 | Last modified 4/25/2009 10:23 pm by cgarber101175 | 3604 views | 14 replies

cgarber101175

Ok..lets try ths again

Now I am on a different site and trying irite once again. Its doing the same thing. I paste something into the irite text editor and it looks fine. Then I update the record (I submit the form) and the wysiwyg doesn't quite look like wysiwyg any more. It looks fine on the other side but since I am building this site for people who don't know html, it would be super if this would stop happening. Here is the code for one of the entire admin pages:

<?php require_once('Connections/davidmiller.php'); ?>
<?php require_once("../WA_iRite/WARichEditorPHP.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;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE home SET home_Text=%s WHERE home_ID=%s",
GetSQLValueString($_POST['home_Text'], "text"),
GetSQLValueString($_POST['home_ID'], "int"));

mysql_select_db($database_davidmiller, $davidmiller);
$Result1 = mysql_query($updateSQL, $davidmiller) or die(mysql_error());
}

mysql_select_db($database_davidmiller, $davidmiller);
$query_index = "SELECT * FROM home";
$index = mysql_query($query_index, $davidmiller) or die(mysql_error());
$row_index = mysql_fetch_assoc($index);
$totalRows_index = mysql_num_rows($index);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Miller Group America, LLC</title>
<style type="text/css" media="all">
<!--

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6 {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
}

body {
background-color: #510D02;
color: #000;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
line-height: 14px;
margin: 0 0 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
padding: 0 0 0 0; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
text-align: center; /* Centers the page content container in IE 5 browsers. */
}
/* Commonly used to style page titles. */
h1 {
color: #990000;
font-size: 14px;
font-weight: bold;
line-height: 14px;
}
/* Commonly used to style section titles. */
h2 {
color: #990000;
font-size: 12px;
font-weight: bold;
line-height: 14px;
}
/* Sets the style for unvisited links. */
a, a:link {
color: #000;
font-weight: bold;
text-decoration: none;
}
/* Sets the style for visited links. */
a:visited {
color: #990000;
font-weight: bold;
}
/* Sets the style for links on mouseover. */
a:hover {
color: #990000;
}
/* Sets the style for a link that has focus. */
a:focus {
color: #000;
}
/* Sets the style for a link that is being activated/clicked. */
a:active {
color: #990000;
}

#outerWrapper {
background-color: #E6C7AB;
margin: 0 auto 0 auto; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
text-align: left; /* Redefines the text alignment defined by the body element. */
width: 780px;
}
#outerWrapper #header {
background-color: #B77A4D;
border-bottom: solid 1px #666; /* Sets the bottom border properties for an element using shorthand notation */
font-size: 18px;
font-weight: bold;
line-height: 15px;
padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
color: #FFF;
}
#outerWrapper #topNavigation {
background-color: #E6C7AB;
border-bottom: solid 1px #666; /* Sets the bottom border properties for an element using shorthand notation */
height: 25px;
padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
}
#outerWrapper #contentWrapper #leftColumn1 {
background-color: #F9E4D1;
border-right: solid 1px #666; /* Sets the right border properties for an element using shorthand notation */
float: left;
padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
width: 200px;
}
/* Contains the main page content. When using a mutliple column layout the margins will be set to account for the floated columns' width, margins, and padding. */
#outerWrapper #contentWrapper #content {
margin: 0 0 0 220px; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
}

#outerWrapper #contentWrapper .clearFloat {
clear: left;
display: block;
}
#outerWrapper #footer {
background-color: #E6C7AB;
border-top: solid 1px #666; /* Sets the top border properties for an element using shorthand notation */
padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
text-align: center;
}
-->
</style>
<style type="text/css" media="print">
<!--
/* It is common to set printer friendly styles such as a white background with black text. */
body {
background-color: #510D02;
background-image: none;
border-color: #000; /* Sets the border color properties for an element using shorthand notation */
color: #000;
}
-->
</style>
<!--[if IE 5]>
<style type="text/css">
/* IE 5 does not use the standard box model, so the column widths are overidden to render the page correctly. */
#outerWrapper #contentWrapper #leftColumn1 {
width: 220px;
}
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css">
/* The proprietary zoom property gives IE the hasLayout property which addresses several bugs. */
#outerWrapper #contentWrapper #content {
zoom: 1;
}
</style>
<![endif]-->
<script type="text/javascript" src="CSSMenuWriter/cssmw/menu.js"></script>

<style type="text/css" media="all">
<!--
a:link {
color: #990000;
}
-->
</style>
<!--[if lte IE 6]>
<style type="text/css" media="all">
@import url("CSSMenuWriter/cssmw/menu_ie.css");
</style>
<![endif]-->

<script type="text/javascript" src="CSSMenuWriter/cssmw0/menu.js"></script>

<style type="text/css" media="all">
<!--
@import url("CSSMenuWriter/cssmw0/menu.css");
-->
</style>
<!--[if lte IE 6]>
<style type="text/css" media="all">
@import url("CSSMenuWriter/cssmw0/menu_ie.css");
</style>
<![endif]-->

<script type="text/javascript" src="../CSSMenuWriter/cssmw1/menu.js"></script>

<style type="text/css" media="all">
<!--
@import url("../CSSMenuWriter/cssmw1/menu.css");
-->
</style>
<!--[if lte IE 6]>
<style type="text/css" media="all">
@import url("../CSSMenuWriter/cssmw1/menu_ie.css");
</style>
<![endif]-->

</head>

<body>

<p>&nbsp;</p>
<div id="outerWrapper">
<div id="header">The Miller Group America, LLC</div>
<div id="topNavigation">
<script type="text/javascript">if(window.attachEvent) { window.attachEvent("onload", function() { cssmw.intializeMenu('cssmw'); }); } else if(window.addEventListener) { window.addEventListener("load", function() { cssmw.intializeMenu('cssmw'); }, true); }</script>
</div>
<div id="contentWrapper">
<div id="leftColumn1"><h2>&nbsp;

<?php require_once("../CSSMenuWriter/cssmw1/menu.php"); ?>
</h2></div>
<div id="content">
<form action="<?php echo $editFormAction; ?>" method="post" id="form1">
<table>
<tr valign="baseline">
<td><?php
// WebAssist iRite: Rich Text Editor for Dreamweaver
$WARichTextEditor_1 = CreateRichTextEditor ("home_Text", "../WA_iRite/", "400px", "400px", "Default", "../custom/index_home_Text1.js", "".htmlentities($row_index['home_Text'], ENT_COMPAT, 'utf-8') ."");
?></td>
</tr>
<tr valign="baseline">
<td><input type="submit" value="Save changes" /></td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1" />
<input type="hidden" name="home_ID" value="<?php echo $row_index['home_ID']; ?>" />
</form>
<p>&nbsp;</p>
</div>
<br class="clearFloat" />
</div>
<div id="footer"><a href="index.php">home</a> | <a href="services.php">services</a> | <a href="about us.php">about us</a> | <a href="links.php">links</a> | <a href="directions.php">directions</a> | <a href="contact us.php">contact us</a><br />
<span class="style6">&copy; Copyright <?php echo date('Y');?> <a href="index.php">The Miller Group America, LLC</a> | All Rights Reserved. </span> </div>
</div>

</body>
</html>
<?php
mysql_free_result($index);
?>

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