public function testEducation()
 {
     $education = new education();
     $education->setCategory("College");
     $education->setSchool("ICEHS");
     $education->setYrGrad("2012");
     echo "\n" . $education->getCategory() . "\n";
     echo $education->getSchool() . "\n";
     echo $education->getYrGrad() . "\n";
     $this->assertTrue(true);
 }
 function _education() {
 //
 // main submodule for education
 // calls form_education()
 //       display_education()
 //       process_education()
 //
     // always check dependencies
     if ($exitinfo = $this->missing_dependencies('education')) {
         return print($exitinfo);
     }
     if (func_num_args()>0) {
         $arg_list = func_get_args();
         $menu_id = $arg_list[0];
         $post_vars = $arg_list[1];
         $get_vars = $arg_list[2];
         $validuser = $arg_list[3];
         $isadmin = $arg_list[4];
         //print_r($arg_list);
     }
     $e = new education;
     if ($post_vars["submiteducation"]) {
         $e->process_education($menu_id, $post_vars, $get_vars);
     }
     $e->display_education($menu_id, $post_vars, $get_vars);
     $e->form_education($menu_id, $post_vars, $get_vars);
 }
Beispiel #3
0
<?php

$noSession = 1;
require_once "../../../../../class/autoload.inc";
$webroot = "../../../..";
//    $_SESSION['dept_id']=4;
$dep = new department();
$st_depart = $dep->getAll();
// $st_depart[-1] = "无";
$edu = new education();
$st_edu = $edu->getAll();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  xml:lang="zh-CN" lang="zh-CN">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Account Registration</title>
        
        <link href="../../../../css/StuReg.css" rel="stylesheet" type="text/css" />
        <script src="<?php 
echo $webroot . '/jquery-ui/js/jquery-1.9.1.js';
?>
"></script>
        <script src="<?php 
echo $webroot . '/jquery-ui/js/jquery-ui-1.10.1.custom.js';
?>
"></script>
        <script type="text/javascript" src="../../../../js/StuReg.js"></script>
        <link rel="stylesheet" href="<?php 
echo $webroot . '/jquery-ui/development-bundle/themes/black-tie/jquery-ui.css';
?>
 function display_ccdev_firstvisit()
 {
     if (func_num_args() > 0) {
         $arg_list = func_get_args();
         $menu_id = $arg_list[0];
         $post_vars = $arg_list[1];
         $get_vars = $arg_list[2];
         $validuser = $arg_list[3];
         $isadmin = $arg_list[4];
         //print_r($arg_list);
     }
     print "<b>" . FTITLE_FIRST_VISIT_DATA . "</b><br/><br/>";
     $patient_id = healthcenter::get_patient_id($get_vars["consult_id"]);
     $sql = "select ccdev_id, patient_id, " . "mother_name, mother_educ_id, mother_occup_id, " . "father_name, father_educ_id, father_occup_id, " . "date_format(ccdev_timestamp, '%a %d %b %Y, %h:%i%p'), ccdev_dob, " . "birth_weight, delivery_location,date_format(date_registered,'%a %d %b %Y') actual_serv_date " . "from m_patient_ccdev where patient_id = '{$patient_id}'";
     $result = mysql_query($sql) or die(mysql_error());
     if ($result) {
         if (mysql_num_rows($result)) {
             list($cid, $pid, $mname, $meduc, $moccup, $fname, $feduc, $foccup, $ts, $dob, $bw, $loc, $actual_serv_date) = mysql_fetch_array($result);
             print "<table cellpadding='3' style='border: 1px dashed black'><tr><td>";
             print "<form method='post' action='" . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"] . "&consult_id=" . $get_vars["consult_id"] . "&ptmenu=" . $get_vars["ptmenu"] . "&module=" . $get_vars["module"] . "&ccdev=" . $get_vars["ccdev"] . "#visit'>";
             print "REGISTRY ID: <b>" . module::pad_zero($cid, 7) . "</b><br/>";
             print "DATE: <b>{$actual_serv_date}</b><br/><br/>";
             print "MOTHER: {$mname}<br/>";
             print "Education: " . education::get_education_name($meduc) . "<br/>";
             print "Occupation: " . occupation::get_occupation_name($moccup) . "<br/><br/>";
             print "FATHER: {$fname}<br/>";
             print "Education: " . education::get_education_name($feduc) . "<br/>";
             print "Occupation: " . occupation::get_occupation_name($foccup) . "<br/><br/>";
             print "DELIVERY LOCATION: {$loc}<br/>";
             print "BIRTH WEIGHT: {$bw} KG<br/><br/>";
             if ($_SESSION["priv_update"]) {
                 print "<input type='hidden' name='ccdev_id' value='{$cid}'/>";
                 print "<input type='submit' name='submitccdev' value='Update Visit Data' class='tinylight' style='border: 1px solid black'/>";
             }
             print "</form>";
             print "</td></tr></table><br/>";
         }
     }
 }
Beispiel #5
0
	}
}
if (file_exists('../modules/drug/class.drug.php')) {
	include '../modules/drug/class.drug.php';
	$drug = new drug;
	if (!$module->activated('drug') && $initmod) {
		$drug->init_sql();
		$drug->init_menu();
		$drug->init_deps();
		$drug->init_lang();
		$drug->init_help();
	}
}
if (file_exists('../modules/education/class.education.php')) {
	include '../modules/education/class.education.php';
	$education = new education;
	if (!$module->activated('education') && $initmod) {
		$education->init_sql();
		$education->init_menu();
		$education->init_deps();
		$education->init_lang();
		$education->init_help();
	}
}
if (file_exists('../modules/epi_report/class.epi_report.php')) {
	include '../modules/epi_report/class.epi_report.php';
	$epi_report = new epi_report;
	if (!$module->activated('epi_report') && $initmod) {
		$epi_report->init_sql();
		$epi_report->init_menu();
		$epi_report->init_deps();
    public function main()
    {
        ?>
		<div id="main">
			<div id="reports-new">
				<div class="ui error form segment square-corners no-shadow">
					<div class="three fields">
						<div class="field">
							<label>Год набора</label>
							<input id="year" name="year" placeholder="<?php 
        echo date::year();
        ?>
" type="text" value="<?php 
        echo $this->report->year;
        ?>
">
						</div>

						<div class="field">
							<label>Срок обучения (лет)</label>
							<input id="duration" name="duration" placeholder="4" type="text" value="<?php 
        echo $this->report->duration;
        ?>
" onchange="calendar.update();">
						</div>

						<div class="field">
							<label>ФИО ректора</label>
							<input id="rector" name="rector" placeholder="М.П. Батура" type="text" value="<?php 
        echo $this->report->rector;
        ?>
">
						</div>
					</div>

					<div class="field">
						<label>Регистрационный номер учебного плана</label>
						<input id="registration_number" name="registration_number" placeholder="2014.09.20/000" type="text" value="<?php 
        echo $this->report->registration_number;
        ?>
">
					</div>

					<div class="field">
						<div class="ui fluid selection dropdown">
							<div class="default text">Форма обучения</div>
							<i class="dropdown icon"></i>
							<input type="hidden" id="training_form_id" name="training_form_id" value="<?php 
        echo $this->report->training_form_id;
        ?>
">
							<div class="menu">
								<?php 
        $training_forms = training_forms::get();
        if ($training_forms) {
            foreach ($training_forms as $training_form) {
                ?>
											<div class="item" data-value="<?php 
                echo $training_form->id;
                ?>
"><?php 
                echo html::escape($training_form->name);
                ?>
</div>
											<?php 
            }
        }
        ?>
							</div>
						</div>
					</div>

					<div class="field">
						<div class="ui fluid selection dropdown">
							<div class="default text">Квалификация специалиста</div>
							<i class="dropdown icon"></i>
							<input type="hidden" id="qualification_id" name="qualification_id" value="<?php 
        echo $this->report->qualification_id;
        ?>
">
							<div class="menu">
								<?php 
        $qualifications = qualifications::get();
        if ($qualifications) {
            foreach ($qualifications as $qualification) {
                ?>
											<div class="item" data-value="<?php 
                echo $qualification->id;
                ?>
"><?php 
                echo html::escape($qualification->name);
                ?>
</div>
											<?php 
            }
        }
        ?>
							</div>
						</div>
					</div>

					<div class="field">
						<div class="ui fluid selection dropdown">
							<div class="default text">Специальность</div>
							<i class="dropdown icon"></i>
							<input type="hidden" id="specialty_id" name="specialty_id" value="<?php 
        echo $this->report->specialty_id;
        ?>
">
							<div class="menu">
								<?php 
        $specialties = specialties::get();
        if ($specialties) {
            foreach ($specialties as $specialty) {
                ?>
											<div class="item" data-value="<?php 
                echo $specialty->id;
                ?>
"><?php 
                echo html::escape($specialty->name);
                ?>
</div>
											<?php 
            }
        }
        ?>
							</div>
						</div>
					</div>

					<div class="field">
						<div class="ui fluid selection dropdown">
							<div class="default text">Специализация</div>
							<i class="dropdown icon"></i>
							<input type="hidden" id="specialization_id" name="specialization_id" value="<?php 
        echo $this->report->specialization_id;
        ?>
">
							<div class="menu">
								<?php 
        $specializations = specializations::get();
        if ($specializations) {
            foreach ($specializations as $specialization) {
                ?>
											<div class="item" data-value="<?php 
                echo $specialization->id;
                ?>
"><?php 
                echo html::escape($specialization->name);
                ?>
</div>
											<?php 
            }
        }
        ?>
							</div>
						</div>
					</div>

					<div class="field width50">
						<label>Учебная практика</label>
						<textarea id="study_practice" name="study_practice"><?php 
        echo $this->report->study_practice;
        ?>
</textarea>
					</div>

					<div class="field width50">
						<label>Производственная практика</label>
						<textarea id="manufact_practice" name="manufact_practice"><?php 
        echo $this->report->manufact_practice;
        ?>
</textarea>
					</div>

					<div class="field width50">
						<label>Дипломные проекты или дипломные работы</label>
						<input id="grad_work" name="grad_work" type="text" value="<?php 
        echo $this->report->grad_work;
        ?>
">
					</div>

					<div class="field width50">
						<label>Государственный экзамен</label>
						<input id="gos_exam" name="gos_exam" type="text" value="<?php 
        echo $this->report->gos_exam;
        ?>
">
					</div>

					<div id="education-list">
						<div class="ui form">

						</div>

						<ul id="education-ul">
							<?php 
        $educations = education::get_by_report(get('report_id'));
        ?>
							<?php 
        foreach ($educations as $education) {
            ?>
								<li class="disciplines" data-id="<?php 
            echo $education->id;
            ?>
">
									<div class="actions">
										<div class="ui button red tiny" onclick=" remove_education(this,<?php 
            echo $education->id;
            ?>
);buttons.update();">Удалить</div>
										<div class="ui button blue tiny" onclick="education.filler.popup(education.filler.get(this),education.filler.getdata(this),education.filler.getid(this),<?php 
            echo get('report_id');
            ?>
,<?php 
            echo $education->id;
            ?>
);">Заполнить</div>
									</div>
									<div class="base" onclick="$(this).parent('li').find('.tip').toggle('slow'); $(this).find('i.icon.triangle').toggleClass('down').toggleClass('right')">
										<i class="icon triangle down"></i>
										<span class="description"><?php 
            echo $education->name;
            ?>
</span>
									</div>
									<div class="tip">
										<ul>
											<?php 
            $educations_items = education_items::get_by_order($education->id);
            ?>
											<?php 
            foreach ($educations_items as $item) {
                $values = education_items_values::get_by_education_item_id($item->id);
                ?>
													<li data-order="<?php 
                echo $item->order_num;
                ?>
" data-type="undefined" data-name="<?php 
                echo $item->name;
                ?>
" data-id="<?php 
                echo $item->id;
                ?>
"
														data-values="<?php 
                for ($i = 1; $i < 40; $i++) {
                    foreach ($values as $value) {
                        if ($value->col_num == $i) {
                            echo $value->value;
                        }
                    }
                    echo ',';
                }
                ?>
"
														draggable="true"><?php 
                mb_strlen($item->name) > 96 ? $tmp = mb_substr($item->name, 0, 96, 'utf-8') . '...' : ($tmp = $item->name);
                echo $tmp;
                ?>
														<i class="icon remove circle" style="float: right" onclick="delete_item_discipline(this,<?php 
                echo $item->id;
                ?>
)" title="Удалить"></i>
														<i class="icon angle up" onclick="education.tip.move.up(this);"></i>
														<i class="icon angle down" onclick="education.tip.move.down(this);"></i>
														<div class="ui checkbox" style="float: right" data-content="Дисциплина по выбору">
															<input type="checkbox" class="popup" <?php 
                if ($item->is_optional == '1') {
                    echo "checked='checked'";
                }
                ?>
>
															<label></label>
														</div>
														</li>
												<?php 
            }
            ?>
										</ul>
										<div class="ui search selection dropdown" onclick="">
											<input type="hidden" name="selected">
											<div class="default text" onclick="$(this).html('')" onkeyup="education.hint.init(this)" contenteditable="true">Выберите наименование</div>
											<i class="dropdown icon"></i>
											<div class="menu">
												<?php 
            $disciplines = disciplines::get();
            foreach ($disciplines as $discipline) {
                ?>
													<div class="item" data-type="discipline" data-name="<?php 
                echo $discipline->name;
                ?>
"
														 data-id="<?php 
                echo $discipline->id;
                ?>
"><?php 
                echo $discipline->name;
                ?>
													</div>
												<?php 
            }
            ?>

												<?php 
            $directions = directions::get();
            foreach ($directions as $direction) {
                ?>
													<div class="item" data-type="direction" data-name="<?php 
                echo $direction->name;
                ?>
"
														 data-id="<?php 
                echo $direction->id;
                ?>
"><?php 
                echo $direction->name;
                ?>
													</div>
												<?php 
            }
            ?>

											</div>
										</div>

										<div class="item ui button green" onclick="add_education_item(<?php 
            echo $education->id;
            ?>
,this)">добавить</div>
									</div>
								</li>
							<?php 
        }
        ?>
						</ul>
					</div>

					<script>
						$('.ui.checkbox').popup({ on: 'hover' });


						function add_education_item(education_id,selector){

							if ($(selector).parent('div').find('.text').hasClass('default'))
							{
								alert('Выберите название предмета из выпадающего списка.');

								return;
							}


							var order = $(".tip li").length+1;
							var name = $(selector).closest('.tip').find('.item.active').attr('data-name');
							var report_id = <?php 
        echo get('report_id');
        ?>
;
							$.post('/?page=reports-edit&task=add_education_item&report_id='+report_id+'&name='+name+'&education_id='+education_id+'&order='+order+'&ajax=true')
								.done(function(id) { education.tip.add(selector,id)});
						}
						function delete_item_discipline(selector,id){
							var report_id = <?php 
        echo get('report_id');
        ?>
;
							$.post('/?page=reports-edit&task=delete_item_discipline&report_id='+report_id+'&id='+id+'&ajax=true')
								.done(function() { $(selector).parent().remove();});
						}
						function remove_education(selector,id){
							var report_id = <?php 
        echo get('report_id');
        ?>
;
							$.post('/?page=reports-edit&task=remove_education&report_id='+report_id+'&id='+id+'&ajax=true')
								.done(function() { $(selector).closest('li').fadeToggle('slow', function() { $(selector).closest('li').remove();  } )});
						}
						<?php 
        $disciplines = disciplines::get();
        $directions = directions::get();
        $database = null;
        if ($disciplines) {
            foreach ($disciplines as $discipline) {
                $database .= '["discipline", "' . html::escape($discipline->name) . '", ' . $discipline->id . '],';
            }
            $database = char::remove_last($database);
        }
        if ($directions) {
            if ($database) {
                $database .= ',';
            }
            foreach ($directions as $direction) {
                $database .= '["direction", "' . $direction->name . '", ' . $direction->id . '],';
            }
            $database = char::remove_last($database);
        }
        ?>

						var database = [<?php 
        echo $database;
        ?>
];

						$(function() {
							education.disciplines.set(database);
						});
					</script>


					<?php 
        //						$calendar = new ajax_calendar();
        //						$calendar->html();
        ?>

					<div class="ui green submit button small" onclick="update();">Сохранить</div>
					<a href="#" target="_blank" id="button-preview" class="ui blue submit button small" onclick="save(1); return false;">Предпросмотр</a>
					<a href="#" target="_blank" id="button-popup" class="ui blue submit button small" onclick="calendar.popup(); return false;">Календарь</a>
					<a href="#" target="_blank" id="button-education" class="ui blue submit button small" onclick="$('#education').modal('show'); return false;">Добавить цикл</a>

					<div id="education" class="ui modal large">
						<div class="ui form segment">
							<div class="field">
								<label>Наименование цикла</label>
								<input class="education-new" type="text" placeholder="Цикл социально-гуманитарных дисциплин">
							</div>

							<a href="#" class="ui blue submit button small" onclick="
							var name = $('.education-new').val();
							$('.education-new').val('');
							var report_id = <?php 
        echo get('report_id');
        ?>
;
							$.post('/?page=reports-edit&task=add_education&report_id='+report_id+'&name='+name+'&ajax=true')
								.done(function(data) { $('#education').modal('hide');
								education.add(name,data,report_id);
								/*rude.redirect('/?page=reports-edit&report_id='+report_id);*/ }); return false;
							">Добавить</a>
						</div>
					</div>

					<?php 
        static::filler();
        ?>

					<?php 
        static::calendar();
        ?>

				</div>
			</div>
		</div>
		<?php 
    }
function Step_3()
{
    $dep = new department();
    $st_depart = $dep->getAll();
    $st_depart[-1] = "无";
    $edu = new education();
    $st_edu = $edu->getAll();
    $html = '<div class="blank_cell">
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_edu" id="st_edu_label">在读学历</label>             	
                            </div> 
                        </div>
                        <div class="input_blank"><select id="st_edu" name="st_edu">';
    foreach ($st_edu as $key => $value) {
        $html .= '<option value="' . $key . '">' . $value . '</option>';
    }
    $html .= '</select></div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_depart" id="st_depart_label">学院</label>             	
                            </div> 
                        </div>
                        <div class="input_blank"><select id="st_depart" name="id_depart">';
    foreach ($st_depart as $key => $value) {
        $html .= '<option value="' . $key . '">' . $value . '</option>';
    }
    $html .= '</select></div>
                    </div>

                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_major_label">专业</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_major">
                            </select>
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_class_label">班级</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_class">

                            </select>
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_grade_label">入学年份</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_grade">

                            </select>
                        </div>
                    </div>
             <div class="alert_blank">       
                <div id="st_edu_aten" class="aten_style  gray">
                    选择当前在读学历
                </div>
                
                <div id="st_depart_aten" class="aten_style  gray">
                    Please select your department, if there is none, please contact the administrators!
                </div>
                <div id="st_major_aten" class="aten_style  gray">
                    选择学院后,专业会自动弹出,若网速慢,请稍作等待。
                    Please select your major, if there is none, please contact the administrators!
                </div>
                <div id="st_class_aten" class="aten_style  gray">
                    选择专业后,班级会自动弹出,若网速慢,请稍作等待。
                    Please select your class, if there is none, please contact the administrators!
                </div>
                <div id="st_grade_aten" class="aten_style  gray">
                </div>
             </div>
    <div id="submit_part">
            <a  id="submit_bt"  href="javascript:void(0);"></a>
        </div>
';
    return $html;
}
function Step_2()
{
    $dep = new department();
    $st_depart = $dep->getAll();
    $st_depart[-1] = "无";
    $edu = new education();
    $st_edu = $edu->getAll();
    $html = '<div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_name" id="st_name_label">姓名</label>             	
                            </div> 
                        </div>
                        <div class="input_blank input_blank_de">
                            <input type="text" id="st_name" />
                        </div>
                    </div>

                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label  id="st_birth_label">出生年月</label>             	
                            </div> 
                        </div>
                        <div class="input_blank input_blank_de">
                            <input type="text" id="datepicker" />
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_No" id="st_No_label">学号</label>             	
                            </div> 
                        </div>
                        <div class="input_blank input_blank_de">
                            <input type="text" id="st_No" />
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_mail" id="st_mail_label">邮箱</label>             	
                            </div> 
                        </div>
                        <div class="input_blank input_blank_de">
                            <input type="text" id="st_mail" />
                        </div>
                    </div>
                    
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_edu" id="st_edu_label">在读学历</label>             	
                            </div> 
                        </div>
                        <div class="input_blank"><select id="st_edu" name="st_edu">';
    foreach ($st_edu as $key => $value) {
        $html .= '<option value="' . $key . '">' . $value . '</option>';
    }
    $html .= '</select></div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_depart" id="st_depart_label">学院</label>             	
                            </div> 
                        </div>
                        <div class="input_blank"><select id="st_depart" name="id_depart">';
    $html .= '<option value="-1">无</option>';
    foreach ($st_depart as $key => $value) {
        $html .= '<option value="' . $key . '">' . $value . '</option>';
    }
    $html .= '</select></div>
                    </div>

                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_major_label">专业</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_major">
                            </select>
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_class_label">班级</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_class">

                            </select>
                        </div>
                    </div>
                    <div class="blank_cell">
                        <div class="label_title">
                            <div class="label_aten">
                                <label for="st_class" id="st_grade_label">入学年份</label>             	
                            </div> 
                        </div>
                        <div class="input_blank ">
                            <select id="st_grade">

                            </select>
                        </div>
                    </div>
    <div id="submit_part">
            <a  id="submit_bt"  href="javascript:void(0);"></a>
        </div>';
    return $html;
}