Размер файла: 2.54Kb
<?php
$line_ex = explode('|',trim($_POST['vis_el_'.$vis_id.'']));
$dostup = $line_ex[0];
$typ = $line_ex[1];
echo '
<table>
<tbody>
<tr>
<td>
';
if ($_POST['vis_edit_free'] == '0')
{
echo '
<input name="vis_edit_id" type="radio" value="'.$vis_id.'"><br><br>
<input class="vis_knopka_edit" type="submit" value="">
';
}
echo' </td>
<td width="100%">
';
if ($dostup == 'user')
echo '<div class="only_user">';
else
echo '<div>';
// работа интерпретатора
if ($typ == 'link')
{
$href = ($line_ex[2]);
$mess1 = trim(($line_ex[3]));
include($vis.'set_q.php');
$name = $mess1;
echo '<a href="'.$href.'">'.($name).'</a><br>';
}
elseif ($typ == 'polosa')
{
echo '<hr>';
}
elseif ($typ == 'ramka')
{
$mess1 = $line_ex[2];
include($vis.'set_q.php');
$text = $mess1;
echo '<div class="ramka">'.($text).'</div>';
}
elseif ($typ == 'area')
{
$mess1 = $line_ex[4];
include($vis.'set_q.php');
$text = $mess1;
$str = trim($line_ex[2]);
echo '<textarea style="width: 80%;" rows='.$str.'>'.($text).'</textarea><br>';
}
elseif ($typ == 'error')
{
$mess1 = $line_ex[2];
include($vis.'set_q.php');
$text = $mess1;
echo '<div class="error">'.($text).'</div>';
}
elseif ($typ == 'zagolovok')
{
$mess1 = $line_ex[2];
include($vis.'set_q.php');
$text = $mess1;
echo '<div class="mess1">'.($text).'</div>';
}
elseif ($typ == 'image')
{
$scr = $line_ex[2];
$width = $line_ex[3];
$height = $line_ex[4];
$alt = htmlspecialchars($line_ex[5]);
$border = trim($line_ex[6]);
echo '<img src="'.$scr.'" width="'.$width.'" height="'.$height.'" alt="'.$alt.'" border="'.$border.'">';
}
elseif ($typ == 'modul')
{
$moduls = htmlspecialchars($line_ex[2]);
if (is_file($cms.'str/'.$moduls.''))
include($cms.'str/'.$moduls.'');
else
echo '<div class="error">Модуль не найден.</div>';
}
elseif ($typ == 'text')
{
$mess1 = $line_ex[2];
include($vis.'set_q.php');
$text = $mess1;
echo '<div class="mess2">'.($text).'</div>';
}
elseif ($typ == 'knopka')
{
$mess1 = $line_ex[2];
include($vis.'set_q.php');
$name = $mess1;
$href = htmlspecialchars($line_ex[3]);
echo '<a class="knopka" href="'.$href.'">'.($name).'</a><br>';
}
echo '</div>'; // закончили работу интерпретатора
echo '
</td>
</tr>
</tbody>
</table>
';
?>