0
0

Added new lines at the end of files, added edit functionality

This commit is contained in:
Bryan
2019-06-02 14:46:51 +02:00
parent ed20989e14
commit 312d03599f
13 changed files with 137 additions and 11 deletions

View File

@@ -13,10 +13,12 @@
<head>
<title>Management Panel | <?=$GLOBALS['config']['website_name']?></title>
<link href="<?=$GLOBALS['config']['installation_path']?>/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.css" integrity="sha256-39jKbsb/ty7s7+4WzbtELS4vq9udJ+MDjGTD5mtxHZ0=" crossorigin="anonymous" />
<link href="<?=$GLOBALS['config']['installation_path']?>/lib/css/manage.css" rel="stylesheet">
</head>
<body>
<button onclick="logout()">Logout</button>
<div id="urllist">
<div class="urlList">
<?php
if ( $result->rowCount ( ) == 0 ) {
echo ( "You have not created any URL yet.<br>" );
@@ -24,7 +26,14 @@
else {
$rows = $result->fetchAll ( PDO::FETCH_ASSOC );
foreach ( $rows as $row ) {
echo ( "\t\t\t" . '<div>' . $row [ 'ID' ] . " | " . $row [ 'URL' ] . "</div>\n" );
echo ( "\t\t\t<div class=\"urlContainer\">" );
echo ( "\t\t\t\t<div class=\"urlId\">" . $row [ 'ID' ] . "</div>" );
echo ( "\t\t\t\t<input type=\"text\" class=\"urlLink\" value=\"" . $row [ 'URL' ] . "\">" );
echo ( "\t\t\t\t<div class=\"urlControl\" style=\"display: none;\">" );
echo ( "\t\t\t\t\t<button><i class=\"fas fa-check\"></i></button>" );
echo ( "\t\t\t\t\t<button><i class=\"fas fa-times\"></i></button>" );
echo ( "\t\t\t\t</div>" );
echo ( "\t\t\t</div>" );
}
}
?>
@@ -32,8 +41,8 @@
<input type="text" id="form-url" placeholder="URL:">
<button onclick="insertNewURL()">Insert new URL</button><br>
<div id="responsetext"></div>
<script>var script_name = "<?=$GLOBALS['config']['installation_path']?>";</script>
<script src="<?=$GLOBALS['config']['installation_path']?>/lib/js/manage.js"></script>
<script src="<?=$GLOBALS['config']['installation_path']?>/lib/js/logout.js"></script>
<script>var script_name = "<?=$GLOBALS['config']['installation_path']?>";</script>
</body>
</html>