コード例 #1
0
        $imgfilename .= ".gif";
    } elseif ($imageinfo[2] == 2) {
        $imgfilename .= ".jpg";
    } elseif ($imageinfo[2] == 3) {
        $imgfilename .= ".png";
    } else {
        $imgfilename = false;
    }
    if ($imgfilename) {
        $img_loc = $destination_path . $imgfilename;
        $img_url = $destination_url . $imgfilename;
        if (file_exists($img_loc)) {
            unlink($img_loc);
        }
        move_uploaded_file($gphoto, $img_loc);
        if (do_resize_profimage($img_loc, "200", "200", false, 'file')) {
            $bool = updateUserImageFile($user_id, $imgfilename);
            if ($bool) {
                $fin = 1;
                $_SESSION['user_pic'] = $imgfilename;
            }
        }
    }
} else {
    $imgfilename = '';
}
?>
<script src="<?php 
echo $baseurl;
?>
/js/jquery-1.11.0.min.js"></script>
コード例 #2
0
     } elseif ($theimageinfo[2] == 2) {
         $thepp .= ".jpg";
     } elseif ($theimageinfo[2] == 3) {
         $thepp .= ".png";
     }
     if ($error == "") {
         $myvideoimgnew = $config['membersprofilepicdir'] . "/o/" . $thepp;
         if (file_exists($myvideoimgnew)) {
             unlink($myvideoimgnew);
         }
         move_uploaded_file($gphoto, $myvideoimgnew);
         $myvideoimgnew2 = $config['membersprofilepicdir'] . "/" . $thepp;
         do_resize_profimage($myvideoimgnew, "480", "300", true, $myvideoimgnew2);
         $myvideoimgnew3 = $config['membersprofilepicdir'] . "/thumbs/" . $thepp;
         //do_resize_image($myvideoimgnew, "200", "125", false, $myvideoimgnew3);
         do_resize_profimage($myvideoimgnew, "250", "250", true, $myvideoimgnew3);
         if (file_exists($config['membersprofilepicdir'] . "/o/" . $thepp)) {
             $query = "UPDATE members SET profilepicture='{$thepp}' WHERE USERID='" . mysql_real_escape_string($SID) . "'";
             $conn->execute($query);
             $_SESSION['profilepicture'] = $thepp;
         }
     }
 }
 if ($user_email != $_SESSION['EMAIL']) {
     $query = "UPDATE members SET verified='0' WHERE USERID='" . mysql_real_escape_string($SID) . "' limit 1";
     $conn->execute($query);
     $_SESSION['EMAIL'] = $user_email;
     $_SESSION['VERIFIED'] = 0;
     // Generate Verify Code Begin
     $verifycode = generateCode(5) . time();
     $query = "INSERT INTO members_verifycode SET USERID='" . mysql_real_escape_string($SUSERID) . "', code='{$verifycode}'";