Changeset 229
- Timestamp:
- Jun 21, 2009, 12:04:00 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/database.php
r226 r229 54 54 { 55 55 if(!in_array($Value, $this->Functions)) $Value = '"'.$this->real_escape_string($Value).'"'; 56 $Values .= ', '.$Key.'='.$Value;56 $Values .= ', `'.$Key.'`='.$Value; 57 57 } 58 58 $Values = substr($Values, 2); -
trunk/forms.php
r219 r229 94 94 $Edit = '<select style="width: 100%;" name="'.$Context.$Index.'">'; 95 95 $DbResult = $Database->select($FormTypes[$Item['Type']]['Table'], $FormTypes[$Item['Type']]['Id'].' as Id, '.$FormTypes[$Item['Type']]['Name'].' as Name', $FormTypes[$Item['Type']]['Filter'].' ORDER BY Name'); 96 while($Row = $DbResult->fetch_array()) 97 $Edit .= '<option value="'.$Row['Id'].'">'.$Row['Name'].'</option>'; 96 while($Row = $DbResult->fetch_assoc()) 97 { 98 if($Row['Id'] == $this->Values[$Index]) $Selected = ' selected="selected"'; 99 else $Selected = ''; 100 $Edit .= '<option value="'.$Row['Id'].'"'.$Selected.'>'.$Row['Name'].'</option>'; 101 } 98 102 $Edit .= '</select>'; 99 103 break; -
trunk/global.php
r228 r229 50 50 array('u', 'mikro', pow(10, -6)), 51 51 array('m', 'mili', pow(10, -3)), 52 array('', '', pow(10, 0) , pow(2, 0)),52 array('', '', pow(10, 0)), 53 53 array('k', 'kilo', pow(10, 3)), 54 54 array('M', 'mega', pow(10, 6)), … … 63 63 'Time' => array 64 64 ( 65 'BaseIndex' => 0,65 'BaseIndex' => 8, 66 66 'Definition' => array 67 67 ( … … 75 75 array('ms', 'milisekunda', pow(10, -3)), 76 76 array('s', 'sekunda', 1), 77 array('min ', 'minuta', 60),78 array('hod ', 'hodina', 60 * 60) ,79 array('d en', 'den', 24 * 60 * 60),80 array('týd ', 'týden', 7 * 24 * 60 * 60),81 array('měs ', 'měsíc', 30 * 24 * 60 * 60),82 array('rok ', 'rok', 364 * 24 * 60 * 60),83 array('des ', 'desetiletí', 10 * 364 * 24 * 60 * 60),84 array('sta ', 'staletí', 100 * 364 * 24 * 60 * 60),85 array('tis ', 'tisiciletí', 10000 * 364 * 24 * 60 * 60),77 array('minut', 'minuta', 60), 78 array('hodin', 'hodina', 60 * 60) , 79 array('dnů', 'den', 24 * 60 * 60), 80 array('týdnů', 'týden', 7 * 24 * 60 * 60), 81 array('měsíců', 'měsíc', 30 * 24 * 60 * 60), 82 array('roků', 'rok', 364 * 24 * 60 * 60), 83 array('desetiletí', 'desetiletí', 10 * 364 * 24 * 60 * 60), 84 array('stalatí', 'staletí', 100 * 364 * 24 * 60 * 60), 85 array('tisíciletí', 'tisiciletí', 10000 * 364 * 24 * 60 * 60), 86 86 ), 87 87 ), 88 88 ); 89 90 89 91 90 class System extends Module … … 137 136 function HumanDate($Time) 138 137 { 139 138 return(date('j.n.Y', $Time)); 140 139 } 141 140 … … 158 157 global $PrefixMultipliers; 159 158 160 if(($Unit == '') and ($PrefixType != 'Time')) return($this->TruncateDigits($Value, $Digits)); 159 $Negative = ($Value < 0); 160 $Value = abs($Value); 161 if(($Unit == '') and ($PrefixType != 'Time')) 162 return($this->TruncateDigits($Value, $Digits)); 163 161 164 $I = $PrefixMultipliers[$PrefixType]['BaseIndex']; 162 if($Value > 0) $II = 1; 163 else if($Value < 0) $II = -1; 164 else $II = 0; 165 while((($Value / $PrefixMultipliers[$PrefixType]['Definition'][$I + $II][2]) > $II) and (($I + $II) >= 0) and (($I + $II) <= count($PrefixMultipliers[$PrefixType]['Definition']))) $I = $I + $II; 165 if($Value == 0) return($Value.' '.$PrefixMultipliers[$PrefixType]['Definition'][$I][0].$Unit); 166 167 if($Value > 1) 168 { 169 while((($I + 1) <= count($PrefixMultipliers[$PrefixType]['Definition'])) and (($Value / $PrefixMultipliers[$PrefixType]['Definition'][$I + 1][2]) > 1)) 170 $I = $I + 1; 171 } else 172 if($Value < 1) 173 { 174 while((($I - 1) >= 0) and (($Value / $PrefixMultipliers[$PrefixType]['Definition'][$I][2]) < 1)) 175 $I = $I - 1; 176 } 166 177 $Value = $Value / $PrefixMultipliers[$PrefixType]['Definition'][$I][2]; 167 178 168 179 // Truncate digits count 169 180 $Value = $this->TruncateDigits($Value, $Digits); 170 181 if($Negative) $Value = -$Value; 171 182 return($Value.' '.$PrefixMultipliers[$PrefixType]['Definition'][$I][0].$Unit); 172 183 } -
trunk/network.php
r195 r229 98 98 break; 99 99 case 'obsazeni_wifi_kanalu': 100 $Output .= '<br /><strong>Obsazení wifi kanálů:</strong><br /> 101 <table style="font-size: small;" border="1" cellspacing="0" cellpadding="3"> 102 <tr><th>Kanál</th><th>Frekvence [GHz]</th><th>Zařízení</th></tr> 103 <tr><td>1</td><td>2,412</td><td>AP-RUDO, AP-HAJDIKOVI, ptp-skarpa</td></tr> 104 <tr><td>2</td><td>2,417</td><td> </td></tr> 105 <tr><td>3</td><td>2,422</td><td>ap-markytan, ap-zvonicek, ap-hrbacek</td></tr> 106 <tr><td>4</td><td>2,427</td><td>ap-george</td></tr> 107 <tr><td>5</td><td>2,432</td><td>AP-MARON, ap-janicata</td></tr> 108 <tr><td>6</td><td>2,437</td><td>ap-sekula</td></tr> 109 <tr><td>7</td><td>2,442</td><td>ap-chaty</td></tr> 110 <tr><td>8</td><td>2,447</td><td>ap-bytovky</td></tr> 111 <tr><td>9</td><td>2,452</td><td>ap-kopecek</td></tr> 112 <tr><td>10</td><td>2,457</td><td>ap-skarpa, AP-HAJDIKOVI2, AP-NAVRATIL</td></tr> 113 <tr><td>11</td><td>2,462</td><td> </td></tr> 114 <tr><td>12</td><td>2,467</td><td> </td></tr> 115 <tr><td>13</td><td>2,472</td><td>ap-hajda, zbranek</td></tr> 116 <tr><td>100</td><td>5,500</td><td>ptp-markytan</td></tr> 117 <tr><td>104</td><td>5,520</td><td>ptp-smutny</td></tr> 118 <tr><td>108</td><td>5,540</td><td> </td></tr> 119 <tr><td>112</td><td>5,560</td><td> </td></tr> 120 <tr><td>116</td><td>5,580</td><td>ptp-janicata</td></tr> 121 <tr><td>120</td><td>5,600</td><td>ptp-hajdova</td></tr> 122 <tr><td>124</td><td>5,620</td><td> </td></tr> 123 <tr><td>128</td><td>5,640</td><td>ptp-bytovky</td></tr> 124 <tr><td>132</td><td>5,660</td><td>ptp-chaty</td></tr> 125 <tr><td>136<td>5,700</td></td><td>ptp-sekula</td></tr> 126 <tr><td>140<td>5,720</td></td><td> </td></tr> 127 </table>'; 128 $Output .= 'Aktualizováno: 10.8.2008'; 100 $Output .= '<br/><div align="center"><strong>Seznam AP a obsazení wifi kanálů:</strong></div> 101 <table class="WideTable"> 102 <tr><th>Kanál</th><th>Frekvence [GHz]</th><th>SSID</th></tr>'; 103 // http://en.wikipedia.org/wiki/List_of_WLAN_channels 104 $ChannelList = array(2412 => 1, 2417 => 2, 2422 => 3, 2427 => 4, 2432 => 5, 2437 => 6, 2442 => 7, 2447 => 8, 2452 => 9, 2457 => 10, 2462 => 11, 2467 => 12, 2472 => 13, 5210 => 42, 5250 => 50, 5290 => 48, 5500 => 100, 5520 => 104, 5540 => 108, 5560 => 112, 5580 => 116, 5600 => 120, 5620 => 124, 5640 => 128, 5660 => 132, 5700 => 140, 5720 => 144); 105 $DbResult = $this->Database->query('SELECT Frequency FROM NetworkAP GROUP BY Frequency'); 106 while($DbRow = $DbResult->fetch_assoc()) 107 { 108 $SSID = ''; 109 $DbResult2 = $this->Database->query('SELECT * FROM NetworkAP WHERE Frequency='.$DbRow['Frequency']); 110 while($DbRow2 = $DbResult2->fetch_assoc()) 111 $SSID .= ', '.$DbRow2['SSID']; 112 $SSID = substr($SSID, 2); 113 $Output .= '<tr><td>'.$ChannelList[$DbRow['Frequency']].'</td><td>'.$DbRow['Frequency'].'</td><td>'.$SSID.'</td></tr>'; 114 } 115 $Output .= '</table>'; 129 116 break; 130 117 default:
Note:
See TracChangeset
for help on using the changeset viewer.