* but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ include $_SERVER['DOCUMENT_ROOT'] . "/include/dbconnopen.php"; include $_SERVER['DOCUMENT_ROOT'] . "/core/include/setup_user.php"; user_enforce_has_access($Enlace_id); /*Add a new program quality survey here: */ include "../../header.php"; include "../header.php"; include "../classes/program.php"; $survey_program = new Program(); $survey_program->load_with_program_id($_GET['prog']); include "../include/dbconnopen.php"; $prog_sqlsafe = mysqli_real_escape_string($cnnEnlace, $_GET['prog']); ?> <script type="text/javascript"> $(document).ready(function() { $('#programs_selector').addClass('selected'); $('#ajax_loader').hide(); }); $(document).ajaxStart(function() { $('#ajax_loader').fadeIn('slow'); }); $(document).ajaxStop(function() { $('#ajax_loader').fadeOut('slow');
* but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ include_once $_SERVER['DOCUMENT_ROOT'] . "/include/dbconnopen.php"; include_once $_SERVER['DOCUMENT_ROOT'] . "/core/include/setup_user.php"; user_enforce_has_access($Enlace_id, $ReadOnlyAccess, $_COOKIE['program']); include "../../header.php"; include "../header.php"; include "../classes/program.php"; require_once "../classes/assessment.php"; $program = new Program(); $program->load_with_program_id($_COOKIE['program']); ?> <!-- Shows all program information. --> <div style="display:none;"> <?php include "../include/datepicker_wtw.php"; ?> </div> <script type="text/javascript"> $(document).ready(function() { $('#programs_selector').addClass('selected'); $('.edit_program').hide();
<th>Speaker</th> <th>Chairperson</th> <th>Prep Work</th> <th>Staff</th> </tr> <?php //loop through programs that have event participation/role (i.e. attendees without role don't count) include "../include/dbconnopen.php"; $get_programs_with_participation = "SELECT DISTINCT(Subcategory_ID) FROM Subcategory_Attendance INNER JOIN Subcategory_Dates ON Subcategory_Attendance.Subcategory_Date=Subcategory_Dates.Wright_College_Program_Date_Id WHERE Type_of_Participation IS NOT NULL " . $date_string; $programs_count = mysqli_query($cnnLSNA, $get_programs_with_participation); while ($prog = mysqli_fetch_row($programs_count)) { ?> <tr> <td class="all_projects" style="text-align:left;padding-left:20px;"><?php $subcategory = new Program(); $subcategory->load_with_program_id($prog[0]); echo $subcategory->program_name; ?> </td> <?php /*count the number of people in each role for the given campaign: */ $get_types_count = "SELECT Type_of_Participation, COUNT(*) FROM Subcategory_Attendance INNER JOIN Subcategory_Dates ON Subcategory_Attendance.Subcategory_Date=Subcategory_Dates.Wright_College_Program_Date_Id WHERE Type_of_Participation IS NOT NULL AND Subcategory_ID='" . $prog[0] . "' " . $date_string . " GROUP BY Type_of_Participation;"; $types_count = mysqli_query($cnnLSNA, $get_types_count); $td_count = 1; /*count through the role types, and make the numbers show up in the correct td. * the td_count is exactly what it sounds like. The types of participation will be returned in order in the * results, but not all of them will necessarily be represented. When one is missing, then the $types[0] won't * equal the td_count. Then extra tds need to be added (for example if a program had attendees with roles and those were all staff, * then all the preceding roles would need blank tds). The td_count is adjusted according to how many extra (blank) tds were added. */ while ($types = mysqli_fetch_row($types_count)) {
* You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ include $_SERVER['DOCUMENT_ROOT'] . "/include/dbconnopen.php"; include $_SERVER['DOCUMENT_ROOT'] . "/core/include/setup_user.php"; user_enforce_has_access($Bickerdike_id); include "../../header.php"; include "../header.php"; /* Uses a get to load the $program variable with all the information about * the given program (participants, dates). See the class file for more information * on the program class. */ $_GET['program']; include "../classes/program.php"; $program = new Program(); $program->load_with_program_id($_GET['program']); if ($_GET['schedule'] == 1) { ?> <script type="text/javascript"> $(document).ready(function() { window.location.hash = "schedule"; }); </script> <?php } ?> <script type="text/javascript"> $(document).ready(function() { $('#program_selector').addClass('selected'); $('.show_edit_space').hide();
include "../include/dbconnclose.php"; $make_program_sqlsafe = "INSERT INTO Programs (\r\n Program_Name,\r\n Program_Organization,\r\n Program_Type) VALUES(\r\n '" . $name_sqlsafe . "',\r\n '" . $org_sqlsafe . "',\r\n '" . $type_id . "'\r\n )"; include "../include/dbconnopen.php"; mysqli_query($cnnBickerdike, $make_program_sqlsafe); $id = mysqli_insert_id($cnnBickerdike); include "../include/dbconnclose.php"; } else { $make_program_sqlsafe = "INSERT INTO Programs (\r\n Program_Name,\r\n Program_Organization,\r\n Program_Type) VALUES(\r\n '" . $name_sqlsafe . "',\r\n '" . $org_sqlsafe . "',\r\n '" . $type_sqlsafe . "'\r\n )"; include "../include/dbconnopen.php"; mysqli_query($cnnBickerdike, $make_program_sqlsafe); $id = mysqli_insert_id($cnnBickerdike); include "../include/dbconnclose.php"; } include "../classes/program.php"; $program = new Program(); $program->load_with_program_id($id); $dates = $program->get_dates(); while ($date = mysqli_fetch_array($dates)) { echo $date['Program_Date'] . "<br>"; } ?> <!--<input type="text" id="first_program_date">--> <input type="button" value="Add Date" onclick=" var date=document.getElementById('first_program_date').value; if (date!=''){ $.post( '../ajax/add_new_program_date.php', { program_id: '<?php
*/ /*First checks whether the survey is pre, post, or later.*/ if ($_POST['type'] == 1) { $type = 'Pre'; } elseif ($_POST['type'] == 2) { $type = 'Post'; } elseif ($_POST['type'] == 3) { $type = '3 months later'; } /*then gets the user so that it can use his/her name in the response.*/ include "../classes/user.php"; $user = new Bickerdike_User(); $user->load_with_user_id($_POST['user']); /*then gets the program so that it can use its name in the response.*/ include "../classes/program.php"; $program = new Program(); $program->load_with_program_id($_POST['program']); /*finds surveys that match type, user, and program (if any)*/ include "../include/dbconnopen.php"; $user_sqlsafe = mysqli_real_escape_string($cnnBickerdike, $_POST['user']); $program_sqlsafe = mysqli_real_escape_string($cnnBickerdike, $_POST['program']); $type_sqlsafe = mysqli_real_escape_string($cnnBickerdike, $_POST['type']); $check_duplicate_sqlsafe = "SELECT COUNT(Participant_Survey_ID) FROM Participant_Survey_Responses WHERE User_ID='" . $user_sqlsafe . "'\r\n AND Program_ID='" . $program_sqlsafe . "' AND Pre_Post_Late='" . $type_sqlsafe . "'"; $is_duplicate = mysqli_query($cnnBickerdike, $check_duplicate_sqlsafe); $duplicate = mysqli_fetch_row($is_duplicate); /*if surveys exist that meet those conditions, issue a warning:*/ if ($duplicate[0] > 0) { echo 'A ' . $type_sqlsafe . ' survey for ' . $user->full_name . ' in program ' . $program->program_name . ' already exists. Are you sure you want to enter this survey?'; } include "../include/dbconnclose.php";