This file contains hidden or 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
Saving time data into DB | |
$this->load->model('time_model'); | |
$user_id = $this->session->userdata('id'); | |
$user_timezone = $this->time_model->getTimeZone($user_id); | |
$format = "U"; // automatically saves it in unix format, this is just to show you that you can adjust format.... | |
$data['timestamp'] = $this->time_model->getUTCTimeStamp($user_timezone, $format); | |
Shorthand: $data['timestamp'] = $this->time_model->getUTCTimeStamp($this->time_model->getTimeZone($this->session->userdata('id')); |
This file contains hidden or 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
<script> | |
$(document).ready(function(){ | |
$(document).on('click','.tour-modal-next', function(e){ | |
e.preventDefault(); | |
var tour_id= parseInt($(this).attr('id')); | |
tour_id++; | |
$('.tour-modal').hide(); | |
if(tour_id != 5) { | |
$('#take-the-tour-'+tour_id).show(); |
This file contains hidden or 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
$(document).ready(function(){ | |
jQuery.validator.addMethod("phoneUS", function(phone_number, element) { | |
phone_number = phone_number.replace(/\s+/g, ""); | |
/*return this.optional(element) || phone_number.length > 9 && | |
phone_number.match(/^\(\d{3}\) ?\d{3}( |-)?\d{4}|^\d{3}( |-)?\d{3}( |-)?\d{4}/);*/ | |
return this.optional(element) || phone_number.length > 9 && | |
phone_number.match(/^(\d{3})(-\d{3})(-\d{4})$/); | |
}, "Please specify a valid phone number<br>Example: 204-303-3403"); |
This file contains hidden or 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
$(document).ready(function(){ | |
jQuery.validator.addMethod("phoneUS", function(phone_number, element) { | |
phone_number = phone_number.replace(/\s+/g, ""); | |
/*return this.optional(element) || phone_number.length > 9 && | |
phone_number.match(/^\(\d{3}\) ?\d{3}( |-)?\d{4}|^\d{3}( |-)?\d{3}( |-)?\d{4}/);*/ | |
return this.optional(element) || phone_number.length > 9 && | |
phone_number.match(/^(\d{3})(-\d{3})(-\d{4})$/); | |
}, "Please specify a valid phone number<br>Example: 204-303-3403"); |
NewerOlder