示例#1
0
<br/>
        <span class="label">Calendared</span> <?php 
echo $legislation->calendared();
?>
<br/>
        <span class="label">Sponsored by</span> 
<?php 
if (!empty($legislation->sponsor)) {
    foreach ($legislation->sponsor as $sponsor) {
        echo $sponsor->sponsor_name() . '<br/>';
    }
}
?>
<br/>
        <span class="label">Vote</span> <?php 
echo $legislation->vote();
?>
<br/>
        <div class="clear"></div>
        <br/><br/>
        <p>I have <?php 
echo $legislation->days_remaining();
?>
 left to:</p>
        <div id="btn_support" data-val="1" class="button">Support</div>
        <div id="btn_oppose" data-val="-1" class="button">Oppose</div>
        <div class="clear"></div>
        <form id="response_form" method="post">
        <input type="hidden" name="id" id="id" value="<?php 
echo $id;
?>
示例#2
0
文件: issue.php 项目: rtoews/meocracy
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/global.php';
require_once DOC_ROOT . '/includes/classes/class.user.php';
require_once DOC_ROOT . '/includes/classes/class.city.php';
require_once DOC_ROOT . '/includes/classes/class.announcement_feedback.php';
require_once DOC_ROOT . '/includes/classes/class.legislation.php';
$type = get_param('t');
$id = get_param('id');
if ($type == ANNOUNCEMENT_TYPE) {
    $issue = new Announcement($id);
} elseif ($type == LEGISLATION_TYPE) {
    $issue = new Legislation($id);
}
$data = array('title' => $issue->title(), 'summary' => $issue->summary(), 'question' => $issue->question(), 'current_chamber' => $issue->current_chamber(), 'location' => $issue->location(), 'description' => $issue->description(), 'image' => $issue->get_image_src(), 'status' => $issue->status(), 'calendared' => $issue->calendared(), 'vote' => $issue->vote(), 'days_remaining' => $issue->days_remaining());
return_jsonp_data($data);