Ребята всем привет выручайте как правильно в системной папке вставить код что бы не выдовало ошибку сервера код дам ниже
Добавлено 05.01.14 в 14:14:28:
if ($user[\'up_panel\'] == 0)
{
echo \"<table style=\'width:100%\' cellspacing=\'0\' cellpadding=\'0\'><tbody><tr>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
echo \"<a href=\'/umenu.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'><img src=\'/images/start.png\'></a>\";
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
if ($user[\'pol\'] == 1) {
echo \"<a href=\'/info.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'><img src=\'/images/man.png\' alt=\'Я\' /></a>\";
} else {
echo \"<a href=\'/info.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'><img src=\'/images/woman.png\' alt=\'Я\' /></a>\";
}
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
if ($k_new!=0 && $k_new_fav==0) {
echo \"<a href=\'/new_mess.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'><img src=\'/images/mess.png\'> <span class=\'event\'>$k_new</span></a>\\n\";
} else {
echo \"<a href=\'/konts.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'><img src=\'/images/mess.png\'></a>\\n\";
}
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
if ($jn>0) {
echo \"<a href=\'/jurnal.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'><img src=\'/images/journal.png\'> <span class=\'event\'>$jn</span></a>\\n\";
} else {
echo \"<a href=\'/jurnal.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'><img src=\'/images/journal.png\'></a>\\n\";
}
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;white-space:nowrap;\'>\";
if ($lenta>0) {
echo \"<a href=\'/lenta.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'><img src=\'/images/lenta.png\'> <span class=\'event\'>$lenta</span></a>\\n\";
} else {
echo \"<a href=\'/lenta.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'><img src=\'/images/lenta.png\'></a>\\n\";
}
echo \"</td>\";
echo \"</tr></tbody></table>\";
}
elseif ($user[\'up_panel\'] == 1)
{
echo \"<table style=\'width:100%\' cellspacing=\'0\' cellpadding=\'0\'><tbody><tr>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
echo \"<a href=\'/umenu.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Старт</a>\";
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
echo \"<a href=\'/info.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Я</a>\";
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
if ($k_new!=0 && $k_new_fav==0) {
echo \"<a href=\'/new_mess.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Почта <span class=\'event\'>$k_new</span></a>\\n\";
} else {
echo \"<a href=\'/konts.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Почта</a>\\n\";
}
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
if ($jn>0) {
echo \"<a href=\'/jurnal.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Журнал <span class=\'event\'>$jn</span></a>\\n\";
} else {
echo \"<a href=\'/jurnal.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Журнал</a>\\n\";
}
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;white-space:nowrap;\'>\";
if ($lenta>0) {
echo \"<a href=\'/lenta.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Лента <span class=\'event\'>$lenta</span></a>\\n\";
} else {
echo \"<a href=\'/lenta.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Лента</a>\\n\";
}
echo \"</td>\";
echo \"</tr></tbody></table>\";
}
else
{
echo \"<table style=\'width:100%\' cellspacing=\'0\' cellpadding=\'0\'><tbody><tr>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
echo \"<a href=\'/umenu.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>С</a>\";
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
echo \"<a href=\'/info.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Я</a>\";
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
if ($k_new!=0 && $k_new_fav==0) {
echo \"<a href=\'/new_mess.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>П <span class=\'event\'>$k_new</span></a>\\n\";
} else {
echo \"<a href=\'/konts.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>П</a>\\n\";
}
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;border-right: 1px solid #9c9aff;white-space:nowrap;\'>\";
if ($jn>0) {
echo \"<a href=\'/jurnal.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Ж <span class=\'event\'>$jn</span></a>\\n\";
} else {
echo \"<a href=\'/jurnal.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Ж</a>\\n\";
}
echo \"</td>\";
echo \"<td style=\'vertical-align:top;width:20%;white-space:nowrap;\'>\";
if ($lenta>0) {
echo \"<a href=\'/lenta.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Л <span class=\'event\'>$lenta</span></a>\\n\";
} else {
echo \"<a href=\'/lenta.php\' style=\'text-align:center;display:block;padding:1px;font-size:small;\'>Л</a>\\n\";
}
echo \"</td>\";
echo \"</tr></tbody></table>\";
}
if (mysql_result(mysql_query(\"SELECT COUNT(*) FROM `frends_new` WHERE `to` = \'$user[id]\' LIMIT 1\", 0) > 0)
{
echo \"<div style=\'padding-top:2px;padding-left:2px;padding-bottom:0px;border-top:solid #9c9aff;border-width:1px;\'>\";
echo \"<a href=\'/frend_new.php\'>Предложение дружбы <span class=\'event\'>
$zoz</span>
</a>\\n\";
echo \"</div>\";
}
echo \"</div>\";
echo \"<td class=\'auts\'>\";
echo \"</td>\";
echo \"</tr></table>\";
if (isset($_GET[\'close_help\']) && isset($user) && mysql_result(mysql_query(\"SELECT COUNT(*) FROM `putevoditel_us` WHERE `id_url` = \'\".esc($_SERVER[\'PHP_SELF\']).\"\' AND `id_user` = \'\".$user[\'id\'].\"\' \", 0) == 0) {
mysql_query(\"INSERT INTO `putevoditel_us` ( `id_url`, `id_user`, `close`) values(\'\".intval($_GET[\'close_help\']).\"\', \'\".$user[\'id\'].\"\', \'1\') \"
}
$help = mysql_fetch_assoc(mysql_query(\"SELECT * FROM `putevoditel` WHERE `str_url` = \'\".esc($_SERVER[\'PHP_SELF\']).\"\' \");
$off_on = mysql_fetch_assoc(mysql_query(\"SELECT * FROM `putevoditel_us` WHERE `id_url` = \'\".$help[\'id\'].\"\' AND `id_user` = \'\".$user[\'id\'].\"\' \");
if ($user[\'date_reg\']>time()-$help[\'time\'] && $_SERVER[\'PHP_SELF\'] == $help[\'str_url\'] && $off_on[\'close\'] == 0 && isset($user)) {
$help[\'help_text\'] = str_replace(\'[user_nick]\', $user[\'nick\'], $help[\'help_text\']);
echo \'<div class = \"p_m\">\';
echo \'<img src=\"/style/user/user.png\" width = \"50\" height = \"50\"> \';
echo $help[\'help_text\'].\'<br />\';
echo \'<a href=\"?close_help=\'.$help[\'id\'].\'\">Больше не показывать</a>\';
echo \'</div>\';
}
я хочу где if ($user[\'up_panel\'] == 0)
заместо того кода что там вставить этот но не знаю как уже несколько раз пытался выдавало ошибку сервера
код
if ($k_new!=0 && $k_new_fav==0)
echo \"<img src=\'/style/pic/mess0.png\' alt=\'$k_new\' /> <a href=\'/new_mess.php\'><u>+ $k_new</u></a> \\n\";
if ($k_new_fav!=0)
echo \"<a href=\'/new_mess.php\'><img src=\'/style/pic/mail.gif\' alt=\'$k_new_fav\' /></a> \\n\";
$knj=mysql_result(mysql_query(\"SELECT COUNT(*) FROM `present_jurnal` WHERE `id_user` = \'$user[id]\' AND `read` = \'0\'\", 0);
if ($knj>0)
echo \"<img src=\'/style/pic/podarok.gif\' alt=\'\' class=\'icon\'/> <a href=\\\"/present/jurnal.php\\\" title=\\\"Gifts\\\"><u>+ $knj</u></a> \\n\";
$nj=mysql_result(mysql_query(\"SELECT COUNT(*) FROM `jurnal` WHERE `id_kont` = \'$user[id]\' AND `read` = \'0\'\", 0);
if ($nj>0)echo \"<img src=\'/style/pic/uvedom.png\' alt=\'\' /> <a href=\\\"/jurnal.php\\\" title=\\\"Jurnal\\\"><u>+ $nj</u></a> \\n\";
$nj=mysql_result(mysql_query(\"SELECT COUNT(*) FROM `ocenka` WHERE `id_kont` = \'$user[id]\' AND `read` = \'0\'\", 0);
if ($nj>0)echo \"<img src=\'/style/pic/5.png\' alt=\'\' /> <a href=\\\"/ocenka.php\\\" title=\\\"Jurnal\\\"><u>+ $nj</u></a> \\n\";
$lenta = mysql_result(mysql_query(\"SELECT COUNT(*) FROM `lenta` WHERE `id_kont` = \'$user[id]\' AND `read` = \'0\' \",0);
if($lenta>0) echo \"<img src=\'/style/pic/lenta.gif\' alt=\'\' class=\'icon\'/> <a href=\'/lenta.php\'><u>+ $lenta</u></a> \";
$obsuzh = mysql_result(mysql_query(\"SELECT COUNT(*) FROM `obsuzh` WHERE `id_kont` = \'$user[id]\' AND `read` = \'0\' \",0);
if($obsuzh>0) echo \"<img src=\'/style/pic/chat.png\' alt=\'\' class=\'icon\'/> <a href=\'/obsuzh.php\'><u>+ $obsuzh</u></a> \";
$new_g=mysql_result(mysql_query(\"SELECT COUNT(*) FROM `myguests` WHERE `id_ank` = \'$user[id]\' AND `read`=\'1\'\",0);
if($new_g!=0)echo \"<img src=\'/style/pic/gosti.png\' alt=\'\' /> <a href=\'/myguests.php\'><u>+ $new_g</u></a> \\n\";
$zoz = mysql_result(mysql_query(\"SELECT COUNT(*) FROM `frends_new` WHERE `to` = \'$user[id]\'\", 0);
if (mysql_result(mysql_query(\"SELECT COUNT(*) FROM `frends_new` WHERE `to` = \'$user[id]\' LIMIT 1\", 0) > 0)
{
echo \"<img src=\'/style/pic/user_add.png\' alt=\'\' /> <a href=\'/frend_new.php\'><u>+ $zoz</u></a> \";
}
$zoz = mysql_result(mysql_query(\"SELECT COUNT(*) FROM `fanat_obm` WHERE `to` = \'$user[id]\'\", 0);
if (mysql_result(mysql_query(\"SELECT COUNT(*) FROM `fanat_obm` WHERE `to` = \'$user[id]\' LIMIT 1\", 0) > 0)
{
echo \"<img src=\'/style/pic/readers.gif\' alt=\'\' /> <a href=\'/fanat_obm.php\'><u>+ $zoz</u></a> \";
}
$k_n_s_zak=0;
$q23=mysql_query(\"SELECT `id_them`, `time` FROM `forum_zakl` WHERE `id_user` = \'$user[id]\'\"
while ($zakl = mysql_fetch_array($q23))
{
$k_n_s_zak+=mysql_result(mysql_query(\"SELECT COUNT(*) FROM `forum_p` WHERE `id_them` = \'$zakl[id_them]\' AND `time` > \'$zakl[time]\'\",0);
}
if ($k_n_s_zak>0)echo \"<img src=\'/style/pic/edit.png\' alt=\'\' /> <a href=\\\"/zakl.php\\\" title=\\\"New Forum\\\"> <u>+ $k_n_s_zak</u></a><br/>\\n\";
Ну так исправляй,если удобней Нам нет