Пример #1
0
function lateForms($curr)
{
    $selectForm = QueryFactory::Build("select");
    $selectForm->Select("value", "enabled")->From("settings")->Where(["name", "=", "ttl_activation"]);
    $time_to_live = DatabaseManager::Query($selectForm)->Result();
    //	echo"\nactivation time: ". $time_to_live;
    //	$time_to_live = "+1 month";
    if ($time_to_live["enabled"] && strtotime($time_to_live["value"], $curr["created"]) < time()) {
        if (!FormsModel::isEnrollmentComplete($curr["id"]) || !FormsModel::isParQComplete($curr["id"]) || !FormsModel::isQues1Complete($curr["id"]) || !FormsModel::isQues2Complete($curr["id"])) {
            return true;
        }
    }
    return false;
}
Пример #2
0
<?php

if (isset($_POST['submitQuestionnaireP2'])) {
    if ($user) {
        $_POST['userID'] = $user->id;
        $qp2validator = new FormsModel($_POST);
        $q2return = $qp2validator->validateQuestionnaireP2();
    }
}
?>

<div class="background">
  <strong><h1>Pre-Study Questionnaire Part 2</h1></strong>
  <fieldset>
    <form method="post">
      <div id="q2message" style="display:none"></div>
        <div>
            <div><label for="q1">Current Height (in inches): </label></div>
            <div class="input"><input type="number" name="q1" placeholder="Your height"></div>
        </div>  

        <div>
            <div><label for="q2">Current Weight (in pounds): </label></div>
            <div class="input"><input type="number" name="q2" placeholder="Your weight"></div>
        </div>

        <div>
            <div><label for="q3">Describe how the Sit and Be Fit exercise program has affected the listed medical conditions in part 1</label></div>
            <div class="input"><textarea type="text" name="q3"></textarea></div>
        </div>
      
Пример #3
0
		$("#acc1").html("Enrollment Form - <strong>Completed</strong>");
		$("#submitEnrollment").prop("disabled", "true");
	<?php 
} else {
    $formsDone = false;
}
if (FormsModel::isQuestionnaireComplete($user_id)) {
    ?>
		$("#acc2").css("background", "#66CCFF");
		$("#acc2").html("Pre-Study Questionnaire - <strong>Completed</strong>");
		$("#submitQuestionnaire").prop("disabled", "true");
	<?php 
} else {
    $formsDone = false;
}
if (FormsModel::isParQComplete($user_id)) {
    ?>
		$("#acc3").css("background", "#66CCFF");
		$("#acc3").html("ParQ Form - <strong>Completed</strong>");
		$("#submitParQ").prop("disabled", "true");
	<?php 
} else {
    $formsDone = false;
}
if ($formsDone == true) {
    ?>
		$("#formsDoneMessage").show();
		$("#introText").hide();
		$("#assessmentPageLink").show();
	<?php 
}
Пример #4
0
<?php 
if (isset($_POST['submitEnrollment'])) {
    //print_r($_POST);
    if ($user) {
        $_POST['userID'] = $user->id;
        $enrollmentValidator = new FormsModel($_POST);
        $enrollmentReturn = $enrollmentValidator->validateEnrollment();
    }
}
?>

<div class="background">
    <form method="post">
    <div class="formBackground">
      <legend><strong><h1>Enrollment Form</h1></strong></legend>
      <div id="enrollmentMessage" class="success" style="display:none"></div>
          <div>
              <div class="input"><label for="lName">Last Name</label></div>
              <div class="input"><input type="text" name="lName" placeholder="Doe" required value="<?php 
if (isset($_POST['lName'])) {
    echo htmlspecialchars($_POST['lName']);
}
?>
"></div>
          </div>
          
          <div>
              <div class="input"><label for="fName">First Name</label></div>
              <div class="input"><input type="text" class="form-control" name="fName" placeholder="John" required value="<?php 
if (isset($_POST['fName'])) {
Пример #5
0
<?php

if (isset($_POST['submitQuestionnaire'])) {
    if ($user) {
        $_POST['userID'] = $user->id;
        //print_r($_POST);
        $qp1validator = new FormsModel($_POST);
        $q1return = $qp1validator->validateQuestionnaire();
    }
}
?>


<div class="background">
  <strong><h1>Pre-Study Questionnaire Part 1</h1></strong>
  <fieldset>
    <form method="post">
      <div>
        <div id="questionnaireMessage" style="display:none"></div>
        <?php 
$questions = array("How often do you perform the Sit and Be Fit exercises?:", "How long have you participated in the Sit and Be Fit program?:", "You exercise:", "Where do you exercise:", "Do you consider the Sit and Be Fit program host Mary Ann Wilson to be your exercise partner?:");
$options = array(array("Less than once a month", "Once per month", "Once per week", "More than once per week"), array("Less than 3 months", "3 to 6 months", "6 to 12 months", "More than 12 months"), array("By yourself", "With a partner", "With a class", "Other"), array("Home", "Gym", "Other"), array("No", "Yes"));
for ($i = 1; $i <= count($questions); $i++) {
    echo '<div><div><label>' . $questions[$i - 1] . '</label><br></div>';
    for ($j = 0; $j < count($options[$i - 1]); $j++) {
        echo '<div class="input"><input type="radio" name="q' . $i . '" required ' . (isset($_POST["q{$i}"]) && $_POST["q{$i}"] == $j ? "checked" : "") . ' checked value=' . $j . '>' . $options[$i - 1][$j] . '</div>';
    }
    echo '</div>';
}
?>
      </div>
Пример #6
0
<?php 
if (isset($_POST['submitParQ'])) {
    if ($user) {
        $_POST['userID'] = $user->id;
        print_r($_POST);
        $parQvalidator = new FormsModel($_POST);
        $parQreturn = $parQvalidator->validateParQ();
        print_r($parQreturn);
    }
}
?>

<div class="background">
<form method="post" id="parQform">
	<h1><strong>Par-Q Form</strong></h1>
	<div>
		<h2>The Physical Activity Readiness Questionnaire for Everyone</h2>
		<p>Regular physical activity is fun and healthy, and more people should become more physically active every day of the week.
Being more physically active is very safe for MOST people. This questionnaire will tell you whether it is necessary for you to
seek further advice from your doctor OR a qualified exercise professional before becoming more physically active.</p>
		<div id="parQmessage" class="success" style="display:none"></div>
		<div id="section1">
			
			<fieldset>
				<legend>SECTION 1 - GENERAL HEALTH</legend>
				<p>Please read the 7 questions below carefully and answer each one honestly: check YES or NO.</p>
				<div id="s1RadioGroup">
                    <div>
                        <label for="q1_1"><p>1: Has your doctor ever said that you have a heart condition OR high blood pressure?</p></label>
                        <div><input type="radio" class="s1Radios" name="q1_1" <?php