private function CreateLink($title, $href, $img) { $href = str_replace("{url}", urlencode($_SERVER['SCRIPT_URI']), $href); $href = str_replace("{title}", urlencode($title), $href); $href = str_replace("{domain}", urlencode($_SERVER['SERVER_NAME']), $href); $img = new Image($img, $title); $res = new Anchor($href); $res->title = $title; $res->target = "_blank"; $res->content($img); return $res; }