"; stderr( _("Delete poll"), sprintf( _("Do you really want to delete a poll? Click %s here %s if you are sure."), $link, '') ); } do_mysql_query("DELETE FROM pollanswers WHERE pollid = $pollid") or sqlerr(); do_mysql_query("DELETE FROM polls WHERE id = $pollid") or sqlerr(); if ($returnto == "main") header("Location: ".$GLOBALS['DEFAULTBASEURL']); else header("Location: polls.php?deleted=1"); die; } $rows = do_mysql_query("SELECT COUNT(*) FROM polls") or sqlerr(); $row = mysql_fetch_row($rows); $pollcount = $row[0]; if ($pollcount == 0) stderr( _("Sorry..."), _("There are no polls!") ); $polls = do_mysql_query("SELECT *,UNIX_TIMESTAMP(added) as utadded FROM polls ORDER BY id DESC LIMIT 1," . ($pollcount - 1 )) or sqlerr(); stdhead( _("Previous polls")); print("
\n");
print(" "); $added = $poll['added']. " GMT (".get_elapsed_time($poll['utadded'])." ago)"; echo $added; if (get_user_class() >= UC_ADMINISTRATOR) { print(" - [Edit]\n"); print(" - [Delete]\n"); } print(""); print(" \n"); print("
|