当前位置: 首页>>代码示例>>PHP>>正文


PHP Program::load_with_program_id方法代码示例

本文整理汇总了PHP中Program::load_with_program_id方法的典型用法代码示例。如果您正苦于以下问题:PHP Program::load_with_program_id方法的具体用法?PHP Program::load_with_program_id怎么用?PHP Program::load_with_program_id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Program的用法示例。


在下文中一共展示了Program::load_with_program_id方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Program

 *   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');
开发者ID:CompanyOnTheWorld,项目名称:lisc-ttm,代码行数:31,代码来源:new_program_survey.php

示例2: Program

 *   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();
开发者ID:CompanyOnTheWorld,项目名称:lisc-ttm,代码行数:31,代码来源:profile.php

示例3: DISTINCT

            <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)) {
开发者ID:CompanyOnTheWorld,项目名称:lisc-ttm,代码行数:31,代码来源:participant_roles.php

示例4: Program

 *   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();
开发者ID:CompanyOnTheWorld,项目名称:lisc-ttm,代码行数:31,代码来源:program_profile.php

示例5: Programs

    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 
开发者ID:CompanyOnTheWorld,项目名称:lisc-ttm,代码行数:31,代码来源:create_program.php

示例6: elseif

 */
/*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";
开发者ID:CompanyOnTheWorld,项目名称:lisc-ttm,代码行数:31,代码来源:survey_duplicate_check.php


注:本文中的Program::load_with_program_id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。