return eregi("^$atom+(\\.$atom+)*@($domain?\\.)+$domain\$", $email);
}
+/** Check whether the string is URL address
+* @param string
+* @return bool
+*/
+function is_url($string) {
+ $domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component
+ return preg_match("~^https?://($domain?\\.)+$domain(:[0-9]+)?(/.*)?(\\?.*)?(#.*)?\$~i", $string); //! restrict path, query and fragment characters
+}
+
/** Print header for hidden fieldset (close by </div></fieldset>)
* @param string
* @param string
if (!$link && is_email($val)) {
$link = "mailto:$val";
}
+ if (!$link && is_url($val)) {
+ $link = "http://www.adminer.org/redirect/?url=" . urlencode($val); // intermediate page to hide Referer
+ }
$val = $adminer->selectVal($val, $link, $field);
echo "<td>$val";
}
Adminer 2.1.1-dev:
Display table links above table structure
+Link URLs in select
+Display number of manipulated rows in JS confirm
Fix removed default in ALTER
Display whitespace in texts (bug #2858042)
-Display number of manipulated rows in JS confirm
ClickJacking protection in modern browsers
E-mail attachments (Editor)
Optional year in date (Editor)