summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--notFinishedCode/web/css/tableCSS.css22
-rw-r--r--notFinishedCode/web/mutex1.php37
-rw-r--r--notFinishedCode/web/networkResult.php19
-rw-r--r--notFinishedCode/web/testCase.php59
4 files changed, 109 insertions, 28 deletions
diff --git a/notFinishedCode/web/css/tableCSS.css b/notFinishedCode/web/css/tableCSS.css
index e404064..e274f5f 100644
--- a/notFinishedCode/web/css/tableCSS.css
+++ b/notFinishedCode/web/css/tableCSS.css
@@ -5,7 +5,27 @@ URL: http://www.alvit.de/vf
-------------------------------------------------------
*/
- html { height: 100%; }
+ html {
+ height: 100%;
+ }
+ #main {
+ float: left;
+ width: 350px;
+ }
+ #sidebar
+ {
+ float: left;
+ width: 700px;
+ }
+ #footer
+ {
+ position: absolute;
+ bottom: 90px;
+ padding-top: 0px;
+ padding-right: 2px;
+ padding-left: 210px;
+ border: 1px solid black;
+ }
body {
background-color: #F0F0F0;
font-family: verdana, verdana, ariel;
diff --git a/notFinishedCode/web/mutex1.php b/notFinishedCode/web/mutex1.php
index 11d7529..bc9139d 100644
--- a/notFinishedCode/web/mutex1.php
+++ b/notFinishedCode/web/mutex1.php
@@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/tableCSS.css" type="text/css" media="screen">
</head>
<body onscroll="scrollEvent();" onload="loaderInit();">
-
+<div>
<?php
//Connection stuff
@@ -20,7 +20,6 @@ $dbpass = 'randompasswordSQL';
$port = 34500;
$ip = 'localhost';
-
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql');
$dbname = 'gsmselftesting';
@@ -40,7 +39,7 @@ if ($locking == '1') //1 means nobody is on the website
if ($lockMe == '1') //1 means a successful lock
{
include 'post.php'; // read posted data and add them to the database
- echo 'WE had errors: '. $errorAdding;
+// echo 'WE had errors: '. $errorAdding;
//stuff to do here
//check if the software is running!
$softwareLock = 'SoftwareStarted';
@@ -78,7 +77,8 @@ if ($locking == '1') //1 means nobody is on the website
if ($received == "CONFIRM\n") //we got the confirmation from the testing software
{
- echo '<table summary = "Results">
+ echo '<div id="main">
+ <table summary = "Results">
<thead>
<tr>
<th scope = "col"> From: </th>
@@ -95,9 +95,32 @@ if ($locking == '1') //1 means nobody is on the website
elseif ($received == "TEST DONE\n")
{
//test finished successfully
+ $GSMRZ1 = 0;
+ $GSMRZ2 = 10;
+ $GSMRZ3 = 10;
+
+ $SIP = 4;
+ $UNISIP = -1;
+ $LANDLINE = 1;
+ $LSFKS = 1;
+
+ $GSMEE = 10;
+ $GSMEV = 10;
+ $GSMET = -10;
+ $GSMEO = 10;
+
+ $SIPP = 0;
+ $LANDLINEP = 0;
+ $UNISIPP = 1;
+ $NANOBTS1P = 1;
+ $NANOBTS2P = 1;
+
+
echo '</tbody></table>';
- echo 'Test successfully finished!<br>';
- echo "<a class='pChart' href='networkResult.php' data-pchart-alt='Picture3'>Picture 3</a>";
+ echo '</div>';
+ echo '<div id="sidebar">';
+ echo "<a class='pChart' href='networkResult.php?S=$SIP&RZ1=$GSMRZ1&RZ2=$GSMRZ2&RZ3=$GSMRZ3&US=$UNISIP&LL=$LANDLINE&LS=$LSFKS&EE=$GSMEE&EV=$GSMEV&ET=$GSMET&EO=$GSMEO&SP=$SIPP&SGP=$LANDLINEP&USP=$UNISIPP&NBP1=$NANOBTS1P&NBP2=$NANOBTS2P' data-pchart-alt='Picture3'>Picture 3</a></div>";
+ echo '<div id="footer">Test successfully finished!</div>';
echo str_repeat("\n",7024);
flush();
usleep(100);
@@ -167,7 +190,7 @@ else
echo 'We have some serious error here';
}
?>
-
+</div>
</body>
</html>
diff --git a/notFinishedCode/web/networkResult.php b/notFinishedCode/web/networkResult.php
index 2f46044..208dba6 100644
--- a/notFinishedCode/web/networkResult.php
+++ b/notFinishedCode/web/networkResult.php
@@ -23,7 +23,7 @@
/* Create and populate the pData object */
$MyData = new pData();
- $MyData->addPoints(array(66,100,50,39,28),"Hits");
+ $MyData->addPoints(array($GSMINTPercent,$GSMEXTPercent,$SIPPercent,$UNISIPPercent,$LANDLINEPercent),"Hits");
$MyData->setAxisName(0,"Network operability");
$MyData->addPoints(array("GSM University","GSM External","SIP","Uni.Tel.network","Landline"),"Networks");
$MyData->setSerieDescription("Networks","Networks");
@@ -249,16 +249,17 @@
// Set the grid size
$mySurface->setGrid(4,0);
- $mySurface->writeXLabels(array("Angle"=>45,"Labels"=>array("SIP Server","SIP Gate","UNI SIP","nanoBTS 1","nanoBTS 2")));
+ $mySurface->writeXLabels(array("Angle"=>45,"Labels"=>array("SIP","Landline","Uni. Telephone","nanoBTS 1","nanoBTS 2")));
$mySurface->writeYLabels(array("Labels"=>array("Ping")));
- $Palette = array(0=>array("R"=>0,"G"=>255,"B"=>0, "Alpha"=>40),
- 1=>array("R"=>255,"G"=>0,"B"=>1, "Alpha"=>40));
- // Add random values
- for($i=0; $i<=5; $i++)
- {
- $mySurface->addPoint($i,0,rand(0,1));
- }
+ $Palette = array(1=>array("R"=>0,"G"=>255,"B"=>0, "Alpha"=>40),
+ 0=>array("R"=>255,"G"=>0,"B"=>1, "Alpha"=>40));
+
+ $mySurface->addPoint(0,0,$SIPP);
+ $mySurface->addPoint(1,0,$LANDLINEP);
+ $mySurface->addPoint(2,0,$UNISIPP);
+ $mySurface->addPoint(3,0,$NANOBTS1P);
+ $mySurface->addPoint(4,0,$NANOBTS2P);
// Draw the surface chart
$mySurface->drawSurface(array("Border"=>TRUE,"Surrounding"=>40,"Palette"=>$Palette));
diff --git a/notFinishedCode/web/testCase.php b/notFinishedCode/web/testCase.php
index 288d065..0c7b16b 100644
--- a/notFinishedCode/web/testCase.php
+++ b/notFinishedCode/web/testCase.php
@@ -1,29 +1,51 @@
<?
-
//color definitions
$colorDunno = array("R"=>216,"G"=>166,"B"=>14,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0);
$colorFail = array("R"=>255, "G"=>25, "B"=>25,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0);
$colorWork = array("R"=>150,"G"=>215,"B"=>121,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0);
+
+$GSMRZ1 = $_GET['RZ1'];
+$GSMRZ2 = $_GET['RZ2'];
+$GSMRZ3 = $_GET['RZ3'];
+
+$SIP = $_GET['S'];
+$UNISIP = $_GET['US'];
+$LANDLINE = $_GET['LL'];
+$LSFKS = $_GET['LS'];
+
+$GSMEE = $_GET['EE'];
+$GSMEV = $_GET['EV'];
+$GSMET = $_GET['ET'];
+$GSMEO = $_GET['EO'];
+
+
+$SIPP = $_GET['SP'];
+$LANDLINEP = $_GET['SGP'];
+$UNISIPP = $_GET['USP'];
+$NANOBTS1P = $_GET['NBP1'];
+$NANOBTS2P = $_GET['NBP2'];
+/*
$GSMRZ1 = 0;
$GSMRZ2 = -10;
$GSMRZ3 = 10;
-$SIP = 0;
+$SIP = 4;
$UNISIP = 0;
-$LANDLINE = 0;
+$LANDLINE = 1;
+$LSFKS = 1;
$GSMEE = 10;
$GSMEV = 10;
-$GSMET = 10;
+$GSMET = -10;
$GSMEO = 10;
-
+*/
$GSMEXTCOL = 'icons/box_dunno.png';
$GSMINTCOL = "icons/server_dunno.png";
$LSFKSCOL = "icons/server_dunno.png";
-$SIPCOL = $colorDunno;
-$UNISIPCOL = $colorDunno;
+$SIPCOL = 'icons/sip_dunno';
+$UNISIPCOL = 'icons/uni-network_dunno.png';
$LANDLINECOL = 'icons/telephone_dunno.png';
$BTS1COL = $colorDunno;
@@ -66,22 +88,31 @@ elseif($LANDLINE<0)
$LANDLINECOL = 'icons/telephone_fail.png';
}
+if($LSFKS>0)
+{
+ $LSFKSCOL = 'icons/server_work.png';
+}
+elseif($LSFKS<0)
+{
+ $LSFKSCOL = 'icons/server_fail.png';
+}
+
if($SIP>0)
{
- $SIPCOL = $colorWork;
+ $SIPCOL = 'icons/sip_work.png';
}
elseif($SIP<0)
{
- $SIPCOL = $colorFail;
+ $SIPCOL = 'icons/sip_fail.png';
}
if($UNISIP > 0)
{
- $UNISIPCOL = $colorWork;
+ $UNISIPCOL = 'icons/uni-network_work.png';
}
elseif($UNISIP < 0)
{
- $UNISIPCOL = $colorFail;
+ $UNISIPCOL = 'icons/uni-network_fail.png';
}
if($GSMEE > 0 || $GSMEV > 0 || $GSMET > 0 || $GSMEO > 0)
@@ -156,6 +187,12 @@ elseif($GSMEO < 0)
$GSMEOCOL = 'icons/blackberry_fail.png';
}
+//NETWORK OPERABILITY
+$GSMINTPercent = 54;
+$GSMEXTPercent = 75;
+$SIPPercent = 100;
+$UNISIPPercent = 0;
+$LANDLINEPercent = 0;
//print_r($GSMINTCOL);
// add here to set the color for each node after the test ;)