Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
239 views
in Q2A Core by
Hello!
Well , I would like to have the code , which , in addition in one place shows a link to the settings, but only those who have permission ( from the expert above )
So I have this code

                        if(qa_get_logged_in_userid() === null)

                        {


                        } else
{
                                $user_id = qa_get_logged_in_userid();
                            $level = qa_db_query_sub("SELECT * FROM qa_users WHERE userid='$user_id'");
                            $lll = 19;
                            foreach($level as $number){
                            if($number['level']>$lll)
                            {
                                $this->output('<li class="qa-nav-main-item qa-nav-main-nav15">
                                <a href="../admin" class="qa-nav-main-link"><dfn data-info="Ustawienia"><img src="SnowFlat/icons/settings.png" alt="Ustawienia"></dfn></a>
                            </li>');
                            }}
}
                        $this->output('</ul>');$this->output('<div class="qa-nav-main-clear">
                        </div>
                    </i></div></div></div>');

 That does not work , and it should. No errors, no display , but as logs in as superadmin it does not show me this icon. Sorry for my English
Regards
Q2A version: 1.7.3

Please log in or register to answer this question.

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.

Categories

...