Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Images
- $thisScript = $_SERVER["SCRIPT_FILENAME"];
- $dirName = dirname($thisScript);
- $relative_path = "images/headshots/".$this->id.".jpg";
- $missing_path = "images/headshots/missing.jpg";
- $full_path = $dirName . "/" . $relative_path;
- //if(file_exists($relative_path))
- //if(file_exists($_FILES['uploadedfile']['name']))
- if(basename( $_FILES['uploadedfile']['name']) != '' /*and (file_exists($_FILES['uploadedfile']['name']))*/)
- {
- $this->process_headshot_file($relative_path, $full_path);
- }
- else
- {
- //$this->process_headshot_file($missing_path, $full_path);
- $query = "UPDATE hraps SET headshot_filename = '".$_SESSION['missing_headshot_image']."' WHERE id = ".$this->id;
- $result = mydb::cxn()->query($query);
- }
- if(basename( $_FILES['uploadedfile']['name']) != '')
- $image = "images/headshots/missing.jpg";
- if(file_exists($relative_path)) {
- $image = $relative_path;
- }
- $full_path = $dirName . "/" . $image;
- $this->process_headshot_file($image, $full_path);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement