draw_votes_chart($id, $table, $entity_id, $chart_question, $feedback_support, $feedback_oppose, $feedback_total, $feedback_average); ?> </div> </div> </div> <?php } } if (!empty($legislation_ids)) { $feedback_average = Legislation::get_average_legislation_feedback(); foreach ($legislation_ids as $id) { $legislation = new Legislation($id); $legislation_id = $id; $shorttitle = my_truncate($legislation->title(), 10, "..."); $shortdescription = my_truncate($legislation->recommended_action(), 20, "..."); $chart_question = $legislation->question(); $feedback_support = $legislation->get_support(); $feedback_oppose = $legislation->get_oppose(); $feedback_total = $feedback_support + $feedback_oppose; ?> <div class='row_clickable' onclick="document.location.href='legislation_edit?id=<?php echo $id; ?> '"> <div class='row_icon'></div> <h3><?php echo $shorttitle; ?> </h3> <p><?php
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/global.php'; require_once DOC_ROOT . '/includes/classes/class.html.php'; require_once DOC_ROOT . '/includes/classes/class.legislation.php'; $region_id = 65517; $region_type = REGION_CITY; $id = get_param('id'); $legislation = new Legislation($id); if (!empty($_POST)) { $legislation->region_id($region_id); $legislation->region_type($region_type); $legislation->title(get_param('title')); $legislation->status(get_param('status')); $legislation->recommended_action(get_param('recommended_action')); $legislation->summary(get_param('summary')); $legislation->discussion(get_param('discussion')); $legislation->question(get_param('question')); $date_introduced = set_date_parts(get_param('intro_month'), get_param('intro_day'), get_param('intro_year')); $date_heard = set_date_parts(get_param('heard_month'), get_param('heard_day'), get_param('heard_year')); $legislation->date_introduced($date_introduced); $legislation->date_heard($date_heard); if ($id) { $legislation->update(); } else { $id = $legislation->insert(); } // sponsor IDs next $sponsor_ids = get_param('sponsor_ids'); if (!empty($sponsor_ids)) { $legislation->associate_sponsors($sponsor_ids);