<?php require_once '../includes/general.php'; require_once '../includes/db.php'; include_once 'access_control.php'; if (loggedIn(false)) { db_connect(); header('Content-type: application/json'); $jsonp = false; if (isset($_REQUEST['callback'])) { $jsonp = true; } if ($jsonp) { echo $_REQUEST['callback'] . "("; } if (isset($_SESSION['sid'])) { echo json_encode(getMotherInfo()); } else { if (isset($_SESSION['mid'])) { echo json_encode(getProfile()); } else { echo "{}"; } } if ($jsonp) { echo ")"; } }
<br /> <br /> </form> <ul> </div> <div id='questionnaire'> <ul> <form name="questionaire" method="post" action="admin/post/user_accounts.post.php#questionnaire"> <!-- drop down #1 --> <?php echo _("Mother"); ?> : <select name="midq"> <?php $mothers_questionnaire = getMotherInfo(false); // "M.mid IN (SELECT mid FROM SystemFeedback) OR M.mid IN (SELECT mid FROM SystemPerception)" ); foreach ($mothers_questionnaire as $mother) { printf("<option value='%s' %s>%s (%s)</option>", $mother['mid'], $mother['mid'] == @$_SESSION['midq'] ? "selected" : "", $mother['Name'], $mother['email']); } if (isset($_SESSION['midq'])) { unset($_SESSION['midq']); } ?> </select> <br /> <br /> <!-- drop down #2 --> Questionaire: <select name="surveyType" onchange="this.form.elements['questionaire'].click();">
while ($row = mysql_fetch_array($result)) { if ($_POST['type'] == $row['ntype']) { $r = " selected "; } echo "<option value='" . $row['ntype'] . "' " . $r . ">" . _($row['Problem']) . "</option>"; $r = ""; } ?> </select></pre> <pre><?php echo _("Mother"); ?> : <select multiple size="5" name="mid[]"> <?php $mothers = getMotherInfo(); foreach ($mothers as $mother) { printf("<option value='%s' %s>%s (%s)</option>", $mother['mid'], in_array($mother['mid'], $_POST['mid']) ? "selected" : "", $mother['Name'], $mother['email']); } ?> </select></pre> <pre> <input type="submit" name="query" value="<?php echo _("Query"); ?> "> <input type="submit" name="download" value="<?php echo _("Download"); ?> "></pre> <ul> </div> </div>