set; class forum_index { var $cur_fi_id; function check_img($key, $dft = '', $force = false) { global $phpbbuser, $config; $def_ret = '' . $key; $ret = $phpbbuser->img($key); if($ret == $def_ret) { $dft_img = $phpbbuser->img($dft); if(!empty($dft) && ($dft_img != '' . $dft || $force)) { return $dft_img; } } return $ret; } // check the forum_index_id with forum_id function check_forum_index($forum_id) { // get forum indexes $forum_indexes = $this->get_forum_indexes($forum_id); // take the nearest forum index $new_forum_index_id = $forum_indexes[0]; return $new_forum_index_id; } function get_forum_indexes($forum_id) { global $forums; // some vars $index = false; $forum_main = $forum_id; // found all indexes for this forum_id while( !$index ) { if($forums->data[$forum_main]['forum_index']) { $forum_indexes[] = $forum_main; } $forum_main = $forums->data[$forum_main]['forum_main']; if($forum_main == 0) { $index = true; $forum_indexes[] = $forum_main; } } return $forum_indexes; } function determine_forum_id($forum_id) { global $HTTP_GET_VARS, $HTTP_POST_VARS, $forums, $forum_id; // get : user forum index $forum_index_id = _read(POST_FORUM_INDEX_URL, TYPE_INT); // if the user is in a forum, check and compare forum and forum index if($forum_id > 0) { $forum_index_id = $this->check_forum_index($forum_id); } elseif(!isset($HTTP_GET_VARS[POST_FORUM_URL]) && !isset($HTTP_POST_VARS[POST_FORUM_URL])) { $forum_id = $forum_index_id; } elseif($forum_id == 0) { $forum_index_id = 0; } // get forum index infos $this->cur_fi_id = $forums->data[$forum_index_id]['forum_id']; return $forum_id; } function pgcd($a, $b) { while ($b > 0) { $res = $a % $b; $a = $b; $b = $res; } return $a; } function ppcm($a, $b) { $res = ($a * $b)/$this->pgcd($a, $b); return $res; } function make_forum_index_list() { global $template, $phpEx, $forums, $config, $phpbbuser; $max_indexes_on_a_line = 3; $percent_linkbox_size = 70; $template->set_filenames(array( 'forums_index' => 'change_forum.tpl') ); foreach($forums->data as $fid => $data) { if($data['forum_index']) { $all_indexes[] = $fid; } } $total_indexes = count($all_indexes); $ppcm = $this->ppcm($total_indexes % $max_indexes_on_a_line, $max_indexes_on_a_line); $template->assign_vars(array( 'LINKBOX_WIDTH' => $percent_linkbox_size, 'DESC_WIDTH' => 99 - $percent_linkbox_size, ) ); // line counter $l = 0; $equilibre = false; $nb_lines = intval($total_indexes / $max_indexes_on_a_line)+1; for($i = 0; $i < $total_indexes; $i++) { if( $total_indexes % $max_indexes_on_a_line && !$equilibre) { $nb_lines_rest = $nb_lines - $l; $nb_items_rest = $total_indexes - $l * $max_indexes_on_a_line; if(!($nb_items_rest % $nb_lines_rest)) { $max_indexes_on_a_line = $nb_items_rest/$nb_lines_rest; } $equilibre = true; } if(!($i % $max_indexes_on_a_line) || !$i) { $template->set_switch('line', true); $l ++; if($total_indexes - $max_indexes_on_a_line * $l >= 0) { $nb_items = $max_indexes_on_a_line; } else { $nb_items = $total_indexes % $max_indexes_on_a_line; } } $img = $this->check_img($forums->data[$all_indexes[$i]]['forum_nav_icon']); $template->assign_block_vars('line.cell', array( 'U_FORUM_INDEX_LINK' => $config->url('index', array(POST_FORUM_INDEX_URL => $forums->data[$all_indexes[$i]]['forum_id']), true), 'FORUM_INDEX_NAME' => $phpbbuser->lang($forums->data[$all_indexes[$i]]['forum_name']), 'FORUM_INDEX_DESC' => addslashes($phpbbuser->lang($forums->data[$all_indexes[$i]]['forum_desc'])), 'COLSPAN' => $ppcm/$nb_items, 'LINK_WIDTH' => $percent_linkbox_size/$nb_items, 'FORUM_INDEX_IMAGE' => $img, ) ); $template->set_switch('line.cell.b_beg', ($forums->data[$this->cur_fi_id]['forum_id'] == $forums->data[$all_indexes[$i]]['forum_id']) ? true : false); $template->set_switch('line.cell.b_end', ($forums->data[$this->cur_fi_id]['forum_id'] == $forums->data[$all_indexes[$i]]['forum_id']) ? true : false); $template->set_switch('line.cell.image', $img != ''); } $template->assign_var_from_handle('CHANGE_FORUM', 'forums_index'); } } ?>
( ! ) Fatal error: Class 'forum_index' not found in /var/www/clients/client1/web1/web/modules/Forums/common.php on line 419
Call Stack
#TimeMemoryFunctionLocation
10.0001235448{main}( ).../modules.php:0
20.0022478664include( '/var/www/clients/client1/web1/web/index.php' ).../modules.php:4
30.25693470736include( '/var/www/clients/client1/web1/web/modules/Palindromes/index.php' ).../index.php:178
40.25723517608include( '/var/www/clients/client1/web1/web/header.php' ).../index.php:11
50.25723534568head( ).../header.php:112
60.25723536616online( ).../header.php:39
70.25723536920my_online( ).../mainfile.php:720
80.25763611512include( '/var/www/clients/client1/web1/web/modules/Forums/common.php' ).../custom_mainfile.php:1120