Beispiel #1
0
             $comm_xfields = array();
             foreach ($xfields as $xVar => $x) {
                 if ($x['section'] != 'comments') {
                     continue;
                 } else {
                     $comm_xfields[$xVar] = check_text($_POST['x' . $xVar], true);
                 }
             }
             $xfields_serialized = serialize($comm_xfields);
         } else {
             $xfields_serialized = '';
         }
         foreach ($c_file as $c_line) {
             $var = get_values('comments', $c_line, false);
             if ($var['comment_id'] == $_POST['id']) {
                 $c_content .= $var['comment_id'] . DELIMITER . $var['timestamp'] . DELIMITER . $var['post_id'] . DELIMITER . $var['status'] . DELIMITER . $var['author_id'] . DELIMITER . check_text($_POST['author_name']) . DELIMITER . check_email($_POST['author_email']) . DELIMITER . check_url($_POST['author_www']) . DELIMITER . '' . DELIMITER . $xfields_serialized . DELIMITER . '' . DELIMITER . $var['ip_address'] . DELIMITER . $var['host'] . DELIMITER . $var['user_agent'] . DELIMITER . check_comment_text($_POST['comment_text']) . "\n";
             } else {
                 $c_content .= $c_line;
             }
         }
         if (mn_put_contents($dir['comments'] . 'comments_' . $_POST['post'] . '.php', $c_content)) {
             header('location: ./mn-comments.php?action=edit&post=' . $_POST['post'] . '&id=' . $_POST['id'] . '&back=edited');
             exit;
         } else {
             overall_header($lang['comm_comments'], $lang['comm_msg_put_contents_error'], 'error');
         }
     } else {
         overall_header($lang['comm_edit_comment'] . ' #' . $_POST['comment_id'], $lang['comm_msg_forbidden_author_name'], 'error');
     }
 } else {
     overall_header($lang['comm_edit_comment'] . ' #' . $_POST['comment_id'], $lang['comm_msg_too_short'], 'error');
    .star {color: crimson;}
    .backlink {padding: 0 0 0 300px;}
    .c {text-align: center;}
    a {color: blue;}
    a:hover {color: crimson;}
  </style>
  <title><?php 
echo $conf['web_title'] . ' | ' . $lang['comm_comment_addition'];
?>
</title>
  </head>
  <body>

  <?php 
if (isset($_POST['preview']) && !empty($_POST['comment_text'])) {
    echo '<div id="preview"><span id="simlegend">' . $lang['comm_preview'] . '</span>' . comment_format(check_comment_text($_POST['comment_text'])) . '</div>';
} else {
    echo '<div class="info-red"><img src="./stuff/img/icons/exclamation.png" alt="" /> ' . $error_msg . '</div>';
}
?>

    <form action="./mn-comments.php" method="post">
      <fieldset>
        <legend><?php 
echo $lang['comm_comment_addition'];
?>
</legend>
        <?php 
$xfields_rows = '';
if (file_exists(MN_ROOT . $file['xfields'])) {
    $xfields = get_unserialized_array('xfields');