diff --git a/css/main.css b/css/main.css
index 6e29da1..070dda7 100644
--- a/css/main.css
+++ b/css/main.css
@@ -11,6 +11,10 @@
/* margin: 0px; */
}
+.container.tab-holder {
+ margin-bottom: 20px;
+}
+
img.img.img-responsive.market-logo {
width: 160px;
}
diff --git a/function/hitbtc.php b/function/hitbtc.php
index ca15d9e..f3f401e 100644
--- a/function/hitbtc.php
+++ b/function/hitbtc.php
@@ -42,8 +42,31 @@ function getBuy ($currencypair) {
}
+function updateBuy ($buy, $currencypair)
+{
+ require '../database/database.php';
+ $query = $pdo->prepare('UPDATE hibtc SET current_buy = :buy WHERE currencypair = :currencypair');
+ $query->bindParam(':currencypair' , $currencypair);
+ $query->bindParam(':buy' , $buy);
+ if ($query->execute()) {
+ return true;
+ }else {
+ return false;
+ }
+}
-
+function updateEthBuy ($buy, $currencypair)
+{
+ require '../database/database.php';
+ $query = $pdo->prepare('UPDATE hibtceth SET current_buy = :buy WHERE currencypair = :currencypair');
+ $query->bindParam(':currencypair' , $currencypair);
+ $query->bindParam(':buy' , $buy);
+ if ($query->execute()) {
+ return true;
+ }else {
+ return false;
+ }
+}
function saveData ($coin, $symbol) {
@@ -65,6 +88,25 @@ function saveData ($coin, $symbol) {
}
+function saveEthData ($coin, $symbol) {
+
+ require '../database/database.php';
+ $query = $pdo->prepare('INSERT into hibtceth (coin, symbol) values (:coin, :symbol) ');
+ $query->bindParam(':coin' , $coin);
+ $query->bindParam(':symbol' , $symbol);
+
+ if ($query->execute()) {
+
+ return true;
+
+ }else {
+
+ return false;
+
+ }
+
+}
+
function updateTable ($symbol, $currencypair)
{
require '../database/database.php';
@@ -78,12 +120,25 @@ function updateTable ($symbol, $currencypair)
}
}
-function updateBuy ($buy, $currencypair)
+function updateEthTable ($symbol, $currencypair)
{
require '../database/database.php';
- $query = $pdo->prepare('UPDATE hibtc SET current_buy = :buy WHERE currencypair = :currencypair');
+ $query = $pdo->prepare('UPDATE hibtceth SET currencypair = :currencypair WHERE symbol = :symbol');
$query->bindParam(':currencypair' , $currencypair);
- $query->bindParam(':buy' , $buy);
+ $query->bindParam(':symbol' , $symbol);
+ if ($query->execute()) {
+ return true;
+ }else {
+ return false;
+ }
+}
+
+function saveEth ($coin, $symbol)
+{
+ require '../database/database.php';
+ $query = $pdo->prepare('INSERT into hibtceth (coin, symbol) values (:coin, :symbol) ');
+ $query->bindParam(':coin' , $coin);
+ $query->bindParam(':symbol' , $symbol);
if ($query->execute()) {
return true;
}else {
@@ -103,6 +158,18 @@ function updateTotalBuy ($total_buy_trade)
}
}
+function updateTotalBuyEthMarket ($total_buy_trade)
+{
+ require '../database/database.php';
+ $query = $pdo->prepare('UPDATE hibtceth SET total_buy_trade = :total_buy_trade');
+ $query->bindParam(':total_buy_trade' , $total_buy_trade);
+ if ($query->execute()) {
+ return true;
+ }else {
+ return false;
+ }
+}
+
function getAll ()
{
require '../database/database.php';
@@ -114,6 +181,19 @@ function getAll ()
return $data;
+}
+
+function getAllEthMarket ()
+{
+ require '../database/database.php';
+ $query = $pdo->prepare('SELECT * FROM hibtceth ORDER BY buy DESC LIMIT 30');
+
+ if ($query->execute()) {
+ $data = $query->fetchAll(PDO::FETCH_ASSOC);
+ }
+
+ return $data;
+
}
diff --git a/hitbtc/ethmarket.php b/hitbtc/ethmarket.php
new file mode 100644
index 0000000..7d2687b
--- /dev/null
+++ b/hitbtc/ethmarket.php
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+ Popular Cryptocurrencies
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HitBTC ETH Market Cryptocurrencies Trade Guide
+
+
+
+
+
+
+
Top Gaining Cryptocurrencies
+
+
+
+
+ S/no |
+ Coin |
+ Currency Pair |
+ Buy trade Vol. |
+ Total buy trade vol. |
+ Buy trade Vol. 5mins ago |
+ Total buy trade vol. 5 mins ago |
+
+
+
+
+
+
+ $coin) {
+
+ // $new_value = $coin['current_buy'];
+ // $old_value = $coin['buy'];
+ // $current_total_trade_volume = $coin['total_buy_trade'];
+ // $difference = abs($new_value - $old_value);
+ // $current_percentage = (($new_value / $current_total_trade_volume ) * 100);
+ // $current_percentage = round( $current_percentage , 2, PHP_ROUND_HALF_EVEN);
+
+ ?>
+
+
+ =$counter;?> |
+ =$coin['coin'];?> |
+ =$coin['currencypair'];?> |
+
+
+ =$coin['buy'];?> |
+ =$coin['last_total_buy_trade'];?> |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hitbtc/market.php b/hitbtc/market.php
index f2590db..5b49475 100644
--- a/hitbtc/market.php
+++ b/hitbtc/market.php
@@ -3,6 +3,8 @@
$coins = getAll();
+ $coins_eth = getAllEthMarket();
+
if (isset($_POST['go'])) {
function redirect($location) {
@@ -47,78 +49,190 @@ function redirect($location) {
?>
- HitBTC Cryptocurrencies Trade Guide
-
-
+
+
+
+
+
+
+
+
+
+
HitBTC BTC MARKET Cryptocurrencies Trade Guide
+
+
+
+
+
Top Gaining Cryptocurrencies
+
+
+
+
+ S/no |
+ Coin |
+ Currency Pair |
+ Buy trade Vol. |
+ Total buy trade vol. |
+ Buy trade Vol. 5mins ago |
+ Total buy trade vol. 5 mins ago |
+
+
+
+
+
+
+ $coin) {
+
+ $new_value = $coin['current_buy'];
+ $old_value = $coin['buy'];
+ $current_total_trade_volume = $coin['total_buy_trade'];
+ $difference = abs($new_value - $old_value);
+ $current_percentage = (($new_value / $current_total_trade_volume ) * 100);
+ $current_percentage = round( $current_percentage , 2, PHP_ROUND_HALF_EVEN);
+
+ ?>
+
+
+ =$counter;?> |
+ =$coin['coin'];?> |
+ =$coin['currencypair'];?> |
+ =$coin['current_buy'];?> |
+ =$coin['total_buy_trade'];?> |
+ =$coin['buy'];?> |
+ =$coin['last_total_buy_trade'];?> |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HitBTC ETH Market Cryptocurrencies Trade Guide
+
+
+
+
+
+
+
Top Gaining Cryptocurrencies
+
+
+
+
+ S/no |
+ Coin |
+ Currency Pair |
+ Buy trade Vol. |
+ Total buy trade vol. |
+ Buy trade Vol. 5mins ago |
+ Total buy trade vol. 5 mins ago |
+ % Change |
+
+
+
+
+
+ $coin) {
+
+ $new_value = $coin['current_buy'];
+ $old_value = $coin['buy'];
+ $current_total_trade_volume = $coin['total_buy_trade'];
+ $difference = abs($new_value - $old_value);
+ $current_percentage = (($new_value / $current_total_trade_volume ) * 100);
+ $current_percentage = round( $current_percentage , 2, PHP_ROUND_HALF_EVEN);
+
+ ?>
+
+
+ =$counter;?> |
+ =$coin['coin'];?> |
+ =$coin['currencypair'];?> |
+ =$coin['current_buy'];?> |
+ =$coin['total_buy_trade'];?> |
+ =$coin['buy'];?> |
+ =$coin['last_total_buy_trade'];?> |
+ =$current_percentage;?> |
+
+
+
-
+
-
Top Gaining Cryptocurrencies
-
-
-
- S/no |
- Coin |
- Currency Pair |
- Buy trade Vol. |
- Total buy trade vol. |
- Buy trade Vol. 5mins ago |
- Total buy trade vol. 5 mins ago |
-
+ ?>
-
-
-
+
+
-
- $counter = 1;
- foreach ($coins as $key => $coin) {
- $new_value = $coin['current_buy'];
- $old_value = $coin['buy'];
- $current_total_trade_volume = $coin['total_buy_trade'];
- $difference = abs($new_value - $old_value);
- $current_percentage = (($new_value / $current_total_trade_volume ) * 100);
- $current_percentage = round( $current_percentage , 2, PHP_ROUND_HALF_EVEN);
- ?>
+
-
- =$counter;?> |
- =$coin['coin'];?> |
- =$coin['currencypair'];?> |
- =$coin['current_buy'];?> |
- =$coin['total_buy_trade'];?> |
- =$coin['buy'];?> |
- =$coin['last_total_buy_trade'];?> |
-
-
+
+
-
- ?>
-
-
-
+