Changeset 466 for trunk/includes/global_function.php
- Timestamp:
- Apr 15, 2010, 8:20:31 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global_function.php
r465 r466 342 342 if(isset($LanguageList[$LanguageId]) == false) 343 343 { 344 echo('Jazyk dle zadaného Id neexistuje.');344 ShowMessage('Jazyk dle zadaného Id neexistuje.', MESSAGE_CRITICAL); 345 345 ShowFooter(); 346 346 die(); … … 559 559 function MakeActiveLinks($Content) 560 560 { 561 $Content = htmlspecialchars($Content); 562 $Content = str_replace("\n", ' <br/>', $Content); 563 $Content = str_replace("\r", '', $Content); 564 561 565 $Result = ''; 562 566 $I = 0; … … 566 570 $Result .= substr($Content, 0, $I); 567 571 $Content = substr($Content, $I); 568 if(strpos($Content, ' ') !== false)569 572 $SpacePos = strpos($Content, ' '); 573 if($SpacePos !== false) $URL = substr($Content, 0, strpos($Content, ' ')); 570 574 else $URL = substr($Content, 0); 575 571 576 $Result .= '<a href="'.$URL.'">'.$URL.'</a>'; 572 577 $Content = substr($Content, strlen($URL)); … … 576 581 } 577 582 583 define('MESSAGE_WARNING', 0); 584 define('MESSAGE_CRITICAL', 1); 585 define('MESSAGE_INFORMATION', 2); 586 587 function ShowMessage($Text, $Type = MESSAGE_INFORMATION) 588 { 589 global $System; 590 591 $IconName = array(MESSAGE_INFORMATION => 'information', MESSAGE_WARNING => 'warning', MESSAGE_CRITICAL => 'critical'); 592 $BackgroundColor = array(MESSAGE_INFORMATION => '#e0e0ff', MESSAGE_WARNING => '#ffffe0', MESSAGE_CRITICAL => '#ffe0e0'); 593 594 echo('<div class="message" style="background-color: '.$BackgroundColor[$Type].';"><table><tr><td class="icon"><img src="'.$System->Link('/images/message/'.$IconName[$Type].'.png').'" alt="'.$IconName[$Type].'"><td>'.$Text.'</td></tr></table></div>'); 595 } 596 578 597 ?>
Note:
See TracChangeset
for help on using the changeset viewer.