PageRenderTime 92ms CodeModel.GetById 8ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/start/website/list.php

#
PHP | 88 lines | 74 code | 14 blank | 0 comment | 5 complexity | 926e2956fb9d45350cdac62b150714f7 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-3.0, LGPL-2.1, GPL-3.0, CC-BY-SA-3.0
  1. <?php
  2. include "inc/data.php";
  3. include "inc/langcodes.php";
  4. include "inc/gettext.php";
  5. include "inc/links.php";
  6. ?>
  7. <html>
  8. <head>
  9. <title><?php echo _('Download / List View') ?> - FreeDict</title>
  10. <META http-equiv="Content-Type" content="text/html;charset=utf-8">
  11. <link rel="stylesheet" type="text/css" href="<?php echo fdict_url('s.css') ?>">
  12. </head>
  13. <body>
  14. <h1><?php echo _('Detailed Dictionary Overview') ?></h1>
  15. <table summary="Detailed Dictionary Overview">
  16. <tr bgcolor="#eeeeee">
  17. <th rowspan=2><?php echo _('Language &amp; Project') ?></th>
  18. <th rowspan=2><?php echo _('Maintainer') ?></th>
  19. <th rowspan=2><?php echo _('Headwords') ?></th>
  20. <th rowspan=2><?php echo _('Version') ?></th>
  21. <th rowspan=2><?php echo _('Last Changed') ?></th>
  22. <th rowspan=2><?php echo _('Status') ?></th>
  23. <th colspan=8><?php echo _('Version for / Size in MB') ?></th>
  24. </tr>
  25. <tr bgcolor="#dddddd">
  26. <th>dictd (tgz)</th>
  27. <th>dictd (bz2)</th>
  28. <th><small>evolutionary</small></th>
  29. <!-- th><small>mobi- pocket</small></th -->
  30. <th>zbedic</th>
  31. <th>StarDict</th>
  32. <th>rpm</th>
  33. <th>TEI XML</th>
  34. <th>src</th>
  35. </tr>
  36. <?php
  37. function cmp($a, $b)
  38. {
  39. $na = $a->get_attribute('name');
  40. $nb = $b->get_attribute('name');
  41. if($na == $nb) return 0;
  42. return ($na < $nb) ? -1 : 1;
  43. }
  44. $ds = ($have_php5) ?
  45. $freedict_database->getElementsByTagName('dictionary') :
  46. $fddb_docel->get_elements_by_tagname('dictionary');
  47. usort ($ds, "cmp");
  48. foreach($ds as $d)
  49. {
  50. list($l1, $l2) = split('-', $d->$get_attr('name'));
  51. $status = $d->$get_attr('status');
  52. echo '<tr bgcolor="'. status2color($status) .'">';
  53. echo '<td>';
  54. $source = $d->$get_attr('sourceURL');
  55. if($source) echo '<a href="'. $source .'" target="_top">';
  56. echo _(langcode2english($l1)) .' -&gt; '. _(langcode2english($l2));
  57. if($source) echo '</a>';
  58. echo '</td>';
  59. $maintainer = $d->$get_attr('maintainerName');
  60. if($maintainer=='') $maintainer='-';
  61. echo '<td>'. $maintainer .'</td>';
  62. echo '<td align=right>'. $d->$get_attr('headwords') .'</td>';
  63. echo '<td>'. $d->$get_attr('edition') .'</td>';
  64. echo '<td>'. $d->$get_attr('date') .'</td>';
  65. echo '<td><small>'. $status .'</small></td>';
  66. foreach(array('dict-tgz', 'dict-tbz2', 'evolutionary', 'bedic', 'stardict', 'rpm', 'tei', 'src') as $platform)
  67. {
  68. linkcell($d, find_release($d, $platform), $platform);
  69. }
  70. echo '</tr>';
  71. }
  72. ?>
  73. </table>
  74. <?php include 'inc/legend.php' ?>