if(!empty($_SESSION['loginplus'])){
require_once( $_SERVER['DOCUMENT_ROOT']."/plus/includefiles/lhs.php");
$sub_now = '/plus/registration/new_registration.php?renew=1';
}else{
require_once( $_SERVER['DOCUMENT_ROOT']."/plus/includefiles/promo_lhs.php");
$sub_now = '/plus/registration/register.php';
}
?>
";
if($total_count > 1)
{
if($nex>1 || $pre>=1)
{
$last_pr=$last_cc-20;
if($last_pr<1)
$last_pr=1;
$pageall = "
".$pageall;
}
### Code for pagination ends here ####
if($category_name=="Multibaggers")
echo '
Sample Multibaggers
';
else
echo '
Previous '.$category_name.'
';
?>
$cat_sql = $cat_sql . " limit $st,15";
$ctr=0;
$q->query($cat_sql);
while($q->next_record())
{
$news_cat = $q->f('news_cat');
$scid = $q->f('scid');
$autono = $q->f('autono');
$heading = $q->f('heading');
$summary = $q->f('summary');
$impact = $q->f('impact');
$category = $q->f('category');
$exp_img_path = $q->f('exp_img_path');
$target = $q->f('target');
$rec_price = $q->f('recprice');
$stock = $q->f('stock');
$ent_date = $q->f('ent_date');
$call_date = $q->f('call_date');
$diff = $q->f('diff');
$msg_dat=substr($ent_date,0,10);
$msg_yr=substr($ent_date,0,4);
$curr_dat=date("Y-m-d");
$curr_yr=date("Y");
if($curr_dat!=$msg_dat)
{
$date_all = explode(" ",$ent_date);
$time_xpld = explode(":",$date_all[1]);
$date_xpld = explode("-",$date_all[0]);
if($curr_yr==$msg_yr)
{
$filing_dt = date("g.i A M jS", mktime($time_xpld[0], $time_xpld[1], 0, $date_xpld[1], $date_xpld[2], $date_xpld[0]));
}
else
{
$filing_dt = date("g.i A M jS Y", mktime($time_xpld[0], $time_xpld[1], 0, $date_xpld[1], $date_xpld[2], $date_xpld[0]));
}
}
else
{
$filing_dt = dateTimeDiff($ent_date)." ago";
}
if($news_cat == "stocksigns")
{
if(strlen($scid) == 0)
$data_str .= "
".$filing_dt."
".$heading."
";
else
{
if($impact == "positive")
$impact_img = "

";
else if($impact == "negative")
$impact_img = "

";
else
$impact_img = "";
if(strlen($summary) > 200)
{
$summary = substr($summary,0,200)."...";
}
$stock_ret = stock_price($scid,"BSE","split","1");
if($stock_ret == "")
{
$stock_ret = stock_price($scid,"NSE","split","1");
}
$stock_name = explode("|", $stock_ret);
$data_str .= "
".$impact_img." ".$stock_name[0]."
".$filing_dt." ".$stock_name[1]."
".$heading."
";
}
}
else if($news_cat == "stockimpact")
{
if(strlen($scid) == 0)
$data_str .= "
".$filing_dt."
".$heading."
";
else
{
if($impact == "positive")
$impact_img = "

";
else if($impact == "negative")
$impact_img = "

";
else
$impact_img = "";
$stock_ret = stock_price($scid,"BSE","split","1");
if($stock_ret == "")
{
$stock_ret = stock_price($scid,"NSE","split","1");
}
$stock_name = explode("|", $stock_ret);
$data_str .= "
".$impact_img." ".$stock_name[0]."
".$filing_dt." ".$stock_name[1]."
".$heading."
";
}
}
elseif($news_cat == "multibaggers")
{
$stock = $q->f('stock');
$target = $q->f('target');
$rec_price = $q->f('recprice');
$current_closeprice = $q->f('high_closeprice');
$exp_imgpath = $q->f('exp_img_path');
#$current_closeprice = stock_price($scid,"BSE","lastprice");
if($exp_imgpath==''){
$exp_imgpath = $expimg_arr[$impact];
}else{
$exp_imgpath = 'https://images.moneycontrol.com/images/'.$exp_imgpath;
}
if(in_array($impact,$experts_array))$width = '60px';
else $width = '100px';
/*
if($current_closeprice=="")
{
$current_closeprice = stock_price($scid,"NSE","lastprice");
}
*/
#$chg = (($rec_price - $current_closeprice)/$rec_price)*100;
$chg = round((($current_closeprice - $rec_price)/$rec_price)*100,2);
#echo $rec_price."==".$current_closeprice."
".((($rec_price - $current_closeprice)/$rec_price)*100)."
";
if($target == "Buy")
$buysell_img = "

";
else if($target == "Sell")
$buysell_img = "

";
else
$buysell_img = "

";
if($chg > 0)
{
$result = "Loss";
$gainloss = "
".$chg."%";
}
else
{
$result = "Gain";
$gainloss = "
".$chg."%";
}
if(strlen($summary) > 80)
{
$summary = substr($summary,0,80)."...
Read Full Report";
}
$data_str .= "
".$impact."
".$category."
".$filing_dt."
".$buysell_img."
".$stock."
RECOMMENDED PRICE ".$rec_price."
PEAK FROM RECO ".$current_closeprice." ".$gainloss."
".$summary."
";
}elseif($news_cat == "powercalls")
{
$exp_name = $impact;
$expimg = $expimg_arr[$exp_name];
$expdesig = $expdes_arr[$exp_name];
$rec_price = $q->f('recprice');
$stop_loss = $rec_price;
$stock_name = stock_price($scid,"BSE","","1");
if($stock_name == "")
{
$stock_name = stock_price($scid,"NSE","","1");
}
if(in_array($impact,$experts_array))$width = '60px';
else $width = '100px';
$disp_exp_name = $exp_name;
$expimg = "

";
if($category == "BUY")
$image_name = "

";
else if($category == "SELL")
$image_name = "

";
else
$image_name = "

";
$det_flag = 0;
$det_disp = "
";
if($target != "" && $target != 0)
{
$det_flag = 1;
$det_disp .= "
TARGET ".number_format($target,2)."
";
}
if($stop_loss != "" && $stop_loss != 0)
{
$det_flag = 1;
$det_disp .= "
STOP LOSS".number_format($stop_loss,2)."
";
}
if($det_flag == 1)
$det_disp .= "
";
else
$det_disp = "";
if($autoid==$autono){
$top_data_str = "
".$expimg."
".$disp_exp_name."
".$filing_dt."
".$image_name."
".$stock_name."
".$det_disp."
".$heading."
";
}else{
$data_str .= "
".$expimg."
".$disp_exp_name."
".$filing_dt."
".$image_name."
".$stock_name."
".$det_disp."
".$heading."
";
}
}
else if($news_cat == "powercalls_res")
{
$expiry_date = $q->f('expiry_date');
$call_cat = $q->f('cat');
$exp_name = $impact;
$expimg = $expimg_arr[$exp_name];
$expdesig = $expdes_arr[$exp_name];
$stop_loss = $rec_price;
if(in_array($impact,$experts_array))$width = '60px';
else $width = '100px';
$disp_exp_name = "";
$expimg = "

";
if(strlen($scid)>0 and $call_cat!="Commodity")
{
$stock_name = stock_price($scid,"BSE","","1");
if($stock_name == "")
{
$stock_name = stock_price($scid,"NSE","","1");
}
}
else if(strlen($scid) > 0 and $call_cat == "Commodity")
{
$get_mcx_price = "select ltp, ltt, close, cont_symbol, cont_expiry from mcx_commodity where cont_symbol='".$scid."' and expiry_date='".$expiry_date."'";
$q2->query($get_mcx_price);
if($q2->next_record()){
$ltp = $q2->f("ltp");
$last_trd_time = $q2->f("ltt");
$cont_symbol = $q2->f("cont_symbol");
$cont_expiry = $q2->f("cont_expiry");
$close = $q2->f("close");
$last_trd_time = explode(" ",$last_trd_time);
$date = explode("-",$last_trd_time[0]);
$time = explode(":",$last_trd_time[1]);
$feed_time = date("M d, G:i",mktime($time[0],$time[1],$time[2],$date[1],$date[2],$date[0]));
$per = number_format(((($ltp-$close)/$close)*100),2);
if ($per>0)
{
$image_class="
";
$fontcolor="gr_18";
}
else if ($per<0)
{
$image_class="
";
$fontcolor="r_18";
}
else
{
$image_class="
";
$fontcolor="b_18";
}
$stock_name = "
".$cont_symbol." ".$cont_expiry."
".$ltp."".$image_class."".$per."%MCX ".$feed_time."
";
}else{
$stock_name = "";
}
}
else
{
$stock_name = "";
}
$det_flag = 0;
$det_disp = "
";
if($target != "" && $target != 0)
{
$det_flag = 1;
$det_disp .= "
TARGET ".number_format($target,2)."
";
}
if($stop_loss != "" && $stop_loss != 0)
{
$det_flag = 1;
$det_disp .= "
STOP LOSS".number_format($stop_loss,2)."
";
}
if($det_flag == 1)
$det_disp .= "
";
else
$det_disp = "";
if($category == "BUY")
$image_name = "

";
else if($category == "SELL")
$image_name = "

";
else
$image_name = "

";
if($autoid==$autono){
$top_data_str .= "
".$expimg."
".$disp_exp_name."
".$expdesig."
".$filing_dt."
".$image_name."
".$stock_name."
".$det_disp."
".$heading."
";
}else{
$data_str .= "
".$expimg."
".$disp_exp_name."
".$expdesig."
".$filing_dt."
".$image_name."
".$stock_name."
".$det_disp."
".$heading."
";
}
}else if($news_cat == "commodity_call")
{
$expiry_date = $q->f('expiry_date');
$call_cat = $q->f('cat');
$exp_name = $impact;
$expimg = $expimg_arr[$exp_name];
$expdesig = $expdes_arr[$exp_name];
$stop_loss = $rec_price;
if(in_array($impact,$experts_array))$width = '60px';
else $width = '100px';
$disp_exp_name = "";
$expimg = "

";
if(strlen($scid) > 0 and $call_cat == "Commodity")
{
$get_mcx_price = "select ltp, ltt, close, cont_symbol, cont_expiry from mcx_commodity where cont_symbol='".$scid."' and expiry_date='".$expiry_date."'";
$q2->query($get_mcx_price);
if($q2->next_record()){
$ltp = $q2->f("ltp");
$last_trd_time = $q2->f("ltt");
$cont_symbol = $q2->f("cont_symbol");
$cont_expiry = $q2->f("cont_expiry");
$close = $q2->f("close");
$last_trd_time = explode(" ",$last_trd_time);
$date = explode("-",$last_trd_time[0]);
$time = explode(":",$last_trd_time[1]);
$feed_time = date("M d, G:i",mktime($time[0],$time[1],$time[2],$date[1],$date[2],$date[0]));
$per = number_format(((($ltp-$close)/$close)*100),2);
if ($per>0)
{
$image_class="
";
$fontcolor="gr_18";
}
else if ($per<0)
{
$image_class="
";
$fontcolor="r_18";
}
else
{
$image_class="
";
$fontcolor="b_18";
}
$stock_name = "
".$cont_symbol." ".$cont_expiry."
".$ltp."".$image_class."".$per."%MCX ".$feed_time."
";
}else{
$stock_name = "";
}
}
else
{
$stock_name = "";
}
$det_flag = 0;
$det_disp = "
";
if($target != "" && $target != 0)
{
$det_flag = 1;
$det_disp .= "
TARGET ".number_format($target,2)."
";
}
if($stop_loss != "" && $stop_loss != 0)
{
$det_flag = 1;
$det_disp .= "
STOP LOSS".number_format($stop_loss,2)."
";
}
if($det_flag == 1)
$det_disp .= "
";
else
$det_disp = "";
if($category == "BUY")
$image_name = "

";
else if($category == "SELL")
$image_name = "

";
else
$image_name = "

";
if($autoid==$autono){
$top_data_str .= "
".$expimg."
".$disp_exp_name."
".$expdesig."
".$filing_dt."
".$image_name."
".$stock_name."
".$det_disp."
".$heading."
";
}else{
$data_str .= "
".$expimg."
".$disp_exp_name."
".$expdesig."
".$filing_dt."
".$image_name."
".$stock_name."
".$det_disp."
".$heading."
";
}
}else if($news_cat == "mktoutlook")
{
$exp_imgpath = $q->f('exp_img_path');
if(strlen($summary) > 400)
{
$summary = substr($summary,0,400)."...";
}
$data_str .="
".$impact."
".$category."
".$filing_dt."
";
}
else if($news_cat == "streettalk")
{
if(strlen($scid) == 0)
$data_str .="
".$filing_dt."
".$heading."
";
else
{
$stock_name = stock_price($scid,"BSE","","1");
if($stock_name == "")
{
$stock_name = stock_price($scid,"NSE","","1");
}
$data_str .="

Information displayed on the section - Heard On The Street - has not been provided to the stock exchanges, and is source-based.
".$stock_name."
".$heading."
";
}
}else if($news_cat == "markettalk" || $news_cat == "morenews")
{
if($news_cat == "markettalk")
{
if(strlen($summary) > 200)
{
$summary = substr($summary,0,200)."...";
}
$display_summary = "
".$summary."
";
}
else
$display_summary = "";
$data_str .="
";
}
else if($news_cat == "rep_corner")
{
$author = $q->f('target');
$data_str .="
";
}
else if($news_cat == "broker_reco")
{
$data_str .="
";
}
$ctr++;
}
echo$top_data_str;
echo$data_str;
?>
#require_once( $_SERVER['DOCUMENT_ROOT']."/plus/rhs/homebody.php");
require_once( $_SERVER['DOCUMENT_ROOT']."/plus/rhs/common_promo.html");
?>