Topic: Problem with function
Hello ,
I am trying to include the script in my root/index.php , the CN is in root/news/
I use function in my index.php so i used :
function news()
{
// ------ START NEWS --------
//include
//end include
require_once("news/core/init.php");
$pw = REQ('pw');
$pw['number'] = "3";
if ($pw['PHP_SELF']) $PHP_SELF = $pw['PHP_SELF'];
if ($pw['template']) $template = $pw['template'];
if ($pw['start_from']) $start_from = $pw['start_from'];
if ($pw['number']) $number = $pw['number'];
if ($pw['archive']) $archive = $pw['archive'];
if ($pw['category']) $category = $pw['category'];
if ($pw['ucat']) $ucat = $pw['ucat'];
if ($pw['sortby']) $sortby = $pw['sortby'];
if ($pw['dir']) $dir = $pw['dir'];
if ($pw['page_alias']) $page_alias = $pw['page_alias'];
if ($pw['tag']) $page_alias = $pw['tag'];
if ($pw['user_by']) $user_by = $pw['user_by'];
if ($pw['static']) $static = $pw['static'];
if ($pw['reverse']) $reverse = $pw['reverse'];
if ($pw['only_active']) $only_active = $pw['only_active'];
if ($pw['no_prev']) $no_prev = $pw['no_prev'];
if ($pw['no_next']) $no_next = $pw['no_next'];
include("news/show_news.php");
// ------ END NEWS --------
}
that is called as : http://xxxx.com/index.php?op=news
but all the parameter like : $number or others are not working ??? it's show me all the news and not only a specific number ?
What's wrong ? something wrong because i am in index.php?op=news already ?