remove non needed files
This commit is contained in:
parent
94c80cb18a
commit
a5b7456f3f
@ -1,49 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>KLanding Pic Uploader</title>
|
||||
|
||||
<!-- Google web fonts -->
|
||||
<link href="http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700" rel='stylesheet' />
|
||||
|
||||
<!-- The main CSS file -->
|
||||
<link href="/assets/css/style.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<form id="upload" method="post" action="upload.php" enctype="multipart/form-data">
|
||||
<div id="drop">
|
||||
Drop Here
|
||||
|
||||
<a>Browse</a>
|
||||
<input type="file" name="upl" multiple />
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<!-- The file uploads will be shown here -->
|
||||
</ul>
|
||||
|
||||
</form>
|
||||
|
||||
<footer>
|
||||
|
||||
</footer>
|
||||
|
||||
<!-- JavaScript Includes -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script src="/assets/js/jquery.knob.js"></script>
|
||||
|
||||
<!-- jQuery File Upload Dependencies -->
|
||||
<script src="/assets/js/jquery.ui.widget.js"></script>
|
||||
<script src="/assets/js/jquery.iframe-transport.js"></script>
|
||||
<script src="/assets/js/jquery.fileupload.js"></script>
|
||||
|
||||
<!-- Our main JS file -->
|
||||
<script src="/assets/js/script.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
45
read.php
45
read.php
@ -1,45 +0,0 @@
|
||||
<?php
|
||||
function populateWithPost ()
|
||||
{
|
||||
$str_data = file_get_contents("data.json");
|
||||
$config = json_decode($str_data,true);
|
||||
|
||||
foreach ($_POST as $key => $value) {
|
||||
echo "$key => $value";
|
||||
$config[$key] = trim($value); //here you can add a filter, like htmlentities ...
|
||||
echo $config;
|
||||
}
|
||||
|
||||
return $config;
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($_POST)
|
||||
{
|
||||
$config = populateWithPost();
|
||||
$fh = fopen("data_out.json", 'w')
|
||||
or die("Error opening output file");
|
||||
fwrite($fh, json_encode($data,JSON_UNESCAPED_UNICODE));
|
||||
fclose($fh);
|
||||
}
|
||||
// Read the file contents into a string variable,
|
||||
// and parse the string into a data structure
|
||||
$str_data = file_get_contents("data.json");
|
||||
$config = json_decode($str_data,true);
|
||||
|
||||
// Modify the value, and write the structure to a file "data_out.json"
|
||||
//
|
||||
$data["YourName"] = "Swimmi2ng";
|
||||
?>
|
||||
|
||||
<form action="read.php" method="post">
|
||||
<?php
|
||||
foreach ($config as $key => $value) {
|
||||
echo "<label for='$key'>$key</label>";
|
||||
echo "<input name='$key' type='text' value='$value' /><p />";
|
||||
}
|
||||
?>
|
||||
<input type="submit" value="Save" />
|
||||
</form>
|
22
xmlread.php
22
xmlread.php
@ -1,22 +0,0 @@
|
||||
## don't forget to provide the location of the actual xml file.
|
||||
$xml = "http://dev.k-world.me.uk/sysinfo/xml.php";
|
||||
$doc = new DOMDocument();
|
||||
$doc->load( $xml);
|
||||
## lets read the code block
|
||||
$records = $doc->getElementsByTagName( "Distro" );
|
||||
foreach( $records as $record )
|
||||
{
|
||||
## parse the zip code
|
||||
$zip = $record->getElementsByTagName( "Hostname" );
|
||||
$zip = $zip->item(0)->nodeValue;
|
||||
## parse the city
|
||||
$city = $record->getElementsByTagName( "Hardware Name" );
|
||||
$city = $city->item(0)->nodeValue;
|
||||
## parse the latitude
|
||||
$lat = $record->getElementsByTagName( "PCI" );
|
||||
$lat = $lat->item(0)->nodeValue;
|
||||
## parse longtitude.
|
||||
$longtitude = $record->getElementsByTagname( "CPU" );
|
||||
$longtitude = $longtitude->item(0)->nodeValue;
|
||||
echo "<p>Zip Code: ".$zip."<br/>City: ".$city."<br/>Latitude: ".$lat."<br/>Lontitude:".$longtitude."</p>";
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user