home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / wiki / template / history.php < prev    next >
PHP Script  |  2004-03-08  |  2KB  |  56 lines

  1. <?php
  2. // $Id: history.php,v 1.1 2004/01/12 22:14:05 comsubvie Exp $
  3.  
  4. require_once(TemplateDir . '/common.php');
  5.  
  6. // The history template is passed an associative array with the following
  7. // elements:
  8. //
  9. //   page      => A string containing the name of the wiki page.
  10. //   history   => A string containing the XHTML markup for the history form.
  11. //   diff      => A string containing the XHTML markup for the changes made.
  12.  
  13. function template_history($args)
  14. {
  15.   global $DiffScript;
  16.  
  17.   template_common_prologue(array('norobots' => 1,
  18.                                  'title'    => TMPL_HistoryOf .' '. $args['page'],
  19.                                  'heading'  => TMPL_HistoryOf .' ',
  20.                                  'headlink' => $args['page'],
  21.                                  'headsufx' => '',
  22.                                  'toolbar'  => 1));
  23. ?>
  24. <div id="body">
  25.   <form method="get" action="<?php print $DiffScript; ?>">
  26.   <div class="form">
  27.     <input type="hidden" name="action" value="diff" />
  28.     <input type="hidden" name="page" value="<?php print $args['page']; ?>" />
  29. <table border="0">
  30.   <tr><td><strong><?php echo TMPL_Older; ?></strong></td>
  31.       <td><strong><?php echo TMPL_Newer; ?></strong></td><td></td></tr>
  32. <?php
  33.   print $args['history'];
  34.  
  35. ?>
  36.   <tr><td colspan="3">
  37.     <input type="submit" value="<?php echo TMPL_ButtonComputeDifference; ?>" /></td></tr>
  38. </table>
  39.   </div>
  40.   </form>
  41. <hr /><br />
  42.  
  43. <strong><?php echo TMPL_ChangesLastAuthor; ?></strong><br /><br />
  44.  
  45. <?php print $args['diff']; ?>
  46. </div>
  47. <?php
  48.   template_common_epilogue(array('twin'      => $args['page'],
  49.                                  'edit'      => '',
  50.                                  'editver'   => 0,
  51.                                  'history'   => '',
  52.                                  'timestamp' => '',
  53.                                  'nosearch'  => 0));
  54. }
  55. ?>
  56.