From b079152156299de35cb2f4b13c91d35956960d77 Mon Sep 17 00:00:00 2001 From: mathieu Date: Tue, 16 Jun 2015 16:13:41 -0400 Subject: [PATCH] Report system. Refs #17 --- application/config/autoload.php | 2 +- application/controllers/ajax.php | 21 ++ application/controllers/home.php | 3 + application/controllers/index.html | 0 application/controllers/measures.php | 23 +- application/controllers/modal.php | 15 ++ application/controllers/report.php | 38 ++++ application/models/event.php | 197 ++++++++++++++++++ application/models/index.html | 0 application/models/measure.php | 60 +----- application/models/user.php | 11 +- application/models/watch.php | 0 application/views/about.php | 0 application/views/contact.php | 0 .../views/email/remind-check-accuracy.php | 0 application/views/email/reset-password.php | 0 application/views/email/signup.php | 0 application/views/footer.php | 0 application/views/header.php | 2 +- application/views/help.php | 0 application/views/home.php | 5 +- application/views/index.html | 0 application/views/measure/all.php | 0 application/views/measure/audio.php | 0 application/views/measure/get-accuracy.php | 0 application/views/measure/new-measure.php | 0 application/views/measure/new-watch.php | 0 application/views/modal/accuracy-warning.php | 0 application/views/modal/login.php | 0 application/views/modal/reset-password.php | 0 application/views/modal/sign-up-success.php | 0 application/views/modal/sign-up.php | 0 application/views/report.php | 147 +++++++++++++ application/views/reset-password.php | 0 application/views/watch-tips.php | 0 assets/js/MediaElement/background.png | Bin assets/js/MediaElement/bigplay.fw.png | Bin assets/js/MediaElement/bigplay.png | Bin assets/js/MediaElement/bigplay.svg | 0 assets/js/MediaElement/controls-ted.png | Bin assets/js/MediaElement/controls-wmp-bg.png | Bin assets/js/MediaElement/controls-wmp.png | Bin assets/js/MediaElement/controls.fw.png | Bin assets/js/MediaElement/controls.png | Bin assets/js/MediaElement/controls.svg | 0 .../js/MediaElement/flashmediaelement-cdn.swf | Bin assets/js/MediaElement/flashmediaelement.swf | Bin assets/js/MediaElement/jquery.js | 0 assets/js/MediaElement/loading.gif | Bin .../MediaElement/mediaelement-and-player.js | 0 .../mediaelement-and-player.min.js | 0 assets/js/MediaElement/mediaelement.js | 0 assets/js/MediaElement/mediaelement.min.js | 0 assets/js/MediaElement/mediaelementplayer.css | 0 assets/js/MediaElement/mediaelementplayer.js | 0 .../MediaElement/mediaelementplayer.min.css | 0 .../js/MediaElement/mediaelementplayer.min.js | 0 assets/js/MediaElement/mejs-skins.css | 0 assets/js/MediaElement/skipback.png | Bin assets/js/application.js | 6 +- assets/js/bootstrap.min.js | 0 assets/js/facebook.js | 0 assets/js/home.logic.js | 0 assets/js/home.logic.mobile.js | 6 +- assets/js/jquery.min.js | 0 assets/js/jquery.min.map | 0 assets/js/jquery.sharrre.min.js | 0 assets/js/sharrre.logic.js | 0 assets/js/watch.animation.js | 0 69 files changed, 460 insertions(+), 76 deletions(-) mode change 100644 => 100755 application/config/autoload.php mode change 100644 => 100755 application/controllers/ajax.php mode change 100644 => 100755 application/controllers/home.php mode change 100644 => 100755 application/controllers/index.html mode change 100644 => 100755 application/controllers/measures.php mode change 100644 => 100755 application/controllers/modal.php create mode 100644 application/controllers/report.php create mode 100755 application/models/event.php mode change 100644 => 100755 application/models/index.html mode change 100644 => 100755 application/models/measure.php mode change 100644 => 100755 application/models/user.php mode change 100644 => 100755 application/models/watch.php mode change 100644 => 100755 application/views/about.php mode change 100644 => 100755 application/views/contact.php mode change 100644 => 100755 application/views/email/remind-check-accuracy.php mode change 100644 => 100755 application/views/email/reset-password.php mode change 100644 => 100755 application/views/email/signup.php mode change 100644 => 100755 application/views/footer.php mode change 100644 => 100755 application/views/header.php mode change 100644 => 100755 application/views/help.php mode change 100644 => 100755 application/views/home.php mode change 100644 => 100755 application/views/index.html mode change 100644 => 100755 application/views/measure/all.php mode change 100644 => 100755 application/views/measure/audio.php mode change 100644 => 100755 application/views/measure/get-accuracy.php mode change 100644 => 100755 application/views/measure/new-measure.php mode change 100644 => 100755 application/views/measure/new-watch.php mode change 100644 => 100755 application/views/modal/accuracy-warning.php mode change 100644 => 100755 application/views/modal/login.php mode change 100644 => 100755 application/views/modal/reset-password.php mode change 100644 => 100755 application/views/modal/sign-up-success.php mode change 100644 => 100755 application/views/modal/sign-up.php create mode 100644 application/views/report.php mode change 100644 => 100755 application/views/reset-password.php mode change 100644 => 100755 application/views/watch-tips.php mode change 100644 => 100755 assets/js/MediaElement/background.png mode change 100644 => 100755 assets/js/MediaElement/bigplay.fw.png mode change 100644 => 100755 assets/js/MediaElement/bigplay.png mode change 100644 => 100755 assets/js/MediaElement/bigplay.svg mode change 100644 => 100755 assets/js/MediaElement/controls-ted.png mode change 100644 => 100755 assets/js/MediaElement/controls-wmp-bg.png mode change 100644 => 100755 assets/js/MediaElement/controls-wmp.png mode change 100644 => 100755 assets/js/MediaElement/controls.fw.png mode change 100644 => 100755 assets/js/MediaElement/controls.png mode change 100644 => 100755 assets/js/MediaElement/controls.svg mode change 100644 => 100755 assets/js/MediaElement/flashmediaelement-cdn.swf mode change 100644 => 100755 assets/js/MediaElement/flashmediaelement.swf mode change 100644 => 100755 assets/js/MediaElement/jquery.js mode change 100644 => 100755 assets/js/MediaElement/loading.gif mode change 100644 => 100755 assets/js/MediaElement/mediaelement-and-player.js mode change 100644 => 100755 assets/js/MediaElement/mediaelement-and-player.min.js mode change 100644 => 100755 assets/js/MediaElement/mediaelement.js mode change 100644 => 100755 assets/js/MediaElement/mediaelement.min.js mode change 100644 => 100755 assets/js/MediaElement/mediaelementplayer.css mode change 100644 => 100755 assets/js/MediaElement/mediaelementplayer.js mode change 100644 => 100755 assets/js/MediaElement/mediaelementplayer.min.css mode change 100644 => 100755 assets/js/MediaElement/mediaelementplayer.min.js mode change 100644 => 100755 assets/js/MediaElement/mejs-skins.css mode change 100644 => 100755 assets/js/MediaElement/skipback.png mode change 100644 => 100755 assets/js/application.js mode change 100644 => 100755 assets/js/bootstrap.min.js mode change 100644 => 100755 assets/js/facebook.js mode change 100644 => 100755 assets/js/home.logic.js mode change 100644 => 100755 assets/js/home.logic.mobile.js mode change 100644 => 100755 assets/js/jquery.min.js mode change 100644 => 100755 assets/js/jquery.min.map mode change 100644 => 100755 assets/js/jquery.sharrre.min.js mode change 100644 => 100755 assets/js/sharrre.logic.js mode change 100644 => 100755 assets/js/watch.animation.js diff --git a/application/config/autoload.php b/application/config/autoload.php old mode 100644 new mode 100755 index 69f4ec51..0ebfe5f8 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -109,7 +109,7 @@ | */ -$autoload['model'] = array('user'); +$autoload['model'] = array('user', 'event'); /* End of file autoload.php */ diff --git a/application/controllers/ajax.php b/application/controllers/ajax.php old mode 100644 new mode 100755 index ce303da0..6aa3e84f --- a/application/controllers/ajax.php +++ b/application/controllers/ajax.php @@ -19,10 +19,12 @@ function login() $password = $this->input->post('password'); if($this->user->login($email, $password)) { + $this->event->add($this->event->LOGIN_EMAIL); $result['success'] = true; } else { + $this->event->add($this->event->LOGIN_FAIL); $result['success'] = false; } @@ -63,6 +65,8 @@ function facebookSignup() if($this->user->signup($email, $password, $name, $firstname, $timezone, $country)) { + $this->event->add($this->event->LOGIN_FB); + $this->load->helper('mcapi'); $api = new MCAPI('eff18c4c882e5dc9b4c708a733239c82-us9'); $api->listSubscribe('7f94c4aa71', $email, ''); @@ -95,6 +99,9 @@ function facebookSignup() $this->user->login($email, $password); } }else if($this->user->login($email, $password)){ + + $this->event->add($this->event->SIGN_UP_FB); + $result['success'] = "signin"; }else { $result['success'] = false; @@ -119,6 +126,8 @@ function signup() if($this->user->signup($email, $password, $name, $firstname, $timezone, $country)) { + + $this->event->add($this->event->SIGN_UP); if('true' == $mailingList) { @@ -163,6 +172,8 @@ function signup() } else { + $this->event->add($this->event->SIGN_UP_FAIL); + $result['success'] = false; } @@ -183,6 +194,8 @@ function askResetPassword() if($resetToken != '') { + $this->event->add($this->event->RESET_PASSWORD); + $this->load->library('email'); $config['protocol'] = "smtp"; @@ -229,6 +242,9 @@ function resetPassword() { if($this->input->post('resetToken')) { + + $this->event->add($this->event->RESET_PASSWORD_USE); + $result = array(); $resetToken = $this->input->post('resetToken'); @@ -255,6 +271,9 @@ function getReferenceTime() function accuracyMeasure(){ if($this->input->post('measureId')) { + + $this->event->add($this->event->NEW_ACCURACY); + $referenceTime = $this->session->userdata('referenceTime'); $userTimezone = $this->input->post('userTimezone'); @@ -283,6 +302,8 @@ function baseMeasure() { if($this->input->post('watchId')) { + $this->event->add($this->event->NEW_MEASURE); + $result = array(); $watchId = $this->input->post('watchId'); diff --git a/application/controllers/home.php b/application/controllers/home.php old mode 100644 new mode 100755 index e5a5a688..1099a460 --- a/application/controllers/home.php +++ b/application/controllers/home.php @@ -9,6 +9,7 @@ function __construct() function index() { + if(!$this->agent->is_mobile()){ array_push($this->_headerData['javaScripts'], "home.logic", "watch.animation"); }else{ @@ -22,6 +23,8 @@ function index() function logout() { + $this->event->add($this->event->LOGOUT); + $this->user->logout(); redirect(base_url()); } diff --git a/application/controllers/index.html b/application/controllers/index.html old mode 100644 new mode 100755 diff --git a/application/controllers/measures.php b/application/controllers/measures.php old mode 100644 new mode 100755 index 377729cf..29bdb7a3 --- a/application/controllers/measures.php +++ b/application/controllers/measures.php @@ -10,18 +10,13 @@ public function __construct() $this->load->model('measure'); } - public function removeDuplicate($key){ - if($key === "TMGfrXeb6WvCgNAjeKd4"){ - $this->measure->removeDuplicate(); - }else{ - echo "Unauthorized"; - } - } - public function index() { + if($this->input->post('addWatch')) { + $this->event->add($this->event->ADD_WATCH); + $brand = $this->input->post('brand'); $name = $this->input->post('name'); $yearOfBuy = $this->input->post('yearOfBuy'); @@ -39,6 +34,8 @@ public function index() } else if($this->input->post('deleteMeasures')) { + $this->event->add($this->event->DELETE_ALL_MEASURES); + $measureId = $this->input->post('deleteMeasures'); if($this->measure->deleteMesure($measureId)) @@ -53,6 +50,8 @@ public function index() } else if($this->input->post('deleteWatch')) { + $this->event->add($this->event->DELETE_WATCH); + $watchId = $this->input->post('deleteWatch'); if($this->watch->deleteWatch($watchId)) @@ -64,6 +63,8 @@ public function index() $this->_bodyData['error'] = 'An error occured while deleting your watch.'; } } + + $this->event->add($this->event->BOARD_LOAD); $this->_headerData['headerClass'] = 'blue'; $this->load->view('header', $this->_headerData); @@ -79,6 +80,8 @@ public function index() public function new_watch() { + $this->event->add($this->event->ADD_WATCH); + $this->_headerData['headerClass'] = 'blue'; $this->load->view('header', $this->_headerData); @@ -90,6 +93,8 @@ public function new_watch() public function new_measure() { + $this->event->add($this->event->MEASURE_LOAD); + $this->_headerData['headerClass'] = 'blue'; $this->load->view('header', $this->_headerData); @@ -106,6 +111,8 @@ public function get_accuracy() if($this->input->post('measureId') && $this->input->post('watchId')) { + $this->event->add($this->event->ACCURACY_LOAD); + $this->_headerData['headerClass'] = 'blue'; array_push($this->_headerData['javaScripts'], "jquery.sharrre.min", "sharrre.logic", "watch.animation"); $this->load->view('header', $this->_headerData); diff --git a/application/controllers/modal.php b/application/controllers/modal.php old mode 100644 new mode 100755 index a429c08e..155d5180 --- a/application/controllers/modal.php +++ b/application/controllers/modal.php @@ -3,10 +3,21 @@ class Modal extends MY_Controller { + private function ctaClick(){ + if($this->input->post('cta') != ""){ + $cta = 'CTA_' . strtoupper ( $this->input->post('cta') ); + + if(property_exists($this->event, $cta)){ + $this->event->add($this->event->{$cta}); + } + } + } + public function accuracyWarning(){ if($this->input->post('ajax')) { $this->load->view('modal/accuracy-warning'); + $this->event->add($this->event->ACCURACY_WARNING_POPUP); } else { @@ -18,6 +29,8 @@ public function login() { if($this->input->post('ajax')) { + $this->ctaClick(); + $this->event->add($this->event->LOGIN_POPUP); $this->load->view('modal/login'); } else @@ -30,6 +43,8 @@ public function signUp() { if($this->input->post('ajax')) { + $this->ctaClick(); + $this->event->add($this->event->SIGN_UP_POPUP); $this->load->view('modal/sign-up'); } else diff --git a/application/controllers/report.php b/application/controllers/report.php new file mode 100644 index 00000000..03a25b9c --- /dev/null +++ b/application/controllers/report.php @@ -0,0 +1,38 @@ +_needLoggedIn = true; + parent::__construct(); + $this->load->model('watch'); + $this->load->model('measure'); + $this->load->model('user'); + } + + function index() + { + + + $this->_headerData['headerClass'] = 'blue'; + $this->load->view('header', $this->_headerData); + + $this->_bodyData['events'] = $this->event->getEvents(); + $this->_bodyData['eventsColumns'] = $this->event->EVENT_STRING; + $this->_bodyData['allEvents'] = $this->event->getAllEvents(); + + $this->_bodyData['measure'] = $this->measure->count_all(); + $this->_bodyData['watch'] = $this->watch->count_all(); + $this->_bodyData['user'] = $this->user->count_all(); + $this->_bodyData['domain'] = $this->user->statsDomain(); + $this->_bodyData['platforms'] = $this->event->getPlatforms(); + $this->_bodyData['browsers'] = $this->event->getBrowsers(); + $this->_bodyData['mobile'] = $this->event->mobileEvents(); + + + $this->load->view('report', $this->_bodyData); + $this->load->view('footer'); + } + +} \ No newline at end of file diff --git a/application/models/event.php b/application/models/event.php new file mode 100755 index 00000000..1e4c3b69 --- /dev/null +++ b/application/models/event.php @@ -0,0 +1,197 @@ +table_name = "event"; + $this->masks = array( + 'CTR_MEASURE' => array($this->NEW_MEASURE, $this->MEASURE_LOAD), + 'CTR_ACCURACY' => array($this->NEW_ACCURACY, $this->ACCURACY_LOAD), + 'CTR_PASSWORD' => array($this->RESET_PASSWORD, $this->RESET_PASSWORD_USE), + 'CTR_SIGNUP' => array($this->SIGN_UP, $this->SIGN_UP_POPUP), + 'CTR_SIGNUP_FB' => array($this->SIGN_UP, $this->SIGN_UP_FB), + 'CTR_LOGIN' => array($this->LOGIN_EMAIL, $this->LOGIN_POPUP), + 'CTR_LOGIN_FB' => array($this->LOGIN_FB, $this->LOGIN_POPUP), + 'MEASURE_COMPLETION' => array($this->NEW_ACCURACY, $this->NEW_MEASURE) + ); + + $this->EVENT_STRING = "'DATE',"; + $vars = get_object_vars($this); + $index = 0; + foreach ($vars as $key => $value) { + if(!is_array($value) && !is_array($key) && $index < $this->nbEvent){ + $this->EVENT_STRING = $this->EVENT_STRING . "'" . $key . "',"; + $index++; + } + } + + $this->EVENT_STRING = rtrim($this->EVENT_STRING, ","); + } + + function add($event){ + + $data = array( + 'ip' => $this->input->ip_address(), + 'user_id' => $this->session->userdata('userId'), + 'mobile' => $this->agent->is_mobile(), + 'browser' => $this->agent->browser(), + 'platform' => $this->agent->platform(), + 'event' => $event); + + if($this->insert($data) === false){ + echo $this->db->last_query(); + } + } + + function mobileEvents(){ + return $this->select(" + (select count(1) from event where mobile = 1) / + count(1) as percent", false) + ->find(); + } + + function getPlatforms(){ + return $this->select("platform, count(1) as nb") + ->group_by('platform') + ->find_all(); + } + + function getBrowsers(){ + return $this->select("browser, count(1) as nb") + ->group_by('browser') + ->find_all(); + } + + function getEvents(){ + + return array_merge( + $this->activeUser(), + $this->activeBrowser(), + $this->computeMask(), + $this->events() + ); + } + + public function getAllEvents(){ + + $selectString = 'CONCAT(DAY(timestamp), "/", MONTH(timestamp),"/", + YEAR(timestamp)) as date,'; + + $vars = get_object_vars($this); + + $index = 0; + foreach ($vars as $key => $value) { + if(!is_array($value) && !is_array($key) && $index < $this->nbEvent){ + $selectString = $selectString . + $this->constructSubMask($value) . + ' as ' . $key . ','; + $index++; + } + + } + + return $this->select(rtrim($selectString, ","), false) + ->group_by('date') + ->find_all(); + } + + private function computeMask(){ + + $computedMasks = array(); + + foreach ($this->masks as $mask => $values) { + + $maskResult = $this->select('CONCAT(DAY(timestamp), "/", MONTH(timestamp),"/", + YEAR(timestamp)) as date, ("'. $mask .'") as name,'. + $this->constructSubMask($values[0]) . '/' . + $this->constructSubMask($values[1]) . ' as cnt', false) + ->where('event.event', $values[0]) + ->or_where('event.event', $values[1]) + ->group_by('date') + ->find_all(); + + if(is_array($maskResult)){ + $computedMasks = array_merge($computedMasks, $maskResult); + } + } + + return $computedMasks; + + } + + private function constructSubMask($value){ + return ' + (Select count(id) from event where CONCAT(DAY(timestamp), "/", + MONTH(timestamp), "/", YEAR(timestamp)) = + date and event.event = '.$value.')'; + } + + private function activeUser(){ + return $this->select('count(distinct(user_id)) as cnt, + CONCAT(DAY(timestamp), "/", MONTH(timestamp),"/", + YEAR(timestamp)) as date, ("ACTIVE_REGISTERED_USER") as name', false) + ->where("user_id !=", 0) + ->group_by("date") + ->find_all(); + } + + private function activeBrowser(){ + return $this->select('count(distinct(ip)) as cnt, + CONCAT(DAY(timestamp), "/", MONTH(timestamp),"/", + YEAR(timestamp)) as date, ("ACTIVE_UNREGISTERED_USER") as name', false) + ->where("user_id =", 0) + ->group_by("date") + ->find_all(); + } + + private function events(){ + $data = $this->select('count(event) as cnt, event, + CONCAT(DAY(timestamp), "/", MONTH(timestamp),"/", + YEAR(timestamp)) as date, name', false) + ->join("event_name", "event.event = event_name.id") + ->group_by("event") + ->group_by("date") + ->order_by("event") + ->find_all(); + + return $data; + } + + + + } \ No newline at end of file diff --git a/application/models/index.html b/application/models/index.html old mode 100644 new mode 100755 diff --git a/application/models/measure.php b/application/models/measure.php old mode 100644 new mode 100755 index 8692eaa0..018190dc --- a/application/models/measure.php +++ b/application/models/measure.php @@ -12,63 +12,6 @@ function getMeasuresByWatchId($watchId) { return $this->select()->find_by('watchId', $watchId); } - - function removeDuplicate() - { - - $this->db->select('*') - ->from('watch'); - - $query = $this->db->get(); - $watches = $query->result(); - - foreach ($watches as $watch) { - - $watchMeasures = $this->select()->find_all_by('watchId', $watch->watchId); - - echo $this->db->last_query(); - - var_dump($watchMeasures); - - echo '

'; - - if(sizeof($watchMeasures) % 2 === 0){ - - for ($i=1; $i < sizeof($watchMeasures); $i++) { - - $data = array( - 'accuracyReferenceTime' => $watchMeasures[$i]->measureReferenceTime, - 'accuracyUserTime' => $watchMeasures[$i]->measureUserTime, - 'statusId' => 2 - ); - - $this->update($watchMeasures[$i-1]->id, $data); - echo ' ' . $this->db->last_query() . '
'; - $this->delete($watchMeasures[$i]->id); - echo ' ' . $this->db->last_query() . '
'; - - } - - }else if(sizeof($watchMeasures) % 2 === 1 && sizeof($watchMeasures) > 2){ - - for ($i=1; $i < sizeof($watchMeasures)-1; $i++) { - - $data = array( - 'accuracyReferenceTime' => $watchMeasures[$i]->measureReferenceTime, - 'accuracyUserTime' => $watchMeasures[$i]->measureUserTime, - 'statusId' => 2 - ); - - $this->update($watchMeasures[$i-1]->id, $data); - echo ' ' . $this->db->last_query() . '
'; - $this->delete($watchMeasures[$i]->id); - echo ' ' . $this->db->last_query() . '
'; - - } - - } - } - } function getMeasuresByUser($userId, $userWatches) @@ -129,7 +72,7 @@ function getMeasuresByUser($userId, $userWatches) return $data; } - private function computeAccuracy($watchMeasure){ + private function computeAccuracy($watchMeasure){ $userDelta = $watchMeasure->accuracyUserTime - $watchMeasure->measureUserTime; $refDelta = $watchMeasure->accuracyReferenceTime - $watchMeasure->measureReferenceTime; $accuracy = ($userDelta*86400/$refDelta)-86400; @@ -182,5 +125,4 @@ function deleteMesure($measureId){ return $this->update($measureId, $data) !== false; } - } \ No newline at end of file diff --git a/application/models/user.php b/application/models/user.php old mode 100644 new mode 100755 index 57e3ee73..2a242a4f --- a/application/models/user.php +++ b/application/models/user.php @@ -1,10 +1,11 @@ table_name = "user"; } function login($email, $password) @@ -176,4 +177,12 @@ function getUserFromWatchId($watchId) return $data; } + + function statsDomain(){ + + return $this->select('substring_index(`email`,"@",-1) as emailDomain, + count(substring_index(`email`,"@",-1)) as nb', false) + ->group_by('emailDomain') + ->find_all(); + } } \ No newline at end of file diff --git a/application/models/watch.php b/application/models/watch.php old mode 100644 new mode 100755 diff --git a/application/views/about.php b/application/views/about.php old mode 100644 new mode 100755 diff --git a/application/views/contact.php b/application/views/contact.php old mode 100644 new mode 100755 diff --git a/application/views/email/remind-check-accuracy.php b/application/views/email/remind-check-accuracy.php old mode 100644 new mode 100755 diff --git a/application/views/email/reset-password.php b/application/views/email/reset-password.php old mode 100644 new mode 100755 diff --git a/application/views/email/signup.php b/application/views/email/signup.php old mode 100644 new mode 100755 diff --git a/application/views/footer.php b/application/views/footer.php old mode 100644 new mode 100755 diff --git a/application/views/header.php b/application/views/header.php old mode 100644 new mode 100755 index c213f3c8..54e5a3c4 --- a/application/views/header.php +++ b/application/views/header.php @@ -92,7 +92,7 @@ { echo '
Login
'; - echo '
Measures
'; + echo '
Measures
'; } ?> diff --git a/application/views/help.php b/application/views/help.php old mode 100644 new mode 100755 diff --git a/application/views/home.php b/application/views/home.php old mode 100644 new mode 100755 index b33fbc60..6a4d3062 --- a/application/views/home.php +++ b/application/views/home.php @@ -15,7 +15,8 @@
@@ -90,7 +91,7 @@

Toolwatch's accuracy measure is built for speed and ease to use. Measuring the accuracy of your mechanical watch is so simple that you'll actually use it. Toolwatch helps you keep your loved ones on time.

- GET STARTED + GET STARTED
diff --git a/application/views/index.html b/application/views/index.html old mode 100644 new mode 100755 diff --git a/application/views/measure/all.php b/application/views/measure/all.php old mode 100644 new mode 100755 diff --git a/application/views/measure/audio.php b/application/views/measure/audio.php old mode 100644 new mode 100755 diff --git a/application/views/measure/get-accuracy.php b/application/views/measure/get-accuracy.php old mode 100644 new mode 100755 diff --git a/application/views/measure/new-measure.php b/application/views/measure/new-measure.php old mode 100644 new mode 100755 diff --git a/application/views/measure/new-watch.php b/application/views/measure/new-watch.php old mode 100644 new mode 100755 diff --git a/application/views/modal/accuracy-warning.php b/application/views/modal/accuracy-warning.php old mode 100644 new mode 100755 diff --git a/application/views/modal/login.php b/application/views/modal/login.php old mode 100644 new mode 100755 diff --git a/application/views/modal/reset-password.php b/application/views/modal/reset-password.php old mode 100644 new mode 100755 diff --git a/application/views/modal/sign-up-success.php b/application/views/modal/sign-up-success.php old mode 100644 new mode 100755 diff --git a/application/views/modal/sign-up.php b/application/views/modal/sign-up.php old mode 100644 new mode 100755 diff --git a/application/views/report.php b/application/views/report.php new file mode 100644 index 00000000..f7a3a0d6 --- /dev/null +++ b/application/views/report.php @@ -0,0 +1,147 @@ +
+
+ +

+

+

+ +
+
+

per

+

per

+

percent) . "% "; ?>

+
+
+ + + +
+ +
+ + + \ No newline at end of file diff --git a/application/views/reset-password.php b/application/views/reset-password.php old mode 100644 new mode 100755 diff --git a/application/views/watch-tips.php b/application/views/watch-tips.php old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/background.png b/assets/js/MediaElement/background.png old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/bigplay.fw.png b/assets/js/MediaElement/bigplay.fw.png old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/bigplay.png b/assets/js/MediaElement/bigplay.png old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/bigplay.svg b/assets/js/MediaElement/bigplay.svg old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/controls-ted.png b/assets/js/MediaElement/controls-ted.png old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/controls-wmp-bg.png b/assets/js/MediaElement/controls-wmp-bg.png old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/controls-wmp.png b/assets/js/MediaElement/controls-wmp.png old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/controls.fw.png b/assets/js/MediaElement/controls.fw.png old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/controls.png b/assets/js/MediaElement/controls.png old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/controls.svg b/assets/js/MediaElement/controls.svg old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/flashmediaelement-cdn.swf b/assets/js/MediaElement/flashmediaelement-cdn.swf old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/flashmediaelement.swf b/assets/js/MediaElement/flashmediaelement.swf old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/jquery.js b/assets/js/MediaElement/jquery.js old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/loading.gif b/assets/js/MediaElement/loading.gif old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/mediaelement-and-player.js b/assets/js/MediaElement/mediaelement-and-player.js old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/mediaelement-and-player.min.js b/assets/js/MediaElement/mediaelement-and-player.min.js old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/mediaelement.js b/assets/js/MediaElement/mediaelement.js old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/mediaelement.min.js b/assets/js/MediaElement/mediaelement.min.js old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/mediaelementplayer.css b/assets/js/MediaElement/mediaelementplayer.css old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/mediaelementplayer.js b/assets/js/MediaElement/mediaelementplayer.js old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/mediaelementplayer.min.css b/assets/js/MediaElement/mediaelementplayer.min.css old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/mediaelementplayer.min.js b/assets/js/MediaElement/mediaelementplayer.min.js old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/mejs-skins.css b/assets/js/MediaElement/mejs-skins.css old mode 100644 new mode 100755 diff --git a/assets/js/MediaElement/skipback.png b/assets/js/MediaElement/skipback.png old mode 100644 new mode 100755 diff --git a/assets/js/application.js b/assets/js/application.js old mode 100644 new mode 100755 index 36f76ef4..5ab2cda0 --- a/assets/js/application.js +++ b/assets/js/application.js @@ -29,15 +29,15 @@ $(document).ready(function() } }); - - + /* * Modal Update */ $('body').on('click', 'a[data-modal-update="true"]', function() { var dataHref = $(this).attr("data-href"); - $.post(dataHref, {ajax: true}, function(data) + var dataCta = $(this).attr("data-cta"); + $.post(dataHref, {ajax: true, cta:dataCta}, function(data) { $('#pageModal .modal-body').html(data); }); diff --git a/assets/js/bootstrap.min.js b/assets/js/bootstrap.min.js old mode 100644 new mode 100755 diff --git a/assets/js/facebook.js b/assets/js/facebook.js old mode 100644 new mode 100755 diff --git a/assets/js/home.logic.js b/assets/js/home.logic.js old mode 100644 new mode 100755 diff --git a/assets/js/home.logic.mobile.js b/assets/js/home.logic.mobile.js old mode 100644 new mode 100755 index 3c22b08b..07552a3e --- a/assets/js/home.logic.mobile.js +++ b/assets/js/home.logic.mobile.js @@ -1,5 +1,9 @@ $( document ).ready(function() { + + $('video,audio').mediaelementplayer({features: []}); + $( ".slogan-home" ).animate({ marginTop: "-="+$("video").height()/2 }, 2000); -}); \ No newline at end of file +}); + diff --git a/assets/js/jquery.min.js b/assets/js/jquery.min.js old mode 100644 new mode 100755 diff --git a/assets/js/jquery.min.map b/assets/js/jquery.min.map old mode 100644 new mode 100755 diff --git a/assets/js/jquery.sharrre.min.js b/assets/js/jquery.sharrre.min.js old mode 100644 new mode 100755 diff --git a/assets/js/sharrre.logic.js b/assets/js/sharrre.logic.js old mode 100644 new mode 100755 diff --git a/assets/js/watch.animation.js b/assets/js/watch.animation.js old mode 100644 new mode 100755