Errata amendments
This commit is contained in:
@@ -7,6 +7,6 @@
|
|||||||
function mysql_fix_string($pdo, $string)
|
function mysql_fix_string($pdo, $string)
|
||||||
{
|
{
|
||||||
if (get_magic_quotes_gpc()) $string = stripslashes($string);
|
if (get_magic_quotes_gpc()) $string = stripslashes($string);
|
||||||
return $pdo->real_escape_string($string);
|
return $pdo->quote($string);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<form method="post" action="calc.php"><pre>
|
<form method="post" action="calc.php"><pre>
|
||||||
Loan Amount <input type="text" name="principal">
|
Loan Amount <input type="text" name="principal">
|
||||||
|
Monthly Repayment <input type="text" name="monthly">
|
||||||
Number of Years <input type="text" name="years" value="15">
|
Number of Years <input type="text" name="years" value="15">
|
||||||
Interest Rate <input type="text" name="interest" value="3">
|
Interest Rate <input type="text" name="interest" value="3">
|
||||||
<input type="submit">
|
<input type="submit">
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
<script>
|
|
||||||
function asyncRequest()
|
|
||||||
{
|
|
||||||
try // Non IE Browser?
|
|
||||||
{ // Yes
|
|
||||||
var request = new XMLHttpRequest()
|
|
||||||
}
|
|
||||||
catch(e1)
|
|
||||||
{
|
|
||||||
try // IE 6+?
|
|
||||||
{ // Yes
|
|
||||||
request = new ActiveXObject("Msxml2.XMLHTTP")
|
|
||||||
}
|
|
||||||
catch(e2)
|
|
||||||
{
|
|
||||||
try // IE 5?
|
|
||||||
{ // Yes
|
|
||||||
request = new ActiveXObject("Microsoft.XMLHTTP")
|
|
||||||
}
|
|
||||||
catch(e3) // There is no asynchronous support
|
|
||||||
{
|
|
||||||
request = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return request
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
{
|
{
|
||||||
echo file_get_contents('http://' . SanitizeString($_POST['url']));
|
echo file_get_contents('http://' . SanitizeString($_POST['url']));
|
||||||
}
|
}
|
||||||
|
|
||||||
function SanitizeString($var)
|
function SanitizeString($var)
|
||||||
{
|
{
|
||||||
$var = strip_tags($var);
|
$var = strip_tags($var);
|
||||||
@@ -11,8 +11,7 @@
|
|||||||
let nocache = "&nocache=" + Math.random() * 1000000
|
let nocache = "&nocache=" + Math.random() * 1000000
|
||||||
let XHR = new XMLHttpRequest()
|
let XHR = new XMLHttpRequest()
|
||||||
|
|
||||||
XHR.open("POST", "http://127.0.0.1/18/urlget.php?url=news.com" + nocache, true)
|
XHR.open("GET", "http://127.0.0.1/18/urlget.php?url=news.com" + nocache, true)
|
||||||
XHR.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
|
|
||||||
XHR.send()
|
XHR.send()
|
||||||
|
|
||||||
XHR.onreadystatechange = function()
|
XHR.onreadystatechange = function()
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
<?php // xmlget.php
|
<?php
|
||||||
if (isset($_GET['url']))
|
if (isset($_GET['url']))
|
||||||
{
|
{
|
||||||
header('Content-Type: text/xml');
|
|
||||||
echo file_get_contents("http://".sanitizeString($_GET['url']));
|
echo file_get_contents("http://".sanitizeString($_GET['url']));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?php // urlget.php
|
<?php
|
||||||
if (isset($_GET['url']))
|
if (isset($_GET['url']))
|
||||||
{
|
{
|
||||||
|
header('Content-Type: text/xml');
|
||||||
echo file_get_contents("http://".sanitizeString($_GET['url']));
|
echo file_get_contents("http://".sanitizeString($_GET['url']));
|
||||||
}
|
}
|
||||||
|
|
||||||
function sanitizeString($var)
|
function sanitizeString($var)
|
||||||
{
|
{
|
||||||
$var = strip_tags($var);
|
$var = strip_tags($var);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<title>RSS Feed</title>
|
<title>RSS Feed</title>
|
||||||
<link>http://website.com</link>
|
<link>http://website.com</link>
|
||||||
<description>website.com's RSS Feed</description>
|
<description>website.com's RSS Feed</description>
|
||||||
<pubDate>Mon, 11 May 2020 00:00:00 GMT</pubDate>
|
<pubDate>Mon, 10 May 2027 00:00:00 GMT</pubDate>
|
||||||
<item>
|
<item>
|
||||||
<title>Headline</title>
|
<title>Headline</title>
|
||||||
<guid>http://website.com/headline</guid>
|
<guid>http://website.com/headline</guid>
|
||||||
@@ -8,8 +8,6 @@
|
|||||||
background:linear-gradient(top, #fb0, #f50);
|
background:linear-gradient(top, #fb0, #f50);
|
||||||
background:-moz-linear-gradient(top, #fb0, #f50);
|
background:-moz-linear-gradient(top, #fb0, #f50);
|
||||||
background:-webkit-linear-gradient(top, #fb0, #f50);
|
background:-webkit-linear-gradient(top, #fb0, #f50);
|
||||||
background:-o-linear-gradient(top, #fb0, #f50);
|
|
||||||
background:-ms-linear-gradient(top, #fb0, #f50); }
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Reference in New Issue
Block a user