Kann keine Navi in mein Layout einbauen -> SQL-Fehler

Gesperrt
mcelliott
Beiträge: 11
Registriert: So 29. Sep 2002, 02:38
Kontaktdaten:

Kann keine Navi in mein Layout einbauen -> SQL-Fehler

Beitrag von mcelliott »

Hi Leute,

habe ein Problem die feste Navigation in mein Layout einzubauen.
Immer, wenn ich über das Backend den Code in mein Layout schreibe,
abspeichere und es dann wieder öffnen ist der code nicht da.

In meinem log steht etwas von SQL Fehler...

Muss ich noch etwas in meiner config.php einstellen.

Gruß
Thomas
Björn
Beiträge: 276
Registriert: Di 17. Sep 2002, 18:25
Kontaktdaten:

Beitrag von Björn »

Wäre ganz gut, wenn Du das log mal posten würdest.
mcelliott
Beiträge: 11
Registriert: So 29. Sep 2002, 02:38
Kontaktdaten:

Hier ist mein Log

Beitrag von mcelliott »

Code: Alles auswählen

2002-Sep-Mon 08:48:08: error 1064 (You have an error in your SQL syntax near 'background']='#d2d2d2';\" onMouseOut=\"this.style['background']='#d2d2d2';\" bgc' at line 1) - Invalid SQL: UPDATE con_lay SET name='Layout 01', description='Container 1: (Login), Container 2: (Überschrift), Container 3: (Navigation), Container 4,5,6: (Inhalt)', code='?>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<meta name="generator" content="Adobe GoLive 6">
              <link rel="StyleSheet" href="css/styles.css" type="text/css">
              <SCRIPT SRC="js/standard.js" TYPE="text/javascript"></SCRIPT>
		<title>eXelence</title>
	</head>

	<body bgcolor="#ffffff">
		<table width="180" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="780"><img src="img_site/head.jpg" alt="" width="780" height="78" border="0"></td>
			</tr>
			<tr height="25">
				<td valign="middle" bgcolor="#ff4000" width="780" height="25"><?PHP CMS_CONTAINER[1] ?> 
     <!-- begin main-navigation--> 
     <table border="0" width="620" cellspacing="0" cellpadding="0" id="tmenu"> 
       <tr> 
        <td id="tmenu"> 
     <?php 
     $i=1; 
     while ($i<=count($tree[1])) 
     {if ($tree[1][$i][idcat] == $idcat) 
       {echo "".$tree[1][$i][name]." ";} 
     else 
       {echo "<a href=\"".$tree[1][$i][link]."\" onMouseOver=\"on('".$tree[1][$i][name]."');return true;\" onMouseOut=\"off();return true;\" id=\"tmenu\">".$tree[1][$i][name]."</a> ";} 
     if ($i != count($tree[1])) echo "&nbsp;&nbsp;&nbsp;"; 
     $i++;} 
     ?> 
          </td> 
        </tr> 
     </table> 
      <!-- begin main-navigation-->    
				
				</td>
			</tr>
			<tr>
				<td width="780">
					<table width="780" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="150" bgcolor="ff4000">
<?PHP CMS_CONTAINER[2] ?>
<!-- begin second-navigation--> 
              <?php 
              $i=1; 
              if (count($tree[1])) 
                 {echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n"; 
                   while ($i<=count($tree[1])) 
                  //hier ist die 1. Abfrage: 
                  {if ($tree[1][$i][idcat] == $subid) 
                  {$j=1; 
                        while ($j<=count($tree[1][$i])) 
                            {echo "<tr>\n"; 
                           echo "\n  <td id=\"lmenu\""; 
                  //hier ist die 2. Abfrage: 
                  if ($tree[1][$i][$j][idcat] == $idcat) {echo "bgcolor=\"#d2d2d2\"";} 
                        else {echo " onMouseOver=\"this.style['background']='#d2d2d2';\" onMouseOut=\"this.style['background']='#d2d2d2';\" bgcolor=\"#d2d2d2\"";} 
                             echo " nowrap><a href=\"".$tree[1][$i][$j][link]."\" onMouseOver=\"on('".$tree[1][$i][$j][name]."');return true;\" onMouseOut=\"off();return true;\" id=\"left-menu\">".$tree[1][$i][$j][name]."</a></td></tr>"; 
                                 $j++;}} 
                                      $i++;} 
                      echo "</table>\n";} 
               ?> 
            <!-- end second-navigation-->    
<img src="img_site/1pix.gif" width="1" height="550" border="0"></td>
							<td><?PHP CMS_CONTAINER[3] ?><img src="img_site/1pix.gif" border="0"  width="1" height="550" ></td>
							<td width="150" bgcolor="ff4000"><img src="img_site/1pix.gif"  width="1" height="550" border="0"></td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td width="780"></td>
			</tr>
		</table>
	</body>

</html>














', author='mcelliott', lastmodified='2002-09-30 08:48:08' WHERE idlay='1'
2002-Sep-Mon 08:51:43: error 1064 (You have an error in your SQL syntax near 'background']='#464F6C';\" onMouseOut=\"this.style['background']='#525A73';\" bgc' at line 1) - Invalid SQL: UPDATE con_lay SET name='Layout 01', description='Container 1: (Login), Container 2: (Überschrift), Container 3: (Navigation), Container 4,5,6: (Inhalt)', code='?>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<meta name="generator" content="Adobe GoLive 6">
              <link rel="StyleSheet" href="css/styles.css" type="text/css">
              <SCRIPT SRC="js/standard.js" TYPE="text/javascript"></SCRIPT>
		<title>eXelence</title>
	</head>

	<body bgcolor="#ffffff">
		<table width="180" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="780"><img src="img_site/head.jpg" alt="" width="780" height="78" border="0"></td>
			</tr>
			<tr height="25">
				<td valign="middle" bgcolor="#ff4000" width="780" height="25"><?PHP CMS_CONTAINER[1] ?>    
				
				</td>
			</tr>
			<tr>
				<td width="780">
					<table width="780" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="150" bgcolor="ff4000">
<?PHP CMS_CONTAINER[2] ?>
<!-- begin main-navigation kategorien unterhalb des ersten baums (tree 1)--> 
        <?php 
$i=1; 
if (count($tree[1])) 
   // {echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"150\">\n"; 
   while ($i<=count($tree[1])) 
      { 
      //echo "<tr>\n"; 
   //   echo "\n  <td valign=\"top\" "; 
      // unterscheidung bg aktiv/passiv  if ($tree[1][$i][idcat] == $subid) {echo "bgcolor=\"#464F6C\"";} 
      //   else { 
      //   echo " onMouseOver=\"this.style['background']='#464F6C';\" onMouseOut=\"this.style['background']='#525A73';\" bgcolor=\"#525A73\""; 
         // } 
   //   echo " nowrap><a href=\"".$tree[1][$i][link]."\" onMouseOver=\"on('".$tree[1][$i][name]."');return true;\" onMouseOut=\"off();return true;\" id=\"left-menu\">".$tree[1][$i][name]."</a></td>\n</tr>\n"; 
   echo "<tr><td valign=\"top\" ><img src=\"images/trans.gif\" width=\"7\" height=\"40\">"; 
   echo "<a href=\"".$tree[1][$i][link]."\" onMouseOver=\"MM_swapImage('".$tree[1][$i][name]."','','images/buttons/".$tree[1][$i][name]."_leucht.jpg',1)\" onMouseOut=\"MM_swapImgRestore()\">"; 
   echo "<img src=\"images/buttons/".$tree[1][$i][name].".jpg\" alt=\"".$tree[1][$i][name]."\" name=\"".$tree[1][$i][name]."\" width=\"100\" height=\"40\" border=\"0\" align=\"bottom\" id=\"".$tree[1][$i][name]."\"></a></td></tr>"; 
       
      /**if ($tree[1][$i][idcat] == $subid) 
                    {$j=1; 
                         while ($j<=count($tree[1][$i])) 
         {echo "<tr>\n"; 
                         echo "\n  <td align=\"center\""; 
                         if ($tree[1][$i][$j][idcat] == $idcat) {echo "bgcolor=\"#626C8E\"";} 
                            else {echo " onMouseOver=\"this.style['background']='#626C8E';\" onMouseOut=\"this.style['background']='#6C7698';\" bgcolor=\"#6C7698\"";} 
                         echo " nowrap><a href=\"".$tree[1][$i][$j][link]."\" onMouseOver=\"on('".$tree[1][$i][$j][name]."');return true;\" onMouseOut=\"off();return true;\" id=\"left-menu\">".$tree[1][$i][$j][name]."</a></td></tr>"; 
                         $j++;}}*/ 
      $i++;} 
//   echo "</table>\n";} 
?> 
        <!-- end main-navigation-->    
<img src="img_site/1pix.gif" width="1" height="550" border="0"></td>
							<td><?PHP CMS_CONTAINER[3] ?><img src="img_site/1pix.gif" border="0"  width="1" height="550" ></td>
							<td width="150" bgcolor="ff4000"><img src="img_site/1pix.gif"  width="1" height="550" border="0"></td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td width="780"></td>
			</tr>
		</table>
	</body>

</html>
Bitte um Hilfe[/quote]
Sven777b
Beiträge: 503
Registriert: Mi 18. Sep 2002, 00:00
Wohnort: Sachsen
Kontaktdaten:

Beitrag von Sven777b »

ich bin mir nicht 100pro sicher.. aber ich glaube das hängt mit den MagicQuotes in der php.ini zusammen. Das muss auf "On" stehen.

Jedenfalls fällt es auf, dass er das erste einfache Anführungszeichen in deinem Code anmeckert.
Module zum anschauen:
bei Sven: http://contenido-module.de
bei Pulk : http://spielwiese.pulk.net

Der-Dirigent: http://der-dirigent.de
Gesperrt