hallo iedereen, ik wil graag een url in mijn mailform. hij ziet er nu zo uit:
<?php
$psuroot = str_replace("\\","/",dirname(__FILE__));
$scriptpath = $psuroot;
$psuroot = substr($psuroot,0,strrpos($psuroot, "/"));
$phpext = strrchr (__FILE__, ".");
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: Forum <[email protected]>\r\n";
$psuurl = substr($PHP_SELF,0,strrpos($PHP_SELF, "/"));
include($psuroot."/lib/ini.class".$phpext);
include($psuroot."/lib/template.class".$phpext);
include($psuroot."/lib/textdb.class".$phpext);
include($psuroot."/lib/lib".$phpext);
if (!PostCheck(array("PSU_NAME","PSU_EMAIL","PSU_TOPIC","PSU_TEXT"))) exit;
$ini = new Ini($scriptpath."/cfg".$phpext);
$PSU_NAME = myTrim($PSU_NAME);
$PSU_EMAIL = myTrim($PSU_EMAIL);
$PSU_TOPIC = myTrim($PSU_TOPIC);
$PSU_TEXT = myTrim($PSU_TEXT);
$errormsg = CheckFilter($scriptpath."/cfg".$phpext, $scriptpath."/..", "edit");
if (($ini->Get("badwordfilter") == 1) && BadwordFilter($scriptpath."/../",array($PSU_NAME,$PSU_EMAIL,$PSU_TOPIC,$PSU_TEXT))) {
$errormsg = CommonError($scriptpath."/..", "badword_error", array());
}
if (($ini->Get("urlfilter") == 1) && UrlFilter(array($PSU_NAME,$PSU_EMAIL,$PSU_TOPIC,$PSU_TEXT))) {
$errormsg = CommonError($scriptpath."/..", "url_error", array());
}
if ($ini->get("htmlfilter") == 1) {
$PSU_NAME = strip_tags($PSU_NAME);
$PSU_EMAIL = strip_tags($PSU_EMAIL);
$PSU_TOPIC = strip_tags($PSU_TOPIC);
$PSU_TEXT = strip_tags($PSU_TEXT);
}
if ((!$errormsg) && (($min = $ini->Get("spam")) > 0)) {
$table = new TextDB($scriptpath."/data/ip");
if ($table->DoOpen()) {
if ($table->DoSelect("WHERE timestamp < '".(time()-60*$min)."'")) {
do {
$ip = $table->QueryGet("ip");
$table->DoDelete("ip",$ip);
} while ($table->QueryNext());
}
if ($table->DoSelect("WHERE ip = '$REMOTE_ADDR'")) {
$errormsg = CommonError($scriptpath."/..", "spam_block", array($min));
} else {
$table->DoAppend(array($REMOTE_ADDR,time()));
}
}
}
if ($errormsg) {
$tpl = new Template($scriptpath."/error.tpl");
$tpl->Replace(":errortext",$errormsg);
$tpl->Output();
} else {
$board = split(";",$ini->Get("board$PSU_ID"));
$key = md5($board[0]);
$table = new TextDB($scriptpath."/data/$key");
if ($table->DoOpen()) {
$time = time();
$id = md5($PSU_TOPIC.$time);
$text = SaveContentToFile($PSU_TEXT,"s-".$id,$scriptpath."/data/");
$table->DoAppend(array($id,$id,$PSU_TOPIC,$PSU_NAME,$time,$PSU_EMAIL,$text,$REMOTE_ADDR));
if ($ini->Get("adminconfirm")) {
$aan = "[email protected]";
$subject = $ini->Get("adminsubject");
$text = "<code>Geachte klant,<br>
<br>
<strong>$PSU_NAME</strong> heeft een nieuw bericht geplaatst.<br>
U kunt het bericht vinden in: <strong> $board[0] </strong> -> <strong> $PSU_TOPIC </strong><br>
<br>
link<br>
<br>
Met vriendelijke groet,<br>
<br>
Albert Dijkstra</code>";
@mail($aan,$subject,$text,$headers);
}
}
header("Location: topics$phpext?_ID=$PSU_ID");
}
nu wil ik graag ipv de tekst "link" een hyperlink plaatsen.
iemand enig idee?
4.346 views