Menu
[code=php]
if ($file != $product[$k][‘items’][‘data’][‘tag’] ||
$file != $product[$k][‘code’] ) {
echo “<div>Could not read <b>$loc”;
if($kdir) { $kdir = array_shift(explode(‘/’, $kdir));
echo “-$kdir”; }
echo “+$file.php</b> “;
echo “<br /><b>Session Logged</b></div>n”;
attempted();
inc(‘foot’);
}
So
[code=php]
$file == 0107 (True) || $file == qbm (True)
$file == $product[$k][‘items’][‘data’][‘tag’] (True) || $file == $product[$k][‘code’] (True)
But if $file == 9999 and
$product[$k][‘items’][‘data’][‘tag’] == 0107
$file != $product[$k][‘items’][‘data’][‘tag’](False)
WTF?! ?
[code=php]
echo "<br />File: $file";
echo "<br />Code: {$product[$k]['code']}";
echo "<br />Tag: {$product[$k]['items']['data']['tag']}";
echo '<br />File is Code: '; echo ( $file != $product[$k]['code'] ) ? 'True' : 'False';
echo '<br />File is Tag: '; echo ( $file != $product[$k]['items']['data']['tag'] ) ? 'True' : 'False';
if ($file != $product[$k]['items']['data']['tag'] ||
$file != $product[$k]['code'] ) {
echo "<div>Could not read <b>$loc";
if($kdir) { $kdir = array_shift(explode('/', $kdir));
echo "-$kdir"; }
echo "+$file.php</b> ";
echo "<br /><b>Session Logged</b></div>n";
attempted();
inc('foot');
}
[/code]
<i>
</i>// File is input, code and tag are called in to match
File: 0107
Code: 0107
Tag: qbm
// True or False
File is NOT Code: False
File is NOT Tag: True
[code=php]
if ($file) {
$kdir = (isset($kdir)) ? $kdir : $product[$k]['sid'];
$k = ($product[$k]['data']['img'] == 0)
? URL . $handle.$file
: $noimg;
/*
$product = array_shift($product);
if ($file != $product['items']['data']['tag'] &&
$file != $product['code']) {
echo "<div>Could not read <b>$loc";
if($kdir) { $kdir = array_shift(explode('/', $kdir));
echo "-$kdir"; }
echo "+$file.php</b> ";
echo "<br /><b>Session Logged</b></div>n";
attempted();
inc('foot');
}
*/
foreach($product AS $products) {
if ($file == $product['items']['data']['tag']) {
$token = uniqid(); #Set Unqiue
$payload .= $ret.'<div class="tk">';
$payload .= '<form action="" id="ID_' . $token . '">';
$payload .= "<div style='font-size:11px;margin-top:5px;";
$payload .= "float:right;z-index:9999'>";
$payload .= "<b><x class='sColor'>•</x> Section: </b>";
$payload .= "<a class='tracker'"; // Illegal tagging
$payload .= "href='{$_SERVER['PHP_SELF']}?{$loc}'>";
$payload .= $products['s_title'] . '</a> / ';
$products['sid'] //Pop Trailing Slash
= array_shift(explode('/', $products['sid']));
$payload .= "<a class='tracker' href='";
$payload .= "{$_SERVER['PHP_SELF']}?{$loc}";
$payload .= "-{$products['sid']}'>";
$payload .= $products['cid'] . '</a> / ';
$payload .= "</div>";
$payload .= $ret.'<p>';
$payload .= '<b id="centername">';
$payload .= $products['items']['name'];
$payload .= '</b></p></form></div>';
$payload .= $ret.'<div><div class='content'>'.$ret;
$payload .= $ret.'<img id="prod" class='figure vMinus' ';
$payload .= 'alt="Product Large" src="'.$k.'-01.jpg" />'.$ret;
// JIC ;)
$vdo_response = $products['items']['data']['vdo'];
$vdo_response
= ($vdo_response != 'FALSE')
? $vdo_response
: NULL;
// Might want this later
if ($vdo_response == FALSE) {
$payload .= '';
}
if ($vdo_response) {
$vdo_object = NULL;
$vdo_object .= _browser( 'msie' ) ?
'<object id="ISIE" class="swfobject"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="291" height="220"
style="visibility: visible;">
<param name="movie"
value="'.URL.'swfobject/'
.$products['items']['data']['vdo']
.'_controller.swf?'
.$products['items']['data']['vdo']
.'.flv" />'
: //IEOR
'<object id="NOIE" class="swfobject"
type="application/x-shockwave-flash"
width="291" height="220"
data="' .URL.'swfobject/'
.$products['items']['data']['vdo']
.'_controller.swf?'
.$products['items']['data']['vdo']
.'.flv">';
$vdo_object .=
'<param name="quality" value="best" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#ffffff" />
<param name="allowfullscreen" value="true" />
<param name="scale" value="showall" />
<param name="allowscriptaccess" value="always" />
</object>';
}
$needle = array("t", "r", "n");
$payload = $payload .= str_replace($needle, "", $vdo_object);
if( $products['items']['required']['id'] == 'TRUE' ) {
inc('crypto', 'php');
array_shift($products['items']['required']);
$src = $header_image
= URL . '/images/products/' .
$loc . '/' . $products['section'];
$p = $products['items']['data']['img'];
if ( $p > 1 ) {
$payload .= $ret.'<div id="imagepacker">';
$i = 1; while ( $i <= $p ):
$t = str_pad( $i, 2, "0", STR_PAD_LEFT );
$payload .= "$ret<a href='$k-$t.jpg' rel='shadowbox[";
$payload .= "{$products['items']['data']['tag']}"];";
$payload .= "$options' title='Click to Expand: ";
$payload .= "{$products['items']['name']}'><img src='$k";
$payload .= "-$t-sm.jpg' alt='' /></a>"; $i++;
endwhile;
$payload .= "$ret</div>$ret"; }
}
if( $products['items']['required']['id'] == 'SPECIAL' ) {
inc('crypto', 'php');
array_shift($products['items']['required']);
foreach ( $products['items']['required'] as $key => $val ) {
$payload .= str_replace('"', '"', decrypt($val));
}
}
$payload .= "$ret</div><div style='margin:0 0 -65px;color:#fff;'> </div>";
if($product['cat']['items']['required']['id'] == 'TRUE') {
$spec = array (
0 => 'Specifications', 1 => 'Information',
2 => 'Maintenance', 3 => 'Safety',
4 => 'Troubleshooting', ); # Declare TAPS
$i = 0;
$payload .= "$ret<div class='menu'>";
$i = 0; $garbage = 'pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw=';
foreach ($products['items']['required'] AS $key => $val) {
if ($i == 0 && $val == $garbage) {
$top .= "$ret<div class='tab bnone'><p>";
$top .= "{$spec[$i]}</p></div>";
$bottom .= "$ret<div name='xs' id='xs$i' class='hide'></div>";
$i++;
}
if ($i != 5 && $val == $garbage) {
$top .= "$ret<div class='tab bnone'><p>";
$top .= "{$spec[$i]}</p></div>";
$bottom .= "$ret<div name='xs' id='xs$i' class='hide'></div>";
$i++;
}
if($i == 0 && $val != $garbage) {
$output = dec($val);
$top .= "$ret<div class='tab'><a href='javascript:tap("xs$i");'>";
$top .= "{$spec[$i]}</a></div>";
$bottom .= "$ret<div name='xs' id='xs$i' class=''>";
$bottom .= "$output</div>";
$last_output = $output;
$i++;
}
if ($i != 5 && $val != $garbage) {
$output = dec($val);
if($last_output != $output) {
$top .= "$ret<div class='tab'><a href='javascript:tap("xs$i");'>";
$top .= "{$spec[$i]}</a></div>";
$bottom .= "$ret<div name='xs' id='xs$i' class='hide'>";
$bottom .= "$output</div>"; $i++;
}
}
}
$payload .= $top.$rt2 .= $bottom;
$payload .= "$ret</div>$ret";
$i = NULL; # Destroy Increments
}
}
}
} // If File
[/code]
<i>
</i>
array(1) {
["cat"]=>
array(7) {
["s_title"]=>
string(6) "Lasers"
["s_head"]=>
string(4) "head"
["cid"]=>
string(19) "Professional Lasers"
["sid"]=>
string(3) "pr/"
["code"]=>
string(4) "0107"
["items"]=>
array(4) {
["name"]=>
string(6) "Q-Beam"
["pid"]=>
string(22) "L-Q-BEAM4.95mW/L-Q200G"
["required"]=>
array(6) {
["id"]=>
string(4) "TRUE"
["spec"]=>
string(5292) "M0zOgi0aHMSIrHNXJd7S1HsBWZM6uPtyXeASqLxXiC+="
["info"]=>
string(44) "pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw="
["mnts"]=>
string(44) "pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw="
["safe"]=>
string(5292) "M0zOgi0aHMSIrHNXJd7S1HsBWZM6uPtyXeASqLxXiC+="
["trbl"]=>
string(44) "pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw="
}
["data"]=>
array(3) {
["img"]=>
int(1)
["tag"]=>
string(3) "qbm"
["vdo"]=>
string(7) "qbeam00"
}
}
["shipping"]=>
array(5) {
["freight"]=>
string(4) "TRUE"
["oval"]=>
string(12) "2000.00/0.00"
["unit"]=>
string(5) "FALSE"
["ship"]=>
string(14) "Q1D34x17x12W29"
["mast"]=>
string(5) "FALSE"
}
}
}
array(1) {
["cat"]=>
array(7) {
["s_title"]=>
string(6) "Lasers"
["s_head"]=>
string(4) "head"
["cid"]=>
string(19) "Professional Lasers"
["sid"]=>
string(3) "pr/"
["code"]=>
string(4) "0139"
["items"]=>
array(4) {
["name"]=>
string(11) "Stinger RGB"
["pid"]=>
string(13) "STINGERRGB-1W"
["required"]=>
array(6) {
["id"]=>
string(4) "TRUE"
["spec"]=>
string(5292) "M0zOgi0aHMSIrHNXJd7S1HsBWZM6uPtyXeASqLxXiC+="
["info"]=>
string(44) "pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw="
["mnts"]=>
string(44) "pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw="
["safe"]=>
string(44) "pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw="
["trbl"]=>
string(44) "pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw="
}
["data"]=>
array(3) {
["img"]=>
int(3)
["tag"]=>
string(3) "sti"
["vdo"]=>
string(12) "stingerrgb01"
}
}
["shipping"]=>
array(5) {
["freight"]=>
string(4) "TRUE"
["oval"]=>
string(9) "0.00/0.00"
["unit"]=>
string(5) "FALSE"
["ship"]=>
string(5) "FALSE"
["mast"]=>
string(5) "FALSE"
}
}
}
array(1) {
["cat"]=>
array(7) {
["s_title"]=>
string(6) "Lasers"
["s_head"]=>
string(4) "head"
["cid"]=>
string(19) "Professional Lasers"
["sid"]=>
string(3) "pr/"
["code"]=>
string(4) "9999"
["items"]=>
array(4) {
["name"]=>
string(32) "Variance Application Information"
["pid"]=>
string(8) "VARIANCE"
["required"]=>
array(1) {
["id"]=>
string(5) "FALSE"
}
["data"]=>
array(3) {
["img"]=>
int(1)
["tag"]=>
string(3) "fda"
["vdo"]=>
string(5) "FALSE"
}
}
["shipping"]=>
array(5) {
["freight"]=>
string(5) "FALSE"
["oval"]=>
string(9) "0.00/0.00"
["unit"]=>
string(5) "FALSE"
["ship"]=>
string(5) "FALSE"
["mast"]=>
string(5) "FALSE"
}
}
}
array(1) {
["cat"]=>
array(7) {
["s_title"]=>
string(6) "Lasers"
["s_head"]=>
string(4) "head"
["cid"]=>
string(19) "Professional Lasers"
["sid"]=>
string(3) "pr/"
["code"]=>
string(4) "0109"
["items"]=>
array(4) {
["name"]=>
string(6) "Q-Scan"
["pid"]=>
string(6) "Q-SCAN"
["required"]=>
array(6) {
["id"]=>
string(4) "TRUE"
["spec"]=>
string(5292) "M0zOgi0aHMSIrHNXJd7S1HsBWZM6uPtyXeASqLxXiC+="
["info"]=>
string(44) "pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw="
["mnts"]=>
string(44) "pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw="
["safe"]=>
string(44) "pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw="
["trbl"]=>
string(44) "pU8kkBef1nLa/RATsm3vZHGg51rPjiEU2JHBpWenxWw="
}
["data"]=>
array(3) {
["img"]=>
int(3)
["tag"]=>
string(3) "qsc"
["vdo"]=>
string(5) "FALSE"
}
}
["shipping"]=>
array(5) {
["freight"]=>
string(5) "FALSE"
["oval"]=>
string(12) "2000.00/0.00"
["unit"]=>
string(5) "FALSE"
["ship"]=>
string(13) "Q1D12x12x12W7"
["mast"]=>
string(5) "FALSE"
}
}
}
array(1) {
["cat"]=>
array(7) {
["s_title"]=>
string(6) "Lasers"
["s_head"]=>
string(4) "head"
["cid"]=>
string(19) "Professional Lasers"
["sid"]=>
string(3) "pr/"
["code"]=>
string(4) "9998"
["items"]=>
array(4) {
["name"]=>
string(8) "Sky Scan"
["pid"]=>
string(8) "SKY-SCAN"
["required"]=>
array(1) {
["id"]=>
string(5) "FALSE"
}
["data"]=>
array(3) {
["img"]=>
int(2)
["tag"]=>
string(3) "ssc"
["vdo"]=>
string(5) "FALSE"
}
}
["shipping"]=>
array(5) {
["freight"]=>
string(5) "FALSE"
["oval"]=>
string(9) "0.00/0.00"
["unit"]=>
string(5) "FALSE"
["ship"]=>
string(5) "FALSE"
["mast"]=>
string(5) "FALSE"
}
}
}
array(1) {
["cat"]=>
array(7) {
["s_title"]=>
string(6) "Lasers"
["s_head"]=>
string(4) "head"
["cid"]=>
string(19) "Professional Lasers"
["sid"]=>
string(3) "pr/"
["code"]=>
string(4) "9997"
["items"]=>
array(4) {
["name"]=>
string(20) "Q-Scan Expansion Set"
["pid"]=>
string(16) "Q-SCAN-EXPANSION"
["required"]=>
array(1) {
["id"]=>
string(5) "FALSE"
}
["data"]=>
array(3) {
["img"]=>
int(1)
["tag"]=>
string(3) "exp"
["vdo"]=>
string(5) "FALSE"
}
}
["shipping"]=>
array(5) {
["freight"]=>
string(5) "FALSE"
["oval"]=>
string(9) "0.00/0.00"
["unit"]=>
string(5) "FALSE"
["ship"]=>
string(5) "FALSE"
["mast"]=>
string(5) "FALSE"
}
}
}
... etc
No luck...[/quote]
[code=php]
$this_value = 'this';
if ($this_value != 'this' || $this_value != 'that') { /* T + F = F still yes? */ }
But
if ($this_value != 'this' && $this_value != 'that') { /* T + F = T now correct? */ }
[/code]
It's pretty close to what I'm trying to get.
[B]if ($this_value does not equal QBM
AND [/B][B]$this_value[/B][B] does not equal 0107)
{ some_function() }[/B]
It still returns false though?
[code=php]
$this_value = 'this';
if ($this_value != 'this' || $this_value != 'that') { /* T + F = F still yes? */ }
But
if ($this_value != 'this' && $this_value != 'that') { /* T + F = T now correct? */ }
[/code]
I can't understand why my code won't do this though, I've tried it both ways.
It chokes, sputters, then dies. It's ridiculous.[/QUOTE]
[code=php]
$this_value = 'this';
if ($this_value != 'this' || $this_value != 'that') { /* F or T = T */ }
But
if ($this_value != 'this' && $this_value != 'that') { /* F & T = F */ }
[/code]
[COLOR=#000000] [/quote][COLOR=#007700] I'm just pointing out what's really going on with that if condition hoping a lightbulb will click on, and you'll know what to do. [/COLOR]
[/COLOR]
Well Jim its pretty simple what I want.
If the product is not a short name in
the XML (aka QBM) or a product code
in the XML (QBM's is 0107 for instance)
I want it to run my attempted() function
to email me that someone is snoop around
my webpage. It should be pretty cut and
dry, but it's seriously screwing up my code
for no apparent reason. The && should
have worked, but it doesn't and I can't
figure out why not.[/quote]
I figured it out, I am running through MULTIPLE matches, so the first time
it doesn't match it overrides the program. I have to figure out a loop that
says [b]if any of these match do this[/b] otherwise we're good to go.
Sorry to strain you jim, you've been a big help. You were right, there was
something I'd completely overlooked.[/QUOTE]
<i>
</i>if($condition1 || $condition2 || $condition3){
//do this one thing
} else {
//do the other thing
}
[CODE]<variable> = <expression>
if <condition>
do stuff;
else
do other stuff;
while <condition>
do stuff;
for <variable> from <first value> to <last value> by <step>
do stuff with variable;
function <function name>(<arguments>)
do stuff with arguments;
return something;
<function name>(<arguments>) // Function call
[/CODE]
0.1.9 — BETA 5.2