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


PHP util::getInt方法代码示例

本文整理汇总了PHP中util::getInt方法的典型用法代码示例。如果您正苦于以下问题:PHP util::getInt方法的具体用法?PHP util::getInt怎么用?PHP util::getInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在util的用法示例。


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

示例1: using

<?php

$root = "../../../../../";
$KoolControlsFolder = "{$root}/KoolPHPSuite/KoolControls";
require $KoolControlsFolder . "/KoolListBox/koollistbox.php";
require_once "{$root}/class/autoload.inc";
if (isset($_POST['dept_id'])) {
    $dept_id = util::getInt('dept_id', -1);
    $major_id = util::getInt('major_id', -1);
    $class_id = util::getInt('class_id', -1);
    $s_role = util::getInt('s_role', -1);
    $s_role_to = $s_role + 1;
    $s_grade = util::getInt('s_grade', -1);
    $sel = 'select s_id, s_name, s_num, s_role from student join class using(class_id) join major using(major_id) join department using(dept_id) join education using(edu_id) ';
    $sel .= " where (s_role={$s_role} or s_role={$s_role_to})";
    if ($class_id != -1) {
        $sel .= " and class_id= {$class_id}";
    } else {
        if ($major_id != -1) {
            $sel .= " and major_id= {$major_id}";
        } else {
            if ($dept_id != -1) {
                $sel .= " and dept_id= {$dept_id}";
            }
        }
    }
    if ($s_grade != -1) {
        $sel .= " and s_grade={$s_grade}";
    }
    $testBox = array();
    for ($i = $s_role; $i <= $s_role_to; $i++) {
开发者ID:skydel,项目名称:universal-online-exam,代码行数:31,代码来源:getStudentListBox.php

示例2: doIt

<?php

require_once "../../../../../class/autoload.inc";
function doIt($s_role, $s_ids, $con)
{
    foreach ($s_ids as $s_id) {
        $ex = "update student set s_role='{$s_role}' where s_id={$s_id}";
        $con->exec($ex);
    }
}
$s_ids1 = explode(" ", $_POST['s_id1']);
$s_ids2 = explode(" ", $_POST['s_id2']);
$s_role1 = util::getInt('s_role1', -1);
$s_role2 = util::getInt('s_role2', -1);
$con = new DB_Connect();
doIt($s_role1, $s_ids1, $con);
doIt($s_role2, $s_ids2, $con);
开发者ID:skydel,项目名称:universal-online-exam,代码行数:17,代码来源:setRole.php

示例3: error_reporting

<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once "../../../../../class/util.php";
$where_cla = "";
$dept_id = util::getInt('st_depart', -1);
$major_id = util::getInt('st_major', -1);
$class_id = util::getInt('st_class', -1);
if ($class_id != -1) {
    $where_cla = " where class_id= {$class_id}";
} else {
    if ($major_id != -1) {
        $where_cla = " where major_id= {$major_id}";
    } else {
        if ($dept_id != -1) {
            $where_cla = " where dept_id= {$dept_id}";
        }
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html> 
    <head> 
        <title>学生帐号查看</title> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
        <script src="../../../../js/jquery-1.9.0.js" type='text/javascript'></script>
        <script src="index.js" type='text/javascript'></script>
        <link rel="stylesheet" href="../../../../css/common.css" />
    </head> 
    <body> 
开发者ID:skydel,项目名称:universal-online-exam,代码行数:31,代码来源:index.php


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