PHP Code:
//Display edit
$sql = mysql_query("SELECT * FROM user_webpage WHERE userid = ".GBUSERID."");
while($row = mysql_fetch_assoc($sql)) {
or
PHP Code:
//Continue displaying what was found
while($row = mysql_fetch_assoc($sql)) {
or
PHP Code:
$webpage['name'] = stripslashes($row['name']);
if($row['lastupdate'] =="") {
$webpage['lastupdate'] = $vbphrase['wg_never'];
} else {
$webpage['lastupdate'] = date("".$vboptions['dateformat']." ".$vboptions['timeformat']."", $row['lastupdate']);
}
$webpage['description'] = stripslashes($row['description']);
$webpage['text'] = stripslashes($row['text']);
or
PHP Code:
//Check text-formatting settings
$settingvbcode = iif($row['vbcodeorhtml'] == 'vbcode' AND $vboptions['webpageallowvbcode'] == '1', '1', '0');
$settinghtml = iif($row['vbcodeorhtml'] == 'html' AND $vboptions['webpageallowhtml'] == '1', '1', '0');
if($settinghtml == 0 AND $settingvbcode == 0) {
$settingvbcode = 1;
}
if($vboptions['webpagesmilies'] == 1 and $row['usesmilies'] == 1) {
$settingsmilies = 1; } else { $settingsmilies = 0; }
if($settingvbcode == 1) {
$webpage['text'] = parse_bbcode2($webpage['text'], $settinghtml, 1, $settingsmilies, $settingvbcode);
}
if($settinghtml == 1) {
//Remove scripts!!!
$webpage['text'] = preg_replace("/(\<script)(.*?)(script>)/si", "", $webpage['text']);
//Don't hide anything!
$webpage['text'] = str_replace("<!--", "<!--", $webpage['text']);
//Allow specified tags (if empty in admin, ALL tags are allowed! SECURITY RISK!)
if($settinghtml == 1 && !empty($vboptions['allowedhtmltags'])) {
$webpage['text'] = strip_tags($webpage['text'], $vboptions['allowedhtmltags']);
}
}
//Javascript will not be allowed
$webpage['text'] = ereg_replace("~<script[^>]*>.+</script[^>]*>~isU", "", $webpage['text']);
$webpage['hits'] = $row['hits'];
$webpage['bgcolor'] = $row['bgcolor'];
$webpage['bordersize'] = $row['bordersize'];
$webpage['bordercolor'] = $row['bordercolor'];
$webpage['fontface'] = $row['fontface'];
$webpage['fontsize'] = $row['fontsize'];
$webpage['fontcolor'] = $row['fontcolor'];