$sql = "select id,owner,title,text,script,menu from pages where name='$page' limit 1";
$r = mysql_query($sql);
list($_id,$_owner,$_title,$_text,$_script,$_menu) = mysql_fetch_row($r);
mysql_free_result($r);
if ($_owner) {
$sql = "select id,menu from pages where id='$_owner' limit 1";
$r = mysql_query($sql);
list($_id,$_menu) = mysql_fetch_row($r);
mysql_free_result($r);
}
echo " $_menu \n";
$sql = "select id,menu,name,url from pages where owner='$_id' and status=0 order by position,binary menu";
$r = mysql_query($sql);
for ($i=0; $i | \n";
$sql = "select id,owner,title,text,script,date_format(time, '%d.%m.%Y') from pages where name='$page' limit 1";
$r = mysql_query($sql);
$a = mysql_fetch_row($r);
mysql_free_result($r);
$_script = $a[4];
echo "$a[2] \n";
if ($a[4]) {
$title = $a[2];
$text = $a[3];
$sql = "select text from pages_script where id='$a[4]' limit 1";
$r = mysql_query($sql);
list($script) = mysql_fetch_row($r);
mysql_free_result($r);
$script = str_replace('index.php', 'index-v.php', $script);
$script = str_replace(' size="-1"', ' size="+0"', $script);
$script = str_replace(' size=-1', ' size=+0', $script);
$script = str_replace(' color=888888', ' color=333333', $script);
$script = str_replace(' color=gray', ' color=333333', $script);
$script = str_replace('#c0c0c0', '#666', $script);
eval($script);
} else {
echo "\n";
$sql = "select id,title,name,url from pages where owner='$a[0]' and status=0 order by position,binary menu";
$r = mysql_query($sql);
for ($i=0; $i$b[1]";
}
mysql_free_result($r);
echo " \n";
$a[3] = str_replace('index.php', 'index-v.php', $a[3]);
$a[3] = str_replace(' size="-1"', ' size="+0"', $a[3]);
$a[3] = str_replace(' size=-1', ' size=+0', $a[3]);
$a[3] = str_replace(' color=888888', ' color=333333', $a[3]);
$a[3] = str_replace(' color=gray', ' color=333333', $a[3]);
$a[3] = str_replace('#c0c0c0', '#666', $a[3]);
echo $a[3];
}
?>
|