Changeset 33
- Timestamp:
- Jun 15, 2009, 7:22:15 AM (15 years ago)
- Location:
- trunk/www
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/form_classes.php
r28 r33 180 180 'Title' => array('Type' => 'String', 'Caption' => 'Akce', 'Default' => ''), 181 181 'State' => array('Type' => 'TaskState', 'Caption' => 'Stav', 'Default' => ''), 182 ), 183 ), 184 'News' => array( 185 'Title' => 'Aktualita', 186 'Table' => 'News', 187 'Items' => array( 188 'Title' => array('Type' => 'String', 'Caption' => 'Titulek', 'Default' => ''), 189 'Content' => array('Type' => 'Text', 'Caption' => 'Obsah', 'Default' => ''), 182 190 ), 183 191 ), -
trunk/www/index.php
r32 r33 83 83 foreach($Table->Values as $Index => $Item) 84 84 { 85 $Table->Values[$Index]['Actions'] = '<a href="?Action=EmulatorShow&Id='.$Item['Id'].'">Pod probnosti</a>';85 $Table->Values[$Index]['Actions'] = '<a href="?Action=EmulatorShow&Id='.$Item['Id'].'">Podrobnosti</a>'; 86 86 unset($Table->Values[$Index]['Id']); 87 87 } … … 269 269 } else $this->SystemMessage('Import databáze', 'Nemáte oprávnění'); 270 270 } else $Output .= USER_BAD_ROLE; 271 } 272 273 function ShowWelcome() 274 { 275 $Output = '<p>Vítejte v projektu zaměřeném na free hosting WoW serverů.</p>'. 276 '<strong>Použité technologie:</strong><br />'. 277 '<ul>'. 278 '<li><a href="http://www.worldofwarcraft.com/">World of Warcraft</a> - fantasy MMORPG</li>'. 279 '<li><a href="http://www.getmangos.com/">MaNGOS</a> - MMORPG server</li>'. 280 '<li><a href="http://www.udbforums.org/">UDB</a> - databáze pro MaNGOS</li>'. 281 '<li><a href="http://www.scriptdev2.com/">ScriptDev2</a> - doplňkový skriptovací systém pro MaNGOS</li>'. 282 '</ul>'; 283 return($Output); 271 284 } 272 285 … … 290 303 if($this->System->Modules['User']->User['Role'] == USER_ROLE_ADMINISTRATOR) 291 304 { 305 $Output .= '<div><a href="?Action=NewsAdd">Přidat aktualitu</a></div>'; 292 306 } 293 307 } … … 678 692 } else $Output .= USER_BAD_ROLE; 679 693 } else 694 if($_GET['Action'] == 'NewsAdd') 695 { 696 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR) 697 { 698 $Form = new Form('News'); 699 $Form->OnSubmit = '?Action=NewsAdd2'; 700 $Output = $Form->ShowEditForm(); 701 } else $Output .= USER_BAD_ROLE; 702 } else 703 if($_GET['Action'] == 'NewsAdd2') 704 { 705 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR) 706 { 707 $Form = new Form('News'); 708 $Form->LoadValuesFromForm(); 709 $Form->Values['Time'] = 'NOW()'; 710 $Form->Values['User'] = $this->System->Modules['User']->User['Id']; 711 $Form->SaveValuesToDatabase(0); 712 $Output = $this->SystemMessage('Nová aktualita', 'Přidáno'); 713 } else $Output .= USER_BAD_ROLE; 714 } else 680 715 if($_GET['Action'] == 'State') 681 716 { … … 687 722 '<tr><td>Doba běhu serveru</td><td>'.$this->System->AddPrefixMultipliers($State['Uptime'], '', 4, 'Time').'</td></tr>'. 688 723 '<tr><td>Použitá/celková paměť</td><td>'.$this->System->AddPrefixMultipliers($State['MemoryUsed'], 'B', 4, 'Binary').' / '.$this->System->AddPrefixMultipliers($State['MemoryTotal'], 'B', 4, 'Binary').'</td></tr>'. 689 '<tr><td>Počet serverů</td><td>'.$State['ServerCount'].'</td></tr>'. 690 '<tr><td>Počet aktivních serverů</td><td>'.$State['ServerOnlineCount'].'</td></tr>'. 724 '<tr><td>Počet serverů aktivních/všech/maxiální</td><td>'.$State['ServerOnlineCount'].' / '.$State['ServerCount'].' / '.$State['ServerMaxCount'].'</td></tr>'. 691 725 '<tr><td>Počet emulátorů</td><td>'.$State['EmulatorCount'].'</td></tr>'. 692 726 '<tr><td>Počet uživatelů</td><td>'.$State['UserCount'].'</td></tr>'. … … 706 740 } else 707 741 { 708 $Output .= $this->Show ServerList();742 $Output .= $this->ShowWelcome(); 709 743 } 710 744 } else 711 745 { 712 $Output .= $this->ShowServerList(); 713 } 746 $Output .= $this->ShowWelcome(); 747 } 748 $Content = $Output; 749 $Output = '<table class="BasicTable"><tr>'; 714 750 if($this->System->Modules['User']->User['Id'] != $this->System->Modules['User']->AnonymousUserId) 715 $Output = '<table class="BasicTable"><tr><td class="UserMenu">'.$this->UserMenu().'</td><td class="Content">'.$Output.'</td></tr></table>'; 751 $Output .= '<td class="UserMenu">'.$this->UserMenu().'</td>'; 752 $Output .= '<td class="Content">'.$Content.'</td>'; 753 if(!array_key_exists('Action', $_GET)) 754 { 755 $Output .= '<td class="News"><strong>Aktuálně:</strong><br />'; 756 $DbResult = $this->Database->query('SELECT * FROM News'); 757 while($DbRow = $DbResult->fetch_assoc()) 758 { 759 $Output .= '<div><strong>'.$DbRow['Title'].'</strong>('.HumanDate($DbRow['Time']).')<br />'.$DbRow['Content'].'</div>'; 760 } 761 $Output .= '</td>'; 762 } 763 $Output .= '</tr></table>'; 716 764 return($Output); 717 765 } -
trunk/www/platform.php
r32 r33 44 44 function State() 45 45 { 46 global $Config; 47 46 48 $State = array(); 47 49 $State['MemoryUsed'] = $this->MemoryUsage(); … … 69 71 $DbRow = $DbResult->fetch_row(); 70 72 $State['TaskQueued'] = $DbRow[0]; 73 $State['ServerMaxCount'] = $Config['MaxServerCount']; 71 74 return($State); 72 75 } -
trunk/www/style.css
r24 r33 106 106 background-color: #F0F0FF; 107 107 margin-bottom: 4px; 108 }109 110 .NewsTable111 {112 margin: 2px 0px 2px 0px;113 padding: 2px 2px 2px 2px;114 font-size: small;115 border-style: solid;116 border-color: red;117 border-width: 1px;118 background-color: #FFF0F0;119 width: 100%;120 border-collapse: collapse;121 }122 123 .NewsTable td124 {125 padding: 2px 2px 2px 2px;126 margin: 0px 0px 0px 0px;127 }128 129 .NewsTable th130 {131 padding: 2px 2px 2px 2px;132 margin: 0px 0px 0px 0px;133 }134 135 .NewsTableItem136 {137 margin: 2px 2px 2px 2px;138 display: none;139 border-width: 1px;140 border-style: solid;141 border-color: blue;142 padding: 3px;143 font-size: 9pt;144 }145 146 #NewsColumn147 {148 width: 50%;149 }150 151 .NewsBaseTable152 {153 width: 100%;154 border-width: 0px;155 font-size: small;156 padding-bottom: 5px;157 margin-bottom: 5px;158 border-collapse: collapse;159 }160 161 .NewsBaseTable td162 {163 padding: 2px 2px 2px 2px;164 margin: 2px 2px 2px 2px;165 }166 167 .NewsItemFrame168 {169 border-collapse: collapse;170 padding: 0px;171 margin: 2px 2px 2px 2px;172 font-size: small;173 color: red;174 width: 100%;175 108 } 176 109 … … 198 131 width: auto; 199 132 } 200 201 133 202 134 .SystemMessage h3 … … 259 191 } 260 192 261 .ChatHistory .Year 262 { 263 border-style: solid; 264 border-bottom-color: gray; 265 border-width: 0px 0px 1px 0px; 266 margin-bottom: 3px; 267 padding-bottom: 2px; 268 } 269 270 .ChatHistory .Year .YearContent 271 { 272 margin-left: 15px; 273 margin-right: 15px; 274 } 275 276 .ChatHistory .Year .YearContent .Months 277 { 278 border-style: solid; 279 border-bottom-color: gray; 280 border-width: 0px 0px 1px 0px; 281 margin-bottom: 3px; 282 padding-bottom: 2px; 283 } 284 285 .ChatHistory .Year .YearContent .Months span 286 { 287 position: absolute; 288 left: 100px; 289 } 290 291 .ChatHistory .YearContent .Months span strong 292 { 193 .WideTable 194 { 195 border-color: black; 196 border-style: solid; 197 border-width: 1px 1px 0px 0px; 198 border-spacing: 0px; 199 text-align: center; 200 margin-left: auto; 201 margin-right: auto; 202 border-collapse: collapse; 203 } 204 205 .WideTable th 206 { 207 border-color: black; 208 border-style: solid; 209 border-width: 0px 0px 1px 1px; 210 padding: 1px 5px 1px 5px; 211 background-color: #F0F0FF 212 } 213 214 .WideTable td 215 { 216 border-color: black; 217 border-style: solid; 218 border-width: 0px 0px 1px 1px; 219 padding: 1px 5px 1px 5px; 220 text-align: center; 221 } 222 223 .BasicTable .Header 224 { 225 text-align: center; 226 } 227 228 .Pager 229 { 230 text-align: center; 231 } 232 233 .UserMenu 234 { 235 width: 15%; 236 } 237 238 .Content 239 { 240 } 241 242 h4 243 { 244 text-align: center; 245 margin-bottom: 3px; 246 } 247 248 .News 249 { 250 font-size: small; 251 width: 20%; 293 252 border-style: solid; 294 253 border-width: 1px; … … 297 256 } 298 257 299 .ChatHistoryText 300 { 301 font-size: small; 302 padding: 10px 0px 10px 0px; 303 } 304 305 .WideTable 306 { 307 border-color: black; 308 border-style: solid; 309 border-width: 1px 1px 0px 0px; 310 border-spacing: 0px; 311 text-align: center; 312 margin-left: auto; 313 margin-right: auto; 314 border-collapse: collapse; 315 } 316 317 .WideTable th 318 { 319 border-color: black; 320 border-style: solid; 321 border-width: 0px 0px 1px 1px; 322 padding: 1px 5px 1px 5px; 323 background-color: #F0F0FF 324 } 325 326 .WideTable td 327 { 328 border-color: black; 329 border-style: solid; 330 border-width: 0px 0px 1px 1px; 331 padding: 1px 5px 1px 5px; 332 text-align: center; 333 } 334 335 .BasicTable .Header 336 { 337 text-align: center; 338 } 339 340 .Pager 341 { 342 text-align: center; 343 } 344 345 .UserMenu 346 { 347 width: 15%; 348 } 349 350 .Content 351 { 352 } 353 354 h4 355 { 356 text-align: center; 357 margin-bottom: 3px; 358 } 258 .News div 259 { 260 padding-top: 7px; 261 }
Note:
See TracChangeset
for help on using the changeset viewer.