0byt3m1n1-V2
Path:
/
home
/
a
/
c
/
a
/
academiac
/
www
/
[
Home
]
File: field.tar
user.php 0000666 00000007333 15137375624 0006262 0 ustar 00 <?php /** * @package Joomla.Libraries * @subpackage Form * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; /** * Field to select a user id from a modal list. * * @package Joomla.Libraries * @subpackage Form * @since 1.6.0 */ class JFormFieldUser extends JFormField { /** * The form field type. * * @var string * @since 1.6.0 */ public $type = 'User'; /** * Method to get the user field input markup. * * @return string The field input markup. * * @since 1.6.0 */ protected function getInput() { // Initialize variables. $html = array(); $groups = $this->getGroups(); $excluded = $this->getExcluded(); $link = 'index.php?option=com_users&view=users&layout=modal&tmpl=component&field=' . $this->id . (isset($groups) ? ('&groups=' . base64_encode(json_encode($groups))) : '') . (isset($excluded) ? ('&excluded=' . base64_encode(json_encode($excluded))) : ''); // Initialize some field attributes. $attr = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : ''; // Initialize JavaScript field attributes. $onchange = (string) $this->element['onchange']; // Load the modal behavior script. JHtml::_('behavior.modal', 'a.modal_' . $this->id); // Build the script. $script = array(); $script[] = ' function jSelectUser_' . $this->id . '(id, title) {'; $script[] = ' var old_id = document.getElementById("' . $this->id . '_id").value;'; $script[] = ' if (old_id != id) {'; $script[] = ' document.getElementById("' . $this->id . '_id").value = id;'; $script[] = ' document.getElementById("' . $this->id . '_name").value = title;'; $script[] = ' ' . $onchange; $script[] = ' }'; $script[] = ' SqueezeBox.close();'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); // Load the current username if available. $table = JTable::getInstance('user'); if ($this->value) { $table->load($this->value); } else { $table->name = JText::_('JLIB_FORM_SELECT_USER'); } // Create a dummy text field with the user name. $html[] = '<div class="fltlft">'; $html[] = ' <input type="text" id="' . $this->id . '_name"' . ' value="' . htmlspecialchars($table->name, ENT_COMPAT, 'UTF-8') . '"' . ' disabled="disabled"' . $attr . ' />'; $html[] = '</div>'; // Create the user select button. $html[] = '<div class="button2-left">'; $html[] = ' <div class="blank">'; if ($this->element['readonly'] != 'true') { $html[] = ' <a class="modal_' . $this->id . '" title="' . JText::_('JLIB_FORM_CHANGE_USER') . '"' . ' href="' . $link . '"' . ' rel="{handler: \'iframe\', size: {x: 800, y: 500}}">'; $html[] = ' ' . JText::_('JLIB_FORM_CHANGE_USER') . '</a>'; } $html[] = ' </div>'; $html[] = '</div>'; // Create the real field, hidden, that stored the user id. $html[] = '<input type="hidden" id="' . $this->id . '_id" name="' . $this->name . '" value="' . (int) $this->value . '" />'; return implode("\n", $html); } /** * Method to get the filtering groups (null means no filtering) * * @return mixed array of filtering groups or null. * * @since 1.6.0 */ protected function getGroups() { return null; } /** * Method to get the users to exclude from the list of users * * @return mixed Array of users to exclude or null to to not exclude them * * @since 1.6.0 */ protected function getExcluded() { return null; } } helpsite.php 0000666 00000002030 15137375624 0007106 0 ustar 00 <?php /** * @package Joomla.Libraries * @subpackage Form * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; jimport('joomla.language.help'); JFormHelper::loadFieldClass('list'); /** * Form Field class for the Joomla Platform. * Provides a select list of help sites. * * @package Joomla.Libraries * @subpackage Form * @since 1.6.0 */ class JFormFieldHelpsite extends JFormFieldList { /** * The form field type. * * @var string * @since 1.6.0 */ public $type = 'Helpsite'; /** * Method to get the help site field options. * * @return array The field option objects. * * @since 1.6.0 */ protected function getOptions() { // Merge any additional options in the XML definition. $options = array_merge(parent::getOptions(), JHelp::createSiteList(JPATH_ADMINISTRATOR . '/help/helpsites.xml', $this->value)); return $options; } } index.html 0000666 00000000037 15137375624 0006562 0 ustar 00 <!DOCTYPE html><title></title> captcha.php 0000666 00000005405 15137375624 0006705 0 ustar 00 <?php /** * @package Joomla.Libraries * @subpackage Form * * @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die; /** * Form Field class for the Joomla Framework. * * @package Joomla.Libraries * @subpackage Form * @since 2.5 */ class JFormFieldCaptcha extends JFormField { /** * The field type. * * @var string */ protected $type = 'Captcha'; /** * Method to attach a JForm object to the field. * * @param SimpleXMLElement &$element The SimpleXMLElement object representing the <field /> tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * * @return boolean True on success. * * @since 2.5 */ public function setup(&$element, $value, $group = null) { $result = parent::setup($element, $value, $group); $plugin = $this->element['plugin'] ? (string) $this->element['plugin'] : JFactory::getApplication()->getParams()->get('captcha', JFactory::getConfig()->get('captcha')); if ($plugin === 0 || $plugin === '0' || $plugin === '' || $plugin === null) { $this->hidden = true; } else { // Force field to be required. There's no reason to have a captcha if it is not required. // Obs: Don't put required="required" in the xml file, you just need to have validate="captcha" $this->required = true; $class = $this->element['class']; if (strpos($class, 'required') === false) { $this->element['class'] = $class . ' required'; } } return $result; } /** * Method to get the field input. * * @return string The field input. * * @since 2.5 */ protected function getInput() { $class = $this->element['class'] ? (string) $this->element['class'] : ''; $plugin = $this->element['plugin'] ? (string) $this->element['plugin'] : JFactory::getApplication()->getParams()->get('captcha', JFactory::getConfig()->get('captcha')); $namespace = $this->element['namespace'] ? (string) $this->element['namespace'] : $this->form->getName(); // Use 0 for none if ($plugin === 0 || $plugin === '0' || $plugin === '' || $plugin === null) { return ''; } else { if (($captcha = JCaptcha::getInstance($plugin, array('namespace' => $namespace))) == null) { return ''; } } return $captcha->display($this->name, $this->id, $class); } } menu.php 0000666 00000002015 15137375624 0006240 0 ustar 00 <?php /** * @package Joomla.Libraries * @subpackage Form * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; JFormHelper::loadFieldClass('list'); // Import the com_menus helper. require_once realpath(JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php'); /** * Supports an HTML select list of menus * * @package Joomla.Libraries * @subpackage Form * @since 1.6.0 */ class JFormFieldMenu extends JFormFieldList { /** * The form field type. * * @var string * @since 1.6.0 */ public $type = 'Menu'; /** * Method to get the list of menus for the field options. * * @return array The field option objects. * * @since 1.6.0 */ protected function getOptions() { // Merge any additional options in the XML definition. $options = array_merge(parent::getOptions(), JHtml::_('menu.menus')); return $options; } } .htaccess 0000666 00000000177 15137375624 0006370 0 ustar 00 <FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>