Changeset 154 for www/index.php
- Timestamp:
- Feb 16, 2009, 7:54:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
www/index.php
r153 r154 104 104 $Output = '<img alt="" src="images/favicons/comp.gif" width="16" height="16" /> '.$OnlineComputers.' / '.$TotalComputers.' '; 105 105 106 $DbResult = $this->Database->select(' users', 'COUNT(*)', 'role=2');106 $DbResult = $this->Database->select('Member', 'COUNT(*)', 'MemberState=0'); 107 107 $DbRow = $DbResult->fetch_array(); 108 108 $TotalUser = $DbRow[0]; … … 121 121 if($this->System->Modules['User']->CheckPermission('Finance', 'DisplaySubjectState')) 122 122 { 123 $DbResult = $this->Database->select(' users', 'cash', 'User='.$this->System->Modules['User']->User['Id']);123 $DbResult = $this->Database->select('Subject', 'Money', 'Id=(SELECT Subject FROM Member WHERE Id=(SELECT Member FROM User WHERE Id='.$this->System->Modules['User']->User['Id'].'))'); 124 124 if($DbResult->num_rows > 0) 125 125 { 126 $DbRow = $DbResult->fetch_array(); 127 $Finance = $DbRow[0]; 128 $Output2 .= ' <img alt="" src="images/favicons/money.gif" width="16" height="16" /> '.$Finance.' Kč'; 126 $DbRow = $DbResult->fetch_assoc(); 127 $Output2 .= ' <img alt="" src="images/favicons/money.gif" width="16" height="16" /> '.$DbRow['Money'].' Kč'; 129 128 } 130 129 } … … 157 156 } 158 157 159 // Zobrazení seznamu online počítačů160 158 function OnlineHostList() 161 159 { … … 172 170 } 173 171 174 // Zobrazení seznamu neplaticich uzivatelu175 172 function ShowBadPayerList() 176 173 { 177 174 $Output .= '<div class="PanelTitle">Dlužníci:</div><span style="font-size: smaller;">'; 178 $DbResult = $Database->select(' users', 'CONCAT(second_name, " ", first_name) as fullname', 'cash<0 AND role=2 ORDER BY cash');175 $DbResult = $Database->select('Subject', 'Name', 'Money < 0 ORDER BY Money'); 179 176 while($Row = $DbResult->fetch_array()) 180 177 { 181 $Output .= $Row[' fullname'].'<br />';178 $Output .= $Row['Name'].'<br />'; 182 179 } 183 180 $Output .= '</span>'; … … 185 182 } 186 183 187 // Zobrazení času běhu počítače188 184 function GetServerUptime() 189 185 { 190 186 $Data = explode(' ',exec('uptime')); 191 $Data = array_slice($Data, 3,-8);187 $Data = array_slice($Data, 3, -8); 192 188 $Uptime = ''; 193 189 foreach($Data as $Item) 194 190 { 195 if(strpos($Item, ':')) $Uptime .= substr($Item,0,-1).' hodin';191 if(strpos($Item, ':')) $Uptime .= substr($Item, 0, -1).' hodin'; 196 192 else $Uptime .= $Item.' '; 197 193 } 198 $Uptime = str_replace('2 days,', '2 dny a',$Uptime);199 $Uptime = str_replace('3 days,', '3 dny a',$Uptime);200 $Uptime = str_replace('4 days,', '4 dny a',$Uptime);201 $Uptime = str_replace('days,', 'dní a',$Uptime);202 $Uptime = str_replace('day,', 'den a',$Uptime);203 $Uptime = str_replace('min,', 'minut',$Uptime);194 $Uptime = str_replace('2 days,', '2 dny a', $Uptime); 195 $Uptime = str_replace('3 days,', '3 dny a', $Uptime); 196 $Uptime = str_replace('4 days,', '4 dny a', $Uptime); 197 $Uptime = str_replace('days,', 'dní a', $Uptime); 198 $Uptime = str_replace('day,', 'den a', $Uptime); 199 $Uptime = str_replace('min,', 'minut', $Uptime); 204 200 return($Uptime); 205 201 } … … 209 205 global $Database, $Config, $User; 210 206 211 //$Database->select_db('share');212 //$Output = $this->InfoBar();213 // Process cookies214 207 $Output = ''; 215 208 if(array_key_exists('Action', $_GET)) … … 301 294 $Database->select_db('is'); 302 295 296 $Output .= $this->InfoBar(); 303 297 $Output .= '<table id="MainTable"><tr><td valign="top">'; 304 298 $Output .= '<div class="Panel">'.$this->ShowLinks($this->Links['main']).'</div>';
Note:
See TracChangeset
for help on using the changeset viewer.