示例#1
0
function imo_top()
{
    //include('forum_old/SSI.php');
    //$cpath = "http://ilmarching.com" . $_SERVER["SCRIPT_NAME"];
    //$_SESSION['login_url'] = $cpath;
    //$_SESSION['logout_url'] = $cpath;
    htmlhead();
    contentbody();
    contentheader();
    start_content();
}
示例#2
0
function display()
{
    global $miner, $port;
    global $mcast, $mcastexpect;
    global $readonly, $notify, $rigs;
    global $ignorerefresh, $autorefresh;
    global $allowcustompages, $customsummarypages;
    global $placebuttons;
    global $userlist, $ses;
    $pagesonly = checklogin();
    if ($pagesonly === 'login') {
        return;
    }
    $mcerr = '';
    if ($rigs == null or count($rigs) == 0) {
        if ($mcast === true) {
            $action = 'found';
        } else {
            $action = 'defined';
        }
        minhead();
        otherrow("<td class=bad>No rigs {$action}</td>");
        return;
    } else {
        if ($mcast === true && count($rigs) < $mcastexpect) {
            $mcerr = othrow('<td class=bad>Found ' . count($rigs) . " rigs but expected at least {$mcastexpect}</td>");
        }
    }
    if ($ignorerefresh == false) {
        $ref = trim(getparam('ref', true));
        if ($ref != null && $ref != '') {
            $autorefresh = intval($ref);
        }
    }
    if ($pagesonly !== true) {
        $rig = trim(getparam('rig', true));
        $arg = trim(getparam('arg', true));
        $preprocess = null;
        if ($arg != null and $arg != '') {
            if ($rig != null and $rig != '' and $rig >= 0 and $rig < count($rigs)) {
                $parts = explode(':', $rigs[$rig], 3);
                if (count($parts) >= 2) {
                    $miner = $parts[0];
                    $port = $parts[1];
                    if ($readonly !== true) {
                        $preprocess = $arg;
                    }
                }
            }
        }
    }
    if ($allowcustompages === true) {
        $pg = trim(getparam('pg', true));
        if ($pagesonly === true) {
            if ($pg !== null && $pg !== '') {
                if ($userlist !== null && isset($userlist['def']) && !in_array($pg, $userlist['def'])) {
                    $pg = null;
                }
            } else {
                if ($userlist !== null && isset($userlist['def'])) {
                    foreach ($userlist['def'] as $pglook) {
                        if (isset($customsummarypages[$pglook])) {
                            $pg = $pglook;
                            break;
                        }
                    }
                }
            }
        }
        if ($pg !== null && $pg !== '') {
            htmlhead($mcerr, false, null, $pg);
            showcustompage($pg, $mcerr);
            return;
        }
    }
    if ($pagesonly === true) {
        onlylogin();
        return;
    }
    if (count($rigs) == 1) {
        $parts = explode(':', $rigs[0], 3);
        if (count($parts) >= 2) {
            $miner = $parts[0];
            $port = $parts[1];
            htmlhead($mcerr, true, 0);
            doOne(0, $preprocess);
        } else {
            minhead($mcerr);
            otherrow('<td class=bad>Invalid "$rigs" array</td>');
        }
        return;
    }
    if ($rig != null and $rig != '' and $rig >= 0 and $rig < count($rigs)) {
        $parts = explode(':', $rigs[$rig], 3);
        if (count($parts) >= 2) {
            $miner = $parts[0];
            $port = $parts[1];
            htmlhead($mcerr, true, 0);
            doOne($rig, $preprocess);
        } else {
            minhead($mcerr);
            otherrow('<td class=bad>Invalid "$rigs" array</td>');
        }
        return;
    }
    htmlhead($mcerr, false, null);
    if ($placebuttons == 'top' || $placebuttons == 'both') {
        pagebuttons(null, null);
    }
    if ($preprocess != null) {
        process(array($preprocess => $preprocess), $rig);
    }
    newtable();
    doforeach('version', 'rig summary', array(), array(), true);
    $sum = array('MHS av', 'Getworks', 'Found Blocks', 'Accepted', 'Rejected', 'Discarded', 'Stale', 'Utility', 'Local Work', 'Total MH', 'Work Utility', 'Diff1 Shares', 'Diff1 Work', 'Difficulty Accepted', 'Difficulty Rejected', 'Difficulty Stale');
    doforeach('summary', 'summary information', $sum, array(), false);
    endtable();
    otherrow('<td><br><br></td>');
    newtable();
    doforeach('devs', 'device list', $sum, array('' => '', 'ID' => '', 'Name' => ''), false);
    endtable();
    otherrow('<td><br><br></td>');
    newtable();
    doforeach('pools', 'pool list', $sum, array('' => ''), false);
    endtable();
    if ($placebuttons == 'bot' || $placebuttons == 'both') {
        pagebuttons(null, null);
    }
}
示例#3
0
function display()
{
    global $miner, $port;
    global $mcast, $mcastexpect;
    global $readonly, $notify, $rigs;
    global $ignorerefresh, $autorefresh;
    global $allowcustompages;
    global $placebuttons;
    global $userlist, $ses;
    $pagesonly = checklogin();
    if ($pagesonly === 'login') {
        return;
    }
    $mcerr = '';
    if ($rigs == null or count($rigs) == 0) {
        if ($mcast === true) {
            $action = 'found';
        } else {
            $action = 'defined';
        }
        minhead();
        otherrow("<td class=bad>No rigs {$action}</td>");
        return;
    } else {
        if ($mcast === true && count($rigs) < $mcastexpect) {
            $mcerr = othrow('<td class=bad>Found ' . count($rigs) . " rigs but expected at least {$mcastexpect}</td>");
        }
    }
    if ($ignorerefresh == false) {
        $ref = trim(getparam('ref', true));
        if ($ref != null && $ref != '') {
            $autorefresh = intval($ref);
        }
    }
    if ($pagesonly !== true) {
        $rig = trim(getparam('rig', true));
        $arg = trim(getparam('arg', true));
        $preprocess = null;
        if ($arg != null and $arg != '') {
            if ($rig != null and $rig != '' and $rig >= 0 and $rig < count($rigs)) {
                $parts = explode(':', $rigs[$rig], 3);
                if (count($parts) >= 1) {
                    $miner = $parts[0];
                    if (count($parts) >= 2) {
                        $port = $parts[1];
                    } else {
                        $port = '';
                    }
                    if ($readonly !== true) {
                        $preprocess = $arg;
                    }
                }
            }
        }
    }
    if ($allowcustompages === true) {
        $pg = urlencode(trim(getparam('pg', true)));
        if ($pagesonly === true) {
            if ($pg !== null && $pg !== '') {
                if ($userlist !== null && isset($userlist['def']) && !in_array($pg, $userlist['def'])) {
                    $pg = null;
                }
            } else {
                if ($userlist !== null && isset($userlist['def'])) {
                    foreach ($userlist['def'] as $pglook) {
                        if (getcsp($pglook) !== false) {
                            $pg = $pglook;
                            break;
                        }
                    }
                }
            }
        }
        if ($pg !== null && $pg !== '') {
            htmlhead($mcerr, false, null, $pg);
            showcustompage($pg);
            return;
        }
    }
    if ($pagesonly === true) {
        onlylogin();
        return;
    }
    if (count($rigs) == 1) {
        $parts = explode(':', $rigs[0], 3);
        if (count($parts) >= 1) {
            $miner = $parts[0];
            if (count($parts) >= 2) {
                $port = $parts[1];
            } else {
                $port = '';
            }
            htmlhead($mcerr, true, 0);
            doOne(0, $preprocess);
        } else {
            minhead($mcerr);
            otherrow('<td class=bad>Invalid "$rigs" array</td>');
        }
        return;
    }
    if ($rig != null and $rig != '' and $rig >= 0 and $rig < count($rigs)) {
        $parts = explode(':', $rigs[$rig], 3);
        if (count($parts) >= 1) {
            $miner = $parts[0];
            if (count($parts) >= 2) {
                $port = $parts[1];
            } else {
                $port = '';
            }
            htmlhead($mcerr, true, 0);
            doOne($rig, $preprocess);
        } else {
            minhead($mcerr);
            otherrow('<td class=bad>Invalid "$rigs" array</td>');
        }
        return;
    }
    htmlhead($mcerr, false, null);
    if ($preprocess != null) {
        process(array($preprocess => $preprocess), $rig);
    }
    if (getcsp('Summary', true) !== false) {
        showcustompage('Summary', true);
    }
}
示例#4
0
function module_html_header_admin($title)
{
    global $usermenu, $adminmenu, $freemenu, $css_file;
    htmlhead();
    ?>
	
	<body>
	<div class="banner">
	<h1><a href="index.php">Gutta fra Calcutta</a></h1>
	<?php 
    $query = "SELECT count(articleid) AS no_articles FROM articles WHERE is_deleted IS NULL AND comment_to IS NULL;";
    $result = DB_search($query);
    echo "<span>NÃ¥ med " . $result['no_articles'] . " artikler om spennende ting</span>";
    ?>
	
	</div>

	<?php 
    do_greeting();
}
示例#5
0
文件: miner.php 项目: nushor/cgminer
function display()
{
    global $miner, $port;
    global $readonly, $notify, $rigs;
    global $ignorerefresh, $autorefresh;
    global $allowcustompages;
    global $placebuttons;
    if ($ignorerefresh == false) {
        $ref = trim(getparam('ref', true));
        if ($ref != null && $ref != '') {
            $autorefresh = intval($ref);
        }
    }
    $rig = trim(getparam('rig', true));
    $arg = trim(getparam('arg', true));
    $preprocess = null;
    if ($arg != null and $arg != '') {
        $num = null;
        if ($rig != null and $rig != '') {
            if ($rig >= 0 and $rig < count($rigs)) {
                $num = $rig;
            }
        } else {
            if (count($rigs) == 0) {
                $num = 0;
            }
        }
        if ($num != null) {
            $parts = explode(':', $rigs[$num], 3);
            if (count($parts) >= 2) {
                $miner = $parts[0];
                $port = $parts[1];
                $preprocess = $arg;
            }
        }
    }
    if ($rigs == null or count($rigs) == 0) {
        otherrow("<td>No rigs defined</td>");
        return;
    }
    if ($allowcustompages === true) {
        $pg = trim(getparam('pg', true));
        if ($pg != null && $pg != '') {
            showcustompage($pg);
            return;
        }
    }
    if (count($rigs) == 1) {
        $parts = explode(':', $rigs[0], 3);
        if (count($parts) >= 2) {
            $miner = $parts[0];
            $port = $parts[1];
            doOne(0, $preprocess);
        } else {
            otherrow('<td>Invalid "$rigs" array</td>');
        }
        return;
    }
    if ($rig != null and $rig != '' and $rig >= 0 and $rig < count($rigs)) {
        $parts = explode(':', $rigs[$rig], 3);
        if (count($parts) >= 2) {
            $miner = $parts[0];
            $port = $parts[1];
            doOne($rig, $preprocess);
        } else {
            otherrow('<td>Invalid "$rigs" array</td>');
        }
        return;
    }
    htmlhead(false, null);
    if ($placebuttons == 'top' || $placebuttons == 'both') {
        pagebuttons(null, null);
    }
    if ($preprocess != null) {
        process(array($preprocess => $preprocess), $rig);
    }
    newtable();
    doforeach('version', 'rig summary', array(), array(), true);
    $sum = array('MHS av', 'Getworks', 'Found Blocks', 'Accepted', 'Rejected', 'Discarded', 'Stale', 'Utility', 'Local Work', 'Total MH');
    doforeach('summary', 'summary information', $sum, array(), false);
    endtable();
    otherrow('<td><br><br></td>');
    newtable();
    doforeach('devs', 'device list', $sum, array('' => '', 'ID' => '', 'Name' => ''), false);
    endtable();
    otherrow('<td><br><br></td>');
    newtable();
    doforeach('pools', 'pool list', $sum, array('' => ''), false);
    endtable();
    if ($placebuttons == 'bot' || $placebuttons == 'both') {
        pagebuttons(null, null);
    }
}
示例#6
0
 $v = @ini_get("open_basedir");
 if ($v or strtolower($v) == "on") {
     $openbasedir = TRUE;
     $hopenbasedir = "<font color=red>" . $v . "</font>";
 } else {
     $openbasedir = FALSE;
     $hopenbasedir = "<font color=green>OFF (not secure)</font>";
 }
 ##################
 ##[ HTML START ]##
 ##################
 function srv_info($title, $contents)
 {
     echo "<tr><th>{$title}</th><td>:</td><td>{$contents}</td></tr>\n";
 }
 echo htmlhead($hsafemode);
 echo "<table id=pagebar>";
 echo "<tr><td colspan=2>\n";
 echo "<div class=fleft>{$hsafemode}</div>\n";
 echo "<div class=fright>";
 echo "IP Address: <a href=\"http://ws.arin.net/cgi-bin/whois.pl?queryinput=" . @gethostbyname($_SERVER["HTTP_HOST"]) . "\">" . @gethostbyname($_SERVER["HTTP_HOST"]) . "</a> " . "You: <a href=\"http://ws.arin.net/cgi-bin/whois.pl?queryinput=" . $_SERVER["REMOTE_ADDR"] . "\">" . $_SERVER["REMOTE_ADDR"] . "</a> " . ($win ? "Drives: " . disp_drives($d, $surl) : "");
 echo "</div>\n</td></tr>\n";
 echo "<tr><td width=50%>\n";
 echo "<table class=info>\n";
 srv_info("Software", "" . $DISP_SERVER_SOFTWARE);
 srv_info("Uname", php_uname());
 srv_info("User", $win ? get_current_user() . " (uid=" . getmyuid() . " gid=" . getmygid() . ")" : dQ99exec("id"));
 echo "</table></td>\n" . "<td width=50%>\n";
 echo "<table class=info>\n";
 srv_info("Freespace", disp_freespace($d));
 echo "</table></td></tr>\n";
示例#7
0
" />
<title>Amidala<?php 
    if (isset($_REQUEST['smith'])) {
        echo '[' . intval($_REQUEST['smith']) . ']';
    }
    ?>
 - ver. <?php 
    echo $ver_serial;
    if (ip() == '127.0.0.1') {
        echo ' <Local Connection>';
    }
    ?>
 </title>
<?php 
}
htmlhead();
?>
<script type="text/javascript">
var s;
function doKeyDown(ev){
	if(navigator.userAgent.match("Gecko")){
		kc=ev.which;
	}else{
		kc=ev.keyCode;
	}
	getobj('help').innerHTML='Key '+kc+' is down';
	if (ev.ctrlKey && kc == 13){
		getobj('form').submit();
		return false;
	}
}