Skip to content

Commit

Permalink
Version 7 beta release commit
Browse files Browse the repository at this point in the history
  • Loading branch information
openSISAdmin committed Aug 18, 2018
1 parent 27a24d4 commit 3905367
Show file tree
Hide file tree
Showing 81 changed files with 5,137 additions and 2,449 deletions.
14 changes: 12 additions & 2 deletions Ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,24 @@

echo '<script type="text/javascript" src="assets/js/pages/components_popups.js"></script>';
echo '<script type="text/javascript" src="assets/js/pages/picker_date.js"></script>';
echo '<script type="text/javascript" src="assets/js/pages/picker_datetime.js"></script>';
//echo '<script type="text/javascript" src="assets/js/pages/picker_datetime.js"></script>';
echo '<script type="text/javascript" src="assets/js/pages/form_checkboxes_radios.js"></script>';
//echo '<script type="text/javascript" src="assets/js/pages/extension_image_cropper.js"></script>';
echo '<script>';
echo '$(document).ready(function() {
// Animate loader off screen
$("#loading-image").hide();
if($(".clockpicker").length>0){
$(".clockpicker").clockpicker({
twelvehour: true,
donetext: \'Done\'
}).find("input").change(function () {
//alert(this.value);
});
}
$("body").removeClass("sidebar-mobile-main");
// Scroll page to top after ajax call
Expand Down
37 changes: 37 additions & 0 deletions CheckUrlWs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
$url = $_REQUEST['url'];
$data = array();
$exists = '';
$file_headers = '';
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$sp = strtolower($_SERVER["SERVER_PROTOCOL"]);
$protocol = substr($sp, 0, strpos($sp, "/")) . $s;
$out=$protocol . "://" . $url;
$file_headers = @get_headers($out);

if(count($file_headers)>1)
{
if($file_headers[0]!='' && strpos($file_headers[0], '404')) {
$exists = 0;
}
else {
$exists = 1;
}
}
else
{
$exists = 0;
}
if($exists==1)
{
$data['success']=1;
$data['msg']='valid url';
$data['host'] = $out;
}
else
{
$data['success']=0;
$data['msg']='invalid url';
$data['host'] = $out;
}
echo json_encode($data);
4 changes: 2 additions & 2 deletions ConfigInc.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
$OutputType = "HTML"; //options are HTML or PDF
$htmldocPath = '';
$htmldocAssetsPath = ''; // way htmldoc accesses the assets/ directory, possibly different than user - empty string means no translation
$StudentPicturesPath = 'assets/studentphotos/';
$UserPicturesPath = 'assets/userphotos/';
// $StudentPicturesPath = 'assets/studentphotos/';
// $UserPicturesPath = 'assets/userphotos/';
$openSISTitle = 'openSIS Student Information System';
$openSISAdmins = '1'; // can be list such as '1,23,50' - note, these should be id's in the DefaultSyear, otherwise they can't login anyway
$openSISNotifyAddress = '';
Expand Down
66 changes: 46 additions & 20 deletions Modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@
}
}
echo "<noscript><META http-equiv=REFRESH content='0;url=EnableJavascript.php' /></noscript>";
echo "<script type='text/javascript'>
function init(param,param2) {
calendar.set('date_'+param);
if(param2==2)
{
document.getElementById('date_'+param).style.display ='block';
document.getElementById('date_div_'+param).style.display ='none';
}
document.getElementById('date_'+param).click();
}
</script>";
//echo "<script type='text/javascript'>
// function init(param,param2) {
// calendar.set('date_'+param);
// if(param2==2)
// {
// document.getElementById('date_'+param).style.display ='block';
// document.getElementById('date_div_'+param).style.display ='none';
// }
// document.getElementById('date_'+param).click();
// }
//</script>";

error_reporting(1);

Expand Down Expand Up @@ -102,6 +102,7 @@ function init(param,param2) {
echo '<link href="assets/css/core.css?v=' . rand(0000, 99999) . '" rel="stylesheet" type="text/css">';
echo '<link href="assets/js/plugins/pickers/bootstrap-datepicker/css/bootstrap-datepicker.css?v=' . rand(0000, 99999) . '" rel="stylesheet" type="text/css">';
echo '<link href="assets/js/plugins/pickers/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">';
echo '<link href="assets/js/plugins/pickers/clockpicker/bootstrap-clockpicker.min.css" rel="stylesheet" type="text/css">';
echo '<link href="assets/css/components.css?v=1.1" rel="stylesheet" type="text/css">';
echo '<link href="assets/css/colors.css?v=' . rand(0000, 99999) . '" rel="stylesheet" type="text/css">';
echo '<link href="assets/css/custom.css?v=' . rand(0000, 99999) . '" rel="stylesheet" type="text/css">';
Expand All @@ -115,13 +116,15 @@ function init(param,param2) {
echo '<script type="text/javascript" src="assets/js/core/libraries/jquery_ui/interactions.min.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/loaders/blockui.min.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/ui/prism.min.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/media/cropper.min.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/editors/ckeditor/ckeditor.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/forms/selects/select2.min.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/ui/nicescroll.min.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/forms/styling/uniform.min.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/forms/styling/switchery.min.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/ui/moment/moment.min.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/pickers/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/pickers/clockpicker/bootstrap-clockpicker.js"></script>';
echo '<script type="text/javascript" src="assets/js/plugins/extensions/cookie.js"></script>';

/* JS Initializers */
Expand All @@ -130,14 +133,23 @@ function init(param,param2) {
echo '<script type="text/javascript" src="assets/js/plugins/ui/ripple.min.js"></script>';
echo '<script type="text/javascript" src="assets/js/pages/form_select2.js"></script>';
echo '<script type="text/javascript" src="assets/js/pages/picker_date.js"></script>';
echo '<script type="text/javascript" src="assets/js/pages/picker_datetime.js"></script>';
//echo '<script type="text/javascript" src="assets/js/pages/picker_datetime.js"></script>';
echo '<script type="text/javascript" src="assets/js/pages/form_checkboxes_radios.js"></script>';
echo '<script type="text/javascript" src="js/custom.js?v=' . rand(0000, 99999) . '"></script>';
echo '<script type="text/javascript">
$(function () {
$("body").on("click", "div.sidebar-overlay", function () {
$("body").toggleClass("sidebar-mobile-main");
});
if($(".clockpicker").length>0){
$(".clockpicker").clockpicker({
twelvehour: true,
donetext: \'Done\'
}).find("input").change(function () {
//alert(this.value);
});
}
});
</script>';

Expand Down Expand Up @@ -429,7 +441,19 @@ function init(param,param2) {
echo "</FORM></div></li>";
echo "<li><div class=\"form-group\"><FORM name=head_frm id=head_frm action=Side.php?modfunc=update&btnn=$btn&nsc=$ns&act=course method=POST><INPUT type=hidden name=modcat value='' id=modcat_input>";
$course = DBQuery("SELECT DISTINCT cd.COURSE_TITLE, cd.COURSE_ID,cd.SUBJECT_ID,cd.SCHOOL_ID FROM course_details cd WHERE (cd.TEACHER_ID='" . User('STAFF_ID') . "' OR cd.SECONDARY_TEACHER_ID='" . User('STAFF_ID') . "') AND cd.SYEAR='" . UserSyear() . "' AND cd.SCHOOL_ID='" . UserSchool() . "' AND cd.SUBJECT_ID='" . UserSubject() . "' AND (cd.MARKING_PERIOD_ID IN (" . GetAllMP($allMP, UserMP()) . ") OR (cd.MARKING_PERIOD_ID IS NULL ))"); //AND cd.BEGIN_DATE<='".date('Y-m-d')."' AND cd.END_DATE>='".date('Y-m-d')."'))");
$RET = DBGet($course);
$RET_temp= DBGet($course);
$ret_increment=1;
$RET=array();
foreach($RET_temp as $ret_courses)
{
$get_cps=DBGet(DBQuery("SELECT cpv.ID,cp.COURSE_PERIOD_ID,cp.MARKING_PERIOD_ID,cp.COURSE_ID,cp.TITLE,cp.SCHOOL_ID,cpv.PERIOD_ID FROM course_periods cp,course_period_var cpv WHERE cp.SYEAR='" . UserSyear() . "' AND cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID AND cp.SCHOOL_ID='" . UserSchool() . "' AND cp.COURSE_ID='" . $ret_courses['COURSE_ID'] . "' AND (TEACHER_ID='" . User('STAFF_ID') . "' OR SECONDARY_TEACHER_ID='" . User('STAFF_ID') . "') AND (MARKING_PERIOD_ID IN (" . GetAllMP($allMP, UserMP()) . ") OR (MARKING_PERIOD_ID IS NULL)) group by (cp.COURSE_PERIOD_ID)"));
if(count($get_cps)>0)
{
$RET[$ret_increment]=$ret_courses;
$ret_increment++;
}
}
// print_r($RET);
if (!UserCourse()) {
$_SESSION['UserCourse'] = $RET[1]['COURSE_ID'];
}
Expand Down Expand Up @@ -639,23 +663,23 @@ function init(param,param2) {
echo "<li><A HREF=$file target=_blank>$title</A>";
elseif (!is_numeric($file))
if (User('PROFILE') == 'student' && $title == "Student Info") {
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"" . ucwords($modcat) . " <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"changeColors(); this.className='submenu_link'; document.getElementById('cframe').src='Bottom.php?modname=" . $file . "';\">My Info</A>";
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"" . ucwords($modcat) . " <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"document.getElementById('cframe').src='Bottom.php?modname=" . $file . "';\">My Info</A>";
} elseif (User('PROFILE') == 'student' && $title == "Schedule") {
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"" . ucwords($modcat) . " <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"changeColors(); this.className='submenu_link'; document.getElementById('cframe').src='Bottom.php?modname=" . $file . "';\">My Schedule</A>";
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"" . ucwords($modcat) . " <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"document.getElementById('cframe').src='Bottom.php?modname=" . $file . "';\">My Schedule</A>";
} elseif (User('PROFILE') == 'student' && $title == "Student Requests") {
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"" . ucwords($modcat) . " <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"changeColors(); this.className='submenu_link'; document.getElementById('cframe').src='Bottom.php?modname=" . $file . "';\">My Requests</A>";
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"" . ucwords($modcat) . " <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"document.getElementById('cframe').src='Bottom.php?modname=" . $file . "';\">My Requests</A>";
} else {

if ($modcat == 'eligibility')
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"Extracurricular <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"changeColors(); this.className='submenu_link'; document.getElementById('cframe').src='Bottom.php?modname=" . str_replace('&', '?', $file) . "';\">$title</A>";
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"Extracurricular <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"document.getElementById('cframe').src='Bottom.php?modname=" . str_replace('&', '?', $file) . "';\">$title</A>";
else {
if (User('PROFILE_ID') != 0 && User('PROFILE') == 'admin') {
if ($modcat == 'tools' && $title != 'Backup Database')
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"" . ucwords($modcat) . " <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"changeColors(); this.className='submenu_link'; document.getElementById('cframe').src='Bottom.php?modname=" . str_replace('&', '?', $file) . "';\">$title</A>";
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"" . ucwords($modcat) . " <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"document.getElementById('cframe').src='Bottom.php?modname=" . str_replace('&', '?', $file) . "';\">$title</A>";
if ($modcat != 'tools')
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"" . ($modcat == 'schoolsetup' ? 'School Setup' : ucwords($modcat)) . " <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"changeColors(); this.className='submenu_link'; document.getElementById('cframe').src='Bottom.php?modname=" . str_replace('&', '?', $file) . "';\">$title</A>";
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"" . ($modcat == 'schoolsetup' ? 'School Setup' : ucwords($modcat)) . " <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"document.getElementById('cframe').src='Bottom.php?modname=" . str_replace('&', '?', $file) . "';\">$title</A>";
} else
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='document.getElementById(\"header\").innerHTML = \"" . ($modcat == 'schoolsetup' ? 'School Setup' : ucwords($modcat)) . " <i class=\"icon-arrow-right5\"></i> " . "$title\"' onmouseup=\"changeColors(); this.className='submenu_link'; document.getElementById('cframe').src='Bottom.php?modname=" . str_replace('&', '?', $file) . "';\">$title</A>";
echo "<li " . (($current_menu == $title) ? 'class="current-submenu"' : '') . "><A id=hm HREF=javascript:void(0) onClick='check_content(\"Ajax.php?modname=" . $file . " \");' onmousedown='$(\"#header\").html(\"" . ($modcat == 'schoolsetup' ? 'School Setup' : ucwords($modcat)) . " <i class=icon-arrow-right5></i> " . $title."\");' onmouseup=\"$('#cframe').attr('src','Bottom.php?modname=" . str_replace('&', '?', $file) . "');\">$title</A>";
}
}
elseif ($keys[$key_index + 1] && !is_numeric($keys[$key_index + 1])) {
Expand Down Expand Up @@ -1005,6 +1029,8 @@ function init(param,param2) {

echo '</div>
</div>
</div>
</div>
<!-- /main content -->
</div>
Expand Down
2 changes: 1 addition & 1 deletion ParentLookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
// print_r($searched_staffs);
ListOutput($searched_staffs, $columns, $singular, $plural, false, $group = false, $options, 'ForWindow');
unset($_REQUEST['func']);
echo '<div id="select-people-div"><input type="button" value="Select" name="button" onclick="SelectedParent(\''.$_REQUEST['address_id'].'\',\''.$_REQUEST['p_type'].'\')"></div>';
echo '<div id="select-people-div"><input type="button" value="Select" name="button" onclick="SelectedParent(\''.$_REQUEST['address_id'].'\',\''.$_REQUEST['p_type'].'\',\''.$_REQUEST['other_p_erson_id'].'\')"></div>';

function makeChooseCheckbox($value, $title) {
global $THIS_RET;
Expand Down
4 changes: 2 additions & 2 deletions Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
switch ($_GET['validate'])
{
case 'pass':
$res_pass_chk = DBQuery("SELECT * FROM login_authentication WHERE password = '".md5($_GET['password'])."' AND user_id!='".$_GET['stfid']."' AND profile_id!=0");
$res_pass_chk = DBQuery("SELECT * FROM login_authentication WHERE password = '".md5($_GET['password'])."' AND user_id!='".$_GET['stfid']."' AND profile_id=0");
$num_pass = $res_pass_chk->num_rows;
if($num_pass==0)
{
Expand All @@ -48,7 +48,7 @@
break;

case 'pass_o':
$res_pass_chk = DBQuery("SELECT * FROM login_authentication WHERE password = '".md5($_GET['password'])."'");
$res_pass_chk = DBQuery("SELECT * FROM login_authentication WHERE password = '".md5($_GET['password'])."' AND profile_id=0");
$num_pass = $res_pass_chk->num_rows;
if($num_pass==0)
{
Expand Down
6 changes: 3 additions & 3 deletions assets/css/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ a.badge,
.page-container {
position: relative;
padding: 20px 20px;
padding-bottom: 60px;
/*padding-bottom: 60px;*/
}
.navbar-bottom .page-container,
.navbar-bottom-lg .page-container,
Expand Down Expand Up @@ -1248,14 +1248,14 @@ a.badge,
*
* ---------------------------------------------------------------------------- */
.footer {
position: absolute;
/*position: absolute;*/
left: 20px;
right: 20px;
bottom: 30px;
font-size: 13px;
}
.footer:not(.navbar-fixed-bottom) {
z-index: 1000;
z-index: 2;
}
.footer.navbar {
left: 0;
Expand Down
5 changes: 5 additions & 0 deletions assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ li.list-group-item:hover {
.modal-dialog.modal-xl {
width: 85%;
}
div.form-control {
height: auto;
min-height: 38px;
word-wrap: break-word;
}
/* Bootstrap Overwrite End */

.sidebar-user-material-content > a {
Expand Down
Loading

0 comments on commit 3905367

Please sign in to comment.