За последние 24 часа нас посетили 22763 программиста и 1224 робота. Сейчас ищут 872 программиста ...

Parse error: syntax error, unexpected T_STATIC, expecting T_

Тема в разделе "PHP и базы данных", создана пользователем Reskator, 24 окт 2015.

  1. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    не работалеть сайт помогиты
    daebrest.by
    Parse error: syntax error, unexpected T_STATIC, expecting T_STRING or T_VARIABLE or '$' in /h/daebrestby/htdocs/libraries/cms/html/behavior.php on line 44

    Код (PHP):
    1. <?php
    2. /**
    3.  * @package     Joomla.Libraries
    4.  * @subpackage  HTML
    5.  *
    6.  * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
    7.  * @license     GNU General Public License version 2 or later; see LICENSE
    8.  */
    9.  
    10. defined('JPATH_PLATFORM') or die;
    11.  
    12. /**
    13.  * Utility class for JavaScript behaviors
    14.  *
    15.  * @package     Joomla.Libraries
    16.  * @subpackage  HTML
    17.  * @since       1.5
    18.  */
    19. abstract class JHtmlBehavior
    20. {
    21.     /**
    22.      * Array containing information for loaded files
    23.      *
    24.      * @var    array
    25.      * @since  2.5
    26.      */
    27.     protected static $loaded = array();
    28.  
    29.     /**
    30.      * Method to load the MooTools framework into the document head
    31.      *
    32.      * If debugging mode is on an uncompressed version of MooTools is included for easier debugging.
    33.      *
    34.      * @param   boolean  $extras  Flag to determine whether to load MooTools More in addition to Core
    35.      * @param   mixed    $debug   Is debugging mode on? [optional]
    36.      *
    37.      * @return  void
    38.      *
    39.      * @since   1.6
    40.      */
    41.     public static function framework($extras = false, $debug = null)
    42.     {
    43.         $type = $extras 'more' : 'core';
    44.         // Only load once
    45.         if (!empty(static::$loaded[__METHOD__][$type]))
    46.         {
    47.             return;
    48.         }
    49.  
    50.         // If no debugging value is set, use the configuration setting
    51.         if ($debug === null)
    52.         {
    53.             $config = JFactory::getConfig();
    54.             $debug = $config->get('debug');
    55.         }
    56.  
    57.         if ($type != 'core' && empty(static::$loaded[__METHOD__]['core']))
    58.         {
    59.             static::framework(false, $debug);
    60.         }
    61.  
    62.         JHtml::_('script', 'system/mootools-' . $type . '.js', false, true, false, false, $debug);
    63.  
    64.         // Keep loading core.js for BC reasons
    65.         static::core();
    66.  
    67.         static::$loaded[__METHOD__][$type] = true;
    68.  
    69.         return;
    70.     }
    71.  
    72.     /**
    73.      * Method to load core.js into the document head.
    74.      *
    75.      * Core.js defines the 'Joomla' namespace and contains functions which are used across extensions
    76.      *
    77.      * @return  void
    78.      *
    79.      * @since   3.3
    80.      */
    81.     public static function core()
    82.     {
    83.         // Only load once
    84.         if (isset(static::$loaded[__METHOD__]))
    85.         {
    86.             return;
    87.         }
    88.  
    89.         JHtml::_('jquery.framework');
    90.         JHtml::_('script', 'system/core.js', false, true);
    91.         static::$loaded[__METHOD__] = true;
    92.  
    93.         return;
    94.     }
    95.  
    96.     /**
    97.      * Add unobtrusive JavaScript support for image captions.
    98.      *
    99.      * @param   string  $selector  The selector for which a caption behaviour is to be applied.
    100.      *
    101.      * @return  void
    102.      *
    103.      * @since   1.5
    104.      */
    105.     public static function caption($selector = 'img.caption')
    106.     {
    107.         // Only load once
    108.         if (isset(static::$loaded[__METHOD__][$selector]))
    109.         {
    110.             return;
    111.         }
    112.  
    113.         // Include jQuery
    114.         JHtml::_('jquery.framework');
    115.  
    116.         JHtml::_('script', 'system/caption.js', false, true);
    117.  
    118.         // Attach caption to document
    119.         JFactory::getDocument()->addScriptDeclaration(
    120.             "jQuery(window).on('load',  function() {
    121.                 new JCaption('" . $selector . "');
    122.             });"
    123.         );
    124.  
    125.         // Set static array
    126.         static::$loaded[__METHOD__][$selector] = true;
    127.     }
    128.  
    129.     /**
    130.      * Add unobtrusive JavaScript support for form validation.
    131.      *
    132.      * To enable form validation the form tag must have class="form-validate".
    133.      * Each field that needs to be validated needs to have class="validate".
    134.      * Additional handlers can be added to the handler for username, password,
    135.      * numeric and email. To use these add class="validate-email" and so on.
    136.      *
    137.      * @return  void
    138.      *
    139.      * @since   1.5
    140.      */
    141.     public static function formvalidation()
    142.     {
    143.         // Only load once
    144.         if (isset(static::$loaded[__METHOD__]))
    145.         {
    146.             return;
    147.         }
    148.  
    149.         // Include MooTools framework
    150.         static::framework();
    151.  
    152.         // Include jQuery Framework
    153.         JHtml::_('jquery.framework');
    154.  
    155.         // Add validate.js language strings
    156.         JText::script('JLIB_FORM_FIELD_INVALID');
    157.  
    158.         JHtml::_('script', 'system/punycode.js', false, true);
    159.         JHtml::_('script', 'system/validate.js', false, true);
    160.         static::$loaded[__METHOD__] = true;
    161.     }
    162.  
    163.     /**
    164.      * Add unobtrusive JavaScript support for submenu switcher support
    165.      *
    166.      * @return  void
    167.      *
    168.      * @since   1.5
    169.      */
    170.     public static function switcher()
    171.     {
    172.         // Only load once
    173.         if (isset(static::$loaded[__METHOD__]))
    174.         {
    175.             return;
    176.         }
    177.  
    178.         // Include jQuery
    179.         JHtml::_('jquery.framework');
    180.  
    181.         JHtml::_('script', 'system/switcher.js', true, true);
    182.  
    183.         $script = "
    184.             document.switcher = null;
    185.             jQuery(function($){
    186.                 var toggler = document.getElementById('submenu');
    187.                 var element = document.getElementById('config-document');
    188.                 if (element) {
    189.                     document.switcher = new JSwitcher(toggler, element);
    190.                 }
    191.             });";
    192.  
    193.         JFactory::getDocument()->addScriptDeclaration($script);
    194.         static::$loaded[__METHOD__] = true;
    195.     }
    196.  
    197.     /**
    198.      * Add unobtrusive JavaScript support for a combobox effect.
    199.      *
    200.      * Note that this control is only reliable in absolutely positioned elements.
    201.      * Avoid using a combobox in a slider or dynamic pane.
    202.      *
    203.      * @return  void
    204.      *
    205.      * @since   1.5
    206.      */
    207.     public static function combobox()
    208.     {
    209.         if (isset(static::$loaded[__METHOD__]))
    210.         {
    211.             return;
    212.         }
    213.         // Include MooTools framework
    214.         static::framework();
    215.  
    216.         JHtml::_('script', 'system/combobox.js', true, true);
    217.         static::$loaded[__METHOD__] = true;
    218.     }
    219.  
    220.     /**
    221.      * Add unobtrusive JavaScript support for a hover tooltips.
    222.      *
    223.      * Add a title attribute to any element in the form
    224.      * title="title::text"
    225.      *
    226.      * Uses the core Tips class in MooTools.
    227.      *
    228.      * @param   string  $selector  The class selector for the tooltip.
    229.      * @param   array   $params    An array of options for the tooltip.
    230.      *                             Options for the tooltip can be:
    231.      *                             - maxTitleChars  integer   The maximum number of characters in the tooltip title (defaults to 50).
    232.      *                             - offsets        object    The distance of your tooltip from the mouse (defaults to {'x': 16, 'y': 16}).
    233.      *                             - showDelay      integer   The millisecond delay the show event is fired (defaults to 100).
    234.      *                             - hideDelay      integer   The millisecond delay the hide hide is fired (defaults to 100).
    235.      *                             - className      string    The className your tooltip container will get.
    236.      *                             - fixed          boolean   If set to true, the toolTip will not follow the mouse.
    237.      *                             - onShow         function  The default function for the show event, passes the tip element
    238.      *                               and the currently hovered element.
    239.      *                             - onHide         function  The default function for the hide event, passes the currently
    240.      *                               hovered element.
    241.      *
    242.      * @return  void
    243.      *
    244.      * @since   1.5
    245.      */
    246.     public static function tooltip($selector = '.hasTip', $params = array())
    247.     {
    248.         $sig = md5(serialize(array($selector, $params)));
    249.  
    250.         if (isset(static::$loaded[__METHOD__][$sig]))
    251.         {
    252.             return;
    253.         }
    254.  
    255.         // Include MooTools framework
    256.         static::framework(true);
    257.  
    258.         // Setup options object
    259.         $opt['maxTitleChars'] = (isset($params['maxTitleChars']) && ($params['maxTitleChars'])) ? (int) $params['maxTitleChars'] : 50;
    260.  
    261.         // Offsets needs an array in the format: array('x'=>20, 'y'=>30)
    262.         $opt['offset']    = (isset($params['offset']) && (is_array($params['offset']))) ? $params['offset'] : null;
    263.         $opt['showDelay'] = (isset($params['showDelay'])) ? (int) $params['showDelay'] : null;
    264.         $opt['hideDelay'] = (isset($params['hideDelay'])) ? (int) $params['hideDelay'] : null;
    265.         $opt['className'] = (isset($params['className'])) ? $params['className'] : null;
    266.         $opt['fixed']     = (isset($params['fixed']) && ($params['fixed'])) ? true : false;
    267.         $opt['onShow']    = (isset($params['onShow'])) ? '\\' . $params['onShow'] : null;
    268.         $opt['onHide']    = (isset($params['onHide'])) ? '\\' . $params['onHide'] : null;
    269.  
    270.         $options = JHtml::getJSObject($opt);
    271.  
    272.         // Include jQuery
    273.         JHtml::_('jquery.framework');
    274.  
    275.         // Attach tooltips to document
    276.         JFactory::getDocument()->addScriptDeclaration(
    277.             "jQuery(function($) {
    278.              $('$selector').each(function() {
    279.                 var title = $(this).attr('title');
    280.                 if (title) {
    281.                     var parts = title.split('::', 2);
    282.                     $(this).data('tip:title', parts[0]);
    283.                     $(this).data('tip:text', parts[1]);
    284.                 }
    285.             });
    286.             var JTooltips = new Tips($('$selector').get(), $options);
    287.         });"
    288.         );
    289.  
    290.         // Set static array
    291.         static::$loaded[__METHOD__][$sig] = true;
    292.  
    293.         return;
    294.     }
    295.  
    296.     /**
    297.      * Add unobtrusive JavaScript support for modal links.
    298.      *
    299.      * @param   string  $selector  The selector for which a modal behaviour is to be applied.
    300.      * @param   array   $params    An array of parameters for the modal behaviour.
    301.      *                             Options for the modal behaviour can be:
    302.      *                            - ajaxOptions
    303.      *                            - size
    304.      *                            - shadow
    305.      *                            - overlay
    306.      *                            - onOpen
    307.      *                            - onClose
    308.      *                            - onUpdate
    309.      *                            - onResize
    310.      *                            - onShow
    311.      *                            - onHide
    312.      *
    313.      * @return  void
    314.      *
    315.      * @since   1.5
    316.      */
    317.     public static function modal($selector = 'a.modal', $params = array())
    318.     {
    319.         $document = JFactory::getDocument();
    320.  
    321.         // Load the necessary files if they haven't yet been loaded
    322.         if (!isset(static::$loaded[__METHOD__]))
    323.         {
    324.             // Include MooTools framework
    325.             static::framework(true);
    326.  
    327.             // Load the JavaScript and css
    328.             JHtml::_('script', 'system/modal.js', true, true);
    329.             JHtml::_('stylesheet', 'system/modal.css', array(), true);
    330.         }
    331.  
    332.         $sig = md5(serialize(array($selector, $params)));
    333.  
    334.         if (isset(static::$loaded[__METHOD__][$sig]))
    335.         {
    336.             return;
    337.         }
    338.  
    339.         // Setup options object
    340.         $opt['ajaxOptions']   = (isset($params['ajaxOptions']) && (is_array($params['ajaxOptions']))) ? $params['ajaxOptions'] : null;
    341.         $opt['handler']       = (isset($params['handler'])) ? $params['handler'] : null;
    342.         $opt['parseSecure']   = (isset($params['parseSecure'])) ? (bool) $params['parseSecure'] : null;
    343.         $opt['closable']      = (isset($params['closable'])) ? (bool) $params['closable'] : null;
    344.         $opt['closeBtn']      = (isset($params['closeBtn'])) ? (bool) $params['closeBtn'] : null;
    345.         $opt['iframePreload'] = (isset($params['iframePreload'])) ? (bool) $params['iframePreload'] : null;
    346.         $opt['iframeOptions'] = (isset($params['iframeOptions']) && (is_array($params['iframeOptions']))) ? $params['iframeOptions'] : null;
    347.         $opt['size']          = (isset($params['size']) && (is_array($params['size']))) ? $params['size'] : null;
    348.         $opt['shadow']        = (isset($params['shadow'])) ? $params['shadow'] : null;
    349.         $opt['overlay']       = (isset($params['overlay'])) ? $params['overlay'] : null;
    350.         $opt['onOpen']        = (isset($params['onOpen'])) ? $params['onOpen'] : null;
    351.         $opt['onClose']       = (isset($params['onClose'])) ? $params['onClose'] : null;
    352.         $opt['onUpdate']      = (isset($params['onUpdate'])) ? $params['onUpdate'] : null;
    353.         $opt['onResize']      = (isset($params['onResize'])) ? $params['onResize'] : null;
    354.         $opt['onMove']        = (isset($params['onMove'])) ? $params['onMove'] : null;
    355.         $opt['onShow']        = (isset($params['onShow'])) ? $params['onShow'] : null;
    356.         $opt['onHide']        = (isset($params['onHide'])) ? $params['onHide'] : null;
    357.  
    358.         // Include jQuery
    359.         JHtml::_('jquery.framework');
    360.  
    361.         if (isset($params['fullScreen']) && (bool) $params['fullScreen'])
    362.         {
    363.             $opt['size']      = array('x' => '\\jQuery(window).width() - 80', 'y' => '\\jQuery(window).height() - 80');
    364.         }
    365.  
    366.         $options = JHtml::getJSObject($opt);
    367.  
    368.         // Attach modal behavior to document
    369.         $document
    370.             ->addScriptDeclaration(
    371.             "
    372.         jQuery(function($) {
    373.             SqueezeBox.initialize(" . $options . ");
    374.             SqueezeBox.assign($('" . $selector . "').get(), {
    375.                 parse: 'rel'
    376.             });
    377.         });"
    378.         );
    379.  
    380.         // Set static array
    381.         static::$loaded[__METHOD__][$sig] = true;
    382.  
    383.         return;
    384.     }
    385.  
    386.     /**
    387.      * JavaScript behavior to allow shift select in grids
    388.      *
    389.      * @param   string  $id  The id of the form for which a multiselect behaviour is to be applied.
    390.      *
    391.      * @return  void
    392.      *
    393.      * @since   1.7
    394.      */
    395.     public static function multiselect($id = 'adminForm')
    396.     {
    397.         // Only load once
    398.         if (isset(static::$loaded[__METHOD__][$id]))
    399.         {
    400.             return;
    401.         }
    402.  
    403.         // Include jQuery
    404.         JHtml::_('jquery.framework');
    405.  
    406.         JHtml::_('script', 'system/multiselect.js', true, true);
    407.  
    408.         // Attach multiselect to document
    409.         JFactory::getDocument()->addScriptDeclaration(
    410.             "window.addEvent('domready', function() {
    411.                 new Joomla.JMultiSelect('" . $id . "');
    412.             });"
    413.         );
    414.  
    415.         // Set static array
    416.         static::$loaded[__METHOD__][$id] = true;
    417.  
    418.         return;
    419.     }
    420.  
    421.     /**
    422.      * Add unobtrusive javascript support for a collapsible tree.
    423.      *
    424.      * @param   string  $id      An index
    425.      * @param   array   $params  An array of options.
    426.      * @param   array   $root    The root node
    427.      *
    428.      * @return  void
    429.      *
    430.      * @since   1.5
    431.      */
    432.     public static function tree($id, $params = array(), $root = array())
    433.     {
    434.         // Include MooTools framework
    435.         static::framework();
    436.  
    437.         JHtml::_('script', 'system/mootree.js', true, true, false, false);
    438.         JHtml::_('stylesheet', 'system/mootree.css', array(), true);
    439.  
    440.         if (isset(static::$loaded[__METHOD__][$id]))
    441.         {
    442.             return;
    443.         }
    444.  
    445.         // Include jQuery
    446.         JHtml::_('jquery.framework');
    447.  
    448.         // Setup options object
    449.         $opt['div']   = (array_key_exists('div', $params)) ? $params['div'] : $id . '_tree';
    450.         $opt['mode']  = (array_key_exists('mode', $params)) ? $params['mode'] : 'folders';
    451.         $opt['grid']  = (array_key_exists('grid', $params)) ? '\\' . $params['grid'] : true;
    452.         $opt['theme'] = (array_key_exists('theme', $params)) ? $params['theme'] : JHtml::_('image', 'system/mootree.gif', '', array(), true, true);
    453.  
    454.         // Event handlers
    455.         $opt['onExpand'] = (array_key_exists('onExpand', $params)) ? '\\' . $params['onExpand'] : null;
    456.         $opt['onSelect'] = (array_key_exists('onSelect', $params)) ? '\\' . $params['onSelect'] : null;
    457.         $opt['onClick']  = (array_key_exists('onClick', $params)) ? '\\' . $params['onClick']
    458.         : '\\function(node){  window.open(node.data.url, node.data.target != null ? node.data.target : \'_self\'); }';
    459.  
    460.         $options = JHtml::getJSObject($opt);
    461.  
    462.         // Setup root node
    463.         $rt['text']     = (array_key_exists('text', $root)) ? $root['text'] : 'Root';
    464.         $rt['id']       = (array_key_exists('id', $root)) ? $root['id'] : null;
    465.         $rt['color']    = (array_key_exists('color', $root)) ? $root['color'] : null;
    466.         $rt['open']     = (array_key_exists('open', $root)) ? '\\' . $root['open'] : true;
    467.         $rt['icon']     = (array_key_exists('icon', $root)) ? $root['icon'] : null;
    468.         $rt['openicon'] = (array_key_exists('openicon', $root)) ? $root['openicon'] : null;
    469.         $rt['data']     = (array_key_exists('data', $root)) ? $root['data'] : null;
    470.         $rootNode = JHtml::getJSObject($rt);
    471.  
    472.         $treeName = (array_key_exists('treeName', $params)) ? $params['treeName'] : '';
    473.  
    474.         $js = '        jQuery(function(){
    475.             tree' . $treeName . ' = new MooTreeControl(' . $options . ',' . $rootNode . ');
    476.             tree' . $treeName . '.adopt(\'' . $id . '\');})';
    477.  
    478.         // Attach tooltips to document
    479.         $document = JFactory::getDocument();
    480.         $document->addScriptDeclaration($js);
    481.  
    482.         // Set static array
    483.         static::$loaded[__METHOD__][$id] = true;
    484.  
    485.         return;
    486.     }
    487.  
    488.     /**
    489.      * Add unobtrusive JavaScript support for a calendar control.
    490.      *
    491.      * @return  void
    492.      *
    493.      * @since   1.5
    494.      */
    495.     public static function calendar()
    496.     {
    497.         // Only load once
    498.         if (isset(static::$loaded[__METHOD__]))
    499.         {
    500.             return;
    501.         }
    502.  
    503.         $document = JFactory::getDocument();
    504.         $tag = JFactory::getLanguage()->getTag();
    505.  
    506.         JHtml::_('stylesheet', 'system/calendar-jos.css', array(' title' => JText::_('JLIB_HTML_BEHAVIOR_GREEN'), ' media' => 'all'), true);
    507.         JHtml::_('script', $tag . '/calendar.js', false, true);
    508.         JHtml::_('script', $tag . '/calendar-setup.js', false, true);
    509.  
    510.         $translation = static::calendartranslation();
    511.  
    512.         if ($translation)
    513.         {
    514.             $document->addScriptDeclaration($translation);
    515.         }
    516.  
    517.         static::$loaded[__METHOD__] = true;
    518.     }
    519.  
    520.     /**
    521.      * Add unobtrusive JavaScript support for a color picker.
    522.      *
    523.      * @return  void
    524.      *
    525.      * @since   1.7
    526.      */
    527.     public static function colorpicker()
    528.     {
    529.         // Only load once
    530.         if (isset(static::$loaded[__METHOD__]))
    531.         {
    532.             return;
    533.         }
    534.  
    535.         // Include jQuery
    536.         JHtml::_('jquery.framework');
    537.  
    538.         JHtml::_('script', 'jui/jquery.minicolors.min.js', false, true);
    539.         JHtml::_('stylesheet', 'jui/jquery.minicolors.css', false, true);
    540.         JFactory::getDocument()->addScriptDeclaration("
    541.                 jQuery(document).ready(function (){
    542.                     jQuery('.minicolors').each(function() {
    543.                         jQuery(this).minicolors({
    544.                             control: jQuery(this).attr('data-control') || 'hue',
    545.                             position: jQuery(this).attr('data-position') || 'right',
    546.                             theme: 'bootstrap'
    547.                         });
    548.                     });
    549.                 });
    550.             "
    551.         );
    552.  
    553.         static::$loaded[__METHOD__] = true;
    554.     }
    555.  
    556.     /**
    557.      * Add unobtrusive JavaScript support for a simple color picker.
    558.      *
    559.      * @return  void
    560.      *
    561.      * @since   3.1
    562.      */
    563.     public static function simplecolorpicker()
    564.     {
    565.         // Only load once
    566.         if (isset(static::$loaded[__METHOD__]))
    567.         {
    568.             return;
    569.         }
    570.  
    571.         // Include jQuery
    572.         JHtml::_('jquery.framework');
    573.  
    574.         JHtml::_('script', 'jui/jquery.simplecolors.min.js', false, true);
    575.         JHtml::_('stylesheet', 'jui/jquery.simplecolors.css', false, true);
    576.         JFactory::getDocument()->addScriptDeclaration("
    577.                 jQuery(document).ready(function (){
    578.                     jQuery('select.simplecolors').simplecolors();
    579.                 });
    580.             "
    581.         );
    582.  
    583.         static::$loaded[__METHOD__] = true;
    584.     }
    585.  
    586.     /**
    587.      * Keep session alive, for example, while editing or creating an article.
    588.      *
    589.      * @return  void
    590.      *
    591.      * @since   1.5
    592.      */
    593.     public static function keepalive()
    594.     {
    595.         // Only load once
    596.         if (isset(static::$loaded[__METHOD__]))
    597.         {
    598.             return;
    599.         }
    600.  
    601.         $config = JFactory::getConfig();
    602.         $lifetime = ($config->get('lifetime') * 60000);
    603.         $refreshTime = ($lifetime <= 60000) ? 30000 : $lifetime - 60000;
    604.  
    605.         // Refresh time is 1 minute less than the liftime assined in the configuration.php file.
    606.  
    607.         // The longest refresh period is one hour to prevent integer overflow.
    608.         if ($refreshTime > 3600000 || $refreshTime <= 0)
    609.         {
    610.             $refreshTime = 3600000;
    611.         }
    612.  
    613.         $document = JFactory::getDocument();
    614.         $script = 'window.setInterval(function(){';
    615.         $script .= 'var r;';
    616.         $script .= 'try{';
    617.         $script .= 'r=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP")';
    618.         $script .= '}catch(e){}';
    619.         $script .= 'if(r){r.open("GET","./",true);r.send(null)}';
    620.         $script .= '},' . $refreshTime . ');';
    621.  
    622.         $document->addScriptDeclaration($script);
    623.         static::$loaded[__METHOD__] = true;
    624.  
    625.         return;
    626.     }
    627.  
    628.     /**
    629.      * Highlight some words via Javascript.
    630.      *
    631.      * @param   array   $terms      Array of words that should be highlighted.
    632.      * @param   string  $start      ID of the element that marks the begin of the section in which words
    633.      *                              should be highlighted. Note this element will be removed from the DOM.
    634.      * @param   string  $end        ID of the element that end this section.
    635.      *                              Note this element will be removed from the DOM.
    636.      * @param   string  $className  Class name of the element highlights are wrapped in.
    637.      * @param   string  $tag        Tag that will be used to wrap the highlighted words.
    638.      *
    639.      * @return  void
    640.      *
    641.      * @since   2.5
    642.      */
    643.     public static function highlighter(array $terms, $start = 'highlighter-start', $end = 'highlighter-end', $className = 'highlight', $tag = 'span')
    644.     {
    645.         $sig = md5(serialize(array($terms, $start, $end)));
    646.  
    647.         if (isset(static::$loaded[__METHOD__][$sig]))
    648.         {
    649.             return;
    650.         }
    651.  
    652.         // Include jQuery
    653.         JHtml::_('jquery.framework');
    654.  
    655.         JHtml::_('script', 'system/highlighter.js', true, true);
    656.  
    657.         $terms = str_replace('"', '\"', $terms);
    658.  
    659.         $document = JFactory::getDocument();
    660.         $document->addScriptDeclaration("
    661.             jQuery(function ($) {
    662.                 var start = document.getElementById('" . $start . "');
    663.                 var end = document.getElementById('" . $end . "');
    664.                 if (!start || !end || !Joomla.Highlighter) {
    665.                     return true;
    666.                 }
    667.                 highlighter = new Joomla.Highlighter({
    668.                     startElement: start,
    669.                     endElement: end,
    670.                     className: '" . $className . "',
    671.                     onlyWords: false,
    672.                     tag: '" . $tag . "'
    673.                 }).highlight([\"" . implode('","', $terms) . "\"]);
    674.                 $(start).remove();
    675.                 $(end).remove();
    676.             });
    677.         ");
    678.  
    679.         static::$loaded[__METHOD__][$sig] = true;
    680.  
    681.         return;
    682.     }
    683.  
    684.     /**
    685.      * Break us out of any containing iframes
    686.      *
    687.      * @return  void
    688.      *
    689.      * @since   1.5
    690.      */
    691.     public static function noframes()
    692.     {
    693.         // Only load once
    694.         if (isset(static::$loaded[__METHOD__]))
    695.         {
    696.             return;
    697.         }
    698.  
    699.         // Include MooTools framework
    700.         static::framework();
    701.  
    702.         // Include jQuery
    703.         JHtml::_('jquery.framework');
    704.  
    705.         $js = "jQuery(function () {if (top == self) {document.documentElement.style.display = 'block'; }" .
    706.             " else {top.location = self.location; }});";
    707.         $document = JFactory::getDocument();
    708.         $document->addStyleDeclaration('html { display:none }');
    709.         $document->addScriptDeclaration($js);
    710.  
    711.         JFactory::getApplication()->setHeader('X-Frame-Options', 'SAMEORIGIN');
    712.  
    713.         static::$loaded[__METHOD__] = true;
    714.     }
    715.  
    716.     /**
    717.      * Internal method to get a JavaScript object notation string from an array
    718.      *
    719.      * @param   array  $array  The array to convert to JavaScript object notation
    720.      *
    721.      * @return  string  JavaScript object notation representation of the array
    722.      *
    723.      * @since       1.5
    724.      * @deprecated  13.3 (Platform) & 4.0 (CMS) - Use JHtml::getJSObject() instead.
    725.      */
    726.     protected static function _getJSObject($array = array())
    727.     {
    728.         JLog::add('JHtmlBehavior::_getJSObject() is deprecated. JHtml::getJSObject() instead..', JLog::WARNING, 'deprecated');
    729.  
    730.         return JHtml::getJSObject($array);
    731.     }
    732.  
    733.     /**
    734.      * Internal method to translate the JavaScript Calendar
    735.      *
    736.      * @return  string  JavaScript that translates the object
    737.      *
    738.      * @since   1.5
    739.      */
    740.     protected static function calendartranslation()
    741.     {
    742.         static $jsscript = 0;
    743.  
    744.         // Guard clause, avoids unnecessary nesting
    745.         if ($jsscript)
    746.         {
    747.             return false;
    748.         }
    749.  
    750.         $jsscript = 1;
    751.  
    752.         // To keep the code simple here, run strings through JText::_() using array_map()
    753.         $callback = array('JText','_');
    754.         $weekdays_full = array_map(
    755.             $callback, array(
    756.                 'SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY'
    757.             )
    758.         );
    759.         $weekdays_short = array_map(
    760.             $callback,
    761.             array(
    762.                 'SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN'
    763.             )
    764.         );
    765.         $months_long = array_map(
    766.             $callback, array(
    767.                 'JANUARY', 'FEBRUARY', 'MARCH', 'APRIL', 'MAY', 'JUNE',
    768.                 'JULY', 'AUGUST', 'SEPTEMBER', 'OCTOBER', 'NOVEMBER', 'DECEMBER'
    769.             )
    770.         );
    771.         $months_short = array_map(
    772.             $callback, array(
    773.                 'JANUARY_SHORT', 'FEBRUARY_SHORT', 'MARCH_SHORT', 'APRIL_SHORT', 'MAY_SHORT', 'JUNE_SHORT',
    774.                 'JULY_SHORT', 'AUGUST_SHORT', 'SEPTEMBER_SHORT', 'OCTOBER_SHORT', 'NOVEMBER_SHORT', 'DECEMBER_SHORT'
    775.             )
    776.         );
    777.  
    778.         // This will become an object in Javascript but define it first in PHP for readability
    779.         $today = " " . JText::_('JLIB_HTML_BEHAVIOR_TODAY') . " ";
    780.         $text = array(
    781.             'INFO'            => JText::_('JLIB_HTML_BEHAVIOR_ABOUT_THE_CALENDAR'),
    782.  
    783.             'ABOUT'            => "DHTML Date/Time Selector\n"
    784.                 . "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"
    785.                 . "For latest version visit: http://www.dynarch.com/projects/calendar/\n"
    786.                 . "Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details."
    787.                 . "\n\n"
    788.                 . JText::_('JLIB_HTML_BEHAVIOR_DATE_SELECTION')
    789.                 . JText::_('JLIB_HTML_BEHAVIOR_YEAR_SELECT')
    790.                 . JText::_('JLIB_HTML_BEHAVIOR_MONTH_SELECT')
    791.                 . JText::_('JLIB_HTML_BEHAVIOR_HOLD_MOUSE'),
    792.  
    793.             'ABOUT_TIME'    => "\n\n"
    794.                 . "Time selection:\n"
    795.                 . "- Click on any of the time parts to increase it\n"
    796.                 . "- or Shift-click to decrease it\n"
    797.                 . "- or click and drag for faster selection.",
    798.  
    799.             'PREV_YEAR'        => JText::_('JLIB_HTML_BEHAVIOR_PREV_YEAR_HOLD_FOR_MENU'),
    800.             'PREV_MONTH'    => JText::_('JLIB_HTML_BEHAVIOR_PREV_MONTH_HOLD_FOR_MENU'),
    801.             'GO_TODAY'        => JText::_('JLIB_HTML_BEHAVIOR_GO_TODAY'),
    802.             'NEXT_MONTH'    => JText::_('JLIB_HTML_BEHAVIOR_NEXT_MONTH_HOLD_FOR_MENU'),
    803.             'SEL_DATE'        => JText::_('JLIB_HTML_BEHAVIOR_SELECT_DATE'),
    804.             'DRAG_TO_MOVE'    => JText::_('JLIB_HTML_BEHAVIOR_DRAG_TO_MOVE'),
    805.             'PART_TODAY'    => $today,
    806.             'DAY_FIRST'        => JText::_('JLIB_HTML_BEHAVIOR_DISPLAY_S_FIRST'),
    807.             'WEEKEND'        => JFactory::getLanguage()->getWeekEnd(),
    808.             'CLOSE'            => JText::_('JLIB_HTML_BEHAVIOR_CLOSE'),
    809.             'TODAY'            => JText::_('JLIB_HTML_BEHAVIOR_TODAY'),
    810.             'TIME_PART'        => JText::_('JLIB_HTML_BEHAVIOR_SHIFT_CLICK_OR_DRAG_TO_CHANGE_VALUE'),
    811.             'DEF_DATE_FORMAT'    => "%Y-%m-%d",
    812.             'TT_DATE_FORMAT'    => JText::_('JLIB_HTML_BEHAVIOR_TT_DATE_FORMAT'),
    813.             'WK'            => JText::_('JLIB_HTML_BEHAVIOR_WK'),
    814.             'TIME'            => JText::_('JLIB_HTML_BEHAVIOR_TIME')
    815.         );
    816.  
    817.         return 'Calendar._DN = ' . json_encode($weekdays_full) . ';'
    818.             . ' Calendar._SDN = ' . json_encode($weekdays_short) . ';'
    819.             . ' Calendar._FD = 0;'
    820.             . ' Calendar._MN = ' . json_encode($months_long) . ';'
    821.             . ' Calendar._SMN = ' . json_encode($months_short) . ';'
    822.             . ' Calendar._TT = ' . json_encode($text) . ';';
    823.     }
    824.  
    825.     /**
    826.      * Add unobtrusive JavaScript support to keep a tab state.
    827.      *
    828.      * Note that keeping tab state only works for inner tabs if in accordance with the following example
    829.      * parent tab = permissions
    830.      * child tab = permission-<identifier>
    831.      *
    832.      * Each tab header "a" tag also should have a unique href attribute
    833.      *
    834.      * @return  void
    835.      *
    836.      * @since   3.2
    837.      */
    838.     public static function tabstate()
    839.     {
    840.         if (isset(self::$loaded[__METHOD__]))
    841.         {
    842.             return;
    843.         }
    844.         // Include jQuery
    845.         JHtml::_('jquery.framework');
    846.         JHtml::_('script', 'system/tabs-state.js', false, true);
    847.         self::$loaded[__METHOD__] = true;
    848.     }
    849. } 
    PHP, JavaScript, SQL и другой код пишите внутри тегов
    Код ( (Unknown Language)):
    1. [b]php][/b]Тут код[b][/[/b][b]code][/b][/color]
     
  2. denis01

    denis01 Суперстар
    Команда форума Модератор

    С нами с:
    9 дек 2014
    Сообщения:
    12.230
    Симпатии:
    1.715
    Адрес:
    Молдова, г.Кишинёв
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    На 44 строке комментарий, странно
     
  3. p@R@dox 55RU

    p@R@dox 55RU Зэк
    [ БАН ]

    С нами с:
    21 май 2014
    Сообщения:
    1.358
    Симпатии:
    7
    Адрес:
    с планеты Ялмез
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    denis01, смотри на 45 строку, там как раз вызов статичной переменной ((:)
     
  4. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    Так что мне сделать чтобы востовет сайт?
     
  5. p@R@dox 55RU

    p@R@dox 55RU Зэк
    [ БАН ]

    С нами с:
    21 май 2014
    Сообщения:
    1.358
    Симпатии:
    7
    Адрес:
    с планеты Ялмез
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    Reskator, а почему вдруг сайт перестал работать? :)
     
  6. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    обновление joomla 2.7 до 3,* и перестал работать.
     
  7. p@R@dox 55RU

    p@R@dox 55RU Зэк
    [ БАН ]

    С нами с:
    21 май 2014
    Сообщения:
    1.358
    Симпатии:
    7
    Адрес:
    с планеты Ялмез
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    а версия php соответствует требованиям joomla 3,* ???
     
  8. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    да 5.4

    Добавлено спустя 4 минуты 48 секунд:
    Re: Parse error: syntax error, unexpected T_STATIC, expecting T_
    http://daebrest.by.chaucer.neolocation.net
    1146 - Table 'daebrestby1.bjtcv_contentitem_tag_map' doesn't exist SQL=SELECT `m`.`tag_id`,`t`.* FROM `bjtcv_contentitem_tag_map` AS m INNER JOIN `bjtcv_tags` AS t ON `m`.`tag_id` = `t`.`id` WHERE `m`.`type_alias` = 'com_content.article' AND `m`.`content_item_id` = 116 AND `t`.`published` = 1 AND t.access IN (1,1)
    Вы не можете посетить текущую страницу по причине:

    просроченная закладка/избранное
    поисковый механизм, у которого просрочен список для этого сайта
    пропущен адрес
    у вас нет права доступа на эту страницу
    Запрашиваемый ресурс не найден.
    В процессе обработки вашего запроса произошла ошибка.
    Пожалуйста, перейдите на одну из следующих страниц:

    Домашняя страница
    Поиск по сайту
    Если проблемы продолжатся, пожалуйста, обратитесь к системному администратору сайта и сообщите об ошибке, описание которой приведено ниже..

    Table 'daebrestby1.bjtcv_contentitem_tag_map' doesn't exist SQL=SELECT `m`.`tag_id`,`t`.* FROM `bjtcv_contentitem_tag_map` AS m INNER JOIN `bjtcv_tags` AS t ON `m`.`tag_id` = `t`.`id` WHERE `m`.`type_alias` = 'com_content.article' AND `m`.`content_item_id` = 116 AND `t`.`published` = 1 AND t.access IN (1,1)
     
  9. p@R@dox 55RU

    p@R@dox 55RU Зэк
    [ БАН ]

    С нами с:
    21 май 2014
    Сообщения:
    1.358
    Симпатии:
    7
    Адрес:
    с планеты Ялмез
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    daebrestby1.bjtcv_contentitem_tag_map нет такой таблицы в БД
     
  10. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    И как мне сделать или откручить?
     
  11. p@R@dox 55RU

    p@R@dox 55RU Зэк
    [ БАН ]

    С нами с:
    21 май 2014
    Сообщения:
    1.358
    Симпатии:
    7
    Адрес:
    с планеты Ялмез
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    лучше отключить связанный с ним модуль, компонент или плагин :)
     
  12. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    Как отключить модуль помогиты?
     
  13. p@R@dox 55RU

    p@R@dox 55RU Зэк
    [ БАН ]

    С нами с:
    21 май 2014
    Сообщения:
    1.358
    Симпатии:
    7
    Адрес:
    с планеты Ялмез
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    через админ-панель, как всегда :)
     
  14. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    http://daebrest.by/administrator/
    Parse error: syntax error, unexpected T_STATIC in /h/daebrestby/htdocs/libraries/cms/html/select.php on line 125

    Добавлено спустя 3 минуты 35 секунд:
    Re: Parse error: syntax error, unexpected T_STATIC, expecting T_
    Код (PHP):
    1. <?php
    2. /**
    3.  * @package     Joomla.Libraries
    4.  * @subpackage  HTML
    5.  *
    6.  * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
    7.  * @license     GNU General Public License version 2 or later; see LICENSE
    8.  */
    9.  
    10. defined('JPATH_PLATFORM') or die;
    11.  
    12. /**
    13.  * Utility class for creating HTML select lists
    14.  *
    15.  * @package     Joomla.Libraries
    16.  * @subpackage  HTML
    17.  * @since       1.5
    18.  */
    19. abstract class JHtmlSelect
    20. {
    21.     /**
    22.      * Default values for options. Organized by option group.
    23.      *
    24.      * @var     array
    25.      * @since   1.5
    26.      */
    27.     static protected $optionDefaults = array(
    28.         'option' => array('option.attr' => null, 'option.disable' => 'disable', 'option.id' => null, 'option.key' => 'value',
    29.             'option.key.toHtml' => true, 'option.label' => null, 'option.label.toHtml' => true, 'option.text' => 'text',
    30.             'option.text.toHtml' => true, 'option.class' => 'class', 'option.onclick' => 'onclick'));
    31.  
    32.     /**
    33.      * Generates a yes/no radio list.
    34.      *
    35.      * @param   string  $name      The value of the HTML name attribute
    36.      * @param   array   $attribs   Additional HTML attributes for the <select> tag
    37.      * @param   string  $selected  The key that is selected
    38.      * @param   string  $yes       Language key for Yes
    39.      * @param   string  $no        Language key for no
    40.      * @param   string  $id        The id for the field
    41.      *
    42.      * @return  string  HTML for the radio list
    43.      *
    44.      * @since   1.5
    45.      * @see     JFormFieldRadio
    46.      */
    47.     public static function booleanlist($name, $attribs = array(), $selected = null, $yes = 'JYES', $no = 'JNO', $id = false)
    48.     {
    49.         $arr = array(JHtml::_('select.option', '0', JText::_($no)), JHtml::_('select.option', '1', JText::_($yes)));
    50.  
    51.         return JHtml::_('select.radiolist', $arr, $name, $attribs, 'value', 'text', (int) $selected, $id);
    52.     }
    53.  
    54.     /**
    55.      * Generates an HTML selection list.
    56.      *
    57.      * @param   array    $data       An array of objects, arrays, or scalars.
    58.      * @param   string   $name       The value of the HTML name attribute.
    59.      * @param   mixed    $attribs    Additional HTML attributes for the <select> tag. This
    60.      *                               can be an array of attributes, or an array of options. Treated as options
    61.      *                               if it is the last argument passed. Valid options are:
    62.      *                               Format options, see {@see JHtml::$formatOptions}.
    63.      *                               Selection options, see {@see JHtmlSelect::options()}.
    64.      *                               list.attr, string|array: Additional attributes for the select
    65.      *                               element.
    66.      *                               id, string: Value to use as the select element id attribute.
    67.      *                               Defaults to the same as the name.
    68.      *                               list.select, string|array: Identifies one or more option elements
    69.      *                               to be selected, based on the option key values.
    70.      * @param   string   $optKey     The name of the object variable for the option value. If
    71.      *                               set to null, the index of the value array is used.
    72.      * @param   string   $optText    The name of the object variable for the option text.
    73.      * @param   mixed    $selected   The key that is selected (accepts an array or a string).
    74.      * @param   mixed    $idtag      Value of the field id or null by default
    75.      * @param   boolean  $translate  True to translate
    76.      *
    77.      * @return  string  HTML for the select list.
    78.      *
    79.      * @since   1.5
    80.      */
    81.     public static function genericlist($data, $name, $attribs = null, $optKey = 'value', $optText = 'text', $selected = null, $idtag = false,
    82.         $translate = false)
    83.     {
    84.         // Set default options
    85.         $options = array_merge(JHtml::$formatOptions, array('format.depth' => 0, 'id' => false));
    86.  
    87.         if (is_array($attribs) && func_num_args() == 3)
    88.         {
    89.             // Assume we have an options array
    90.             $options = array_merge($options, $attribs);
    91.         }
    92.         else
    93.         {
    94.             // Get options from the parameters
    95.             $options['id'] = $idtag;
    96.             $options['list.attr'] = $attribs;
    97.             $options['list.translate'] = $translate;
    98.             $options['option.key'] = $optKey;
    99.             $options['option.text'] = $optText;
    100.             $options['list.select'] = $selected;
    101.         }
    102.  
    103.         $attribs = '';
    104.  
    105.         if (isset($options['list.attr']))
    106.         {
    107.             if (is_array($options['list.attr']))
    108.             {
    109.                 $attribs = JArrayHelper::toString($options['list.attr']);
    110.             }
    111.             else
    112.             {
    113.                 $attribs = $options['list.attr'];
    114.             }
    115.  
    116.             if ($attribs != '')
    117.             {
    118.                 $attribs = ' ' . $attribs;
    119.             }
    120.         }
    121.  
    122.         $id = $options['id'] !== false ? $options['id'] : $name;
    123.         $id = str_replace(array('[', ']'), '', $id);
    124.  
    125.         $baseIndent = str_repeat($options['format.indent'], $options['format.depth']++);
    126.         $html = $baseIndent . '<select' . ($id !== '' ? ' id="' . $id . '"' : '') . ' name="' . $name . '"' . $attribs . '>' . $options['format.eol']
    127.             . static::options($data, $options) . $baseIndent . '</select>' . $options['format.eol'];
    128.  
    129.         return $html;
    130.     }
    131.  
    132.     /**
    133.      * Method to build a list with suggestions
    134.      *
    135.      * @param   array    $data       An array of objects, arrays, or values.
    136.      * @param   string   $optKey     The name of the object variable for the option value. If
    137.      *                               set to null, the index of the value array is used.
    138.      * @param   string   $optText    The name of the object variable for the option text.
    139.      * @param   mixed    $idtag      Value of the field id or null by default
    140.      * @param   boolean  $translate  True to translate
    141.      *
    142.      * @return  string  HTML for the select list
    143.      *
    144.      * @since       3.2
    145.      * @deprecated  4.0  Just create the <datalist> directly instead
    146.      */
    147.     public static function suggestionlist($data, $optKey = 'value', $optText = 'text', $idtag = null, $translate = false)
    148.     {
    149.         // Log deprecated message
    150.         JLog::add(
    151.             'JHtmlSelect::suggestionlist() is deprecated. Create the <datalist> tag directly instead.',
    152.             JLog::WARNING,
    153.             'deprecated'
    154.         );
    155.  
    156.         // Note: $idtag is requried but has to be an optional argument in the funtion call due to argument order
    157.         if (!$idtag)
    158.         {
    159.             throw new InvalidArgumentException('$idtag is a required argument in deprecated JHtmlSelect::suggestionlist');
    160.         }
    161.  
    162.         // Set default options
    163.         $options = array_merge(JHtml::$formatOptions, array('format.depth' => 0, 'id' => false));
    164.  
    165.         // Get options from the parameters
    166.         $options['id'] = $idtag;
    167.         $options['list.attr'] = null;
    168.         $options['list.translate'] = $translate;
    169.         $options['option.key'] = $optKey;
    170.         $options['option.text'] = $optText;
    171.         $options['list.select'] = null;
    172.  
    173.         $id = ' id="' . $idtag . '"';
    174.  
    175.         $baseIndent = str_repeat($options['format.indent'], $options['format.depth']++);
    176.         $html = $baseIndent . '<datalist' . $id . '>' . $options['format.eol']
    177.             . static::options($data, $options) . $baseIndent . '</datalist>' . $options['format.eol'];
    178.  
    179.         return $html;
    180.     }
    181.  
    182.     /**
    183.      * Generates a grouped HTML selection list from nested arrays.
    184.      *
    185.      * @param   array   $data     An array of groups, each of which is an array of options.
    186.      * @param   string  $name     The value of the HTML name attribute
    187.      * @param   array   $options  Options, an array of key/value pairs. Valid options are:
    188.      *                            Format options, {@see JHtml::$formatOptions}.
    189.      *                            Selection options. See {@see JHtmlSelect::options()}.
    190.      *                            group.id: The property in each group to use as the group id
    191.      *                            attribute. Defaults to none.
    192.      *                            group.label: The property in each group to use as the group
    193.      *                            label. Defaults to "text". If set to null, the data array index key is
    194.      *                            used.
    195.      *                            group.items: The property in each group to use as the array of
    196.      *                            items in the group. Defaults to "items". If set to null, group.id and
    197.      *                            group. label are forced to null and the data element is assumed to be a
    198.      *                            list of selections.
    199.      *                            id: Value to use as the select element id attribute. Defaults to
    200.      *                            the same as the name.
    201.      *                            list.attr: Attributes for the select element. Can be a string or
    202.      *                            an array of key/value pairs. Defaults to none.
    203.      *                            list.select: either the value of one selected option or an array
    204.      *                            of selected options. Default: none.
    205.      *                            list.translate: Boolean. If set, text and labels are translated via
    206.      *                            JText::_().
    207.      *
    208.      * @return  string  HTML for the select list
    209.      *
    210.      * @since   1.5
    211.      * @throws  RuntimeException If a group has contents that cannot be processed.
    212.      */
    213.     public static function groupedlist($data, $name, $options = array())
    214.     {
    215.         // Set default options and overwrite with anything passed in
    216.         $options = array_merge(
    217.             JHtml::$formatOptions,
    218.             array('format.depth' => 0, 'group.items' => 'items', 'group.label' => 'text', 'group.label.toHtml' => true, 'id' => false),
    219.             $options
    220.         );
    221.  
    222.         // Apply option rules
    223.         if ($options['group.items'] === null)
    224.         {
    225.             $options['group.label'] = null;
    226.         }
    227.  
    228.         $attribs = '';
    229.  
    230.         if (isset($options['list.attr']))
    231.         {
    232.             if (is_array($options['list.attr']))
    233.             {
    234.                 $attribs = JArrayHelper::toString($options['list.attr']);
    235.             }
    236.             else
    237.             {
    238.                 $attribs = $options['list.attr'];
    239.             }
    240.  
    241.             if ($attribs != '')
    242.             {
    243.                 $attribs = ' ' . $attribs;
    244.             }
    245.         }
    246.  
    247.         $id = $options['id'] !== false ? $options['id'] : $name;
    248.         $id = str_replace(array('[', ']'), '', $id);
    249.  
    250.         // Disable groups in the options.
    251.         $options['groups'] = false;
    252.  
    253.         $baseIndent = str_repeat($options['format.indent'], $options['format.depth']++);
    254.         $html = $baseIndent . '<select' . ($id !== '' ? ' id="' . $id . '"' : '') . ' name="' . $name . '"' . $attribs . '>' . $options['format.eol'];
    255.         $groupIndent = str_repeat($options['format.indent'], $options['format.depth']++);
    256.  
    257.         foreach ($data as $dataKey => $group)
    258.         {
    259.             $label = $dataKey;
    260.             $id = '';
    261.             $noGroup = is_int($dataKey);
    262.  
    263.             if ($options['group.items'] == null)
    264.             {
    265.                 // Sub-list is an associative array
    266.                 $subList = $group;
    267.             }
    268.             elseif (is_array($group))
    269.             {
    270.                 // Sub-list is in an element of an array.
    271.                 $subList = $group[$options['group.items']];
    272.  
    273.                 if (isset($group[$options['group.label']]))
    274.                 {
    275.                     $label = $group[$options['group.label']];
    276.                     $noGroup = false;
    277.                 }
    278.  
    279.                 if (isset($options['group.id']) && isset($group[$options['group.id']]))
    280.                 {
    281.                     $id = $group[$options['group.id']];
    282.                     $noGroup = false;
    283.                 }
    284.             }
    285.             elseif (is_object($group))
    286.             {
    287.                 // Sub-list is in a property of an object
    288.                 $subList = $group->$options['group.items'];
    289.  
    290.                 if (isset($group->$options['group.label']))
    291.                 {
    292.                     $label = $group->$options['group.label'];
    293.                     $noGroup = false;
    294.                 }
    295.  
    296.                 if (isset($options['group.id']) && isset($group->$options['group.id']))
    297.                 {
    298.                     $id = $group->$options['group.id'];
    299.                     $noGroup = false;
    300.                 }
    301.             }
    302.             else
    303.             {
    304.                 throw new RuntimeException('Invalid group contents.', 1);
    305.             }
    306.  
    307.             if ($noGroup)
    308.             {
    309.                 $html .= static::options($subList, $options);
    310.             }
    311.             else
    312.             {
    313.                 $html .= $groupIndent . '<optgroup' . (empty($id) ? '' : ' id="' . $id . '"') . ' label="'
    314.                     . ($options['group.label.toHtml'] ? htmlspecialchars($label, ENT_COMPAT, 'UTF-8') : $label) . '">' . $options['format.eol']
    315.                     . static::options($subList, $options) . $groupIndent . '</optgroup>' . $options['format.eol'];
    316.             }
    317.         }
    318.  
    319.         $html .= $baseIndent . '</select>' . $options['format.eol'];
    320.  
    321.         return $html;
    322.     }
    323.  
    324.     /**
    325.      * Generates a selection list of integers.
    326.      *
    327.      * @param   integer  $start     The start integer
    328.      * @param   integer  $end       The end integer
    329.      * @param   integer  $inc       The increment
    330.      * @param   string   $name      The value of the HTML name attribute
    331.      * @param   mixed    $attribs   Additional HTML attributes for the <select> tag, an array of
    332.      *                              attributes, or an array of options. Treated as options if it is the last
    333.      *                              argument passed.
    334.      * @param   mixed    $selected  The key that is selected
    335.      * @param   string   $format    The printf format to be applied to the number
    336.      *
    337.      * @return  string   HTML for the select list
    338.      *
    339.      * @since   1.5
    340.      */
    341.     public static function integerlist($start, $end, $inc, $name, $attribs = null, $selected = null, $format = '')
    342.     {
    343.         // Set default options
    344.         $options = array_merge(JHtml::$formatOptions, array('format.depth' => 0, 'option.format' => '', 'id' => null));
    345.  
    346.         if (is_array($attribs) && func_num_args() == 5)
    347.         {
    348.             // Assume we have an options array
    349.             $options = array_merge($options, $attribs);
    350.  
    351.             // Extract the format and remove it from downstream options
    352.             $format = $options['option.format'];
    353.             unset($options['option.format']);
    354.         }
    355.         else
    356.         {
    357.             // Get options from the parameters
    358.             $options['list.attr'] = $attribs;
    359.             $options['list.select'] = $selected;
    360.         }
    361.  
    362.         $start = (int) $start;
    363.         $end   = (int) $end;
    364.         $inc   = (int) $inc;
    365.  
    366.         $data = array();
    367.  
    368.         for ($i = $start; $i <= $end; $i += $inc)
    369.         {
    370.             $data[$i] = $format sprintf($format, $i) : $i;
    371.         }
    372.  
    373.         // Tell genericlist() to use array keys
    374.         $options['option.key'] = null;
    375.  
    376.         return JHtml::_('select.genericlist', $data, $name, $options);
    377.     }
    378.  
    379.     /**
    380.      * Create a placeholder for an option group.
    381.      *
    382.      * @param   string  $text     The text for the option
    383.      * @param   string  $optKey   The returned object property name for the value
    384.      * @param   string  $optText  The returned object property name for the text
    385.      *
    386.      * @return  object
    387.      *
    388.      * @deprecated  4.0  Use JHtmlSelect::groupedList()
    389.      * @see     JHtmlSelect::groupedList()
    390.      * @since   1.5
    391.      */
    392.     public static function optgroup($text, $optKey = 'value', $optText = 'text')
    393.     {
    394.         JLog::add('JHtmlSelect::optgroup() is deprecated, use JHtmlSelect::groupedList() instead.', JLog::WARNING, 'deprecated');
    395.  
    396.         // Set initial state
    397.         static $state = 'open';
    398.  
    399.         // Toggle between open and close states:
    400.         switch ($state)
    401.         {
    402.             case 'open':
    403.                 $obj = new stdClass;
    404.                 $obj->$optKey = '<OPTGROUP>';
    405.                 $obj->$optText = $text;
    406.                 $state = 'close';
    407.                 break;
    408.             case 'close':
    409.                 $obj = new stdClass;
    410.                 $obj->$optKey = '</OPTGROUP>';
    411.                 $obj->$optText = $text;
    412.                 $state = 'open';
    413.                 break;
    414.         }
    415.  
    416.         return $obj;
    417.     }
    418.  
    419.     /**
    420.      * Create an object that represents an option in an option list.
    421.      *
    422.      * @param   string   $value    The value of the option
    423.      * @param   string   $text     The text for the option
    424.      * @param   mixed    $optKey   If a string, the returned object property name for
    425.      *                             the value. If an array, options. Valid options are:
    426.      *                             attr: String|array. Additional attributes for this option.
    427.      *                             Defaults to none.
    428.      *                             disable: Boolean. If set, this option is disabled.
    429.      *                             label: String. The value for the option label.
    430.      *                             option.attr: The property in each option array to use for
    431.      *                             additional selection attributes. Defaults to none.
    432.      *                             option.disable: The property that will hold the disabled state.
    433.      *                             Defaults to "disable".
    434.      *                             option.key: The property that will hold the selection value.
    435.      *                             Defaults to "value".
    436.      *                             option.label: The property in each option array to use as the
    437.      *                             selection label attribute. If a "label" option is provided, defaults to
    438.      *                             "label", if no label is given, defaults to null (none).
    439.      *                             option.text: The property that will hold the the displayed text.
    440.      *                             Defaults to "text". If set to null, the option array is assumed to be a
    441.      *                             list of displayable scalars.
    442.      * @param   string   $optText  The property that will hold the the displayed text. This
    443.      *                             parameter is ignored if an options array is passed.
    444.      * @param   boolean  $disable  Not used.
    445.      *
    446.      * @return  object
    447.      *
    448.      * @since   1.5
    449.      */
    450.     public static function option($value, $text = '', $optKey = 'value', $optText = 'text', $disable = false)
    451.     {
    452.         $options = array('attr' => null, 'disable' => false, 'option.attr' => null, 'option.disable' => 'disable', 'option.key' => 'value',
    453.             'option.label' => null, 'option.text' => 'text');
    454.  
    455.         if (is_array($optKey))
    456.         {
    457.             // Merge in caller's options
    458.             $options = array_merge($options, $optKey);
    459.         }
    460.         else
    461.         {
    462.             // Get options from the parameters
    463.             $options['option.key'] = $optKey;
    464.             $options['option.text'] = $optText;
    465.             $options['disable'] = $disable;
    466.         }
    467.  
    468.         $obj = new stdClass;
    469.         $obj->$options['option.key'] = $value;
    470.         $obj->$options['option.text'] = trim($text) ? $text : $value;
    471.  
    472.         /*
    473.          * If a label is provided, save it. If no label is provided and there is
    474.          * a label name, initialise to an empty string.
    475.          */
    476.         $hasProperty = $options['option.label'] !== null;
    477.  
    478.         if (isset($options['label']))
    479.         {
    480.             $labelProperty = $hasProperty $options['option.label'] : 'label';
    481.             $obj->$labelProperty = $options['label'];
    482.         }
    483.         elseif ($hasProperty)
    484.         {
    485.             $obj->$options['option.label'] = '';
    486.         }
    487.  
    488.         // Set attributes only if there is a property and a value
    489.         if ($options['attr'] !== null)
    490.         {
    491.             $obj->$options['option.attr'] = $options['attr'];
    492.         }
    493.  
    494.         // Set disable only if it has a property and a value
    495.         if ($options['disable'] !== null)
    496.         {
    497.             $obj->$options['option.disable'] = $options['disable'];
    498.         }
    499.  
    500.         return $obj;
    501.     }
    502.  
    503.     /**
    504.      * Generates the option tags for an HTML select list (with no select tag
    505.      * surrounding the options).
    506.      *
    507.      * @param   array    $arr        An array of objects, arrays, or values.
    508.      * @param   mixed    $optKey     If a string, this is the name of the object variable for
    509.      *                               the option value. If null, the index of the array of objects is used. If
    510.      *                               an array, this is a set of options, as key/value pairs. Valid options are:
    511.      *                               -Format options, {@see JHtml::$formatOptions}.
    512.      *                               -groups: Boolean. If set, looks for keys with the value
    513.      *                                "<optgroup>" and synthesizes groups from them. Deprecated. Defaults
    514.      *                                true for backwards compatibility.
    515.      *                               -list.select: either the value of one selected option or an array
    516.      *                                of selected options. Default: none.
    517.      *                               -list.translate: Boolean. If set, text and labels are translated via
    518.      *                                JText::_(). Default is false.
    519.      *                               -option.id: The property in each option array to use as the
    520.      *                                selection id attribute. Defaults to none.
    521.      *                               -option.key: The property in each option array to use as the
    522.      *                                selection value. Defaults to "value". If set to null, the index of the
    523.      *                                option array is used.
    524.      *                               -option.label: The property in each option array to use as the
    525.      *                                selection label attribute. Defaults to null (none).
    526.      *                               -option.text: The property in each option array to use as the
    527.      *                               displayed text. Defaults to "text". If set to null, the option array is
    528.      *                               assumed to be a list of displayable scalars.
    529.      *                               -option.attr: The property in each option array to use for
    530.      *                                additional selection attributes. Defaults to none.
    531.      *                               -option.disable: The property that will hold the disabled state.
    532.      *                                Defaults to "disable".
    533.      *                               -option.key: The property that will hold the selection value.
    534.      *                                Defaults to "value".
    535.      *                               -option.text: The property that will hold the the displayed text.
    536.      *                               Defaults to "text". If set to null, the option array is assumed to be a
    537.      *                               list of displayable scalars.
    538.      * @param   string   $optText    The name of the object variable for the option text.
    539.      * @param   mixed    $selected   The key that is selected (accepts an array or a string)
    540.      * @param   boolean  $translate  Translate the option values.
    541.      *
    542.      * @return  string  HTML for the select list
    543.      *
    544.      * @since   1.5
    545.      */
    546.     public static function options($arr, $optKey = 'value', $optText = 'text', $selected = null, $translate = false)
    547.     {
    548.         $options = array_merge(
    549.             JHtml::$formatOptions,
    550.             static::$optionDefaults['option'],
    551.             array('format.depth' => 0, 'groups' => true, 'list.select' => null, 'list.translate' => false)
    552.         );
    553.  
    554.         if (is_array($optKey))
    555.         {
    556.             // Set default options and overwrite with anything passed in
    557.             $options = array_merge($options, $optKey);
    558.         }
    559.         else
    560.         {
    561.             // Get options from the parameters
    562.             $options['option.key'] = $optKey;
    563.             $options['option.text'] = $optText;
    564.             $options['list.select'] = $selected;
    565.             $options['list.translate'] = $translate;
    566.         }
    567.  
    568.         $html = '';
    569.         $baseIndent = str_repeat($options['format.indent'], $options['format.depth']);
    570.  
    571.         foreach ($arr as $elementKey => &$element)
    572.         {
    573.             $attr = '';
    574.             $extra = '';
    575.             $label = '';
    576.             $id = '';
    577.  
    578.             if (is_array($element))
    579.             {
    580.                 $key = $options['option.key'] === null ? $elementKey : $element[$options['option.key']];
    581.                 $text = $element[$options['option.text']];
    582.  
    583.                 if (isset($element[$options['option.attr']]))
    584.                 {
    585.                     $attr = $element[$options['option.attr']];
    586.                 }
    587.  
    588.                 if (isset($element[$options['option.id']]))
    589.                 {
    590.                     $id = $element[$options['option.id']];
    591.                 }
    592.  
    593.                 if (isset($element[$options['option.label']]))
    594.                 {
    595.                     $label = $element[$options['option.label']];
    596.                 }
    597.  
    598.                 if (isset($element[$options['option.disable']]) && $element[$options['option.disable']])
    599.                 {
    600.                     $extra .= ' disabled="disabled"';
    601.                 }
    602.             }
    603.             elseif (is_object($element))
    604.             {
    605.                 $key = $options['option.key'] === null ? $elementKey : $element->$options['option.key'];
    606.                 $text = $element->$options['option.text'];
    607.  
    608.                 if (isset($element->$options['option.attr']))
    609.                 {
    610.                     $attr = $element->$options['option.attr'];
    611.                 }
    612.  
    613.                 if (isset($element->$options['option.id']))
    614.                 {
    615.                     $id = $element->$options['option.id'];
    616.                 }
    617.  
    618.                 if (isset($element->$options['option.label']))
    619.                 {
    620.                     $label = $element->$options['option.label'];
    621.                 }
    622.  
    623.                 if (isset($element->$options['option.disable']) && $element->$options['option.disable'])
    624.                 {
    625.                     $extra .= ' disabled="disabled"';
    626.                 }
    627.  
    628.                 if (isset($element->$options['option.class']) && $element->$options['option.class'])
    629.                 {
    630.                     $extra .= ' class="' . $element->$options['option.class'] . '"';
    631.                 }
    632.  
    633.                 if (isset($element->$options['option.onclick']) && $element->$options['option.onclick'])
    634.                 {
    635.                     $extra .= ' onclick="' . $element->$options['option.onclick'] . '"';
    636.                 }
    637.             }
    638.             else
    639.             {
    640.                 // This is a simple associative array
    641.                 $key = $elementKey;
    642.                 $text = $element;
    643.             }
    644.  
    645.             /*
    646.              * The use of options that contain optgroup HTML elements was
    647.              * somewhat hacked for J1.5. J1.6 introduces the grouplist() method
    648.              * to handle this better. The old solution is retained through the
    649.              * "groups" option, which defaults true in J1.6, but should be
    650.              * deprecated at some point in the future.
    651.              */
    652.  
    653.             $key = (string) $key;
    654.  
    655.             if ($options['groups'] && $key == '<OPTGROUP>')
    656.             {
    657.                 $html .= $baseIndent . '<optgroup label="' . ($options['list.translate'] ? JText::_($text) : $text) . '">' . $options['format.eol'];
    658.                 $baseIndent = str_repeat($options['format.indent'], ++$options['format.depth']);
    659.             }
    660.             elseif ($options['groups'] && $key == '</OPTGROUP>')
    661.             {
    662.                 $baseIndent = str_repeat($options['format.indent'], --$options['format.depth']);
    663.                 $html .= $baseIndent . '</optgroup>' . $options['format.eol'];
    664.             }
    665.             else
    666.             {
    667.                 // If no string after hyphen - take hyphen out
    668.                 $splitText = explode(' - ', $text, 2);
    669.                 $text = $splitText[0];
    670.  
    671.                 if (isset($splitText[1]) && $splitText[1] != "" && !preg_match('/^[\s]+$/', $splitText[1]))
    672.                 {
    673.                     $text .= ' - ' . $splitText[1];
    674.                 }
    675.  
    676.                 if ($options['list.translate'] && !empty($label))
    677.                 {
    678.                     $label = JText::_($label);
    679.                 }
    680.  
    681.                 if ($options['option.label.toHtml'])
    682.                 {
    683.                     $label = htmlentities($label);
    684.                 }
    685.  
    686.                 if (is_array($attr))
    687.                 {
    688.                     $attr = JArrayHelper::toString($attr);
    689.                 }
    690.                 else
    691.                 {
    692.                     $attr = trim($attr);
    693.                 }
    694.  
    695.                 $extra = ($id ' id="' . $id . '"' : '') . ($label ' label="' . $label . '"' : '') . ($attr ' ' . $attr : '') . $extra;
    696.  
    697.                 if (is_array($options['list.select']))
    698.                 {
    699.                     foreach ($options['list.select'] as $val)
    700.                     {
    701.                         $key2 = is_object($val) ? $val->$options['option.key'] : $val;
    702.  
    703.                         if ($key == $key2)
    704.                         {
    705.                             $extra .= ' selected="selected"';
    706.                             break;
    707.                         }
    708.                     }
    709.                 }
    710.                 elseif ((string) $key == (string) $options['list.select'])
    711.                 {
    712.                     $extra .= ' selected="selected"';
    713.                 }
    714.  
    715.                 if ($options['list.translate'])
    716.                 {
    717.                     $text = JText::_($text);
    718.                 }
    719.  
    720.                 // Generate the option, encoding as required
    721.                 $html .= $baseIndent . '<option value="' . ($options['option.key.toHtml'] ? htmlspecialchars($key, ENT_COMPAT, 'UTF-8') : $key) . '"'
    722.                     . $extra . '>';
    723.                 $html .= $options['option.text.toHtml'] ? htmlentities(html_entity_decode($text, ENT_COMPAT, 'UTF-8'), ENT_COMPAT, 'UTF-8') : $text;
    724.                 $html .= '</option>' . $options['format.eol'];
    725.             }
    726.         }
    727.  
    728.         return $html;
    729.     }
    730.  
    731.     /**
    732.      * Generates an HTML radio list.
    733.      *
    734.      * @param   array    $data       An array of objects
    735.      * @param   string   $name       The value of the HTML name attribute
    736.      * @param   string   $attribs    Additional HTML attributes for the <select> tag
    737.      * @param   mixed    $optKey     The key that is selected
    738.      * @param   string   $optText    The name of the object variable for the option value
    739.      * @param   string   $selected   The name of the object variable for the option text
    740.      * @param   boolean  $idtag      Value of the field id or null by default
    741.      * @param   boolean  $translate  True if options will be translated
    742.      *
    743.      * @return  string  HTML for the select list
    744.      *
    745.      * @since   1.5
    746.      */
    747.     public static function radiolist($data, $name, $attribs = null, $optKey = 'value', $optText = 'text', $selected = null, $idtag = false,
    748.         $translate = false)
    749.     {
    750.         reset($data);
    751.  
    752.         if (is_array($attribs))
    753.         {
    754.             $attribs = JArrayHelper::toString($attribs);
    755.         }
    756.  
    757.         $id_text = $idtag $idtag : $name;
    758.  
    759.         $html = '<div class="controls">';
    760.  
    761.         foreach ($data as $obj)
    762.         {
    763.             $k = $obj->$optKey;
    764.             $t = $translate ? JText::_($obj->$optText) : $obj->$optText;
    765.             $id = (isset($obj->id) ? $obj->id : null);
    766.  
    767.             $extra = '';
    768.             $id = $id $obj->id : $id_text . $k;
    769.  
    770.             if (is_array($selected))
    771.             {
    772.                 foreach ($selected as $val)
    773.                 {
    774.                     $k2 = is_object($val) ? $val->$optKey : $val;
    775.  
    776.                     if ($k == $k2)
    777.                     {
    778.                         $extra .= ' selected="selected" ';
    779.                         break;
    780.                     }
    781.                 }
    782.             }
    783.             else
    784.             {
    785.                 $extra .= ((string) $k == (string) $selected ' checked="checked" ' : '');
    786.             }
    787.  
    788.             $html .= "\n\t" . '<label for="' . $id . '" id="' . $id . '-lbl" class="radio">';
    789.             $html .= "\n\t\n\t" . '<input type="radio" name="' . $name . '" id="' . $id . '" value="' . $k . '" ' . $extra
    790.                 . $attribs . ' >' . $t;
    791.             $html .= "\n\t" . '</label>';
    792.         }
    793.  
    794.         $html .= "\n";
    795.         $html .= '</div>';
    796.         $html .= "\n";
    797.  
    798.         return $html;
    799.     }
    800. }
    801.  
     
  15. p@R@dox 55RU

    p@R@dox 55RU Зэк
    [ БАН ]

    С нами с:
    21 май 2014
    Сообщения:
    1.358
    Симпатии:
    7
    Адрес:
    с планеты Ялмез
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    нууу... тут только пальчиками лезть... (((((((((:)
     
  16. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    Помогиты где и как буду пробувать?
     
  17. p@R@dox 55RU

    p@R@dox 55RU Зэк
    [ БАН ]

    С нами с:
    21 май 2014
    Сообщения:
    1.358
    Симпатии:
    7
    Адрес:
    с планеты Ялмез
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    я бы для начало, себе бы на комп перенес сайт, а потом уже смотрел - что с сайтом в инете (:)
     
  18. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    хорошо какую прогу поставеть чтобы на компи запустить сайт
     
  19. p@R@dox 55RU

    p@R@dox 55RU Зэк
    [ БАН ]

    С нами с:
    21 май 2014
    Сообщения:
    1.358
    Симпатии:
    7
    Адрес:
    с планеты Ялмез
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    ну, я под виндой - xampp использую без проблем :)
    https://www.apachefriends.org/ru/index.html найди там версию, что бы с php на сервере и на локалке совпадали (:)
     
  20. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    спасибо скачаю прогу сайт напису
     
  21. p@R@dox 55RU

    p@R@dox 55RU Зэк
    [ БАН ]

    С нами с:
    21 май 2014
    Сообщения:
    1.358
    Симпатии:
    7
    Адрес:
    с планеты Ялмез
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    только что установил себе на комп joomla_3.4.5 - никаких ошибок :)
     
  22. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    а мне что сделать поставеть XAMPP и установет joomla_3.4.5 и скопировать туда мой сайт или как?
     
  23. p@R@dox 55RU

    p@R@dox 55RU Зэк
    [ БАН ]

    С нами с:
    21 май 2014
    Сообщения:
    1.358
    Симпатии:
    7
    Адрес:
    с планеты Ялмез
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    1) установи XAMPP;
    2) попробуй установить у себя joomla_3.4.5;
    3) если всё ОК, то с инета перетащи всё себе на локалку и смотри уже у себя - где, что и как ((:)
     
  24. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    Re: Parse error: syntax error, unexpected T_STATIC, expectin

    спасибо прибувалу копия идоть
     
  25. Reskator

    Reskator Новичок

    С нами с:
    24 окт 2015
    Сообщения:
    25
    Симпатии:
    0
    Код (PHP):
    1. Ошибка
    2. Статический анализ:
    3. Найдено 2 ошибок при анализе.
    4. 1.    Ожидалась закрывающая кавычка '. (near "" at position 4133)
    5. 2.    9 values were expected, but found 2. (near "(" at position 4040)
    6. SQL запрос:  
    7. INSERT INTO `bjtcv_redirect_links` (`id`, `old_url`, `new_url`, `referer`, `comment`, `hits`, `published`, `created_date`, `modified_date`) VALUES (299, 'http://www.daebrest.by/index.php/obshchestvennye-raboty/9-obshchestvennye-raboty/function (){var c=this[0],d=this[1],k=this[2],h=0;var j=Math.max(c,d,k),f=Math.min(c,d,k);var l=j-f;var i=j/255,g=(j!=0)?l/j:0;if(g!=0){var e=(j-c)/l;var b=(j-d)/l;var m=(j-k', '', 'http://www.daebrest.by/index.php/obshchestvennye-raboty/9-obshchestvennye-raboty/7-applikatsiya-solomkoj.html', '', 1, 0, '2013-10-09 19:28:42', '0000-00-00 00:00:00'), (300, 'http://www.daebrest.by/index.php/function Array() { [native code] }', '', 'http://www.daebrest.by/index.php/kontakty.html', '', 1, 0, '2013-10-13 19:45:08', '0000-00-00 00:00:00'), (301, 'http://www.daebrest.by/index.php/function (){return v;}', '', 'http://www.daebrest.by/index.php/kontakty.html', '', 2, 0, '2013-10-13 19:45:08', '0000-00-00 00:00:00'), (302, 'http://www.daebrest.by/index.php/function (){var c=this[0],d=this[1],k=this[2],h=0;var j=Math.max(c,d,k),f=Math.min(c,d,k);var l=j-f;var i=j/255,g=(j!=0)?l/j:0;if(g!=0){var e=(j-c)/l;var b=(j-d)/l;var m=(j-k)/l;if(c==j){h=m-b;}else{if(d==j){h=2+e-m;}else{', '', 'http://www.daebrest.by/index.php/kontakty.html', '', 1, 0, '2013-10-13 19:45:09', '0000-00-00 00:00:00'), (303, 'http://www.daebrest.by:80/index.php?option=com_maianmedia', '', '', '', 1, 0, '2013-10-26 07:06:51', '0000-00-00 00:00:00'), (304, 'http://www.daebrest.by/index.php/i', '', 'http://www.baidu.com', '', 6, 0, '2013-10-29 11:23:18', '0000-00-00 00:00:00'), (305, 'http://daebrest.by/index.php?option=com_user&view=register', '', '', '', 15, 0, '2013-12-23 16:33:12', '0000-00-00 00:00:00'), (306, 'http://www.daebrest.by/index.php?option=com_user&view=register', '', '', '', 9, 0, '2013-12-23 17:24:14', '0000-00-00 00:00:00'), (307, 'http://www.daebrest.by/index.php/iskusstvo-byt-soboj.ht/ml', '', 'http://www.daebrest.by/ml', '', 3, 0, '2013-12-26 01:44:53', '0000-00-00 00:00:00'), (308, 'http://www.daebrest.byhttp//www.daebrest.by/index.php/iskusstvo-byt-soboj.ht/ml', '', 'http://www.daebrest.by/ml', '', 2, 0, '2013-12-26 01:45:12', '0000-00-00 00:00:00'), (309, 'http://daebrest.by/index.php?option=com_user&view=reset&layout=confirm', '', '', '', 1, 0, '2014-01-09 14:29:16', '0000-00-00 00:00:00'), (310, 'http://www.daebrest.by/index.php?option=com_fabrik&c=import&view=import&filetype=csv&table=1', '', '', '', 7, 0, '2014-01-17 14:26:10', '0000-00-00 00:00:00'), (311, 'http://www.daebrest.by/index.php/component/content/article/17-glavnaya/administrator/index.php', '', '', '', 2, 0, '2014-01-21 09:32:58', '0000-00-00 00:00:00'), (312, 'http://daebrest.by/index.php?option=com_community&view=videos&groupid=(select 1 from(select count(*),concat((select username from jos_users where usertype=0x73757065722061646d696e6973747261746f72 limit 0,1),floor(rand(0)*2))x from information_schema.table', '', '', '', 1, 0, '2014-02-13 17:12:51', '0000-00-00 00:00:00'), (313, 'http://www.daebrest.by/index.php/administrator/index.php', '', '', '', 3, 0, '2014-02-21 06:24:49', '0000-00-00 00:00:00'), (314, 'http://daebrest.by/index.php?option=com_fabrik&c=import&view=import&filetype=csv&table=1', '', '', '', 4, 0, '2014-03-10 09:46:20', '0000-00-00 00:00:00'), (315, 'http://daebrest.by/index.php/weblinks-categories?id=\\', '', '', '', 1, 0, '2014-03-11 09:14:24', '0000-00-00 00:00:00'), (316, 'http://daebrest.by/index.php?option=com_tag&controller=tag&task=add&article_id=-260479/*!union*//*!select*/concat(username,0x3a,password,0x3a,usertype)/*!from*/jos_users&tmpl=component', '', '', '', 8, 0, '2014-03-31 09:55:10', '0000-00-00 00:00:00'), (317, 'http://daebrest.by/index.php?option=com_community&view=videos&groupid=(select', '', '', '', 1, 0, '2014-04-01 19:14:29', '0000-00-00 00:00:00'), (318, 'http://www.daebrest.by/index.php/function Array() { [native code]}', '', 'http://www.daebrest.by/index.php/bezbarernaya-sreda.html', '', 1, 0, '2014-04-08 05:17:02', '0000-00-00 00:00:00'), (319, 'http://daebrest.by/index.php/component/content/article/17-glavnaya/function(){return v
    8. Ответ MySQL:  
    9. #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''http://daebrest.by/index.php/component/content/article/17-glavnaya/function(){r' at line 22
    10. [ Назад ]
    Добавлено спустя 29 минут 24 секунды:
    Re: Parse error: syntax error, unexpected T_STATIC, expecting T_
    Error displaying the error page: Application Instantiation Error: Table 'daebrestby1.bjtcv_session' doesn't exist SQL=DELETE FROM `bjtcv_session` WHERE `time` < '1445791557'