Documente Academic
Documente Profesional
Documente Cultură
Group 11
Team Members:
Blake Wong
Casey Steel
Sean Shen
Shaurting Chin
Eugene Cassel
Table of Contents:
Page 3: Introduction
Pages 4 to 17: Code
Page 18: User Guide
Page 19: Personal Experiences
Page 20: Peer Evaluation Form
Intoduction:
The app we chose to create for this class is called Bet
Me. It is an app that provides basketball statistics and
odds in order to bet on basketball games successfully. It
works by searching for a certain team and bringing the
odds up for you to view.
Teaminfo.php
<?php
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" >
<title>Bet Me</title>
<!--[if IE]>
<script
src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lt IE 9]>
<script src="http://ie7js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
--------------------------------->
5
<!-- THE CONTENT SECTION
-------------------------------->
<div data-role="content">
<ul data-role="listview">
<li><a href="#team_leader">Team Leader</a></li>
<li><a href="#team_members">Team Members</a></li>
</ul>
</div>
--------------------------------->
--------------------------------->
<div data-role="content">
<p align="Center"><b>Blake Wong</b></p>
<p align="Center"><b>BS MIS</b></p>
<p align="Center"><b>Email: bcw091020@utdallas.edu</b></p>
</div>
<!-- THE FOOTNOTE SECTION --------------------------------->
<div data-role="footer" data-position="fixed" data-id="nav" datatheme="b">
6
<div data-role="navbar">
<ul>
<li><a
href="http://localhost/mwa11/php/gr11_index.php">Home</a></li>
<li><a href="#team" class="ui-btn-active ui-statepersist">Team</a></li>
<li><a
href="http://localhost/MIS4312/mwa11/php/project.php">Project</a></li>
</ul>
</div>
</div>
</div>
<!-- THE END OF A MOBILE WEB PAGE: TEAM_LEADER -------------------------------------------------->
--------------------------------->
--------------------------------->
<div data-role="content">
<p align="Center"><b>Shaurting Shin</b></p>
<p align="Center"><b>BS MIS</b></p>
<p align="Center"><b> </b></p>
</div>
<div data-role="content">
<p align="Center"><b>Casey Steele</b></p>
<p align="Center"><b>BS MIS</b></p>
<p align="Center"><b> </b></p>
</div>
<div data-role="content">
<p align="Center"><b>Sean Shin</b></p>
<p align="Center"><b>BS MIS</b></p>
<p align="Center"><b> </b></p>
</div>
<div data-role="content">
<p align="Center"><b>Bassel Mahdawi</b></p>
7
<p align="Center"><b>BS MIS</b></p>
<p align="Center"><b> </b></p>
</div>
<div data-role="content">
<p align="Center"><b>Eugene Cassel</b></p>
<p align="Center"><b>BS MIS</b></p>
<p align="Center"><b> </b></p>
</div>
Registration.php
<?php
/**
* Created by JetBrains PhpStorm.
* User: Blake Wong
* Date: 3/31/14
* Time: 7:19 PM
* To change this template use File | Settings | File Templates.
*/
mysql_connect("localhost") or die(mysql_error());
mysql_select_db("BM_users") or die(mysql_error());
8
if (isset($_POST['submit'])) {
// password encryption
<h1>Registered</h1>
<p>Thank you for registering with Bet Me. May the odds forever be in your
favor.</a>.</p>
<?php
}
else
{
?>
10
</td></tr>
<tr><th colspan=2><input type="submit" name="submit"
value="Register"></th></tr> </table>
</form>
<?php
}
?>
Login.php
<?php
/**
* Created by JetBrains PhpStorm.
* User: Blake Wong
* Date: 3/31/14
* Time: 7:30 PM
* To change this template use File | Settings | File Templates.
*/
// connect to BM_users DB
mysql_connect("localhost") or die(mysql_error());
mysql_select_db("BM_users") or die(mysql_error());
//if there is, it logs you in and directs you to the home page.
{
$username = $_COOKIE['ID_my_site'];
$pass = $_COOKIE['Key_my_site'];
$check = mysql_query("SELECT * FROM users WHERE username =
'$username'")or die(mysql_error());
while($info = mysql_fetch_array( $check ))
{
11
if ($pass != $info['password'])
{
}
else
{
header("Location: gr11_index.php");
}
}
}
if (!get_magic_quotes_gpc()) {
$_POST['email'] = addslashes($_POST['email']);
}
$check = mysql_query("SELECT * FROM users WHERE username =
'".$_POST['username']."'")or die(mysql_error());
12
//Gives error if user dosen't exist
$check2 = mysql_num_rows($check);
if ($check2 == 0) {
die('That user does not exist, please register with Bet Me. <a
href=registration.php>Click Here to Register</a>');
}
while($info = mysql_fetch_array( $check ))
{
13
}
}
else
{
?>
14
<?php
// Connects to your Database
mysql_connect("localhost", "username", "password") or die(mysql_error());
mysql_select_db("BM_users") or die(mysql_error());
//if the cookie has the wrong password, they are taken to the login
page
if ($pass != $info['password'])
{ header("Location: login.php");
}
15
echo "<a href=logout.php>Logout</a>";
}
}
}
else
//if the cookie does not exist, they are taken to the login screen
{
header("Location: login.php");
}
?>
Gr11_index.php
<?php
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" >
<title>Mobile Web Applications</title>
<!--[if IE]>
<script
src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lt IE 9]>
<script src="http://ie7js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
16
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.1/jquery.mobile1.4.1.min.js"></script
<style>
p.notes {font-weight: bold}
</style>
</head>
<body>
<!-- THE START OF A MOBILE WEB PAGE -------------------------->
<div data-role="page" id="home">
<!-- THE HEADER SECTION --------------------------------->
<div data-role="header" data-theme="b">
<h1>Semester Project</h1>
</div>
17
</div>
<!-- THE END OF A MOBILE WEB PAGE ----------------------------->
</body>
</html>
Logout.php
<?php
/**
* Created by JetBrains PhpStorm.
* User: Blake Wong
* Date: 3/31/14
* Time: 7:51 PM
* To change this template use File | Settings | File Templates.
*/
$past = time() - 100;
//A time set in the past will make the session void, therefore logging
out. See Ya!!
setcookie(ID_my_site, gone, $past);
setcookie(Key_my_site, gone, $past);
header("Location: login.php");
?>
18
Users Guide:
By using the mobile web application Bet Me, the user will have access to tons of data
that will help them make informed decisions on hot to bet on professional basketball games. The
first screen that will appear when the web app has loaded will be the login screen. From here, a
new user can register, and a returning user can sign in. After the user has logged in, they will
have access to the database. From here, the user will be able to view all the professional
basketball teams basic and advanced statistics. The app is designed to be simple, so the only
steps are:
1. Login/Register
2. Search/View Statistics
There are certain statistics that should be the focus of your attention. Since the app
focuses on making a team decision and not individual player statistics, the focus should be on the
team dynamic. The top statistical categories for making an informed betting decision would be:
How many games have been played by the team in the last few days
For example, if the team played a game the night before, then there is a higher chance the team
loses because they are tired from the night before. The venue matters because all teams perform
better at home than they do on the road. With the hometown fans supporting them the players get
an energy boost. PPG shows how effective your offense is and points allowed per game shows
your defenses capabilities. After studying these statistical categories the odds will be in your
favor.
19
Personal Experiences:
Overall, this project was a success. Even though we werent able to perfect the application
completely, I feel like I learned a lot.
The good:
I was able to connect with new people that are in the same field as me.
I was able to learn how to develop a web application using tools I have never used before.
Group meetings were successful.
The team showed dedication to the project.
We had fun!
The bad:
Sometimes we got stuck on a certain part of the project for a long time.
20