get_manager_additions_all_value($id, true); $params = array('start'=>'start'); while( list($var, $param) = @each($params) ) { if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) ) { $$var = ( !empty($HTTP_POST_VARS[$param]) ) ? intval($HTTP_POST_VARS[$param]) : intval($HTTP_GET_VARS[$param]); } else { $$var = ''; } } include($GLOBAL_INC_OUT_PATH.'/header.inc'); if (isset($_GET['mode'])) { $story_id = (int)$_GET['mode']; $story_full = $st_obj->find_story($error_msg,$story_id); $template->set_filenames(array( 'body' => 'tak-eto-bivaet-prosmotr.tpl' ) ); $template->assign_vars(array( 'MANAGER_ID' => $id, 'ID'=>$story_full['pst_id'], 'TITLE'=>$story_full['pst_title'], 'AUTHOR'=>$story_full['pst_author'], 'TEXT'=>$st_obj->message_to_view(str_replace($ma_data[0],$ma_data[1],$story_full['pst_text']),0,$story_full['bbcode_uid']) ) ); }else { // Если нажали отмена - вернемся назад // if($start<0) $start=0; $error_msg = ''; $message=false;$message_text='';$message_title=''; $st_list=$st_obj->get_select_stories($start,$STORIES_COUNT_IN_LIST,$id); $st_count=$st_obj->get_select_stories_count($id); if($st_count>0) {$pagination = generate_pagination('tak-eto-bivaet.php?'.$order, $st_count, $STORIES_COUNT_IN_LIST, $start);} else {$pagination='';} //Если есть сообщение, выводим его if($message) message($message_text,$message_title); $template->set_filenames(array( 'body' => 'tak-eto-bivaet-spisok.tpl' ) ); $template->assign_vars(array( 'PAGINATION' => $pagination, )); $ma_data=$mobj->get_manager_additions_all_value($id,true); for($i=0;$iassign_block_vars('story', array( 'ID'=>$st_list[$i]['pst_id'], 'TITLE'=>$st_list[$i]['pst_title'], 'TEASER'=>$st_list[$i]['pst_teaser'], 'AUTHOR'=>$st_list[$i]['pst_author'], 'TEXT'=>$st_obj->message_to_view(str_replace($ma_data[0],$ma_data[1],$st_list[$i]['pst_teaser']),0,$st_list[$i]['bbcode_uid']) )); } } $template->pparse('body'); include($GLOBAL_INC_OUT_PATH.'/footer.inc'); ?>