-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nerdyninja
committed
Jan 13, 2018
0 parents
commit fb18b50
Showing
15 changed files
with
236 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.DS_Store | ||
vendor/ | ||
node_modules/ | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 SIES GST Technical Team | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Event ID Web Application | ||
|
||
A simple web application to handle event registrations and payment for the user base. | ||
|
||
## Status | ||
[](https://travis-ci.org/siesgst-tech/eventID-web) | ||
|
||
## Getting Started | ||
|
||
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. | ||
|
||
### Prerequisites | ||
|
||
1. PHP verion 7.0+ | ||
2. Apache Server | ||
3. MySQL Database | ||
|
||
### Installing | ||
|
||
TODO: Additional notes about how to install this on a live server | ||
|
||
## Deployment | ||
|
||
TODO: Additional notes about how to deploy this on a live server | ||
|
||
## Built With | ||
|
||
* [WTL-Kit](https://github.com/nerdyninja/WTL-Kit) - The web mini-framework | ||
* [FCM](https://firebase.google.com/docs/cloud-messaging/) - Android Notifications | ||
|
||
## Contributing | ||
|
||
Please read [CONTRIBUTING.md](https://github.com/siesgst-tech/eventID-web/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us. | ||
|
||
## Authors | ||
|
||
* **Omkar Prabhu** - [nerdyninja](https://github.com/nerdyninja) | ||
* **Chinmay Chandak** - [CCAtAlvis](https://github.com/CCAtAlvis) | ||
|
||
See also the list of [contributors](https://github.com/siesgst-tech/eventID-web/contributors) who participated in this project. | ||
|
||
## License | ||
|
||
TODO: Add a license | ||
|
||
## Acknowledgments | ||
|
||
TODO: Add acknowledgements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
// Define your database connectivity details here | ||
define('DB_HOSTNAME', 'localhost'); // your mysql host | ||
define('DB_USERNAME', 'root'); // your mysql username root or anything else | ||
define('DB_PASSWORD', 'root'); // your mysql password; root if XAMPP, LAMP and no passowrd if WAMP | ||
define('DB_DATABASE', 'wtl-kit'); // your mysql database name, you dont have to define table names here | ||
|
||
// WARNING: Do not delete this file | ||
// Author: Omkar Prabhu (nerdyninja) | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
// Define your custom exception messages here | ||
define('MESSAGE_NAME', '<message here>'); | ||
|
||
// WARNING: Do not delete this file | ||
// Author: Omkar Prabhu (nerdyninja) | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
// Database | ||
require_once dirname(__FILE__).'/database.php'; | ||
// Messages | ||
require_once dirname(__FILE__).'/messages.php'; | ||
// Timezone | ||
date_default_timezone_set('Asia/Kolkata'); | ||
// Classes to load | ||
function ClassAutoloader($class) | ||
{ | ||
require_once dirname(__FILE__).'/../controller/'.$class.'.php'; | ||
} | ||
|
||
spl_autoload_register('ClassAutoloader'); | ||
|
||
// WARNING: Do not delete this file | ||
// Author: Omkar Prabhu (nerdyninja) | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/* This is our main database connection class */ | ||
class DBClass | ||
{ | ||
/** | ||
* @var will hold the database connection | ||
*/ | ||
public $connection; | ||
/** | ||
* This will create the connection | ||
*/ | ||
public function __construct() | ||
{ | ||
$this->connection = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE); | ||
if( mysqli_connect_error()) echo "Failed to connect to MySQL: " . mysqli_connect_error(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/* A demo controller to demonstrate how to write controllers */ | ||
class DemoController { | ||
// Functions to be written inside controller | ||
/* | ||
* This is constructor of this class, this will intialize database connection for this class | ||
*/ | ||
public function __construct() | ||
{ | ||
// To initiate and handle database connection for providing it to all functions of this controller | ||
$db = new DBClass(); | ||
$this->connection = $db->connection; | ||
} | ||
|
||
/** | ||
* Mention what this function does | ||
* @param array of $data, single variable or anything, usually we pass $_POST, $_GET array | ||
* @return boolean or any value | ||
* @throws exception of any kind | ||
*/ | ||
public function hello($name) | ||
{ | ||
$variable = "this nigga is ".$name; | ||
// To access database connection variables we use this keyword | ||
// mysqli_connect($this->connection, "<QUERY>"); | ||
//throw new Exception(EXCEPTION_NAME); // here exception can be from config/messages directory | ||
// OR | ||
return $variable; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- This is a demo page to show how to use header and footer constant through multiple pages !--> | ||
<?php | ||
// System | ||
require_once dirname(__FILE__).'/config/system.php'; | ||
// Variables need here | ||
$page_title = "Index"; | ||
// Header | ||
require_once dirname(__FILE__).'/view/header.php'; | ||
?> | ||
<!-- ADD YOUR CONTENT HERE !--> | ||
|
||
<h1 align="center">WTL-Kit</h1> | ||
<?php | ||
try { | ||
$dataObj = new DemoController(); | ||
$data = $dataObj->hello('on fire!'); | ||
echo $data; | ||
} catch(Exception $e) { | ||
echo $e->getMessage(); | ||
} | ||
?> | ||
|
||
<!-- YOUR CONTENT ENDS HERE !--> | ||
<?php | ||
// Footer | ||
require_once dirname(__FILE__).'/view/footer.php'; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
-- This is standard for importing your Database schema | ||
-- This is a demo schema of users | ||
-- import into your phpmyadmin | ||
-- | ||
-- Table structure for table `users` | ||
-- | ||
CREATE TABLE `users` ( | ||
`id` int(11) NOT NULL, | ||
`fname` varchar(32) NOT NULL, | ||
`lname` varchar(32) NOT NULL, | ||
`email` varchar(64) NOT NULL, | ||
`password` varchar(32) NOT NULL, | ||
`avatar` varchar(128) NOT NULL, | ||
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', | ||
`modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
-- | ||
-- Indexes for table `users` | ||
-- | ||
ALTER TABLE `users` | ||
ADD PRIMARY KEY (`id`); | ||
-- | ||
-- AUTO_INCREMENT for table `users` | ||
-- | ||
ALTER TABLE `users` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* | ||
This is your custom stylesheet add your css codes here | ||
*/ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// This is your default custom script | ||
// Add your javascript codes here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!-- scripts !--> | ||
<script type="text/javascript" src="static-files/js/jquery.min.js"></script> | ||
<script type="text/javascript" src="static-files/js/script.js"></script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<!-- meta tags !--> | ||
<meta charset="utf-8"> | ||
<!--title !--> | ||
<title><?php echo $page_title; ?></title> | ||
<!-- stylesheets !--> | ||
<link rel="stylesheet" type="text/css" href="static-files/css/style.css"> | ||
</head> | ||
<body> |