-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
b31d23f
commit 82fc369
Showing
12 changed files
with
133 additions
and
38 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
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
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
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
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
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
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,74 @@ | ||
-- phpMyAdmin SQL Dump | ||
-- version 4.2.1 | ||
-- http://www.phpmyadmin.net | ||
-- | ||
-- Host: localhost | ||
-- Generation Time: Mar 20, 2016 at 02:18 AM | ||
-- Server version: 5.6.20 | ||
-- PHP Version: 5.5.27 | ||
|
||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; | ||
SET time_zone = "+00:00"; | ||
|
||
|
||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
/*!40101 SET NAMES utf8 */; | ||
|
||
-- | ||
-- Database: `cab` | ||
-- | ||
|
||
-- -------------------------------------------------------- | ||
|
||
-- | ||
-- Table structure for table `new_cab_share` | ||
-- | ||
|
||
CREATE TABLE IF NOT EXISTS `new_cab_share` ( | ||
`id` int(6) unsigned NOT NULL, | ||
`userid` varchar(50) NOT NULL, | ||
`source_addr` longtext NOT NULL, | ||
`dest_addr` longtext NOT NULL, | ||
`date` varchar(50) NOT NULL, | ||
`start_time` varchar(50) NOT NULL, | ||
`end_time` varchar(50) NOT NULL, | ||
`travellers` varchar(50) NOT NULL, | ||
`phone` varchar(50) NOT NULL, | ||
`comment` varchar(50) NOT NULL, | ||
`state` int(6) unsigned NOT NULL, | ||
`private` varchar(50) NOT NULL, | ||
`username` varchar(255) NOT NULL | ||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ; | ||
|
||
-- | ||
-- Dumping data for table `new_cab_share` | ||
-- | ||
|
||
INSERT INTO `new_cab_share` (`id`, `userid`, `source_addr`, `dest_addr`, `date`, `start_time`, `end_time`, `travellers`, `phone`, `comment`, `state`, `private`, `username`) VALUES | ||
(15, '[email protected]', 'IIIT, Gachibowli', 'Inorbit Mall Road', '12/18/2015', '0809', '1605', '2', '1231231232', '2 bags', 0, 'No', ''), | ||
(16, '[email protected]', 'Inorbit Mall Road, HITEC City, Hyderabad, Telangana, India', 'Airport Plaza Complex, Begumpet, Hyderabad, Telangana, India', '01/20/2016', '0646', '1700', '2', '7893550837', 'lalal', 0, 'Yes', ''); | ||
|
||
-- | ||
-- Indexes for dumped tables | ||
-- | ||
|
||
-- | ||
-- Indexes for table `new_cab_share` | ||
-- | ||
ALTER TABLE `new_cab_share` | ||
ADD PRIMARY KEY (`id`); | ||
|
||
-- | ||
-- AUTO_INCREMENT for dumped tables | ||
-- | ||
|
||
-- | ||
-- AUTO_INCREMENT for table `new_cab_share` | ||
-- | ||
ALTER TABLE `new_cab_share` | ||
MODIFY `id` int(6) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=17; | ||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
Binary file not shown.
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
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
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 |
---|---|---|
|
@@ -12,12 +12,12 @@ function getShortAddr($longAddr) { | |
|
||
|
||
function send_email($to, $result) { | ||
|
||
var_dump($result); | ||
$result = json_decode($result, true); | ||
|
||
var_dump($result); | ||
if ($result["status"] == 0) { | ||
$headers = array("From: [email protected]", | ||
"Reply-To: no-reply@cabs.iiit.ac.in", | ||
"Reply-To: mdhr@osdg.iiit.ac.in", | ||
"X-Mailer: PHP/" . PHP_VERSION, | ||
"Content-Type: text/html; charset=ISO-8859-1", | ||
"MIME-Version: 1.0" | ||
|
@@ -36,7 +36,7 @@ function send_email($to, $result) { | |
$message .= ' <table width="60%">'; | ||
$message .= ' <tr>'; | ||
$message .= ' <td width="100%" align="center">'; | ||
$message .= ' <h1> <a href="http://cabs.iiit.ac.in/" style="color: #3e3e3e;">CabShare</a> </h1>'; | ||
$message .= ' <h1> <a href="http://osdg.iiit.ac.in/cabs/" style="color: #3e3e3e;">CabShare</a> </h1>'; | ||
$message .= ' </td>'; | ||
$message .= ' </tr>'; | ||
$message .= ' <tr>'; | ||
|
@@ -52,7 +52,7 @@ function send_email($to, $result) { | |
|
||
foreach($data as $current) { | ||
$message .= ' <li style="display: block; color: rgba(0,0,0,0.5); border-bottom-width: 1px; border-bottom-color: #4a4a4a; border-bottom-style: dashed; padding: 20px;">'; | ||
$message .= ' <span class="matched_name" style="display: block; width: 100%; color: rgba(0,0,0,1); font-size: 1.5em;">' . $current["userid"] . '</span>'; | ||
$message .= ' <span class="matched_name" style="display: block; width: 100%; color: rgba(0,0,0,1); font-size: 1.5em;">' . $current["username"] . '</span>'; | ||
$message .= ' <span class="matched_contact" style="display: block; width: 100%; color: rgba(0,0,0,1); margin-bottom: 5px; font-size: 0.9em;"><a href="mailto:' . $current["userid"] . '" style="color: black;">' . $current["userid"] . '</a> • ' . $current["phone"] . '</span>'; | ||
$message .= ' <span class="matched_route" style="display: block; width: 100%; font-size: 0.9em; color: rgba(0,0,0,0.5);">' . getShortAddr($current["source_addr"]) . ' to ' . getShortAddr($current["dest_addr"]) . ' • ' . $current["start_time"] . ' - ' . $current["end_time"] . '</span>'; | ||
$message .= ' <span class="matched_details" style="display: block; width: 100%; font-size: 0.9em;">' . $current["travellers"] . ' travellers • ' . $current["comment"] . '</span>'; | ||
|
@@ -84,6 +84,7 @@ function send_email($to, $result) { | |
// "status" => 0, | ||
// "data" => array( | ||
// array( | ||
// "username" => "Mrinal Dhar", | ||
// "userid" => "mrinal.dhar", | ||
// "start_time" => 1211, | ||
// "end_time" => 1222, | ||
|
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