当前位置: 首页>>代码示例>>PHP>>正文


PHP DeletePromptX函数代码示例

本文整理汇总了PHP中DeletePromptX函数的典型用法代码示例。如果您正苦于以下问题:PHP DeletePromptX函数的具体用法?PHP DeletePromptX怎么用?PHP DeletePromptX使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DeletePromptX函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: StaffWidgets

<?php

StaffWidgets('fsa_status_active');
StaffWidgets('fsa_barcode');
StaffWidgets('fsa_exists_Y');
Search('staff_id', $extra);
if ($_REQUEST['modfunc'] == 'submit') {
    if ($_REQUEST['submit']['cancel']) {
        if (DeletePromptX(_('Sale'), _('Cancel'))) {
            unset($_SESSION['FSA_sale']);
        }
    } elseif ($_REQUEST['submit']['save']) {
        if (count($_SESSION['FSA_sale'])) {
            $items_RET = DBGet(DBQuery("SELECT DESCRIPTION,SHORT_NAME,PRICE_STAFF FROM FOOD_SERVICE_ITEMS WHERE SCHOOL_ID='" . UserSchool() . "'"), array(), array('SHORT_NAME'));
            // get next transaction id
            $id = DBGet(DBQuery('SELECT ' . db_seq_nextval('FOOD_SERVICE_STAFF_TRANSACTIONS_SEQ') . ' AS SEQ_ID ' . FROM_DUAL));
            $id = $id[1]['SEQ_ID'];
            $item_id = 0;
            foreach ($_SESSION['FSA_sale'] as $item_sn) {
                $price = $items_RET[$item_sn][1]['PRICE_STAFF'];
                $fields = 'ITEM_ID,TRANSACTION_ID,AMOUNT,SHORT_NAME,DESCRIPTION';
                $values = "'" . $item_id++ . "','" . $id . "','-" . $price . "','" . $items_RET[$item_sn][1]['SHORT_NAME'] . "','" . $items_RET[$item_sn][1]['DESCRIPTION'] . "'";
                $sql = "INSERT INTO FOOD_SERVICE_STAFF_TRANSACTION_ITEMS (" . $fields . ") values (" . $values . ")";
                DBQuery($sql);
            }
            $sql1 = "UPDATE FOOD_SERVICE_STAFF_ACCOUNTS SET TRANSACTION_ID='" . $id . "',BALANCE=BALANCE+(SELECT sum(AMOUNT) FROM FOOD_SERVICE_STAFF_TRANSACTION_ITEMS WHERE TRANSACTION_ID='" . $id . "') WHERE STAFF_ID='" . UserStaffID() . "'";
            $fields = 'TRANSACTION_ID,STAFF_ID,SYEAR,SCHOOL_ID,BALANCE,TIMESTAMP,SHORT_NAME,DESCRIPTION,SELLER_ID';
            $values = "'" . $id . "','" . UserStaffID() . "','" . UserSyear() . "','" . UserSchool() . "',(SELECT BALANCE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID='" . UserStaffID() . "'),CURRENT_TIMESTAMP,'" . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . "','" . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . ' - ' . DBDate() . "','" . User('STAFF_ID') . "'";
            $sql2 = 'INSERT INTO FOOD_SERVICE_STAFF_TRANSACTIONS (' . $fields . ') values (' . $values . ')';
            DBQuery('BEGIN; ' . $sql1 . '; ' . $sql2 . '; COMMIT');
            unset($_SESSION['FSA_sale']);
开发者ID:linil,项目名称:centreSIS,代码行数:31,代码来源:ServeMenus.php

示例2: DBQuery

                    if ($go) {
                        DBQuery($sql);
                    }
                }
            }
        }
    }
    unset($_REQUEST['modfunc']);
}
if ($_REQUEST['modfunc'] == 'remove') {
    if ($_REQUEST['tab_id'] != 'new') {
        if (DeletePromptX('Report Card Grade')) {
            DBQuery("DELETE FROM REPORT_CARD_GRADES WHERE ID='{$_REQUEST['id']}'");
        }
    } else {
        if (DeletePromptX('Report Card Grading Scale')) {
            DBQuery("DELETE FROM REPORT_CARD_GRADES WHERE GRADE_SCALE_ID='{$_REQUEST['id']}'");
            DBQuery("DELETE FROM REPORT_CARD_GRADE_SCALES WHERE ID='{$_REQUEST['id']}'");
            unset($_SESSION['GR_scale_id']);
        }
    }
}
if (!$_REQUEST['modfunc']) {
    if (User('PROFILE') == 'admin') {
        $grade_scales_RET = DBGet(DBQuery('SELECT ID,TITLE FROM REPORT_CARD_GRADE_SCALES WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY SORT_ORDER'), array(), array('ID'));
        if (!$_REQUEST['tab_id']) {
            if (!$_SESSION['GR_scale_id']) {
                if (count($grade_scales_RET)) {
                    $_REQUEST['tab_id'] = $_SESSION['GR_scale_id'] = key($grade_scales_RET);
                } else {
                    $_REQUEST['tab_id'] = 'new';
开发者ID:SoftScape,项目名称:opensis,代码行数:31,代码来源:ReportCardGrades.php

示例3: DrawHeader

<?php

require_once 'modules/Grades/DeletePromptX.fnc.php';
DrawHeader(ProgramTitle());
if ($_REQUEST['modfunc'] == 'delete' && AllowEdit()) {
    //modif Francois: add translation
    if ($dp = DeletePromptX(_('Final Grade'))) {
        DBQuery("DELETE FROM STUDENT_REPORT_CARD_GRADES WHERE SYEAR='" . UserSyear() . "' AND STUDENT_ID='" . $_REQUEST['student_id'] . "' AND COURSE_PERIOD_ID='" . $_REQUEST['course_period_id'] . "' AND MARKING_PERIOD_ID='" . $_REQUEST['marking_period_id'] . "'");
        DBQuery("DELETE FROM STUDENT_REPORT_CARD_COMMENTS WHERE SYEAR='" . UserSyear() . "' AND STUDENT_ID='" . $_REQUEST['student_id'] . "' AND COURSE_PERIOD_ID='" . $_REQUEST['course_period_id'] . "' AND MARKING_PERIOD_ID='" . $_REQUEST['marking_period_id'] . "'");
        $_REQUEST['modfunc'] = 'save';
    } elseif ($dp === false) {
        $_REQUEST['modfunc'] = 'save';
    }
}
if (isset($_REQUEST['modfunc']) && $_REQUEST['modfunc'] == 'save') {
    if (count($_REQUEST['mp_arr']) && count($_REQUEST['st_arr'])) {
        $mp_list = '\'' . implode('\',\'', $_REQUEST['mp_arr']) . '\'';
        $last_mp = end($_REQUEST['mp_arr']);
        $st_list = '\'' . implode('\',\'', $_REQUEST['st_arr']) . '\'';
        $extra['WHERE'] = " AND s.STUDENT_ID IN ({$st_list})";
        $extra['SELECT'] .= ",rpg.TITLE as GRADE_TITLE,sg1.GRADE_PERCENT,sg1.COMMENT as COMMENT_TITLE,sg1.STUDENT_ID,sg1.COURSE_PERIOD_ID,sg1.MARKING_PERIOD_ID,c.TITLE as COURSE_TITLE,rc_cp.TITLE AS TEACHER,sp.SORT_ORDER";
        if ($_REQUEST['elements']['period_absences'] == 'Y') {
            //modif: SQL error fix: operator does not exist: character varying = integer, add explicit type casts
            $extra['SELECT'] .= ",rc_cp.DOES_ATTENDANCE,\n\t\t\t\t\t(SELECT count(*) FROM ATTENDANCE_PERIOD ap,ATTENDANCE_CODES ac\n\t\t\t\t\t\tWHERE ac.ID=ap.ATTENDANCE_CODE AND ac.STATE_CODE='A' AND ap.COURSE_PERIOD_ID=sg1.COURSE_PERIOD_ID AND ap.STUDENT_ID=ssm.STUDENT_ID) AS YTD_ABSENCES,\n\t\t\t\t\t(SELECT count(*) FROM ATTENDANCE_PERIOD ap,ATTENDANCE_CODES ac\n\t\t\t\t\t\tWHERE ac.ID=ap.ATTENDANCE_CODE AND ac.STATE_CODE='A' AND ap.COURSE_PERIOD_ID=sg1.COURSE_PERIOD_ID AND cast(sg1.MARKING_PERIOD_ID as integer)=ap.MARKING_PERIOD_ID AND ap.STUDENT_ID=ssm.STUDENT_ID) AS MP_ABSENCES";
        }
        if ($_REQUEST['elements']['comments'] == 'Y') {
            $extra['SELECT'] .= ',sg1.MARKING_PERIOD_ID AS COMMENTS_RET';
        }
        //modif Francois: multiple school periods for a course period
        /*$extra['FROM'] .= ",STUDENT_REPORT_CARD_GRADES sg1 LEFT OUTER JOIN REPORT_CARD_GRADES rpg ON (rpg.ID=sg1.REPORT_CARD_GRADE_ID),
        		COURSE_PERIODS rc_cp,COURSES c,SCHOOL_PERIODS sp";*/
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:FinalGrades.php

示例4: DrawBC

//$header = "";
//DrawHeader(($_REQUEST['type']=='staff'?'User ':'Student ').ProgramTitle(),'<TABLE bgcolor=#ffffff><TR><TD>'.$header.'</TD></TR></TABLE>');
DrawBC("Food Service >> " . ProgramTitle());
if ($_REQUEST['modfunc'] == 'delete') {
    require_once 'modules/Food_Service/includes/DeletePromptX.fnc.php';
    if ($_REQUEST['item_id'] != '') {
        if (DeletePromptX('transaction item')) {
            require_once 'modules/Food_Service/includes/DeleteTransactionItem.fnc.php';
            DeleteTransactionItem($_REQUEST['transaction_id'], $_REQUEST['item_id'], $_REQUEST['type']);
            unset($_REQUEST['modfunc']);
            unset($_REQUEST['delete_ok']);
            unset($_SESSION['_REQUEST_vars']['modfunc']);
            unset($_SESSION['_REQUEST_vars']['delete_ok']);
        }
    } else {
        if (DeletePromptX('transaction')) {
            require_once 'modules/Food_Service/includes/DeleteTransaction.fnc.php';
            DeleteTransaction($_REQUEST['transaction_id'], $_REQUEST['type']);
            unset($_REQUEST['modfunc']);
            unset($_REQUEST['delete_ok']);
            unset($_SESSION['_REQUEST_vars']['modfunc']);
            unset($_SESSION['_REQUEST_vars']['delete_ok']);
        }
    }
}
if (!$_REQUEST['modfunc']) {
    $types = array('DEPOSIT' => 'Deposit', 'CREDIT' => 'Credit', 'DEBIT' => 'Debit');
    $menus_RET = DBGet(DBQuery('SELECT TITLE FROM FOOD_SERVICE_MENUS WHERE SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER'));
    $type_select = 'Type<SELECT name=type_select><OPTION value=\'\'>Not Specified</OPTION>';
    foreach ($types as $short_name => $type) {
        $type_select .= '<OPTION value=' . $short_name . ($_REQUEST['type_select'] == $short_name ? ' SELECTED' : '') . '>' . $type . '</OPTION>';
开发者ID:SoftScape,项目名称:opensis,代码行数:31,代码来源:Statements.php

示例5: DBQuery

<?php

require_once 'modules/Grades/DeletePromptX.fnc.php';
if ($_REQUEST['modfunc'] == 'delete') {
    if ($dp = DeletePromptX('final grade')) {
        DBQuery("DELETE FROM STUDENT_REPORT_CARD_GRADES WHERE SYEAR='" . UserSyear() . "' AND STUDENT_ID='" . $_REQUEST['student_id'] . "' AND COURSE_PERIOD_ID='" . $_REQUEST['course_period_id'] . "' AND MARKING_PERIOD_ID='" . $_REQUEST['marking_period_id'] . "'");
        DBQuery("DELETE FROM STUDENT_REPORT_CARD_COMMENTS WHERE SYEAR='" . UserSyear() . "' AND STUDENT_ID='" . $_REQUEST['student_id'] . "' AND COURSE_PERIOD_ID='" . $_REQUEST['course_period_id'] . "' AND MARKING_PERIOD_ID='" . $_REQUEST['marking_period_id'] . "'");
        $_REQUEST['modfunc'] = 'save';
    } elseif ($dp === false) {
        $_REQUEST['modfunc'] = 'save';
    }
}
if ($_REQUEST['modfunc'] == 'save') {
    if (count($_REQUEST['mp_arr']) && count($_REQUEST['st_arr'])) {
        $mp_list = '\'' . implode('\',\'', $_REQUEST['mp_arr']) . '\'';
        $last_mp = end($_REQUEST['mp_arr']);
        $st_list = '\'' . implode('\',\'', $_REQUEST['st_arr']) . '\'';
        $extra['WHERE'] = " AND s.STUDENT_ID IN ({$st_list})";
        $extra['SELECT'] .= ",rpg.TITLE as GRADE_TITLE,sg1.GRADE_PERCENT,sg1.COMMENT as COMMENT_TITLE,sg1.STUDENT_ID,sg1.COURSE_PERIOD_ID,sg1.MARKING_PERIOD_ID,c.TITLE as COURSE_TITLE,rc_cp.TITLE AS TEACHER,sp.SORT_ORDER";
        if ($_REQUEST['elements']['period_absences'] == 'Y') {
            $extra['SELECT'] .= ",rc_cp.DOES_ATTENDANCE,\n\t\t\t\t(SELECT count(*) FROM ATTENDANCE_PERIOD ap,ATTENDANCE_CODES ac\n\t\t\t\t\tWHERE ac.ID=ap.ATTENDANCE_CODE AND ac.STATE_CODE='A' AND ap.COURSE_PERIOD_ID=sg1.COURSE_PERIOD_ID AND ap.STUDENT_ID=ssm.STUDENT_ID) AS YTD_ABSENCES,\n\t\t\t\t(SELECT count(*) FROM ATTENDANCE_PERIOD ap,ATTENDANCE_CODES ac\n\t\t\t\t\tWHERE ac.ID=ap.ATTENDANCE_CODE AND ac.STATE_CODE='A' AND ap.COURSE_PERIOD_ID=sg1.COURSE_PERIOD_ID AND sg1.MARKING_PERIOD_ID=ap.MARKING_PERIOD_ID AND ap.STUDENT_ID=ssm.STUDENT_ID) AS MP_ABSENCES";
        }
        if ($_REQUEST['elements']['comments'] == 'Y') {
            $extra['SELECT'] .= ',sg1.MARKING_PERIOD_ID AS COMMENTS_RET';
        }
        $extra['FROM'] .= ",STUDENT_REPORT_CARD_GRADES sg1 LEFT OUTER JOIN REPORT_CARD_GRADES rpg ON (rpg.ID=sg1.REPORT_CARD_GRADE_ID),\n\t\t\t\t\tCOURSE_PERIODS rc_cp,COURSES c,SCHOOL_PERIODS sp";
        $extra['WHERE'] .= " AND sg1.MARKING_PERIOD_ID IN (" . $mp_list . ")\n\t\t\t\t\tAND rc_cp.COURSE_PERIOD_ID=sg1.COURSE_PERIOD_ID AND c.COURSE_ID = rc_cp.COURSE_ID AND sg1.STUDENT_ID=ssm.STUDENT_ID AND sp.PERIOD_ID=rc_cp.PERIOD_ID";
        $extra['ORDER'] .= ",sp.SORT_ORDER,c.TITLE";
        $extra['functions']['TEACHER'] = '_makeTeacher';
        if ($_REQUEST['elements']['comments'] == 'Y') {
            $extra['functions']['COMMENTS_RET'] = '_makeComments';
开发者ID:linil,项目名称:centreSIS,代码行数:31,代码来源:FinalGrades.php

示例6: unset

        }
    }
    unset($_REQUEST['modfunc']);
}
if (clean_param($_REQUEST['modfunc'], PARAM_ALPHAMOD) == 'remove') {
    $has_assigned_RET = DBGet(DBQuery("SELECT COUNT(*) AS TOTAL_ASSIGNED FROM STUDENT_REPORT_CARD_COMMENTS WHERE REPORT_CARD_COMMENT_ID='{$_REQUEST['id']}'"));
    $has_assigned = $has_assigned_RET[1]['TOTAL_ASSIGNED'];
    if ($has_assigned > 0) {
        UnableDeletePromptX('Cannot delete because report card comments are associated.');
    } else {
        if ($_REQUEST['tab_id'] != 'new') {
            if (DeletePromptX('Report Card Comment')) {
                DBQuery("DELETE FROM REPORT_CARD_COMMENTS WHERE ID='{$_REQUEST['id']}'");
            }
        } else {
            if (DeletePromptX('Report Card Comment')) {
                DBQuery("DELETE FROM REPORT_CARD_COMMENTS WHERE ID='{$_REQUEST['id']}'");
            }
        }
    }
}
if (!$_REQUEST['modfunc']) {
    if (User('PROFILE') == 'admin') {
        $courses_RET = DBGet(DBQuery("SELECT TITLE,COURSE_ID FROM COURSES WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' AND COURSE_ID IN (SELECT DISTINCT COURSE_ID FROM COURSE_PERIODS WHERE GRADE_SCALE_ID IS NOT NULL) ORDER BY TITLE"));
        if (!$_REQUEST['course_id']) {
            $_REQUEST['course_id'] = $courses_RET[1]['COURSE_ID'];
        }
        $course_select = '<SELECT name=course_id onchange="document.location.href=\'Modules.php?modname=' . $_REQUEST['modname'] . '&course_id=\'+this.options[selectedIndex].value">';
        foreach ($courses_RET as $course) {
            $course_select .= '<OPTION value=' . $course['COURSE_ID'] . ($_REQUEST['course_id'] == $course['COURSE_ID'] ? ' SELECTED' : '') . '>' . $course['TITLE'] . '</OPTION>';
        }
开发者ID:26746647,项目名称:Belize-openSIS,代码行数:31,代码来源:ReportCardComments.php

示例7: DBQuery

<?php

if ($_REQUEST['modfunc'] == 'update') {
    if (UserStaffID() && AllowEdit()) {
        if ($_REQUEST['submit']['delete']) {
            if (DeletePromptX('User Account')) {
                DBQuery('DELETE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=' . UserStaffID());
            }
            //unset($_REQUEST['submit']);
        } else {
            if (count($_REQUEST['food_service'])) {
                $sql = 'UPDATE FOOD_SERVICE_STAFF_ACCOUNTS SET ';
                foreach ($_REQUEST['food_service'] as $column_name => $value) {
                    $sql .= $column_name . '=\'' . str_replace("\\'", "''", str_replace("`", "''", trim($value))) . '\',';
                }
                $sql = substr($sql, 0, -1) . ' WHERE STAFF_ID=' . $_REQUEST['staff_id'];
                DBQuery($sql);
            }
            unset($_REQUEST['modfunc']);
        }
    } else {
        unset($_REQUEST['modfunc']);
    }
}
if ($_REQUEST['modfunc'] == 'create') {
    if (UserStaffID() && AllowEdit()) {
        if (count($_REQUEST['food_service'])) {
            $fields = 'STAFF_ID,BALANCE,TRANSACTION_ID,';
            $values = UserStaffID() . ',0.00,0,';
            foreach ($_REQUEST['food_service'] as $column_name => $value) {
                $fields .= $column_name . ',';
开发者ID:SoftScape,项目名称:opensis,代码行数:31,代码来源:Accounts.php

示例8: substr

                        if ($column != 'ASSIGNMENT_TYPE_ID' && $column != 'ASSIGNED_DATE' && $column != 'DUE_DATE') {
                            $go = true;
                        }
                    }
                }
                $sql .= '(' . substr($fields, 0, -1) . ') values(' . substr($values, 0, -1) . ')';
                if ($go) {
                    DBQuery($sql);
                }
            }
        }
    }
    unset($_REQUEST['modfunc']);
}
if ($_REQUEST['modfunc'] == 'remove') {
    if (DeletePromptX($_REQUEST['tab_id'] != 'new' ? 'assignment' : 'assignment type')) {
        if ($_REQUEST['tab_id'] != 'new') {
            DBQuery("DELETE FROM GRADEBOOK_GRADES WHERE ASSIGNMENT_ID='{$_REQUEST['id']}'");
            DBQuery("DELETE FROM GRADEBOOK_ASSIGNMENTS WHERE ASSIGNMENT_ID='{$_REQUEST['id']}'");
        } else {
            $assignments_RET = DBGet(DBQuery("SELECT ASSIGNMENT_ID FROM GRADEBOOK_ASSIGNMENTS WHERE ASSIGNMENT_TYPE_ID='{$_REQUEST['id']}'"));
            if (count($assignments_RET)) {
                foreach ($assignments_RET as $assignment_id) {
                    DBQuery("DELETE FROM GRADEBOOK_GRADES WHERE ASSIGNMENT_ID='" . $assignment_id['ASSIGNMENT_ID'] . "'");
                }
            }
            DBQuery("DELETE FROM GRADEBOOK_ASSIGNMENTS WHERE ASSIGNMENT_TYPE_ID='{$_REQUEST['id']}'");
            DBQuery("DELETE FROM GRADEBOOK_ASSIGNMENT_TYPES WHERE ASSIGNMENT_TYPE_ID='{$_REQUEST['id']}'");
        }
        unset($_REQUEST['id']);
        unset($_REQUEST['modfunc']);
开发者ID:linil,项目名称:centreSIS,代码行数:31,代码来源:Assignments-new.php

示例9: str_replace

                if ($value) {
                    $fields .= $column . ',';
                    $values .= '\'' . str_replace("\\'", "''", $value) . '\',';
                    $go = true;
                }
            }
            $sql .= '(' . substr($fields, 0, -1) . ') values(' . substr($values, 0, -1) . ')';
            if ($go && trim($columns['NAME'])) {
                DBQuery($sql);
            }
        }
    }
    unset($_REQUEST['modfunc']);
}
if ($_REQUEST['modfunc'] == 'remove') {
    if (DeletePromptX('History Marking Period')) {
        DBQuery('DELETE FROM history_marking_periods WHERE MARKING_PERIOD_ID=\'' . $_REQUEST['id'] . '\'');
    }
}
if (!$_REQUEST['modfunc']) {
    echo "<FORM action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&modfunc=update&tab_id=" . strip_tags(trim($_REQUEST[tab_id])) . "&mp_id={$mp_id} method=POST>";
    DrawHeader('', SubmitButton('Save', '', 'class=btn_medium'));
    echo '<BR>';
    $sql = 'SELECT * FROM history_marking_periods WHERE SCHOOL_ID = ' . UserSchool() . ' ORDER BY POST_END_DATE';
    $functions = array('MP_TYPE' => 'makeSelectInput', 'NAME' => 'makeTextInput', 'POST_END_DATE' => 'makeDateInput', 'SYEAR' => 'makeSchoolYearSelectInput');
    $LO_columns = array('MP_TYPE' => 'Type', 'NAME' => 'Name', 'POST_END_DATE' => 'Grade Post Date', 'SYEAR' => 'School Year');
    $link['add']['html'] = array('MP_TYPE' => makeSelectInput('', 'MP_TYPE'), 'NAME' => makeTextInput('', 'NAME'), 'POST_END_DATE' => makeDateInput('', 'POST_END_DATE'), 'SYEAR' => makeSchoolYearSelectInput('', 'SYEAR'));
    $link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove";
    //&mp_id=$mp_id";
    $link['remove']['variables'] = array('id' => 'MARKING_PERIOD_ID');
    $link['add']['html']['remove'] = button('add');
开发者ID:jeffthestampede,项目名称:excelsior,代码行数:31,代码来源:EditHistoryMarkingPeriods.php

示例10: DBQuery

                    if ($go) {
                        DBQuery($sql);
                    }
                }
            }
        }
    }
    unset($_REQUEST['modfunc']);
}
if ($_REQUEST['modfunc'] == 'remove') {
    if ($_REQUEST['tab_id'] != 'new') {
        if (DeletePromptX(_('Meal Item'))) {
            DBQuery("DELETE FROM FOOD_SERVICE_MENU_ITEMS WHERE MENU_ID='{$_REQUEST['tab_id']}' AND MENU_ITEM_ID='{$_REQUEST['menu_item_id']}'");
        }
    } else {
        if (DeletePromptX(_('Item'))) {
            DBQuery("DELETE FROM FOOD_SERVICE_MENU_ITEMS WHERE ITEM_ID='{$_REQUEST['item_id']}'");
            DBQuery("DELETE FROM FOOD_SERVICE_ITEMS WHERE ITEM_ID='{$_REQUEST['item_id']}'");
        }
    }
}
if (!$_REQUEST['modfunc']) {
    $menus_RET = DBGet(DBQuery('SELECT MENU_ID,TITLE FROM FOOD_SERVICE_MENUS WHERE SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER'), array(), array('MENU_ID'));
    if ($_REQUEST['tab_id']) {
        if ($_REQUEST['tab_id'] != 'new') {
            if ($menus_RET[$_REQUEST['tab_id']]) {
                $_SESSION['FSA_menu_id'] = $_REQUEST['tab_id'];
            } elseif (count($menus_RET)) {
                $_REQUEST['tab_id'] = $_SESSION['FSA_menu_id'] = key($menus_RET);
            } else {
                $_REQUEST['tab_id'] = 'new';
开发者ID:linil,项目名称:centreSIS,代码行数:31,代码来源:MenuItems.php

示例11: str_replace

                        $fields .= $column . ',';
                        $values .= '\'' . str_replace("\\'", "''", str_replace("'", "\\'", $value)) . '\',';
                        $go = true;
                    }
                }
                $sql .= '(' . substr($fields, 0, -1) . ') values(' . substr($values, 0, -1) . ')';
                if ($go) {
                    DBQuery($sql);
                }
            }
        }
    }
    unset($_REQUEST['modfunc']);
}
if (clean_param($_REQUEST['modfunc'], PARAM_ALPHAMOD) == 'remove') {
    if (DeletePromptX('Honor Roll')) {
        DBQuery("DELETE FROM honor_roll WHERE id='{$_REQUEST['id']}'");
    }
}
if (!$_REQUEST['modfunc']) {
    $sql = 'SELECT TITLE,VALUE, id as ID FROM honor_roll WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY VALUE';
    $functions = array('TITLE' => '_makeTextInput', 'VALUE' => 'makeTextInputt');
    $LO_columns = array('TITLE' => 'Honor Roll', 'VALUE' => 'Breakoff');
    $link['add']['html'] = array('TITLE' => _makeTextInput('', 'TITLE'), 'VALUE' => makeTextInputt('', 'VALUE'));
    $link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove";
    $link['remove']['variables'] = array('id' => 'ID');
    $link['add']['html']['remove'] = button('add');
    $LO_ret = DBGet(DBQuery($sql), $functions);
    $tabs = array();
    $tabs[] = array('title' => 'Honor Roll Setup');
    echo "<FORM name=F1 id=F1 action=Modules.php?modname={$_REQUEST['modname']}&modfunc=update method=POST>";
开发者ID:26746647,项目名称:openSIS,代码行数:31,代码来源:HonorRollSetup.php

示例12: StaffWidgets

<?php

StaffWidgets('fsa_barcode');
StaffWidgets('fsa_exists_Y');
Search('staff_id', $extra);
if ($_REQUEST['modfunc'] == 'modify') {
    if (UserStaffID() && AllowEdit()) {
        if ($_REQUEST['submit']['cancel']) {
            if (DeletePromptX('Sale', 'Cancel')) {
                unset($_SESSION['SALE']);
            }
            unset($_REQUEST['submit']);
        } elseif ($_REQUEST['submit']['complete']) {
            if (count($_SESSION['SALE'])) {
                // get next transaction id
                $id = DBGet(DBQuery('SELECT ' . db_seq_nextval('FOOD_SERVICE_STAFF_TRANSACTIONS_SEQ') . ' AS SEQ_ID ' . FROM_DUAL));
                $id = $id[1]['SEQ_ID'];
                foreach ($_SESSION['SALE'] as $key => $item) {
                    $sql = 'INSERT INTO FOOD_SERVICE_STAFF_TRANSACTION_ITEMS';
                    $fields = 'ITEM_ID,TRANSACTION_ID,AMOUNT,SHORT_NAME,DESCRIPTION';
                    $values = $key . ',' . $id . ',-' . $item['PRICE'] . ',\'' . $item['SHORT_NAME'] . '\',\'' . $item['DESCRIPTION'] . '\'';
                    $sql = 'INSERT INTO FOOD_SERVICE_STAFF_TRANSACTION_ITEMS (' . $fields . ') values (' . $values . ')';
                    DBQuery($sql);
                }
                $sql1 = 'UPDATE FOOD_SERVICE_STAFF_ACCOUNTS SET TRANSACTION_ID=' . $id . ',BALANCE=BALANCE+(SELECT sum(AMOUNT) FROM FOOD_SERVICE_STAFF_TRANSACTION_ITEMS WHERE TRANSACTION_ID=' . $id . ') WHERE STAFF_ID=' . UserStaffID();
                $fields = 'TRANSACTION_ID,STAFF_ID,SYEAR,BALANCE,TIMESTAMP,SHORT_NAME,DESCRIPTION,SELLER_ID';
                $values = $id . ',' . UserStaffID() . ',' . UserSyear() . ',(SELECT BALANCE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=' . UserStaffID() . '),CURRENT_TIMESTAMP,\'LUNCH\',\'Lunch\',' . User('STAFF_ID');
                $sql2 = 'INSERT INTO FOOD_SERVICE_STAFF_TRANSACTIONS (' . $fields . ') values (' . $values . ')';
                DBQuery('BEGIN; ' . $sql1 . '; ' . $sql2 . '; COMMIT');
                unset($_SESSION['SALE']);
            }
开发者ID:SoftScape,项目名称:opensis,代码行数:31,代码来源:Lunch.php

示例13: DBGet

	WHERE s.marking_period_id=\'' . $stu_val['MARKING_PERIOD_ID'] . '\' AND s.course_period_id IS NULL AND s.gpa_cal=\'Y\' AND 
	s.student_id=\'' . $stu_val['STUDENT_ID'] . '\') gg ON gg.student_id=g.student_id
    SET g.cum_unweighted_factor=gg.cum_unweighted_factor
    WHERE g.student_id=\'' . $stu_val['STUDENT_ID'] . '\'');
        $stu_gpa_cal = DBGet(DBQuery('SELECT COUNT(*) AS COUNT FROM student_gpa_calculated WHERE marking_period_id=\'' . $stu_val['MARKING_PERIOD_ID'] . '\' AND student_id=\'' . $stu_val['STUDENT_ID'] . '\''));
        if ($stu_gpa_cal[1]['COUNT'] != 0) {
            DBQuery('UPDATE student_gpa_calculated SET gpa=\'' . $res[1]['GPA'] . '\', weighted_gpa=\'' . $res[1]['WEIGHTED_GPA'] . '\',unweighted_gpa=\'' . $res[1]['UNWEIGHTED_GPA'] . '\' WHERE marking_period_id=\'' . $stu_val['MARKING_PERIOD_ID'] . '\' AND student_id=\'' . $stu_val['STUDENT_ID'] . '\'');
        } else {
            DBQuery('INSERT INTO student_gpa_calculated(student_id,marking_period_id,mp,gpa,weighted_gpa,unweighted_gpa,grade_level_short)
      VALUES(\'' . $stu_val['STUDENT_ID'] . '\',\'' . $stu_val['MARKING_PERIOD_ID'] . '\',\'' . $stu_val['MARKING_PERIOD_ID'] . '\',\'' . $res[1]['GPA'] . '\',\'' . $res[1]['WEIGHTED_GPA'] . '\',
        \'' . $res[1]['unweighted_gpa'] . '\',\'' . $res[1]['GRADE_LEVEL_SHORT'] . '\')');
        }
        unset($stu_val);
    }
    if ($_REQUEST['modfunc'] == 'remove') {
        if (DeletePromptX('Student Grade')) {
            DBQuery('DELETE FROM student_report_card_grades WHERE ID=\'' . $_REQUEST['id'] . '\'');
        }
    }
    if (!$_REQUEST['modfunc']) {
        $stuRET = DBGet(DBQuery('SELECT LAST_NAME, FIRST_NAME, MIDDLE_NAME, NAME_SUFFIX from students where STUDENT_ID = ' . $student_id . ''));
        $stuRET = $stuRET[1];
        $displayname = $stuRET['LAST_NAME'] . ($stuRET['NAME_SUFFIX'] ? $stuRET['suffix'] . ' ' : '') . ', ' . $stuRET['FIRST_NAME'] . ' ' . $stuRET['MIDDLE_NAME'];
        $gquery = 'SELECT mp.syear, mp.marking_period_id as mp_id, mp.title as mp_name, mp.post_end_date as posted, sgc.grade_level_short as GRADE_LEVEL, 
       sgc.weighted_gpa, sgc.unweighted_gpa
       FROM marking_periods mp, student_gpa_calculated sgc, schools s
       WHERE sgc.marking_period_id = mp.marking_period_id and
             s.id = mp.school_id and sgc.student_id = ' . $student_id . ' AND mp.marking_period_id IN (SELECT marking_period_id FROM  history_marking_periods)
       AND mp.school_id = \'' . UserSchool() . '\' order by mp.post_end_date';
        $GRET = DBGet(DBQuery($gquery));
        $last_posted = null;
开发者ID:jicheng17,项目名称:fh,代码行数:31,代码来源:HistoricalReportCardGrades.php

示例14: substr

                $sql .= '(' . substr($fields, 0, -1) . ') values(' . substr($values, 0, -1) . ')';
                if ($go) {
                    DBQuery($sql);
                }
            }
        }
    }
    unset($_REQUEST['modfunc']);
}
if (clean_param($_REQUEST['modfunc'], PARAM_ALPHAMOD) == 'remove') {
    $has_assigned_RET = DBGet(DBQuery("SELECT COUNT(*) AS TOTAL_ASSIGNED FROM student_standards WHERE grade_id={$_REQUEST['id']}"));
    $has_assigned = $has_assigned_RET[1]['TOTAL_ASSIGNED'];
    if ($has_assigned > 0) {
        UnableDeletePromptX('Cannot delete because standard grade is associated.');
    } else {
        if (DeletePromptX('Standard Grade')) {
            DBQuery("DELETE FROM standard_grades WHERE ID='{$_REQUEST['id']}'");
            unset($_SESSION['GR_scale_id']);
        }
    }
}
if (!$_REQUEST['modfunc']) {
    $sql = "SELECT ID,GRADE,DESCRIPTION,SORT_ORDER FROM standard_grades WHERE school_id='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' ORDER BY sort_order,grade";
    $functions = array('GRADE' => '_makeTextInput', 'DESCRIPTION' => '_makeTextInput', 'SORT_ORDER' => '_makeIntInput');
    $LO_columns = array('GRADE' => 'Grade', 'DESCRIPTION' => 'Description', 'SORT_ORDER' => 'Order');
    $link['add']['html'] = array('GRADE' => _makeTextInput('', 'GRADE'), 'DESCRIPTION' => _makeTextInput('', 'DESCRIPTION'), 'SORT_ORDER' => _makeTextInput('', 'SORT_ORDER'));
    $link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove";
    $link['remove']['variables'] = array('id' => 'ID');
    $link['add']['html']['remove'] = button('add');
    $LO_ret = DBGet(DBQuery($sql), $functions);
    echo "<FORM name=F1 id=F1 action=Modules.php?modname={$_REQUEST['modname']}&modfunc=update method=POST>";
开发者ID:26746647,项目名称:openSIS,代码行数:31,代码来源:StandardGrades.php

示例15: DBQuery

                        DBQuery($sql);
                    }
                }
            }
        }
    }
    unset($_REQUEST['modfunc']);
}
if ($_REQUEST['modfunc'] == 'remove') {
    if ($_REQUEST['tab_id'] != 'new') {
        if (DeletePromptX('Category')) {
            DBQuery("UPDATE FOOD_SERVICE_MENU_ITEMS SET CATEGORY_ID=NULL WHERE CATEGORY_ID='{$_REQUEST['category_id']}'");
            DBQuery("DELETE FROM FOOD_SERVICE_CATEGORIES WHERE CATEGORY_ID='{$_REQUEST['category_id']}'");
        }
    } else {
        if (DeletePromptX('Meal')) {
            DBQuery("DELETE FROM FOOD_SERVICE_MENU_ITEMS WHERE MENU_ID='{$_REQUEST['menu_id']}'");
            DBQuery("DELETE FROM FOOD_SERVICE_CATEGORIES WHERE MENU_ID='{$_REQUEST['menu_id']}'");
            DBQuery("DELETE FROM FOOD_SERVICE_MENUS WHERE MENU_ID='{$_REQUEST['menu_id']}'");
        }
    }
}
if (!$_REQUEST['modfunc']) {
    $menus_RET = DBGet(DBQuery('SELECT MENU_ID,TITLE FROM FOOD_SERVICE_MENUS WHERE SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER'), array(), array('MENU_ID'));
    if ($_REQUEST['tab_id']) {
        if ($_REQUEST['tab_id'] != 'new') {
            if ($menus_RET[$_REQUEST['tab_id']]) {
                $_SESSION['FSA_menu_id'] = $_REQUEST['tab_id'];
            } elseif (count($menus_RET)) {
                $_REQUEST['tab_id'] = $_SESSION['FSA_menu_id'] = key($menus_RET);
            } else {
开发者ID:linil,项目名称:centreSIS,代码行数:31,代码来源:Menus.php


注:本文中的DeletePromptX函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。