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
<?php | |
class Validate { | |
public $message = array(); | |
public $validate; | |
public function rules($data) { | |
foreach($data as $key => $value) { |
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
$('h2.prof_name span.admin_s').popover({ | |
html:true, | |
placement:'right', | |
content:function(){ | |
// console.log($(this).parent().text()); | |
return $('#qedit--first-last').html(); | |
} | |
}).on('shown.bs.popover', function () { | |
var $popup = $(this); | |
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
<input type="text" name="email" data-rule-required="true" data-rule-email="true"> | |
<input type="text" name="password" id="passoword" data-rule-required="true" data-rule-minlength="6"> | |
<input type="text" name="password-confirm" data-rule-required="true" data-rule-minlength="6" data-rule-equalsto="#password"> | |
<input id="cemail" name="email" data-rule-required="true" data-rule-email="true" data-msg-email="Please enter a valid email address" /> | |
(Tested, core) |
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
$types = array( | |
'ai' => 'application/postscript', | |
'aif' => 'audio/x-aiff', | |
'aifc' => 'audio/x-aiff', | |
'aiff' => 'audio/x-aiff', | |
'asc' => 'text/plain', | |
'atom' => 'application/atom+xml', | |
'atom' => 'application/atom+xml', | |
'au' => 'audio/basic', | |
'avi' => 'video/x-msvideo', |
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
public function getAllAppliedJobs( $uid ) | |
{ | |
/*db.getCollection('employer_jobscol').aggregate([ | |
{$match: {"applied_users.user_id": ObjectId("582d99e551d24442857fb6f1") }}, | |
{$unwind: "$applied_users"}, | |
{$match: {"applied_users.user_id": ObjectId("582d99e551d24442857fb6f1") }} | |
]) | |
*/ | |
$condition = array( |
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
function uploadFiles(event, callback) { | |
files = event.target.files; | |
console.log('start'); | |
// event.stopPropagation(); | |
// event.preventDefault(); | |
// START A LOADING SPINNER HERE | |
console.log('start'); | |
// Create a formdata object and add the files | |
var data = new FormData(); |
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
<?php | |
class Encrypt{ | |
private function key( ) | |
{ | |
return $skey = "vishnu_kumar_aUlTIoQaBzk"; | |
} | |
public function safe_b64encode($string) { | |
$data = base64_encode($string); | |
$data = str_replace(array('+','/','='),array('-','_',''),$data); |
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
<?php // You need to add server side validation and better error handling here | |
$data = array(); | |
if(isset($_GET['files'])) | |
{ | |
$error = false; | |
$files = array(); | |
$uploaddir = './uploads/'; |
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
<?php | |
/** | |
** | |
** $mail = new Mail; | |
** $mail->liveSmtp(); | |
** $mail->template( $templt ); | |
** $mail->send( array( 'to' => 'someone@mail.com' ) ); | |
*/ | |
class Mail |
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
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ } | |
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ } | |
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ } | |
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ } | |
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ } | |
@media (min-width:1281px) { /* hi-res laptops and desktops */ } |