Changeset 465 for trunk/includes
- Timestamp:
- Apr 15, 2010, 6:45:17 AM (15 years ago)
- Location:
- trunk/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/includes/global.php ¶
r462 r465 48 48 $DbResult = $System->Database->query('SELECT * FROM `ShoutBox` ORDER BY `ID` DESC LIMIT 30'); 49 49 while($Line = $DbResult->fetch_assoc()) 50 echo('<tr><td><strong>'.$Line['User'].'</strong>: '. htmlspecialchars($Line['Text']).'</td></tr>');50 echo('<tr><td><strong>'.$Line['User'].'</strong>: '.MakeActiveLinks(htmlspecialchars($Line['Text'])).'</td></tr>'); 51 51 echo('</table></div>'); 52 52 } -
TabularUnified trunk/includes/global_function.php ¶
r462 r465 557 557 } 558 558 559 function MakeActiveLinks($Content) 560 { 561 $Result = ''; 562 $I = 0; 563 while(strpos($Content, 'http://') !== false) 564 { 565 $I = strpos($Content, 'http://'); 566 $Result .= substr($Content, 0, $I); 567 $Content = substr($Content, $I); 568 if(strpos($Content, ' ') !== false) 569 $URL = substr($Content, 0, strpos($Content, ' ')); 570 else $URL = substr($Content, 0); 571 $Result .= '<a href="'.$URL.'">'.$URL.'</a>'; 572 $Content = substr($Content, strlen($URL)); 573 } 574 $Result .= $Content; 575 return($Result); 576 } 577 559 578 ?>
Note:
See TracChangeset
for help on using the changeset viewer.