Browse Source

upgrade to php7

master
Markus Becker 3 years ago
parent
commit
297db93238
  1. 1
      api/autowkid
  2. 2
      api/index.php
  3. 8
      base64.php
  4. 2
      data/error.php
  5. 6
      index.php
  6. 6
      index_old.php
  7. 5
      info.php
  8. BIN
      interface/exec/.pulllib.php.swp
  9. 2
      interface/exec/_auth.php
  10. 6
      interface/exec/deletefile.php
  11. 8
      interface/exec/fr_include.php
  12. 2
      interface/exec/image.php
  13. 2
      interface/exec/myio.php
  14. 6
      interface/exec/no_include.php
  15. 6
      interface/exec/nu_include.php
  16. 6
      interface/exec/pulllib.php
  17. 2
      interface/exec/string.php
  18. 8
      interface/exec/upload_include.php
  19. 6
      interface/exec/upload_media.php
  20. 6
      interface/index.php
  21. 8
      interface/panel.php
  22. 4
      login.php

1
api/autowkid

@ -1 +0,0 @@
Subproject commit deb87d3287dd1ea1af7a05c48778b04992ea1db2

2
api/index.php

@ -1,4 +1,4 @@
<?
<?php
include("../interface/exec/pulllib.php");
$valid = apilogin();

8
base64.php

@ -1,4 +1,4 @@
<?
<?php
# Data: username -> speed
# fid -> folder
function sendError(){
@ -32,7 +32,7 @@ if($valid && isset($_GET["fid"])){
</head>
<body>
<style media="screen">
<? echo file_get_contents("anzeige.css") ?>
<?php echo file_get_contents("anzeige.css") ?>
</style>
<div id="wms">
@ -41,7 +41,7 @@ if($valid && isset($_GET["fid"])){
<script type="text/javascript">
var num = 0;
var wms = document.getElementById("wms");
var frames = [<?
var frames = [<?php
foreach ($frames as $key => $frame) {
print("\"".pathToBase64($frame)."\",");
}
@ -61,6 +61,6 @@ window.setInterval(function(){
}
wms.innerHTML=frames[num];
num= num+1;
}, <? echo $speed * 1000; ?>);
}, <?php echo $speed * 1000; ?>);
</script>
</html>

2
data/error.php

@ -1,4 +1,4 @@
<?
<?php
?>
<!DOCTYPE html>

6
index.php

@ -1,4 +1,4 @@
<?
<?php
# Data: username -> speed
# fid -> folder
function sendError(){
@ -39,7 +39,7 @@ if($valid && isset($_GET["fid"])){
<script type="text/javascript">
var num = 0;
var wms = document.getElementById("wms");
var frames = [<?
var frames = [<?php
foreach ($frames as $key => $frame) {
print("\"".$frame."\",");
}
@ -76,6 +76,6 @@ window.setInterval(function(){
wms.children[frames.length-1].setAttribute("class","loading");
}
num = num+1;
}, <? echo $speed * 1000; ?>);
}, <?php echo $speed * 1000; ?>);
</script>
</html>

6
index_old.php

@ -1,4 +1,4 @@
<?
<?php
# Data: username -> speed
# fid -> folder
function sendError(){
@ -39,7 +39,7 @@ if($valid && isset($_GET["fid"])){
<script type="text/javascript">
var num = 0;
var wms = document.getElementById("wms");
var frames = [<?
var frames = [<?php
foreach ($frames as $key => $frame) {
print("\"".pathToBase64($frame)."\",");
}
@ -59,6 +59,6 @@ window.setInterval(function(){
}
wms.innerHTML=frames[num];
num= num+1;
}, <? echo $speed * 1000; ?>);
}, <?php echo $speed * 1000; ?>);
</script>
</html>

5
info.php

@ -0,0 +1,5 @@
<?php
phpinfo();
?>

BIN
interface/exec/.pulllib.php.swp

2
interface/exec/_auth.php

@ -1,4 +1,4 @@
<?
<?php
## Fill with your data, and rename to "auth.php"
function getServer(){
return "localhost";

6
interface/exec/deletefile.php

@ -1,4 +1,4 @@
<?
<?php
include("pulllib.php");
println( "Trying to validate");
@ -40,9 +40,9 @@ println("Zurück: <a href=\"$back\">Link</a>. Redirect in 5 Sekunden.");
<html>
<head>
<title>Datei gelöscht</title>
<meta http-equiv="refresh" content="5; URL=<? echo htmlspecialchars($back); ?>">
<meta http-equiv="refresh" content="5; URL=<?php echo htmlspecialchars($back); ?>">
</head>
<body>
</body>
</html>
</html>

8
interface/exec/fr_include.php

@ -1,4 +1,4 @@
<?
<?php
// array(array(id, content, src, created))
$fileInfo = getInfoFilesInFolderSQL($_GET["fid"]);
@ -17,7 +17,7 @@ Hinweis: Aus Securitygründen funktionieren die Links auf fremde Ressources nich
<th>Hinzugefügt</th>
<th>Löschen</th>
</tr>
<?
<?php
foreach ($fileInfo as $num => $info) {
print("<tr>");
print("<td>".$info[0]."</td>");
@ -29,7 +29,7 @@ Hinweis: Aus Securitygründen funktionieren die Links auf fremde Ressources nich
?>
</table>
</form>
<?
<?php
?>
?>

2
interface/exec/image.php

@ -1,4 +1,4 @@
<?
<?php
function pathToBase64($path){
$type = pathinfo($path, PATHINFO_EXTENSION);

2
interface/exec/myio.php

@ -1,4 +1,4 @@
<?
<?php
include("auth.php");
include("string.php");

6
interface/exec/no_include.php

@ -1,4 +1,4 @@
<?
<?php
//include("pulllib.php"); if getCon not found...
if(isset($_POST["newDir"])){
$dir = $_POST["newDir"];
@ -30,6 +30,6 @@ echo getcwd();
</tr>
</table>
</form>
<?
<?php
?>
?>

6
interface/exec/nu_include.php

@ -1,4 +1,4 @@
<?
<?php
if(isset($_POST["newUser"])){
//used thingy
$newusername = $_POST["newUser"];
@ -95,6 +95,6 @@ echo "Nutzer über folgende Form hinzufügen:";
</script>
</form>
<br>Benutzername und Password müssen mehr als drei Zeichen lang sein.
<?
<?php
?>
?>

6
interface/exec/pulllib.php

@ -1,4 +1,4 @@
<?
<?php
// FIXME correct spelling, lowercase
// Contains credential function:
@ -48,7 +48,7 @@ function checkLoginData($username, $password){
// get user salt
$con = getCon();
if ($con->connect_error) {
echo "Database Error";
echo "Database Error (Connect: Check Login)";
}
$prep = $con->prepare('SELECT pw, salt FROM logins WHERE username = ? ');
$prep->bind_param('s',$username);
@ -71,7 +71,7 @@ function checkLoginData($username, $password){
function checkSessionData($username, $session){
$con = getCon();
if ($con->connect_error) {
echo "Database Error";
echo "Database Error (Connect: Check Session)";
}
$prep = $con->prepare('SELECT session FROM logins WHERE username = ?');
$prep->bind_param('s', $username);

2
interface/exec/string.php

@ -1,4 +1,4 @@
<?
<?php
function startsWith($haystack, $needle) {
// search backwards starting from haystack length characters from the end
return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;

8
interface/exec/upload_include.php

@ -1,4 +1,4 @@
<?
<?php
?>
<style type="text/css">
@ -34,8 +34,8 @@
<td><input type="submit" value="Hinzufügen" name="submitbtn" id="submitbtn"></td>
</tr>
</table>
<input type="hidden" name="fid" value="<?echo $_GET["fid"];?>">
<input type="hidden" name="folder" value="<?echo substr($_GET["folder"],0,strpos($_GET["folder"]," "));?>">
<input type="hidden" name="fid" value="<?php echo $_GET["fid"];?>">
<input type="hidden" name="folder" value="<?php echo substr($_GET["folder"],0,strpos($_GET["folder"]," "));?>">
</form>
<script type="text/javascript">
var fileupload = document.getElementById("fileupload");
@ -56,6 +56,6 @@
}
submitbtn.disabled=true;
</script >
<?
<?php
?>

6
interface/exec/upload_media.php

@ -1,4 +1,4 @@
<?
<?php
include("pulllib.php");
$fid = $_POST["fid"]; // folder id
@ -73,9 +73,9 @@ if(!$fail){
<html>
<head>
<title>Datei Upload</title>
<meta http-equiv="refresh" content="5; URL=<? echo $redir; ?>">
<meta http-equiv="refresh" content="5; URL=<?php echo $redir; ?>">
</head>
<body>
<? echo $answer; ?>
<?php echo $answer; ?>
</body>
</html>

6
interface/index.php

@ -1,11 +1,11 @@
<?
<?php
include("./exec/pulllib.php");
?>
<!DOCTYPE html>
<html>
<head>
<title>WMS-Interface</title>
<? echo file_get_contents("./html/head.html"); ?>
<?php echo file_get_contents("./html/head.html"); ?>
</head>
<body>
<div id="holder">
@ -26,4 +26,4 @@ include("./exec/pulllib.php");
</table></form></div>
</div>
</body>
</html>
</html>

8
interface/panel.php

@ -1,4 +1,4 @@
<?
<?php
include("./exec/pulllib.php");
@ -14,13 +14,13 @@ if (!$login){
<html>
<head>
<title>WMS-Interface</title>
<? echo file_get_contents("./html/head.html"); ?>
<?php echo file_get_contents("./html/head.html"); ?>
</head>
<body>
<div id="holder">
<div id="menu"><? buildMenu(); ?></div>
<div id="menu"><?php buildMenu(); ?></div>
<div id="page">
<?
<?php
if(isset($_GET["folder"])){
echo "<h2>Ordner: ".$_GET["folder"]."</h2>";
if(isset($_GET["fid"])){

4
login.php

@ -1,4 +1,4 @@
<?
<?php
include("./interface/exec/pulllib.php");
function verifyEncryptPw($username, $pdbpassword){
@ -40,4 +40,4 @@ if(isset($_GET["fid"])){
header("Location:index.php");
}
?>
?>
Loading…
Cancel
Save