index.php 770 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. include("../../functions.php");
  3. $con = startdb();
  4. ?>
  5. <html>
  6. <head>
  7. </head>
  8. <body>
  9. <table>
  10. <tr>
  11. <th>Post</th>
  12. <th>Euskera</th>
  13. <th>Ingles</th>
  14. <th> </th>
  15. </tr>
  16. <?php
  17. $res = mysqli_query($con, "SELECT id, title_es, text_es, text_eu, text_en FROM post;");
  18. while ($row = mysqli_fetch_array($res)){
  19. echo "<tr><td>$row[title_es]</td>\n";
  20. if ($row['text_eu'] == $row['text_es'] || strlen($row['text_eu']) == 0)
  21. echo "<td></td>\n";
  22. else
  23. echo "<td>Si</td>\n";
  24. if ($row['text_en'] == $row['text_es'] || strlen($row['text_en']) == 0)
  25. echo "<td></td>\n";
  26. else
  27. echo "<td>Si</td>\n";
  28. echo "<td><a href='post.php?id=$row[id]'>Traducir</a>\n";
  29. }
  30. ?>
  31. </table>
  32. </body>
  33. </html>