/[LeafOK_CVS]/lbbs/utils/bin/gen_section_menu.php
ViewVC logotype

Diff of /lbbs/utils/bin/gen_section_menu.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 by sysadm, Mon May 19 11:55:15 2025 UTC Revision 1.8 by sysadm, Sun Jun 1 03:44:22 2025 UTC
# Line 139  MENU; Line 139  MENU;
139                          $title_f = str_repeat(" ", 5 - intval(log10($article_count))) . $article_count . " +  " .                          $title_f = str_repeat(" ", 5 - intval(log10($article_count))) . $article_count . " +  " .
140                                  $section['name'] . str_repeat(" ", 20 - strlen($section['name'])) .                                  $section['name'] . str_repeat(" ", 20 - strlen($section['name'])) .
141                                  $class_title_f . addslashes($section['title']) . str_repeat(" ", 22 - str_length($section['title'])) .                                  $class_title_f . addslashes($section['title']) . str_repeat(" ", 22 - str_length($section['title'])) .
142                                  $section['udf_values']['section_master'];                                  ($section['udf_values']['section_master'] == "" ? "诚征版主中" : $section['udf_values']['section_master']);
143    
144                          $buffer .= <<<MENU                          $buffer .= <<<MENU
145                          @LIST_SECTION   {$display_row}, 4, 1, {$section['read_user_level']},   "{$section['name']}",    "{$title_f}"                          @LIST_SECTION   {$display_row}, 4, 1, {$section['read_user_level']},   "{$section['name']}",    "{$title_f}"
# Line 177  MENU; Line 177  MENU;
177                          $title_f = str_repeat(" ", 5 - intval(log10($article_count))) . $article_count . " +  " .                          $title_f = str_repeat(" ", 5 - intval(log10($article_count))) . $article_count . " +  " .
178                                  $section['name'] . str_repeat(" ", 20 - strlen($section['name'])) .                                  $section['name'] . str_repeat(" ", 20 - strlen($section['name'])) .
179                                  $class_title_f . addslashes($section['title']) . str_repeat(" ", 22 - str_length($section['title'])) .                                  $class_title_f . addslashes($section['title']) . str_repeat(" ", 22 - str_length($section['title'])) .
180                                  $section['udf_values']['section_master'];                                  ($section['udf_values']['section_master'] == "" ? "诚征版主中" : $section['udf_values']['section_master']);
181    
182                          $buffer .= <<<MENU                          $buffer .= <<<MENU
183                          @LIST_SECTION   {$display_row}, 4, 1, {$section['read_user_level']},   "{$section['name']}",    "{$title_f}"                          @LIST_SECTION   {$display_row}, 4, 1, {$section['read_user_level']},   "{$section['name']}",    "{$title_f}"
184    
185                          MENU;                          MENU;
186    
187                            $display_row = 0;
188                    }
189            }
190    
191            $buffer .= <<<MENU
192    %
193    
194    MENU;
195    
196            // Generate menu of favourite sections
197            $buffer .= <<<MENU
198    #---------------------------------------------------------------------
199    %menu M_FAVOUR
200    title       0, 0, "[版块收藏]"
201    screen      2, 0, S_BOARD
202    use_filter
203    page        4, 1, 20
204    
205    MENU;
206    
207            $display_row = 4;
208    
209            foreach ($section_hierachy as $c_index => $section_class)
210            {
211                    $class_title_f = "[" . addslashes($section_class['title']) . "]" . str_repeat(" ", 10 - str_length($section_class['title']));
212    
213                    foreach ($section_class["sections"] as $s_index => $section)
214                    {
215                            $article_count = $section['udf_values']['article_count'];
216    
217                            $title_f = str_repeat(" ", 5 - intval(log10($article_count))) . $article_count . " +  " .
218                                    $section['name'] . str_repeat(" ", 20 - strlen($section['name'])) .
219                                    $class_title_f . addslashes($section['title']) . str_repeat(" ", 22 - str_length($section['title'])) .
220                                    ($section['udf_values']['section_master'] == "" ? "诚征版主中" : $section['udf_values']['section_master']);
221    
222                            $buffer .= <<<MENU
223                            @LIST_SECTION   {$display_row}, 4, {$section['sid']}, {$section['read_user_level']},   "{$section['name']}",    "{$title_f}"
224    
225                            MENU;
226    
227                          $display_row = 0;                          $display_row = 0;
228                  }                  }
229          }          }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1