[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [websites/konqueror-org] banking: go away
From:       Chris Howells <howells () kde ! org>
Date:       2014-10-10 22:44:47
Message-ID: E1XcivX-0000qY-Bf () scm ! kde ! org
[Download RAW message or body]

Git commit e8ec87955cf5e4e355986959ea3ed8693ee102cb by Chris Howells.
Committed on 19/10/2006 at 12:48.
Pushed by whiting into branch 'master'.

go away

D  +0    -61   banking/admin.php
D  +0    -38   banking/authorise.inc
D  +0    -58   banking/common.inc
D  +0    -73   banking/edit.php
D  +0    -195  banking/index.php
D  +0    -64   banking/submit.php

http://commits.kde.org/websites/konqueror-org/e8ec87955cf5e4e355986959ea3ed8693ee102cb


diff --git a/banking/admin.php b/banking/admin.php
deleted file mode 100644
index 2af2fb0..0000000
--- a/banking/admin.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-//error_reporting(E_ALL);
-//ini_set('display_errors', 1);
-?>
-<?php
-  include("authorise.inc");
-  authorise();
-  $site_root = "../";
-  $page_title = "Konqueror - Online Banking";
-  include("konqueror.inc");
-  include("header.inc");
-  include("common.inc");
-?>
-
-<?php
-	include_once("common.inc");
-
-	$id = $_GET['id'];
-
-	$sql = "SELECT banks.country, banks.url, banks.name, compat.comment, compat.kde30, \
                compat.kde31 FROM banks, compat WHERE banks.id = '$id' AND \
                compat.bank = '$id'";
-	$query = mysql_query($sql) or die("MySQL error: " . mysql_error());
-
-	$row = mysql_fetch_array($query);
-	echo "<h1>" . $row['country'] . " - " . $row['name'] . "</h1>";
-?>
-
-
-<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST">
-<input type="hidden" name="submitted" value="true" />
-<table border="0">
-<tr>
-<td>
-Name
-</td>
-<td>
-<input type="text" name="name" value="<?php echo stripslashes($row['name']) ?>" />
-</td>
-</tr>
-<tr>
-<td>
-Url
-</td>
-<td>
-<input type="text" name="url" value="<?php echo $row['url'] ?>" />
-</td>
-</tr>
-<tr>
-<td>
-Comment
-</td>
-<td>
-<textarea cols="70" rows="5" name="comment"><?php echo stripslashes($row['comment']) \
                ?></textarea>
-</td>
-</tr>
-</table>
-<input type="submit" caption="Submit" />
-</form>
-
-<?php
- include("footer.inc");
-?>
diff --git a/banking/authorise.inc b/banking/authorise.inc
deleted file mode 100644
index bea84d7..0000000
--- a/banking/authorise.inc
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-include("auth.inc");
-
-function authorise()
-{
-	global $host, $username, $password;
-
-	$auth_check = mysql_connect($host, $username, $password) or die (mysql_error());
-        $db = mysql_select_db("wwwkonqueror", $auth_check);
-	//$auth_check = mysql_connect("localhost, "konqueror", "konqueror") or die \
                (mysql_error());
-	//$db = mysql_select_db("wwwkonqueror", $auth_check);
-
-	$auth = false;
-
-	if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']))
-	{
-		$sql = "SELECT * from auth";
-		$query = mysql_query($sql, $auth_check) or die("error " . mysql_error());
-		while ($row = mysql_fetch_array($query))
-		{
-			if (($row['user'] == $_SERVER['PHP_AUTH_USER']) && ($row['pass'] == \
                $_SERVER['PHP_AUTH_PW']))
-			{
-				$auth = true;
-			}
-		}
-	}
-
-	if (!$auth)
-	{
-		header("WWW-Authenticate: Basic realm=\"Private\"");
-		header("HTTP/1.0 401 Unauthorized");
-		exit();
-	}
-
-	mysql_close($auth_check);
-}
-
-?>
diff --git a/banking/common.inc b/banking/common.inc
deleted file mode 100644
index 5533d7c..0000000
--- a/banking/common.inc
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-include("auth.inc");
-mysql_connect($host, $username, $password);
-mysql_select_db("wwwkonqueror");
-//mysql_connect("localhost", "konqueror", "konqueror");
-//mysql_select_db("konqueror");
-
-function parseCompat($value)
-{
-	if ($value == "four")
-	{
-		return "Works";
-	}
-	else
-	if ($value == "three")
-	{
-		return "Small Problems";
-	}
-	if ($value == "two")
-	{
-		return "UA Change";
-	}
-	if ($value == "one")
-	{
-		return "Not Work";
-	}
-	else
-	{
-		return "Unknown";
-	}
-}
-
-function returnStatistic($sql)
-{
-	$query = mysql_query($sql);
-        return mysql_num_rows($query);
-}
-
-function country($string)
-{
-	$country = addslashes($string);
-	if (ereg("^[A-Z]{2}$", $string))
-	{
-		$sql = "SELECT name FROM country WHERE iso = '$country'";
-		$query = mysql_query($sql);
-		$value = mysql_fetch_array($query);
-		return $value['name'];
-	}
-	else
-	{
-		$sql = "SELECT iso FROM country WHERE name = '$country'";
-		$query = mysql_query($sql);
-		$value = mysql_fetch_array($query);
-		return $value['iso'];
-	}
-}
-
-?>
diff --git a/banking/edit.php b/banking/edit.php
deleted file mode 100644
index 22cd93e..0000000
--- a/banking/edit.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-//error_reporting(E_ALL);
-//ini_set('display_errors', 1);
-?>
-
-<?php
-  $site_root = "../";
-  $page_title = "Konqueror - Online Banking";
-  include("konqueror.inc");
-  include("header.inc");
-  include("common.inc");
-?>
-
-<?php
-	if (isset($_GET['id']) && isset($_GET['test']))
-	{
-?>
-
-<h2>Replace the following details...</h2>
-
-<?php
-	$selected = $_GET['id'];
-	echo "<table border=\"0\">\n";
-	echo "<tr id=\"leftmenu\">\n<td><h4>Bank</h4></td>\n<td><h4>Comment</h4></td>\n<td><h4>KDE \
                3.0</h4></td>\n<td><h4>KDE 3.1</h4></td>\n<td><h4>KDE \
                3.2</h4></td>\n</tr>\n";
-	$sql = "SELECT banks.id, banks.country, banks.url, banks.name, compat.comment, \
compat.kde30, compat.kde31, compat.kde32 FROM banks, compat WHERE banks.id = \
                '$selected' AND compat.bank = '$selected'";
-	$query = mysql_query($sql);
-	$row = mysql_fetch_array($query);
-	echo "<tr>\n";
-	echo "<td valign=\"top\"><a href=\"" . $row['url'] ."\">" . \
                stripslashes($row['name']) . "</a></td>\n";
-	echo "<td>" . stripslashes($row['comment']) . "</td>\n";
-	echo "<td>" . parseCompat($row['kde30']) . "</td>\n";
-	echo "<td>" . parseCompat($row['kde31']) . "</td>\n";
-	echo "<td>" . parseCompat($row['kde32']) . "</td>\n";
-	echo "</tr>\n";
-	echo "</table>\n";
-?>
-
-<h2>...with the new details</h2>
-
-<form action="submit.php" method="POST">
-<input type="hidden" name="edit" value="true" />
-<label for="nameofbank">Name of Bank:</label>
-<input type="text" name="nameofbank" id="nameofbank" value="<?php echo \
                stripslashes($row['name']) ?>" /><br />
-<label for="url">URL:</label>
-<input type="text" name="url" id="url"  value="<?php echo stripslashes($row['url']) \
                ?>"/><br />
-<label for="version">KDE Version:</label>
-<select size="1" name="version" title="Version" id="version">
-<option value="kde30">KDE 3.0</option>
-<option value="kde31">KDE 3.1</option>
-<option value="kde32">KDE 3.2</option>
-</select><br />
-<label for="rating">Rate how well Konqueror works with the site:</label>
-<select size="1" name="rating" title="Rating" id="rating">
-<option value="four">Perfectly</option>
-<option value="three">Very well, with minor problems</option>
-<option value="two">UserAgent needs changing</option>
-<option value="one">Not at all</option>
-</select><br />
-<label for="comment">Comments:</label>
-<textarea rows="4" cols="70" name="comment" id="comment"><?php echo \
                stripslashes($row['comment']) ?></textarea><br />
-<label for="submitter">Submitter Name:</label>
-<input type="text" name="submitter" id="submitter" /><br />
-<label for="email">Submitter E-Mail:</label>
-<input type="text" name="email" id="email" /><br />
-<input type="submit" value="Submit" />
-</form>
-
-<?php
-	}
-?>
-<?php
- include("footer.inc");
-?>
diff --git a/banking/index.php b/banking/index.php
deleted file mode 100644
index eff572e..0000000
--- a/banking/index.php
+++ /dev/null
@@ -1,195 +0,0 @@
-<?php
-//error_reporting(E_ALL);
-//ini_set('display_errors', 1);
-?>
-
-<?php
-  $site_root = "../";
-  $page_title = "Konqueror - Online Banking";
-  include("konqueror.inc");
-  include("header.inc");
-  include("common.inc");
-?>
-
-<?php
-	$country = "";
-	if (!isset($_GET['country']))
-	{
-?>
-
-<h2>Country Selection</h2>
-
-<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="GET">
-<select size="1" name="country" title="Country">
-<option value="all">All</option>
-<?php
-$sql = "SELECT DISTINCT country FROM banks ORDER BY country";
-$query = mysql_query($sql);
-while ($row = mysql_fetch_array($query))
-{
-	echo "<option value=\"" . $row['country'] . "\">" . country($row['country']) . \
                "</option>\n";
-}
-?>
-</select>
-<input type="submit" caption="Submit" />
-</form>
-
-<p>If your country is not listed in the above list please use the form below to \
                submit details.</p>
-
-<h2>Statistics</h2>
-<ul>
-<li>Number of countries: <?php echo returnStatistic("SELECT DISTINCT country FROM \
                banks") ?></li>
-</ul>
-
-<table border="1">
-<tr>
-<td>
-Version
-</td>
-<td>
-Does not work
-</td>
-<td>
-UA change
-</td>
-<td>
-Works mostly
-</td>
-<td>
-Works perfectly
-</td>
-</tr>
-
-<?php
-for ($i = 0; $i <= 2; $i++)
-{
-?>
-
-<tr>
-<td>
-Konqueror 3.<?php echo $i ?>
-</td>
-<td>
-<?php echo returnStatistic("SELECT * FROM compat WHERE kde3" . $i . " = 'one'") ?>
-</td>
-<td>
-<?php echo returnStatistic("SELECT * FROM compat WHERE kde3" . $i . " = 'two'") ?>
-</td>
-<td>
-<?php echo returnStatistic("SELECT * FROM compat WHERE kde3" . $i . " = 'three'") ?>
-</td>
-<td>
-<?php echo returnStatistic("SELECT * FROM compat WHERE kde3" . $i . " = 'four'") ?>
-</td>
-</tr>
-
-<?php
-}
-?>
-</table>
-
-<?php
-	}
-	else if (isset($_GET['country']))
-	{
-?>
-
-<?php
-	$selected = $_GET['country'];
-	echo "<table border=\"0\">";
-	$sql = "";
-	if ($selected == "all")
-	{
-		$sql = "SELECT DISTINCT country FROM banks ORDER BY country";
-	}
-	else
-	{
-		$sql = "SELECT DISTINCT country FROM banks WHERE country = '$selected'";
-	}
-	$query = mysql_query($sql);
-	$num = mysql_num_rows($query);
-
-	if ($num == 0)
-	{
-		echo "<p>No banks known for selected country.</p>";
-	}
-	while ($row = mysql_fetch_array($query))
-	{
-		$country = $row['country'];
-		echo "<tr><td colspan=\"4\"><h2>" . country($row['country']) . \
                "</h2></td></tr>\n";
-		echo "<tr id=\"leftmenu\">\n<td><h4>Bank</h4></td>\n<td><h4>Comment</h4></td>\n<td><h4>KDE \
3.0</h4></td>\n<td><h4>KDE 3.1</h4></td>\n<td><h4>KDE \
                3.2</h4></td>\n<td><h4>Edit</h4></td>\n</tr>\n";
-		$sql2 = "SELECT banks.id, banks.country, banks.url, banks.name, compat.comment, \
compat.kde30, compat.kde31, compat.kde32 FROM banks, compat WHERE banks.id = \
                compat.bank AND country = '$country' ORDER BY banks.name";
-		$query2 = mysql_query($sql2);
-		$alternate = false;
-		while($row2 = mysql_fetch_array($query2))
-		{
-			$alternate = !$alternate;
-			if ($alternate)
-			{
-				$color = "newsbox2";
-			}
-			else
-			{
-				$color = "newsbox1";
-			}
-			echo "<tr class=\"$color\">\n";
-			echo "<td valign=\"top\"><a href=\"" . $row2['url'] ."\">" . \
                stripslashes($row2['name']) . "</a></td>\n";
-			echo "<td>" . stripslashes($row2['comment']) . "</td>\n";
-			echo "<td>" . parseCompat($row2['kde30']) . "</td>\n";
-			echo "<td>" . parseCompat($row2['kde31']) . "</td>\n";
-			echo "<td>" . parseCompat($row2['kde32']) . "</td>\n";
-			echo "<td><a href=\"edit.php" . "?id=" . $row2['id'] . "\">Edit</a></td>\n";
-			echo "</tr>\n";
-		}
-	}
-	echo "</table>\n";
-?>
-
-<?php
-	}
-?>
-
-<h2>Add New Entry</h2>
-
-<form action="submit.php" method="POST">
-<input type="hidden" name="new" value="true" />
-<label for="nameofbank">Name of Bank:</label>
-<input type="text" name="nameofbank" id="nameofbank" /><br />
-<label for="url">URL:</label>
-<input type="text" name="url" id="url" /><br />
-<label for="country">Country:</label>
-<select size="1" name="country" title="Country" id="country">
-<?php                   
-$sql = "SELECT name FROM country ORDER BY name";
-$query = mysql_query($sql);
-while ($row = mysql_fetch_array($query))
-{       
-        echo "<option value=\"" . country($row['name']) . "\">" . $row['name'] . \
                "</option>\n";
-}
-?>
-</select><br />
-<label for="version">KDE Version:</label>
-<select size="1" name="version" title="Version" id="version">
-<option value="kde30">KDE 3.0</option>
-<option value="kde31">KDE 3.1</option>
-<option value="kde32">KDE 3.2</option>
-</select><br />
-<label for="rating">Rate how well Konqueror works with the site:</label>
-<select size="1" name="rating" title="Rating" id="rating">
-<option value="four">Perfectly</option>
-<option value="three">Very well, with minor problems</option>
-<option value="two">UserAgent needs changing</option>
-<option value="one">Not at all</option>
-</select><br />
-<label for="comment">Comments:</label>
-<textarea rows="4" cols="70" name="comment" id="comment"></textarea><br />
-<label for="submitter">Submitter Name:</label>
-<input type="text" name="submitter" id="submitter" /><br />
-<label for="email">Submitter E-Mail:</label>
-<input type="text" name="email" id="email" /><br />
-<input type="submit" value="Submit" />
-</form>
-
-<?php
- include("footer.inc");
-?>
diff --git a/banking/submit.php b/banking/submit.php
deleted file mode 100644
index f6a8f4d..0000000
--- a/banking/submit.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-  $site_root = "../";
-  $page_title = "Konqueror - Online Banking";
-  include("konqueror.inc");
-  include("header.inc");
-  include("common.inc");
-?>
-
-<?php
-	if (isset($_POST['new']))
-	{
-?>
-
-<?php
-	$name = addslashes($_POST['nameofbank']);
-	$url = addslashes($_POST['url']);
-	$country = country($_POST['country']);
-	$version = $_POST['version'];
-	$rating = $_POST['rating'];
-	$comment = addslashes($_POST['comment']);
-	$submitter = addslashes($_POST['submitter']);
-	$email = addslashes($_POST['email']);
-
-	$sql = "INSERT INTO banks (id, name, url, country) VALUES (NULL, '$country', \
                '$url', '$name')";
-	mysql_query($sql) or die("MySQL Error: " . mysql_error());
-
-	$sql = "SELECT id FROM banks ORDER BY id DESC LIMIT 1";
-	$query = mysql_query($sql) or die ("MySQL Error: " . mysql_error());
-	$row = mysql_fetch_array($query);
-	$id = $row['id'];
-
-	$sql = "INSERT INTO compat (bank, comment, $version, display) VALUES ($id, \
                '$comment', '$rating', '0')";
-	mysql_query($sql) or die("MySQL Error: " . mysql_error());
-	$sql = "INSERT INTO submitter VALUES ($id, '$submitter', '$email')";
-	mysql_query($sql) or die("MySQL Errord: " . mysql_error());
-
-	$body = "Moderate at http://www.konqueror.org/banking/moderate.php";
-	$title = "Konqueror Banking New Entry";
-?>
-
-<?php
-	}
-	else if (isset($_POST['edit']))
-	{
-?>
-
-<?php
-	$body = "Moderate at http://www.konqueror.org/banking/moderate.php";
-	$title = "Konqueror Banking Edited Entry";
-?>
-
-<?php
-	}
-?>
-
-<p>Thank you for your submission, it will be checked and will appear on the site \
                shortly.</p>
-
-<?php
-	mail("kde-www@kde.org", $title, $body);
-?>
-
-<?php
- include("footer.inc");
-?>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic