pool/web/yaamp/ui/main.php
Tanguy Pruvot c9c7a27dcf Fixes to handle the newer framework and jquery assets
double check the web/assets folder is writable by your web server...

so, jquery-ui bundled in this framework is now the v1.10.4
and jquery at the v1.11.1
2016-05-01 19:10:23 +02:00

144 lines
4.6 KiB
PHP

<?php
require('misc.php');
echo <<<END
<!doctype html>
<!--[if IE 7 ]> <html class="no-js ie ie7 lte7 lte8 lte9" lang="en-US"> <![endif]-->
<!--[if IE 8 ]> <html class="no-js ie ie8 lte8 lte9" lang="en-US"> <![endif]-->
<!--[if IE 9 ]> <html class="no-js ie ie9 lte9>" lang="en-US"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="yet another anonymous mining pool for bitcoin and altcoin with auto profit switch and auto exchange">
<meta name="keywords" content="anonymous,mining,pool,maxcoin,bitcoin,altcoin,auto,switch,exchange,profit,scrypt,x11,x13,x14,x15,lyra2,lyra2re,neoscrypt,sha256,quark,skein2,zr5">
END;
$pageTitle = empty($this->pageTitle) ? YAAMP_SITE_NAME : YAAMP_SITE_NAME." - ".$this->pageTitle;
echo '<title>'.$pageTitle.'</title>';
echo CHtml::cssFile("/extensions/jquery/themes/ui-lightness/jquery-ui.css");
echo CHtml::cssFile('/yaamp/ui/css/main.css');
echo CHtml::cssFile('/yaamp/ui/css/table.css');
//echo CHtml::scriptFile('/extensions/jquery/js/jquery-1.8.3-dev.js');
//echo CHtml::scriptFile('/extensions/jquery/js/jquery-ui-1.9.1.custom.min.js');
$cs = app()->getClientScript();
$cs->registerCoreScript('jquery.ui');
//$cs->registerScriptFile('/yaamp/ui/js/jquery.tablesorter.js', CClientScript::POS_END);
echo CHtml::scriptFile('/yaamp/ui/js/jquery.tablesorter.js');
// if(!controller()->admin)
// echo <<<end
// <script>
// (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
// (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
// m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
// })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
// ga('create', 'UA-58136019-1', 'auto');
// ga('send', 'pageview');
// $(document).ajaxSuccess(function(){ga('send', 'pageview');});
// </script>
// end;
echo "</head>";
///////////////////////////////////////////////////////////////
echo '<body class="page">';
echo '<a href="/site/mainbtc" style="display: none;">main</a>';
showPageHeader();
showPageContent($content);
showPageFooter();
echo "</body></html>";
return;
/////////////////////////////////////////////////////////////////////
function showItemHeader($selected, $url, $name)
{
if($selected) $selected_text = "class='selected'";
else $selected_text = '';
echo "<span><a $selected_text href='$url'>$name</a></span>";
echo "&nbsp;";
}
function showPageHeader()
{
echo '<div class="tabmenu-out">';
echo '<div class="tabmenu-inner">';
echo '&nbsp;&nbsp;<a href="/">'.YAAMP_SITE_NAME.'</a>';
$action = controller()->action->id;
$wallet = user()->getState('yaamp-wallet');
$ad = isset($_GET['address']);
showItemHeader(controller()->id=='site' && $action=='index' && !$ad, '/', 'Home');
showItemHeader($action=='mining', '/site/mining', 'Pool');
showItemHeader(controller()->id=='site'&&($action=='index' || $action=='wallet') && $ad, "/?address=$wallet", 'Wallet');
showItemHeader(controller()->id=='stats', '/stats', 'Graphs');
showItemHeader($action=='miners', '/site/miners', 'Miners');
if (YIIMP_PUBLIC_EXPLORER)
showItemHeader(controller()->id=='explorer', '/explorer', 'Explorers');
if (YAAMP_RENTAL)
showItemHeader(controller()->id=='renting', '/renting', 'Rental');
if(controller()->admin)
{
if (strpos(YAAMP_ADMIN_IP, $_SERVER['REMOTE_ADDR']) === false)
debuglog("admin {$_SERVER['REMOTE_ADDR']}");
showItemHeader(controller()->id=='coin', '/coin', 'Coins');
showItemHeader($action=='common', '/site/common', 'Dashboard');
showItemHeader(controller()->id=='site'&&$action=='admin', "/site/admin", 'Wallets');
if (YAAMP_RENTAL)
showItemHeader(controller()->id=='renting' && $action=='admin', '/renting/admin', 'Jobs');
if (YAAMP_ALLOW_EXCHANGE)
showItemHeader(controller()->id=='trading', '/trading', 'Trading');
if (YAAMP_USE_NICEHASH_API)
showItemHeader(controller()->id=='nicehash', '/nicehash', 'Nicehash');
}
echo '<span style="float: right;">';
$mining = getdbosql('db_mining');
$nextpayment = date('H:i T', $mining->last_payout+YAAMP_PAYMENTS_FREQ);
echo '<span style="font-size: .8em;">Next Payout: '.$nextpayment.'</span>';
echo "</div>";
echo "</div>";
}
function showPageFooter()
{
echo '<div class="footer">';
$year = date("Y", time());
echo "<p>&copy; $year ".YAAMP_SITE_NAME.' - '.
'<a href="http://github.com/tpruvot/yiimp">Open source Project</a></p>';
echo '</div><!-- footer -->';
}