"Jan", "2"=>"Feb", "3"=>"Mar", "4"=>"Apr", "5"=>"May", "6"=>"Jun", "7"=>"Jul", "8"=>"Aug", "9"=>"Sep", "10"=>"Oct", "11"=>"Nov", "12"=>"Dec");
$words=array(" in "," of "," with "," and "," a "," an "," on "," the "," from "," where "," what "," which "," but "," why "," are "," these "," < "," > ","(",")"," www ","<",">"," up ","&",":","&",",","?","!","'","%",".","-","_","/"," ");
if($ex == "")
{
$ex = "B";
}
if($ex == "B")
{
$bse_button = "
";
$nse_button = "
";
}
else
{
$bse_button = "
";
$nse_button = "
";
}
### Company details starts here ####
$scmas = explode("|", getstockscmas($scid));
$sc_comp=$scmas[2];
$sc_fullname=$scmas[3];
$fullname = strtolower(str_replace($words, "", $sc_fullname));
$sc_dispid=$scmas[1];
$sc_subsector=$scmas[4];
$bseid = $scmas[7];
$nseid = $scmas[8];
$sc_topicid=$scmas[11];
$disp_sccomp = $sc_comp;
$graph_name = str_replace(" ","%20",$sc_comp);
### Company details ends here ####
### BSE Price starts here ###
$bse_price_array = explode("|", getstockprice($scid, "B"));
if(count($bse_price_array) != "1")
{
$bse_open = $bse_price_array[8];
$bse_high = $bse_price_array[2];
$bse_low = $bse_price_array[3];
$bse_dttime = $bse_price_array[4];
$bse_volume = $bse_price_array[5];
$bse_52weekhigh = $bse_price_array[23];
$bse_52weeklow = $bse_price_array[24];
$bse_price = $bse_price_array[0];
$bse_prevclose = $bse_price_array[1];
$bse_bidprice = $bse_price_array[9];
$bse_bidqty = $bse_price_array[11];
$bse_offerprice = $bse_price_array[10];
$bse_offerqty = $bse_price_array[12];
$b_lifetimehigh = $bse_price_array[25];
$b_lifetimelow = $bse_price_array[26];
$bse_chg = round($bse_price - $bse_prevclose,2);
$bse_perchg = round((($bse_price - $bse_prevclose)/$bse_prevclose)*100,2);
if(strlen($bse_dttime)==8)
$bsetime=substr($bse_dttime,2,2)."-".$Months[substr($bse_dttime,0,2)]." ".substr($bse_dttime,4,2).":".substr($bse_dttime,6,2);
else
$bsetime=substr($bse_dttime,1,2)."-".$Months[substr($bse_dttime,0,1)]." ".substr($bse_dttime,3,2).":".substr($bse_dttime,5,2);
if($bse_perchg > 0)
{
$bseprice_color = "gr_20";
$bsechg_color = "gr_15";
$bsechg_img = "";
$bse_perchg = "(".$bse_perchg."%)";
}
else if($bse_perchg < 0)
{
$bseprice_color = "r_20";
$bsechg_color = "r_15";
$bsechg_img = "";
$bse_perchg = "(".$bse_perchg."%)";
}
else
{
$bseprice_color = "b_20";
$bsechg_color = "b_15";
$bsechg_img = "";
$bse_perchg = "";
}
}
### BSE Price ends here ###
### NSE Price starts here ###
$nse_price_array = explode("|", getstockprice($scid, "N"));
if(count($bse_price_array) != "1")
{
$nse_open = $nse_price_array[8];
$nse_high = $nse_price_array[2];
$nse_low = $nse_price_array[3];
$nse_dttime = $nse_price_array[4];
$nse_volume = $nse_price_array[5];
$nse_52weekhigh = $nse_price_array[23];
$nse_52weeklow = $nse_price_array[24];
$nse_price = $nse_price_array[0];
$nse_prevclose = $nse_price_array[1];
$nse_bidprice = $nse_price_array[9];
$nse_bidqty = $nse_price_array[11];
$nse_offerprice = $nse_price_array[10];
$nse_offerqty = $nse_price_array[12];
$n_lifetimehigh = $nse_price_array[25];
$n_lifetimelow = $nse_price_array[26];
$nse_chg = round($nse_price - $nse_prevclose,2);
$nse_perchg = round((($nse_price - $nse_prevclose)/$nse_prevclose)*100,2);
if(strlen($nse_dttime)==8)
$bsetime=substr($nse_dttime,2,2)."-".$Months[substr($nse_dttime,0,2)]." ".substr($nse_dttime,4,2).":".substr($nse_dttime,6,2);
else
$bsetime=substr($nse_dttime,1,2)."-".$Months[substr($nse_dttime,0,1)]." ".substr($nse_dttime,3,2).":".substr($nse_dttime,5,2);
if($nse_perchg > 0)
{
$nseprice_color = "gr_20";
$nsechg_color = "gr_15";
$nsechg_img = "";
$nse_perchg = "(".$nse_perchg."%)";
}
else if($nse_perchg < 0)
{
$nseprice_color = "r_20";
$nsechg_color = "r_15";
$nsechg_img = "";
$nse_perchg = "(".$nse_perchg."%)";
}
else
{
$nseprice_color = "b_20";
$nsechg_color = "b_15";
$nsechg_img = "";
$nse_perchg = "";
}
}
### NSE Price ends here ###
$from_date="20050501";
$to_date=date("Ymd");
$disp_frdt="01-05-2005";
$disp_todt=date("d-m-Y");
?>