<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/> <span class="label">Sponsored by</span> <?php if (!empty($announcement->sponsor)) { foreach ($announcement->sponsor as $sponsor) { echo $sponsor->sponsor_name() . '<br/>'; } } ?> <br/> <span class="label">Vote</span> <?php echo $announcement->vote(); ?> <br/>
$announcement = new Announcement($id); if (!empty($_POST)) { $announcement->region_id($region_id); $announcement->region_type($region_type); $announcement->title(get_param('title')); $announcement->description(get_param('description')); $announcement->text(get_param('text')); $announcement->question(get_param('question')); $announcement->location(get_param('location')); $date_beginning = set_date_parts(get_param('begin_month'), get_param('begin_day'), get_param('begin_year')); $date_ending = set_date_parts(get_param('end_month'), get_param('end_day'), get_param('end_year')); $calendared = set_date_parts(get_param('calendared_month'), get_param('calendared_day'), get_param('calendared_year')); $vote = set_date_parts(get_param('vote_month'), get_param('vote_day'), get_param('vote_year')); $announcement->date_beginning($date_beginning); $announcement->date_ending($date_ending); $announcement->calendared($calendared); $announcement->vote($vote); if ($id) { $announcement->update(); } else { $id = $announcement->insert(); } // sponsor IDs next $sponsor_ids = get_param('sponsor_ids'); if (!empty($sponsor_ids)) { $announcement->associate_sponsors($sponsor_ids); } // finally, tags $tag_list = get_param('tag_list'); $tags = explode('|', $tag_list); if (!empty($tags)) {
<?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);