Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $thumbWidth = 100 .'px'; $thumbHeight = 100 .'px';
- $foto = mfa("select status, id, principale from gs9.profilo_foto where status < '4' and nickname = '".$user['nickname']."' order by principale desc, id desc limit 1");
- switch($foto['status']){case "": $img_th = 'immagini/thumb/no_foto_100.png'; break;
- case "0":if ($foto['principale'] == '0') {$img_th = 'immagini/thumb/no_princ_100.png';}
- elseif ($foto['principale'] == 1) {
- $img_th = "../../foto_profilo/".ucf($user['nickname'][0])."/".str_replace(' ','',stl($user['nickname']))."/principale.png";
- $dimensioni = getimagesize($img_th);
- $pre_thumbWidth = $dimensioni[0]; $pre_thumbHeight = $dimensioni[1];
- if ($pre_thumbWidth > $pre_thumbHeight) {$thumbHeight = 100 .'px'; $thumbWidth = 'auto';}
- elseif ($pre_thumbWidth < $pre_thumbHeight) {$thumbWidth = 100 .'px'; $thumbHeight = 'auto';}
- elseif ($pre_thumbWidth == $pre_thumbHeight) {$thumbWidth = 100 .'px'; $thumbHeight = 100 .'px';}
- }
- break;
- case "1": $img_th = 'immagini/thumb/hot_100.png'; break;
- case "2": $img_th = 'immagini/thumb/pvt_100.png'; break;
- case "3": $img_th = 'immagini/thumb/hot_100.png'; break;
- case "4": $img_th = '<immagini/thumb/conv_100.png'; break;
- case "5": $img_th = 'immagini/thumb/conv_100.png"'; break;
- }
Add Comment
Please, Sign In to add comment