<?php
} elseif($_GET['actie'] == "archive") {
?>
<table cellpadding="0" cellspacing="0" align="left" class="text4">
<tr>
<td class="admino" colspan="3"></td>
</tr><tr align="left">
<td><font class="orange">Archive poll</font></td>
<td class="cspacer"></td>
</tr><tr>
<td class="line3"></td>
</tr>
<?php
if($_GET['actie'] == "archive/remove" && $_GET['id']) {
$delete01 = "DELETE FROM poll_vragen WHERE id= '".$_GET['id']."'";
$delete02 = "DELETE FROM poll_antwoorden WHERE pid= '".$_GET['id']."'";
$delete03 = "DELETE FROM poll_ipadres WHERE pollid= '".$_GET['id']."'";
if($res && $res2 && $res3) {
?>
<tr>
<td>Everything has been succesfully removed.</td>
<td> </td>
<td class="cspacer"></td>
</tr><tr>
<td><a href="?actie=archive" class="1">Back</a></td>
<td> </td>
<td class="cspacer"></td>
</tr>
<?php
} else {
?>
<tr>
<td>Not everything has been removed.</td>
<td> </td>
<td class="cspacer"></td>
</tr><tr>
<td><a href="?actie=archive" class="1">Back</a></td>
<td> </td>
<td class="cspacer"></td>
</tr>
<?php
}
} elseif($_GET['actie'] == "archive/results" && $_GET['id']) {
$select = "SELECT * FROM poll_vragen WHERE id= '".$_GET['id']."'";
$select02 = "SELECT * FROM poll_antwoorden WHERE pid= '".$_GET['id']."' ORDER BY id";
echo $list02->antwoord." (".$list02->votes.")<br />\n";
if($list02->votes == "0") {
$width = "0";
} else {
$a = 100 / $votes;
$width = $list02->votes * $a;
}
echo "<img src=\"gfx/poll_1.gif\" /><img src=\"gfx/poll_2.gif\" width=\"". $width."\" height=\"11\"><img src=\"gfx/poll_3.gif\" /><br />\n"; }
} else {
$select = "SELECT * FROM poll_vragen";
?>
</tr><tr>
<td>There are no polls yet.</td>
<td> </td>
<td class="cspacer"></td>
</tr><tr>
<td><a href="polladmin.php" class="1">Back</a></td>
<td> </td>
<td class="cspacer"></td>
</tr>
<?php
} else {
?>
<tr>
<td><font class="red"> »</font>
<?php echo $list->vraag; ?></td>
<td>| <a href="?actie=archief/results&id=
<?php echo $list->id; ?>" class="1">Results</a> | <a href="?actie=archive/remove&id=
<?php echo $list->id; ?>" class="1">Remove</a></td>
<td class="cspacer"></td>
</tr>
<?php
}
?>
</tr><tr>
<td><br>There are <font class="red">
<?php echo mysql_num_rows($query); ?></font> poll(s) in the database</font></td>
<td> </td>
<td class="cspacer"></td>
</tr>
<?php
}
}
} else {