this is the segment that showed what's happening from the version with some debugging that showed that $sm was being lost. it is showing up as an empty variable in the print out. it should be a 0 or 1
Code: Select all
# set the pics
$main="main.$uid.jpg"; $tmain=$faup.$main; $t1="t1.$uid.jpg"; $tt1=$faup.$t1; $t2="t2.$uid.jpg";
$tt2=$faup.$t2; $t3="t3.$uid.jpg"; $tt3=$faup.$t3; $t4="t4.$uid.jpg"; $tt4=$faup.$t4;
$salute="salute.$uid.jpg"; $tsalute=$faup.$salute; $unoa='sitepics/uona.png';
# set what's approved
$sm=0; $s1=0; $s2=0; $s3=0; $s4=0; $ss=0;
if($userinfo['mp']==$ok){ $sm=1; $bleh='got here'; } // should the main pic be shown?
if($userinfo['t1p']==$ok){ $s1=1; } // should the 1st thumb be shown?
if($userinfo['t2p']==$ok){ $s2=1; } // should the 2nd thumb be shown?
if($userinfo['t3p']==$ok){ $s3=1; } // should the 3rd thumb be shown?
if($userinfo['t4p']==$ok){ $s4=1; } // should the 4th thumb be shown?
if($userinfo['sp']==$ok){ $ss=1; } // should the salute pic be shown?
# find the height and width, or set to logo
if(is_file($tmain)&&($sm)){ list($mw, $mh)=getimagesize($tmain); } # we have and want to show a main
else{ $tmain=$unoa; list($mw, $mh)=getimagesize($unoa); $sm=FALSE; } // use the default
if(is_file($tt1)&&($s1)){ list($t1w, $t1h)=getimagesize($tt1); } # we have and want to show thumb 1
else{ $tt1=$unoa; list($t1w, $t1h)=getimagesize($unoa); $s1=FALSE; } // use the default
if(is_file($tt2)&&($s2)){ list($t2w, $t2h)=getimagesize($tt2); } # we have and want to show thumb 2
else{ $tt2=$unoa; list($t2w, $t2h)=getimagesize($unoa); $s2=FALSE; } // use the default
if(is_file($tt3)&&($s3)){ list($t3w, $t3h)=getimagesize($tt3); } # we have and want to show thumb 3
else{ $tt3=$unoa; list($t3w, $t3h)=getimagesize($unoa); $s3=FALSE; } // use the default
if(is_file($tt4)&&($s4)){ list($t4w, $t4h)=getimagesize($tt4); } # we have and want to show thumb 4
else{ $tt4=$unoa; list($t4w, $t4h)=getimagesize($unoa); $s4=FALSE; } // use the default
if(is_file($tsalute)&&($ss)){ list($sw, $sh)=getimagesize($tsalute); } # we have and want to show a salute
else{ $tsalute=$unoa; list($sw, $sh)=getimagesize($unoa); $ss=FALSE; } // use the default
if(is_file($tmain)){ $ifm='there'; }else{ $ifm='not'; }
if($sm){ $smc='yes'; }else{ $smc='no'; }
$debug="<p>debug: <br />uid= $uid<br />un=$un<br />main={$userinfo['mp']}<br />one={$userinfo['t1p']}<br />two={$userinfo['t2p']}<br />three={$userinfo['t3p']}<br />four={$userinfo['t4p']}<br />salute={$userinfo['sp']}<br />main: $ifm<br />show main? $smc -- $sm<br />$bleh</p>";debug:
uid= 32
un=uzaho
main=9
one=9
two=9
three=9
four=9
salute=9
main: there
show main? no --
got here