From 421a260be9f3fe31ddc33fdb95b956fed36a73ba Mon Sep 17 00:00:00 2001 From: Robert Goldmann <deadlocker@gmx.de> Date: Sun, 28 Jul 2019 15:00:03 +0200 Subject: [PATCH] cleanup --- index.php | 3 - php/admin/admin-milestones.php | 150 ---------- php/admin/index.php | 3 - php/admin/login.php | 51 ---- php/admin/logout.php | 8 - php/api.php | 36 --- php/database.php | 4 - php/error.php | 56 ---- php/example.php | 281 ------------------ php/getLanguageJSON.php | 14 - php/index.php | 527 --------------------------------- php/language.json | 14 - php/mysql.php | 404 ------------------------- php/overview.php | 62 ---- php/pgsql.php | 399 ------------------------- 15 files changed, 2012 deletions(-) delete mode 100644 index.php delete mode 100644 php/admin/admin-milestones.php delete mode 100644 php/admin/index.php delete mode 100644 php/admin/login.php delete mode 100644 php/admin/logout.php delete mode 100644 php/api.php delete mode 100644 php/database.php delete mode 100644 php/error.php delete mode 100644 php/example.php delete mode 100644 php/getLanguageJSON.php delete mode 100644 php/index.php delete mode 100644 php/language.json delete mode 100644 php/mysql.php delete mode 100644 php/overview.php delete mode 100644 php/pgsql.php diff --git a/index.php b/index.php deleted file mode 100644 index 8d1bad9..0000000 --- a/index.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php -header('Location: php/index.php'); -exit; \ No newline at end of file diff --git a/php/admin/admin-milestones.php b/php/admin/admin-milestones.php deleted file mode 100644 index 8e880c9..0000000 --- a/php/admin/admin-milestones.php +++ /dev/null @@ -1,150 +0,0 @@ -<!DOCTYPE html> - -<?php -if(!isset($_SESSION)) -{ - session_start(); -} -if(!isset($_SESSION['loggedIn'])) -{ - header('Location: login.php'); -} - -include_once('../getLanguageJSON.php'); -include_once('../database.php'); - -if(!isset($_GET['id'])) -{ - header('Location: ../error.php?message=error_param_missing'); - exit; -} - -$ID = $_GET['id']; -if(!is_numeric($ID) || $ID < 1) -{ - header('Location: ../error.php?message=error_param_invalid'); - exit; -} - -$db = new DB(); -$db->createTables(); - -$projectName = $db->getRoadmap($ID); -if($projectName == false) -{ - header('Location: ../error.php?message=error_roadmap_not_existing'); - exit; -} -$projectName = $projectName["Projectname"]; - -?> -<html xmlns="http://www.w3.org/1999/html"> -<head> - <meta charset="UTF-8"/> - <title>Milestones - Adminarea</title> - <!--Import Google Icon Font--> - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> - <!--Import materialize.css--> - <link type="text/css" rel="stylesheet" href="../../materialize/css/materialize.min.css" media="screen,projection"/> - <link type="text/css" rel="stylesheet" href="../../css/style.css"/> - - <!--Import jQuery before materialize.js--> - <script type="text/javascript" src="../../js/jquery-2.2.4.min.js"></script> - <script type="text/javascript" src="../../materialize/js/materialize.min.js"></script> - <script type="text/javascript" src="../../js/main.js"></script> - <script type="text/javascript" src="../../js/ResizeSensor.js"></script> - <script type="text/javascript" src="../../js/ElementQueries.js"></script> - - <!--Let browser know website is optimized for mobile--> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> -</head> - -<body class="grey lighten-3"> -<a class="waves-effect waves-light btn blue darken-3" href="admin-roadmaps.php"><i class="material-icons left">arrow_back</i>Back</a> -<a class="waves-effect waves-light btn blue darken-3 right" href="logout.php"><i class="material-icons left">lock</i>Logout</a> -<div id="main"> - <div class="container"> - <h2 class="center-align truncate" id="headline"><?php echo $projectName;?></h2> - <h4 class="center-align" id="headline">Milestones</h4> - - <div class="row"> - <div class="col s12 m8 offset-m2 l6 offset-l3 center-align"> - <a class="waves-effect waves-light btn blue darken-3" href="admin-edit-milestone.php?roadmapID=<?php echo $ID;?>"><i - class="material-icons left">add</i>New</a> - </div> - </div> - <div class="row"> - <div class="col s12 m12 l12"> - <table class="bordered"> - <thead> - <tr> - <th data-field="id">Version Code</th> - <th data-field="project-name">Version Name</th> - <th data-field="project-name">Title</th> - <th data-field="project-name">Due Date</th> - <th data-field="project-name">Completion Date</th> - <th data-field="project-name">Status</th> - </tr> - </thead> - - <tbody> - <?php - $milestones = $db->getMilestones($ID); - - if($milestones == false) - { - echo '<td colspan="6" class="center-align">No Milestones</td>'; - exit; - } - else - { - for($i = 0; $i < sizeof($milestones); $i++) - { - $status = $milestones[$i]['Status']; - $dueDate = $milestones[$i]['DueDate']; - $dueDate = date('d.m.Y', strtotime($dueDate)); - if($dueDate == "01.01.2000") - { - $dueDate = ""; - } - - $doneDate = $milestones[$i]['CompletionDate']; - $doneDate = date('d.m.Y', strtotime($doneDate)); - if($doneDate == "01.01.2000") - { - $doneDate = ""; - } - - echo '<tr>' . - '<td>' . $milestones[$i]['VersionCode'] . '</td>' . - '<td>' . $milestones[$i]['VersionName'] . '</td>' . - '<td>' . $milestones[$i]['Title'] . '</td>' . - '<td>' . $dueDate . '</td>' . - '<td>' . $doneDate . '</td>'; - - if($status == "0") - { - echo '<td><i class="material-icons red-text">build</i></td>'; - } - else - { - echo '<td><i class="material-icons green-text">check</i></td>'; - } - - echo '<td class="right-align">' . - '<a class="btn-flat no-padding tooltipped" href="admin-edit-milestone.php?id=' . $milestones[$i]['ID'] . '&roadmapID='. $ID .'&edit=true" data-position="bottom" data-delay="50" data-tooltip="Edit"><i class="material-icons left">edit</i></a><br>' . - '<a class="btn-flat button-delete-milestone no-padding tooltipped" data-id="' . $milestones[$i]['ID'] . '" data-roadmapid="' . $ID . '" data-position="bottom" data-delay="50" data-tooltip="Delete"><i class="material-icons left">delete</i></a><br>' . - '<a class="btn-flat no-padding tooltipped" href="admin-tasks.php?id=' . $milestones[$i]['ID'] . '" data-position="bottom" data-delay="50" data-tooltip="Edit Tasks"><i class="material-icons left">assignment</i></a>' . - '</td>' . - '</tr>'; - } - } - ?> - </tbody> - </table> - </div> - </div> - </div> -</div> -</body> -</html> \ No newline at end of file diff --git a/php/admin/index.php b/php/admin/index.php deleted file mode 100644 index 59595ab..0000000 --- a/php/admin/index.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php -header('Location: admin-roadmaps.php'); -exit; \ No newline at end of file diff --git a/php/admin/login.php b/php/admin/login.php deleted file mode 100644 index f690b69..0000000 --- a/php/admin/login.php +++ /dev/null @@ -1,51 +0,0 @@ -<!DOCTYPE html> - -<?php -include_once('../getLanguageJSON.php'); -include_once('../database.php'); -?> -<html xmlns="http://www.w3.org/1999/html"> - <head> - <meta charset="UTF-8"/> - <title>Login</title> - - <!--Import Google Icon Font--> - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> - <!--Import materialize.css--> - <link type="text/css" rel="stylesheet" href="../../materialize/css/materialize.min.css" media="screen,projection"/> - <link type="text/css" rel="stylesheet" href="../../css/style.css"/> - - <!--Import jQuery before materialize.js--> - <script type="text/javascript" src="../../js/jquery-2.2.4.min.js"></script> - <script type="text/javascript" src="../../materialize/js/materialize.min.js"></script> - <script type="text/javascript" src="../../js/main.js"></script> - <script type="text/javascript" src="../../js/ResizeSensor.js"></script> - <script type="text/javascript" src="../../js/ElementQueries.js"></script> - - <!--Let browser know website is optimized for mobile--> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - </head> - - <body class="grey lighten-3"> - <div id="main"> - <div class="container"> - <h2 class="center-align" id="headline">Login</h2> - - <div class="row center-align"> - <div class="col s10 offset-s1 m6 offset-m3 l4 offset-l4"> - <div class="input-field col s12"> - <input id="password" name="password" type="password"> - <label for="password">Password</label> - </div> - </div> - </div> - <div class="row center-align margin-top"> - <div class="col s12 m8 offset-m2 l6 offset-l3"> - <a class="waves-effect waves-light btn blue darken-3" href="../index.php"><i class="material-icons left">home</i>Home</a> - <a class="waves-effect waves-light btn blue darken-3 margin-left button-login"><i class="material-icons left">exit_to_app</i>Login</a> - </div> - </div> - </div> - </div> - </body> -</html> \ No newline at end of file diff --git a/php/admin/logout.php b/php/admin/logout.php deleted file mode 100644 index 7a5cc7d..0000000 --- a/php/admin/logout.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -session_start(); -session_unset(); -session_destroy(); -session_write_close(); -setcookie(session_name(),'',0,'/'); -session_regenerate_id(true); -header('Location: ../index.php'); \ No newline at end of file diff --git a/php/api.php b/php/api.php deleted file mode 100644 index 861e9f9..0000000 --- a/php/api.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -include_once('database.php'); - -$result = new stdClass();; -if(!isset($_GET['id'])) -{ - $result->response = "Invalid Parameters"; - echo json_encode($result); - exit; -} - -$ID = $_GET['id']; -if(!is_numeric($ID) || $ID < 1) -{ - $result->response = "Invalid Parameters"; - echo json_encode($result); - exit; -} - -$db = new DB(); -$db->createTables(); - -$milestone = $db->getLatestFinishedMilestone($ID)[0]; -if($milestone == false) -{ - $result->response = "Request Error"; - echo json_encode($result); - exit; -} -else -{ - $params = array('versionName' => $milestone['VersionName'], 'date' => $milestone['CompletionDate']); - $result->response = $params; - echo json_encode($result); - exit; -} \ No newline at end of file diff --git a/php/database.php b/php/database.php deleted file mode 100644 index 3f0b0ff..0000000 --- a/php/database.php +++ /dev/null @@ -1,4 +0,0 @@ -<?php -include(dirname(__FILE__)."/admin/helper/settings.php"); - -include(dirname(__FILE__)."/".$database_type.".php"); \ No newline at end of file diff --git a/php/error.php b/php/error.php deleted file mode 100644 index 57f32bf..0000000 --- a/php/error.php +++ /dev/null @@ -1,56 +0,0 @@ -<!DOCTYPE html> - -<?php -include_once('getLanguageJSON.php'); -?> -<html xmlns="http://www.w3.org/1999/html"> - <head> - <meta charset="UTF-8"/> - <title>Roadmap</title> - <!--Import Google Icon Font--> - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> - <!--Import materialize.css--> - <link type="text/css" rel="stylesheet" href="../materialize/css/materialize.min.css" media="screen,projection"/> - <link type="text/css" rel="stylesheet" href="../css/style.css"/> - - <!--Import jQuery before materialize.js--> - <script type="text/javascript" src="../js/jquery-2.2.4.min.js"></script> - <script type="text/javascript" src="../materialize/js/materialize.min.js"></script> - <script type="text/javascript" src="../js/main.js"></script> - <script type="text/javascript" src="../js/ResizeSensor.js"></script> - <script type="text/javascript" src="../js/ElementQueries.js"></script> - - <!--Let browser know website is optimized for mobile--> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - </head> - - <body class="grey lighten-3"> - <main> - <div class="container"> - <div class="row"> - <div class="s6 offset-s3 center-align margin-top-huge"> - <h5> - <?php - if(isset($_GET['message'])) - { - if($languageJSON->{$_GET['message']}) - { - echo $languageJSON->{$_GET['message']}; - } - else - { - echo $languageJSON->error_general; - } - } - else - { - echo $languageJSON->error_general; - } - ?> - </h5> - </div> - </div> - </div> - </main> - </body> -</html> \ No newline at end of file diff --git a/php/example.php b/php/example.php deleted file mode 100644 index 234c335..0000000 --- a/php/example.php +++ /dev/null @@ -1,281 +0,0 @@ -<!DOCTYPE html> - -<?php -include_once('getLanguageJSON.php'); -?> -<html xmlns="http://www.w3.org/1999/html"> - <head> - <meta charset="UTF-8"/> - <title>Roadmap</title> - <!--Import Google Icon Font--> - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> - <!--Import materialize.css--> - <link type="text/css" rel="stylesheet" href="../materialize/css/materialize.min.css" media="screen,projection"/> - <link type="text/css" rel="stylesheet" href="../css/style.css"/> - - <!--Import jQuery before materialize.js--> - <script type="text/javascript" src="../js/jquery-2.2.4.min.js"></script> - <script type="text/javascript" src="../materialize/js/materialize.min.js"></script> - <script type="text/javascript" src="../js/main.js"></script> - <script type="text/javascript" src="../js/ResizeSensor.js"></script> - <script type="text/javascript" src="../js/ElementQueries.js"></script> - - <!--Let browser know website is optimized for mobile--> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - </head> - - <body class="grey lighten-3"> - <div id="main"> - <div class="container"> - <h2 class="center-align" id="headline">PlayWall Roadmap</h2> - <div class="row"> - <div class="col s12"> - <div class="row"> - <div class="col s1 m2 l2 offset-m1 offset-l1 no-padding"> - <div class="hide-on-small-only trainmap"> - <div class="train-circle train-circle-light"></div> - <div class="train-line dotted"></div> - <div class="train-circle blue"></div> - <div class="train-line"></div> - <div class="train-circle blue"></div> - <div class="train-line"></div> - <div class="train-circle blue"></div> - <div class="train-line"></div> - <div class="train-circle blue"></div> - </div> - <div class="hide-on-med-and-up trainmap-small"> - <div class="train-circle train-circle-light train-circle-small"></div> - <div class="train-line dotted-small train-line-small"></div> - <div class="train-circle blue train-circle-small"></div> - <div class="train-line train-line-small"></div> - <div class="train-circle blue train-circle-small"></div> - <div class="train-line train-line-small"></div> - <div class="train-circle blue train-circle-small"></div> - <div class="train-line train-line-small"></div> - <div class="train-circle blue train-circle-small"></div> - </div> - </div> - <div class="col s11 m7 l6"> - <div class="card padding white milestone"> - <div class="card-content"> - <div class="blue lighten-2 center-align milestone-title"> - <span class="card-title bold padding-left-and-right truncate">v1.6.0 - Next Version</span> - </div> - <div class="milestone-content margin-top init-as-expanded"> - <div class="white progress-container"> - <div class="progress grey lighten-2 high-progress margin-bottom"> - <div class="determinate green" style="width: 40%"></div> - </div> - </div> - <div class="row"> - <div class="col s6 valign-wrapper"> - <i class="material-icons valign">event</i><span class="valign margin-left"><?php echo $languageJSON->due_by?> 25.06.16</span> - </div> - <div class="col s6 valign-wrapper"> - <i class="material-icons valign">settings</i><span class="valign margin-left">40% <?php echo $languageJSON->done?></span> - </div> - </div> - <ul class="collapsible white" data-collapsible="accordion"> - <li> - <div class="collapsible-header bold"><i class="material-icons red-text">build</i>Layout<span class="right">1/3</span></div> - <div class="collapsible-body"> - - <ul class="collapsible white margin-left-and-right no-shadow margin-top-and-bottom" data-collapsible="accordion"> - <li> - <div class="collapsible-header bold"><span class="left">1</span><i class="material-icons green-text margin-left">check</i>Layout Einstellungen</div> - <div class="collapsible-body"><p>PlayWall ermöglicht es nun Audio und andere Medien im Hintergrund wiederzugeben, während eine andere Seite offen ist.</p></div> - </li> - <li> - <div class="collapsible-header bold"><span class="left">2</span><i class="material-icons red-text margin-left">build</i>Layout Cards</div> - <div class="collapsible-body"><p>PlayWall ermöglicht es nun Audio und andere Medien im Hintergrund wiederzugeben, während eine andere Seite offen ist.</p></div> - </li> - <li> - <div class="collapsible-header bold"><span class="left">3</span><i class="material-icons red-text margin-left">build</i>Layout Equalizer</div> - <div class="collapsible-body"><p>PlayWall ermöglicht es nun Audio und andere Medien im Hintergrund wiederzugeben, während eine andere Seite offen ist.</p></div> - </li> - </ul> - - </div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons red-text">build</i>Trigger</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - </ul> - </div> - </div> - </div> - - - <div class="card padding white milestone"> - <div class="card-content"> - <div class="amber lighten-2 center-align milestone-title"> - <span class="card-title bold padding-left-and-right truncate">v1.5.7 - Current Version</span> - </div> - <div class="milestone-content margin-top init-as-expanded"> - <div class="row"> - <div class="col s6 valign-wrapper"> - <i class="material-icons valign">event</i><span class="valign margin-left"><?php echo $languageJSON->due_by?> 25.06.16</span> - </div> - <div class="col s6 valign-wrapper"> - <i class="material-icons valign">event</i><span class="valign margin-left"><?php echo $languageJSON->done_at?> 25.06.16</span> - </div> - </div> - <ul class="collapsible white" data-collapsible="accordion"> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Play in Background</div> - <div class="collapsible-body"><p>PlayWall ermöglicht es nun Audio und andere Medien im Hintergrund wiederzugeben, während eine andere Seite offen ist.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - </ul> - </div> - </div> - </div> - - <div class="card padding white milestone"> - <div class="card-content"> - <div class="grey lighten-2 center-align milestone-title"> - <span class="card-title bold padding-left-and-right truncate">v1.3.0 - Third Version</span> - </div> - <div class="milestone-content margin-top"> - <div class="row"> - <div class="col s6 valign-wrapper"> - <i class="material-icons valign">event</i><span class="valign margin-left"><?php echo $languageJSON->due_by?> 25.06.16</span> - </div> - <div class="col s6 valign-wrapper"> - <i class="material-icons valign">event</i><span class="valign margin-left"><?php echo $languageJSON->done_at?> 25.06.16</span> - </div> - </div> - <ul class="collapsible white" data-collapsible="accordion"> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Play in Background</div> - <div class="collapsible-body"><p>PlayWall ermöglicht es nun Audio und andere Medien im Hintergrund wiederzugeben, während eine andere Seite offen ist.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - - </ul> - </div> - </div> - </div> - - <div class="card padding white milestone"> - <div class="card-content"> - <div class="grey lighten-2 center-align milestone-title"> - <span class="card-title bold padding-left-and-right truncate">v1.1.0 - Second Version</span> - </div> - <div class="milestone-content margin-top"> - <div class="row"> - <div class="col s6 valign-wrapper"> - <i class="material-icons valign">event</i><span class="valign margin-left"><?php echo $languageJSON->due_by?> 25.06.16</span> - </div> - <div class="col s6 valign-wrapper"> - <i class="material-icons valign">event</i><span class="valign margin-left"><?php echo $languageJSON->done_at?> 25.06.16</span> - </div> - </div> - <ul class="collapsible white" data-collapsible="accordion"> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Play in Background</div> - <div class="collapsible-body"><p>PlayWall ermöglicht es nun Audio und andere Medien im Hintergrund wiederzugeben, während eine andere Seite offen ist.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - - </ul> - </div> - </div> - </div> - - <div class="card padding white milestone"> - <div class="card-content"> - <div class="grey lighten-2 center-align milestone-title"> - <span class="card-title bold padding-left-and-right truncate">v1.0.0 - First Version</span> - </div> - <div class="milestone-content margin-top"> - <div class="row"> - <div class="col s6 valign-wrapper"> - <i class="material-icons valign">event</i><span class="valign margin-left"><?php echo $languageJSON->due_by?> 25.06.16</span> - </div> - <div class="col s6 valign-wrapper"> - <i class="material-icons valign">event</i><span class="valign margin-left"><?php echo $languageJSON->done_at?> 25.06.16</span> - </div> - </div> - <ul class="collapsible white" data-collapsible="accordion"> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Play in Background</div> - <div class="collapsible-body"><p>PlayWall ermöglicht es nun Audio und andere Medien im Hintergrund wiederzugeben, während eine andere Seite offen ist.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - <li> - <div class="collapsible-header bold"><i class="material-icons green-text">check</i>Live Mode</div> - <div class="collapsible-body"><p>Mit dem neuen Livemode ist ein noch einfach die Kontrolle während Veranstaltungen zu behalten.</p></div> - </li> - </ul> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </body> -</html> \ No newline at end of file diff --git a/php/getLanguageJSON.php b/php/getLanguageJSON.php deleted file mode 100644 index 15cd9ff..0000000 --- a/php/getLanguageJSON.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php -$file = realpath(dirname(__FILE__) . '/language.json'); -if(file_exists($file)) -{ - $languageJSON = json_decode(file_get_contents($file)); -} -else -{ - $languageJSON = json_decode('{ - "due_by": "Due by", - "done": "Done", - "done_at": "Done at" - }'); -} \ No newline at end of file diff --git a/php/index.php b/php/index.php deleted file mode 100644 index 234afa0..0000000 --- a/php/index.php +++ /dev/null @@ -1,527 +0,0 @@ -<!DOCTYPE html> - -<?php -include_once('getLanguageJSON.php'); -include(dirname(__FILE__)."/admin/helper/settings.php"); - -if(!isset($_GET['id'])) -{ - header('Location: overview.php'); - exit; -} - -$ID = $_GET['id']; -if(!is_numeric($ID) || $ID < 1) -{ - header('Location: error.php?message=error_param_invalid'); - exit; -} - - -$roadmap = json_decode(file_get_contents($api_url . "/roadmap/" . $ID)); -if($roadmap == false) -{ - header('Location: error.php?message=error_roadmap_not_existing'); - exit; -} -$projectName = $roadmap->Projectname; - -$milestones = json_decode(file_get_contents($api_url . "/milestones/" . $ID)); -if($milestones == false) -{ - header('Location: error.php?message=error_no_milestones'); - exit; -} - -$numberOfMilestones = sizeof($milestones); - -$openMilestones = json_decode(file_get_contents($api_url . "/milestones/" . $ID. "/open")); -if($openMilestones == false) -{ - header('Location: error.php?message=error_database_connection'); - exit; -} - -$numberOfOpenMilestones = sizeof($openMilestones); -?> -<html xmlns="http://www.w3.org/1999/html"> - <head> - <meta charset="UTF-8"/> - <title>Roadmap - <?php echo $projectName;?></title> - <!--Import Google Icon Font--> - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> - <!--Import materialize.css--> - <link type="text/css" rel="stylesheet" href="../materialize/css/materialize.min.css" media="screen,projection"/> - <link type="text/css" rel="stylesheet" href="../css/style.css"/> - - <!--Import jQuery before materialize.js--> - <script type="text/javascript" src="../js/jquery-2.2.4.min.js"></script> - <script type="text/javascript" src="../materialize/js/materialize.min.js"></script> - <script type="text/javascript" src="../js/main.js"></script> - <script type="text/javascript" src="../js/ResizeSensor.js"></script> - <script type="text/javascript" src="../js/ElementQueries.js"></script> - - <!--Let browser know website is optimized for mobile--> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - </head> - - <body class="grey lighten-3"> - <a class="btn-flat right" href="admin/login.php">Login</a> - <div style="clear: both;"></div> - <div id="main"> - <div class="container"> - <h2 class="center-align" id="headline"><?php echo $projectName;?> Roadmap</h2> - <div class="row"> - <div class="col s12"> - <div class="row"> - <div class="col s1 m2 l2 offset-m1 offset-l1 no-padding"> - <div class="hide-on-small-only trainmap"> - <?php - createTrainmapMedAndUp($numberOfOpenMilestones, $numberOfMilestones); - ?> - </div> - <div class="hide-on-med-and-up trainmap-small"> - <?php - createTrainmapSmall($numberOfOpenMilestones, $numberOfMilestones); - ?> - </div> - </div> - <div class="col s11 m7 l6"> - - <?php - $isFirstMilestone = true; - for($i = 0; $i < $numberOfMilestones; $i++) - { - $currentMilestone = $milestones[$i]; - - //Milestone is inDev - if($currentMilestone->Status == 0) - { - $color = 'blue lighten-2'; - - $dueDate = $currentMilestone->DueDate; - if($dueDate == "Sat, 01 Jan 2000 00:00:00 GMT") - { - $dueDate = "-"; - } - else - { - $dueDate = date_create($dueDate); - $dueDate = date_format($dueDate, "d.m.Y"); - } - - $tasks = json_decode(file_get_contents($api_url . "/tasks/" . $currentMilestone->ID)); - if($tasks == false) - { - printMilestoneIndevAndNoTasks($color, $currentMilestone, $dueDate, $languageJSON); - } - else - { - printMilestoneIndevWithTasks($currentMilestone, $tasks, $api_url, $color, $languageJSON); - } - } - //Milestone is done - else - { - if($isFirstMilestone) - { - $color = 'amber lighten-2'; - } - else - { - $color = 'grey lighten-2'; - } - - $dueDate = $currentMilestone->DueDate; - if($dueDate == "Sat, 01 Jan 2000 00:00:00 GMT") - { - $dueDate = "-"; - } - else - { - $dueDate = date_create($dueDate); - $dueDate = date_format($dueDate, "d.m.Y"); - } - - $completionDate = $currentMilestone->CompletionDate; - $completionDate = date_create($completionDate); - $completionDate = date_format($completionDate, "d.m.Y"); - - $tasks = json_decode(file_get_contents($api_url . "/tasks/" . $currentMilestone->ID)); - if($tasks == false) - { - printMilestoneDoneAndNoTasks($color, $currentMilestone, $isFirstMilestone, $languageJSON, $dueDate, $completionDate); - } - else - { - printMilestoneDoneWithTasks($color, $currentMilestone, $isFirstMilestone, $languageJSON, $dueDate, $completionDate, $tasks, $api_url); - } - - if($isFirstMilestone) - { - $isFirstMilestone = false; - } - } - } - ?> - </div> - </div> - </div> - </div> - </div> - </body> -</html> - - - -<?php -function createTrainmapMedAndUp($numberofOpenMilestones, $numberOfMilestones) -{ - for($i = 0; $i < $numberofOpenMilestones; $i++) - { - echo '<div class="train-circle train-circle-light"></div>'; - - if($numberofOpenMilestones != $numberOfMilestones || $i != ($numberofOpenMilestones-1)) - { - echo '<div class="train-line dotted"></div>'; - } - } - - for($i = 0; $i < ($numberOfMilestones - $numberofOpenMilestones); $i++) - { - echo '<div class="train-circle blue"></div>'; - - if($i != (($numberOfMilestones - $numberofOpenMilestones) - 1)) - { - echo '<div class="train-line"></div>'; - } - } -} - -function createTrainmapSmall($numberofOpenMilestones, $numberOfMilestones) -{ - for($i = 0; $i < $numberofOpenMilestones; $i++) - { - echo '<div class="train-circle train-circle-light train-circle-small"></div>'; - - if($numberofOpenMilestones != $numberOfMilestones || $i != ($numberofOpenMilestones-1)) - { - echo '<div class="train-line dotted-small train-line-small"></div>'; - } - } - - for($i = 0; $i < ($numberOfMilestones - $numberofOpenMilestones); $i++) - { - echo '<div class="train-circle blue train-circle-small"></div>'; - - if($i != (($numberOfMilestones - $numberofOpenMilestones) - 1)) - { - echo '<div class="train-line train-line-small"></div>'; - } - } -} - -function printMilestoneIndevAndNoTasks($color, $currentMilestone, $dueDate, $languageJSON) -{ - echo '<div class="card padding white milestone">' . - '<div class="card-content">' . - '<div class="'.$color.' center-align milestone-title">'; - if($currentMilestone->VersionName == $currentMilestone->Title) - { - echo '<span class="card-title bold padding-left-and-right truncate">' . $currentMilestone->Title . '</span>'; - - } - else - { - echo '<span class="card-title bold padding-left-and-right truncate">' . $currentMilestone->VersionName . ' - ' . $currentMilestone->Title . '</span>'; - } - echo '</div>' . - '<div class="milestone-content margin-top">' . - '<div class="white progress-container">'. - '<div class="progress grey lighten-2 high-progress margin-bottom">'. - '<div class="determinate green" style="width: 0%"></div>'. - '</div>'. - '</div>'. - '<div class="row">' . - '<div class="col s6 valign-wrapper">' . - '<i class="material-icons valign">event</i><span class="valign margin-left">' . $languageJSON->due_by . ' ' . $dueDate . '</span>' . - '</div>' . - '<div class="col s6 valign-wrapper">' . - '<i class="material-icons valign">event</i><span class="valign margin-left">0% ' . $languageJSON->done . '</span>' . - '</div>' . - '</div>' . - '</div>' . - '</div>' . - '</div>'; -} - -function printMilestoneIndevWithTasks($currentMilestone, $tasks, $api_url, $color, $languageJSON) -{ - $dueDate = $currentMilestone->DueDate; - if($dueDate == "Sat, 01 Jan 2000 00:00:00 GMT") - { - $dueDate = "-"; - } - else - { - $dueDate = date_create($dueDate); - $dueDate = date_format($dueDate, "d.m.Y"); - } - - $openTasks = json_decode(file_get_contents($api_url . "/tasks/" . $currentMilestone->ID. "/open")); - if($openTasks == false) - { - header('Location: error.php?message=error_database_connection'); - exit; - } - else - { - $numberOfOpenTasks = sizeof($openTasks); - $percentage = ((sizeof($tasks) - $numberOfOpenTasks) / sizeof($tasks))*100; - $percentage = round($percentage); - - echo '<div class="card padding white milestone">' . - '<div class="card-content">' . - '<div class="'.$color.' center-align milestone-title">'; - if($currentMilestone->VersionName == $currentMilestone->Title) - { - echo '<span class="card-title bold padding-left-and-right truncate">' . $currentMilestone->Title . '</span>'; - - } - else - { - echo '<span class="card-title bold padding-left-and-right truncate">' . $currentMilestone->VersionName . ' - ' . $currentMilestone->Title . '</span>'; - } - echo '</div>' . - '<div class="milestone-content margin-top">' . - '<div class="white progress-container">'. - '<div class="progress grey lighten-2 high-progress margin-bottom">'. - '<div class="determinate green" style="width: '.$percentage.'%"></div>'. - '</div>'. - '</div>'. - '<div class="row">' . - '<div class="col s6 valign-wrapper">' . - '<i class="material-icons valign">event</i><span class="valign margin-left">' . $languageJSON->due_by . ' ' . $dueDate . '</span>' . - '</div>' . - '<div class="col s6 valign-wrapper">' . - '<i class="material-icons valign">event</i><span class="valign margin-left">'.$percentage.'% ' . $languageJSON->done .'</span>' . - '</div>' . - '</div>' . - '<ul class="collapsible white" data-collapsible="accordion">'; - for($k = 0; $k < sizeof($tasks); $k++) - { - $currentTask = $tasks[$k]; - - $subtasks = json_decode(file_get_contents($api_url . "/subtasks/" . $currentTask->ID)); - if($subtasks == false) - { - //inDev - if($currentTask->Status == 0) - { - echo '<li>' . - '<div class="collapsible-header bold truncate"><i class="material-icons red-text">build</i>' . $currentTask->Title . '</div>' . - '<div class="collapsible-body"><p>' . $currentTask->Description . '</p></div>' . - '</li>'; - } - //done - else - { - echo '<li>' . - '<div class="collapsible-header bold truncate"><i class="material-icons green-text">check</i>' . $currentTask->Title . '</div>' . - '<div class="collapsible-body"><p>' . $currentTask->Description . '</p></div>' . - '</li>'; - } - } - else - { - printSubTasksDone($currentTask, $subtasks, $api_url); - } - } - - echo '</ul>' . - '</div>' . - '</div>' . - '</div>'; - } -} - -function printSubTasksDone($currentTask, $subtasks, $api_url) -{ - $openSubtasks = json_decode(file_get_contents($api_url . "/subtasks/" . $currentTask->ID . "/open")); - $numberOfOpenSubtasks = sizeof($openSubtasks); - if($numberOfOpenSubtasks == 0) - { - echo '<li>' . - '<div class="collapsible-header bold"><i class="material-icons green-text">check</i>'.$currentTask->Title.'<span class="right">' . (sizeof($subtasks) - $numberOfOpenSubtasks) . '/' . sizeof($subtasks) . '</span></div>' . - '<div class="collapsible-body">' . - '<ul class="collapsible white margin-left-and-right no-shadow margin-top-and-bottom" data-collapsible="accordion">'; - } - else - { - echo '<li>' . - '<div class="collapsible-header bold"><i class="material-icons red-text">build</i>'.$currentTask->Title.'<span class="right">' . (sizeof($subtasks) - $numberOfOpenSubtasks) . '/' . sizeof($subtasks) . '</span></div>' . - '<div class="collapsible-body">' . - '<ul class="collapsible white margin-left-and-right no-shadow margin-top-and-bottom" data-collapsible="accordion">'; - } - - for($m = 0; $m < sizeof($subtasks); $m++) - { - $currentSubTask = $subtasks[$m]; - //inDev - if($currentSubTask->Status == 0) - { - echo '<li>' . - '<div class="collapsible-header bold"><span class="left">' . ($m + 1) . '</span><i class="material-icons red-text margin-left">build</i>' . $currentSubTask->Title . '</div>' . - '<div class="collapsible-body"><p>' . $currentSubTask->Description . '</p></div>' . - '</li>'; - } - //done - else - { - echo '<li>' . - '<div class="collapsible-header bold"><span class="left">' . ($m + 1) . '</span><i class="material-icons green-text margin-left">check</i>' . $currentSubTask->Title . '</div>' . - '<div class="collapsible-body"><p>' . $currentSubTask->Description . '</p></div>' . - '</li>'; - } - } - - echo '</ul>' . - '</div>' . - '</li>'; -} - -function printMilestoneDoneAndNoTasks($color, $currentMilestone, $isFirstMilestone, $languageJSON, $dueDate, $completionDate) -{ - echo '<div class="card padding white milestone">' . - '<div class="card-content">' . - '<div class="'.$color.' center-align milestone-title">'; - if($currentMilestone->VersionName == $currentMilestone->Title) - { - echo '<span class="card-title bold padding-left-and-right truncate">' . $currentMilestone->Title . '</span>'; - - } - else - { - echo '<span class="card-title bold padding-left-and-right truncate">' . $currentMilestone->VersionName . ' - ' . $currentMilestone->Title . '</span>'; - } - echo '</div>'; - - if($isFirstMilestone) - { - echo '<div class="milestone-content margin-top init-as-expanded">'; - } - else - { - echo '<div class="milestone-content margin-top">'; - } - - echo '<div class="row">' . - '<div class="col s6 valign-wrapper">' . - '<i class="material-icons valign">event</i><span class="valign margin-left">' . $languageJSON->due_by . ' ' . $dueDate . '</span>' . - '</div>' . - '<div class="col s6 valign-wrapper">' . - '<i class="material-icons valign">event</i><span class="valign margin-left">' . $languageJSON->done_at . ' ' . $completionDate . '</span>' . - '</div>' . - '</div>' . - '</div>' . - '</div>' . - '</div>'; -} - -function printMilestoneDoneWithTasks($color, $currentMilestone, $isFirstMilestone, $languageJSON, $dueDate, $completionDate, $tasks, $api_url) -{ - echo '<div class="card padding white milestone">' . - '<div class="card-content">' . - '<div class="'.$color.' center-align milestone-title">'; - if($currentMilestone->VersionName == $currentMilestone->Title) - { - echo '<span class="card-title bold padding-left-and-right truncate">' . $currentMilestone->Title . '</span>'; - - } - else - { - echo '<span class="card-title bold padding-left-and-right truncate">' . $currentMilestone->VersionName . ' - ' . $currentMilestone->Title . '</span>'; - } - echo '</div>'; - - if($isFirstMilestone) - { - echo '<div class="milestone-content margin-top init-as-expanded">'; - } - else - { - echo '<div class="milestone-content margin-top">'; - } - - echo '<div class="row">' . - '<div class="col s6 valign-wrapper">' . - '<i class="material-icons valign">event</i><span class="valign margin-left">' . $languageJSON->due_by . ' ' . $dueDate . '</span>' . - '</div>' . - '<div class="col s6 valign-wrapper">' . - '<i class="material-icons valign">event</i><span class="valign margin-left">' . $languageJSON->done_at . ' ' . $completionDate . '</span>' . - '</div>' . - '</div>' . - '<ul class="collapsible white" data-collapsible="accordion">'; - for($k = 0; $k < sizeof($tasks); $k++) - { - $currentTask = $tasks[$k]; - - $subtasks = json_decode(file_get_contents($api_url . "/subtasks/" . $currentTask->ID)); - if($subtasks == false) - { - echo '<li>' . - '<div class="collapsible-header bold truncate"><i class="material-icons green-text">check</i>' . $currentTask->Title . '</div>' . - '<div class="collapsible-body"><p>' . $currentTask->Description . '</p></div>' . - '</li>'; - } - else - { - $openSubtasks = json_decode(file_get_contents($api_url . "/subtasks/" . $currentTask->ID . "/open")); - $numberOfOpenSubtasks = sizeof($openSubtasks); - if($numberOfOpenSubtasks == 0) - { - echo '<li>' . - '<div class="collapsible-header bold"><i class="material-icons green-text">check</i>'.$currentTask->Title.'<span class="right">' . sizeof($subtasks) . '/' . sizeof($subtasks) . '</span></div>' . - '<div class="collapsible-body">' . - '<ul class="collapsible white margin-left-and-right no-shadow margin-top-and-bottom" data-collapsible="accordion">'; - } - else - { - echo '<li>' . - '<div class="collapsible-header bold"><i class="material-icons red-text">build</i>'.$currentTask->Title.'<span class="right">' . (sizeof($subtasks) - $numberOfOpenSubtasks) . '/' . sizeof($subtasks) . '</span></div>' . - '<div class="collapsible-body">' . - '<ul class="collapsible white margin-left-and-right no-shadow margin-top-and-bottom" data-collapsible="accordion">'; - } - - for($m = 0; $m < sizeof($subtasks); $m++) - { - $currentSubTask = $subtasks[$m]; - //inDev - if($currentSubTask->Status == 0) - { - echo '<li>' . - '<div class="collapsible-header bold truncate"><span class="left">' . ($m + 1) . '</span><i class="material-icons red-text margin-left">build</i>' . $currentSubTask->Title . '</div>' . - '<div class="collapsible-body"><p>' . $currentSubTask->Description . '</p></div>' . - '</li>'; - } - //done - else - { - echo '<li>' . - '<div class="collapsible-header bold truncate"><span class="left">' . ($m + 1) . '</span><i class="material-icons green-text margin-left">check</i>' . $currentSubTask->Title . '</div>' . - '<div class="collapsible-body"><p>' . $currentSubTask->Description . '</p></div>' . - '</li>'; - } - } - - echo '</ul>' . - '</div>' . - '</li>'; - } - } - - echo '</ul>' . - '</div>' . - '</div>' . - '</div>'; -} \ No newline at end of file diff --git a/php/language.json b/php/language.json deleted file mode 100644 index 04a9116..0000000 --- a/php/language.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "due_by": "Due by", - "done": "Done", - "done_at": "Done at", - "error_general": "An error occured", - "error_param_missing": "ERROR: parameter missing", - "error_param_invalid": "ERROR: parameter is not numeric or less than 1", - "error_roadmap_not_existing": "ERROR: no roadmap with this ID existing", - "error_milestone_not_existing": "ERROR: no milestone with this ID existing", - "error_task_not_existing": "ERROR: no task with this ID existing", - "error_subtask_not_existing": "ERROR: no subtask with this ID existing", - "error_no_milestones": "ERROR: no milestones for this roadmap", - "error_database_connection" : "An error occurred while getting data from the server." -} \ No newline at end of file diff --git a/php/mysql.php b/php/mysql.php deleted file mode 100644 index 49040f7..0000000 --- a/php/mysql.php +++ /dev/null @@ -1,404 +0,0 @@ -<?php - -class DB -{ - private static $db; - - function __construct() - { - try - { - include(dirname(__FILE__)."/admin/helper/settings.php"); - self::$db = new PDO( - "mysql:host=localhost;dbname=" . $database_name, - $database_user, - $database_password, - array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'")); - - self::createTables(); - } - catch(PDOException $e) - { - die($e); - } - } - - function createTables() - { - $statement = self::$db->prepare("CREATE TABLE IF NOT EXISTS `roadmaps` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `Projectname` text COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`ID`))ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;"); - $statement->execute(); - - $statement = self::$db->prepare("CREATE TABLE IF NOT EXISTS `milestones` (". - "`ID` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,". - "`RoadmapID` int(10) UNSIGNED NOT NULL,". - "`VersionCode` int(10) UNSIGNED NOT NULL,". - "`VersionName` text COLLATE utf8_general_ci NOT NULL,". - "`Title` text COLLATE utf8_general_ci NOT NULL,". - "`DueDate` date NOT NULL,". - "`CompletionDate` date NOT NULL,". - "`Status` int(11) NOT NULL,". - "PRIMARY KEY (`ID`)". - ") ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;"); - $statement->execute(); - - $statement = self::$db->prepare("CREATE TABLE IF NOT EXISTS `tasks` (". - "`ID` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,". - "`MilestoneID` int(10) UNSIGNED NOT NULL,". - "`Title` text CHARACTER SET utf8 NOT NULL,". - "`Description` text CHARACTER SET utf8 NOT NULL,". - "`Status` int(11) NOT NULL,". - "PRIMARY KEY (`ID`)". - ") ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;"); - $statement->execute(); - - $statement = self::$db->prepare("CREATE TABLE IF NOT EXISTS `subtasks` (". - "`ID` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,". - "`TaskID` int(10) UNSIGNED NOT NULL,". - "`Title` text CHARACTER SET utf8 NOT NULL,". - "`Description` text CHARACTER SET utf8 NOT NULL,". - "`Status` int(11) NOT NULL,". - "PRIMARY KEY (`ID`)". - ") ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;"); - $statement->execute(); - } - - //======================================== - //---------------- insert ---------------- - //======================================== - - function insertRoadmap($projectName) - { - $statement = self::$db->prepare("INSERT INTO roadmaps VALUES('', :projectName);"); - $statement->bindParam("projectName", $projectName); - - return $statement->execute(); - } - - function insertMilestone($roadmapID, $versionCode, $versionName, $title, $dueDate, $completionDate, $status) - { - $statement = self::$db->prepare("INSERT INTO milestones VALUES('', :roadmapID, :versionCode, :versionName, :title, STR_TO_DATE(:dueDate, '%d.%m.%Y'), STR_TO_DATE(:completionDate, '%d.%m.%Y'), :status);"); - $statement->bindParam("roadmapID", $roadmapID); - $statement->bindParam("versionCode", $versionCode); - $statement->bindParam("versionName", $versionName); - $statement->bindParam("title", $title); - $statement->bindParam("dueDate", $dueDate); - $statement->bindParam("completionDate", $completionDate); - $statement->bindParam("status", $status); - - return $statement->execute(); - } - - function insertTask($milestoneID, $title, $description, $status) - { - $statement = self::$db->prepare("INSERT INTO tasks VALUES('', :milestoneID, :title, :description, :status);"); - $statement->bindParam("milestoneID", $milestoneID); - $statement->bindParam("title", $title); - $statement->bindParam("description", $description); - $statement->bindParam("status", $status); - - return $statement->execute(); - } - - function insertSubtask($taskID, $title, $description, $status) - { - $statement = self::$db->prepare("INSERT INTO subtasks VALUES('', :taskID, :title, :description, :status);"); - $statement->bindParam("taskID", $taskID); - $statement->bindParam("title", $title); - $statement->bindParam("description", $description); - $statement->bindParam("status", $status); - $success = $statement->execute(); - - $this->checkParentTask($taskID); - - return $success; - } - - //======================================== - //---------------- finish ---------------- - //======================================== - - function finishMilestone($milestoneID) - { - $statement = self::$db->prepare("UPDATE milestones SET status='1' WHERE ID = :milestoneID;"); - $statement->bindParam("milestoneID", $milestoneID); - - return $statement->execute(); - } - - function finishTask($taskID) - { - $statement = self::$db->prepare("UPDATE tasks SET status='1' WHERE ID = :taskID;"); - $statement->bindParam("taskID", $taskID); - - return $statement->execute(); - } - - function reopenTask($taskID) - { - $statement = self::$db->prepare("UPDATE tasks SET status='0' WHERE ID = :taskID;"); - $statement->bindParam("taskID", $taskID); - - return $statement->execute(); - } - - function finishSubTask($subtaskID) - { - $statement = self::$db->prepare("UPDATE subtasks SET status='1' WHERE ID = :subtaskID;"); - $statement->bindParam("subtaskID", $subtaskID); - - return $statement->execute(); - } - - //======================================== - //---------------- update ---------------- - //======================================== - - function updateRoadmap($roadmapID, $projectName) - { - $statement = self::$db->prepare("UPDATE roadmaps SET Projectname = :projectName WHERE ID = :roadmapID;"); - $statement->bindParam("roadmapID", $roadmapID); - $statement->bindParam("projectName", $projectName); - - return $statement->execute(); - } - - function updateMilestone($milestoneID, $versionCode, $versionName, $title, $dueDate, $completionDate, $status) - { - $statement = self::$db->prepare("UPDATE milestones SET VersionCode = :versionCode, VersionName = :versionName, Title = :title, DueDate = STR_TO_DATE(:dueDate, '%d.%m.%Y'), CompletionDate = STR_TO_DATE(:completionDate, '%d.%m.%Y'), Status = :status WHERE ID = :milestoneID;"); - $statement->bindParam("milestoneID", $milestoneID); - $statement->bindParam("versionCode", $versionCode); - $statement->bindParam("versionName", $versionName); - $statement->bindParam("title", $title); - $statement->bindParam("dueDate", $dueDate); - $statement->bindParam("completionDate", $completionDate); - $statement->bindParam("status", $status); - - return $statement->execute(); - } - - function updateTask($taskID, $milestoneID, $title, $description, $status) - { - $statement = self::$db->prepare("UPDATE tasks SET MilestoneID = :milestoneID, Title = :title, Description = :description, Status = :status WHERE ID = :taskID;"); - $statement->bindParam("taskID", $taskID); - $statement->bindParam("milestoneID", $milestoneID); - $statement->bindParam("title", $title); - $statement->bindParam("description", $description); - $statement->bindParam("status", $status); - - return $statement->execute(); - } - - function updateSubtask($subtaskID, $taskID, $title, $description, $status) - { - $statement = self::$db->prepare("UPDATE subtasks SET TaskID = :taskID, Title = :title, Description = :description, Status = :status WHERE ID = :subtaskID;"); - $statement->bindParam("subtaskID", $subtaskID); - $statement->bindParam("taskID", $taskID); - $statement->bindParam("title", $title); - $statement->bindParam("description", $description); - $statement->bindParam("status", $status); - - $success = $statement->execute(); - $this->checkParentTask($taskID); - - return $success; - } - - function checkParentTask($taskID) - { - $subTasks = $this->getSubtasks($taskID); - $counter = 0; - for($m = 0; $m < sizeof($subTasks); $m++) - { - $currentSubTask = $subTasks[$m]; - if ($currentSubTask['Status'] == 1) - { - $counter = $counter + 1; - } - } - - if($counter == sizeof($subTasks)) - { - $this->finishTask($taskID); - } - else - { - $this->reopenTask($taskID); - } - } - - function markAllTasksAsDone($milestoneID) - { - $tasks = $this->getTasks($milestoneID); - for($m = 0; $m < sizeof($tasks); $m++) - { - $subTasks = $this->getSubtasks($tasks[$m]['ID']); - for($i = 0; $i < sizeof($subTasks); $i++) - { - if($this->finishSubTask($subTasks[$i]["ID"]) == false) - { - return false; - } - } - - if($this->finishTask($tasks[$m]['ID']) == false) - { - return false; - } - } - - return true; - } - - //======================================== - //----------------- get ------------------ - //======================================== - - function getRoadmap($roadmapID) - { - $statement = self::$db->prepare("SELECT Projectname FROM roadmaps WHERE roadmaps.ID=:roadmapID;"); - $statement->bindParam("roadmapID", $roadmapID); - $statement->execute(); - - return $statement->fetch(); - } - - function getRoadmaps() - { - $statement = self::$db->prepare("SELECT * FROM roadmaps ORDER BY ID;"); - $statement->execute(); - - return $statement->fetchAll(); - } - - function getMilestones($roadmapID) - { - $statement = self::$db->prepare("SELECT * FROM milestones WHERE milestones.roadmapID=:roadmapID ORDER BY VersionCode DESC;"); - $statement->bindParam("roadmapID", $roadmapID); - $statement->execute(); - - return $statement->fetchAll(); - } - - function getMilestone($milestoneID) - { - $statement = self::$db->prepare("SELECT * FROM milestones WHERE milestones.ID=:milestoneID;"); - $statement->bindParam("milestoneID", $milestoneID); - $statement->execute(); - - return $statement->fetch(); - } - - function getNumberOfOpenMilestones($roadmapID) - { - $statement = self::$db->prepare("SELECT COUNT(*) AS 'count' FROM milestones WHERE milestones.roadmapID=:roadmapID AND status = '0';"); - $statement->bindParam("roadmapID", $roadmapID); - $statement->execute(); - - return $statement->fetch(); - } - - function getTasks($milestoneID) - { - $statement = self::$db->prepare("SELECT * FROM tasks WHERE tasks.milestoneID=:milestoneID;"); - $statement->bindParam("milestoneID", $milestoneID); - $statement->execute(); - - return $statement->fetchAll(); - } - - function getTask($taskID) - { - $statement = self::$db->prepare("SELECT * FROM tasks WHERE tasks.ID=:taskID;"); - $statement->bindParam("taskID", $taskID); - $statement->execute(); - - return $statement->fetch(); - } - - function getNumberOfOpenTasks($milestoneID) - { - $statement = self::$db->prepare("SELECT COUNT(*) AS 'count' FROM tasks WHERE tasks.MilestoneID=:milestoneID AND status = '0';"); - $statement->bindParam("milestoneID", $milestoneID); - $statement->execute(); - - return $statement->fetch(); - } - - function getSubtasks($taskID) - { - $statement = self::$db->prepare("SELECT * FROM subtasks WHERE subtasks.taskID=:taskID;"); - $statement->bindParam("taskID", $taskID); - $statement->execute(); - - return $statement->fetchAll(); - } - - function getSubtask($taskID) - { - $statement = self::$db->prepare("SELECT * FROM subtasks WHERE subtasks.ID=:taskID;"); - $statement->bindParam("taskID", $taskID); - $statement->execute(); - - return $statement->fetch(); - } - - function getNumberOfOpenSubtasks($taskID) - { - $statement = self::$db->prepare("SELECT COUNT(*) AS 'count' FROM subtasks WHERE subtasks.TaskID=:taskID AND status = '0';"); - $statement->bindParam("taskID", $taskID); - $statement->execute(); - - return $statement->fetch(); - } - - function getLatestFinishedMilestone($roadmapID) - { - $statement = self::$db->prepare("SELECT * FROM milestones WHERE RoadmapID=:roadmapID AND status = '1' ORDER BY VersionCode DESC"); - $statement->bindParam("roadmapID", $roadmapID); - $statement->execute(); - - return $statement->fetchAll(); - } - - //======================================== - //--------------- delete ----------------- - //======================================== - - function deleteRoadmap($roadmapID) - { - $statement = self::$db->prepare("DELETE FROM roadmaps WHERE roadmaps.ID=:roadmapID;"); - $statement->bindParam("roadmapID", $roadmapID); - $statement->execute(); - - return $statement->execute(); - } - - function deleteMilestone($milestoneID) - { - $statement = self::$db->prepare("DELETE FROM milestones WHERE milestones.ID=:milestoneID;"); - $statement->bindParam("milestoneID", $milestoneID); - $statement->execute(); - - return $statement->execute(); - } - - function deleteTask($taskID) - { - $statement = self::$db->prepare("DELETE FROM tasks WHERE tasks.ID=:taskID;"); - $statement->bindParam("taskID", $taskID); - $statement->execute(); - - return $statement->execute(); - } - - function deleteSubtask($subtaskID, $taskID) - { - $statement = self::$db->prepare("DELETE FROM subtasks WHERE subtasks.ID=:subtaskID;"); - $statement->bindParam("subtaskID", $subtaskID); - $success = $statement->execute(); - - $this->checkParentTask($taskID); - - return $success; - } -} \ No newline at end of file diff --git a/php/overview.php b/php/overview.php deleted file mode 100644 index 616b240..0000000 --- a/php/overview.php +++ /dev/null @@ -1,62 +0,0 @@ -<!DOCTYPE html> - -<?php -include_once('getLanguageJSON.php'); -include_once('database.php'); - -$db = new DB(); -$db->createTables(); -?> -<html xmlns="http://www.w3.org/1999/html"> - <head> - <meta charset="UTF-8"/> - <title>Roadmaps</title> - <!--Import Google Icon Font--> - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> - <!--Import materialize.css--> - <link type="text/css" rel="stylesheet" href="../materialize/css/materialize.min.css" media="screen,projection"/> - <link type="text/css" rel="stylesheet" href="../css/style.css"/> - - <!--Import jQuery before materialize.js--> - <script type="text/javascript" src="../js/jquery-2.2.4.min.js"></script> - <script type="text/javascript" src="../materialize/js/materialize.min.js"></script> - <script type="text/javascript" src="../js/main.js"></script> - <script type="text/javascript" src="../js/ResizeSensor.js"></script> - <script type="text/javascript" src="../js/ElementQueries.js"></script> - - <!--Let browser know website is optimized for mobile--> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - </head> - - <body class="grey lighten-3"> - <a class="btn-flat right" href="admin/login.php">Login</a> - <div style="clear: both;"></div> - <div id="main"> - <div class="container"> - <h2 class="center-align" id="headline">All Roadmaps</h2> - - <div class="row"> - <div class="col s12 m10 offset-m1 l6 offset-l3"> - <?php - $roadmaps = $db->getRoadmaps(); - - if($roadmaps == false) - { - echo '<h5 class="center-align">no roadmaps available</h5>'; - } - else - { - echo '<div class="collection center-align">'; - for($i = 0; $i < sizeof($roadmaps); $i++) - { - echo '<a class="collection-item blue-text" href="index.php?id='.$roadmaps[$i]['ID'].'">'.$roadmaps[$i]['Projectname'].'</a>'; - } - echo '</div>'; - } - ?> - </div> - </div> - </div> - </div> - </body> -</html> \ No newline at end of file diff --git a/php/pgsql.php b/php/pgsql.php deleted file mode 100644 index 92d866a..0000000 --- a/php/pgsql.php +++ /dev/null @@ -1,399 +0,0 @@ -<?php /** @noinspection SqlNoDataSourceInspection */ - -class DB -{ - private static $db; - - function __construct() - { - try - { - include(dirname(__FILE__)."/admin/helper/settings.php"); - self::$db = new PDO( - "pgsql:host=localhost;dbname=" . $database_name, - $database_user, - $database_password); - - self::createTables(); - } - catch(PDOException $e) - { - die($e); - } - } - - function createTables() - { - $statement = self::$db->prepare('CREATE TABLE IF NOT EXISTS "roadmaps" ('. - '"ID" serial NOT NULL PRIMARY KEY,'. - '"Projectname" text NOT NULL);'); - $statement->execute(); - - $statement = self::$db->prepare('CREATE TABLE IF NOT EXISTS "milestones" ('. - '"ID" serial NOT NULL PRIMARY KEY,'. - '"RoadmapID" integer NOT NULL,'. - '"VersionCode"integer NOT NULL,'. - '"VersionName" text NOT NULL,'. - '"Title" text NOT NULL,'. - '"DueDate" date NOT NULL,'. - '"CompletionDate" date NOT NULL,'. - '"Status" integer NOT NULL);'); - $statement->execute(); - - $statement = self::$db->prepare('CREATE TABLE IF NOT EXISTS "tasks" ('. - '"ID" serial NOT NULL PRIMARY KEY,'. - '"MilestoneID" integer NOT NULL,'. - '"Title" text NOT NULL,'. - '"Description" text NOT NULL,'. - '"Status" integer NOT NULL);'); - $statement->execute(); - - $statement = self::$db->prepare('CREATE TABLE IF NOT EXISTS "subtasks" ('. - '"ID" serial NOT NULL PRIMARY KEY,'. - '"TaskID" integer NOT NULL,'. - '"Title" text NOT NULL,'. - '"Description" text NOT NULL,'. - '"Status" integer NOT NULL);'); - $statement->execute(); - } - - //======================================== - //---------------- insert ---------------- - //======================================== - - function insertRoadmap($projectName) - { - $statement = self::$db->prepare('INSERT INTO roadmaps ("Projectname") VALUES(:projectName);'); - $statement->bindParam("projectName", $projectName); - - return $statement->execute(); - } - - function insertMilestone($roadmapID, $versionCode, $versionName, $title, $dueDate, $completionDate, $status) - { - $statement = self::$db->prepare('INSERT INTO milestones ("RoadmapID", "VersionCode", "VersionName", "Title", "DueDate", "CompletionDate", "Status") VALUES(:roadmapID, :versionCode, :versionName, :title, to_date(:dueDate, \'DD.MM.YY\'), to_date(:completionDate, \'DD.MM.YY\'), :status);'); - $statement->bindParam("roadmapID", $roadmapID); - $statement->bindParam("versionCode", $versionCode); - $statement->bindParam("versionName", $versionName); - $statement->bindParam("title", $title); - $statement->bindParam("dueDate", $dueDate); - $statement->bindParam("completionDate", $completionDate); - $statement->bindParam("status", $status); - - return $statement->execute(); - } - - function insertTask($milestoneID, $title, $description, $status) - { - $statement = self::$db->prepare('INSERT INTO tasks ("MilestoneID", "Title", "Description", "Status") VALUES(:milestoneID, :title, :description, :status);'); - $statement->bindParam("milestoneID", $milestoneID); - $statement->bindParam("title", $title); - $statement->bindParam("description", $description); - $statement->bindParam("status", $status); - - return $statement->execute(); - } - - function insertSubtask($taskID, $title, $description, $status) - { - $statement = self::$db->prepare('INSERT INTO subtasks ("TaskID", "Title", "Description", "Status") VALUES(:taskID, :title, :description, :status);'); - $statement->bindParam("taskID", $taskID); - $statement->bindParam("title", $title); - $statement->bindParam("description", $description); - $statement->bindParam("status", $status); - $success = $statement->execute(); - - $this->checkParentTask($taskID); - - return $success; - } - - //======================================== - //---------------- finish ---------------- - //======================================== - - function finishMilestone($milestoneID) - { - $statement = self::$db->prepare('UPDATE milestones SET "Status"=1 WHERE "ID" = :milestoneID;'); - $statement->bindParam("milestoneID", $milestoneID); - - return $statement->execute(); - } - - function finishTask($taskID) - { - $statement = self::$db->prepare('UPDATE tasks SET "Status"=1 WHERE "ID" = :taskID;'); - $statement->bindParam("taskID", $taskID); - - return $statement->execute(); - } - - function reopenTask($taskID) - { - $statement = self::$db->prepare('UPDATE tasks SET "Status"=0 WHERE "ID" = :taskID;'); - $statement->bindParam("taskID", $taskID); - - return $statement->execute(); - } - - function finishSubTask($subtaskID) - { - $statement = self::$db->prepare('UPDATE subtasks SET "Status"=1 WHERE "ID" = :subtaskID;'); - $statement->bindParam("subtaskID", $subtaskID); - - return $statement->execute(); - } - - //======================================== - //---------------- update ---------------- - //======================================== - - function updateRoadmap($roadmapID, $projectName) - { - $statement = self::$db->prepare('UPDATE roadmaps SET "Projectname" = :projectName WHERE "ID"= :roadmapID;'); - $statement->bindParam("roadmapID", $roadmapID); - $statement->bindParam("projectName", $projectName); - - return $statement->execute(); - } - - function updateMilestone($milestoneID, $versionCode, $versionName, $title, $dueDate, $completionDate, $status) - { - $statement = self::$db->prepare('UPDATE milestones SET "VersionCode" = :versionCode, "VersionName" = :versionName, "Title" = :title, "DueDate"=to_date(:dueDate, \'DD.MM.YY\'), "CompletionDate"=to_date(:completionDate, \'DD.MM.YY\'), "Status" = :status WHERE "ID" = :milestoneID;'); - $statement->bindParam("milestoneID", $milestoneID); - $statement->bindParam("versionCode", $versionCode); - $statement->bindParam("versionName", $versionName); - $statement->bindParam("title", $title); - $statement->bindParam("dueDate", $dueDate); - $statement->bindParam("completionDate", $completionDate); - $statement->bindParam("status", $status); - - return $statement->execute(); - } - - function updateTask($taskID, $milestoneID, $title, $description, $status) - { - $statement = self::$db->prepare('UPDATE tasks SET "MilestoneID" = :milestoneID, "Title" = :title, "Description" = :description, "Status" = :status WHERE "ID" = :taskID;'); - $statement->bindParam("taskID", $taskID); - $statement->bindParam("milestoneID", $milestoneID); - $statement->bindParam("title", $title); - $statement->bindParam("description", $description); - $statement->bindParam("status", $status); - - return $statement->execute(); - } - - function updateSubtask($subtaskID, $taskID, $title, $description, $status) - { - $statement = self::$db->prepare('UPDATE subtasks SET "TaskID" = :taskID, "Title" = :title, "Description" = :description, "Status" = :status WHERE "ID" = :subtaskID;'); - $statement->bindParam("subtaskID", $subtaskID); - $statement->bindParam("taskID", $taskID); - $statement->bindParam("title", $title); - $statement->bindParam("description", $description); - $statement->bindParam("status", $status); - - $success = $statement->execute(); - $this->checkParentTask($taskID); - - return $success; - } - - function checkParentTask($taskID) - { - $subTasks = $this->getSubtasks($taskID); - $counter = 0; - for($m = 0; $m < sizeof($subTasks); $m++) - { - $currentSubTask = $subTasks[$m]; - if ($currentSubTask['Status'] == 1) - { - $counter = $counter + 1; - } - } - - if($counter == sizeof($subTasks)) - { - $this->finishTask($taskID); - } - else - { - $this->reopenTask($taskID); - } - } - - function markAllTasksAsDone($milestoneID) - { - $tasks = $this->getTasks($milestoneID); - for($m = 0; $m < sizeof($tasks); $m++) - { - $subTasks = $this->getSubtasks($tasks[$m]['ID']); - for($i = 0; $i < sizeof($subTasks); $i++) - { - if($this->finishSubTask($subTasks[$i]["ID"]) == false) - { - return false; - } - } - - if($this->finishTask($tasks[$m]['ID']) == false) - { - return false; - } - } - - return true; - } - - //======================================== - //----------------- get ------------------ - //======================================== - - function getRoadmap($roadmapID) - { - $statement = self::$db->prepare('SELECT "Projectname" FROM roadmaps WHERE "ID"=:roadmapID;'); - $statement->bindParam("roadmapID", $roadmapID); - $statement->execute(); - - return $statement->fetch(); - } - - function getRoadmaps() - { - $statement = self::$db->prepare('SELECT * FROM roadmaps ORDER BY "ID";'); - $statement->execute(); - - return $statement->fetchAll(); - } - - function getMilestones($roadmapID) - { - $statement = self::$db->prepare('SELECT * FROM milestones WHERE "RoadmapID"=:roadmapID ORDER BY "VersionCode" DESC;'); - $statement->bindParam("roadmapID", $roadmapID); - $statement->execute(); - - return $statement->fetchAll(); - } - - function getMilestone($milestoneID) - { - $statement = self::$db->prepare('SELECT * FROM milestones WHERE "ID"=:milestoneID;'); - $statement->bindParam("milestoneID", $milestoneID); - $statement->execute(); - - return $statement->fetch(); - } - - function getNumberOfOpenMilestones($roadmapID) - { - $statement = self::$db->prepare('SELECT COUNT(*) AS "count" FROM milestones WHERE "RoadmapID"=:roadmapID AND "Status" = 0;'); - $statement->bindParam("roadmapID", $roadmapID); - $statement->execute(); - - return $statement->fetch(); - } - - function getTasks($milestoneID) - { - $statement = self::$db->prepare('SELECT * FROM tasks WHERE "MilestoneID"=:milestoneID;'); - $statement->bindParam("milestoneID", $milestoneID); - $statement->execute(); - - return $statement->fetchAll(); - } - - function getTask($taskID) - { - $statement = self::$db->prepare('SELECT * FROM tasks WHERE "ID"=:taskID;'); - $statement->bindParam("taskID", $taskID); - $statement->execute(); - - return $statement->fetch(); - } - - function getNumberOfOpenTasks($milestoneID) - { - $statement = self::$db->prepare('SELECT COUNT(*) AS "count" FROM tasks WHERE "MilestoneID"=:milestoneID AND "Status" = 0;'); - $statement->bindParam("milestoneID", $milestoneID); - $statement->execute(); - - return $statement->fetch(); - } - - function getSubtasks($taskID) - { - $statement = self::$db->prepare('SELECT * FROM subtasks WHERE "TaskID"=:taskID;'); - $statement->bindParam("taskID", $taskID); - $statement->execute(); - - return $statement->fetchAll(); - } - - function getSubtask($taskID) - { - $statement = self::$db->prepare('SELECT * FROM subtasks WHERE "ID"=:taskID;'); - $statement->bindParam("taskID", $taskID); - $statement->execute(); - - return $statement->fetch(); - } - - function getNumberOfOpenSubtasks($taskID) - { - $statement = self::$db->prepare('SELECT COUNT(*) AS "count" FROM subtasks WHERE "TaskID"=:taskID AND "Status" = 0;'); - $statement->bindParam("taskID", $taskID); - $statement->execute(); - - return $statement->fetch(); - } - - function getLatestFinishedMilestone($roadmapID) - { - $statement = self::$db->prepare('SELECT * FROM milestones WHERE "RoadmapID"=:roadmapID AND "Status" = 1 ORDER BY "VersionCode" DESC;'); - $statement->bindParam("roadmapID", $roadmapID); - $statement->execute(); - - return $statement->fetchAll(); - } - - //======================================== - //--------------- delete ----------------- - //======================================== - - function deleteRoadmap($roadmapID) - { - $statement = self::$db->prepare('DELETE FROM roadmaps WHERE "ID"=:roadmapID;'); - $statement->bindParam("roadmapID", $roadmapID); - $statement->execute(); - - return $statement->execute(); - } - - function deleteMilestone($milestoneID) - { - $statement = self::$db->prepare('DELETE FROM milestones WHERE "ID"=:milestoneID;'); - $statement->bindParam("milestoneID", $milestoneID); - $statement->execute(); - - return $statement->execute(); - } - - function deleteTask($taskID) - { - $statement = self::$db->prepare('DELETE FROM tasks WHERE "ID"=:taskID;'); - $statement->bindParam("taskID", $taskID); - $statement->execute(); - - return $statement->execute(); - } - - function deleteSubtask($subtaskID, $taskID) - { - $statement = self::$db->prepare('DELETE FROM subtasks WHERE "ID"=:subtaskID;'); - $statement->bindParam("subtaskID", $subtaskID); - $success = $statement->execute(); - - $this->checkParentTask($taskID); - - return $success; - } -} \ No newline at end of file -- GitLab