summaryrefslogblamecommitdiffstats
path: root/notFinishedCode/web/testCase.php
blob: c2719db32157e7dd775653487290b3638bb709b2 (plain) (tree)
1
2
3
4
5
6
  




                                                                                       





















                           



              
         
            

              
 

            
             
            
  
                                   

                                      
 

                                           
                                           




                       



                                         















                                                                  
                                        


                                                 
                                        



               
                                             


                   
                                             

 








                                       

          
                                  


              
                                  



               
                                             


                   
                                             



                                                        
                                     


                                                            
                                     






























                         
                                           


                  
                                           



              
                                           


                  
                                           



              
                                           


                  
                                           



              
                                           


                  
                                           

 



                      
                    
                      




                                                             
<?
 //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 = 4;
$UNISIP = 0;
$LANDLINE = 1;
$LSFKS = 1;

$GSMEE = 10;
$GSMEV = 10;
$GSMET = -10;
$GSMEO = 10;
*/
$GSMEXTCOL = 'icons/box_dunno.png';
$GSMINTCOL = "icons/server_dunno.png";
$LSFKSCOL = "icons/server_dunno.png";

$SIPCOL = 'icons/sip_dunno';
$UNISIPCOL = 'icons/uni-network_dunno.png';
$LANDLINECOL = 'icons/telephone_dunno.png';

$BTS1COL = $colorDunno;
$BTS2COL = $colorDunno;
$BTS3COL = $colorDunno;

$GSMEECOL = 'icons/blackberry_dunno.png';
$GSMEVCOL = 'icons/blackberry_dunno.png';
$GSMETCOL = 'icons/blackberry_dunno.png';
$GSMEOCOL = 'icons/blackberry_dunno.png';


$BTS1PING = array("R"=>255,"G"=>0,"B"=>0); //put here the color :)
$BTS1PING["Ticks"]=2;
$BTS1PING["Weight"]=0;

$BTS2PING = array("R"=>255,"G"=>0,"B"=>0);
$BTS2PING["Ticks"]=2;
$BTS2PING["Weight"]=0;

$BTS3PING = array("R"=>255,"G"=>0,"B"=>0);
$BTS3PING["Ticks"]=2;
$BTS3PING["Weight"]=0;

if ($GSMRZ1 > 0 || $GSMRZ2 > 0 || $GSMRZ3 > 0)
{
   $GSMINTCOL = 'icons/server_work.png';
}
elseif($GSMRZ1 < 0 || $GSMRZ2 < 0 || $GSMRZ3 < 0)
{
   $GSMINTCOL = 'icons/server_fail.png';
}

if($LANDLINE>0)
{
   $LANDLINECOL = 'icons/telephone_work.png';
}
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 = 'icons/sip_work.png';
}
elseif($SIP<0)
{
   $SIPCOL = 'icons/sip_fail.png';
}

if($UNISIP > 0)
{
   $UNISIPCOL = 'icons/uni-network_work.png';
}
elseif($UNISIP < 0)
{
   $UNISIPCOL = 'icons/uni-network_fail.png';
}

if($GSMEE > 0 || $GSMEV > 0 || $GSMET > 0 || $GSMEO > 0)
{
   $GSMEXTCOL = 'icons/box_work.png';
}
elseif($GSMEE < 0 || $GSMEV < 0 || $GSMET < 0 || $GSMEO < 0)
{
   $GSMEXTCOL = 'icons/box_fail.png';
}

if($GSMRZ1 > 0)
{
   $BTS1COL = $colorWork;
}
elseif($GSMRZ1 < 0)
{
   $BTS1COL = $colorFail;
}

if($GSMRZ2 > 0)
{
   $BTS2COL = $colorWork;
}
elseif($GSMRZ2 < 0)
{
   $BTS2COL = $colorFail;
}

if($GSMRZ3 > 0)
{
   $BTS3COL = $colorWork;
}
elseif($GSMRZ3 < 0)
{
   $BTS3COL = $colorFail;
}

if($GSMEE > 0)
{
   $GSMEECOL = 'icons/blackberry_work.png';
}
elseif($GSMEE < 0)
{
   $GSMEECOL = 'icons/blackberry_fail.png';
}

if($GSMEV > 0)
{
   $GSMEVCOL = 'icons/blackberry_work.png';
}
elseif($GSMEV < 0)
{
   $GSMEVCOL = 'icons/blackberry_fail.png';
}

if($GSMET > 0)
{
   $GSMETCOL = 'icons/blackberry_work.png';
}
elseif($GSMET < 0)
{
   $GSMETCOL = 'icons/blackberry_fail.png';
}

if($GSMEO > 0)
{
   $GSMEOCOL = 'icons/blackberry_work.png';
}
elseif($GSMEO < 0)
{
   $GSMEOCOL = 'icons/blackberry_fail.png';
}

//NETWORK OPERABILITY 
$GSMINTPercent = 54;
$GSMEXTPercent = 75;
$SIPPercent = 100;
$UNISIPPercent = 36;
$LANDLINEPercent = 70;

//print_r($GSMINTCOL);
// add here to set the color for each node after the test ;) 
// setNode(0,$SIPCOL) or something as that :)
?>