new common function for the admin sidebar links

This commit is contained in:
Tanguy Pruvot 2015-09-19 05:47:13 +02:00
parent 5d3cb76563
commit e5d643fa1d
15 changed files with 55 additions and 162 deletions

View file

@ -408,3 +408,21 @@ function yaamp_renter_account($renter)
}
/////////////////////////////////////////////////////////////////////////////////////////////
function getAdminSideBarLinks()
{
$links = <<<end
<a href="/site/common">Summary</a>&nbsp;
<a href="/site/admin">Coins</a>&nbsp;
<a href="/site/exchange">Exchange</a>&nbsp;
<a href="/site/user">Users</a>&nbsp;
<a href="/site/worker">Workers</a>&nbsp;
<a href="/site/version">Version</a>&nbsp;
<a href="/site/earning">Earnings</a>&nbsp;
<a href="/site/payments">Payments</a>&nbsp;
<a href="/site/monsters">Big Miners</a>&nbsp;
<a href="/site/emptymarkets">Empty Markets</a>&nbsp;
end;
return $links;
}

View file

@ -1,19 +1,10 @@
<?php
echo getAdminSideBarLinks();
$server = getparam('server');
echo <<<end
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/exchange'>Exchange</a>&nbsp;
<a href='/site/user?symbol=BTC'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<a href='/site/monsters'>Big Miners</a>&nbsp;
<a href='/site/emptymarkets'>EmptyMarket</a>&nbsp;
<div align="right" style="margin-top: -14px;">
Select Server:
<select id='server_select'>

View file

@ -1,14 +1,3 @@
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/exchange'>Exchange</a>&nbsp;
<a href='/site/user?symbol=BTC'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<br>
<?php
$id = getiparam('id');
@ -17,6 +6,8 @@ if (!$coin) {
$this->goback();
}
echo getAdminSideBarLinks()."<br>";
$remote = new Bitcoin($coin->rpcuser, $coin->rpcpasswd, $coin->rpchost, $coin->rpcport);
$info = $remote->getinfo();

View file

@ -1,15 +1,8 @@
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/user?symbol=BTC'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<?php
echo "<a href='/site/coin?id=$coin->id'>$coin->name</a><br>";
echo getAdminSideBarLinks();
echo " - <a href='/site/coin?id=$coin->id'>$coin->name</a><br>";
//include "current.php";
$this->widget('UniForm');

View file

@ -5,23 +5,15 @@ JavascriptFile("/extensions/jqplot/plugins/jqplot.dateAxisRenderer.js");
JavascriptFile("/extensions/jqplot/plugins/jqplot.barRenderer.js");
JavascriptFile("/extensions/jqplot/plugins/jqplot.highlighter.js");
echo getAdminSideBarLinks();
//<a href='/site/memcached'>Memcache</a>&nbsp;
//<a href='/site/eval'>Eval</a>&nbsp;
//<a href='/renting/admin'>Jobs</a>&nbsp;
?>
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/exchange'>Exchange</a>&nbsp;
<a href='/site/user?symbol=BTC'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<a href='/site/monsters'>Big Miners</a>&nbsp;
<a href='/site/connections'>Conns</a>&nbsp;
<a href='/site/emptymarkets'>EmptyMarket</a>&nbsp;
<a href='/coin'>New</a>&nbsp;
<?php if (YAAMP_RENTAL) : ?>
<a href='/renting/admin'>Rental</a>&nbsp;
<?php endif; ?>

View file

@ -1,17 +1,8 @@
<?php
echo <<<end
echo getAdminSideBarLinks();
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/exchange'>Exchange</a>&nbsp;
<a href='/site/user'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<a href='/site/monsters'>Big Miners</a>&nbsp;
<a href='/site/emptymarkets'>EmptyMarket</a>&nbsp;
echo <<<end
<div id='main_results'></div>

View file

@ -1,12 +1,6 @@
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/exchange'>Exchange</a>&nbsp;
<a href='/site/user?symbol=BTC'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<?php
echo getAdminSideBarLinks();
?>
<div id='main_results'></div>

View file

@ -1,5 +1,7 @@
<?php
echo getAdminSideBarLinks()."<br>";
echo "<br><table class='dataGrid'>";
echo "<thead>";
echo "<tr>";

View file

@ -1,12 +1,6 @@
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/exchange'>Exchange</a>&nbsp;
<a href='/site/user?symbol=BTC'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<?php
echo getAdminSideBarLinks();
?>
<div id='main_results'></div>

View file

@ -18,42 +18,6 @@ echo "<th>Value</th>";
echo "</tr>";
echo "</thead><tbody>";
/* to move in an include file */
function getMarketUrl($coin, $marketName)
{
$symbol = !empty($coin->symbol2) ? $coin->symbol2 : $coin->symbol;
$lowsymbol = strtolower($symbol);
if($marketName == 'cryptsy')
$url = "https://www.cryptsy.com/markets/view/{$symbol}_BTC";
else if($marketName == 'bittrex')
$url = "https://bittrex.com/Market/Index?MarketName=BTC-{$symbol}";
else if($marketName == 'poloniex')
$url = "https://poloniex.com/exchange#btc_{$lowsymbol}";
else if($marketName == 'bleutrade')
$url = "https://bleutrade.com/exchange/{$symbol}/BTC";
else if($marketName == 'c-cex')
$url = "https://c-cex.com/?p={$lowsymbol}-btc";
else if($marketName == 'jubi')
$url = "http://jubi.com/coin/{$lowsymbol}";
else if($marketName == 'yobit')
$url = "https://yobit.net/en/trade/{$symbol}/BTC";
else if($marketName == 'cryptopia')
$url = "https://www.cryptopia.co.nz/Exchange?market={$symbol}_BTC";
else if($marketName == 'alcurex')
$url = "https://alcurex.org/index.php/crypto/market?pair={$lowsymbol}_btc";
else if($marketName == 'allcoin')
$url = "https://www.allcoin.com/trade/{$symbol}_BTC";
else if($marketName == 'banx')
$url = "https://www.banx.io/trade?c={$symbol}&p=BTC";
else if($marketName == 'bitex')
$url = "https://bitex.club/markets/{$lowsymbol}btc";
else
$url = "";
return $url;
}
$totalvalue = 0;
$totalbid = 0;

View file

@ -1,17 +1,7 @@
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/exchange'>Exchange</a>&nbsp;
<a href='/site/user?symbol=BTC'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<a href='/site/monsters'>Big Miners</a>&nbsp;
<a href='/site/emptymarkets'>EmptyMarket</a>&nbsp;
<?php
echo getAdminSideBarLinks();
echo <<<end
<div align="right" style="margin-top: -14px;">
<input class="search" type="search" data-column="all" style="width: 140px;" placeholder="Search..." />

View file

@ -1,12 +1,6 @@
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/exchange'>Exchange</a>&nbsp;
<a href='/site/user'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<?php
echo getAdminSideBarLinks();
?>
<div id='main_results'></div>

View file

@ -3,7 +3,7 @@
$symbol = getparam('symbol');
$string = "<option value='all'>-all-</option>";
$list = getdbolist('db_coins', "enable and id in (select distinct coinid from accounts where balance>0.0001)");
$list = getdbolist('db_coins', "enable AND id IN (select distinct coinid from accounts where balance>0.0001)");
foreach($list as $coin)
{
if($coin->symbol == $symbol)
@ -12,21 +12,12 @@ foreach($list as $coin)
$string .= "<option value='$coin->symbol'>$coin->symbol</option>";
}
echo getAdminSideBarLinks();
echo <<<end
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/exchange'>Exchange</a>&nbsp;
<a href='/site/user'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<a href='/site/monsters'>Big Miners</a>&nbsp;
<a href='/site/emptymarkets'>EmptyMarket</a>&nbsp;
<div>
Select Algo: <select id='coin_select'>$string</select>&nbsp;
<div align="right" style="margin-top: -14px;">
Select coin: <select id='coin_select'>$string</select>&nbsp;
</div>
<div id='main_results'></div>

View file

@ -1,12 +1,6 @@
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/exchange'>Exchange</a>&nbsp;
<a href='/site/user'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<?php
echo getAdminSideBarLinks();
?>
<div id='main_results'></div>

View file

@ -1,12 +1,6 @@
<a href='/site/common'>Summary</a>&nbsp;
<a href='/site/admin'>Coins</a>&nbsp;
<a href='/site/exchange'>Exchange</a>&nbsp;
<a href='/site/user'>Users</a>&nbsp;
<a href='/site/worker'>Workers</a>&nbsp;
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<?php
echo getAdminSideBarLinks();
?>
<div id='main_results'></div>