search icon

Οικονομία

Warrant

{source} <style type=”text/css”>.bg-red{background: linear-gradient(to right, red , rgb(69, 69, 69));}.bg-grey{background: linear-gradient(to right, #363232 , rgb(103, 103, 103));}.bg-green{background: linear-gradient(to right, #009500 , rgb(0, 58, 7));}a.white {color: #D7D7D7;}.li {color:#D7D7D7;}.stkup a{color:#009500;}.stkdown a{color:#8d0200;}.stksame a{color:#363232;}.stkup {color:#009500;}.stkdown {color:#8d0200;}.stksame {color:#363232;}.arr {float:left;}.xrti {background: #242555;height: 25px;margin-left: 0;color: #D7D7D7;}.mr {margin-left: 25px!important;}div#all_stocks {padding-top: 15px;}</style> <?php $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array(‘instrSysName’, ‘instrCode’, ‘price’, ‘instrName’, ‘pricePrevClosePricePDelta’ […]

{source}

<style type=”text/css”>
.bg-red{background: linear-gradient(to right, red , rgb(69, 69, 69));}
.bg-grey{background: linear-gradient(to right, #363232 , rgb(103, 103, 103));}
.bg-green{background: linear-gradient(to right, #009500 , rgb(0, 58, 7));}
a.white {color: #D7D7D7;}
.li {color:#D7D7D7;}
.stkup a{color:#009500;}
.stkdown a{color:#8d0200;}
.stksame a{color:#363232;}
.stkup {color:#009500;}
.stkdown {color:#8d0200;}
.stksame {color:#363232;}
.arr {float:left;}
.xrti {background: #242555;height: 25px;margin-left: 0;color: #D7D7D7;}
.mr {margin-left: 25px!important;}
div#all_stocks {padding-top: 15px;}
</style>

<?php

$db = JFactory::getDBO();

$query = $db->getQuery(true);

$query->select($db->quoteName(array(‘instrSysName’, ‘instrCode’, ‘price’, ‘instrName’, ‘pricePrevClosePricePDelta’ )));
$query->from($db->quoteName(‘#__inbroke_info_warrant’));

$db->setQuery($query);

$res = $db->loadAssocList();

$milivar = $res;
$length = count($milivar);
//$link = “<a href=”‘hhh'”> “;

function my_number_format($number, $dec_point, $thousands_sep)
{
$was_neg = $number < 0; // Because +0 == -0
$number = abs($number);

$tmp = explode(‘.’, $number);
$out = number_format($tmp[0], 0, $dec_point, $thousands_sep);
if (isset($tmp[1])) $out .= $dec_point.$tmp[1];

if ($was_neg) $out = “-$out”;
return $out;
}

echo “<div class=’xrti’><span class=’xrli-a mr’>Σύμβολο</span> <span class=’xrli-b’>εταιρεία</span> <span class=’xrli-c’>τιμή</span> <span class=’xrli-d’>Μεταβολή</span></div>”;

echo “<div id=’all_stocks’ class=’ul’>”;

for ($i = 0; $i < $length; $i++) {

$out = NULL;

if ($milivar[$i][‘pricePrevClosePricePDelta’] > 0){
$varclass = “bg-green”;
$link = “stkup”;
$gnarrow = ‘gn-green’;
} elseif ($milivar[$i][‘pricePrevClosePricePDelta’] == 0) {
$varclass = “bg-grey”;
$link = “stksame”;
$gnarrow = ‘gn-grey’;
} else {
$varclass = “bg-red”;
$link = “stkdown”;
$gnarrow = ‘gn-red’;
}

$out .= ‘<div class=”li ‘.$link.'”>’;
$out .= ‘<span class=”arr ‘.$gnarrow.'”></span>’;
$out .= ‘<span class=”xrli-a”><a class=”white” href=”/stockDetail?mid=’.$milivar[$i][‘instrSysName’].'”>’ ;
$out .= $milivar[$i][‘instrCode’];
$out .= “</span>”;
$out .= “</a>”;

$out .= ” “;
$out .= “<span class=’xrli-b’>”.$milivar[$i][‘instrName’].”</span>”;

$out .= ” “;
$out .= “<span class=’xrli-c’>”;
$out .= number_format(($milivar[$i][‘price’]), 2, ‘,’, ‘.’);
$out .= “</span>”;
$out .= “<span class=’xrli-d’>”;
$out .= number_format(($milivar[$i][‘pricePrevClosePricePDelta’]), 2, ‘,’, ‘.’);
$out .= ” %</span>”;

//if ($milivar[$i][‘pricePrevClosePricePDelta’] > 0){
//$out .= “<span class=’arrowup’><div class=’arrowup’></div></span>”;
//} elseif ($milivar[$i][‘pricePrevClosePricePDelta’] == 0) {
//$out .= “<span class=’arrow’><div class=’arrow’></div></span>”;
//} else
//$out .= “<span class=’arrowdown’><div class=’arrowdown’></div></span>”;
$out .= “</div>”;

//$out .= “</div>”;
$out = $out;
print_r ($out);

}

echo “</div>”;

//echo “</ul>”;

// foreach

//$i=0;
//foreach ($milivar as $val) {
//print_r($val);
//echo “name $i : $val <br>”;
//$i++;

//}

?>

 <div style=”font-family: ‘Callibri’, sans-serif;font-size:0.8em;text-align: right; float:left;”><span>powered by <span style=”color: red;”>In</span><span  style=”color: gray;”>Broker</span></span><span style=”margin-left:10px;”>Η Πληροφορία παρέχεται με δεκαπεντάλεπτη καθυστέρηση «DelayedData 15min»</span></div>

<div style=”margin-top:30px;”>

<script type=’text/javascript’> googletag.cmd.push(function() { googletag.defineSlot(‘/1050137/nm_article_end_728x90’, [728, 90], ‘div-gpt-ad-1422870701006-0’).addService(googletag.pubads()); googletag.pubads().enableSingleRequest(); googletag.enableServices(); }); </script>

<div id=’div-gpt-ad-1422870701006-0′ style=’width:728px; height:90px;’> <script type=’text/javascript’> googletag.cmd.push(function() { googletag.display(‘div-gpt-ad-1422870701006-0’); }); </script> </div>

</div>

{/source}

Exit mobile version