Esempio n. 1
0
    PopTable('header', 'Log Details');
    echo '<div align=center style="padding-top:20px; font-size:12px;"><strong>Please Select Date Range</strong></div>
	<TABLE border=0 width=100% align=center><tr><TD valign=top style=padding-top:14px;>';
    echo '<strong>From :</strong> </TD><TD valign=middle>';
    DrawHeader(PrepareDate($start_date, '_start'));
    echo '</TD><TD valign=top style=padding-top:14px;><strong>To :</strong> </TD><TD valign=middle>';
    DrawHeader(PrepareDate($end_date, '_end'));
    echo '</TD></TR></TABLE><div style=height:10px></div>';
    echo '<center><input type="submit" class=btn_medium value="Generate" name="generate"></center>';
    PopTable('footer');
    echo '</FORM>';
}
if ($_REQUEST['day_start'] && $_REQUEST['month_start'] && $_REQUEST['year_start']) {
    $start_date = $_REQUEST['day_start'] . '-' . $_REQUEST['month_start'] . '-' . substr($_REQUEST['year_start'], 2, 4);
    $org_start_date = $_REQUEST['day_start'] . '-' . $_REQUEST['month_start'] . '-' . $_REQUEST['year_start'];
    $conv_st_date = con_date($org_start_date);
}
if ($_REQUEST['day_end'] && $_REQUEST['month_end'] && $_REQUEST['year_end']) {
    $end_date = $_REQUEST['day_end'] . '-' . $_REQUEST['month_end'] . '-' . substr($_REQUEST['year_end'], 2, 4);
    $org_end_date = $_REQUEST['day_end'] . '-' . $_REQUEST['month_end'] . '-' . $_REQUEST['year_end'];
    $conv_end_date = con_date_end($org_end_date);
}
if ($_REQUEST['modfunc'] == 'generate') {
    if (isset($conv_st_date) && isset($conv_end_date)) {
        #$alllogs_RET = DBGet(DBQuery("SELECT DISTINCT FIRST_NAME,LAST_NAME,LOGIN_TIME,PROFILE,FAILLOG_COUNT,FAILLOG_TIME,USER_NAME,IP_ADDRESS,STATUS FROM login_records WHERE LOGIN_TIME >='".$conv_st_date."' AND LOGIN_TIME <='".$conv_end_date."' AND SCHOOL_ID=".UserSchool()." OR STATUS='Failed'  ORDER BY LOGIN_TIME DESC"));
        $alllogs_RET = DBGet(DBQuery('SELECT DISTINCT FIRST_NAME,LAST_NAME,LOGIN_TIME,PROFILE,FAILLOG_COUNT,FAILLOG_TIME,USER_NAME,IP_ADDRESS,STATUS FROM login_records WHERE LOGIN_TIME >=\'' . $conv_st_date . '\' AND LOGIN_TIME <=\'' . $conv_end_date . '\' AND SCHOOL_ID=' . UserSchool() . ' ORDER BY LOGIN_TIME DESC'));
        if (count($alllogs_RET)) {
            echo '<div>';
            #ListOutput($alllogs_RET,array('LOGIN_TIME'=>'Login Time','USER_NAME'=>'User Name','FIRST_NAME'=>'First Name','LAST_NAME'=>'Last Name','FAILLOG_COUNT'=>'Failure Count','STATUS'=>'Status','IP_ADDRESS'=>'IP Address'),'login record','login records',array(),array(),array('count'=>true,'save'=>true));
            ListOutput($alllogs_RET, array('LOGIN_TIME' => 'Login Time', 'USER_NAME' => 'User Name', 'FIRST_NAME' => 'First Name', 'LAST_NAME' => 'Last Name', 'PROFILE' => 'Profile', 'FAILLOG_COUNT' => 'Failure Count', 'STATUS' => 'Status', 'IP_ADDRESS' => 'IP Address'), 'login record', 'login records', array(), array(), array('count' => true, 'save' => true));
            echo '</div>';
Esempio n. 2
0
     } elseif ($temp_month == 'AUG') {
         $month = '-08-';
     } elseif ($temp_month == 'SEP') {
         $month = '-09-';
     } elseif ($temp_month == 'OCT') {
         $month = '-10-';
     } elseif ($temp_month == 'NOV') {
         $month = '-11-';
     } elseif ($temp_month == 'DEC') {
         $month = '-12-';
     }
     $day = substr($mother_date, 0, 2);
     $select_date = $year . $month . $day;
     return $select_date;
 }
 $convdate = con_date($start_date);
 $course_per_id = $_SESSION['MassSchedule.php']['course_period_id'];
 ////Start Date Check///////////////////
 $start_date_q = DBGet(DBQuery('SELECT START_DATE FROM school_years WHERE school_id=' . UserSchool() . ' AND syear=' . UserSyear() . ''));
 if (strtotime($start_date_q[1]['START_DATE']) > strtotime($convdate)) {
     $start_date_q_clash = 'Cannot schedule students before school start date';
 } else {
     if (strtotime($convdate) < strtotime($course_bg_date[1]['BEGIN_DATE']) || strtotime($convdate) > strtotime($course_bg_date[1]['END_DATE'])) {
         $sche_date_err = ' students schedule date should be between course start date and end date';
     } else {
         unset($start_date_q_clash);
         unset($sche_date_err);
         foreach ($_REQUEST['student'] as $index => $value) {
             $_SESSION['NOT_SCHEDULE'][$index] = $index;
             $_SESSION['NOT_SCHEDULE1'][$index] = $index;
             $stu_start_date_q = DBGet(DBQuery('SELECT START_DATE FROM student_enrollment WHERE STUDENT_ID=' . $index . ' AND school_id=' . UserSchool() . ' AND syear=' . UserSyear() . ''));
Esempio n. 3
0
        $dt_arr[0] = 12;
    }
    return implode('/', $dt_arr);
}
# --------------------------------------------- date Convertion End ------------------------------------------------- #
$final_date = con_date($temp_date);
if ($_REQUEST['dt'] == 1) {
    $final_date = $_SESSION['date_attn'];
}
$_REQUEST['dt'] = 0;
if ($_REQUEST['month_date'] && $_REQUEST['day_date'] && $_REQUEST['year_date']) {
    while (!VerifyDate($date = $_REQUEST['day_date'] . '-' . $_REQUEST['month_date'] . '-' . $_REQUEST['year_date'])) {
        $_REQUEST['day_date']--;
    }
    $posted_date = ucfirst(strtolower($_REQUEST['month_date'])) . '/' . $_REQUEST['day_date'] . '/' . $_REQUEST['year_date'];
    $final_date = con_date($posted_date);
    unset($_SESSION['date_attn']);
    $_SESSION['date_attn'] = $final_date;
} else {
    if (!$temp_date) {
        $final_date = date('n/j/Y');
        $_REQUEST['month_date'] = strtoupper(date('M'));
        $_REQUEST['day_date'] = date('j');
        $_REQUEST['year_date'] = date('y');
    } else {
        $temp_arr = explode('/', $temp_date);
        $_REQUEST['month_date'] = $temp_arr[0];
        $_REQUEST['day_date'] = $temp_arr[1];
        $_REQUEST['year_date'] = $temp_arr[2];
    }
}
Esempio n. 4
0
#  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 '../../Redirect_modules.php';
if ($_REQUEST['day_start'] && $_REQUEST['month_start'] && $_REQUEST['year_start']) {
    $start_date = $_REQUEST['day_start'] . '-' . $_REQUEST['month_start'] . '-' . $_REQUEST['year_start'];
    $st_dt = con_date($start_date);
}
if ($_REQUEST['day_end'] && $_REQUEST['month_end'] && $_REQUEST['year_end']) {
    $end_date = $_REQUEST['day_end'] . '-' . $_REQUEST['month_end'] . '-' . $_REQUEST['year_end'];
    $end_dt = con_date($end_date);
}
if ($_REQUEST['chk_pro']) {
    $progress = $_REQUEST['chk_pro'];
}
if ($_REQUEST['modfunc'] == 'save') {
    if (count($_REQUEST['st_arr'])) {
        $st_list = '\'' . implode('\',\'', $_REQUEST['st_arr']) . '\'';
        $extra['WHERE'] = " AND s.STUDENT_ID IN ({$st_list})";
        //$extra['functions'] = array('GRADE_ID'=>'_grade_id');
        if ($_REQUEST['mailing_labels'] == 'Y') {
            Widgets('mailing_labels');
        }
        $RET = GetStuList($extra);
        if (count($RET)) {
            include 'modules/Students/includes/functions.php';
Esempio n. 5
0
     $st_time = DBGet(DBQuery("SELECT START_TIME, END_TIME FROM SCHOOL_PERIODS WHERE PERIOD_ID = {$period_id} "));
 }
 /********* for homeroom scheduling*/
 $start_time = $st_time[1]['START_TIME'];
 $min_start_time = get_min($start_time);
 $end_time = $st_time[1]['END_TIME'];
 $min_end_time = get_min($end_time);
 #$sql = "SELECT COURSE_PERIOD_ID,START_DATE FROM SCHEDULE WHERE STUDENT_ID = ".UserStudentID()." AND (END_DATE IS NULL OR END_DATE>CURRENT_DATE) AND SCHOOL_ID='".UserSchool()."' AND MARKING_PERIOD_ID='".$mp_id."'";
 // edited 7.12.2009
 $sql = "SELECT COURSE_PERIOD_ID,START_DATE FROM SCHEDULE WHERE STUDENT_ID = " . UserStudentID() . " AND (END_DATE IS NULL OR END_DATE>CURRENT_DATE) AND SCHOOL_ID='" . UserSchool() . "' AND COURSE_PERIOD_ID NOT IN (SELECT COURSE_PERIOD_ID FROM COURSE_PERIODS CP,SCHOOL_PERIODS SP WHERE CP.PERIOD_ID=SP.PERIOD_ID AND SP.IGNORE_SCHEDULING != '')  AND MARKING_PERIOD_ID='" . $mp_id . "'";
 $xyz = mysql_query($sql);
 $time_clash_conflict = false;
 while ($coue_p_id = mysql_fetch_array($xyz)) {
     $cp_id = $coue_p_id[0];
     $st_dt = $coue_p_id[1];
     $convdate = con_date($st_dt);
     $sel_per_id = DBGet(DBQuery("SELECT COURSE_PERIOD_ID, PERIOD_ID, DAYS, MARKING_PERIOD_ID FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID = {$cp_id}"));
     $sel_period_id = $sel_per_id[1]['PERIOD_ID'];
     $sel_days = $sel_per_id[1]['DAYS'];
     $sel_mp = $sel_per_id[1]['MARKING_PERIOD_ID'];
     $sel_cp = $sel_per_id[1]['COURSE_PERIOD_ID'];
     $sel_st_time = DBGet(DBQuery("SELECT START_TIME, END_TIME FROM SCHOOL_PERIODS WHERE PERIOD_ID = {$sel_period_id}"));
     if ($sel_st_time) {
         $sel_start_time = $sel_st_time[1]['START_TIME'];
         $min_sel_start_time = get_min($sel_start_time);
         $sel_end_time = $sel_st_time[1]['END_TIME'];
         $min_sel_end_time = get_min($sel_end_time);
         # ---------------------------- Days conflict ------------------------------------ #
         $j = 0;
         for ($i = 0; $i < $day_st_count; $i++) {
             $clip = substr($days, $i, 1);
Esempio n. 6
0
        $day = '06';
    } elseif ($temp_day == 7) {
        $day = '07';
    } elseif ($temp_day == 8) {
        $day = '08';
    } elseif ($temp_day == 9) {
        $day = '09';
    } else {
        $day = $temp_day;
    }
    #$select_date = $year.$month.$day;
    $select_date = $day . '-' . $month . '-' . $year;
    return $select_date;
}
# --------------------------------------------- date Convertion End ------------------------------------------------- #
$final_date = con_date($temp_date);
if ($_REQUEST['dt'] == 1) {
    $final_date = $_SESSION['date_attn'];
}
$_REQUEST['dt'] = 0;
if ($_REQUEST['month_date'] && $_REQUEST['day_date'] && $_REQUEST['year_date']) {
    if (strlen($_REQUEST['year_date']) == 4) {
        while (!VerifyDate($date = $_REQUEST['day_date'] . '-' . $_REQUEST['month_date'] . '-' . substr($_REQUEST['year_date'], 2, 4))) {
            $_REQUEST['day_date']--;
        }
    } else {
        while (!VerifyDate($date = $_REQUEST['day_date'] . '-' . $_REQUEST['month_date'] . '-' . $_REQUEST['year_date'])) {
            $_REQUEST['day_date']--;
        }
    }
    unset($_SESSION['date_attn']);