Location: PHPKode > projects > ZompLog > plugins/poll/admin.inc.php
<?php
class wmadmin {
function htmlparse($string){
return htmlentities(trim($string), ENT_QUOTES);
}

function bericht($string, $html=1) {
if($html == 0) {
$string = htmlparse($string);
}
echo $string."\n";
}

function error($error=1, $actie) {
if($error == 1) {
echo "Form is empty, <a href=\"admin.php?a=".$actie."\">go back.</a>\n";
}
}

function polllist() {
GLOBAL $prefix;
echo "<table width=\"50%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n";
$sql = @mysql_query("SELECT id, vraag FROM $prefix"."_poll ORDER BY id DESC");
while($list = @mysql_fetch_assoc($sql)) {
echo "<tr><td>".$this->htmlparse($list['vraag'])."</td><td width=\"50\"\><a href=\"admin.php?a=bewerk&id=".$list['id']."\">edit</a></td><td width=\"50\"\><a href=\"admin.php?a=verwijder&id=".$list['id']."\">delete</a></td></tr>\n";
}
echo "</table>\n";
}

function openform($action) {
echo "<form action=\"admin.php?a=".$action."\" method=\"POST\">\n<table width=\"50%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n";
}

function formtext($bericht, $naam, $value="", $lengte=50) {
echo "<tr><td><b>".$this->htmlparse($bericht)."</b></td><td><input type=\"text\" name=\"".$naam."\" value=\"".$this->htmlparse($value)."\" maxlength=\"".$lengte."\"></td></tr>\n";
}

function formcheckbox($bericht, $naam, $checked=1) {
echo "<tr><td><b>".$this->htmlparse($bericht)."</b></td><td><input type=\"checkbox\" name=\"".$naam."\" value=\"1\"";
if($checked == 1) {
echo " checked";
}
echo "></td></tr>\n";
}

function sluitform($submit) {
echo "<tr><td></td><td><input type=\"submit\" name=\"submit\" value=\"".$submit."\"></td></tr>\n</table>\n</form>\n";
}

function formdata($value){
$quotes = get_magic_quotes_gpc();

$value = trim($value);
if($quotes == FALSE){
$value = addslashes($value);
}

return $value;
}
}
?>
Return current item: ZompLog