[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4235 - GNUnet-docs/WWW/test
From: |
grothoff |
Subject: |
[GNUnet-SVN] r4235 - GNUnet-docs/WWW/test |
Date: |
Sat, 6 Jan 2007 16:29:34 -0800 (PST) |
Author: grothoff
Date: 2007-01-06 16:29:33 -0800 (Sat, 06 Jan 2007)
New Revision: 4235
Removed:
GNUnet-docs/WWW/test/status.php3
GNUnet-docs/WWW/test/vote.php3
Log:
bye
Deleted: GNUnet-docs/WWW/test/status.php3
===================================================================
--- GNUnet-docs/WWW/test/status.php3 2007-01-07 00:29:22 UTC (rev 4234)
+++ GNUnet-docs/WWW/test/status.php3 2007-01-07 00:29:33 UTC (rev 4235)
@@ -1,61 +0,0 @@
-<html>
-<head>
-<title>GNUnet WWW: status</title>
-</head>
-<body>
-<?php
- include("scripts.php3");
- echo "Language setting: " . $lang . "<p>";
- if (!$connection) {
- echo "Database is down.";
- die();
- }
-if ($mode == 1) {
- H2("All available translations");
- echo "<table border=5>\n";
- echo "<tr><th>";
- W("Original");
- echo "</th><th>";
- W("Language");
- echo "</th><th>";
- W("Translation");
- echo "</th><th>";
- W("Votes");
- echo "</th></tr>\n";
-}
-
- $stats = ARRAY();
- $query = "SELECT name,ranking,translation,lang FROM map";
- $result = mysql_query($query, $connection);
- $num = 0;
- if ($result)
- $num = mysql_numrows($result);
- for ($i=0;$i<$num;$i++) {
- $row = mysql_fetch_array($result);
- $text = urldecode($row["name"]);
- $ranking = $row["ranking"];
- $stats[$row["lang"]]++;
-if ($mode == 1)
- printf("<tr><td>%s</td><td>%s</td><td><a
href=\"vote.php3?lang=%s&text=%s&translation=%s\">%s</a></td><td>%s</td></tr>\n",
- urldecode($text),
- $row["lang"],
- $row["lang"],
- $text,
- $row["translation"],
- urldecode($row["translation"]),
- $ranking);
- }
-if ($mode == 1)
- echo "</table><p><hr><p>\n";
-
-echo "$num ";
-W("translations in database.");
-echo "<p>\n";
-foreach ($stats as $a => $b) {
- echo "$b ";
- W("in");
- echo "$a<br>";
-}
-?>
-</body>
-</html>
Deleted: GNUnet-docs/WWW/test/vote.php3
===================================================================
--- GNUnet-docs/WWW/test/vote.php3 2007-01-07 00:29:22 UTC (rev 4234)
+++ GNUnet-docs/WWW/test/vote.php3 2007-01-07 00:29:33 UTC (rev 4235)
@@ -1,47 +0,0 @@
-<html>
-<head>
-<title>GNUnet WWW translation: vote</title>
-</head>
-<body>
-<?php
-/*
- (C) 2003 Christian Grothoff
-
- This code is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
- option) any later version.
-
- The code is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with the code; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
- include("scripts.php3");
- if (!$connection) {
- echo "Database is down. Can not edit translations.";
- die();
- }
- $u = urlencode($text);
- $t = urlencode($translation);
- $query = "SELECT ranking FROM map WHERE name=\"$u\" AND lang=\"$lang\" AND
translation=\"$t\"";
- $result = mysql_query($query, $connection);
- $num = 0;
- if ($result)
- $num = mysql_numrows($result);
- if ($num > 0) {
- $row = mysql_fetch_array($result);
- $ranking = $row["ranking"] + 1;
- $query = "UPDATE map SET ranking=\"$ranking\" WHERE name=\"$u\" AND
lang=\"$lang\" AND translation=\"$t\"";
- mysql_query($query, $connection);
- W("Ranking of translation is now: ");
- echo "$ranking";
- } else {
- W("Translation does not exist (bug?).");
- }
-?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4235 - GNUnet-docs/WWW/test,
grothoff <=