//function to download all users deatails to csv public function downloadcsvAction() { ob_end_clean(); set_time_limit(0); ini_set(‘memory_limit’, ‘2024M’); $this->_helper->viewRenderer->setNoRender(true); $this->_helper->layout->disableLayout(); $query=Engine_Db_Table::getDefaultAdapter()->select() ->from(‘engine4_users’,array(‘user_id’,’email’,’displayname’,’level_id’,’enabled’,’approved’,’intro_page’,’creation_date’)) ->where(‘user_id <> ?’, 1) ->where(‘user_id not in (?)’, array(‘685′,’870′,’948′,’965′,’1031′,’1249′,’1279′,’1283’)) ->where(‘user_id <> ?’, 6); $aResult= $query->query()->fetchAll(); $fileName = “users_”.time().’.csv’; header(‘Content-Type: application/csv’); header(‘Content-Disposition: attachement; filename=”‘.$fileName.’”‘); $f = fopen(‘php://output’, ‘w’) or show_error(“Can’t open php://output”); $n = 0; $line…
session in socialengine
socialengine basically using zendframework for development. Zendframework methods can see all through the socialengine code. Session is an important functionality in programming. For achieving the session in socialengine use the following code $session = new Zend_Session_Namespace(‘invite’); $session->invite_code = $this->_getParam(‘code’); $session->invite_email = $this->_getParam(’email’);
Manju Warrier kalyan jewellers advertisement
Manju Warrier kalyan advertisement…. Manju Warrier Snaps
call view helper in api or plugin of socialengine
View property is not available in plugin .So call view property using zend and use this for get view helper $view = Zend_Registry::get(‘Zend_View’); $job_status = $view->getJobStatus(‘id’);
How to download or print a page using PHP and javascript
jQuery(‘.payment-print’).live(‘click’, function() { var sUrl = jQuery(‘#base-url’).val() + ‘/jobs/paymentprint/id/’ + jQuery(this ).attr(“id”); jQuery.post(sUrl, function(data){ var HTML = data; var WindowObject = window.open(” “, “PrintWindow”, “width=769,height=601,top=40,left=40,toolbars=no”); WindowObject.document.writeln(HTML); WindowObject.document.close(); WindowObject.focus(); WindowObject.print(); WindowObject.close(); }) });