Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Commit

Permalink
Add Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
GGJason committed May 8, 2016
1 parent 95cdc1e commit b706647
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 8 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,15 @@ For Blue Green BIM in Taiwan
1. Bootstrap
2. JQuery

# Issues
1. File Upload and Update Database
* New Data Uploading
* Update Specified Data
2. Data Download
3. Data Visualization
4. Data Viewer (Table)
5. File Management
6. Secure User System

Made by Taiwan Blue Green BIM Team.
Kyra & GGJason
17 changes: 13 additions & 4 deletions auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@

//$row = mysqli_fetch_row($result); //將陣列以數字排列索引

if ($_POST['passwd']== $row['passwd']) {
echo "Success";
echo "You are ". $row($result)['nick'];
if (($_POST['passwd']== $row['passwd']) && ($_POST['name']!='')&&($_POST['passwd']!='')) {
//echo "Success";
session_start();
$_SESSION['id']=$row['id'];
$_SESSION['nick']=$row['nick'];
$_SESSION['login']='OK';
echo "You are ". $_SESSION['nick'];
header("Location: index.php");
}
else
{
echo "Failed";
$_SESSION['login']='Fail';
}
else echo "Failed";
?>

11 changes: 11 additions & 0 deletions css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,15 @@ footer{
}
input{
padding-top: 2pt;
}
#name,#passwd{
max-width:80pt;
}
#authsubmit{
max-width: 50pt;
}
.log{
position: absolute;
right: 50pt;
height: auto;
}
File renamed without changes.
File renamed without changes.
35 changes: 31 additions & 4 deletions index.html → index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/index.css">
<link href="css/bootstrap.min.css" rel="stylesheet">
<?php session_start();
if($_SESSION['login']=='OK');
else echo "<style>.secure{visibility:hidden;}</style>";
?>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
Expand All @@ -19,20 +23,38 @@
<li class="active"><a href="https://kkbruce.tw/bs3/Examples/starter-template#">Home</a></li>
<li><a href="https://kkbruce.tw/bs3/Examples/starter-template#about">About</a></li>
<li><a href="https://kkbruce.tw/bs3/Examples/starter-template#contact">Contact</a></li>

</ul>
<?php
if($_SESSION['login']=='OK') {
echo "<form action='logout.php' class='log'><button>Logout</button></form></li>";
}
else{
echo "<form action='auth.php' method='post' class='log'>";
echo "<input type='text' name='name' id='name' value='username'></input>";
echo "<input type='password' name='passwd' id='passwd' value='password'></input>";
echo "<input type='submit' id='authsubmit' name = 'submit'></input>";
echo "</form>";
}
?>
</div>

</div>
</nav>
<div class="container">

<div class="container" id="interface">
<div class="starter-template">
<div id="menu">
<form action="upload.php" method="post" enctype="multipart/form-data" id="inputForm" >


<br>
<form action="upload.php" method="post" enctype="multipart/form-data" id="inputForm" class="secure">
<p>Select image to upload:</p>
<input type="file" name="fileToUpload" id="fileToUpload"style="width:50%;float:left"></input><br>
<input type="submit" value="Upload Image" name="submit" class="btn btn-sm btn-primary" style="float:left"></input><br>
</form>
<br><br>
<form id="timeForm">
<form id="timeForm" class="secure">
Starting Time:<br>
<select id="startH"></select>
<select id="startD"></select>
Expand All @@ -44,7 +66,7 @@
<input type="button" id="download" value="Download" class="btn btn-primary" ></input>
<input type="button" id="draw" value="Draw" class="btn btn-primary"> </input><br>
</form>
<form id="selectForm">
<form id="selectForm" class="secure">
<input type="checkbox">Greenroof Data</input><br>
<input type="checkbox">Greenroof A</input><br>
<input type="checkbox">Greenroof B</input><br>
Expand All @@ -56,6 +78,11 @@
<h3>Green Roof Data Station</h3>
Welcome To Blue Green BIM.
This is the data station for greenroof experiment
<?php
if($_SESSION['login']=='OK') {
echo "Welcome to GRDS of BGBIM TW,". $_SESSION['nick'];

}?>
</div>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions logout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
session_start();
$_SESSION['login']='Fail';
header("Location: index.php");
?>

0 comments on commit b706647

Please sign in to comment.