Bug comments.php (news)  [Решено]

Общие заявки на решение проблем / Common applications for the solution of problems

Модераторы: Dame-danners, LieoLinneos, Longipongeoos

Аватар пользователя
Longipongeoos
Сообщений: 191
Зарегистрирован: 12 апр 2017, 16:50

Bug comments.php (news)

Сообщение Longipongeoos » 24 авг 2017, 15:30

Код: Выбрать все

$entry = $_GET["entry"];
$ogfile = "news.txt";
$oglines = file($ogfile);
list($date,$message,$author,$image,$subject,$key) = explode('||',$oglines[$entry]);
foreach($smilies as $key=>$value){
    $message = str_replace("$key", "$value", "$message");
}
echo "<table width=400 border=0 cellspacing=0 cellpadding=2><tr>
          <td class='title'>$subject</td>
  </tr>
  <tr>
    <td class='message'><img src=$image align=absmiddle> message</td>
  </tr>
  <tr>
          <td class='foot' align=right>Posted by, $author on date</td>
  </tr>
  <tr>
         <td height='4' background=''></td>
  </tr></table>Comments";
?>

Аватар пользователя
vol.team-servers
Администратор
Сообщений: 73
Зарегистрирован: 12 апр 2017, 14:05

Re: Bug comments.php (news)  [Решено]

Сообщение vol.team-servers » 25 авг 2017, 08:33

Код: Выбрать все

<tr>
    <td class='message'><img src=$image align=absmiddle> $message</td>
  </tr>
  <tr>
          <td class='foot' align=right>Posted by, $author on $date</td>
  </tr>
  <tr>

Код: Выбрать все

   return $message;
}
$entry = $_GET["entry"];
$ogfile = "news.txt";
$oglines = file($ogfile);
list($date,$message,$author,$image,$subject,$key) = explode('||',$oglines[$entry]);
foreach($smilies as $key=>$value){
    $message = str_replace("$key", "$value", "$message");
}
echo "<table width=400 border=0 cellspacing=0 cellpadding=2><tr>
          <td class='title'>$subject</td>
  </tr>
  <tr>
    <td class='message'><img src=$image align=absmiddle> $message</td>
  </tr>
  <tr>
          <td class='foot' align=right>Posted by, $author on $date</td>
  </tr>
  <tr>
         <td height='4' background=''></td>
  </tr></table>Comments";
?>
<table width=325 border=0 cellspacing=0 cellpadding=2>
<?php
$file = "comments.txt";
$lines = file($file);
$lines = array_reverse($lines, TRUE);
   foreach($lines as $comment){
      $explode = explode('||', $comment);
      if($explode[0]==$entry){
         $explode[2] = vbcode($explode[2]);

            foreach($smilies as $key=>$value){
                   $explode[2] = str_replace("$key", "$value", "$explode[2]");
            }
         echo "<tr>
                   <td class=title>$explode[1]</td>
              </tr>
              <tr>
                 <td class=message width=325 align=center>$explode[2]</td>
              </tr>
              <tr>
               <td class=foot align=right>Posted by, $explode[3] on, $explode[4]</td>
              </tr>
              <tr>
                <td height='4' background=''></td>
              </tr>";
            }
      }
?>
</table>


Вернуться в «Переговорная "задача" / Negotiation "task"»

Кто сейчас на форуме

Количество пользователей, которые сейчас просматривают этот форум: нет зарегистрированных пользователей и 1 гость