From fce8df5b639a7cd13db1988c1a30948cf5749bcc Mon Sep 17 00:00:00 2001 From: Refik Hadzialic Date: Wed, 7 Sep 2011 18:35:51 +0200 Subject: Reorganized files! --- notFinishedCode/web/example.drawFilledCircle.php | 114 +++++++++++++++++++++++ notFinishedCode/web/icons/server_dunno.png | Bin 0 -> 1410 bytes notFinishedCode/web/icons/server_fail.png | Bin 0 -> 1497 bytes notFinishedCode/web/icons/server_work.png | Bin 0 -> 1480 bytes notFinishedCode/web/server_dunno.png | Bin 1410 -> 0 bytes notFinishedCode/web/server_fail.png | Bin 1497 -> 0 bytes notFinishedCode/web/server_work.png | Bin 1480 -> 0 bytes notFinishedCode/web/testCase.php | 8 +- 8 files changed, 118 insertions(+), 4 deletions(-) create mode 100644 notFinishedCode/web/example.drawFilledCircle.php create mode 100644 notFinishedCode/web/icons/server_dunno.png create mode 100644 notFinishedCode/web/icons/server_fail.png create mode 100644 notFinishedCode/web/icons/server_work.png delete mode 100644 notFinishedCode/web/server_dunno.png delete mode 100644 notFinishedCode/web/server_fail.png delete mode 100644 notFinishedCode/web/server_work.png diff --git a/notFinishedCode/web/example.drawFilledCircle.php b/notFinishedCode/web/example.drawFilledCircle.php new file mode 100644 index 0000000..558a0d8 --- /dev/null +++ b/notFinishedCode/web/example.drawFilledCircle.php @@ -0,0 +1,114 @@ +170, "G"=>183, "B"=>87, "Dash"=>1, "DashR"=>190, "DashG"=>203, "DashB"=>107); +// $myPicture->drawFilledRectangle(0,0,700,230,$Settings); + + /* Overlay with a gradient */ + $Settings = array("StartR"=>219, "StartG"=>231, "StartB"=>139, "EndR"=>1, "EndG"=>138, "EndB"=>68, "Alpha"=>50); + $myPicture->drawGradientArea(0,0,700,230,DIRECTION_VERTICAL,$Settings); + $myPicture->drawGradientArea(0,0,700,20,DIRECTION_VERTICAL,array("StartR"=>0,"StartG"=>0,"StartB"=>0,"EndR"=>50,"EndG"=>50,"EndB"=>50,"Alpha"=>80)); + + /* Add a border to the picture */ + $myPicture->drawRectangle(0,0,699,229,array("R"=>0,"G"=>0,"B"=>0)); + + /* Write the picture title */ + $myPicture->setFontProperties(array("FontName"=>"fonts/Silkscreen.ttf","FontSize"=>6)); + $myPicture->drawText(10,13,"Network Test Results - UNI FREIBURG",array("R"=>255,"G"=>255,"B"=>255)); + + + + //CONNECTIONS + /* BTS PICTURE INTERNAL CONNECTIONS */ + $myPicture->drawLine(80,70,185,130,$BTS1PING); //BTS1 PING + $myPicture->drawLine(75,125,185,125,$BTS2PING); //BTS2 PING + $myPicture->drawLine(75,188,185,120,$BTS2PING); //BTS3 PING + + //IAX + $arrowSettings = array("FillR"=>2.5,"FillG"=>2.5,"FillB"=>2.5,"Ticks"=>1, "TwoHeads"=>TRUE); + $myPicture->drawArrow(192,120,297,120,$arrowSettings); + /* Write some text */ + $myPicture->setFontProperties(array("FontName"=>"fonts/verdana.ttf","FontSize"=>7)); + $TextSettings = array("BoxRounded"=>TRUE,"R"=>0,"G"=>0,"B"=>0,"Angle"=>0,"FontSize"=>7); + $myPicture->drawText(235,118,"IAX",$TextSettings); + //###################################### + + //BTS1 + $Points = Triangle(74,55); + $myPicture->drawPolygon($Points, $BTS1COL); + /* Write some text */ + $myPicture->setFontProperties(array("FontName"=>"fonts/verdana.ttf","FontSize"=>7)); + $TextSettings = array("DrawBox"=>TRUE,"BoxRounded"=>TRUE,"R"=>0,"G"=>0,"B"=>0,"Angle"=>0,"FontSize"=>7); + $myPicture->drawText(10,69,"nanoBTS0",$TextSettings); + //################################## + + //BTS2 + $Points = Triangle(74,115); + $myPicture->drawPolygon($Points, $BTS2COL); + /* Write some text */ + $myPicture->setFontProperties(array("FontName"=>"fonts/verdana.ttf","FontSize"=>7)); + $TextSettings = array("DrawBox"=>TRUE,"BoxRounded"=>TRUE,"R"=>0,"G"=>0,"B"=>0,"Angle"=>0,"FontSize"=>7); + $myPicture->drawText(10,129,"nanoBTS1",$TextSettings); + //################################### + + //BTS3 + $Points = Triangle(74,175); + $myPicture->drawPolygon($Points, $BTS3COL); + /* Write some text */ + $myPicture->setFontProperties(array("FontName"=>"fonts/verdana.ttf","FontSize"=>7)); + $TextSettings = array("DrawBox"=>TRUE,"BoxRounded"=>TRUE,"R"=>0,"G"=>0,"B"=>0,"Angle"=>0,"FontSize"=>7); + $myPicture->drawText(10,189,"nanoBTS3",$TextSettings); + //################################### + + + + //LsfKs-Asterisk + /* Turn on shadow computing */ + $myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); + /* Draw a PNG object */ + $myPicture->drawFromPNG(295,110,$LSFKSCOL); + /* Write some text */ + $myPicture->setFontProperties(array("FontName"=>"fonts/verdana.ttf","FontSize"=>7)); + $TextSettings = array("DrawBox"=>TRUE,"BoxRounded"=>TRUE,"R"=>0,"G"=>0,"B"=>0,"Angle"=>0,"FontSize"=>7); + $myPicture->drawText(270,157," LsfKs-Asterisk",$TextSettings); + //############################### + + + //Open BSC + /* Turn on shadow computing */ + $myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); + /* Draw a PNG object */ + $myPicture->drawFromPNG(171,110,$GSMINTCOL); + /* Write some text */ + $myPicture->setFontProperties(array("FontName"=>"fonts/verdana.ttf","FontSize"=>7)); + $TextSettings = array("DrawBox"=>TRUE,"BoxRounded"=>TRUE,"R"=>0,"G"=>0,"B"=>0,"Angle"=>0,"FontSize"=>7); + $myPicture->drawText(155,175," OpenBSC \r\n LCR \r\n Asterisk",$TextSettings); + //############################### +/* Draw a customized filled circles */ + $CircleSettings = array("R"=>209,"G"=>31,"B"=>27,"Alpha"=>100,"Surrounding"=>30); + $myPicture->drawFilledCircle(480,60,19,$CircleSettings); + + /* Render the picture (choose the best way) */ + $myPicture->autoOutput("example.drawFilledCircle.png"); +?> diff --git a/notFinishedCode/web/icons/server_dunno.png b/notFinishedCode/web/icons/server_dunno.png new file mode 100644 index 0000000..588514e Binary files /dev/null and b/notFinishedCode/web/icons/server_dunno.png differ diff --git a/notFinishedCode/web/icons/server_fail.png b/notFinishedCode/web/icons/server_fail.png new file mode 100644 index 0000000..a699864 Binary files /dev/null and b/notFinishedCode/web/icons/server_fail.png differ diff --git a/notFinishedCode/web/icons/server_work.png b/notFinishedCode/web/icons/server_work.png new file mode 100644 index 0000000..210979f Binary files /dev/null and b/notFinishedCode/web/icons/server_work.png differ diff --git a/notFinishedCode/web/server_dunno.png b/notFinishedCode/web/server_dunno.png deleted file mode 100644 index 588514e..0000000 Binary files a/notFinishedCode/web/server_dunno.png and /dev/null differ diff --git a/notFinishedCode/web/server_fail.png b/notFinishedCode/web/server_fail.png deleted file mode 100644 index a699864..0000000 Binary files a/notFinishedCode/web/server_fail.png and /dev/null differ diff --git a/notFinishedCode/web/server_work.png b/notFinishedCode/web/server_work.png deleted file mode 100644 index 210979f..0000000 Binary files a/notFinishedCode/web/server_work.png and /dev/null differ diff --git a/notFinishedCode/web/testCase.php b/notFinishedCode/web/testCase.php index 42a3a81..4012c09 100644 --- a/notFinishedCode/web/testCase.php +++ b/notFinishedCode/web/testCase.php @@ -19,8 +19,8 @@ $GSMET = 0; $GSMEO = 0; $GSMEXTCOL = $colorDunno; -$GSMINTCOL = "server_dunno.png"; -$LSFKSCOL = "server_dunno.png"; +$GSMINTCOL = "icons/server_dunno.png"; +$LSFKSCOL = "icons/server_dunno.png"; $SIPCOL = $colorDunno; $UNISIPCOL = $colorDunno; @@ -50,11 +50,11 @@ $BTS3PING["Weight"]=0; if ($GSMRZ1 > 0 || $GSMRZ2 > 0 || $GSMRZ3 > 0) { - $GSMINTCOL = 'server_work.png'; + $GSMINTCOL = 'icons/server_work.png'; } elseif($GSMRZ1 < 0 || $GSMRZ2 < 0 || $GSMRZ3 < 0) { - $GSMINTCOL = 'server_fail.png'; + $GSMINTCOL = 'icons/server_fail.png'; } if($LANDLINE>0) -- cgit v1.2.3-55-g7522