Exemplo n.º 1
0
    log_time('user_id');
    $feedback->announcement_id($id);
    log_time('announcement_id');
    $feedback->record_response();
    log_time('record_response');
    redirect('/announcement_feedback_response.php?id=' . $id);
}
$html = new HTML();
$html->set_title('Announcement');
$html->use_style('announcement.css');
$html->generate_header_mobile();
?>
<ul data-role='listview' data-inset='false' data-theme='a'  data-divider-theme='a'>
    <li>
        <img src="<?php 
echo $announcement->get_image_src();
?>
"/>
        <?php 
echo $announcement->description();
?>
    </li>
    <li>
        <span class="label">Status</span> <?php 
echo $announcement->status->status();
?>
<br/>
        <span class="label">Calendared</span> <?php 
echo $announcement->calendared();
?>
<br/>
Exemplo n.º 2
0
$legislation_ids = Legislation::get_ids_by_region($region_id, $region_type);
/*
$admin_id = get_param('admin_id');
if (!$admin_id) {
    redirect('/admin/login.php');
}
*/
$html = new HTML('admin');
$html->set_title('Dashboard');
$html->generate_header();
if (!empty($announcement_ids)) {
    $feedback_average = Announcement::get_average_announcement_feedback();
    foreach ($announcement_ids as $id) {
        $announcement = new Announcement($id);
        $announcement_id = $id;
        $src = $announcement->get_image_src();
        $shorttitle = my_truncate($announcement->title(), 10, "...");
        $shortdescription = my_truncate($announcement->description(), 20, "...");
        $chart_question = $announcement->question();
        $feedback_support = $announcement->get_support();
        $feedback_oppose = $announcement->get_oppose();
        $feedback_total = $feedback_support + $feedback_oppose;
        ?>
<div class="row_clickable row_thumb" onclick="document.location.href='announcement_edit?id=<?php 
        echo $id;
        ?>
'">
    <img src="<?php 
        echo $src;
        ?>
" class="thumbnail">
Exemplo n.º 3
0
<?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';
$id = get_param('id');
$announcement = new Announcement($id);
$data = array('id' => $id, 'type' => ANNOUNCEMENT_TYPE, 'title' => $announcement->title(), 'description' => $announcement->text(), 'text' => $announcement->text(), 'category' => array('id' => $announcement->category['id'], 'name' => $announcement->category['name']), 'question' => $announcement->question(), 'location' => $announcement->location(), 'image' => $announcement->get_image_src(), 'status' => $announcement->status->status(), 'calendared' => $announcement->calendared(), 'vote' => $announcement->vote(), 'support' => $announcement->get_support(), 'oppose' => $announcement->get_oppose(), 'days_remaining' => $announcement->days_remaining(), 'sponsors' => $announcement->sponsors, 'comment_data' => $announcement->comment_data, 'user_feedback' => $announcement->feedback_submitted($user_id));
return_jsonp_data($data);
<?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.announcement.php';
$type = get_param('type');
$id = get_param('id');
$announcement = new Announcement($id);
$data = array('title' => $announcement->title(), 'calendared' => $announcement->calendared(), 'vote' => $announcement->vote(), 'image' => $announcement->get_image_src(), 'question' => $announcement->question(), 'support' => $announcement->get_support(), 'oppose' => $announcement->get_oppose(), 'sponsors' => $announcement->sponsor);
return_jsonp_data($data);