<commit_before><?php
//l Copyright (C) 2009 <NAME>.
//l
//l This file is part of Shrew-gallery.
//l
//l   Shrew-gallery is free software: you can redistribute it and/or modify
//l   it under the terms of the GNU Affero General Public License as published by
//l   the Free Software Foundation, either version 3 of the License, or
//l   (at your option) any later version.
//l
//l   Shrew-gallery is distributed in the hope that it will be useful,
//l   but WITHOUT ANY WARRANTY; without even the implied warranty of
//l   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//l   GNU Affero General Public License for more details.
//l
//l   You should have received a copy of the GNU Affero General Public License
//l   along with Shrew-gallery.  If not, see <http://www.gnu.org/licenses/>.

class DisplayManager {
  function DisplayImagesPage($images)
  {
      $this->PrintHtmlHeader();
      $this->PrintImagesPageHeader();
      $this->PrintImagesPageBody($images);
      $this->PrintFooter();
  }
  
  function DisplayLoginPage()
  {
  }
  
  function PrintHtmlHeader()
  {  
    $style = new Style();
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";
    echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >'."\n";
    echo '  <head>'."\n";
    echo '    <title>Shrew Gallery</title>'."\n";
    echo '    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
    echo '<style type="text/css">'."\n";
    echo $style->Generate();
    echo '</style>'."\n";
    echo '  </head>'."\n";
    echo '  <body>'."\n";
    echo '  <div id="page">'."\n";
  }
  
  function PrintFooter()
  {
    echo '      <div id="footer">'."\n";
    echo '        <p id="copyright" ></p>Powered by Shrew-gallery v1.0.0 - Copyright (C) 2009 <NAME></p>'."\n";
    echo '        <p id="licence" >Shrew-gallery is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>'."\n";
    echo '        <p id="source" ></p>The source code can be found at the following URL : <a href="index.php?want=source">index.php</a></p>'."\n";
    echo '      </div>'."\n";//div footer
    echo '    </div>'."\n";//div page
    echo '  </body>'."\n";
    echo '</html>';
  }
  
  function PrintImagesPageHeader()
  {
    
  }
  
  function PrintImagesPageBody($images)
  {
    <commit_msg>add header<commit_after><?php
//l Copyright (C) 2009 <NAME>.
//l
//l This file is part of Shrew-gallery.
//l
//l   Shrew-gallery is free software: you can redistribute it and/or modify
//l   it under the terms of the GNU Affero General Public License as published by
//l   the Free Software Foundation, either version 3 of the License, or
//l   (at your option) any later version.
//l
//l   Shrew-gallery is distributed in the hope that it will be useful,
//l   but WITHOUT ANY WARRANTY; without even the implied warranty of
//l   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//l   GNU Affero General Public License for more details.
//l
//l   You should have received a copy of the GNU Affero General Public License
//l   along with Shrew-gallery.  If not, see <http://www.gnu.org/licenses/>.

class DisplayManager {
  function DisplayImagesPage($images)
  {
      $this->PrintHtmlHeader();
      $this->PrintImagesPageHeader($images);
      $this->PrintImagesPageBody($images);
      $this->PrintFooter();
  }
  
  function DisplayLoginPage()
  {
  }
  
  function PrintHtmlHeader()
  {  
    $style = new Style();
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";
    echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >'."\n";
    echo '  <head>'."\n";
    echo '    <title>Shrew Gallery</title>'."\n";
    echo '    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
    echo '<style type="text/css">'."\n";
    echo $style->Generate();
    echo '</style>'."\n";
    echo '  </head>'."\n";
    echo '  <body>'."\n";
    echo '  <div id="page">'."\n";
    echo '  <h1>Shrew gallery</h1>'."\n";
  }
  
  function PrintFooter()
  {
    echo '      <div id="footer">'."\n";
    echo '        <p id="copyright" ></p>Powered by Shrew-gallery v1.0.0 - Copyright (C) 2009 <NAME></p>'."\n";
    echo '        <p id="licence" >Shrew-gallery is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>'."\n";
    echo '        <p id="source" ></p>The source code can be found at the following URL : <a href="index.php?want=source">index.php</a></p>'."\n";
    echo '      </div>'."\n";//div footer
    echo '    </div>'."\n";//div page
    echo '  </body>'."\n";
    echo '</html>';
  }
  
  function PrintImagesPageHeader($images)
  {
    if($images)
    { 
      echo 'Cette gallerie contient '.count($images).' images. Vous pouvez télécharger l\'intégralité de la gallerie en suivant ce lien : <a href=all.zip >all.zip</a>'."\n";
    }
  }
  
  function PrintImagesPageBody($images)
  {
    
{'fraction_non_alphanumeric': 0.1644527595884004, 'fraction_numerical': 0.009728718428437793, 'mean_word_length': 2.794180269694819, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5181810', 'n_tokens_mistral': 1816, 'n_tokens_neox': 1738, 'n_words': 563}