<?php



/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: 			*/



// +----------------------------------------------------------------------+



// | PHP version 4/5                                                      |



// +----------------------------------------------------------------------+



// | Copyright (c) 2004-2010 ARMIA INC                                    |



// +----------------------------------------------------------------------+



// | This source file is a part of iScripts VistaCart                     |



// +----------------------------------------------------------------------+



// | Authors: Jipson<jipson.thomas@armiasystems.com>             		  |



// +----------------------------------------------------------------------+



class SentNewsletter extends AppModel



{



   var $name = 'SentNewsletter';

   

exit();

 function index()

 {

   echo "asdsa";

 }

  // var $belongsTo = 'Country'; 



   //Overriding Pagination starts here...

      function paginate($conditions, $fields, $order, $limit, $page = 1, $recursive = null, $extra = array())

	  {										

					print_r($extra);

					if(!isset($extra['passit']['sort']))

					{

						$extra['passit']['page']= 1;

						$extra['passit']['sort']='Order.date';

						$extra['passit']['direction'] ='DESC';

						$order = array($extra['passit']['sort'] => $extra['passit']['direction']);

					}

					else

					{

					  $order = array($extra['passit']['sort'] => $extra['passit']['direction']);		

					}		

					if(isset($extra["joins"]))		 $joins=$extra["joins"]; else  $joins='';

				    if(isset($extra["group"]))		 $group=$extra["group"]; else  $group='';			

					$params = array(

					  'conditions' => $conditions,	

					  'fields' => $fields, 

					  'order' => $order,

					  'limit' => $limit,

					  'joins' => $joins,

					  'page' => $page,

					  'group' => $group,	

					  'passit' => $extra['passit'],	  	 

					);		

					return $this->find('all', $params);		

         }



			function paginateCount($conditions = null, $recursive = 0, $extra = array()) 

			{

				 if(isset($extra["joins"]))		 $joins=$extra["joins"]; else  $joins='';

				 if(isset($extra["group"]))		 $group=$extra["group"]; else  $group='';

				 $params = array(

					  'conditions' => $conditions,	

					  'fields' => '',					 			  

					  'joins' =>  $joins,					 

					  'group' => $group,		  	 

					);		

					return count($this->find('all', $params));	

			}

        //Overriding Pagination starts here...

   



}



?>