Exemplo n.º 1
0
<?php

global $spAdmin;
$pollDB = new SimplyPollDB();
$id = (int) $_GET['id'];
$poll = $spAdmin->grabPoll($id);
if (isset($_POST['reset']) && $_POST['reset'] == 'yes') {
    $pollDB->resetPoll($poll);
    $message = 'Poll reset';
} elseif (isset($_POST['reset']) && $_POST['reset'] == 'no') {
    $message = 'All poll votes are still intact';
}
?>
<div class="wrap">
	<div id="icon-edit-comments" class="icon32"><br /></div> 
	<h2>
		<?php 
_e('Reset Poll');
?>
	</h2>
	
	<?php 
if (isset($message)) {
    ?>
		
		<script>
			setTimeout( "pageRedirect()", 3000 );
			
			function pageRedirect() {
				window.location.replace('<?php 
    admin_url();
Exemplo n.º 2
0
<?php

global $spAdmin;
$pollDB = new SimplyPollDB();
$id = (int) $_GET['id'];
$poll = $spAdmin->grabPoll($id);
if (isset($_POST['delete']) && $_POST['delete'] == 'yes') {
    $pollDB->deletePoll($_POST['id']);
    $message = __('Poll deleted');
} elseif (isset($_POST['delete']) && $_POST['delete'] == 'no') {
    $message = __('Poll not deleted');
}
?>
<div class="wrap">
	<div id="icon-edit-comments" class="icon32"><br /></div> 
	<h2>
		<?php 
_e('Delete Poll');
?>
	</h2>
	
	<?php 
if (isset($message)) {
    ?>
		
		<script>
			setTimeout( "pageRedirect()", 3000 );
			
			function pageRedirect() {
				window.location.replace('<?php 
    admin_url();