}
if (!$demo_mode && (int) $_GET['delete_id'] != 0 && $_GET['action'] == "delete") {
    if (MemberDeletePoll()) {
        $action_result .= "Poll was deleted";
    } else {
        $action_result .= "Poll deleting failed";
    }
}
$_page['header'] = "Polls administration";
$_page['header_text'] = "";
TopCodeAdmin();
ContentBlockHead("Polls administration");
if (strlen($action_result)) {
    echo "<br><center><div class=\"err\">{$action_result}</div></center><br>\n";
}
MemberPrintPolls();
$m_per_row = 1;
if ((int) $_GET['edit_id'] != 0) {
    $poll_arr = db_arr("SELECT * FROM `polls_q` WHERE `ID` = " . (int) $_GET['edit_id']);
    $res_answers = db_res("SELECT `IDanswer`, `ID`, `Answer`, `Votes` FROM `polls_a` WHERE `ID` = " . (int) $_GET['edit_id'] . " ORDER BY `IDanswer` ASC");
}
ContentBlockFoot();
ContentBlockHead("Polls");
?>

<form method=post action="polls.php">

<table border=0 cellspacing=1 cellpadding=0 width=100% class="text">
	<tr>
		<td colspan=<?php 
echo $m_per_row;
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
require_once 'inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
// --------------- page variables
$_page['name_index'] = 28;
$_page['css_name'] = 'polls.css';
$logged['member'] = member_auth(0, false);
$_page['header'] = _t("_Site Polls");
$_page['header_text'] = _t("_Site Polls");
// this is dynamic page -  send headers to do not cache this page
send_headers_page_changed();
// --------------- page components
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = MemberPrintPolls();
// --------------- [END] page components
PageCode();
// --------------- page components functions
/**
 * page code function
 */
function MemberPrintPolls()
{
    $query = "SELECT `ID`, `Question` FROM `polls_q` WHERE `Active` = 'on' ORDER BY `Question`";
    $res = db_res($query);
    if (!$res or !mysql_num_rows($res)) {
        return "<div align=center>" . _t("_No polls available") . "</div>";
    }
    $ret = '<div style="position:relative;">
				<div class="clear_both"></div>';