コード例 #1
0
ファイル: auth-function.php プロジェクト: parkerj/eduTrac-SIS
/**
 * Checks if a visitor is logged in or not.
 * 
 * @since 6.2.10
 * @return boolean
 */
function is_user_logged_in()
{
    $person = get_person_by('personID', get_persondata('personID'));
    if ('' != $person->personID) {
        return true;
    }
    return false;
}
コード例 #2
0
ファイル: index.router.php プロジェクト: parkerj/eduTrac-SIS
    $file3 = $app->config('cookies.savepath') . 'cookies.' . $vars3['data'];
    if (file_exists($file3)) {
        unlink($file3);
    }
    $app->cookies->remove("SWITCH_USERNAME");
    /**
     * After the login as user cookies have been
     * removed from the server and the browser,
     * we need to set fresh cookies for the
     * original logged in user.
     */
    if (isset($_COOKIE['ET_REMEMBER']) && $app->cookies->getSecureCookie('ET_REMEMBER') === 'rememberme') {
        $app->cookies->setSecureCookie('ET_COOKNAME', $id, _h(get_option('cookieexpire')) !== '' ? _h(get_option('cookieexpire')) : $app->config('cookie.lifetime'));
    } else {
        $app->cookies->setSecureCookie('ET_COOKNAME', $id, $app->config('cookie.lifetime') !== '' ? $app->config('cookie.lifetime') : 86400);
    }
    redirect(get_base_url() . 'dashboard' . '/');
});
$app->get('/logout/', function () {
    etsis_logger_activity_log_write('Authentication', 'Logout', get_name(get_persondata('personID')), get_persondata('uname'));
    /**
     * This function is documented in app/functions/auth-function.php.
     * 
     * @since 6.2.0
     */
    etsis_clear_auth_cookie();
    redirect(get_base_url() . 'login' . '/');
});
$app->setError(function () use($app) {
    $app->view->display('error/404', ['title' => '404 Error']);
});
コード例 #3
0
ファイル: jobs.php プロジェクト: parkerj/eduTrac-SIS
	                        <input class="form-control" type="text" name="weekly_hours" id="weekly_hours" />
		                </div>
		            </div>
		            <!-- // Group END -->
		           	</div>
		           	</div>
				</div>
				<!-- // Modal body END -->
				<!-- Modal footer -->
				<div class="modal-footer">
					<input type="hidden" name="addDate" value="<?php 
echo date('Y-m-d');
?>
" />
                    <input type="hidden" name="addedBy" value="<?php 
echo get_persondata('personID');
?>
" />
		        	<button type="submit" class="btn btn-default"><?php 
echo _t('Submit');
?>
</button>
					<a href="#" class="btn btn-primary" data-dismiss="modal"><?php 
echo _t('Cancel');
?>
</a>
				</div>
				<!-- // Modal footer END -->
			</div>
		</div>
		</form>
コード例 #4
0
ファイル: course.router.php プロジェクト: parkerj/eduTrac-SIS
     $clone->courseShortTitle = $crse->courseShortTitle;
     $clone->preReq = $crse->preReq;
     $clone->allowAudit = $crse->allowAudit;
     $clone->allowWaitlist = $crse->allowWaitlist;
     $clone->minEnroll = $crse->minEnroll;
     $clone->seatCap = $crse->seatCap;
     $clone->startDate = $crse->startDate;
     $clone->currStatus = $crse->currStatus;
     $clone->statusDate = $app->db->NOW();
     $clone->approvedDate = $app->db->NOW();
     $clone->approvedBy = get_persondata('personID');
     if ($clone->save()) {
         $ID = $clone->lastInsertId();
         etsis_cache_flush_namespace('crse');
         $app->flash('success_message', $flashNow->notice(200));
         etsis_logger_activity_log_write('New Record', 'Cloned Course', $crse->courseCode, get_persondata('uname'));
         redirect(get_base_url() . 'crse' . '/' . (int) $ID . '/');
     } else {
         $app->flash('error_message', $flashNow->notice(409));
         redirect($app->req->server['HTTP_REFERER']);
     }
 });
 $app->post('/dept/', function () use($app) {
     etsis_cache_flush_namespace('dept');
     $dept = $app->db->department();
     foreach ($_POST as $k => $v) {
         $dept->{$k} = $v;
     }
     $dept->save();
     $ID = $dept->lastInsertId();
     $department = $app->db->department()->where('deptID = ?', $ID);
コード例 #5
0
?>
" class="glyphicons home"><i></i><?php 
echo _t('Home');
?>
</a></li>
				<?php 
if (is_user_logged_in()) {
    ?>
				<li class="dropdown dd-1">
					<a href="" data-toggle="dropdown" class="glyphicons show_lines"><i></i><?php 
    echo _t('My Menu');
    ?>
 <span class="caret"></span></a>
					<ul class="dropdown-menu pull-left">
						<li<?php 
    echo checkStuMenuAccess(get_persondata('personID'));
    ?>
 class="dropdown submenu">
                            <a data-toggle="dropdown" class="dropdown-toggle glyphicons chevron-right"><i></i><?php 
    echo _t('Student');
    ?>
</a>
                            <ul class="dropdown-menu submenu-show submenu-hide pull-right">
                                <li<?php 
    echo ml('booking_module');
    ?>
><a href="<?php 
    echo get_base_url();
    ?>
stu/timetable/"><?php 
    echo _t('Timetable');
コード例 #6
0
ファイル: schedule.php プロジェクト: parkerj/eduTrac-SIS
if (!defined('BASE_PATH')) {
    exit('No direct script access allowed');
}
/**
 * myeduTrac Student Schedule View
 *  
 * @license GPLv3
 * 
 * @since       4.3
 * @package     eduTrac SIS
 * @author      Joshua Parker <*****@*****.**>
 */
$app = \Liten\Liten::getInstance();
$app->view->extend('_layouts/myet/' . _h(get_option('myet_layout')) . '.layout');
$app->view->block('myet');
$stu = get_student(get_persondata('personID'));
?>

<div class="col-md-12">
    
    <?php 
get_stu_header($stu->stuID);
?>
    
    <div class="separator line bottom"></div>

	<h3 class="glyphicons calendar"><i></i><?php 
echo _h($schedule[0]['termCode']);
?>
 <?php 
echo _t('Schedule');
コード例 #7
0
         * 
         * @since 6.1.00
         * @return mixed
         */
        $app->hook->do_action('myet_student_course_registration');
        // Flash messages for success or error
        if ($ID > 0) {
            $st = $app->db->stu_acad_cred()->select('courseSection')->where('stuID = ?', get_persondata('personID'))->_and_()->where('LastUpdate = ?', $now);
            $qry = $st->find(function ($data) {
                $array = [];
                foreach ($data as $d) {
                    $array[] = $d;
                }
                return $array;
            });
            if (count($qry[0]['courseSection']) > 0) {
                if (get_option('registrar_email_address') != '') {
                    $email->course_registration(get_persondata('personID'), $_POST['termCode'], get_base_url());
                }
            }
            etsis_cache_flush_namespace('student_account');
            $app->flash('success_message', $flashNow->notice(200));
        } else {
            $app->flash('error_message', $flashNow->notice(409));
        }
        redirect($app->req->server['HTTP_REFERER']);
    });
});
$app->setError(function () use($app) {
    $app->view->display('error/404', ['title' => '404 Error']);
});
コード例 #8
0
/**
 * Desktop Notifications
 * 
 * Used to pass notifications to the desktop.
 * 
 * @since 6.2.11
 * @param string $title Give title of notification.
 * @param string $message Message that should be displayed.
 * @param bool $hide True if notification hides automatically.
 */
function etsis_desktop_notify($title, $message, $hide = 'true')
{
    $app = \Liten\Liten::getInstance();
    $script = "<script type=\"text/javascript\">\n                \$(function(){\n                    PNotify.desktop.permission();\n                    (new PNotify({\n                        title: '{$title}',\n                        text: '{$message}',\n                        addclass: 'growl',\n                        styling: 'fontawesome',\n                        width: \"400px\",\n                        type: \"notice\",\n                        shadow: true,\n                        hide: {$hide},\n                        delay: 200000,\n                        desktop: {\n                            desktop: true,\n                            fallback: true,\n                            icon: '" . getSchoolPhoto(get_persondata('personID'), get_persondata('email')) . "'\n                        },\n                        mobile: {\n                            swipe_dismiss: true,\n                            styling: true\n                        }\n                    }));\n                });\n            </script>";
    return $app->hook->apply_filter('pnotify', $app->flash('pnotify', $script));
}
コード例 #9
0
ファイル: db-function.php プロジェクト: parkerj/eduTrac-SIS
function getJobID()
{
    $app = \Liten\Liten::getInstance();
    $job = $app->db->staff_meta()->select('jobID')->where('staffID = ?', get_persondata('personID'))->_and_()->where('hireDate = (SELECT MAX(hireDate) FROM staff_meta WHERE staffID = ?)', get_persondata('personID'))->findOne();
    return _h($job->jobID);
}
コード例 #10
0
ファイル: hr.router.php プロジェクト: parkerj/eduTrac-SIS
     } elseif (count($q[0]['staffID']) <= 0) {
         $app->view->display('error/404', ['title' => '404 Error']);
     } else {
         $app->view->display('hr/add', ['title' => 'Add Position', 'cssArray' => $css, 'jsArray' => $js, 'job' => $q]);
     }
 });
 $app->match('GET|POST', '/positions/(\\d+)/', function ($id) use($app, $css, $js, $flashNow) {
     if ($app->req->isPost()) {
         $position = $app->db->staff_meta();
         foreach ($_POST as $k => $v) {
             $position->{$k} = $v;
         }
         $position->where('sMetaID = ?', _filter_input_int(INPUT_POST, 'sMetaID'));
         if ($position->update()) {
             $app->flash('success_message', $flashNow->notice(200));
             etsis_logger_activity_log_write('Update Record', 'Job Position', get_name($id), get_persondata('uname'));
         } else {
             $app->flash('error_message', $flashNow->notice(409));
         }
         redirect($app->req->server['HTTP_REFERER']);
     }
     $jobs = $app->db->staff_meta()->select('staff_meta.*,b.title,b.hourly_wage')->select('b.weekly_hours,c.grade')->_join('job', 'staff_meta.jobID = b.ID', 'b')->_join('pay_grade', 'b.pay_grade = c.ID ', 'c')->where('staff_meta.staffID = ?', $id);
     $q = $jobs->find(function ($data) {
         $array = [];
         foreach ($data as $d) {
             $array[] = $d;
         }
         return $array;
     });
     /**
      * If the database table doesn't exist, then it
コード例 #11
0
                <?php 
    }
}
?>
				</tbody>
				<!-- // Table body END -->
				
			</table>
			<!-- // Table END -->
            
            <hr class="separator" />
    			
			<!-- Form actions -->
			<div class="form-actions">
				<?php 
if ($grade[0]['facID'] == get_persondata('personID') || $acl->userHasRole(8) || hasPermission('submit_final_grades')) {
    ?>
			    <?php 
    if ($grade[0]['stuID'] != '') {
        ?>
			    <input type="hidden" name="attCredit" value="<?php 
        echo _h($grade[0]['minCredit']);
        ?>
" />
			    <input type="hidden" name="courseSecID" value="<?php 
        echo _h($grade[0]['courseSecID']);
        ?>
" />
				<button type="submit" class="btn btn-icon btn-primary glyphicons circle_ok"><i></i><?php 
        echo _t('Submit');
        ?>
コード例 #12
0
     } else {
         $app->flash('error_message', $flashNow->notice(409));
     }
     redirect($app->req->server['HTTP_REFERER']);
 });
 $app->get('/deleteSTAC/(\\d+)/', function ($id) use($app, $flashNow) {
     $q = $app->db->query("DELETE \n\t\t\t\t\t\ta.*,b.*,c.* \n\t\t\t\t\t\tFROM transfer_credit a \n\t\t\t\t\t\tLEFT JOIN stu_acad_cred b ON a.stuAcadCredID = b.stuAcadCredID  \n\t\t\t\t\t\tLEFT JOIN stu_course_sec c ON b.stuID = c.stuID AND b.courseSecID = c.courseSecID \n\t\t\t\t\t\tWHERE a.stuAcadCredID = ?", [$id]);
     if ($q) {
         $app->flash('success_message', $flashNow->notice(200));
     } else {
         $app->flash('error_message', $flashNow->notice(409));
     }
     redirect($app->req->server['HTTP_REFERER']);
 });
 $app->get('/getEvents/', function () use($app, $css, $js) {
     $meta = $app->db->event_meta()->setTableAlias('a')->select('a.*,b.roomCode,c.buildingCode,e.bgcolor')->_join('room', 'a.roomCode = b.roomCode', 'b')->_join('building', 'b.buildingCode = c.buildingCode', 'c')->_join('event', 'a.eventID = d.eventID', 'd')->_join('event_category', 'd.catID = e.catID', 'e')->_join('stu_acad_cred', 'd.termCode = f.termCode AND d.title = f.courseSecCode', 'f')->where('f.stuID = ?', get_persondata('personID'));
     $q = $meta->find(function ($data) {
         $array = [];
         foreach ($data as $d) {
             $array[] = $d;
         }
         return $array;
     });
     if (count($q[0]['eventID']) > 0) {
         $events = [];
         foreach ($q as $r) {
             $eventArray['eMID'] = $r['eventMetaID'];
             $eventArray['eID'] = $r['eventID'];
             $eventArray['buildingCode'] = $r['buildingCode'];
             $eventArray['roomCode'] = $r['roomCode'];
             $eventArray['title'] = $r['title'];
コード例 #13
0
ファイル: ACL.php プロジェクト: parkerj/eduTrac-SIS
 public function hasPermission($permKey)
 {
     $roles = $this->_app->db->query("SELECT \r\n\t\t\t\t\t\ta.ID \r\n\t\t\t\t\tFROM \r\n\t\t\t\t\t\trole a \r\n\t\t\t\t\tLEFT JOIN \r\n\t\t\t\t\t\tperson_roles b \r\n\t\t\t\t\tON \r\n\t\t\t\t\t\ta.ID = b.roleID \r\n\t\t\t\t\tWHERE \r\n\t\t\t\t\t\ta.permission LIKE ? \r\n\t\t\t\t\tAND \r\n\t\t\t\t\t\tb.personID = ?", ["%{$permKey}%", get_persondata('personID')]);
     $q1 = $roles->find(function ($data) {
         $array = [];
         foreach ($data as $d) {
             $array[] = $d;
         }
         return $array;
     });
     $perms = $this->_app->db->query('SELECT ID FROM person_perms WHERE permission LIKE ? AND personID = ?', ["%{$permKey}%", get_persondata('personID')]);
     $q2 = $perms->find(function ($data) {
         $array = [];
         foreach ($data as $d) {
             $array[] = $d;
         }
         return $array;
     });
     if (count($q1) > 0) {
         return true;
     } elseif (count($q2) > 0) {
         return true;
     } else {
         return false;
     }
 }
コード例 #14
0
?>
</a></span>
                                        <span class="media display-block margin-none">
                                            <span class="pull-left display-block thumb"><?php 
echo getSchoolPhoto(get_persondata('personID'), get_persondata('email'), '38');
?>
</span>
                                            <a href="<?php 
echo get_base_url();
?>
profile/"><?php 
echo get_persondata('fname') . ' ' . get_persondata('lname');
?>
</a><br />
                                            <?php 
echo get_persondata('email');
?>
                                        </span>
                                        <span class="clearfix"></span>
                                    </span>
                                </li>
                                <?php 
if (isset($_COOKIE['SWITCH_USERBACK'])) {
    ?>
                                    <li>
                                        <a href="<?php 
    echo get_base_url();
    ?>
switchUserBack/<?php 
    echo $app->cookies->getSecureCookie('SWITCH_USERBACK');
    ?>
コード例 #15
0
ファイル: appl.router.php プロジェクト: parkerj/eduTrac-SIS
         $inst->where('institutionID = ?', $id);
         if ($inst->update()) {
             $app->flash('success_message', $flashNow->notice(200));
             etsis_logger_activity_log_write('Update Record', 'Institution', _filter_input_string(INPUT_POST, 'instName'), get_persondata('uname'));
         } else {
             $app->flash('error_message', $flashNow->notice(409));
         }
         redirect($app->req->server['HTTP_REFERER']);
     }
     $inst = $app->db->institution()->where('institutionID = ?', (int) $id)->findOne();
     $app->view->display('application/view-inst', ['title' => $inst->instName, 'cssArray' => $css, 'jsArray' => $js, 'inst' => $inst]);
 });
 $app->get('/applications/', function () use($app, $json_url) {
     $css = ['css/admin/module.admin.page.alt.form_elements.min.css', 'css/admin/module.admin.page.alt.tables.min.css'];
     $js = ['components/modules/admin/forms/elements/bootstrap-select/assets/lib/js/bootstrap-select.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-select/assets/custom/js/bootstrap-select.init.js?v=v2.1.0', 'components/modules/admin/forms/elements/select2/assets/lib/js/select2.js?v=v2.1.0', 'components/modules/admin/forms/elements/select2/assets/custom/js/select2.init.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-datepicker/assets/lib/js/bootstrap-datepicker.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-datepicker/assets/custom/js/bootstrap-datepicker.init.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-timepicker/assets/lib/js/bootstrap-timepicker.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-timepicker/assets/custom/js/bootstrap-timepicker.init.js?v=v2.1.0'];
     $appl = $app->db->application()->where('personID = ?', (int) get_persondata('personID'));
     $q = $appl->find(function ($data) {
         $array = [];
         foreach ($data as $d) {
             $array[] = $d;
         }
         return $array;
     });
     $app->view->display('application/appls', ['title' => 'My Applications', 'cssArray' => $css, 'jsArray' => $js, 'appls' => $q]);
 });
 $app->post('/applicantLookup/', function () use($app, $json_url) {
     $appl = get_person_by('personID', $_POST['personID']);
     $json = ['input#person' => $appl->lname . ', ' . $appl->fname];
     echo json_encode($json);
 });
 $app->get('/deleteInstAttend/(\\d+)/', function ($id) use($app, $flashNow) {
コード例 #16
0
    /**
     * If user is logged in and the lockscreen cookie is set, 
     * redirect user to the lock screen until he/she enters 
     * his/her password to gain access.
     */
    if (isset($_COOKIE['SCREENLOCK'])) {
        redirect(get_base_url() . 'lock' . '/');
    }
});
$app->match('GET|POST', '/templates/', function () use($app) {
    $css = ['css/admin/module.admin.page.form_elements.min.css', 'css/admin/module.admin.page.tables.min.css'];
    $js = ['components/modules/admin/forms/elements/bootstrap-select/assets/lib/js/bootstrap-select.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-select/assets/custom/js/bootstrap-select.init.js?v=v2.1.0', 'components/modules/admin/forms/elements/select2/assets/lib/js/select2.js?v=v2.1.0', 'components/modules/admin/forms/elements/select2/assets/custom/js/select2.init.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-datepicker/assets/lib/js/bootstrap-datepicker.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-datepicker/assets/custom/js/bootstrap-datepicker.init.js?v=v2.1.0', 'components/modules/admin/forms/editors/wysihtml5/assets/lib/js/wysihtml5-0.3.0_rc2.min.js?v=v2.1.0', 'components/modules/admin/forms/editors/wysihtml5/assets/lib/js/bootstrap-wysihtml5-0.0.2.js?v=v2.1.0', 'components/modules/admin/forms/editors/wysihtml5/assets/custom/wysihtml5.init.js?v=v2.1.0'];
    if ($app->req->isPost()) {
        $options = ['coa_form_text', 'reset_password_text', 'room_request_text', 'room_booking_confirmation_text', 'student_acceptance_letter', 'person_login_details', 'update_username'];
        foreach ($options as $option_name) {
            if (!isset($_POST[$option_name])) {
                continue;
            }
            $value = $_POST[$option_name];
            update_option($option_name, $value);
        }
        // Update more options here
        $app->hook->do_action('update_options');
        /* Write to logs */
        etsis_logger_activity_log_write('Update', 'Settings', 'Email Templates', get_persondata('uname'));
    }
    $app->view->display('setting/templates', ['title' => 'Email Templates', 'cssArray' => $css, 'jsArray' => $js]);
});
$app->setError(function () use($app) {
    $app->view->display('error/404', ['title' => '404 Error']);
});
コード例 #17
0
             /**
              * Fires after a student has been registered into
              * a course by a staff member.
              * 
              * @since 6.1.07
              * @param array $sacd Student Academic Credit detail data object.
              */
             $app->hook->do_action('post_rgn_stu_crse_reg', $sacd);
             if (function_exists('financial_module')) {
                 /**
                  * Generate bill and/or add fees.
                  */
                 generate_stu_bill($sect->termCode, $_POST['stuID'], $sect->courseSecID);
             }
             $app->flash('success_message', $flashNow->notice(200));
             etsis_logger_activity_log_write('New Record', 'Course Registration Via Staff', get_name($_POST['stuID']) . ' - ' . $sect->secShortTitle, get_persondata('uname'));
         } else {
             $app->flash('error_message', $flashNow->notice(409));
         }
         redirect(get_base_url() . 'sect/rgn' . '/');
     }
     $app->view->display('section/register', ['title' => 'Course Registration', 'cssArray' => $css, 'jsArray' => $js]);
 });
 /**
  * Before route check.
  */
 $app->before('GET|POST', '/sros.*', function () {
     if (!hasPermission('access_stu_roster_screen')) {
         redirect(get_base_url() . 'dashboard' . '/');
     }
 });
コード例 #18
0
function get_stu_header($stu_id)
{
    $student = get_student($stu_id);
    ?>

<!-- List Widget -->
<div class="relativeWrap">
    <div class="widget">
        <div class="widget-head">
            <h4 class="heading glyphicons user"><i></i><?php 
    echo get_name(_h($student->stuID));
    ?>
</h4>&nbsp;&nbsp;
            <?php 
    if (!isset($_COOKIE['SWITCH_USERBACK']) && _h($student->stuID) != get_persondata('personID')) {
        ?>
            <span<?php 
        echo ae('login_as_user');
        ?>
 class="label label-inverse"><a href="<?php 
        echo get_base_url();
        ?>
switchUserTo/<?php 
        echo _h($student->stuID);
        ?>
/"><font color="#FFFFFF"><?php 
        echo _t('Switch To');
        ?>
</font></a></span>
            <?php 
    }
    ?>
            <?php 
    if (get_persondata('personID') == $student->stuID && !hasPermission('access_dashboard')) {
        ?>
            <a href="<?php 
        echo get_base_url();
        ?>
profile/" class="heading pull-right"><?php 
        echo _h($student->stuID);
        ?>
</a>
            <?php 
    } else {
        ?>
            <a href="<?php 
        echo get_base_url();
        ?>
stu/<?php 
        echo _h($student->stuID);
        ?>
/" class="heading pull-right"><?php 
        echo _h($student->stuID);
        ?>
</a>
            <?php 
    }
    ?>
        </div>
        <div class="widget-body">
            <!-- 4 Column Grid / One Third -->
            <div class="row">

                <!-- One Fifth's Column -->
                <div class="col-md-2">
                    <?php 
    echo getSchoolPhoto($student->stuID, $student->email1, '90');
    ?>
                </div>
                <!-- // One Fifth's Column END -->

                <!-- Two Fifth's Column -->
                <div class="col-md-2">
                    <p><?php 
    echo _h($student->address1);
    ?>
 <?php 
    echo _h($student->address2);
    ?>
</p>
                    <p><?php 
    echo _h($student->city);
    ?>
 <?php 
    echo _h($student->state);
    ?>
 <?php 
    echo _h($student->zip);
    ?>
</p>
                    <p><strong><?php 
    echo _t('Phone:');
    ?>
</strong> <?php 
    echo _h($student->phone1);
    ?>
</p>
                </div>
                <!-- // Two Fifth's Column END -->

                <!-- Three Fifth's Column -->
                <div class="col-md-2">
                    <p><strong><?php 
    echo _t('Email:');
    ?>
</strong> <a href="mailto:<?php 
    echo _h($student->email1);
    ?>
"><?php 
    echo _h($student->email1);
    ?>
</a></p>
                    <p><strong><?php 
    echo _t('Birth Date:');
    ?>
</strong> <?php 
    echo _h($student->dob) > '0000-00-00' ? date('D, M d, o', strtotime(_h($student->dob))) : '';
    ?>
</p>
                    <p><strong><?php 
    echo _t('Status:');
    ?>
</strong> <?php 
    echo _h($student->stuStatus) == 'A' ? _t('Active') : _t('Inactive');
    ?>
</p>
                </div>
                <!-- // Three Fifth's Column END -->

                <!-- Four Fifth's Column -->
                <div class="col-md-2">
                    <p><strong><?php 
    echo _t('FERPA:');
    ?>
</strong> <?php 
    echo is_ferpa(_h($student->stuID));
    ?>
 
                            <?php 
    if (is_ferpa(_h($student->stuID)) == 'Yes') {
        ?>
                            <a href="#FERPA" data-toggle="modal"><img style="vertical-align:top !important;" src="<?php 
        echo get_base_url();
        ?>
static/common/theme/images/exclamation.png" /></a>
                            <?php 
    } else {
        ?>
                            <a href="#FERPA" data-toggle="modal"><img style="vertical-align:top !important;" src="<?php 
        echo get_base_url();
        ?>
static/common/theme/images/information.png" /></a>
                        <?php 
    }
    ?>
                    </p>
                    <p><strong><?php 
    echo _t('Restriction(s):');
    ?>
</strong> 
                        <?php 
    $rstr = '';
    foreach (get_stu_restriction($student->stuID) as $v) {
        ?>
                            <?php 
        echo $rstr;
        ?>
<span data-toggle="popover" data-title="<?php 
        echo _h($v['description']);
        ?>
" data-content="Contact: <?php 
        echo _h($v['deptName']);
        ?>
 <?php 
        echo _h($v['deptEmail']) != '' ? ' | ' . $v['deptEmail'] : '';
        echo _h($v['deptPhone']) != '' ? ' | ' . $v['deptPhone'] : '';
        echo _h($v['severity']) == 99 ? _t(' | Restricted from registering for courses.') : '';
        ?>
" data-placement="bottom"><a href="#"><?php 
        echo _h($v['Restriction']);
        ?>
</a></span>
                        <?php 
        $rstr = ', ';
    }
    ?>
                    </p>
                    <p><strong><?php 
    echo _t('Entry Date:');
    ?>
</strong> <?php 
    echo date('D, M d, o', strtotime(_h($student->stuAddDate)));
    ?>
</p>
                </div>
                <!-- // Four Fifth's Column END -->
                
                <!-- Five Fifth's Column -->
                <div class="col-md-2">
                    <p><strong><?php 
    echo _t('SACP:');
    ?>
</strong> 
                         <?php 
    $sacp = '';
    foreach (get_sacp($student->stuID) as $v) {
        ?>
                            <?php 
        echo $sacp;
        ?>
<span data-toggle="popover" data-title="<?php 
        echo _h($v['acadProgTitle']);
        ?>
 (<?php 
        echo _h($v['currStatus']) == 'A' ? _t('Active') : _t('Graduated');
        ?>
)" data-content="<?php 
        echo _h($v['programDesc']);
        ?>
" data-placement="bottom"><a href="#"><?php 
        echo _h($v['SACP']);
        ?>
</a></span>
                        <?php 
        $sacp = ', ';
    }
    ?>
                    </p>
                    <p><strong><?php 
    echo _t('Admit Status:');
    ?>
</strong> 
                        
                    </p>
                    <p><strong><?php 
    echo _t('Hiatus:');
    ?>
</strong> 
                        <span data-toggle="popover" data-title="<?php 
    echo get_shis_name(get_stu_shis(_h($student->stuID), 'shisCode'));
    ?>
" data-content="Start Date: <?php 
    echo get_stu_shis(_h($student->stuID), 'startDate');
    ?>
 | End Date: <?php 
    echo get_stu_shis(_h($student->stuID), 'endDate') <= '0000-00-00' ? '' : get_stu_shis(_h($student->stuID), 'endDate');
    ?>
" data-placement="bottom"><a href="#"><?php 
    echo get_stu_shis(_h($student->stuID), 'shisCode');
    ?>
</a></span>
                    </p>
                </div>
                <!-- // Five Fifth's Column END -->

            </div>
            <!-- // 4 Column Grid / One Third END -->
        </div>
    </div>
</div>
<!-- // List Widget END -->

<!-- Modal -->
<div class="modal fade" id="FERPA">
    <div class="modal-dialog">
        <div class="modal-content">
            <!-- Modal heading -->
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h3 class="modal-title"><?php 
    echo _t('Family Educational Rights and Privacy Act (FERPA)');
    ?>
</h3>
            </div>
            <!-- // Modal heading END -->
            <!-- Modal body -->
            <div class="modal-body">
                <p><?php 
    echo _t('"FERPA gives parents certain rights with respect to their children\'s education records. 
                These rights transfer to the student when he or she reaches the age of 18 or attends a school beyond 
                the high school level. Students to whom the rights have transferred are \'eligible students.\'"');
    ?>
</p>
                <p><?php 
    echo _t('If the FERPA restriction states "Yes", then the student has requested that none of their 
                information be given out without their permission. To get a better understanding of FERPA, visit 
                the U.S. DOE\'s website @ ') . '<a href="http://www2.ed.gov/policy/gen/guid/fpco/ferpa/index.html">http://www2.ed.gov/policy/gen/guid/fpco/ferpa/index.html</a>.';
    ?>
</p>
            </div>
            <!-- // Modal body END -->
            <!-- Modal footer -->
            <div class="modal-footer">
                <a href="#" class="btn btn-default" data-dismiss="modal"><?php 
    echo _t('Close');
    ?>
</a> 
            </div>
            <!-- // Modal footer END -->
        </div>
    </div>
</div>
<!-- // Modal END -->

<?php 
}
コード例 #19
0
ファイル: person.router.php プロジェクト: parkerj/eduTrac-SIS
             *
             * @since 6.1.07
             */
            $pass = [];
            $pass['pass'] = $pass;
            $pass['personID'] = $id;
            $pass['uname'] = $person->uname;
            $pass['fname'] = $person->fname;
            $pass['lname'] = $person->lname;
            $pass['email'] = $person->email;
            /**
             * Fires after successful reset of person's password.
             *
             * @since 6.1.07
             * @param array $pass
             *            Plaintext password.
             * @param string $uname
             *            Person's username
             */
            $app->hook->do_action('post_reset_password', $pass);
            etsis_desktop_notify(_t('Reset Password'), _t('Password reset; new email sent to queue.'), 'false');
            etsis_logger_activity_log_write(_t('Update Record'), _t('Reset Password'), get_name($id), get_persondata('uname'));
        } else {
            $app->flash('error_message', $flashNow->notice(409));
        }
        redirect($app->req->server['HTTP_REFERER']);
    });
});
$app->setError(function () use($app) {
    $app->view->display('error/404', ['title' => '404 Error']);
});
コード例 #20
0
ファイル: index.php プロジェクト: parkerj/eduTrac-SIS
                                <li><a href="<?php 
            echo get_base_url();
            ?>
nae/<?php 
            echo _h($v['personID']);
            ?>
/<?php 
            echo bm();
            ?>
"><?php 
            echo _t('View');
            ?>
</a></li>
                                                                                        
                                <?php 
            if (!isset($_COOKIE['SWITCH_USERBACK']) && _h($v['personID']) != get_persondata('personID')) {
                ?>
                                <li<?php 
                echo ae('login_as_user');
                ?>
><a href="<?php 
                echo get_base_url();
                ?>
switchUserTo/<?php 
                echo _h($v['personID']);
                ?>
/"><?php 
                echo _t('Switch to User');
                ?>
</a></li>
                                <?php 
コード例 #21
0
ファイル: index.php プロジェクト: parkerj/eduTrac-SIS
    echo $app->hook->has_filter('sidebar_menu') ? 'col-md-12' : 'col-md-10';
    ?>
">
		<div class="widget-body">
		
			<!-- Table -->
			<?php 
    if (strstra(strtolower($_POST['qtext']), forbidden_keyword())) {
        $app->flash('error_message', 'Your query contains a forbidden keywork, please try again.');
        redirect($app->req->server['HTTP_REFERER']);
        exit;
    }
    if ($type == "query") {
        $qtext2 = str_replace("\\", " ", $qtext);
        /* Write to activity log table. */
        etsis_logger_activity_log_write("Query", "SQL Interface", $qtext2, get_persondata('uname'));
        if ($result = $pdo->query("{$qtext2}")) {
            echo _t("Successly Executed - ");
        } else {
            echo "<font color=red>Not able to execute the query<br>Either the \n\t\t\t\t\t\t\t\ttable does not exist or the query is malformed.</font><br><br>";
        }
        echo _t("Query is : ");
        echo "<font color=blue>" . _escape($qtext2) . "</font>\n";
        echo "<table class=\"dynamicTable tableTools table table-striped table-bordered table-condensed table-white\">\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n";
        foreach (range(0, $result->columnCount() - 1) as $column_index) {
            $meta[] = $result->getColumnMeta($column_index);
            echo "<th>" . $meta[$column_index]['name'] . "</th>";
        }
        echo "</tr>\n</thead>\n";
        $vv = true;
        while ($row = $result->fetch(\PDO::FETCH_NUM)) {
コード例 #22
0
ファイル: form.router.php プロジェクト: parkerj/eduTrac-SIS
      */
     if (isset($_COOKIE['SCREENLOCK'])) {
         redirect(get_base_url() . 'lock' . '/');
     }
 });
 $app->match('GET|POST', '/grade-scale/(\\d+)/', function ($id) use($app, $css, $js, $flashNow) {
     if ($app->req->isPost()) {
         $gs = $app->db->grade_scale();
         foreach ($_POST as $k => $v) {
             $gs->{$k} = $v;
         }
         $gs->where('ID = ?', $id);
         if ($gs->update()) {
             etsis_cache_flush_namespace('grsc');
             $app->flash('success_message', $flashNow->notice(200));
             etsis_logger_activity_log_write('Update Record', 'Grade Scale', _filter_input_string(INPUT_POST, 'grade'), get_persondata('uname'));
         } else {
             $app->flash('error_message', $flashNow->notice(409));
         }
         redirect($app->req->server['HTTP_REFERER']);
     }
     $gs = $app->db->grade_scale()->where('ID = ?', $id);
     $q = etsis_cache_get($id, 'grsc');
     if (empty($q)) {
         $q = $gs->find(function ($data) {
             $array = [];
             foreach ($data as $d) {
                 $array[] = $d;
             }
             return $array;
         });
コード例 #23
0
ファイル: menu.php プロジェクト: parkerj/eduTrac-SIS
nae/add/<?php 
        echo bm();
        ?>
"><?php 
        echo _t('New Person');
        ?>
</a></li>
                                <?php 
    }
    ?>
                                
                                <?php 
    if ($nae !== '') {
        ?>
                                <?php 
        if (!isset($_COOKIE['SWITCH_USERBACK']) && _h($nae[0]['personID']) != get_persondata('personID') && _he('login_as_user')) {
            ?>
                                <li data-jstree='{"icon":"glyphicon glyphicon-file"}' id="shtml_49"><a href="<?php 
            echo get_base_url();
            ?>
switchUserTo/<?php 
            echo _h($nae[0]['personID']);
            ?>
/"><?php 
            echo _t('Switch To');
            ?>
</a></li>
                                <?php 
        }
        ?>
                                <?php 
コード例 #24
0
ファイル: hook-function.php プロジェクト: parkerj/eduTrac-SIS
/**
 * Shows update message when a new release of
 * eduTrac SIS is available.
 *
 * @since 4.0.0
 */
function show_update_message()
{
    $app = \Liten\Liten::getInstance();
    $acl = new \app\src\ACL(get_persondata('personID'));
    if ($acl->userHasRole(8)) {
        $update = new \VisualAppeal\AutoUpdate(rtrim($app->config('file.savepath'), '/'), BASE_PATH, 1800);
        $update->setCurrentVersion(RELEASE_TAG);
        $update->setUpdateUrl('https://etsis.s3.amazonaws.com/core/1.1/update-check');
        // Optional:
        $update->addLogHandler(new Monolog\Handler\StreamHandler(APP_PATH . 'tmp/logs/core-update.' . date('m-d-Y') . '.txt'));
        $update->setCache(new Desarrolla2\Cache\Adapter\File(APP_PATH . 'tmp/cache'), 3600);
        if ($update->checkUpdate() !== false) {
            if ($update->newVersionAvailable()) {
                $alert = '<div class="alerts alerts-warn center">';
                $alert .= sprintf(_t('eduTrac SIS release %s is available for download/upgrade. Before upgrading, make sure to <a href="%s">backup your system</a>.'), $update->getLatestVersion(), 'https://www.edutracsis.com/manual/edutrac-sis-backups/');
                $alert .= '</div>';
            }
        }
    }
    return $app->hook->apply_filter('update_message', $alert);
}
コード例 #25
0
         $prog->specCode = $_POST['specCode'];
         $prog->acadLevelCode = $_POST['acadLevelCode'];
         $prog->cipCode = $_POST['cipCode'];
         $prog->locationCode = $_POST['locationCode'];
         /**
          * Fires during the saving/creating of an academic program.
          *
          * @since 6.1.10
          * @param array $prog Academic program object.
          */
         $app->hook->do_action('save_acad_program_db_table', $prog);
         if ($prog->save()) {
             $ID = $prog->lastInsertId();
             etsis_cache_flush_namespace('prog');
             $app->flash('success_message', $flashNow->notice(200));
             etsis_logger_activity_log_write('New Record', 'Acad Program', $_POST['acadProgCode'], get_persondata('uname'));
             redirect(get_base_url() . 'program' . '/' . $ID . '/');
         } else {
             $app->flash('error_message', $flashNow->notice(409));
             redirect($app->req->server['HTTP_REFERER']);
         }
     }
     $app->view->display('program/add', ['title' => 'Add Academic Program', 'cssArray' => $css, 'jsArray' => $js]);
 });
 $app->post('/year/', function () use($app) {
     etsis_cache_flush_namespace('ayr');
     $year = $app->db->acad_year();
     foreach ($_POST as $k => $v) {
         $year->{$k} = $v;
     }
     $year->save();
コード例 #26
0
ファイル: index.php プロジェクト: parkerj/eduTrac-SIS
						
					</div>
					<!-- // Modal END -->
                </td>
                <td<?php 
        echo isRegistrationOpen();
        ?>
 class="text-center">
                    <?php 
        if (_h($v['termCode']) == _h(get_option('registration_term'))) {
            ?>
                    <?php 
            if (student_can_register()) {
                ?>
                    <?php 
                if (prerequisite(get_persondata('personID'), _h($v['courseSecID']))) {
                    ?>
                    <input<?php 
                    echo getStuSec(_h($v['courseSecCode']), _h($v['termCode']));
                    ?>
 type="checkbox" name="courseSecID[]" value="<?php 
                    echo _h($v['courseSecID']);
                    ?>
" />
                    <?php 
                }
            }
        }
        ?>
                </td>
            </tr>
コード例 #27
0
ファイル: etsis_Email.php プロジェクト: parkerj/eduTrac-SIS
 /**
  * Method used to send students an email currently via the faculty portal.
  *
  * @deprecated since release 6.2.11
  * @param string $email
  *            Student's email address.
  * @param string $from
  *            Sender's email address.
  * @param string $subject
  *            Subject of the email.
  * @param mixed $message
  *            Body of the email.
  * @param mixed $attachment
  *            Any attachment to be sent with the email.
  * @return mixed
  */
 public function stu_email($email, $from, $subject, $message, $attachment = '')
 {
     $headers = "From: {$from}" . "\r\n";
     $headers .= "Reply-To: " . get_persondata('email') . "\r\n";
     $headers .= "CC: " . get_persondata('email') . "\r\n";
     $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n";
     $headers .= "MIME-Version: 1.0" . "\r\n";
     $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
     $this->etsis_mail($email, $subject, $message, $headers, $attachment);
     return $this->app->hook->apply_filter('stu_email', $headers);
 }
コード例 #28
0
ファイル: add.php プロジェクト: parkerj/eduTrac-SIS
 * Action will print a form field or any type of data
 * on the right side of the CRSE screen.
 * 
 * @since 6.1.10
 */
do_action('right_crse_new_form');
?>
						
						<!-- Group -->
                        <div class="form-group">
                            <label class="col-md-3 control-label"><?php 
echo _t('Approval Person');
?>
</label>
                            <div class="col-md-6"><input class="form-control" type="text" readonly value="<?php 
echo get_name(get_persondata('personID'));
?>
" /></div>
                        </div>
                        <!-- // Group END -->
						
						<!-- Group -->
						<div class="form-group">
                            <label class="col-md-3 control-label"><?php 
echo _t('Approval Date');
?>
</label>
							<div class="col-md-6"><input class="form-control" type="text" readonly value="<?php 
echo date('D, M d, o', strtotime(date('Y-m-d')));
?>
" /></div>
コード例 #29
0
ファイル: staff.router.php プロジェクト: parkerj/eduTrac-SIS
         /**
          * Is triggered after staff record has been created.
          * 
          * @since 6.1.12
          * @param mixed $staff Staff data object.
          */
         $app->hook->do_action('post_save_staff', $staff);
         /**
          * Is triggered after staff meta data is saved.
          * 
          * @since 6.1.12
          * @param mixed $staff Staff meta data object.
          */
         $app->hook->do_action('post_save_staff_meta', $meta);
         $app->flash('success_message', $flashNow->notice(200));
         etsis_logger_activity_log_write('New Record', 'Staff Member', get_name($id), get_persondata('uname'));
         redirect(get_base_url() . 'staff' . '/' . $id);
     } else {
         $app->flash('error_message', $flashNow->notice(409));
         redirect($app->req->server['HTTP_REFERER']);
     }
 }
 /**
  * If the database table doesn't exist, then it
  * is false and a 404 should be sent.
  */
 if ($p_decode == false) {
     $app->view->display('error/404', ['title' => '404 Error']);
 } elseif (empty($p_decode) == true) {
     $app->view->display('error/404', ['title' => '404 Error']);
 } elseif (count($p_decode[0]['personID']) <= 0) {