Print a area from a webPage

<iframe name=”print_frame” width=”0″ height=”0″ frameborder=”0″ src=”about:blank”></iframe> <script language=”javascript” type=”text/javascript”> function printuaframe(divId) { var printDivCSS = new String (‘<link href=”https://www.eptanks.com/catalog/view/theme/default-bootstrap/bootstrap/css/bootstrap.css” rel=”stylesheet” type=”text/css”>’) window.frames[“print_frame”].document.body.innerHTML=printDivCSS+document.getElementById(divId).innerHTML; window.frames[“print_frame”].window.focus(); window.frames[“print_frame”].window.print(); } </script>

Print Update Query in Zend

$data=array(‘table_amount’=>’table_amount’+$chips,’recent_chaal_amount’=>$chips); $this->db->getProfiler()->setEnabled(true); $this->db->update(‘ss_table’,$data,’id=’.$tableid); foreach((array)$this->db->getProfiler()->getQueryProfiles() as $qry){ $this->_qryProf .= “\r\n”.print_r($qry,true).”\r\n”; } echo ‘<pre>’;print_r($this->_qryProf); die;   $data = array(‘value’=>newZend_Db_Expr(‘value + 1000’));

Get Current Page URL in php

function curPageURL() { $pageURL = ‘http’; if ($_SERVER[“HTTPS”] == “on”) {$pageURL .= “s”;} $pageURL .= “://”; if ($_SERVER[“SERVER_PORT”] != “80”) { $pageURL .= $_SERVER[“SERVER_NAME”].”:”.$_SERVER[“SERVER_PORT”].$_SERVER[“REQUEST_URI”]; } else { $pageURL .= $_SERVER[“SERVER_NAME”].$_SERVER[“REQUEST_URI”]; } return $pageURL; }

Query in Magento

<?php $resource = Mage::getSingleton(‘core/resource’); $readConnection = $resource->getConnection(‘core_read’); $query = ‘SELECT * FROM files where prod_id=’.$file_id; $results = $readConnection->fetchAll($query); if(!empty($results)){ echo “Download Files”; foreach($results as $resultsfile){ ?> <br/><a href=”http://www.infinityinfosystem.com/download.php?filename=<?php echo $resultsfile[‘prod_file’];?>”><?php echo $resultsfile[‘file_title’];?></a> <?php }}?>