$tmp_REQUEST = $_REQUEST; if (clean_param($_REQUEST['marking_period_id'], PARAM_INT)) { $mp_id = $_REQUEST['marking_period_id']; } if (!isset($_REQUEST['marking_period_id'])) { $mp_id = UserMP(); $_REQUEST['marking_period_id'] = $mp_id; } if ($_REQUEST['modfunc'] != 'detail') { if (!isset($_REQUEST['view_mode'])) { $_REQUEST['view_mode'] = 'day_view'; } } ################################################################## $mp_RET = DBGet(DBQuery('SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,1 AS TBL FROM school_years WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,2 AS TBL FROM school_semesters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,3 AS TBL FROM school_quarters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY TBL,SORT_ORDER')); $mp = CreateSelect($mp_RET, 'marking_period_id', 'Modules.php?modname=' . $_REQUEST['modname'] . '&view_mode=' . $_REQUEST['view_mode'] . '&marking_period_id=', $_REQUEST['marking_period_id']); $view_mode = create_view_mode('Modules.php?modname=' . $_REQUEST['modname'] . '&marking_period_id=' . $_REQUEST['marking_period_id'] . '&view_mode='); ###################################################################3 $mp_id1 = $_REQUEST['marking_period_id']; switch ($_REQUEST['view_mode']) { case 'day_view': if ((User('PROFILE_ID') == 3 || User('PROFILE_ID') == 4) && $date == '') { $date = date('Y-m-d'); } $mp_sql = 'SELECT MARKING_PERIOD_ID,START_DATE,END_DATE FROM marking_periods WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND \'' . date('Y-m-d', strtotime($date)) . '\' BETWEEN START_DATE AND END_DATE'; $mp_data = DBGet(DBQuery($mp_sql)); if (count($mp_data) == 0) { $mp_sql = 'SELECT MARKING_PERIOD_ID,START_DATE,END_DATE FROM marking_periods WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\''; $mp_data = DBGet(DBQuery($mp_sql)); } DrawHeaderHome('<table width="100%" cellpadding="2" cellspacing="2"><tr><td align="left" width="175" valign="top"><table><tr><td>' . PrepareDateSchedule($date, '_date', false, array('submit' => true)) . '</td><td><INPUT type=submit class=btn_medium value=Go></td></tr></table></td><td align="left">Marking Period : ' . $mp . '</td><td align="right">Calendar View: ' . $view_mode) . '</td></tr></table>';
} else { $can_edit_RET = DBGet(DBQuery('SELECT MODNAME FROM profile_exceptions WHERE PROFILE_ID=3 AND MODNAME=\'Scheduling/Requests.php\' AND CAN_EDIT=\'Y\'')); } if ($can_edit_RET) { $_openSIS['allow_edit'] = true; } } $functions = array('COURSE' => '_makeCourse', 'WITH_TEACHER_ID' => '_makeTeacher', 'WITH_PERIOD_ID' => '_makePeriod'); $requests_RET = DBGet(DBQuery('SELECT r.REQUEST_ID,c.TITLE as COURSE,r.COURSE_ID,r.COURSE_WEIGHT,r.MARKING_PERIOD_ID,r.WITH_TEACHER_ID,r.NOT_TEACHER_ID,r.WITH_PERIOD_ID,r.NOT_PERIOD_ID FROM schedule_requests r,courses c WHERE r.COURSE_ID=c.COURSE_ID AND r.SYEAR=\'' . UserSyear() . '\' AND r.STUDENT_ID=\'' . UserStudentID() . '\''), $functions); $columns = array('COURSE' => 'Course', 'WITH_TEACHER_ID' => 'Teacher', 'WITH_PERIOD_ID' => 'Period'); //$link['add']['html'] = array('COURSE_ID'=>_makeCourse('','COURSE_ID'),'WITH_TEACHER_ID'=>_makeTeacher('','WITH_TEACHER_ID'),'WITH_PERIOD_ID'=>_makePeriod('','WITH_PERIOD_ID'),'MARKING_PERIOD_ID'=>_makeMP('','MARKING_PERIOD_ID')); $subjects_RET = DBGet(DBQuery('SELECT SUBJECT_ID,TITLE FROM course_subjects WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\'')); $subjects = CreateSelect($subjects_RET, 'subject_id', 'Select Subject', 'Modules.php?modname=' . $_REQUEST['modname'] . '&subject_id='); if ($_REQUEST['subject_id']) { $courses_RET = DBGet(DBQuery('SELECT c.COURSE_ID,c.TITLE FROM courses c WHERE ' . ($_REQUEST['subject_id'] ? 'c.SUBJECT_ID=\'' . $_REQUEST['subject_id'] . '\' AND ' : '') . 'UPPER(c.TITLE) LIKE \'' . strtoupper($_REQUEST['course_title']) . '%' . '\' AND c.SYEAR=\'' . UserSyear() . '\' AND c.SCHOOL_ID=\'' . UserSchool() . '\'')); $courses = CreateSelect($courses_RET, 'course_id', 'Select Course', 'Modules.php?modname=' . $_REQUEST['modname'] . '&subject_id=' . $_REQUEST['subject_id'] . '&course_id='); } if ($_REQUEST['course_id']) { //$periods_RET = DBGet(DBQuery("SELECT c.COURSE_PERIOD_ID,c.TITLE FROM course_periods c, course_subjects cp WHERE ".($_REQUEST['course_id']?"c.COURSE_ID='".$_REQUEST['course_id']."' AND ":'')."UPPER(c.TITLE) LIKE '".strtoupper($_REQUEST['title'])."%' AND c.SYEAR='".UserSyear()."' AND c.SCHOOL_ID='".UserSchool()."'")); //include("modules/Scheduling/RequestsReport.php"); } if (User('PROFILE') == 'admin' || User('PROFILE') == 'student' && AllowEdit() || User('PROFILE') == 'parent' && AllowEdit()) { echo '<br><br><FORM name=ad id=ad action=Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=add method=POST>'; DrawHeaderHome('Add a Request : Subject ' . $subjects . ' ' . $courses, SubmitButton('Add', '', 'class=btn_medium onclick=\'formload_ajax("ad");\'')); #echo '<small>Add a Request : </small> Subject '.$subjects.' '.$courses; #echo '<br><br><CENTER>'.SubmitButton('Add','','class=btn_medium onclick=\'formload_ajax("ad");\'').'</CENTER>'; echo '</FORM>'; $link['remove'] = array('link' => 'Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=remove', 'variables' => array('id' => 'REQUEST_ID')); //$link['remove'] = array('link'=>'"#"." onclick='check_content(\"ajax.php?modname='.$_REQUEST['modname'].'&modfunc=remove','variables'=>array('id'=>'REQUEST_ID')); echo '<br><br><FORM name=up id=up action=Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=update method=POST>'; //DrawHeaderHome('',SubmitButton('Update'));
echo '<table width=100%><tr><td>'; echo "<FORM id='search' name='search' method=POST action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . ">"; $mp_RET = DBGet(DBQuery('SELECT MARKING_PERIOD_ID,TITLE,SHORT_NAME,\'2\' FROM school_quarters WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SHORT_NAME,\'1\' FROM school_semesters WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SHORT_NAME,\'0\' FROM school_years WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY 3')); unset($options); if (count($mp_RET)) { foreach ($mp_RET as $key => $value) { if ($value['MARKING_PERIOD_ID'] == $_REQUEST['marking_period_id']) { $mp_RET[$key]['row_color'] = Preferences('HIGHLIGHT'); } } $columns = array('TITLE' => 'Marking Periods'); $link = array(); $link['TITLE']['link'] = "Modules.php?modname={$_REQUEST['modname']}"; $link['TITLE']['variables'] = array('marking_period_id' => 'MARKING_PERIOD_ID', 'mp_name' => 'SHORT_NAME'); $link['TITLE']['link'] .= "&modfunc={$_REQUEST['modfunc']}"; echo CreateSelect($mp_RET, 'marking_period_id', 'All', 'Select Term: ', 'Modules.php?modname=' . strip_tags(trim($_REQUEST['modname'])) . '&marking_period_id='); } echo '</td></tr></table>'; if (clean_param($_REQUEST['marking_period_id'], PARAM_ALPHANUM)) { $mark_name = DBGet(DBQuery('SELECT TITLE,SHORT_NAME,\'2\' FROM school_quarters WHERE MARKING_PERIOD_ID=\'' . $_REQUEST['marking_period_id'] . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' UNION SELECT TITLE,SHORT_NAME,\'1\' FROM school_semesters WHERE MARKING_PERIOD_ID=\'' . $_REQUEST['marking_period_id'] . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' UNION SELECT TITLE,SHORT_NAME,\'0\' FROM school_years WHERE MARKING_PERIOD_ID=\'' . $_REQUEST['marking_period_id'] . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY 3')); $mark_name = $mark_name[1]['SHORT_NAME']; DrawHeader('<div align="center">Report generated for ' . $mark_name . ' Term</div>'); } else { DrawHeader('<div align="center">Report generated for all Terms</div>'); } echo '</form>'; echo "<FORM name=exp id=exp action=ForExport.php?modname=" . strip_tags(trim($_REQUEST['modname'])) . "&modfunc=print&marking_period_id=" . $_REQUEST['marking_period_id'] . "&_openSIS_PDF=true&report=true method=POST target=_blank>"; echo '<table width=100%><tr><td align="center"><INPUT type=submit class=btn_medium value=\'Print\'></td></tr></table>'; echo '</form>'; PopTable('footer'); }
# published by the Free Software Foundation, version 2 of the License. # See license.txt. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # #*************************************************************************************** include '../../../RedirectIncludes.php'; if (GetTeacher(UserStaffID(), '', 'PROFILE', false) == 'teacher') { $mp_select_RET = DBGet(DBQuery('SELECT DISTINCT cp.MARKING_PERIOD_ID, (SELECT TITLE FROM marking_periods WHERE MARKING_PERIOD_ID=cp.MARKING_PERIOD_ID) AS TITLE FROM course_periods cp,courses c, school_periods sp,course_period_var cpv WHERE cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID AND cp.COURSE_ID=c.COURSE_ID AND (cp.TEACHER_ID=\'' . UserStaffID() . '\' OR cp.SECONDARY_TEACHER_ID=\'' . UserStaffID() . '\') AND cpv.PERIOD_ID=sp.PERIOD_ID AND cp.MARKING_PERIOD_ID IS NOT NULL AND cp.SYEAR=\'' . UserSyear() . '\' AND cp.SCHOOL_ID=\'' . UserSchool() . '\'')); $print_mp = CreateSelect($mp_select_RET, 'marking_period_id', 'Show All', 'Modules.php?modname=' . $_REQUEST['modname'] . '&include=' . $_REQUEST['include'] . '&category_id=' . $_REQUEST['category_id'] . '&marking_period_id='); echo '<div style="padding:10px 0px 0px 25px;"><strong>Marking Periods :</strong> ' . $print_mp . '</div>'; if (!$_REQUEST['marking_period_id']) { $schedule_RET = DBGet(DBQuery('SELECT cp.SCHEDULE_TYPE,cp.course_period_id,\'\' as ROOM,c.TITLE AS COURSE,\'\' as PERIOD,cp.COURSE_WEIGHT,IF(cp.MARKING_PERIOD_ID IS NULL ,\'Custom\',cp.MARKING_PERIOD_ID) AS MARKING_PERIOD_ID, \'\' as DAYS,\'\' AS DURATION from course_periods cp , courses c WHERE cp.course_id=c.COURSE_ID AND (cp.TEACHER_ID=\'' . UserStaffID() . '\' OR cp.SECONDARY_TEACHER_ID=\'' . UserStaffID() . '\') AND cp.SYEAR=\'' . UserSyear() . '\' AND cp.SCHOOL_ID=' . UserSchool()), array('PERIOD_ID' => 'GetPeriod', 'MARKING_PERIOD_ID' => 'GetMP_teacherschedule')); } else { if ($_REQUEST['marking_period_id']) { $sel_mp_info = DBGet(DBQuery('SELECT * FROM marking_periods WHERE MARKING_PERIOD_ID=' . $_REQUEST['marking_period_id'])); $sel_mp_info = $sel_mp_info[1]; $schedule_RET = DBGet(DBQuery('SELECT cp.SCHEDULE_TYPE,cp.course_period_id,\'\' as ROOM,\'\' as PERIOD,c.TITLE AS COURSE,cp.COURSE_WEIGHT,IF(cp.MARKING_PERIOD_ID IS NULL ,\'Custom\',cp.MARKING_PERIOD_ID) AS MARKING_PERIOD_ID, \'\' as DAYS,\'\' AS DURATION from course_periods cp , courses c WHERE cp.course_id=c.COURSE_ID AND (cp.MARKING_PERIOD_ID IN (' . GetAllMP(GetMPTable(GetMP($_REQUEST['marking_period_id'], 'TABLE')), $_REQUEST['marking_period_id']) . ') OR (cp.MARKING_PERIOD_ID IS NULL AND (cp.BEGIN_DATE BETWEEN \'' . $sel_mp_info['START_DATE'] . '\' AND \'' . $sel_mp_info['END_DATE'] . '\'))) AND (cp.TEACHER_ID=\'' . UserStaffID() . '\' OR cp.SECONDARY_TEACHER_ID=\'' . UserStaffID() . '\') AND cp.SCHOOL_ID=\'' . UserSchool() . '\' AND cp.SYEAR=' . UserSyear()), array('PERIOD_ID' => 'GetPeriod', 'MARKING_PERIOD_ID' => 'GetMP_teacherschedule')); } } foreach ($schedule_RET as $rdi => $rdd) { $get_det = DBGet(DBQuery('SELECT cpv.DAYS,cpv.COURSE_PERIOD_DATE,CONCAT(sp.START_TIME,\'' . ' to ' . '\', sp.END_TIME) AS DURATION,r.TITLE as ROOM,sp.TITLE AS PERIOD FROM course_period_var cpv,school_periods sp,rooms r WHERE sp.PERIOD_ID=cpv.PERIOD_ID AND cpv.ROOM_ID=r.ROOM_ID AND cpv.COURSE_PERIOD_ID=' . $rdd['COURSE_PERIOD_ID'])); $cp_info = DBGet(DBQuery('SELECT * FROM course_periods WHERE COURSE_PERIOD_ID=' . $rdd['COURSE_PERIOD_ID']));
echo '<table width=100%><tr><td>'; echo "<FORM id='search' name='search' method=POST action=Modules.php?modname={$_REQUEST['modname']}>"; $mp_RET = DBGet(DBQuery('SELECT MARKING_PERIOD_ID,TITLE,SHORT_NAME,\'2\' FROM school_quarters WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SHORT_NAME,\'1\' FROM school_semesters WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SHORT_NAME,\'0\' FROM school_years WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY 3')); unset($options); if (count($mp_RET)) { foreach ($mp_RET as $key => $value) { if ($value['MARKING_PERIOD_ID'] == $_REQUEST['marking_period_id']) { $mp_RET[$key]['row_color'] = Preferences('HIGHLIGHT'); } } $columns = array('TITLE' => 'Marking Periods'); $link = array(); $link['TITLE']['link'] = "Modules.php?modname={$_REQUEST['modname']}"; $link['TITLE']['variables'] = array('marking_period_id' => 'MARKING_PERIOD_ID', 'mp_name' => 'SHORT_NAME'); $link['TITLE']['link'] .= "&modfunc={$_REQUEST['modfunc']}"; echo CreateSelect($mp_RET, 'marking_period_id', 'All', 'Select Term: ', 'Modules.php?modname=' . $_REQUEST['modname'] . '&marking_period_id='); } echo '</td></tr></table>'; if (clean_param($_REQUEST['marking_period_id'], PARAM_ALPHANUM)) { $mark_name = DBGet(DBQuery('SELECT TITLE,SHORT_NAME,\'2\' FROM school_quarters WHERE MARKING_PERIOD_ID=\'' . $_REQUEST['marking_period_id'] . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' UNION SELECT TITLE,SHORT_NAME,\'1\' FROM school_semesters WHERE MARKING_PERIOD_ID=\'' . $_REQUEST['marking_period_id'] . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' UNION SELECT TITLE,SHORT_NAME,\'0\' FROM school_years WHERE MARKING_PERIOD_ID=\'' . $_REQUEST['marking_period_id'] . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY 3')); $mark_name = $mark_name[1]['SHORT_NAME']; DrawHeader('<div align="center">Report generated for ' . $mark_name . ' Term</div>'); } else { DrawHeader('<div align="center">Report generated for all Terms</div>'); } echo '</form>'; echo "<FORM name=exp id=exp action=for_export.php?modname={$_REQUEST['modname']}&modfunc=print&marking_period_id=" . $_REQUEST['marking_period_id'] . "&_openSIS_PDF=true&report=true method=POST target=_blank>"; echo '<table width=100%><tr><td align="center"><INPUT type=submit class=btn_medium value=\'Print\'></td></tr></table>'; echo '</form>'; PopTable('footer'); }
PrintCatalog($period_list, $columns, 'Course', 'Courses', '', '', array('search' => false)); echo '</td></tr></table></td></tr></table></td></tr>'; ###################################################################################################################### echo '</table></div>'; echo "<div style=\"page-break-before: always;\"></div>"; } } else { echo '<table width=100%><tr><td align=center><font color=red face=verdana size=2><strong>No Courses were found in this Grade Level</strong></font></td></tr></table>'; } } else { PopTable('header', 'Print Catalog by Grade Level', 'width=700'); echo '<table width=100%><tr><td>'; echo "<FORM id='search' name='search' method=POST action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . ">"; $grade_level_RET = DBGet(DBQuery('SELECT ID,TITLE FROM school_gradelevels WHERE school_id=\'' . UserSchool() . '\'')); if (count($grade_level_RET)) { echo CreateSelect($grade_level_RET, 'id', 'All', 'Select Grade Level: ', 'Modules.php?modname=' . strip_tags(trim($_REQUEST['modname'])) . '&id='); } echo '</td></tr></table>'; if (clean_param($_REQUEST['id'], PARAM_ALPHANUM)) { $grade_level_RET = DBGet(DBQuery('SELECT TITLE FROM school_gradelevels WHERE id=\'' . $_REQUEST['id'] . '\'')); $grade_title = $grade_level_RET[1]['TITLE']; DrawHeader('<div align="center">Report generated for ' . $grade_title . ' Grade Level</div>'); } else { DrawHeader('<div align="center">Report generated for all Grade Levels</div>'); } echo '</form>'; echo "<FORM name=exp id=exp action=ForExport.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&modfunc=print&id=" . $_REQUEST['id'] . "&_openSIS_PDF=true&report=true method=POST target=_blank>"; echo '<table width=100%><tr><td align="center"><INPUT type=submit class=btn_medium value=\'Print\'></td></tr></table>'; echo '</form>'; PopTable('footer'); }
if ($_REQUEST['course_id']) { foreach ($courses_RET as $key => $value) { if ($value['COURSE_ID'] == $_REQUEST['course_id']) { $courses_RET[$key]['row_color'] = Preferences('HIGHLIGHT'); } } } echo '<TD valign=top>'; $columns = array('TITLE' => 'Course'); $link = array(); $link['TITLE']['link'] = "Modules.php?modname={$_REQUEST['modname']}&marking_period_id={$_REQUEST['marking_period_id']}&mp_name={$_REQUEST['mp_name']}&subject_id={$_REQUEST['subject_id']}"; $link['TITLE']['variables'] = array('course_id' => 'COURSE_ID'); $link['TITLE']['link'] .= "&modfunc={$_REQUEST['modfunc']}"; //ListOutputMod($courses_RET,$columns,'Course','Courses',$link,array(),$LO_options); if ($_REQUEST['print'] != 'list') { echo CreateSelect($courses_RET, 'course_id', 'All', 'Select Course: ', 'Modules.php?modname=' . $_REQUEST['modname'] . '&marking_period_id=' . $_REQUEST['marking_period_id'] . '&subject_id=' . $_REQUEST['subject_id'] . '&course_id='); } echo '</TD></tr>'; } //If subject } //if(count($degree_level_RET)) } } } else { echo "<tr><td><br><br><b>No Class List Found</b></td>"; } echo '</TR></TABLE></form>'; echo "<br><br><br>"; /*echo "<div style='width:700px; text-align:center;' align=center > <input type=button class=btn_medium value='Print' onclick='window.open(\"for_export.php?modname=".$_REQUEST['modname']."&subject_id=$_REQUEST[subject_id]&course_id=$_REQUEST[course_id]&marking_period_id=$_REQUEST[marking_period_id]&mp_name=$_REQUEST[mp_name]&course_weight=$_REQUEST[course_weight]&draw_header=Class+List&modfunc=choose_course&create_pdf=true&_openSIS_PDF=true\",\"\",\"scrollbars=yes,resizable=yes,width=820,height=700\");'></div>";*/
include "{$ruta_raiz}/radicacion/crea_combos_universales.php"; $ArrayUpdate = arrayToJsArray($depArray, "ImpDeps"); //$ArrayUpdate.= "</script>"; $script = "<script type='text/javascript'>\n \$('select[name=\"ImpUsrAsDep\"]').change(function(){\n PostImpDep(\"Del\",\$('select[name=\"ImpUsrAsDep\"]').val());\n });\n \$('select[name=\"ImpDepHab\"]').change(function(){\n PostImpDep(\"Add\",\$('select[name=\"ImpDepHab\"]').val());\n });\n {$ArrayUpdate}\n </script>"; echo $UsrAux->select . $script; $FunctReload = "<script type=\"text/javascript\" src=\"FunctionsValidar.js\"></script>"; //echo $FunctReload; } if ($_POST['Act'] == 'Add') { echo CreateSelect($_POST['ImpDeps'], $db); //$UsrAux = new ImpUsrClass($db); //$UsrAux->ImpUsrAdd($_POST['UsuaDoc'], $_POST['Dep']); //echo (" Hola "); } if ($_POST['Act'] == 'Del') { echo CreateSelect($_POST['ImpDeps'], $db); //$UsrAux = new ImpUsrClass($db); //$UsrAux->ImpUsrDel($_POST['UsuaDoc'], $_POST['Dep'][0]); //echo (" Hola "); } if ($_POST['Def']) { $UsrAux = new ImpUsrClass($db); $UsrAux->ImpDelAllDeps($_POST['UsuaDoc']); $UsrAux->ImpUsrFill($_POST['UsuaDoc']); foreach ($_POST['ImpDeps'] as $dep) { $UsrAux->ImpUsrAdd($_POST['UsuaDoc'], $dep); } echo " Hola "; } function CreateSelect($depArray, $db) {
PrintCatalog($period_list, $columns, 'Course', 'Courses', '', '', array('search' => false)); echo '</td></tr></table></td></tr></table></td></tr>'; ###################################################################################################################### echo '</table></div>'; echo "<div style=\"page-break-before: always;\"></div>"; } } else { echo '<table width=100%><tr><td align=center><font color=red face=verdana size=2><strong>No Courses were found in this Grade Level</strong></font></td></tr></table>'; } } else { PopTable('header', 'Print Catalog by Grade Level', 'width=700'); echo '<table width=100%><tr><td>'; echo "<FORM id='search' name='search' method=POST action=Modules.php?modname={$_REQUEST['modname']}>"; $grade_level_RET = DBGet(DBQuery('SELECT ID,TITLE FROM school_gradelevels WHERE school_id=\'' . UserSchool() . '\'')); if (count($grade_level_RET)) { echo CreateSelect($grade_level_RET, 'id', 'All', 'Select Grade Level: ', 'Modules.php?modname=' . $_REQUEST['modname'] . '&id='); } echo '</td></tr></table>'; if (clean_param($_REQUEST['id'], PARAM_ALPHANUM)) { $grade_level_RET = DBGet(DBQuery('SELECT TITLE FROM school_gradelevels WHERE id=\'' . $_REQUEST['id'] . '\'')); $grade_title = $grade_level_RET[1]['TITLE']; DrawHeader('<div align="center">Report generated for ' . $grade_title . ' Grade Level</div>'); } else { DrawHeader('<div align="center">Report generated for all Grade Levels</div>'); } echo '</form>'; echo "<FORM name=exp id=exp action=for_export.php?modname={$_REQUEST['modname']}&modfunc=print&id=" . $_REQUEST['id'] . "&_openSIS_PDF=true&report=true method=POST target=_blank>"; echo '<table width=100%><tr><td align="center"><INPUT type=submit class=btn_medium value=\'Print\'></td></tr></table>'; echo '</form>'; PopTable('footer'); }
PrintCatalog($period_list, $columns, _('Course'), _('Courses'), '', '', array('search' => false)); echo '</td></tr></table></td></tr></table></td></tr>'; ###################################################################################################################### echo '</table></div>'; echo "<meta charset='UTF-8'><div style=\"page-break-before: always;\"></div>"; } } else { echo '<table width=100%><tr><td align=center><font color=red face=verdana size=2><strong>' . _('No Courses were found in this Grade Level') . '</strong></font></td></tr></table>'; } } else { PopTable('header', '' . _('Print') . _(' ') . _('Catalog') . _(' ') . _('by') . _(' ') . _('Grade Level') . '', 'width=700'); echo '<table width=100%><tr><td>'; echo "<FORM id='search' name='search' method=POST action=Modules.php?modname={$_REQUEST['modname']}>"; $grade_level_RET = DBGet(DBQuery('SELECT ID,TITLE FROM school_gradelevels WHERE school_id=\'' . UserSchool() . '\'')); if (count($grade_level_RET)) { echo CreateSelect($grade_level_RET, 'id', '' . _('All') . '', '' . _('Select ') . '' . _('Grade Level') . ':', 'Modules.php?modname=' . $_REQUEST['modname'] . '&id='); } echo '</td></tr></table>'; if (clean_param($_REQUEST['id'], PARAM_ALPHANUM)) { $grade_level_RET = DBGet(DBQuery('SELECT TITLE FROM school_gradelevels WHERE id=\'' . $_REQUEST['id'] . '\'')); $grade_title = $grade_level_RET[1]['TITLE']; DrawHeader('<div align="center">' . _('Report generated for ') . '' . _($grade_title) . ' ' . _('Grade Level') . '</div>'); } else { DrawHeader('<div align="center">' . _('Report generated for all ') . '' . _('Grade Levels') . '</div>'); } echo '</form>'; echo "<FORM name=exp id=exp action=for_export.php?modname={$_REQUEST['modname']}&modfunc=print&id=" . $_REQUEST['id'] . "&_openSIS_PDF=true&report=true method=POST target=_blank>"; echo '<table width=100%><tr><td align="center"><INPUT type=submit class=btn_medium value=\'' . _('Print') . '\'></td></tr></table>'; echo '</form>'; PopTable('footer'); }
} include "{$ruta_raiz}/radicacion/crea_combos_universales.php"; $ArrayUpdate = arrayToJsArray($depArray, "SuperDeps"); $script = "<script type='text/javascript'>\n \$('select[name=\"UsrAsDep\"]').change(function(){\n PostSecDep(\"Del\",\$('select[name=\"UsrAsDep\"]').val());\n });\n \$('select[name=\"DepHab\"]').change(function(){\n PostSecDep(\"Add\",\$('select[name=\"DepHab\"]').val());\n });\n {$ArrayUpdate}\n </script>"; echo $UsrAux->select . $script; $FunctReload = "<script type=\"text/javascript\" src=\"FunctionsValidar.js\"></script>"; //echo $FunctReload; } if ($_POST['Act'] == 'Add') { echo CreateSelect($_POST['SuperDeps'], $db); //$UsrAux = new SecSuperClass($db); //$UsrAux->SecSuperAdd($_POST['UsuaDoc'], $_POST['Dep']); //echo (" Hola "); } if ($_POST['Act'] == 'Del') { echo CreateSelect($_POST['SuperDeps'], $db); //$UsrAux = new SecSuperClass($db); //$UsrAux->SecSuperDel($_POST['UsuaDoc'], $_POST['Dep'][0]); //echo (" Hola "); } if ($_POST['Def']) { $UsrAux = new SecSuperClass($db); $UsrAux->SecDelAllDeps($_POST['UsuaDoc']); foreach ($_POST['SuperDeps'] as $dep) { $UsrAux->SecSuperAdd($_POST['UsuaDoc'], $dep); } echo " Hola "; } function CreateSelect($depArray, $db) { $sql = " select depe_codi,depe_nomb from dependencia order by depe_codi ";
foreach ($factoryList as $factory) { if ($selectedVal = $factory) { $htmlString .= "<option selected value='" . $factory . "'>" . $factory . "</option>"; } else { $htmlString .= "<option value='" . $factory . "'>" . $factory . "</option>"; } } $htmlString .= "</select>"; return $htmlString; } ?> <html> <body> <form enctype="multipart/form-data" action="import.php" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="200000000" /> <table width="600"> <tr> <td>File:</td> <td><input type="file" name="file"/></td> <td>Factory:</td> <td><?php echo CreateSelect($factoryList, "factory"); ?> </td> <td><input type="submit" value="Upload"></td> </tr> </table> </form> </body> </html>