Changeset 73
- Timestamp:
- Aug 23, 2009, 7:02:12 PM (15 years ago)
- Location:
- trunk/www
- Files:
-
- 2 added
- 3 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Application/Controller/HomePage.php
r72 r73 23 23 return($Page->GetOutput($View->State())); 24 24 } 25 26 /*27 class Index extends Page28 {29 var $FullTitle = 'Seznam serverů';30 var $ShortTitle = 'Seznam serverů';31 32 function Show()33 {34 global $Config;35 36 $Output = '';37 if(array_key_exists('Action', $_GET))38 {39 if($_GET['Action'] == 'BackupList')40 {41 $BackupView = new BackupView($this->Database, $this->System);42 $Output .= $BackupView->ItemList();43 } else44 if($_GET['Action'] == 'UpdateList')45 {46 $UpdateView = new UpdateView($this->Database, $this->System);47 $Output .= $UpdateView->ItemList();48 } else49 if($_GET['Action'] == 'BackupAdd')50 {51 $BackupView = new BackupView($this->Database, $this->System);52 $Output .= $BackupView->Add();53 } else54 if($_GET['Action'] == 'BackupRestore')55 {56 $BackupView = new BackupView($this->Database, $this->System);57 $Output .= $BackupView->Restore();58 } else59 if($_GET['Action'] == 'BackupDownload')60 {61 $BackupView = new BackupView($this->Database, $this->System);62 $Output .= $BackupView->Download();63 } else64 if($_GET['Action'] == 'Update')65 {66 $UpdateView = new UpdateView($this->Database, $this->System);67 $Output .= $UpdateView->Update();68 } else69 70 $BaseView = new BaseView($this->Database, $this->System);71 $Content = $Output;72 $Output = '<table class="BasicTable"><tr>';73 if($this->System->Modules['User']->User['Id'] != $this->System->Modules['User']->AnonymousUserId)74 $Output .= '<td class="UserMenu">'.$BaseView->UserMenu().'</td>';75 $Output .= '<td class="Content">'.$Content.'</td>';76 if(!array_key_exists('Action', $_GET))77 {78 $NewsView = new NewsView($this->Database, $this->System);79 $Output .= $NewsView->View();80 }81 $Output .= '</tr></table>';82 return($Output);83 }84 }85 86 $System->AddModule(new Index($Database, $System));87 $System->Modules['Index']->GetOutput();88 */89 90 25 } 91 26 -
trunk/www/Application/Controller/Include.php
r72 r73 10 10 include('Application/Controller/News.php'); 11 11 include('Application/Controller/Debug.php'); 12 include('Application/Controller/Backup.php'); 12 13 13 14 ?> -
trunk/www/Application/Controller/Server.php
r71 r73 79 79 return($Page->GetOutput($View->AccountCreateFinish())); 80 80 } 81 82 function RealmList() 83 { 84 $View = new ServerView($this->System); 85 $View->RealmListfile(); 86 } 87 88 function PatchList() 89 { 90 $View = new ServerView($this->System); 91 $View->PatchList(); 92 } 93 94 function XMLExport() 95 { 96 $View = new ServerView($this->System); 97 $View->XMLExport(); 98 } 81 99 } 82 100 -
trunk/www/Application/View/HomePage.php
r69 r73 17 17 } 18 18 19 function UserMenu()20 {21 global $Config;22 23 $Output = '<strong>Uživatelské menu</strong><br />';24 if($this->System->Modules['User']->User['Id'] != $this->System->Modules['User']->AnonymousUserId)25 {26 $Output .= '<div><a href="?Action=ServerList&Filter=User">Moje servery</a></div>';27 //$Output .= '<div><a href="?Action=RealmList&Filter=User">Moje světy</a></div>';28 //$Output .= '<div><a href="?Action=DebugList&Id='.$Server['Id'].'">Ladící záznamy</a></div>';29 //$Output .= '<div><a href="?Action=BackupList&Id='.$Server['Id'].'">Zálohy</a></div>';30 $Output .= '<div><a href="?Action=TaskList">Fronta úloh</a></div>';31 //$Output .= '<div><a href="?Action=UpdateList&Id='.$Server['Id'].'">Dostupné aktualizace</a></div>';32 33 if($this->System->Modules['User']->User['Role'] == USER_ROLE_ADMINISTRATOR)34 {35 $Output .= '<div><a href="?Action=NewsAdd">Přidat aktualitu</a></div>';36 }37 }38 return($Output);39 }40 41 19 function Info() 42 20 { 43 global $Config;44 45 21 $Output = '<h4>Informace</h4>'. 46 22 '<p>Tento free hosting WoW serverů vám nabízí zdarma vytvoření vlastního malého serveru. Vytvoření a správa serveru nikdy nebyly jednodušší.</p>'. … … 62 38 '</ul><br />'. 63 39 '<p>Vámi vytvořený server může být bez předchozího upozornění smazán, např. pokud nebude již využíván nebo bude potřeba snížit vytížení hostingu.</p>'. 64 'Technická podpora: '.$ Config['Web']['AdminEmail'];40 'Technická podpora: '.$this->Config['Web']['AdminEmail']; 65 41 return($Output); 66 42 } -
trunk/www/Application/View/Page.php
r71 r73 60 60 return($Output); 61 61 } 62 63 function CenterPanel($Content) 64 { 65 $Output = '<table class="BasicTable"><tr>'; 66 if($this->System->Modules['User']->User['Id'] != $this->System->Modules['User']->AnonymousUserId) 67 $Output .= '<td class="UserMenu">'.$this->UserMenu().'</td>'; 68 $Output .= '<td class="Content">'.$Content.'</td>'; 69 if(!array_key_exists('Action', $_GET)) 70 { 71 $NewsView = new NewsView($this->Database, $this->System); 72 $Output .= $NewsView->View(); 73 } 74 $Output .= '</tr></table>'; 75 return($Output); 76 } 77 78 function UserMenu() 79 { 80 $Output = '<strong>Uživatelské menu</strong><br />'; 81 if($this->System->Modules['User']->User['Id'] != $this->System->Modules['User']->AnonymousUserId) 82 { 83 $Output .= '<div><a href="?Module=Server&Action=ItemList&Filter=User">Moje servery</a></div>'; 84 //$Output .= '<div><a href="?Action=RealmList&Filter=User">Moje světy</a></div>'; 85 //$Output .= '<div><a href="?Action=DebugList&Id='.$Server['Id'].'">Ladící záznamy</a></div>'; 86 //$Output .= '<div><a href="?Action=BackupList&Id='.$Server['Id'].'">Zálohy</a></div>'; 87 $Output .= '<div><a href="?Module=Task&Action=ItemList">Fronta úloh</a></div>'; 88 //$Output .= '<div><a href="?Action=UpdateList&Id='.$Server['Id'].'">Dostupné aktualizace</a></div>'; 89 90 if($this->System->Modules['User']->User['Role'] == USER_ROLE_ADMINISTRATOR) 91 { 92 $Output .= '<div><a href="?Module=News&Action=Add">Přidat aktualitu</a></div>'; 93 } 94 } 95 return($Output); 96 } 62 97 63 98 function GetOutput($Content) … … 65 100 global $Config; 66 101 67 $Output = $this->ShowHeader($this->FullTitle, $this->ShortTitle).$Content; 102 $Output = $this->ShowHeader($this->FullTitle, $this->ShortTitle). 103 $this->CenterPanel($Content); 68 104 $Output .= $this->ShowFooter(); 69 105 if($Config['Web']['FormatHTML'] == true) echo($this->FormatOutput($Output)); -
trunk/www/Application/View/Server.php
r71 r73 74 74 function ShowListOnRow($Row) 75 75 { 76 $Row['NetworkPortRealmd'] = '<a href=" realmlist.php?Id='.$Row['Id'].'">'.$Row['NetworkPortRealmd'].'</a>';76 $Row['NetworkPortRealmd'] = '<a href="?Module=Server&Action=RealmList&Id='.$Row['Id'].'">'.$Row['NetworkPortRealmd'].'</a>'; 77 77 if($Row['Homepage'] != '') $Row['Name'] = '<a href="'.$Row['Homepage'].'">'.$Row['Name'].'</a>'; 78 78 unset($Row['Homepage']); … … 313 313 return($Output); 314 314 } 315 316 function RealmListFile() 317 { 318 if(array_key_exists('Id', $_GET)) 319 { 320 Header('Content-Type: text/plain'); 321 Header('Content-Disposition: attachment; filename="realmlist.wtf"'); 322 $Server = new Server($this->Database, $_GET['Id']); 323 $Output = array( 324 'set realmlist '.$this->Config['Web']['Host'].':'.$Server->Server['NetworkPortRealmd'], 325 'set patchlist '.$this->Config['Web']['Host'].':'.$Server->Server['NetworkPortRealmd'], 326 'set portal eu', 327 ); 328 echo(implode("\n", $Output)); 329 } else echo('Musíte zadat Id serveru'); 330 } 331 332 function PatchList() 333 { 334 Header('Content-type: text/plain'); 335 if(array_key_exists('Id', $_GET)) 336 { 337 $Server = new Server($this->Database, $_GET['Id'] * 1); 338 echo($Server->GetPatchList()); 339 } else echo('Zadané id serveru nenalezeno.'); 340 } 341 342 function XMLExport() 343 { 344 Header('Content-Type: application/xml'); 345 346 $Output = '<?xml version="1.0" encoding="utf-8"?>'; 347 if(array_key_exists('File', $_GET)) 348 { 349 Header('Content-Disposition: filename="'.$_GET['File'].'.xml"'); 350 if($_GET['File'] == 'ServerList') 351 { 352 $Output .= '<serverlist version="1.0">'; 353 $DbResult = $this->Database->query('SELECT * FROM Server'); 354 while($Server = $DbResult->fetch_assoc()) 355 { 356 $Output .= '<server>'. 357 '<name>'.$Server['Name'].'</name>'. 358 //'<playermaxcount>'.$Server['PlayerMaxCount'].'</playermaxcount>'. 359 //'<playeronlinecount>'.$Server['PlayerOnlineCount'].'</playeronlinecount>'. 360 '<homepage>'.$Server['Homepage'].'</homepage>'. 361 '</server>'; 362 } 363 $Output .= '</serverlist>'; 364 } 365 } else $Output .= '<document/>'; 366 $Html = new Html(); 367 if($this->Config['Web']['FormatHTML'] == true) echo($Html->FormatOutput($Output)); 368 else echo($Output); 369 } 315 370 } 316 371
Note:
See TracChangeset
for help on using the changeset viewer.