<?php
include_once('c_poll_theme_card.php');

class c_page_cab_poll_theme_card_append extends c_page_cab_poll_theme_card
{
    public $h1='Опросы - карточка темы - добавить...';

    function block_main()
    {
        $child_info=TREE('poll_tree')->get_child_cnt($this->rec_section['pkey']);
        //damp_array($child_info) ;
        $this->page_title() ;
        ?>
            <div id="panel_buttons">
                <?if (!$child_info['573'])
                    {?><button class="button v2" cmd="poll/get_panel_section_create" parent_id="<? echo $this->rec_section['pkey']?>" mode="section">Добавить подраздел</button>
                       <button class="button v2" cmd="poll/get_panel_section_create" parent_id="<? echo $this->rec_section['pkey']?>" mode="poll">Добавить опрос</button><?
                    }
                 if (!$child_info['572']){?><button class="button v1" href="/frame/poll/theme/card/<? echo $this->rec_section['pkey'] ?>/new_question/">Добавить вопрос</button><?}
                ?>
            </div>
        <?
    }


}

?>
