\\2", $ret); $ret = preg_replace("#\[url=(http://)?(.*?)\](.*?)\[/url\]#si", "\\3", $ret); if(stristr($text, 'https://') == true){ $ret = preg_replace("#\[url\](https://)?(.*?)\[/url\]#si", "\\2", $text); $ret = preg_replace("#\[url=(https://)?(.*?)\](.*?)\[/url\]#si", "\\3", $text); } // matches an "xxxx://yyyy" URL at the start of a line, or after a space. // xxxx can only be alpha characters. // yyyy is anything up to the first space, newline, comma, double quote or < $ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1\\2", $ret); // matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing // Must contain at least 2 dots. xxxx contains either alphanum, or "-" // zzzz is optional.. will contain everything up to the first space, newline, // comma, double quote or <. // $ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1\\2", $ret); // matches an email@domain type address at the start of a line, or after a space. // Note: Only the followed chars are valid; alphanums, "-", "_" and or ".". $ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1\\2@\\3", $ret); // Remove our padding.. $ret = substr($ret, 1); return($ret); } include("php/common.php"); include("php/functions.php"); include("php/constants.php"); // form posted if ($_SERVER['REQUEST_METHOD'] == 'POST') { // controleren of de sessie nog niet is verlopen if(!isset($_SESSION['user'])){ die("niet ingelogd"); } // get user id $sql="SELECT * FROM `global_user` WHERE `username`='".$_SESSION["user"]."'"; $result=$DbLink->query($sql); $oldRow = mysql_fetch_array($result); $user_id=$oldRow[id]; $weblog_id = empty($_POST['weblog_id']) ? null :$_POST['weblog_id']; $response_text = empty($_POST['response_text']) ? null : trim(htmlspecialchars($_POST['response_text'])); $change_date = date('YmdHis'); // insert in database if (!empty($response_text)) { updateWebLogResponse(0, $weblog_id, $user_id, $response_text, $change_date); header('location: weblog_viewoud.php?id='.$weblog_id); exit; } } $weblog_id = empty($_GET['id']) ? null : (int) $_GET['id']; // get a weblog $weblogs = getWebLog(0, $weblog_id); if (empty($weblogs)) { header('location: weblog_overviewoud.php'); exit; } ?> Trefpunt Noorwegen - Weblogs
query($sql); $oldRow = mysql_fetch_array($result); $user_name = $oldRow['username']; echo" "; $thename=''.$user_name.''; // hyperlinks in string $weblog_text = wordwrap($weblog_text, 70, "\n", 1); $weblog_text = hyperlink($weblog_text); // image 1 if (empty($weblog_image)) { $image_string = null; } else { list($width, $height, $type, $attr) = getimagesize(COPY_FILE_PATH.$weblog_image); if ($width > 476) { $image_width = 476; } else { $image_width = $width; } $image_string = ''; } // image 2 if (empty($weblog_image2)) { $image_string2 = null; } else { list($width, $height, $type, $attr) = getimagesize(COPY_FILE_PATH.$weblog_image2); if ($width > 476) { $image_width = 476; } else { $image_width = $width; } $image_string2 = '
'; } // image 3 if (empty($weblog_image3)) { $image_string3 = null; } else { list($width, $height, $type, $attr) = getimagesize(COPY_FILE_PATH.$weblog_image3); if ($width > 476) { $image_width = 476; } else { $image_width = $width; } $image_string3 = '
'; } if($change_date < 20070312160000){ echo " "; } elseif($change_date > 20070312160000){ $zoekwoorden = array('[foto]', '[foto2]', '[foto3]'); $vervangwoorden = array($image_string, $image_string2, $image_string3); $weblog_text = str_replace($zoekwoorden, $vervangwoorden, $weblog_text); echo " "; } echo "

Onderwerp weblog: $weblog_title

naam: $thename

datum: $date_converted

".$image_string.$image_string2.$image_string3."

".nl2br($weblog_text)."

naam: $thename

datum: $date_converted

".nl2br($weblog_text)."




"; } echo" "; $weblog_responses = getWebLogResponse($weblog_id); // no results if (empty($weblog_responses)) { echo " "; } // responses found else { while(list($key_2, $weblog_response) = each($weblog_responses)) { $response_id = $weblog_response[0]; $weblog_id = $weblog_response[1]; $user_id = $weblog_response[2]; $response_text = $weblog_response[3]; $change_date = $weblog_response[4]; $date_converted = convertDate($change_date); // get user name $sql = 'SELECT username FROM global_user WHERE id = '.$user_id; $result = $DbLink->query($sql); $oldRow = mysql_fetch_array($result); $user_name = $oldRow['username']; $thename=''.$user_name.''; // hyperlinks in string $response_text = wordwrap($response_text, 70, "\n", 1); $response_text = hyperlink($response_text); echo " "; } } echo "

Reacties op dit onderwerp

Geen reacties gevonden...

naam: $thename

datum: $date_converted

".nl2br($response_text)."




\n"; MYSQL_CLOSE(); ?>

Dit was de laatste reactie.