function display()
 {
     switch (JRequest::getVar('view')) {
         case "testimonials":
             JRequest::setVar('view', 'eztestimonials');
             break;
         case "edit":
             JRequest::setVar('view', 'editbox');
             break;
         default:
             JRequest::setVar('view', 'eztestimonials');
     }
     switch (JRequest::getVar('task')) {
         case "remove":
             AdminTestimonController::delete();
             break;
         case "unpublish":
             AdminTestimonController::unpublish();
             break;
         case "publish":
             AdminTestimonController::publish();
             break;
         case "save":
             AdminTestimonController::saveEdit();
             break;
     }
     parent::display();
 }
Пример #2
0
        
        <?php 
    $k = 1 - $k;
}
?>
<tfoot><tr><td colspan="9" align="center"><div class="pagination"><?php 
echo $this->pagination->getListFooter();
?>
</div></td></tr></tfoot>
    </table>
</div>
 
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="filter_order" value="<?php 
echo $listOrder;
?>
" />
		<input type="hidden" name="filter_order_Dir" value="<?php 
echo $listDirn;
?>
" />
		<?php 
echo JHtml::_('form.token');
?>

 
</form>
<?php 
echo AdminTestimonController::GetCredit();
Пример #3
0
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
$document->addStyleSheet('components/com_testimonial/assets/css/formstyle.css');
$validScripts = '
	function isInt(val)
	{var intRegex = /^\\d+$/;
	if(intRegex.test(val)) {return true;}else{return false;}
	}
	function chkRtng()
	{
		var rtng =  $(\'jform_ratingx\').value;
		if(rtng>5||rtng<0 ||isInt(rtng)==false) $(\'jform_ratingx\').value=\'5\';
	}
	';
$document->addScriptDeclaration($validScripts);
?>


<form enctype="multipart/form-data" onsubmit="chkRtng()" class="form-validate" id="user-form" name="adminForm" method="post" action="">
<?php 
echo AdminTestimonController::editBox();
?>

<?php 
echo JHTML::_('form.token');
?>

<input type="hidden" name="view" value="edit" />
<input type="hidden" name="task" value="save" />
<input type="hidden" name="option" value="com_eztestimonial" />
</form>