Открывается другой сайт!!

Тема в разделе "Перенос Joomla на хостинг и проблемы с хостингом", создана пользователем dimonsk, 16.11.2012.

  1. Offline

    dimonsk Пользователь

    Регистрация:
    23.09.2011
    Сообщения:
    136
    Симпатии:
    0
    Пол:
    Мужской
    я ничего не нашел в нем интересного...

    Код (PHP):
    1. <?php
    2. /*
    3. # ------------------------------------------------------------------------
    4. # JA Kyanite II - Version 1.1 - Licence Owner JA49652
    5. # ------------------------------------------------------------------------
    6. # Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
    7. # @license - Copyrighted Commercial Software
    8. # Author: J.O.O.M Solutions Co., Ltd
    9. # Websites:  http://www.joomlart.com -  http://www.joomlancers.com
    10. # This file may not be redistributed in whole or significant part.
    11. # ------------------------------------------------------------------------
    12. */
    13.  
    14. define ('JA_TOOL_COLOR', 'ja_color');
    15. define ('JA_TOOL_SCREEN', 'ja_screen');
    16. define ('JA_TOOL_FONT', 'ja_font');
    17. define ('JA_TOOL_MENU', 'ja_menu');
    18.  
    19. require_once (dirname(__FILE__).DS.'ja.obj.extendable.php');
    20.  
    21. class JATemplateHelper extends ObjectExtendable {
    22.     function JATemplateHelper ($template, $_params_cookie=null) {
    23.         $helper = new JATemplateHelper1 ($template, $_params_cookie);
    24.         $this->_extend (array($template, $helper));
    25.     }
    26.    
    27.     function &getInstance($template=null, $_params_cookie=null)
    28.     {
    29.         static $instance;
    30.  
    31.         if (!isset( $instance )) {
    32.             $instance = new JATemplateHelper ($template, $_params_cookie);
    33.         }
    34.        
    35.         return $instance;
    36.     }
    37.    
    38.     function display ($layout) {
    39.         $this->_load ($layout);
    40.     }
    41.    
    42.     function _load ($layout) {
    43.         if (($layoutpath = $this->layout_exists ($layout))) {
    44.             include ($layoutpath);
    45.         }
    46.     }
    47.  
    48.     function _display ($layout) {
    49.         $tmplTools = JATemplateHelper::getInstance();
    50.         $tmplTools->display ($layout);
    51.     }
    52.    
    53.     function loadBlock ($name) {
    54.         $this->_load ('blocks'.DS.$name);
    55.     }  
    56.    
    57.     //Override template countModules function: prevent empty count.
    58.     function countModules ($modules) {
    59.         return $modules?$this->_tpl->countModules ($modules):0;
    60.     }
    61.    
    62. }
    63.  
    64. class JATemplateHelper1 {
    65.     var $_params_cookie = null; //Params will store in cookie for user select. Default: store all params
    66.     var $_tpl = null;
    67.     var $template = '';
    68.     var $_positions = null;
    69.     var $_colwidth = null;
    70.     var $_basewidth = 10;
    71.  
    72.     function JATemplateHelper1 ($template, $_params_cookie=null) {
    73.         //$this->_extend ($template);
    74.        
    75.         $this->_tpl = $template;
    76.         $this->template = $template->template;
    77.  
    78.         if(!$_params_cookie) {
    79.             $this->_params_cookie = $this->_tpl->params->toArray();
    80.         } else {
    81.             foreach ($_params_cookie as $k) {
    82.                 $this->_params_cookie[$k] = $this->_tpl->params->get($k);
    83.             }
    84.         }
    85.         $this->getUserSetting();
    86.  
    87.         $this->_colwidth = array();
    88.         $this->_positions = array();
    89.     }
    90.    
    91.     function &getInstance1($template=null, $_params_cookie=null)
    92.     {
    93.         static $instance;
    94.  
    95.         if (!isset( $instance )) {
    96.             $instance = new JATemplateHelper1 ($template, $_params_cookie);
    97.         }
    98.        
    99.         return $instance;
    100.     }
    101.    
    102.     function getUserSetting(){
    103.         $exp = time() + 60*60*24*355;
    104.         if (isset($_COOKIE[$this->template.'_tpl']) && $_COOKIE[$this->template.'_tpl'] == $this->template){
    105.             foreach($this->_params_cookie as $k=>$v) {
    106.                 $kc = $this->template."_".$k;
    107.                 if (JRequest::getVar($k, null, 'GET') !== null) {
    108.                     $v = preg_replace('/[\x00-\x1F\x7F<>;\/\"\'%()]/', '', JRequest::getString($k, '', 'GET'));
    109.                     setcookie ($kc, $v, $exp, '/');
    110.                 }else{
    111.                     if (isset($_COOKIE[$kc])){
    112.                         $v = $_COOKIE[$kc];
    113.                     }
    114.                 }
    115.                 $this->setParam($k, $v);
    116.             }
    117.  
    118.         }else{
    119.             setcookie ($this->template.'_tpl', $this->template, $exp, '/');
    120.         }
    121.         return $this;
    122.     }
    123.  
    124.     function getParam ($param, $default='', $raw=false) {
    125.         if (isset($this->_params_cookie[$param])) {
    126.             if ($raw) return $this->_params_cookie[$param];
    127.             else return preg_replace('/[\x00-\x1F\x7F<>;\/\"\'%()]/', '', $this->_params_cookie[$param]);
    128.         }
    129.         if ($raw) $this->_tpl->params->get($param, $default);
    130.         return preg_replace('/[\x00-\x1F\x7F<>;\/\"\'%()]/', '', $this->_tpl->params->get($param, $default));
    131.     }
    132.  
    133.     function setParam ($param, $value) {
    134.         $this->_params_cookie[$param] = $value;
    135.     }
    136.  
    137.     function getCurrentURL(){
    138.         $cururl = JRequest::getURI();
    139.         if(($pos = strpos($cururl, "index.php"))!== false){
    140.             $cururl = substr($cururl,$pos);
    141.         }
    142.         $cururl =  JRoute::_($cururl, true, 0);
    143.         return $cururl;
    144.     }
    145.  
    146.     function genToolMenu($_array_tools=null, $imgext = 'gif'){
    147.         if(!is_array($_array_tools)) $_array_tools = array($_array_tools);
    148.         if(!$_array_tools) $_array_tools = array_keys($this->_params_cookie);
    149.         if (in_array(JA_TOOL_FONT, $_array_tools)){//show font tools
    150.         ?>
    151.         <ul class="ja-usertools-font">
    152.           <li><img style="cursor: pointer;" title="<?php echo JText::_('Increase font size');?>" src="<?php echo $this->templateurl();?>/images/user-increase.<?php echo $imgext;?>" alt="<?php echo JText::_('Increase font size');?>" id="ja-tool-increase" onclick="switchFontSize('<?php echo $this->template."_".JA_TOOL_FONT;?>','inc'); return false;" /></li>
    153.           <li><img style="cursor: pointer;" title="<?php echo JText::_('Default font size');?>" src="<?php echo $this->templateurl();?>/images/user-reset.<?php echo $imgext;?>" alt="<?php echo JText::_('Default font size');?>" id="ja-tool-reset" onclick="switchFontSize('<?php echo $this->template."_".JA_TOOL_FONT;?>',<?php echo $this->_tpl->params->get(JA_TOOL_FONT);?>); return false;" /></li>
    154.           <li><img style="cursor: pointer;" title="<?php echo JText::_('Decrease font size');?>" src="<?php echo $this->templateurl();?>/images/user-decrease.<?php echo $imgext;?>" alt="<?php echo JText::_('Decrease font size');?>" id="ja-tool-decrease" onclick="switchFontSize('<?php echo $this->template."_".JA_TOOL_FONT;?>','dec'); return false;" /></li>
    155.         </ul>
    156.         <script type="text/javascript">var CurrentFontSize=parseInt('<?php echo $this->getParam(JA_TOOL_FONT);?>');</script>
    157.         <?php
    158.         }
    159.     }
    160.  
    161.     function getCurrentMenuIndex(){
    162.         $Itemid = JRequest::getInt( 'Itemid');
    163.         $database       =& JFactory::getDBO();
    164.         $id = $Itemid;
    165.         $menutype = 'mainmenu';
    166.         $ordering = '0';
    167.         while (1){
    168.             $sql = "select parent, menutype, ordering from #__menu where id = $id limit 1";
    169.             $database->setQuery($sql);
    170.             $row = null;
    171.             $row = $database->loadObject();
    172.             if ($row) {
    173.                 $menutype = $row->menutype;
    174.                 $ordering = $row->ordering;
    175.                 if ($row->parent > 0)
    176.                 {
    177.                     $id = $row->parent;
    178.                 }else break;
    179.             }else break;
    180.         }
    181.  
    182.         $user   =& JFactory::getUser();
    183.         if (isset($user))
    184.         {
    185.             $aid = $user->get('aid', 0);
    186.             $sql = "SELECT count(*) FROM #__menu AS m"
    187.             . "\nWHERE menutype='". $menutype ."' AND published='1' AND access <= '$aid' AND parent=0 and ordering < $ordering";
    188.         } else {
    189.             $sql = "SELECT count(*) FROM #__menu AS m"
    190.             . "\nWHERE menutype='". $menutype ."' AND published='1' AND parent=0 and ordering < $ordering";
    191.         }
    192.         $database->setQuery($sql);
    193.  
    194.         return $database->loadResult();
    195.     }
    196.  
    197.     function calSpotlight ($spotlight, $totalwidth=100, $firstwidth=0) {
    198.  
    199.         /********************************************
    200.         $spotlight = array ('position1', 'position2',...)
    201.         *********************************************/
    202.         $modules = array();
    203.         $modules_s = array();
    204.         foreach ($spotlight as $position) {
    205.             if( $this->_tpl->countModules ($position) ){
    206.                 $modules_s[] = $position;
    207.             }
    208.             $modules[$position] = array('class'=>'-full', 'width'=>$totalwidth);
    209.         }
    210.  
    211.         if (!count($modules_s)) return null;
    212.  
    213.         if ($firstwidth) {
    214.             if (count($modules_s)>1) {
    215.                 $width = round(($totalwidth-$firstwidth)/(count($modules_s)-1),1) . "%";
    216.                 $firstwidth = $firstwidth . "%";
    217.             }else{
    218.                 $firstwidth = $totalwidth . "%";
    219.             }
    220.         }else{
    221.             $width = round($totalwidth/(count($modules_s)),1) . "%";
    222.             $firstwidth = $width;
    223.         }
    224.  
    225.         if (count ($modules_s) > 1){
    226.             $modules[$modules_s[0]]['class'] = "-left";
    227.             $modules[$modules_s[0]]['width'] = $firstwidth;
    228.             $modules[$modules_s[count ($modules_s) - 1]]['class'] = "-right";
    229.             $modules[$modules_s[count ($modules_s) - 1]]['width'] = $width;
    230.             for ($i=1; $i<count ($modules_s) - 1; $i++){
    231.                 $modules[$modules_s[$i]]['class'] = "-center";
    232.                 $modules[$modules_s[$i]]['width'] = $width;
    233.             }
    234.         }
    235.         return $modules;
    236.     }
    237.  
    238.     function isIE6 () {
    239.         $msie='/msie\s(5\.[5-9]|[6]\.[0-9]*).*(win)/i';
    240.         return isset($_SERVER['HTTP_USER_AGENT']) &&
    241.             preg_match($msie,$_SERVER['HTTP_USER_AGENT']) &&
    242.             !preg_match('/opera/i',$_SERVER['HTTP_USER_AGENT']);
    243.     }
    244.    
    245.     function isIE () {
    246.         $msie='/msie/i';
    247.         return isset($_SERVER['HTTP_USER_AGENT']) &&
    248.             preg_match($msie,$_SERVER['HTTP_USER_AGENT']) &&
    249.             !preg_match('/opera/i',$_SERVER['HTTP_USER_AGENT']);
    250.     }
    251.  
    252.     function isOP () {
    253.         return isset($_SERVER['HTTP_USER_AGENT']) &&
    254.             preg_match('/opera/i',$_SERVER['HTTP_USER_AGENT']);
    255.     }
    256.  
    257.  
    258.     function getRandomImage ($img_folder) {
    259.         if (!is_dir ($img_folder)) return '';
    260.         $imglist=array();
    261.  
    262.         mt_srand((double)microtime()*1000);
    263.  
    264.         //use the directory class
    265.         $imgs = dir($img_folder);
    266.  
    267.         //read all files from the  directory, checks if are images and ads them to a list (see below how to display flash banners)
    268.         while ($file = $imgs->read()) {
    269.             if (eregi("gif", $file) || eregi("jpg", $file) || eregi("png", $file))
    270.                 $imglist[] = $file;
    271.         }
    272.         closedir($imgs->handle);
    273.  
    274.         if(!count($imglist)) return '';
    275.  
    276.         //generate a random number between 0 and the number of images
    277.         $random = mt_rand(0, count($imglist)-1);
    278.         $image = $imglist[$random];
    279.  
    280.         return $image;
    281.     }
    282.  
    283.     function isFrontPage(){
    284.         return (JRequest::getCmd( 'view' ) == 'frontpage') ;
    285.     }
    286.  
    287.     function sitename() {
    288.         $config = new JConfig();
    289.         return $config->sitename;
    290.     }
    291.  
    292.     function browser () {
    293.         $agent = $_SERVER['HTTP_USER_AGENT'];
    294.         if ( strpos($agent, 'Gecko') )
    295.         {
    296.            if ( strpos($agent, 'Netscape') )
    297.            {
    298.              $browser = 'NS';
    299.            }
    300.            else if ( strpos($agent, 'Firefox') )
    301.            {
    302.              $browser = 'FF';
    303.            }
    304.            else
    305.            {
    306.              $browser = 'Moz';
    307.            }
    308.         }
    309.         else if ( strpos($agent, 'MSIE') && !preg_match('/opera/i',$agent) )
    310.         {
    311.              $msie='/msie\s(7|8\.[0-9]).*(win)/i';
    312.              if (preg_match($msie,$agent)) $browser = 'IE7';
    313.              else $browser = 'IE6';
    314.         }
    315.         else if ( preg_match('/opera/i',$agent) )
    316.         {
    317.              $browser = 'OPE';
    318.         }
    319.         else
    320.         {
    321.            $browser = 'Others';
    322.         }
    323.         return $browser;
    324.     }
    325.  
    326.     function baseurl(){
    327.         return JURI::base();
    328.     }
    329.  
    330.     function templateurl(){
    331.         return JURI::base()."templates/".$this->template;
    332.     }
    333.  
    334.     function basepath(){
    335.         return JPATH_SITE;
    336.     }
    337.  
    338.     function templatepath(){
    339.         return $this->basepath().DS."templates".DS.$this->template;
    340.     }
    341.        
    342.     function getLayout () {
    343.         global $Itemid;
    344.         if (($mobile = $this->mobile_device_detect_layout())) {
    345.            
    346.             // if agent is Iphone
    347.             if( $mobile == 'iphone' ) {
    348.                 $iphone = $this->_tpl->params->get ( 'iphone_layout', $mobile );
    349.                 if ( $iphone != -1 && $this->layout_exists ($iphone) ) {
    350.                     return $iphone;
    351.                 }
    352.             }
    353.             // Other Handheld device
    354.             $handheld = $this->_tpl->params->get ( 'other_handheld_layout', 'handheld' );
    355.             if ( $handheld !=- 1 && $this->layout_exists ($handheld)) {
    356.                 return $handheld;
    357.             }
    358.    
    359.             // auto dectect and choose layout with this device
    360.             if (($mobile = $this->mobile_device_detect())) {
    361.                 if ($this->layout_exists ($mobile)) return $mobile;
    362.                 if ($this->layout_exists ('handheld')) return 'handheld';
    363.             }
    364.         }
    365.        
    366.         $layout = $this->getParam ('main_layout', 'default');
    367.        
    368.         $page_layouts = $this->_tpl->params->get ('page_layouts');
    369.        
    370.         $page_layouts = str_replace ("<br />", "\n", $page_layouts);
    371.        
    372.         $playouts = new JParameter ($page_layouts);
    373.        
    374.         $playout = $playouts->get($Itemid);
    375.         if ($this->layout_exists ($playout)) return $playout;
    376.         if ($this->layout_exists ($layout)) return $layout;
    377.         if ($this->layout_exists ('default')) return 'default';
    378.         return null;
    379.     }
    380.    
    381.     function mobile_device_detect () {
    382.         require_once ('mobile_device_detect.php');
    383.         //bypass special browser:
    384.         $special = array('jigs', 'w3c ', 'w3c-', 'w3c_');      
    385.         if (in_array(strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,4)), $special)) return false;
    386.         return mobile_device_detect('iphone','android','opera','blackberry','palm','windows');
    387.     }
    388.    
    389.     function mobile_device_detect_layout () {
    390.         $ui = $this->getParam('ui');
    391.         return $ui=='desktop'?false:(($ui=='mobile' && !$this->mobile_device_detect())?'iphone':$this->mobile_device_detect());
    392.     }
    393.            
    394.     function layout_exists ($layout) {
    395.         $layoutpath = $this->templatepath().DS.'layouts';
    396.         if(is_file ($layoutpath.DS.$layout.'.php')) return $layoutpath.DS.$layout.'.php';
    397.         return false;
    398.     }
    399.  
    400.     function loadMenu ($params = null, $menutype = '') {
    401.         static $jamenu;
    402.         if (!isset($jamenu)) {
    403.             if (!$menutype) $menutype = $this->getParam(JA_TOOL_MENU, 'css');
    404.             if ($this->mobile_device_detect_layout()) {
    405.                 $mobile = $this->getLayout ();
    406.                 if (is_file(dirname(__FILE__).DS.'menu'.DS."$mobile.class.php")) $menutype = $mobile;
    407.                 else $menutype = 'handheld';
    408.             }
    409.             $file = dirname(__FILE__).DS.'menu'.DS."$menutype.class.php";
    410.             if (!is_file ($file)) return null;
    411.             require_once ($file);
    412.             $menuclass = "JAMenu{$menutype}";
    413.             $jamenu = new $menuclass ($params);
    414.             //check css/js file
    415.             $file = $this->templatepath().DS.'css'.DS.'menu'.DS."$menutype.css";
    416.             if (is_file ($file)) $jamenu->_css = $this->templateurl()."/css/menu/$menutype.css";
    417.             $file = $this->templatepath().DS.'js'.DS.'menu'.DS."$menutype.js";
    418.             if (is_file ($file)) $jamenu->_js = $this->templateurl()."/js/menu/$menutype.js";
    419.         }
    420.         return $jamenu;
    421.     }
    422.    
    423.     function hasSubmenu () {
    424.         $jamenu = $this->loadMenu();
    425.         if ($jamenu && $jamenu->hasSubMenu (1) && $jamenu->showSeparatedSub ) return true;
    426.         return false;
    427.     }
    428.  
    429.     function getSectionId ($catid) {
    430.         $db     =& JFactory::getDBO();
    431.         $query = "SELECT section FROM #__categories WHERE id=$catid;";
    432.         $db->setQuery($query);
    433.         return $db->loadResult();
    434.     }
    435.  
    436.     function getThemeForSection () {
    437.         //get the most parent menu id
    438.         $query = "select params from #__modules where `module`='mod_janews2'";
    439.         $database       =& JFactory::getDBO();
    440.         $database->setQuery($query);
    441.         $params = new JParameter($database->loadResult());
    442.         $sections = $params->get('sections', '');
    443.         if (!$sections) return '';
    444.        
    445.         global $Itemid;
    446.         $mid = $Itemid;
    447.         $pid = $mid;
    448.         $menu = &JSite::getMenu();
    449.  
    450.         if(!$menu) return;    
    451.         while ($pid) {
    452.           $mid = $pid;
    453.           $pmenu = $menu->getItem($mid);
    454.           $pid = $pmenu?$pmenu->parent:0;
    455.         }
    456.         //Get menu item
    457.         $menuitem = $menu->getItem($mid);
    458.         //parse link
    459.         $urls = parse_url($menuitem->link);
    460.         $querystring = $urls['query'];
    461.         $output = null;
    462.         parse_str ($querystring,$output);
    463.         $sectionid = 0;
    464.         if($output['view']=='section'){
    465.             $sectionid = $output['id'];
    466.         }
    467.         else if($output['view']=='category'){
    468.             $catid = $output['id'];
    469.             $sectionid = $this->getSectionId($catid);
    470.         }
    471.        
    472.         if($sectionid) {
    473.             $sectionids = preg_split('/[\n,]|<br \/>/', $sections);
    474.             for ($i = 0; $i < count($sectionids); $i++) {
    475.               $temp = split(':',$sectionids[$i]);
    476.               if(isset($temp[0]) && $temp[0]==$sectionid) {
    477.               return isset($temp[1])? '-'.trim($temp[1]):'';
    478.             }
    479.           }
    480.         }
    481.         return '';
    482.     }  
    483.    
    484.     function getLastUpdate(){
    485.         $db  = &JFactory::getDBO();
    486.         $query = 'SELECT created FROM #__content a ORDER BY created DESC LIMIT 1';
    487.         $db->setQuery($query);
    488.         $data = $db->loadObject();
    489.         if( $data->created ){  //return gmdate( 'h:i:s A', strtotime($data->created) ) .' GMT ';
    490.              $date =& JFactory::getDate(strtotime($data->created));
    491.              $user =& JFactory::getUser();
    492.              $tz = $user->getParam('timezone');
    493.              $sec =$date->toUNIX();   //set the date time to second
    494.              return gmdate("h:i:s A", $sec+$tz).' GMT';
    495.         }
    496.         return ;
    497.     }
    498.  
    499.     function countModules ($modules) {
    500.         return $modules?$this->_tpl->countModules ($modules):0;
    501.     }
    502.    
    503.     function definePosition ($positions) {
    504.         $this->_positions = $positions;
    505.         //parse layout
    506.         $this->_colwidth = array();
    507.         //Left
    508.         $l = $l1 = $l2 = 0;
    509.         $left1 = $this->getPositionName ('left1');
    510.         $left2 = $this->getPositionName ('left2');
    511.         $mt = $this->getPositionName ('left-mass-top');
    512.         $mb = $this->getPositionName ('left-mass-bottom');
    513.         if ($this->countModules ("$mt") || $this->countModules ("$mb") || ($this->countModules ("$left1") && $this->countModules ("$left2"))) {
    514.             $l = 2;
    515.             $l1 = $this->getColumnBasedWidth ('left1');
    516.             $l2 = $this->getColumnBasedWidth ('left2');
    517.         } else if ($this->countModules("$left1")) {
    518.             $l = 1;
    519.             $l1 = $this->getColumnBasedWidth ('left1');
    520.         } else if ($this->countModules("$left2")) {
    521.             $l = 1;
    522.             $l2 = $this->getColumnBasedWidth ('left2');
    523.         }
    524.         $cls_l = $l?"l$l":"";
    525.         $l = $l1 + $l2;
    526.        
    527.         //right
    528.         $r = $r1 = $r2 = 0;
    529.         $right1 = $this->getPositionName ('right1');
    530.         $right2 = $this->getPositionName ('right2');
    531.         $mt = $this->getPositionName ('right-mass-top');
    532.         $mb = $this->getPositionName ('right-mass-bottom');
    533.         if ($this->countModules ("$mt") || $this->countModules ("$mb") || ($this->countModules ("$right1") && $this->countModules ("$right2"))) {
    534.             $r = 2;
    535.             $r1 = $this->getColumnBasedWidth ('right1');
    536.             $r2 = $this->getColumnBasedWidth ('right2');
    537.         } else if ($this->countModules("$right1")) {
    538.             $r = 1;
    539.             $r1 = $this->getColumnBasedWidth ('right1');
    540.         } else if ($this->countModules("$right2")) {
    541.             $r = 1;
    542.             $r2 = $this->getColumnBasedWidth ('right2');
    543.         }
    544.         $cls_r = $r?"r$r":"";
    545.         $r = $r1 + $r2;
    546.        
    547.         //inset
    548.         $inset1 = $this->getPositionName ('inset1');
    549.         $inset2 = $this->getPositionName ('inset2');       
    550.         $i1=$i2=0;
    551.         if ($this->countModules("$inset1")) $i1 = $this->getColumnBasedWidth ('inset1');
    552.         if ($this->countModules("$inset2")) $i2 = $this->getColumnBasedWidth ('inset2');
    553.  
    554.         //width
    555.         $this->_colwidth ['r'] = $r;
    556.         if ($r) {
    557.             $this->_colwidth ['r1'] = round($r1 * 100 / $r);
    558.             $this->_colwidth ['r2'] = 100 - $this->_colwidth ['r1'];
    559.         }
    560.         $this->_colwidth ['mw'] = 100 - $r;
    561.         $m = 100 - $l -$r;
    562.         $this->_colwidth ['l'] = ($l + $m)?round($l * 100 / ($l + $m)):0;
    563.         if ($l) {
    564.             $this->_colwidth ['l1'] = round($l1 * 100 / $l);
    565.             $this->_colwidth ['l2'] = 100 - $this->_colwidth ['l1'];
    566.         }
    567.         $this->_colwidth ['m'] = 100 - $this->_colwidth ['l'];
    568.        
    569.         $c = $m - $i1 - $i2;
    570.         $this->_colwidth ['i2'] = round($i2 * 100 / $m);
    571.         $this->_colwidth ['cw'] = 100 - $this->_colwidth ['i2'];
    572.         $this->_colwidth ['i1'] = ($c+$i1)?round($i1 * 100 / ($c+$i1)):0;
    573.         $this->_colwidth ['c'] = 100 - $this->_colwidth ['i1'];
    574.        
    575.         $cls_li = $this->countModules ($inset1)?'l1':'';
    576.         $cls_ri = $this->countModules ($inset1)?'r1':'';
    577.        
    578.         $this->_colwidth ['cls_w'] = ($cls_l || $cls_r)?"ja-$cls_l$cls_r":"";
    579.         $this->_colwidth ['cls_m'] = ($cls_li || $cls_ri)?"ja-$cls_li$cls_ri":"";
    580.         $this->_colwidth ['cls_l'] = $this->countModules ("$left1 && $left2")?"ja-l2":($this->countModules ("$left1 || $left2")?"ja-l1":"");
    581.         $this->_colwidth ['cls_r'] = $this->countModules ("$right1 && $right2")?"ja-r2":($this->countModules ("$right1 || $right2")?"ja-r1":"");
    582.     }
    583.    
    584.     function customwidth ($name, $width) {
    585.         if (!isset ($this->_customwidth)) $this->_customwidth = array();
    586.         $this->_customwidth [$name] = $width;
    587.     }
    588.    
    589.     function getColumnBasedWidth ($name) {
    590.         return (isset ($this->_customwidth) && isset ($this->_customwidth[$name]) && $this->_customwidth[$name]) ? $this->_customwidth[$name]:$this->_basewidth;
    591.     }
    592.    
    593.     function getPositionName ($name) {
    594.         if (isset ($this->_positions[$name])) return trim($this->_positions[$name]);
    595.         return '';
    596.     }  
    597.    
    598.     function hasPosition ($name) {
    599.         return $this->countModules ($this->getPositionName ($name));
    600.     }  
    601.        
    602.     function getColumnWidth ($name) {
    603.         if (isset($this->_colwidth [$name])) return $this->_colwidth [$name];
    604.         return null;
    605.     }  
    606. }
    607.  
    608. make_object_extendable ('JATemplateHelper');
     
  2. woojin
    Offline

    woojin Местный Команда форума => Cпециалист <=

    Регистрация:
    31.05.2009
    Сообщения:
    3 206
    Симпатии:
    334
    Пол:
    Мужской
    во-первых: в нём есть ещё одно подключение какого того расширителя объектов
    во-вторых: нефиг в шаблоне ползать. там скорее всего нет ничего подобного, если кто то умышленно не вставлял эту штуку в шаблон

    тут только настройки хостинга или вообще доменного имени
     
  3. Offline

    dimonsk Пользователь

    Регистрация:
    23.09.2011
    Сообщения:
    136
    Симпатии:
    0
    Пол:
    Мужской
    вот что ответили в СП jino

    Здравствуйте

    Данный сайт располагается не на нашем хостинге.
    http://www.ip-ping.ru/dig/?host=newregion-njagan.ru+&rt=1&server=

    Для переноса домена на наш хостинг используйте инструкцию: http://www.jino.ru/support/faq/domains-transfer/transfer-to-jino.html#transfer-to-jino



    Ага а остальные 7 сайтов на их хостинге , хотя никто ничего никуда не переносил
     
  4. woojin
    Offline

    woojin Местный Команда форума => Cпециалист <=

    Регистрация:
    31.05.2009
    Сообщения:
    3 206
    Симпатии:
    334
    Пол:
    Мужской
    эти оба сайта находятся на Jino ?
     
  5. Offline

    dimonsk Пользователь

    Регистрация:
    23.09.2011
    Сообщения:
    136
    Симпатии:
    0
    Пол:
    Мужской
  6. woojin
    Offline

    woojin Местный Команда форума => Cпециалист <=

    Регистрация:
    31.05.2009
    Сообщения:
    3 206
    Симпатии:
    334
    Пол:
    Мужской
    и у Джино и у Ангелов один и тот же регистратор (это я точно знаю - правда не помню кто)

    можно сменить NS сервера только на сайте регистратора, а значит косяк мог быть как и в запросе к регистратору у Джино так и у самого регистратора

    кстати вопрос: а чего ты в ТП джино делаешь?
    если оба сайта на ангелах находятся?

    во всяком случае
    newregion-njagan.ru
    newregion-nojabrsk.ru
    NS сервера одинаковые и IP то же ангеловский
     
    dimonsk нравится это.
  7. Offline

    dimonsk Пользователь

    Регистрация:
    23.09.2011
    Сообщения:
    136
    Симпатии:
    0
    Пол:
    Мужской
    все сайты регистрировались через джино и там обслуживаются...
     
  8. woojin
    Offline

    woojin Местный Команда форума => Cпециалист <=

    Регистрация:
    31.05.2009
    Сообщения:
    3 206
    Симпатии:
    334
    Пол:
    Мужской
    если ты хозяин этих сайтов, то выясняй у джино кто эти два сайта и когда перенёс с их хостинга
    а у ангелов узнавай кто и когда и регнул на их хостинге

    вот и найдёшь где собака "порылась"
     
  9. Offline

    Серегин Недавно здесь

    Регистрация:
    14.11.2012
    Сообщения:
    24
    Симпатии:
    1
    Пол:
    Мужской
    Вы уже до писем к регистратором добрались.
    я бы попробовал залить index.html пустой в гл.каталог сайта, и посмотрел бы htaccess. в главной директории и директории сайта (а лучше их на время теста переименовать, если внутренности не ясны). В моей практике хостер винит редко, оч.редко и как самый последний ;)

    а лучше в оба каталога сайта дать index.html, с разной информацией /это сайт 1/ это сайт 2 / переименовывая оба htaccess. и по результатам можно увидеть Joomla имеет к этому отношение или нет.
     
    Последнее редактирование модератором: 16.11.2012
  10. OlegK
    Offline

    OlegK Russian Joomla! Team Команда форума ⇒ Профи ⇐

    Регистрация:
    17.01.2011
    Сообщения:
    7 813
    Симпатии:
    771
    Пол:
    Мужской
  11. Offline

    Серегин Недавно здесь

    Регистрация:
    14.11.2012
    Сообщения:
    24
    Симпатии:
    1
    Пол:
    Мужской
    Читал что пустой, но пустой ли тот, что в главной папки сервера? Я через htaccess в главной папке сервера временами правлю доменами (специфика хостера) так что туда стоит заглянуть
     
  12. woojin
    Offline

    woojin Местный Команда форума => Cпециалист <=

    Регистрация:
    31.05.2009
    Сообщения:
    3 206
    Симпатии:
    334
    Пол:
    Мужской
    1. я говорил про хостеров, а не "РЕГИСТРАТОРОМ"

    2. для не сведущих: он там и так лежит пустой (хотя по умолчанию его там нет), и в настройках сервера всегда переставляется нас запуск index.php? а не html
     
  13. Offline

    Серегин Недавно здесь

    Регистрация:
    14.11.2012
    Сообщения:
    24
    Симпатии:
    1
    Пол:
    Мужской
    Прошу прощение, думал об одном, написал другое

    Согласен, как почти в каждой папке для безопасности. Поправлюсь, нужно переименовать index.php. И повторюсь
    "а лучше в оба каталога сайта дать index.html, с разной информацией /это сайт 1/ это сайт 2 / переименовывая оба htaccess. " можно еще переименовать каталоги, что бы проверить на каком уровне идет дубляж.
     
  14. OlegK
    Offline

    OlegK Russian Joomla! Team Команда форума ⇒ Профи ⇐

    Регистрация:
    17.01.2011
    Сообщения:
    7 813
    Симпатии:
    771
    Пол:
    Мужской
    НЕ угадал.Для рекламы хостера. ))
    В чистом дистре Joomla нет файла index.html в корне сайта
     
  15. Offline

    Серегин Недавно здесь

    Регистрация:
    14.11.2012
    Сообщения:
    24
    Симпатии:
    1
    Пол:
    Мужской
    а ведь правда, не задумывался над этим.:[ что он только на удаленном сервере и появляется.
     
  16. woojin
    Offline

    woojin Местный Команда форума => Cпециалист <=

    Регистрация:
    31.05.2009
    Сообщения:
    3 206
    Симпатии:
    334
    Пол:
    Мужской
    да не появляется он ни где!!!!
    я ещё ни одного хостинга не знаю, на котором бы index.html появлялся в корне сайта

    я вообще про себя написал, что я его сам в корень закидываю, но при этом делаю пренастройку на сервере, чтобы в первую очередь обрабатывался index.php

    а если уж хостер захочет выдать какую либо рекламу по верх вашего сайта, то вы уже ни как не спасётесь от этого. только если JS'ом который будет через определённый промежуток времени сканить DOM на наличие определённых тегов или классов

    P.S. хостер вообще может полностью перестроить вашу страничку как ему хочется

    и вообще эта дискуссия не относится к делу! пусть нам лучше "хозяин" темы скажет чего у него там получилось после переписки с хостерами
     
  17. Offline

    Серегин Недавно здесь

    Регистрация:
    14.11.2012
    Сообщения:
    24
    Симпатии:
    1
    Пол:
    Мужской
    Поддерживаю.
    P.S. Мой хостер если нет index.html или index.php, то закидывает свой index.html, это работает как защита, в случае если каталог не пустой, зачем другим видеть. И мне это нравиться, т.к. бывает разное. А в index.html информация, мол домен выкуплен но еще не залит сайт, и жирная ссылка на их главную страницу :D
     

Поделиться этой страницей

Загрузка...