示例#1
0
		</style>
	</head>
	<body>
<span class="small">This page <a href="en.php">in English</a></span>
		<h1>Benutze ich <a href="http://multipath-tcp.org" title="Multipath TCP">MPTCP</a>?</h1>
		<?php 
// Detect active MPTCP connection on page load
if (is_mptcp()) {
    echo "<h2 class=\"big green\">JA!</h2>\n";
    echo "<p>Dieses Ger&auml;t verwendet MPTCP! <a href=\"http://multipath-tcp.org\">multipath-tcp.org</a> enth&auml;lt weitere Informationen.</p>\n";
}
echo "<p class=\"big red\">NEIN!</p>\n";
echo "\t\t<h2>Kann ich MPTCP verwenden?</h2>\n";
echo "\t\t";
// Detect operating system
switch (get_platform()) {
    case OS_WINDOWS:
        echo "<p><span class=\"bold red\">NEIN</span>, leider ist MPTCP unter Windows nicht verf&uuml;gbar. Bitte pr&uuml;fen Sie die Verf&uuml;gbarkeit zu einem sp&auml;teren Zeitpunkt erneut.</p>\n";
        break;
    case OS_MAC:
        echo "<p><span class=\"bold green\">JA</span>, mit einer <a href=\"https://github.com/multipath-tcp/mptcp-virtual\">MPTCP-f&auml;higen virtuellen Maschine</a>.</p>\n";
        break;
    case OS_LINUX:
        echo "<p><span class=\"bold green\">JA</span>, wenn Sie einen <a href=\"http://multipath-tcp.org/pmwiki.php?n=Users.DoItYourself\">MPTCP-f&auml;higen Kernel compilieren</a>, oder einen &uuml;ber das <a href=\"http://multipath-tcp.org/pmwiki.php?n=Users.AptRepository\">MPTCP apt-repository</a> installieren.</p>\n";
        break;
    case OS_BSD:
        echo "<p><span class=\"bold green\">JA</span>, &uuml;ber einen <a href=\"http://caia.swin.edu.au/urp/newtcp/mptcp/tools.html\">FreeBSD Kernel Patch</a>.</p>\n";
        break;
    case OS_ANDROID:
        echo "<p><span class=\"bold orange\">VIELLEICHT</span>, &uuml;ber einen Patch f&uuml;r ihr <a href=\"http://multipath-tcp.org/pmwiki.php?n=Users.Android\">Android Ger&auml;t</a>.</p>\n";
        break;
示例#2
0
    $smarty->assign('date', array('year' => $year));
    $smarty->assign('quarter', $quarter);
    $smarty->assign('sale_performance', $sale_performance);
    $smarty->assign('award_list_div', $smarty->fetch('work_award_div.htm'));
    $res['code'] = 1;
    $res['main'] = $smarty->fetch('work_award.htm');
    die($json->encode($res));
} elseif ($_REQUEST['act'] == 'year_performance') {
    $year = isset($_REQUEST['year']) && empty($_REQUEST['year']) ? date('Y') : $_REQUEST['year'];
    //$year   = mysql_real_escape_string($_REQUEST['year']);
    //$year   = $year == '' ? date('Y') : $year;
    $start_time = strtotime($year . '-01-01 00:00:00');
    $end_time = strtotime($year + 1 . '-01-01 00:00:00');
    $sale_performance = get_sale_performance($start_time, $end_time);
    if (admin_priv('all', '', false)) {
        $smarty->assign('platform_list', get_platform(SALE));
    }
    $smarty->assign('admin_name', $_REQUEST['admin']);
    $smarty->assign('caption', $year . '年度销售排行');
    $smarty->assign('source', 'year_performance');
    $smarty->assign('date', array('year' => $year));
    $smarty->assign('sale_performance', $sale_performance);
    $smarty->assign('award_list_div', $smarty->fetch('work_award_div.htm'));
    $res['code'] = 1;
    $res['main'] = $smarty->fetch('work_award.htm');
    die($json->encode($res));
} elseif ($_REQUEST['act'] == 'illegal_control') {
    $sql_select = 'SELECT o.order_id,o.consignee,o.add_time oadd_time,c.add_time cadd_time,c.contact_value,c.contact_name,a.user_name FROM ' . $GLOBALS['ecs']->table('order_info') . ' o,' . $GLOBALS['ecs']->table('user_contact') . ' c,' . $GLOBALS['ecs']->table('admin_user') . ' a WHERE o.add_time>c.add_time AND o.add_time-c.add_time<=86400 AND c.user_id=o.user_id AND a.user_id=c.add_admin AND o.platform<>1  ORDER BY o.add_time DESC';
    $illegal_control_list = $GLOBALS['db']->getAll($sql_select);
    if ($illegal_control_list) {
        foreach ($illegal_control_list as &$val) {
function calc_dirname()
{
    $dirname = '';
    $platform = get_platform();
    if (!empty($platform)) {
        $dirname = $platform['dirname'];
    }
    return $dirname;
}
示例#4
0
function get_results(&$rslt, &$notices, &$env, &$dbg_instructions, &$proj_settings)
{
    global $expected_dbg;
    $rslt = array();
    $notices = array();
    $dbg_instructions = array();
    $proj_settings = array();
    $env = array();
    get_platform($env);
    get_webserver_details($env['remote_path'], $env['remote_root'], $env['local_webserver'], $env['php_ini'], $env['extensions_dir'], $env['remote_url'], $env['server_name'], $env['sapi_name'], $env['php_version']);
    $env['client_ip'] = get_client_address();
    $env['server_ip'] = server('SERVER_ADDR');
    if (empty($env['server_ip']) && server('SERVER_NAME') === 'localhost') {
        $env['server_ip'] = '127.0.0.1';
    }
    if (empty($env['server_ip']) && server('SERVER_NAME') === 'localhost6') {
        $env['server_ip'] = '::1';
    }
    if (empty($env['remote_root']) || $env['remote_root'] === DIRECTORY_SEPARATOR) {
        $notices[] = 'Please make sure that you run this script under WEB server, not by invoking php in the console';
    }
    if (empty($env['php_ini'])) {
        $notices[] = 'path to php.ini is not determined';
    }
    if (substr($env['extensions_dir'], 0, 2) === './' || substr($env['extensions_dir'], 0, 2) === '.\\') {
        $notices[] = 'I highly recommend you to update extension_dir in your php.ini file to contain absolute path';
    }
    $rslt['php_version_string'] = array('caption' => '<strong>PHP Version:</strong>', 'value' => phpversion());
    $rslt['webserver'] = array('caption' => '<strong>Web Server:</strong>', 'value' => server('SERVER_SOFTWARE'));
    $rslt['server_name'] = array('caption' => '<strong>Server Name:</strong>', 'value' => $env['server_name']);
    $rslt['platform'] = array('caption' => '<strong>Platform:</strong>', 'value' => $env['platform'] . "/" . $env['CPU']);
    $rslt['client_ip'] = array('caption' => '<strong>Your Client IP Address:</strong>', 'value' => $env['client_ip']);
    $rslt['server_ip'] = array('caption' => '<strong>Your Server IP Address:</strong>', 'value' => $env['server_ip']);
    $rslt['port'] = array('caption' => '<strong>Port:</strong>', 'value' => server('SERVER_PORT'));
    $rslt['is_local'] = array('caption' => $env['local_webserver'] ? '<strong>Your Web Server is on the same machine with PhpED</strong>' : '<strong>Your Web Server and PhpED are on different machines</strong>');
    $rslt['remote_path'] = array('caption' => '<strong>Path to website files:</strong>', 'value' => $env['remote_path']);
    $rslt['remote_root'] = array('caption' => '<strong>Document Root is:</strong>', 'value' => $env['remote_root']);
    $rslt['php_ini'] = array('caption' => '<strong>Your PHP.INI file is:</strong>', 'value' => $env['php_ini']);
    $rslt['extension_dir'] = array('caption' => '<strong>PHP extensions directory is:</strong>', 'value' => $env['extensions_dir']);
    if (is_dbg_installed()) {
        $dbg_version = phpversion("dbg");
        $env['dbg_version'] = $dbg_version;
        $version_array = explode(".", $dbg_version);
        $inred = false;
        if (!version_compare($dbg_version, $expected_dbg, '=')) {
            if (version_compare($dbg_version, $expected_dbg, '<')) {
                $notices[] = 'Installed DBG module is of an older version than currently available from NuSphere';
                $inred = true;
            } else {
                $notices[] = 'Perhaps, DBG Wizard is outdated, please download the latest one from <a href="http://www.nusphere.com/products/dbg_wizard_download.htm">this link</a>';
            }
        }
        $rslt['dbg_installed'] = array('caption' => "<strong>DBG (PHP DEBUGGER) Version {$dbg_version} is </strong>", 'value' => ($inred ? '<font color="red">' : '') . 'INSTALLED' . ($inred ? '</font>' : ''));
    } else {
        $notices[] = 'DBG (PHP DEBUGGER) is not installed';
        $dbg_instructions[] = "Your debugger module " . $env['dbg_loc_instr'];
        $dbg_instructions[] = "Copy {$env['dbg_module']} into {$env['extensions_dir']} on your server {$env['server_name']}.";
        $phpfilename = !empty($env['php_ini']) ? $env['php_ini'] : "php.ini";
        $lines = "Add the following lines into {$phpfilename}\r\n\t\t\t<div align='center'>\r\n\t\t\t<table width='90%'  align='center' cellspacing='1' cellpadding='2' border='0'>\r\n\t\t\t<tr><td align='left'><font color='#FF8000' size='2pt'>";
        if (substr($env['extensions_dir'], -1, 1) == DIRECTORY_SEPARATOR) {
            $zend_extension_path = $env['extensions_dir'] . $env['dbg_module'];
        } else {
            $zend_extension_path = $env['extensions_dir'] . DIRECTORY_SEPARATOR . $env['dbg_module'];
        }
        if ($env['php_ts'] && version_compare(PHP_VERSION, '5.3.0', '<')) {
            $zend_ext_key = "zend_extension_ts";
        } else {
            $zend_ext_key = "zend_extension";
        }
        $lines .= "<strong>{$zend_ext_key}=\"{$zend_extension_path}\"</strong></font><br>\r\n\t\t\t<font size='1pt'>Note: if debugger module is loaded using this way, please make sure extension={$env['dbg_module']} line is removed or commented out.</font>";
        $lines .= "</td></tr>\r\n\t\t\t<tr><td align='left'><font color='#FF8000' size='2pt'>\r\n\t\t\t<strong>[debugger]</strong><br>\r\n\t\t\t<strong>debugger.hosts_allow= {$env['client_ip']} localhost ::1 127.0.0.1</strong><br>\r\n\t\t\t<strong>debugger.hosts_deny=ALL </strong><br>\r\n\t\t\t<strong>debugger.ports=7869</strong></font></td></tr>\r\n\t\t\t</table>\r\n\t\t\t</div>";
        $dbg_instructions[] = $lines;
        $lines = 'debugger.hosts_allow has should be in format debugger.hosts_allow= host1 host2 host3, where host1, host2 and host3are host names or IP or network addresses
			allowed to start debug sessions.';
        if (!$env['local_webserver']) {
            $lines .= 'If you run debug session through
				<a href="http://forum.nusphere.com/viewtopic.php?t=580" target="_blank">an SSH tunnel</a>, you need to
				list only local IP addresses (localhost ::1 127.0.0.1)';
        }
        $dbg_instructions[] = $lines;
        $dbg_instructions[] = 'Restart web server';
        $dbg_instructions[] = 'Launch phpinfo and check its output. Make sure that one of the topmost headers contains <br>
			<span style="font-style: italic">Zend Engine vX.X.0, Copyright (c) 1998-200x Zend Technologies with DBG v ' . $expected_dbg . ', (C) 2000, 2009 by Dmitri Dmitrienko </span>';
    }
    // Project Root Directory
    $lines = $env['remote_path'];
    if (!$env['local_webserver']) {
        $lines .= "<ul class='plain'>\r\n\t\t\t<li><p>Select the location where you will store the copies of the files from\r\n\t\t\t{$env['remote_path']} from your server {$env['server_name']}<br>\r\n\t\t\tNote: if you are using Samba or some other file sharing system,\r\n\t\t\tyou can simply point Root Directory to {$env['remote_path']} instead of copying it</p></li></ul>";
    }
    $proj_settings['project_root'] = array('caption' => '<strong>Project -> Root Directory:</strong>', 'value' => $lines);
    // Run Mode
    if (is_running_srv()) {
        $lines = 'HTTP Mode (SRV local WEB server)';
    } else {
        $lines = 'HTTP Mode (3-rd party WEB server)';
    }
    $proj_settings['run_mode'] = array('caption' => '<strong>Mapping -> Run Mode:</strong>', 'value' => $lines);
    if (!is_running_srv()) {
        // Remote URL
        $proj_settings['remote_url'] = array('caption' => '<strong>Mapping -> Remote URL:</strong>', 'value' => $env['remote_url']);
        if (empty($env['remote_url'])) {
            $notices[] = 'Please make sure that you run this script under a WEB server, not by invoking php directly';
        }
        // Remote Root
        $lines = $env['remote_path'];
        if ($env['local_webserver']) {
            $lines .= " (same as Project -> Root Directory)";
        }
        $proj_settings['remote_root'] = array('caption' => '<strong>Mapping -> Remote Root Directory:</strong>', 'value' => $lines);
    }
}
示例#5
0
$link = elgg_view('output/url', array('text' => 'https://www.google.com/recaptcha/admin/create', 'href' => 'https://www.google.com/recaptcha/admin/create', 'target' => '_blank'));
echo elgg_view('output/longtext', array('value' => elgg_echo('elgg_recaptcha:setting:private_key:help', array($link)), 'class' => 'elgg-subtext'));
echo '</div>';
echo '<div class="pas">';
echo "<label>" . elgg_echo("elgg_recaptcha:setting:theme") . "</label><br>";
echo elgg_view('input/dropdown', array('name' => 'params[theme]', 'value' => $vars['entity']->theme ? $vars['entity']->theme : 'light', 'options_values' => array('light' => elgg_echo("elgg_recaptcha:theme:option:light"), 'dark' => elgg_echo("elgg_recaptcha:theme:option:dark"))));
echo '</div>';
echo '<div class="pas">';
echo "<label>" . elgg_echo("elgg_recaptcha:setting:size") . "</label><br>";
echo elgg_view('input/dropdown', array('name' => 'params[size]', 'value' => $vars['entity']->size ? $vars['entity']->size : 'size', 'options_values' => array('normal' => elgg_echo("elgg_recaptcha:size:option:normal"), 'compact' => elgg_echo("elgg_recaptcha:size:option:compact"))));
echo '</div>';
echo '<div class="pas">';
echo "<label>" . elgg_echo("elgg_recaptcha:setting:recaptcha_type") . "</label><br>";
echo elgg_view('input/dropdown', array('name' => 'params[recaptcha_type]', 'value' => $vars['entity']->recaptcha_type ? $vars['entity']->recaptcha_type : 'image', 'options_values' => array('image' => elgg_echo("elgg_recaptcha:recaptcha_type:option:image"), 'audio' => elgg_echo("elgg_recaptcha:recaptcha_type:option:audio"))));
echo '</div>';
$platform = get_platform();
$browser = get_browser();
echo '<div class="pas">';
echo '<label>' . elgg_echo('elgg_recaptcha:settings:title:nojs') . '</label>';
echo elgg_view('output/longtext', array('value' => elgg_echo('elgg_recaptcha:settings:nojs:help', array($platform, $browser)), 'class' => 'elgg-text-help'));
$platforms = get_platforms();
$browsers = get_browsers();
foreach ($platforms as $name => $label) {
    $title = $label;
    $break1 = ceil(count($browsers) / 3);
    $break2 = $break1 * 2;
    $count = 0;
    $body = '<div class="elgg-col elgg-col-1of3">';
    foreach ($browsers as $n => $l) {
        $count++;
        $attr = $name . '_' . $n;
示例#6
0
$attributes = elgg_format_attributes($options);
$nojs = <<<NOJS
<div style="width: 302px; height: 482px;" class="g-recaptcha g-recaptcha-nojs" data-form="{$vars['form']}">
    <div style="width: 302px; height: 422px; position: relative;">
\t\t<div style="width: 302px; height: 422px; position: absolute;">
\t\t\t<iframe src="https://www.google.com/recaptcha/api/fallback?k={$key}"
\t\t\t\t\tframeborder="0" scrolling="no"
\t\t\t\t\tstyle="width: 302px; height:422px; border-style: none;">
\t\t\t</iframe>
\t\t</div>
\t</div>
\t<div style="width: 300px; height: 60px; border-style: none;
\t\t bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px;
\t\t background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">
        <textarea id="g-recaptcha-response" name="g-recaptcha-response"
                  class="g-recaptcha-response"
                  style="width: 250px; height: 40px; border: 1px solid #c1c1c1;
\t\t\t\t  margin: 10px 25px; padding: 0px; resize: none;" >
        </textarea>
\t</div>
</div>
NOJS;
$use_js = "<div class=\"g-recaptcha-wrapper\"><div {$attributes}></div><noscript>{$nojs}</noscript></div>";
$nojs = "<div class=\"g-recaptcha-wrapper\">{$nojs}</div>";
$browser = get_browser(false);
$platform = get_platform(false);
if (elgg_get_plugin_setting($platform . '_' . $browser, PLUGIN_ID)) {
    echo $nojs;
    return;
}
echo $use_js;