[ PHPXref.com ] [ Generated: Sun Jul 20 19:47:34 2008 ] [ phpMyFAQ 1.6.1 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/admin/ -> stat.ratings.php (source)

   1  <?php
   2  /**
   3  * $Id: stat.ratings.php,v 1.4.2.10 2006/01/02 12:47:10 thorstenr Exp $
   4  *
   5  * The page with the ratings of the votings
   6  *
   7  * @author       Thorsten Rinne <thorsten@phpmyfaq.de>
   8  * @since        2003-02-24
   9  * @copyright    (c) 2001-2006 phpMyFAQ Team
  10  * 
  11  * The contents of this file are subject to the Mozilla Public License
  12  * Version 1.1 (the "License"); you may not use this file except in
  13  * compliance with the License. You may obtain a copy of the License at
  14  * http://www.mozilla.org/MPL/
  15  * 
  16  * Software distributed under the License is distributed on an "AS IS"
  17  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  18  * License for the specific language governing rights and limitations
  19  * under the License.
  20  */
  21  
  22  if (!defined('IS_VALID_PHPMYFAQ_ADMIN')) {
  23      header('Location: http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']));
  24      exit();
  25  }
  26  
  27  if ($permission["viewlog"]) {
  28      $tree = new Category();
  29  ?>
  30      <h2><?php print $PMF_LANG["ad_rs"] ?></h2>
  31      <table class="list">
  32  <?php
  33      $result = $db->query('SELECT '.SQLPREFIX.'faqdata.id AS id, '.SQLPREFIX.'faqdata.lang AS lang, '.SQLPREFIX.'faqcategoryrelations.category_id AS category_id, '.SQLPREFIX.'faqdata.thema AS thema, ('.SQLPREFIX.'faqvoting.vote / '.SQLPREFIX.'faqvoting.usr) AS num, '.SQLPREFIX.'faqvoting.usr AS usr FROM '.SQLPREFIX.'faqvoting, '.SQLPREFIX.'faqdata LEFT JOIN '.SQLPREFIX.'faqcategoryrelations ON '.SQLPREFIX.'faqdata.id = '.SQLPREFIX.'faqcategoryrelations.record_id AND '.SQLPREFIX.'faqdata.lang = '.SQLPREFIX.'faqcategoryrelations.record_lang WHERE '.SQLPREFIX.'faqdata.id = '.SQLPREFIX.'faqvoting.artikel GROUP BY '.SQLPREFIX.'faqdata.id, '.SQLPREFIX.'faqdata.lang, '.SQLPREFIX.'faqdata.active, '.SQLPREFIX.'faqcategoryrelations.category_id, '.SQLPREFIX.'faqdata.thema, '.SQLPREFIX.'faqvoting.vote, '.SQLPREFIX.'faqvoting.usr ORDER BY '.SQLPREFIX.'faqcategoryrelations.category_id');
  34      $anz = $db->num_rows($result);
  35      $old = "";
  36      while ($row = $db->fetch_object($result)) {
  37          if ($row->category_id != $old) {
  38  ?>
  39      <tr>
  40          <td colspan="5" class="list"><strong><?php print $tree->categoryName[$row->category_id]["name"]; ?></strong></td>
  41      </tr>
  42  <?php
  43          }
  44  ?>
  45      <tr>
  46          <td class="list"><?php print $row->id; ?></td>
  47          <td class="list"><?php print $row->lang; ?></td>
  48          <td class="list"><a href="../index.php?action=artikel&amp;cat=<?php print $row->category_id;?>&amp;id=<?php print $row->id;?>&amp;artlang=<?php print $row->lang; ?>"><?php print $row->thema; ?></a></td>
  49          <td class="list"><?php print $row->usr; ?></td>
  50          <td class="list" style="background-color: #d3d3d3;"><img src="stat.bar.php?num=<?php print $row->num; ?>" border="0" alt="<?php print round($row->num * 20); ?> %" width="50" height="15" title="<?php print round($row->num * 20); ?> %" /></td>
  51      </tr>
  52  <?php
  53          $old = $row->category_id;
  54      }
  55      if ($anz > 0) {
  56  ?>
  57      <tr>
  58          <td colspan="5" class="list"><span style="color: green; font-weight: bold;"><?php print $PMF_LANG["ad_rs_green"] ?></span> <?php print $PMF_LANG["ad_rs_ahtf"] ?>, <span style="color: red; font-weight: bold;"><?php print $PMF_LANG["ad_rs_red"] ?></span> <?php print $PMF_LANG["ad_rs_altt"] ?></td>
  59      </tr>
  60  <?php
  61      } else {
  62  ?>
  63      </tbody>
  64      <tfoot>
  65          <tr>
  66              <td colspan="5" class="list"><?php print $PMF_LANG["ad_rs_no"] ?></td>
  67          </tr>
  68      </tfoot>
  69  <?php
  70      }
  71  ?>
  72      </table>
  73  <?php
  74  } else {
  75      print $PMF_LANG["err_NotAuth"];
  76  }


[ Powered by PHPXref - Served by Debian GNU/Linux ]