page blank
#1
Hello, I've finished a plugin but there's a bug. I know where code is wrong but I can't fix it:

function news_show(){
    global $db, $news, $news_list, $news_content;
    $l_news = $db->write_query("SELECT * FROM ".TABLE_PREFIX."news ORDER BY id DESC");
    if($db->num_rows($l_news) > 0){
        $news_content = "Non ci sono news da mostrare";
    } else {
        while($row = $db->fetch_array($l_news)){
            $news_content .= $row['text'];
        }    
    }
    
    eval('$news_list = "'.$templates->get("news_list").'";');
    eval('$news = "'.$templates->get("news").'";');
}

Templates

news
<div class="news">
    <div class="msg">
        <ul>
            {$news_list}
        </ul>
    </div>
</div>

news_list
<li class="quotes">{$news_content}</li>
My Projects - Support My Projects

Don't forget to rate posts!
Reply


Messages In This Thread
page blank - by chack1172 - 2015-08-05, 05:42 PM
RE: page blank - by Destroy666 - 2015-08-05, 06:36 PM
RE: page blank - by chack1172 - 2015-08-05, 08:00 PM
RE: page blank - by Destroy666 - 2015-08-05, 11:26 PM
RE: page blank - by chack1172 - 2015-08-06, 01:55 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)