Exemplo n.º 1
0
    static function showInsertSubCategory($id, $cat_all, $params, $tabclass, $Itemid, $deep)
    {
        global $g_item_count, $booklibrary_configuration, $mosConfig_live_site;
        $deep++;
        for ($i = 0; $i < count($cat_all); $i++) {
            if ($id == $cat_all[$i]->parent_id && $cat_all[$i]->display == 1) {
                $g_item_count++;
                $link = 'index.php?option=com_booklibrary&task=showCategory&catid=' . $cat_all[$i]->id . '&Itemid=' . $Itemid;
                ?>
                <table  class="basictable bl_bl_all_categories_list_categories_in_table" width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr class="<?php 
                echo $tabclass[$g_item_count % 2];
                ?>
">
                        <td width="1%" style="vertical-align:text-top;">
                            <?php 
                if ($deep != 1) {
                    $jj = $deep;
                    while ($jj--) {
                        echo "&nbsp;&nbsp;&nbsp;&nbsp;";
                    }
                    echo "&nbsp;";
                    //|_";
                    ?>
                                <img class="arrow_symbol" src="./components/com_booklibrary/images/arrow.png"/>
                                <?php 
                }
                ?>
                        </td>
                        <td width="9%">
                            <?php 
                if ($params->get('show_cat_pic') && $cat_all[$i]->image != "") {
                    ?>
                                <img src="./images/stories/<?php 
                    echo $cat_all[$i]->image;
                    ?>
" alt="picture for subcategory" height="48" width="48" />&nbsp;
                            <?php 
                } else {
                    ?>
                                <img src="<?php 
                    echo $mosConfig_live_site;
                    ?>
/components/com_booklibrary/images/folder.png" alt="picture for subcategory" height="48" width="48" />&nbsp;
                <?php 
                }
                ?>
                        </td>
                        <td class="bl_single_category_list_subcategories_link" width="74%">	
                            <a href="<?php 
                echo sefRelToAbs($link);
                ?>
" class="category<?php 
                echo $params->get('pageclass_sfx');
                ?>
">
                <?php 
                echo $cat_all[$i]->title;
                ?>
                            </a>					
                        </td>
                        <td  align="left" width="10%" style="text-align:center;">				
                        <?php 
                if ($cat_all[$i]->books == '') {
                    echo "0";
                } else {
                    echo $cat_all[$i]->books;
                }
                ?>
                        </td>
                   </tr>
                </table>
                <?php 
                if ($GLOBALS['subcategory_show']) {
                    HTML_booklibrary::showInsertSubCategory($cat_all[$i]->id, $cat_all, $params, $tabclass, $Itemid, $deep);
                }
            }
            //end if ($id == $cat_all[$i]->parent_id)
        }
        //end for(...)
    }