<?php
class Mygrid extends Zend_Db_Table_Abstract {
protected $_name="plg_posts";
// Mygrid Starts Here
function privacyList($param) {
try
{
$select = $this->select()
->setIntegrityCheck(false)
->from(array('po'=>'viw_privacy_settings'),array('prot_id'=>'privacy_option_id','prot_name'=>'privacy_option'))
->where('privacy_group_id =?',1);
$row = $this->fetchAll($select);
//$row = $row->current(); echo "<pre>"; print_r($row); die;
if(count($row)>0)
{
$view = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('view');
if($view->urls()->reportLogFlag())
{
$obj = new Error();
$aProcess = array( 'LOG_ACTION' =>Zend_Controller_Front::getInstance()->getRequest()->getActionName(),
'LOG_FILE_NAME'=>"Mygrid.php",
'LOG_CLASS_NAME'=>"Storefront_Models_Mygrid",
'LOG_METHOD_NAME'=>'privacyList',
'LOG_INPUT_PARAMS'=>$obj->arrayToString($param),
'LOG_PROCESS'=>'Fetch privacy option list',
'LOG_OUTPUT_PARAMS'=>'',//$obj->arrayToString($row),
'LOG_FILE_PATH'=>$view->urls()->reportPath().'/mygrid/'.Zend_Controller_Front::getInstance()->getRequest()->getActionName().'.log',
'LOG_FILE_MODE'=>'a+'
);
$obj->trackProcess($aProcess);
$obj =NULL;
}
return $row;
}
else
{
$view = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('view');
if($view->urls()->debugLogFlag())
{
$obj = new Error();
$aError = array( 'LOG_ACTION' =>Zend_Controller_Front::getInstance()->getRequest()->getActionName(),
'LOG_STR'=> 'Problem in the Privacy List',
'LOG_DESCRIPTION' => "\n\t Database Error: \n\t Input: ".$obj->arrayToString($param). "\n\t Select ===>". $select . " \n\t Output: NULL ",
'LOG_FILE_NAME'=>"Mygrid.php",
'LOG_CLASS_NAME'=>"Storefront_Models_Mygrid",
'LOG_METHOD_NAME'=>'privacyList',
'LOG_FILE_LINE_NO'=>"16",
'LOG_FILE_PATH'=>$view->urls()->debugPath().'/mygrid/'.Zend_Controller_Front::getInstance()->getRequest()->getActionName().'.log',
'LOG_FILE_MODE'=>'a+'
);
$obj->trackError($aError);
$obj =NULL;
}
}
}
catch (Zend_Exception $e)
{
$view = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('view');
if($view->urls()->debugLogFlag())
{
$obj = new Error();
$aError = array('LOG_ACTION' =>Zend_Controller_Front::getInstance()->getRequest()->getActionName(),
'LOG_STR'=> $e->getMessage(),
'LOG_DESCRIPTION' => "\n\t Database Error: \n\t Input: ".$obj->arrayToString($param). "\n\t Select ===>". $select . " \n\t Output: NULL ",
'LOG_FILE_NAME'=>"Mygrid.php",
'LOG_CLASS_NAME'=>"Storefront_Models_Mygrid",
'LOG_METHOD_NAME'=>'privacyList',
'LOG_FILE_LINE_NO'=>$e->getLine(),
'LOG_FILE_PATH'=>$view->urls()->debugPath().'/mygrid/'.Zend_Controller_Front::getInstance()->getRequest()->getActionName().'.log',
'LOG_FILE_MODE'=>'a+'
);
$obj->trackError($aError);
$obj =NULL;
}
}
}
}
?>
class Mygrid extends Zend_Db_Table_Abstract {
protected $_name="plg_posts";
// Mygrid Starts Here
function privacyList($param) {
try
{
$select = $this->select()
->setIntegrityCheck(false)
->from(array('po'=>'viw_privacy_settings'),array('prot_id'=>'privacy_option_id','prot_name'=>'privacy_option'))
->where('privacy_group_id =?',1);
$row = $this->fetchAll($select);
//$row = $row->current(); echo "<pre>"; print_r($row); die;
if(count($row)>0)
{
$view = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('view');
if($view->urls()->reportLogFlag())
{
$obj = new Error();
$aProcess = array( 'LOG_ACTION' =>Zend_Controller_Front::getInstance()->getRequest()->getActionName(),
'LOG_FILE_NAME'=>"Mygrid.php",
'LOG_CLASS_NAME'=>"Storefront_Models_Mygrid",
'LOG_METHOD_NAME'=>'privacyList',
'LOG_INPUT_PARAMS'=>$obj->arrayToString($param),
'LOG_PROCESS'=>'Fetch privacy option list',
'LOG_OUTPUT_PARAMS'=>'',//$obj->arrayToString($row),
'LOG_FILE_PATH'=>$view->urls()->reportPath().'/mygrid/'.Zend_Controller_Front::getInstance()->getRequest()->getActionName().'.log',
'LOG_FILE_MODE'=>'a+'
);
$obj->trackProcess($aProcess);
$obj =NULL;
}
return $row;
}
else
{
$view = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('view');
if($view->urls()->debugLogFlag())
{
$obj = new Error();
$aError = array( 'LOG_ACTION' =>Zend_Controller_Front::getInstance()->getRequest()->getActionName(),
'LOG_STR'=> 'Problem in the Privacy List',
'LOG_DESCRIPTION' => "\n\t Database Error: \n\t Input: ".$obj->arrayToString($param). "\n\t Select ===>". $select . " \n\t Output: NULL ",
'LOG_FILE_NAME'=>"Mygrid.php",
'LOG_CLASS_NAME'=>"Storefront_Models_Mygrid",
'LOG_METHOD_NAME'=>'privacyList',
'LOG_FILE_LINE_NO'=>"16",
'LOG_FILE_PATH'=>$view->urls()->debugPath().'/mygrid/'.Zend_Controller_Front::getInstance()->getRequest()->getActionName().'.log',
'LOG_FILE_MODE'=>'a+'
);
$obj->trackError($aError);
$obj =NULL;
}
}
}
catch (Zend_Exception $e)
{
$view = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('view');
if($view->urls()->debugLogFlag())
{
$obj = new Error();
$aError = array('LOG_ACTION' =>Zend_Controller_Front::getInstance()->getRequest()->getActionName(),
'LOG_STR'=> $e->getMessage(),
'LOG_DESCRIPTION' => "\n\t Database Error: \n\t Input: ".$obj->arrayToString($param). "\n\t Select ===>". $select . " \n\t Output: NULL ",
'LOG_FILE_NAME'=>"Mygrid.php",
'LOG_CLASS_NAME'=>"Storefront_Models_Mygrid",
'LOG_METHOD_NAME'=>'privacyList',
'LOG_FILE_LINE_NO'=>$e->getLine(),
'LOG_FILE_PATH'=>$view->urls()->debugPath().'/mygrid/'.Zend_Controller_Front::getInstance()->getRequest()->getActionName().'.log',
'LOG_FILE_MODE'=>'a+'
);
$obj->trackError($aError);
$obj =NULL;
}
}
}
}
?>