tanshah
11-17-2006, 12:06 PM
we just shiffted to vb fourm and forum it self is working fine, but we have created some module before for which posting is only allowed to members and also keep records of that members who are posting these modules are image gallery, library etc .
i have created a php script for that
<?php
if ($_SERVER['SERVER_NAME'] !== $_SERVER['HTTP_HOST'])
{
header('Location: http://' . $_SERVER['SERVER_NAME'] .
$_SERVER['PHP_SELF']);
exit;
}
$pd=getcwd();
chdir('/home2/america/public_html/forum');
require_once('global.php');
$username=$vbulletin->userinfo['username'];
chdir($pd);
if($username<>"Unregistered")
{
do some stuff ehre
}
else
{
header("Location:http://www.mysit.com/forum/index.php?do=login");
exit;
}
?>
Now problem is that it destroy all variables value which posted by either get or post from previous page.
if i remove that top lines
if ($_SERVER['SERVER_NAME'] !== $_SERVER['HTTP_HOST'])
{
header('Location: http://' . $_SERVER['SERVER_NAME'] .
$_SERVER['PHP_SELF']);
exit;
}
it show user is not login
so can any one help me with that or suggest me some better way to do that
thanks
i have created a php script for that
<?php
if ($_SERVER['SERVER_NAME'] !== $_SERVER['HTTP_HOST'])
{
header('Location: http://' . $_SERVER['SERVER_NAME'] .
$_SERVER['PHP_SELF']);
exit;
}
$pd=getcwd();
chdir('/home2/america/public_html/forum');
require_once('global.php');
$username=$vbulletin->userinfo['username'];
chdir($pd);
if($username<>"Unregistered")
{
do some stuff ehre
}
else
{
header("Location:http://www.mysit.com/forum/index.php?do=login");
exit;
}
?>
Now problem is that it destroy all variables value which posted by either get or post from previous page.
if i remove that top lines
if ($_SERVER['SERVER_NAME'] !== $_SERVER['HTTP_HOST'])
{
header('Location: http://' . $_SERVER['SERVER_NAME'] .
$_SERVER['PHP_SELF']);
exit;
}
it show user is not login
so can any one help me with that or suggest me some better way to do that
thanks