LondonBoy
11-29-2006, 05:27 PM
Hi,
How do I combine these two pieces of code?
if($quot['IDQuoteStatus'] == 2 && $_SESSION['loggedIn']->getID() == 20 )
and if(preg_match("/^192.128{1}/", getenv(REMOTE_ADDR)))
but rather if it's NOT coming from that IP Range.
So basically if quotationsatus ==2 and getID ==20 and NOT coming from that above IP Range
If it's this:
elseif ($quot['IDQuoteStatus'] == 2 && $_SESSION['loggedIn']->getID() == 20 && (!preg_match("/^192.128{1}/", getenv(REMOTE_ADDR))))
$html .= "<input type='button' class='button' value='".$this->lang['est']."' onClick=\"javascript:alert('You cannot access this page')>";
If that's it, i'm missing a " somewhere
can anyone locate where assuming that this snippet would work?
How do I combine these two pieces of code?
if($quot['IDQuoteStatus'] == 2 && $_SESSION['loggedIn']->getID() == 20 )
and if(preg_match("/^192.128{1}/", getenv(REMOTE_ADDR)))
but rather if it's NOT coming from that IP Range.
So basically if quotationsatus ==2 and getID ==20 and NOT coming from that above IP Range
If it's this:
elseif ($quot['IDQuoteStatus'] == 2 && $_SESSION['loggedIn']->getID() == 20 && (!preg_match("/^192.128{1}/", getenv(REMOTE_ADDR))))
$html .= "<input type='button' class='button' value='".$this->lang['est']."' onClick=\"javascript:alert('You cannot access this page')>";
If that's it, i'm missing a " somewhere
can anyone locate where assuming that this snippet would work?