Пример #1
0
}
/* PmWiki Skidoo skin
 *
 * Examples at: http://pmwiki.com/Cookbook/Skidoo and http://solidgone.com/Skins/
 * Copyright (c) 2009 David Gilbert
 * Dual licensed under the MIT and GPL licenses:
 *    http://www.opensource.org/licenses/mit-license.php
 *    http://www.gnu.org/licenses/gpl.html
 */
global $FmtPV;
$FmtPV['$SkinName'] = '"Skidoo"';
$FmtPV['$SkinVersion'] = '"1.0.6"';
$FmtPV['$SkinDate'] = '"20100612"';
global $action;
include_once "{$SkinDir}/cookbook/detect_mobile.php";
if ($action == 'print' || detect_mobile_device()) {
    # Enabled from config.php with: $ActionSkin['print'] = <skin_name>;
    global $SkinStyle, $LinkPageExistsFmt, $UrlLinkTextFmt;
    $SkinStyle = 'pda';
    $LinkPageExistsFmt = "<a class='wikilink' href='\$PageUrl?action=print'>\$LinkText</a>";
    $UrlLinkTextFmt = "<cite class='urllink'>\$LinkText</cite> [<a class='urllink' href='\$Url'>\$Url</a>]";
    LoadPageTemplate($pagename, "{$SkinDir}/print/print.tmpl");
    return;
}
## Search a Group.Templates page as well as the Site templates
global $FPLTemplatePageFmt;
SDV($FPLTemplatePageFmt, array('{$FullName}', "Site.Skidoo-LocalTemplates", "Site.LocalTemplates", "Site.PageListTemplates"));
## Use internationalization template for alternative Section Edit text
XLPage('en', "Site.Skidoo-XLPageLocal");
# Condition used in Header to determine whether to display "menu" in the header.
global $Conditions;
Пример #2
0
</div>

Please choose <?php 
        print EPESI;
        ?>
 version:<ul>
<li><a href="mobile.php" class="white button">mobile</a><br>
<li><a href="index.php?force_epesi=1" class="green button">desktop</a>
</ul>

</body>
</html>
<?php 
        exit;
    }
} elseif (detect_mobile_device()) {
    header('Location: mobile.php');
    exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

		<head profile="http://www.w3.org/2005/11/profile">
		<link rel="icon" type="image/png" href="images/favicon.png" />
		<link rel="apple-touch-icon" href="images/apple-favicon.png" />
		<title><?php 
print EPESI;
?>
</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Пример #3
0
 /**
  * Returns the SELECT in HTML
  *
  * @access    public
  * @return    string
  */
 function toHtml()
 {
     //print_r($this->_values);
     $this->updateAttributes(array('multiple' => 'multiple'));
     if ($this->_flagFrozen) {
         return $this->getFrozenHtml();
     } else {
         $tabs = $this->_getTabs();
         $strHtml = '';
         if ($this->getComment() != '') {
             $strHtml .= $tabs . '<!-- ' . $this->getComment() . " //-->\n";
         }
         $myName = $this->getName();
         $mod = $myName;
         if (detect_mobile_device()) {
             $this->setName($myName . '[]');
             $attrString = $this->_getAttrString($this->_attributes);
             $strHtml = '<select' . $attrString . 'name="' . $myName . '" style="height:100%;" >' . "\n";
             foreach ($this->_options as $k => $option) {
                 $selected = is_array($this->_values) && in_array((string) $this->_options[$k]['attr']['value'], $this->_values) ? 'selected="1" ' : '';
                 $strHtml .= $tabs . '<option ' . $selected . $this->_getAttrString($this->_options[$k]['attr']) . '>' . $this->_options[$k]['text'] . '</option>' . "\n";
             }
             $strHtml .= '</select>';
         } else {
             $this->setName($myName . 'from[]');
             $this->_attributes['id'] = $myName . '__from';
             $attrString = $this->_getAttrString($this->_attributes);
             $fromElement = '';
             $fromElement .= $tabs . '<select' . $attrString . ' onkeypress="var key=event.which || event.keyCode;if(key==32)ms_add_selected(\'' . $mod . '\', \'' . $this->list_sep . '\');' . $this->on_add_js_code . '" ondblclick="ms_add_selected(\'' . $mod . '\', \'' . $this->list_sep . '\');' . $this->on_add_js_code . '">' . "\n";
             if (isset($this->_values[0]) && preg_match('/' . addcslashes($this->list_sep, '/') . '/i', $this->_values[0])) {
                 $this->_values = explode($this->list_sep, $this->_values[0]);
                 array_shift($this->_values);
             }
             $i = 0;
             foreach ($this->_options as $k => $option) {
                 $this->keyhash[$i] = $this->_options[$k]['attr']['value'];
                 $kv = array_search($this->_options[$k]['attr']['value'], $this->_values);
                 $i++;
                 if (!(is_array($this->_values) && in_array((string) $this->_options[$k]['attr']['value'], $this->_values))) {
                     $fromElement .= $tabs . "\t<option " . $this->_getAttrString($this->_options[$k]['attr']) . ">" . $this->_options[$k]['text'] . "</option>\n";
                 }
             }
             $fromElement .= $tabs . '</select>';
             $toElement = '';
             $this->setName($myName . 'to[]');
             $this->_attributes['id'] = $myName . '__to';
             $attrString = $this->_getAttrString($this->_attributes);
             $toElement .= $tabs . '<select' . $attrString . ' onkeypress="var key=event.which || event.keyCode;if(key==32)ms_remove_selected(\'' . $mod . '\', \'' . $this->list_sep . '\');' . $this->on_remove_js_code . '" ondblclick="ms_remove_selected(\'' . $mod . '\', \'' . $this->list_sep . '\');' . $this->on_remove_js_code . '">' . "\n";
             $list = '';
             foreach ($this->_options as $option) {
                 if (is_array($this->_values) && in_array((string) $option['attr']['value'], $this->_values)) {
                     $toElement .= $tabs . "\t<option " . $this->_getAttrString($option['attr']) . ">" . $option['text'] . "</option>\n";
                     $list .= $this->list_sep . $option['attr']['value'];
                 }
             }
             $toElement .= $tabs . '</select>';
             $buttons = array();
             load_js('modules/Libs/QuickForm/FieldTypes/multiselect/multiselect.js');
             $buttons['add_all'] = '<input id="' . $myName . '__add_all" type=button value=">>" onclick="' . 'ms_add_all(\'' . $myName . '\', \'' . $this->list_sep . '\');' . $this->on_add_js_code . '"/>';
             $buttons['remove_all'] = '<input id="' . $myName . '__remove_all" align=center type=button value="<<" onclick="' . 'ms_remove_all(\'' . $myName . '\', \'' . $this->list_sep . '\');' . $this->on_remove_js_code . '"/>';
             $buttons['remove_selected'] = '<input onFocus="focus_by_id(\'' . $myName . '__from\');" id="' . $myName . '__remove_selected" type=button value="<" onclick="' . 'ms_remove_selected(\'' . $myName . '\', \'' . $this->list_sep . '\');' . $this->on_remove_js_code . '"/>';
             $buttons['add_selected'] = '<input onFocus="focus_by_id(\'' . $myName . '__to\');" id="' . $myName . '__add_selected" type=button value=">" onclick="' . 'ms_add_selected(\'' . $myName . '\', \'' . $this->list_sep . '\');' . $this->on_add_js_code . '"/>';
             $strHtml .= $tabs . '<table id="multiselect">';
             $strHtml .= $tabs . '<tr><td class="form-element">' . $fromElement . '</td>';
             $strHtml .= $tabs . '<td class="buttons-cell"><table>' . $tabs . '<tr><td >' . $buttons['add_selected'] . '</td></tr>' . $tabs . '<tr><td >' . $buttons['add_all'] . '</td></tr>' . $tabs . '<tr><td >' . $buttons['remove_all'] . '</td></tr>' . $tabs . '<tr><td >' . $buttons['remove_selected'] . '</td></tr>' . $tabs . '</table></td>';
             $strHtml .= $tabs . '<td class="to-element">' . $toElement . '</td></tr></table>';
             $this->setName($myName);
             $attrString = $this->_getAttrString($this->_attributes);
             $strHtml .= $tabs . '<input type="hidden" name="' . $myName . "\" value=\"" . $list . "\" />\n";
         }
         //			print_r($this->_options);
         return $strHtml;
     }
 }
Пример #4
0
    // check if the user agent value claims to be windows but not windows mobile
    if (stristr($_SERVER['HTTP_USER_AGENT'], 'windows') && !stristr($_SERVER['HTTP_USER_AGENT'], 'windows ce')) {
        return false;
    }
    // check if the user agent gives away any tell tale signs it's a mobile browser
    if (preg_matcH('/up.browser|up.link|windows ce|iemobile|mini|iphone|ipod|android|danger|blackberry|mmp|symbian|midp|wap|phone|pocket|mobile|pda|psp/i', $_SERVER['HTTP_USER_AGENT'])) {
        return true;
    }
    // check the http accept header to see if wap.wml or wap.xhtml support is claimed
    if (isset($_SERVER['HTTP_ACCEPT'])) {
        if (stristr($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') || stristr($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml')) {
            return true;
        }
    }
    // check if there are any tell tales signs it's a mobile device from the _server headers
    if (isset($_SERVER['HTTP_X_WAP_PROFILE']) || isset($_SERVER['HTTP_PROFILE']) || isset($_SERVER['X-OperaMini-Features']) || isset($_SERVER['UA-pixels'])) {
        return true;
    }
    // build an array with the first four characters from the most common mobile user agents
    $a = array('acs-', 'alav', 'alca', 'amoi', 'andr', 'audi', 'aste', 'avan', 'benq', 'bird', 'blac', 'blaz', 'brew', 'cell', 'cldc', 'cmd-', 'dang', 'doco', 'eric', 'hipt', 'inno', 'ipaq', 'ipho', 'java', 'jigs', 'kddi', 'keji', 'leno', 'lg-c', 'lg-d', 'lg-g', 'lge-', 'maui', 'maxo', 'midp', 'mits', 'mmef', 'mobi', 'mot-', 'moto', 'mwbp', 'nec-', 'newt', 'noki', 'opwv', 'palm', 'pana', 'pant', 'pdxg', 'phil', 'play', 'pluc', 'port', 'prox', 'qtek', 'qwap', 'sage', 'sams', 'sany', 'sch-', 'sec-', 'send', 'seri', 'sgh-', 'shar', 'sie-', 'siem', 'smal', 'smar', 'sony', 'sph-', 'symb', 't-mo', 'teli', 'tim-', 'tosh', 'tsm-', 'upg1', 'upsi', 'vk-v', 'voda', 'w3c', 'wap-', 'wapa', 'wapi', 'wapp', 'wapr', 'webc', 'winw', 'winw', 'xda', 'xda-');
    // check if the first four characters of the current user agent are set as a key in the array
    if (isset($a[substr($_SERVER['HTTP_USER_AGENT'], 0, 4)])) {
        return true;
    }
}
// If Mobile Configure Mobile Settings
if (isset($_SERVER['HTTP_USER_AGENT']) && detect_mobile_device()) {
    Kohana::config_set('settings.mobile', TRUE);
} else {
    Kohana::config_set('settings.mobile', FALSE);
}
Пример #5
0
         $user_id = $user_id > 0 ? $user_id : isset($_SESSION['siteuser']['id']) ? $_SESSION['siteuser']['id'] : 0;
         $tpl = $oSettings::getSmarty_template() . 'forms/' . $form . '_form.tpl';
         $data = '';
         if (file_exists($tpl)) {
             $__lang = $router::getLocalize();
             $smarty->assign('__lang', $__lang);
             $smarty->assign('user_id', $user_id);
             $content = $smarty->fetch($tpl);
             $data = array('head' => isset($__lang['add_' . $form]) ? $__lang['add_' . $form] : '', 'content' => $content, 'success' => isset($__lang['add_' . $form . '_success']) ? $__lang['add_' . $form . '_success'] : '', 'error' => isset($__lang['add_' . $form . '_error']) ? $__lang['add_' . $form . '_error'] : '');
             echo json_encode($data);
         }
         exit;
     }
     // Определение мобильного устройства
     require_once DOC . 'system/php-to-detect-mobile-phones.php';
     $mobile = detect_mobile_device() ? 1 : 0;
     if (isset($aStrings[1]) && $aStrings[1] == 'mebel') {
         $smarty->assign(array('body_class' => 'poliform_black'));
     }
     // Выгрузка переменных в шаблон
     $smarty->assign(array('template' => System_Settings::getSmarty_templateName(), 'this_url' => $this_url, 'langs' => $langs, 'current_lang' => $current_lang, 'default_lang' => $default_lang, '__lang' => $router::getLocalize(), 'mobile' => $mobile, 'options' => $options, 'user' => isset($_SESSION['siteuser']) ? $_SESSION['siteuser'] : array()));
     // Вывод страницы с логином для незарегистрированных пользователей
     /*
             if (!isset($_SESSION['siteuser']['id'])) {
                 $router::setTpl('login');
                 $smarty->display($router::getTpl());
                 exit;
             }*/
     // Вывод шаблона
     $smarty->displayAndCach($router::getTpl());
 } else {