Пример #1
0
        ?>
</td>
		<td align="center" width="150" height="50"><img src="<?php 
        if ($site->banner_url != "") {
            echo $site->banner_url;
        } else {
            echo "index.php?module=voteforpoints&action=image&sid=" . $site->site_id;
        }
        ?>
" width="150" height="50"/></td>
		<td align="right"><?php 
        echo $site->points;
        ?>
 pt(s)</td>
		<td align="center"><?php 
        echo strBlockTime($site->blocking_time);
        ?>
</td>
		<td align="center" style="width:100px;">
			<?php 
        $date_block = $vs_list[$site->site_id]['dateblock'];
        if ($date_block <= 0) {
            ?>

				<a href="index.php?module=voteforpoints&action=vote&sid=<?php 
            echo $site->site_id;
            ?>
" target="_blank">Vote Agora</a>
			<?php 
        } else {
            ?>
Пример #2
0
    $delete = $params->get('Delete');
    if (!empty($delete)) {
        //Delete site
        $sql = "DELETE FROM {$server->loginDatabase}.{$vp} WHERE site_id=?";
        $sth = $server->connection->getStatement($sql);
        $sth->execute(array($site_id));
        //We need to delete database that connected to the site
        $sql = "DELETE FROM {$server->loginDatabase}.{$vp_logs} WHERE f_site_id=?";
        $sth = $server->connection->getStatement($sql);
        $sth->execute(array($site_id));
        $this->redirect("index.php?module=voteforpoints&action=list");
    }
    $sql = "SELECT site_name,address,points,blocking_time,banner,banner_url FROM {$server->loginDatabase}.{$vp} WHERE site_id=?";
    $sth = $server->connection->getStatement($sql);
    $sth->execute(array($params->get('sid')));
    $vp = $sth->fetch();
    if (empty($vp)) {
        $error[count($error)] = Flux::message("Invalid Site Id.");
    } else {
        $b_time = strBlockTime($vp->blocking_time);
        $blocking_time = explode(":", $b_time);
        if ($blocking_time[0] == "00") {
            $hours = 24;
        } else {
            $hours = $blocking_time[0];
        }
        $minutes = $blocking_time[1];
    }
} else {
    $error[count($error)] = Flux::message("INVALID_VOTING_SITE");
}