Changeset 4 for www/is/calculate_wlan.php
- Timestamp:
- Jan 14, 2008, 9:48:39 PM (17 years ago)
- Location:
- www
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
www
-
Property svn:ignore
set to
config.php
php_script_error.log
-
Property svn:ignore
set to
-
www/is/calculate_wlan.php
r1 r4 1 <? 2 include_once('db.php'); 1 <?php 2 include_once('../style.php'); 3 ShowHeader('Výkonc bezdrátových zařízení', 'Vyzářený výkon'); 4 3 5 //include_once('../html/is/error.php'); 4 DB_Init('localhost','root','','is');5 6 6 ini_set('error_reporting', E_ALL); 7 ini_set('display_errors', true); 8 ini_set('display_startup_errors', true); 9 7 //ini_set('error_reporting', E_ALL); 8 //ini_set('display_errors', true); 9 //ini_set('display_startup_errors', true); 10 10 11 11 function DbById($Id) 12 12 { 13 DB_Select('wlan_db', '*', 'id='.$Id); 14 $Row = DB_Row(); 13 global $Database; 14 $DbResult = $Database->select('wlan_db', '*', 'id='.$Id); 15 $Row = $DbResult->fetch_array(); 15 16 return($Row); 16 17 } … … 19 20 20 21 echo('<table width="100%"><tr><td valign="top">'); 21 echo('<table cellspacing="0" cellpadding="3" border="1"><tr><th>Ozna èení</th><th>Výkon [dB]</th><th>Výkon [mW]</tr>');22 DB_Select('wlan_list', 'id,cable_length,name,'.implode(',', $Polozky));23 while($Row = DB_Row())22 echo('<table cellspacing="0" cellpadding="3" border="1"><tr><th>Označení</th><th>Výkon [dB]</th><th>Výkon [mW]</tr>'); 23 $DbResult = $Database->select('wlan_list', 'id,cable_length,name,'.implode(',', $Polozky)); 24 while($Row = $DbResult->fetch_array()) 24 25 { 25 DB_Save();26 26 foreach($Polozky as $Item) 27 27 { … … 46 46 echo('</table></td></tr>'); 47 47 48 DB_Update('wlan_list', 'id='.$Row['id'], array('total' => $Total, 'total_passive' => ($Total-$Row['device_db']))); 49 50 DB_Load(); 48 $Database->update('wlan_list', 'id='.$Row['id'], array('total' => $Total, 'total_passive' => ($Total-$Row['device_db']))); 51 49 } 52 50 echo('</table>'); … … 56 54 echo('<table cellspacing="0" cellpadding="3" border="1"> 57 55 <tr><th>Bod 1</th><th>Bod 2</th><th>Signál [dB]</tr>'); 58 DB_Select('wlan_links', '*');59 while($Row = DB_Row())56 $DbResult = $Database->select('wlan_links', '*'); 57 while($Row = $DbResult->fetch_array()) 60 58 { 61 DB_Save(); 62 63 DB_Select('wlan_list', '*', 'id='.$Row['point1']); 64 $Point1 = DB_Row(); 65 DB_Select('wlan_list', '*', 'id='.$Row['point2']); 66 $Point2 = DB_Row(); 59 $DbResult2 = $Database->select('wlan_list', '*', 'id='.$Row['point1']); 60 $Point1 = $DbResult2->fetch_array(); 61 $DbResult2 = $Database->select('wlan_list', '*', 'id='.$Row['point2']); 62 $Point2 = $DbResult2->fetch_array(); 67 63 68 64 $UtlumTrasy = -round(40 + 20*log10($Row['distance'])); … … 71 67 echo('<tr><td colspan="3"><table style="font-size: smaller;" width="100%" cellspacing="0" cellpadding="3" border="1">'); 72 68 73 echo('<tr><td>Vyzá øený výkon</td><td>'.$Point1['total'].'</td></tr>');69 echo('<tr><td>Vyzářený výkon</td><td>'.$Point1['total'].'</td></tr>'); 74 70 echo('<tr><td>Útlum trasy</td><td>'.$UtlumTrasy.'</td></tr>'); 75 echo('<tr><td>Zisk p øíjímaèe</td><td>'.$Point2['total_passive'].'</td></tr>');71 echo('<tr><td>Zisk příjímače</td><td>'.$Point2['total_passive'].'</td></tr>'); 76 72 77 73 echo('</table></td></tr>'); 78 79 DB_Load();80 74 } 81 75
Note:
See TracChangeset
for help on using the changeset viewer.