Skip to content

Commit

Permalink
v2.1 beta8
Browse files Browse the repository at this point in the history
  • Loading branch information
intrd committed Jan 5, 2014
1 parent b1cd622 commit 30241eb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
21 changes: 16 additions & 5 deletions hal10k/chart.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/* CAT:Line chart */
/* pChart library inclusions */
include("configs.php");
//include("functions.php");
//include("configs.php");
include("functions.php");
include("pChart/class/pData.class.php");
include("pChart/class/pDraw.class.php");
include("pChart/class/pImage.class.php");
Expand Down Expand Up @@ -61,12 +61,12 @@
if (strlen($value[6]>=2)){
$data["emaShort"][]=$value[6];
}else{
$data["emaShort"][]=VOID;
$data["emaShort"][]=round($value[2]);
}
if (strlen($value[7]>=2)){
$data["emaLong"][]=$value[7];
}else{
$data["emaLong"][]=VOID;
$data["emaLong"][]=round($value[2]);
}


Expand Down Expand Up @@ -122,6 +122,8 @@
$myPicture->setFontProperties(array("FontName"=>"pChart/fonts/Forgotte.ttf","FontSize"=>8,"R"=>0,"G"=>0,"B"=>0));
$myPicture->drawText(15,22,"HAL10K by intrd",array("FontSize"=>15,"Align"=>TEXT_ALIGN_BOTTOMLEFT));

//$myPicture->drawText(15,22,"HAL10K by intrd",array("FontSize"=>15,"Align"=>TEXT_ALIGN_BOTTOMLEFT));

$myPicture->drawText(450,20,"Período: ".$startdate." - ".$enddate."",array("FontSize"=>13,"Align"=>TEXT_ALIGN_BOTTOMLEFT));

$myPicture->drawText(651,23,$nextmov,array("FontSize"=>13,"Align"=>TEXT_ALIGN_BOTTOMLEFT));
Expand Down Expand Up @@ -156,7 +158,16 @@
$MyData->setSerieDrawable("Sell",TRUE);
//$myPicture->writeBounds();
$myPicture->drawLegend(121,10,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL,"FontR"=>0,"FontG"=>0,"FontB"=>0));



/* $last=explode(",",end($F1));
if ($last[7]<=1) {
$least=$emaLong-count($F1);
echo "<center>************<br><b>$least/$emaLong</b> periods left to process graphic chart.</br>************</center>";
}else{
echo "<img src='chart.php";echo "'>";
}
*/
$myPicture->autoOutput("graph.png");


Expand Down
13 changes: 2 additions & 11 deletions hal10k/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,12 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
**/
include("configs.php");
$F1=file($datachart);
//include("configs.php");

echo "<center><h1>HAL 10K</h1></center>";
$time=date("Y-m-d H:i:s");
echo "<center><h3>Time: $time</h3></center>";
$last=explode(",",end($F1));
//var_dump($last[7]);
//die;
if ($last[7]<=1) {
$least=$emaLong-count($F1);
echo "<center>************<br><b>$least/$emaLong</b> periods left to process graphic chart.</br>************</center>";
}else{
echo "<img src='chart.php";echo "'>";
}
echo "<img src='chart.php";echo "'>";
echo "<center><form action='makesudden.php' method='post'>";
echo "Sudden MODE? (ATTENTION! OK?)";
echo '&nbsp;Password: <input type="text" name="i"><br>';
Expand Down

0 comments on commit 30241eb

Please sign in to comment.