Initial commit.

This commit is contained in:
root 2023-12-24 23:46:31 +01:00
commit c169152d0f
2 changed files with 142 additions and 0 deletions

49
index.php Normal file
View file

@ -0,0 +1,49 @@
<?php include "questions.php"; ?>
<html>
<head>
<link rel="stylesheet" href="https://bootswatch.com/5/darkly/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<script type="text/javascript" >
function update() {
let total = document.querySelectorAll("input:checked").length;
let text = "==== Results ====\n";
for(let i = 0; i < <?=count($questions)?>; i++) {
let count = document.querySelectorAll("[id*='" + i + "_']:checked").length;
let max = document.querySelectorAll("[id*='" + i + "_']").length;
document.getElementById(i).innerText = count;
text += "Section " + (i + 1) + ": " + count + " / " + max + "\n";
}
text += "Total: " + total;
document.querySelector("textarea").innerHTML = text;
}
</script>
</head>
<body class="container py-5">
<h1 class="text-center">The Beautiful Princess Disorder Checklist</h1>
<p>This is a checklist to help one understand Borderline Personality Disorder. One may use it to self-diagnose or as a worksheet to present to a doctor or therapist or other medical professional and better communicate symptoms they are experiencing. All information is taken from the DSM-5.</p>
<p>Taken from <a href="https://shitborderlinesdo.tumblr.com/post/102600734264/the-borderline-personality-disorder-checklist">shitborderlinesdo's tumblr</a>.</p>
<?php
foreach ($questions as $id => $section) {
if($id=="")
?>
<h3>Section <?=$id+1?></h3>
<hr>
<p><?=$descriptors[$id]?></p>
<ul class="list-group">
<?php foreach ($section as $qid => $question) { ?>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" id="<?=$id?>_<?=$qid?>" onchange="update()">
<label class="form-check-label" for="<?=$id?>_<?=$qid?>"><?=$question?></label>
</li>
<?php }?>
</ul>
<p><span id="<?=$id?>">0</span> / <?=count($section)?></p>
<br>
<?php }?>
<textarea class="form-control bg-dark text-light" rows="9" readonly style="resize:none;">Results:</textarea>
<script type="text/javascript" defer>
update();
</script>
</body>
</html>

93
questions.php Normal file
View file

@ -0,0 +1,93 @@
<?php
$questions = [
[
"I have identity problems, including: I have an unstable sense of identity, I have poor self-esteem and excessive self-criticism, and I often experience dissociation when I am under stress.",
"I am unstable in my goals, aspirations, values, and/or career plans.",
"I have a heightened sense of empathy and am hypersensitive to the feelings and needs of my peers, although my perceptions are often biased towards negative attributes.",
"There is a lot of instability in my relationships, in that I am needy, mistrustful, and anxious.",
],
[
"I have cognition problems and difficulty retaining information and remembering people and events.",
"I have affectivity problems and difficulty controlling the range and intensity of my emotional responses.",
"I have problems with interpersonal functioning and being aware of my own actions and feelings and how they affect others.",
"I have difficulty controlling my impulses.",
],
[
"I am very impulsive and often act on things without planning.",
"I engage in dangerous, risky, and/or potentially self-damaging activities with no concern to my personal limitations.",
"I am easily angered.",
],
[
"My emotions are incredibly unstable, and I change moods often (sometimes within minutes), feeling things more intensely than others seem to.",
"I experience intense feelings of nervousness, tenseness, panic, and/or anxiety. I have fears of the future and of falling apart or losing control.",
"I get separation insecurity and fear abandonment.",
"I am frequently depressed and feel hopeless and have a difficult time recovering from such moods.",
],
[
"I have a fear of abandonment and do my best to avoid it.",
"I switch between idealizing and devaluing the people in my life. My relationships are often unstable and intense.",
"I have an unstable sense of self and often question my identity.",
"I am impulsive.",
"I have attempted suicide and/or I self-harm.",
"I have frequent mood swings.",
"I often feel empty or depressed and have doubts about my future.",
"I am hot-tempered.",
"When stressed, I am paranoid and/or I experience dissociation.",
],
[
"My symptoms impair my personality and social functioning ",
"My symptoms are consistent across a broad range of personal and social situations.",
"My symptoms have lasted a while and started in early adulthood or earlier.",
"My symptoms are not caused by medication, drug use, or another medical condition.",
],
[
"I have disordered eating patterns.",
"I am sometimes obsessive.",
"I sometimes get intrusive thoughts which I am unable to ignore.",
"I become attached easily.",
"I often “bait” people in order to start a conflict.",
"I have trouble sleeping, or I sleep too much.",
"I have a child-like curiosity.",
"I am dependent on others.",
"I sometimes mimic or mirror others.",
"I have nightmares.",
"I have difficulty processing information.",
"My appearance changes often.",
"I have an extreme need for acceptance.",
"I have a natural rejection of people in authority.",
"I constantly feel like I need to prove myself over and over again.",
"I very much live in the moment, to the point where past actions don’t matter. How I judge others (and myself) depends entirely on what is happening right now.",
"I isolate myself, even when I need social interaction.",
"I am often defensive.",
"I have anxiety/panic attacks.",
"I experience memory lapses.",
"I consider myself a perfectionist.",
"I react very strongly to mundane experiences.",
"I have a difficult time making decisions.",
"I have difficulty completing tasks.",
"I often feel misunderstood, mistreated, or victimized.",
"When I am upset, I am unable to calm down without help.",
"I castrophicize my problems and see the smallest things as the end of the world.",
"I often see my problems as unsolvable and hopeless to fix.",
"I hold grudges.",
"I alternate between seeing others as completely for them or against me.",
"I have a hard time recalling someone’s love for me when they’re not around.",
"I change my opinions depending on whom I’m with.",
"Sometimes the slightest provocation will make me feel abandoned.",
"I feel distrustful and suspicious a great deal of time.",
"I rush into relationships based on an idea of a person rather than the person themselves.",
]
];
$descriptors = [
"Must check TWO or more of the following:",
"Must check TWO or more of the following:",
"Must check ONE or more of the following:",
"Must have at least FOUR checks TOTAL by the end of this section, including ones from previous section (If you checked two above, you only need two here, for example):",
"Must check FIVE or more of the following:",
"Must check ALL of the following:",
"Common Symptoms and Behaviors associated:"
];