Created
February 13, 2013 08:59
-
-
Save asika32764/4943196 to your computer and use it in GitHub Desktop.
php Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Joomla.Administrator | |
* @subpackage com_flower | |
* | |
* @copyright Copyright (C) 2012 Asikart. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
* @author Generated by AKHelper - http://asikart.com | |
*/ | |
// no direct access | |
defined('_JEXEC') or die; | |
JHtml::_('behavior.tooltip'); | |
JHtml::_('behavior.formvalidation'); | |
JHtml::_('behavior.keepalive'); | |
FlowerHelper::_('include.core'); | |
$app = JFactory::getApplication() ; | |
JHtml::_('formbehavior.chosen', 'select'); | |
if($app->isSite()){ | |
FlowerHelper::_('include.fixBootstrapToJoomla'); | |
} | |
// Init some API objects | |
// ================================================================================ | |
$date = JFactory::getDate( 'now' , JFactory::getConfig()->get('offset') ) ; | |
$doc = JFactory::getDocument() ; | |
$uri = JFactory::getURI() ; | |
$user = JFactory::getUser() ; | |
// For Site | |
// ================================================================================ | |
if($app->isSite()) { | |
FlowerHelper::_('include.isis'); | |
} | |
// Edit setting | |
// ================================================================================ | |
$tabs = count( $this->fields ) > 1 ? true : false; | |
if($app->isAdmin()) { | |
$span_left = 8 ; | |
$span_right = 4 ; | |
$width_left = 60 ; | |
$width_right= 40 ; | |
}else{ | |
$span_left = 12 ; | |
$span_right = 12 ; | |
$width_left = 100 ; | |
$width_right= 100 ; | |
} | |
?> | |
<script type="text/javascript"> | |
<?php if( $app->isSite() ): ?> | |
Flower.fixToolbar(0, 300) ; | |
<?php endif; ?> | |
Joomla.submitbutton = function(task) | |
{ | |
if (task == 'sakura.cancel' || document.formvalidator.isValid(document.id('sakura-form'))) { | |
Joomla.submitform(task, document.getElementById('sakura-form')); | |
} | |
else { | |
alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>'); | |
} | |
} | |
</script> | |
<form action="<?php echo JRoute::_( JFactory::getURI()->toString() ); ?>" method="post" name="adminForm" id="sakura-form" class="form-validate"> | |
<!-- Tab Buttons --> | |
<ul class="nav nav-tabs"> | |
<?php foreach( $this->fields as $key => $group): ?> | |
<li class="<?php echo $key == 0 ? 'active' : ''; ?>"> | |
<a href="#<?php echo $group; ?>" data-toggle="tab"><?php echo JText::_('COM_FLOWER_EDIT_FIELDS_'.$group); ?></a> | |
</li> | |
<?php endforeach; ?> | |
</ul> | |
<!-- Tab Bodys --> | |
<?php echo $tabs ? FlowerHelper::_('panel.startTabs', 'sakuraTab', array( 'active' => $this->fields[0] ) ) : null ; ?> | |
<?php foreach( $this->fields as $key => $group ): | |
$fieldsets = $this->form->getFieldsets($group) ; | |
echo $tabs ? FlowerHelper::_('panel.addPanel' , 'sakuraTab', JText::_('COM_FLOWER_EDIT_FIELDS_'.$group) , $group ) : null ; | |
?> | |
<div class="row-fluid"> | |
<!-- Left Bar --> | |
<div class="span<?php echo $span_left; ?>"> | |
<?php foreach( $fieldsets as $k => $fieldset ): ?> | |
<?php if( empty($fieldset->align) ) $fieldset->align = 'left' ; ?> | |
<?php if( $fieldset->align == 'right' ) continue; ?> | |
<!-- Fieldset --> | |
<?php $this->current_fieldset = $fieldset; ?> | |
<?php echo $this->loadTemplate('fieldset'); ?> | |
<?php endforeach; ?> | |
</div> | |
<!-- Right Bar --> | |
<div class="span<?php echo $span_right; ?>"> | |
<?php foreach( $fieldsets as $k => $fieldset ): ?> | |
<?php if( empty($fieldset->align) ) $fieldset->align = 'left' ; ?> | |
<?php if( $fieldset->align == 'left' ) continue; ?> | |
<!-- Fieldset --> | |
<?php $this->current_fieldset = $fieldset; ?> | |
<?php echo $this->loadTemplate('fieldset'); ?> | |
<?php endforeach; ?> | |
</div> | |
</div> | |
<div class="clr"></div> | |
<?php echo $tabs ? FlowerHelper::_('panel.endPanel' , 'sakuraTab' , $group ) : null ; ?> | |
<?php endforeach; ?> | |
<?php echo $tabs ? FlowerHelper::_('panel.endTabs' ) : null ; ?> | |
<!-- Hidden Inputs --> | |
<div id="hidden-inputs"> | |
<input type="hidden" name="option" value="com_flower" /> | |
<input type="hidden" name="task" value="" /> | |
<?php echo JHtml::_('form.token'); ?> | |
</div> | |
<div class="clr"></div> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Joomla.Administrator | |
* @subpackage com_flower | |
* | |
* @copyright Copyright (C) 2012 Asikart. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
* @author Generated by AKHelper - http://asikart.com | |
*/ | |
// no direct access | |
defined('_JEXEC') or die; | |
JHtml::_('behavior.tooltip'); | |
JHtml::_('behavior.formvalidation'); | |
JHtml::_('behavior.keepalive'); | |
FlowerHelper::_('include.core'); | |
$app = JFactory::getApplication() ; | |
JHtml::_('formbehavior.chosen', 'select'); | |
if($app->isSite()){ | |
FlowerHelper::_('include.fixBootstrapToJoomla'); | |
} | |
// Init some API objects | |
// ================================================================================ | |
$date = JFactory::getDate( 'now' , JFactory::getConfig()->get('offset') ) ; | |
$doc = JFactory::getDocument() ; | |
$uri = JFactory::getURI() ; | |
$user = JFactory::getUser() ; | |
// For Site | |
// ================================================================================ | |
if($app->isSite()) { | |
FlowerHelper::_('include.isis'); | |
} | |
// Edit setting | |
// ================================================================================ | |
$tabs = count( $this->fields ) > 1 ? true : false; | |
if($app->isAdmin()) { | |
$span_left = 8 ; | |
$span_right = 4 ; | |
$width_left = 60 ; | |
$width_right= 40 ; | |
}else{ | |
$span_left = 12 ; | |
$span_right = 12 ; | |
$width_left = 100 ; | |
$width_right= 100 ; | |
} | |
?> | |
<script type="text/javascript"> | |
<?php if( $app->isSite() ): ?> | |
Flower.fixToolbar(0, 300) ; | |
<?php endif; ?> | |
Joomla.submitbutton = function(task) | |
{ | |
if (task == 'sakura.cancel' || document.formvalidator.isValid(document.id('sakura-form'))) { | |
Joomla.submitform(task, document.getElementById('sakura-form')); | |
} | |
else { | |
alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>'); | |
} | |
} | |
</script> | |
<form action="<?php echo JRoute::_( JFactory::getURI()->toString() ); ?>" method="post" name="adminForm" id="sakura-form" class="form-validate"> | |
<!-- Tab Buttons --> | |
<ul class="nav nav-tabs"> | |
<?php foreach( $this->fields as $key => $group): ?> | |
<li class="<?php echo $key == 0 ? 'active' : ''; ?>"> | |
<a href="#<?php echo $group; ?>" data-toggle="tab"><?php echo JText::_('COM_FLOWER_EDIT_FIELDS_'.$group); ?></a> | |
</li> | |
<?php endforeach; ?> | |
</ul> | |
<!-- Tab Bodys --> | |
<?php echo $tabs ? FlowerHelper::_('panel.startTabs', 'sakuraTab', array( 'active' => $this->fields[0] ) ) : null ; ?> | |
<?php foreach( $this->fields as $key => $group ): | |
$fieldsets = $this->form->getFieldsets($group) ; | |
echo $tabs ? FlowerHelper::_('panel.addPanel' , 'sakuraTab', JText::_('COM_FLOWER_EDIT_FIELDS_'.$group) , $group ) : null ; | |
?> | |
<div class="row-fluid"> | |
<!-- Left Bar --> | |
<div class="span<?php echo $span_left; ?>"> | |
<?php foreach( $fieldsets as $k => $fieldset ): ?> | |
<?php if( empty($fieldset->align) ) $fieldset->align = 'left' ; ?> | |
<?php if( $fieldset->align == 'right' ) continue; ?> | |
<!-- Fieldset --> | |
<?php $this->current_fieldset = $fieldset; ?> | |
<?php echo $this->loadTemplate('fieldset'); ?> | |
<?php endforeach; ?> | |
</div> | |
<!-- Right Bar --> | |
<div class="span<?php echo $span_right; ?>"> | |
<?php foreach( $fieldsets as $k => $fieldset ): ?> | |
<?php if( empty($fieldset->align) ) $fieldset->align = 'left' ; ?> | |
<?php if( $fieldset->align == 'left' ) continue; ?> | |
<!-- Fieldset --> | |
<?php $this->current_fieldset = $fieldset; ?> | |
<?php echo $this->loadTemplate('fieldset'); ?> | |
<?php endforeach; ?> | |
</div> | |
</div> | |
<div class="clr"></div> | |
<?php echo $tabs ? FlowerHelper::_('panel.endPanel' , 'sakuraTab' , $group ) : null ; ?> | |
<?php endforeach; ?> | |
<?php echo $tabs ? FlowerHelper::_('panel.endTabs' ) : null ; ?> | |
<!-- Hidden Inputs --> | |
<div id="hidden-inputs"> | |
<input type="hidden" name="option" value="com_flower" /> | |
<input type="hidden" name="task" value="" /> | |
<?php echo JHtml::_('form.token'); ?> | |
</div> | |
<div class="clr"></div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment