Mail Function with Attachments in php<?phpfunction mailWithAttachments($fileName, $filepath, $mailto, $fromMail, $fromName, $replyTo, $subject, $message) { $file = $filepath.$fileName; $file_size = filesize($file); $handle = fopen($file, "r"); $content = fread($handle, $file_size); fclose($handle); $content = chunk_split(base64_encode($content)); $uid = md5(uniqid(time()));//for unique number generate $name = basename($file); $header = "From: ".$from_name." <".$fromMail.">rn"; $header .= "Reply-To: ".$replyTo."rn"; $header .= "MIME-Version: 1.0rn"; $header .= "Content-Type: multipart/mixed; boundary="".$uid.""rnrn";…
Some time clients requirement that when I right click then open delete option and particular div delete<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style>.vmenu { border:1px solid #aaa; position:absolute; background:#fff; display:none; font-size:0.75em;}.vmenu .first_li span { width:100px; display:block; padding:5px 10px; cursor:pointer}.vmenu .inner_li { display:none; margin-left:120px; position:absolute; border:1px solid #aaa; border-left:1px solid…
Pagination ClassCodeIgniter's Pagination class is very easy to use, and it is 100% customizable, either dynamically or via stored preferences.Here we will tell create paging in codeignator.Create Model class modelname extends CI_Model{function __construct() { parent::__construct(); $this->load->database(); }function get_all_posts($limit, $offset) { //get all entry $query = $this->db->get('entry', $limit, $offset);;/****entry is table name *******/ return $query->result(); }}Controller class controllername extends CI_Controller{ function…
How can change div, span etc position randomly ?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Welcome to Notizza</title><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script><style>.tip1 { width:44px; height:30px; vertical-align:middle; text-align:center; font-weight:bold; color:#222; line-height:30px; padding-right:6px; background:url(../images/bubble1.png) 0 0 no-repeat; z-index:100; margin-top:5px;}.toolTip { position: relative; }.toolTip a { text-decoration: none; text-align: center;}.toolTip .alt { display: none;}.toolTip a:hover ~ .alt { display: inline; padding: 6px; margin:…
Auto Generate Password and User Function class GeneratorComponent extends Object{ // Numeric Arrayvar $_array_numeric = array(1,2,3,4,5,6,7,8,9); // Alphabet Array var $_array_alpha = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'); /** # Function : GeneratePassword # Create Date : 02-12-2011 # Description : Generate password in random order. # Arguments : None # Return : Password */ function GeneratePassword(){ $array_pass = $this->_array_numeric; $array_pass_alpha = …
Wide skyscrapper 160X600 px allways on TOP! also by scrolling <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script><script type="text/javascript" src="jquery_scroll.js"></script><script type="text/javascript"> $( document ).ready( function () { $( '#map' ).scrollFollow( {container: 'result1' } ); } );</script><title>jafarkhan.blogspot.com</title><body > <style type="text/css">*{ margin: 0;…
How can Direct Import model in .ctp file without controller in cake php App::import('Model','ModelName'); $this->ModelName=new ModelName(); $active=$this->ModelName->functionName($parameters);
How to run manually SQL database query in CakePHP$qry="SELECT * FROM table name"; $result=$this->model->query($qry); //result in array
function admin_downloadForms($filename=null) { //echo $filename=base64_decode($filename); $filename = WWW_ROOT . "uploads/uploadform/".$filename; if (file_exists($filename)) { header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private", false); header("Content-Type: application/force-download"); header("Content-Type: application/pdf"); header("Content-Description: File Transfer"); …
code: save file jUtil.jsfunction chkCharacter(obj,maxlimit,objMessage) { var objMessage,field,num; objMessage=document.getElementById(objMessage); field=obj; num=(maxlimit-field.value.length); if(num<=0) { num=0; objMessage.style.color='red'; } else { objMessage.style.color='green'; } objMessage.innerHTML=num+" Character Remaining."; if (field.value.length > maxlimit) field.value = field.value.substring(0, maxlimit);}function isnotemail(email) { var regEx = /^[w.+-]{1,}@([da-zA-Z-]{1,}.){1,}[da-zA-Z-]{2,6}$/; if(!regEx.test(email)) { return true; } return false;}////////////////////////////////////////////////////////////////////var…