$f_news_id = gpc_get_int('news_id'); $f_project_id = gpc_get_int('project_id'); $f_view_state = gpc_get_int('view_state'); $f_headline = gpc_get_string('headline'); $f_announcement = gpc_get_string('announcement', ''); $f_body = gpc_get_string('body', ''); $row = news_get_row($f_news_id); # Check both the old project and the new project access_ensure_project_level(config_get('manage_news_threshold'), $row['project_id']); access_ensure_project_level(config_get('manage_news_threshold'), $f_project_id); news_update($f_news_id, $f_project_id, $f_view_state, $f_announcement, $f_headline, $f_body); form_security_purge('news_update'); html_page_top(); ?> <br /> <div align="center"> <?php echo lang_get('operation_successful'); ?> <br /> <?php print_bracket_link("news_edit_page.php?news_id={$f_news_id}&action=edit", lang_get('edit_link')); print_bracket_link('news_menu_page.php', lang_get('proceed')); echo '<br /><br />'; print_news_entry($f_headline, $f_body, $row['poster_id'], $f_view_state, $f_announcement, $row['date_posted']); ?> </div> <?php html_page_bottom();
function print_news_entry_from_row($p_news_row) { $t_headline = $p_news_row['headline']; $t_body = $p_news_row['body']; $t_poster_id = $p_news_row['poster_id']; $t_view_state = $p_news_row['view_state']; $t_announcement = $p_news_row['announcement']; $t_date_posted = $p_news_row['date_posted']; print_news_entry($t_headline, $t_body, $t_poster_id, $t_view_state, $t_announcement, $t_date_posted); }
function print_news_entry_from_row($p_news_row) { extract($p_news_row, EXTR_PREFIX_ALL, 'v'); print_news_entry($v_headline, $v_body, $v_poster_id, $v_view_state, $v_announcement, $v_date_posted); }