First commit.
This commit is contained in:
13
subsites/pictures/get_info.php
Executable file
13
subsites/pictures/get_info.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
function get_info($img) {
|
||||
$txt = @file_get_contents("info/$img.info");
|
||||
if (!$txt || $txt == '')
|
||||
return 'No information available.';
|
||||
|
||||
//return preg_replace(array('/<(.*)>/', '/[(.*)]/'), array("<<a href='$1'>$1</a>>", "[<a href='$1'>$1</a>]"), $txt);
|
||||
//$txt = preg_replace('/<(.*)>/', "<<a href='$1'>$1</a>>", $txt);
|
||||
//$txt = preg_replace('/\[(.*)\]/', "[<a href='$1'>$1</a>]", $txt);
|
||||
return preg_replace(array('/<(.*)>/', '/\[([^]]*)\]/'), array("<<a href='$1'>$1</a>>", "[<a href='$1'>$1</a>]"), $txt);
|
||||
return $txt;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user