- Timestamp:
- Sep 14, 2009, 7:53:21 AM (15 years ago)
- Location:
- trunk/inc
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/config.sample.php
r630 r634 69 69 'ServerFounded' => '1.1.2000', 70 70 'BankAccount' => '670100-2202937132/6210', 71 'TableRowPerPage' => 20, 71 72 'ServerList' => array( 72 73 1 => array( -
trunk/inc/html.php
r630 r634 301 301 } 302 302 } 303 304 function GetQueryStringArray() 305 { 306 $Result = array(); 307 $Parts = explode('&', $_SERVER['QUERY_STRING']); 308 foreach($Parts as $Part) 309 { 310 if($Part != '') 311 { 312 $Item = explode('=', $Part); 313 $Result[$Item[0]] = $Item[1]; 314 } 315 } 316 return($Result); 317 } 318 319 function SetQueryStringArray($QueryStringArray) 320 { 321 $Parts = array(); 322 foreach($QueryStringArray as $Index => $Item) 323 { 324 $Parts[] = $Index.'='.$Item; 325 } 326 return(implode('&', $Parts)); 327 } 328 329 // Zobrazení číselný seznamu stránek 330 function PageList($QueryStringVar, $Page, $TotalCount, $CountPerPage, $Around = 10) 331 { 332 $QueryStringArray = $this->GetQueryStringArray(); 333 $Count = ceil($TotalCount / $CountPerPage); 334 $Result = ''; 335 if($Count > 1) 336 { 337 if($Page > 0) 338 { 339 $QueryStringArray[$QueryStringVar] = 0; 340 $Result .= '<a href="?'.$this->SetQueryStringArray($QueryStringArray).'"><<</a> '; 341 $QueryStringArray[$QueryStringVar] = $Page - 1; 342 $Result .= '<a href="?'.$this->SetQueryStringArray($QueryStringArray).'"><</a> '; 343 } 344 $PagesMax = $Count - 1; 345 $PagesMin = 0; 346 if($PagesMax > ($Page + $Around)) $PagesMax = $Page + $Around; 347 if($PagesMin < ($Page - $Around)) 348 { 349 $Result .= ' .. '; 350 $PagesMin = $Page - $Around; 351 } 352 for($i = $PagesMin; $i <= $PagesMax; $i++) 353 { 354 if($i == $Page) $Result .= '<strong>'; 355 $QueryStringArray[$QueryStringVar] = $i; 356 $Result .= '<a href="?'.$this->SetQueryStringArray($QueryStringArray).'">'.($i + 1).'</a> '; 357 if($i == $Page) $Result .= '</strong>'; 358 } 359 if($PagesMax < ($Count - 1)) $Result .= ' .. '; 360 if($Page < ($Count - 1)) 361 { 362 $QueryStringArray[$QueryStringVar] = $Page + 1; 363 $Result .= '<a href="?'.$this->SetQueryStringArray($QueryStringArray).'">></a> '; 364 $QueryStringArray[$QueryStringVar] = $Count - 1; 365 $Result .= '<a href="?'.$this->SetQueryStringArray($QueryStringArray).'">>></a>'; 366 } 367 } 368 return($Result); 369 } 303 370 } 304 371 -
trunk/inc/module.php
r630 r634 10 10 { 11 11 $this->Database = $System->Database; 12 $this->Config = $System->Config;12 $this->Config = &$System->Config; 13 13 $this->System = $System; 14 14 } -
trunk/inc/realm.php
r633 r634 1 1 <?php 2 3 include_once(dirname(__FILE__).'/module.php'); 2 4 3 5 class Realm extends Module -
trunk/inc/server.php
r630 r634 1 1 <?php 2 3 include_once(dirname(__FILE__).'/module.php'); 2 4 3 5 function NullErrorHandler()
Note:
See TracChangeset
for help on using the changeset viewer.