Skip to content

Commit

Permalink
backup before exihibition
Browse files Browse the repository at this point in the history
  • Loading branch information
Super-User committed Oct 27, 2014
1 parent d1ce739 commit 95b0ade
Show file tree
Hide file tree
Showing 24 changed files with 228 additions and 125 deletions.
10 changes: 2 additions & 8 deletions createMeeting.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@
<!--Load the AJAX API-->
<script src="https://www.google.com/jsapi" type="text/javascript"></script>
<script src="js/google-chart.js" type="text/javascript"></script>
<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1.0', {'packages':['corechart']});

// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart_at_home);
</script>
<meta charset="utf-8">
<!-- tablest css -->
<link href="css/tablet.css" media="all" rel="stylesheet" type="text/css" />
Expand All @@ -38,7 +32,7 @@
<![endif]-->
</head>

<body onload="drawChart_at_home()">
<body>

<!--sidebar and content-->
<div id="wrapper">
Expand Down Expand Up @@ -196,7 +190,7 @@
$dbname = 'meetrix_database';
mysql_select_db($dbname, $link) or die ("Error selecting specified database on mysql server: ".mysql_error());

$cdquery="SELECT `group_name`, `group_id` FROM `group`";
$cdquery="SELECT `group_name`, `group_id` FROM `group` WHERE `creator_id` =". $_SESSION["user_id"];
$cdresult=mysql_query($cdquery) or die ("Query to get data from firsttable failed: ".mysql_error());

while ($cdrow=mysql_fetch_array($cdresult)) {
Expand Down
16 changes: 14 additions & 2 deletions finishedMeeting.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,26 @@
width: 400px;
}
</style>
<script type="text/javascript">
function refreshAndClose() {
window.opener.location.reload(true);
window.close();
}

function redirect(){
var link = "viewVotingResult.php";
window.open(link, "createVoting", "height=600,width=800");
}
</script>
</head>
<body>
<!--Header on top of the page where all user account setting navigation should be done-->
<div id ="window">
<p style="text-align: center; font-size: 20px;">The Meeting was finished</p>
<!--simple page with two buttons-->
<div id ="buttons" style="margin-right:auto; margin-left:auto; width: 208px;">
<button type="button" style="margin:5px;">Close Window</button>
<button type="button" style="margin:5px;">View Result</button>
<button type="button" onclick="refreshAndClose()" style="margin:5px;">Close Window</button>
<!--<button type="button" style="margin:5px;">View Result</button>-->
</div>
</div>
</body>
Expand Down
1 change: 1 addition & 0 deletions finishedVoting.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function redirect(){
<!--Header on top of the page where all user account setting navigation should be done-->
<div id ="window">
<p style="text-align: center; font-size: 20px;">The voting was finished</p>
<!--simple page whether a user wanna see voting result or close this page-->
<div id ="buttons" style="margin-right:auto; margin-left:auto; width: 208px;">
<button type="button" onclick="refreshAndClose()" style="margin:5px;">Close Window</button>
<button type="button" onclick="redirect()" style="margin:5px;">View Result</button>
Expand Down
8 changes: 4 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function startmeeting(url) {
$end = date("Y-m-d"). " 23:59:59";

$pdo = new PDO("mysql: host=$host; dbname=$db_name", "$username", "$password");
/*temporary only searching meeting where employee id 1 is in*/
/*search meeting that user have today*/
$st = $pdo->query("SELECT `meeting`.*
FROM `meeting`
INNER JOIN `meeting_group` ON `meeting`.meeting_id=`meeting_group`.meeting_id
Expand Down Expand Up @@ -128,8 +128,10 @@ function startmeeting(url) {
<hr style='margin-bottom: 0px;'>
<div id="posts" style="margin-top: 10px; padding-top: 10px; ">
<?php
/*if at least one meeting exist*/
if(sizeof($posts) > 0){
foreach($posts as $post){
/*foreach meeting, create a posts looks like sticky notes*/
echo "<div class='post' style='background-color: rgba(253, 240, 192, 1.0)'>";
echo "<div class='information'>";
echo "<img style='position: relative; bottom: 15px; display: block; margin-right: auto; margin-left: auto; ' src='img/pin.png' height='32px' width='32px'/>";
Expand All @@ -138,17 +140,15 @@ function startmeeting(url) {
echo "<p><strong>duration: </strong> $post[duration]</p>";
echo "<strong>description: </strong></br>";
echo "<p>$post[description]</p>";
//echo "<button type='button' onclick='startmeeting(\"php/viewCalendarRelated/meetingPopup.php?id=$post[meeting_id]\")'> See Detail</button>";
echo "</div>";
echo "</div>";
//echo "<hr>";
}
} else {
/*if there are no meeting, create a sticky note with "no meeting today" on it. */
echo "<div class='post' style='background-color: rgba(253, 240, 192, 1.0)'>";
echo "<div class='information'>";
echo "<img style='position: relative; bottom: 15px; display: block; margin-right: auto; margin-left: auto; ' src='img/pin.png' height='32px' width='32px'/>";
echo "<h3 style='margin-top: 0px;'>There are no Meetings Today</h3>";
//echo "<button type='button' onclick='startmeeting(\"php/viewCalendarRelated/meetingPopup.php?id=$post[meeting_id]\")'> See Detail</button>";
echo "</div>";
echo "</div>";
}
Expand Down
4 changes: 2 additions & 2 deletions js/addAgendaContent.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/resizable.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(function() {
var time = height / 10;
//alert("output is" + output + " size is" + height);
$.post("php/savePosition.php", {"content": output, "height": height, "meetingId":meetingId});
$(this).children().siblings(".agendaTime").replaceWith("<p style=\"font-size:3px; margin:0 0 0px\" class=\"agendaTime\">(Approx. time: "+ Math.round(time) + "min)</p>");
$(this).children().siblings(".agendaTime").replaceWith("<p style=\"margin:0 0 0px\" class=\"agendaTime\">(Approx. time: "+ Math.round(time) + "min)</p>");
},
minHeight: 100,
handles: "s"
Expand Down
2 changes: 1 addition & 1 deletion js/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function init_cal(){
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
editable: editable,
events:
{
url: 'php/viewCalendarRelated/init_viewMeeting.php',
Expand Down
2 changes: 1 addition & 1 deletion js/scheduler1.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function redirect_deleteG(group_id){
var r = confirm("Are you sure you want to delete this group?");
if (r == true) {
var link = "php/manageGroup/deleteGroup.php?id=" + group_id;
window.open(link, "deleteGroup");
window.location.href = link;
} else {

}
Expand Down
13 changes: 10 additions & 3 deletions js/timer.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/*run function every 0.995 second*/
var count = setInterval(function(){countDown()}, 995);

/*count down function*/
function countDown(){
time = document.getElementById("timeleft").innerHTML;
time = time.split(" ");
time = time[2];
time = time.split(":");

/*convert back to second and minus 1*/
sec = parseInt(time[0])*3600 + parseInt(time[1])*60 + parseInt(time[2]) - 1;

/*convert back to 00:00:00 form*/
var hour = Math.floor(sec/3600);
if(10 > hour){
hour = "0"+ hour;
Expand All @@ -26,25 +28,30 @@ function countDown(){
time = hour + ":" + min + ":" + sec;
document.getElementById("timeleft").innerHTML= "Time Left: " + time;

/*if it becomes 00:00:00 jump to finishedVoting page*/
if(time == "00:00:00"){
window.location="finishedVoting.php";
}
}

/*initializing timer*/
function timer(currentTime, endTime){
/*store original start, end and current time*/
originalEnd = endTime;
endTime = endTime.split(" ");
endTime = endTime[1].split(":");
currentTime = currentTime.split(" ");
currentDate = currentTime[0];
currentTime = currentTime[1].split(":");

/*conver to second*/
currentTime = parseInt(currentTime[0])*3600 + parseInt(currentTime[1])*60 + parseInt(currentTime[2]);
endTime = parseInt(endTime[0])*3600 + parseInt(endTime[1])*60 + parseInt(endTime[2]);

var left = endTime - (currentTime++);
originalH = Math.floor(currentTime/3600);
hour = Math.floor(left/3600);

/*convert everything back to 00:00:00 form*/
if(10 > hour){
hour = "0"+hour;
}
Expand Down
14 changes: 11 additions & 3 deletions js/timer2.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
/*run function every 0.995 second*/
var count = setInterval(function(){countDown()}, 995);

/*count down function*/
function countDown(){
time = document.getElementById("timeleft").innerHTML;
time = time.split(" ");
time = time[2];
time = time.split(":");

/*convert back to second and minus 1*/
sec = parseInt(time[0])*3600 + parseInt(time[1])*60 + parseInt(time[2]) - 1;

/*convert back to 00:00:00 form*/
var hour = Math.floor(sec/3600);
if(10 > hour){
hour = "0"+ hour;
Expand All @@ -26,25 +29,31 @@ function countDown(){
time = hour + ":" + min + ":" + sec;
document.getElementById("timeleft").innerHTML= "Time Left: " + time;

/*if it becomes 00:00:00 jump to finishedVoting page*/
if(time == "00:00:00"){
window.location="finishedVoting.php";
}
}

/*initializing timer*/
function timer(currentTime, endTime){
/*store original start, end and current time*/
originalEnd = endTime;
endTime = endTime.split(" ");
endTime = endTime[1].split(":");
currentTime = currentTime.split(" ");
currentDate = currentTime[0];
currentTime = currentTime[1].split(":");

/*conver to second*/
currentTime = parseInt(currentTime[0])*3600 + parseInt(currentTime[1])*60 + parseInt(currentTime[2]);
endTime = parseInt(endTime[0])*3600 + parseInt(endTime[1])*60 + parseInt(endTime[2]);

/*find out time left*/
var left = endTime - (currentTime++);
originalH = Math.floor(currentTime/3600);
hour = Math.floor(left/3600);

/*convert everything back to 00:00:00 form*/
if(10 > hour){
hour = "0"+hour;
}
Expand Down Expand Up @@ -77,5 +86,4 @@ function timer(currentTime, endTime){
original = originalH + ":" + originalM + ":" + currentTime;
document.getElementById("timeleft").innerHTML= "Time Left: " + time;

//setInterval(function(){timer(currentDate + " " + original, originalEnd)}, 1000);
}
4 changes: 2 additions & 2 deletions login.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<label for="password">Password</label>
<input type="password" name="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
</div>
<button type="submit" name="Submit" class="btn btn-default">Submit</button>
<button type="submit" name="Submit" class="btn btn-default">Login</button>
</form>
<!--end of login form-->
</div>
Expand Down Expand Up @@ -168,7 +168,7 @@
<label for="password">Confirmed Password</label>
<input type="password" class="form-control" name="c_password" placeholder="Confirmed Password">
</div>
<button type="submit" class="btn btn-default">Login</button>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<!--end of register form-->
</div>
Expand Down
5 changes: 4 additions & 1 deletion manageGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,13 @@
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<ul class="nav navbar-nav left">
<h3>WELCOME TO <span style="color:green">MEETRIX</span></h3>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="index.php">HOME</a>
</li>
<li>
<a href="#">HELP</a>
</li>
Expand Down
2 changes: 2 additions & 0 deletions manageMeeting.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<div id="main" >
<h2>Manage Meeting</h2>
<hr>
<!-- Show all voting that user have -->
<div id="meetingLists" style="height: 100%">
<table style="width:90%; text-align: center;" class="manTable" >
<tr style="background-color: rgba(150,150,150,1);">
Expand All @@ -115,6 +116,7 @@
<th></th>
</tr>
<?php
/*create edit and delete button for each meeting*/
for($i = 0; $i<sizeof($posts); $i++){
echo '<tr class="meetingRow">';
echo '<td class="meetingRow">' .$posts[$i]['meeting_id']. '</td>';
Expand Down
Loading

0 comments on commit 95b0ade

Please sign in to comment.