query("SELECT ID FROM collages WHERE UserID='$LoggedUser[ID]' AND CategoryID='0' AND Deleted='0'"); if($DB->record_count() > 0) { list($CollageID) = $DB->next_record(); header('Location: collage.php?id='.$CollageID); die(); } $DB->query("INSERT INTO collages (Name, Description, CategoryID, UserID) VALUES ('$LoggedUser[Username]\'s personal collage', 'Personal collage for $LoggedUser[Username]. The first 5 albums will appear on his or her [url=http:\/\/".NONSSL_SITE_URL."\/user.php?id=$LoggedUser[ID]]profile[\/url].', '0', $LoggedUser[ID])"); $CollageID = $DB->inserted_id(); header('Location: collage.php?id='.$CollageID); die(); default: if(!empty($_GET['id'])) { require(SERVER_ROOT.'/sections/collages/collage.php'); } else { require(SERVER_ROOT.'/sections/collages/browse.php'); } break; } ?>