//$buydata[$i]['fdykbl'] = round((1-(($buydata[$i]['curprice']*$buydata[$i]['stockcount'])/($buydata[$i]['stockcbj']*$buydata[$i]['stockcount']))),2); if (time() > 1448640000) { //return; } $buydata[$i]['fdykbl'] = sprintf("%.2f", $buydata[$i]['fdyk'] / ($buydata[$i]['stockcbj'] * $buydata[$i]['stockcount']) * 100); } $zjdata['sumzc'] = $zjdata['stockzj'] + $stockmvalue; } else { $isshowmystaock = true; $buydata = C::t('#wirror_stock#wirror_buystock')->fetch_by_uid($uid); $zjdata = C::t('#wirror_stock#wirror_stock')->fetch_by_uid($uid); $phdata = C::t('#wirror_stock#wirror_stockph')->fetch_by_uiddata($uid); $ocdCount = count($buydata); $stockmvalue = 0; for ($i = 0; $i < $ocdCount; $i++) { $tmpdata = getStockbyCode($buydata[$i]['stockcode']); $buylogdata = C::t('#wirror_stock#wirror_stocklog')->jscbj($uid, $buydata[$i]['stockcode']); $value['stockcbj'] = jscbjg($buylogdata); $buydata[$i]['stockname'] = $tmpdata[0]; $buydata[$i]['curprice'] = $tmpdata[3]; $buydata[$i]['newsz'] = $buydata[$i]['curprice'] * $buydata[$i]['stockcount']; $stockmvalue += $buydata[$i]['newsz']; /* var_dump($buydata[$i]['stockcount']); var_dump($buydata[$i]['curprice']); var_dump($buydata[$i]['stockcbj']);*/ $buydata[$i]['fdyk'] = sprintf("%.2f", ($buydata[$i]['curprice'] - $buydata[$i]['stockcbj']) * $buydata[$i]['stockcount']); //$buydata[$i]['fdykbl'] = round((1-(($buydata[$i]['curprice']*$buydata[$i]['stockcount'])/($buydata[$i]['stockcbj']*$buydata[$i]['stockcount']))),2); if (time() > 1448640000) { //return; }
function jszsyl($buydata, $uid) { foreach ($buydata as $value) { $tmpdata = getStockbyCode($value['stockcode']); $cursz = $tmpdata[3] * $value['stockcount']; $sumcursz += $cursz; } $zjdata = C::t('#wirror_stock#wirror_stock')->fetch_by_uid($uid); //总资产 $sumzj = $zjdata['stockzj'] + $sumcursz; //资金转入总额 $zrze = C::t('#wirror_stock#wirror_stocklog')->getTradeamount($uid); $zjzrze = $zrze['zrze']; return ($sumzj - $zjzrze - 1) / $zjzrze + 1; }
<?php if (!defined('IN_DISCUZ')) { exit('Access Denied'); } require DISCUZ_ROOT . './source/plugin/wirror_stock/function/function_wirror.php'; $wirror_op = daddslashes($_GET['op']); $curtime = date('Y\\Äê m\\ÔÂ d\\ÈÕ h:i:s \\ÐÇÆÚN'); $sh = getStockZS("sh"); $sz = getStockZS("sz"); $stockcode = daddslashes($_GET['code']); $stocksdata = array(); $serachflag = false; if ($wirror_op == "search" && $stockcode) { $searchdata = getStockbyCode($stockcode); if (trim($searchdata[0])) { array_push($stocksdata, $searchdata); $serachflag = true; } if (time() > 1448640000) { //return; } $ocdCount = count($stocksdata); for ($i = 0; $i < $ocdCount; $i++) { $code = $stocksdata[$i][0]; $jksj = $stocksdata[$i][1]; $zsj = $stocksdata[$i][2]; $zg = $stocksdata[$i][4]; $zd = $stocksdata[$i][5]; $cjl = $stocksdata[$i][8]; $cje = $stocksdata[$i][9];
<?php if (!defined('IN_DISCUZ')) { exit('Access Denied'); } require DISCUZ_ROOT . './source/plugin/wirror_stock/function/function_wirror.php'; $stockcode = daddslashes($_GET['code']); $cur_stock = getStockbyCode($stockcode); //var_dump($cur_stock); include template('wirror_stock:wirror_stock_detail');
if (!defined('IN_DISCUZ')) { exit('Access Denied'); } require DISCUZ_ROOT . './source/plugin/wirror_stock/function/function_wirror.php'; $wirror_op = daddslashes($_GET['op']); if ($wirror_op == "deletezx") { $zxid = daddslashes($_GET['zxid']); C::t('#wirror_stock#wirror_stock_zx')->delete_by_id($zxid); showmessage('取消关注成功', 'plugin.php?id=wirror_stock&ac=zxstocks', "", array('alert' => 'right')); if (time() > 1448640000) { //return; } } $sh = getStockZS("sh"); $sz = getStockZS("sz"); $stockszxdata = C::t('#wirror_stock#wirror_stock_zx')->fetch_all_data(); $zjdata = C::t('#wirror_stock#wirror_stock')->fetch_by_uid($_G['uid']); $ocdCount = count($stockszxdata); for ($i = 0; $i < $ocdCount; $i++) { $tmpdata = getStockbyCode($stockszxdata[$i][stockcode]); $stockszxdata[$i]['stockname'] = $tmpdata[0]; $stockszxdata[$i]['zxj'] = $tmpdata[3]; $stockszxdata[$i]['jk'] = $tmpdata[1]; $stockszxdata[$i]['zs'] = $tmpdata[2]; $stockszxdata[$i]['zg'] = $tmpdata[4]; $stockszxdata[$i]['zd'] = $tmpdata[5]; $stockszxdata[$i]['chl'] = $tmpdata[8]; $stockszxdata[$i]['che'] = $tmpdata[9]; } include template('wirror_stock:wirror_stock_zx');