Witam, mam problem z kodem który w Eval() wyrzuca błąd:
Cytat
Parse error: syntax error, unexpected T_VARIABLE in /var/www/www/private/lovecms/system/class/tpl.class.php(140) : eval()'d code on line 1
Wycinek kodu:
<?php
while(list
($key,) = each($
{$array_name}[$i])) {
if(${$array_name}[$i]['type'] == 'php')
{
if($key == 'content')
{
echo '<h2>' .$foobar. '</h2>'; $temp_code = str_replace($this -> start . $key . $this -> end, $chronoz, $temp_code); }
else
{
$temp_code = str_replace($this -> start . $key . $this -> end, $
{$array_name}[$i][$key], $temp_code); }
}
else
{
}
}
?>
A tu kod który trafia do Eval():
<?php
$all_content = @mysql_query("SELECT * FROM " . DB_PREFIX
. "content ORDER BY title ASC"); {
print '<li><a href="' . LOVE_URL
. '/modules/content/?id=' . $page['id'] . '">' . stripslashes($page['title']) . '</a></li>'; }
?>
Oraz drugi który trafia do Eval():
<?php
$main = mysql_query("SELECT * FROM " . DB_PREFIX
. "colmenu_mnu WHERE parent = '0' ORDER BY weight ASC"); if($rows > 0) {
$mid = 0; // Used to determine the Active menu
$pid = 0; // Used to determine the Parent menu
if( isset($_GET['mid']) ) { if( isset($_GET['pid']) ) { $pid = intval($_GET['pid']); } }
print '<ul id="mainlevel">';
print '<li><a href="' . LOVE_URL
. $foo['link'] . '&mid=' . $foo['id'] .'&pid='. $foo['id'] . '" class="mainlevel" ';
if( $mid == $foo['id'] ) { print 'id="active_menu"'; }
if( $pid == $foo['id'] ) {
$bar = @mysql_query("SELECT * FROM " . DB_PREFIX
. "colmenu_mnu WHERE parent = '" . $foo['id'] . "' ORDER BY weight ASC");
if( $whoda > 0) {
print '<li><a href="' . LOVE_URL
. $subfoo['link'] . '&mid=' . $subfoo['id'] . '&pid=' . $subfoo['parent'] . '" class="mainlevel" ';
if( $mid == $subfoo['id'] ) { print 'id="active_menu"'; }
}
}
}
}
}
else
{
}
?>
Nie mam zielonego pojęcia gdzie jest błąd, proszę o pomoc.
Kod jest z
LoveCMS.
Pozdrawiam, WebNuLL
Ten post edytował erix 12.06.2009, 20:56:23
Powód edycji: [erix] przeniosłem