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


PHP check_number函数代码示例

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


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

示例1: check_array_number

function check_array_number($array, $err_msg)
{
    if ($array == null || empty($array)) {
        return true;
    }
    foreach ($array as $value) {
        check_number($value, $err_msg);
    }
    return true;
}
开发者ID:guirighetto,项目名称:BOCA_PROTEUM,代码行数:10,代码来源:function.check.php

示例2: sleep

//query result
$row;
//1 data array
$return_string;
//1.get information from client
if (($cmd = check_command($_GET["cmd"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR_CMD;
    return;
}
if (($searchpptsNameDesc = check_name($_GET["searchpptsNameDesc"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
if (($statusCheckbox = check_number($_GET["statusCheckbox"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
if (($searchpptsfrom1 = check_range_begin($_GET["searchpptsfrom1"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
if (($searchpptsto1 = check_range_end($_GET["searchpptsto1"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
//link
开发者ID:ahmatjan,项目名称:iLearn_iSearch_API,代码行数:31,代码来源:CoursewarePackets_load.php

示例3: sleep

        return SYMBOL_ERROR;
    }
    return $check_str;
}
//get data from client
$cmd;
$CategoryId;
//query
$link;
//1.get information from client
if (($cmd = check_command($_GET["cmd"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR_CMD;
    return;
}
if (($CategoryId = check_number($_GET["CategoryId"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
//link
$link = @mysqli_connect(DB_HOST, ADMIN_ACCOUNT, ADMIN_PASSWORD, CONNECT_DB);
if (!$link) {
    sleep(DELAY_SEC);
    echo DB_ERROR;
    return;
}
$datasyz = array();
$datacpmc = array();
class StuFunction
{
开发者ID:ahmatjan,项目名称:iLearn_iSearch_API,代码行数:31,代码来源:Categories_modify.php

示例4: sleep

    }
    return $check_str;
}
//get data from client
$cmd;
$UserId;
//query
$link;
//link
$link = @mysqli_connect(DB_HOST, ADMIN_ACCOUNT, ADMIN_PASSWORD, CONNECT_DB);
if (!$link) {
    sleep(DELAY_SEC);
    echo DB_ERROR;
    return;
}
if (($question_id = check_number($_GET["QuestionId"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
$userarray = array();
function get_employ_id_from_user_id($userids)
{
    if (strlen($userids) > 0) {
        $userids = substr($userids, 1);
        $userids = substr($userids, 0, -1);
        $userids = str_replace(",,", ",", $userids);
    }
    $link = @mysqli_connect(DB_HOST, ADMIN_ACCOUNT, ADMIN_PASSWORD, CONNECT_DB);
    if (!$link) {
        sleep(DELAY_SEC);
开发者ID:ahmatjan,项目名称:iLearn_iSearch_API,代码行数:31,代码来源:Questions_roll_list.php

示例5: array

Admin::checkAuth();
Admin::checkAccess(AdminAccess::ACCESS_VIEW);
if (@$_GET['del']) {
    Admin::checkAccess(AdminAccess::ACCESS_DELETE);
    Mysql::getInstance()->delete('radio', array('id' => intval(@$_GET['id'])));
    header("Location: add_radio.php");
    exit;
}
if (isset($_GET['status']) && @$_GET['id']) {
    Admin::checkAccess(AdminAccess::ACCESS_CONTEXT_ACTION);
    Mysql::getInstance()->update('radio', array('status' => intval(@$_GET['status'])), array('id' => intval(@$_GET['id'])));
    header("Location: add_radio.php");
    exit;
}
if (!$error) {
    if (@$_POST['number'] && !check_number($_POST['number']) && !@$_GET['update']) {
        $error = sprintf(_('Error: channel with number "%s" is already in use'), intval($_POST['number']));
    }
    if (@$_GET['save'] && !$error) {
        if (@$_GET['cmd'] && @$_GET['name']) {
            Admin::checkAccess(AdminAccess::ACCESS_CREATE);
            Mysql::getInstance()->insert('radio', array('name' => @$_POST['name'], 'number' => @$_POST['number'], 'volume_correction' => @$_POST['volume_correction'], 'cmd' => @$_POST['cmd']));
            header("Location: add_radio.php");
            exit;
        } else {
            $error = _('Error: all fields are required');
        }
    }
    if (@$_GET['update'] && !$error) {
        if (@$_GET['cmd'] && @$_GET['name']) {
            Admin::checkAccess(AdminAccess::ACCESS_EDIT);
开发者ID:Eugen1985,项目名称:stalker_portal,代码行数:31,代码来源:add_radio.php

示例6: sleep

        return SYMBOL_ERROR;
    }
    return $check_str;
}
//get data from client
$cmd;
$TrainingId;
//query
$link;
//1.get information from client
if (($cmd = check_command($_GET["cmd"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR_CMD;
    return;
}
if (($TrainingId = check_number($_GET["TrainingId"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
//link
$link = @mysqli_connect(DB_HOST, ADMIN_ACCOUNT, ADMIN_PASSWORD, CONNECT_DB);
if (!$link) {
    sleep(DELAY_SEC);
    echo DB_ERROR;
    return;
}
//----- query -----
//***Step14 如果cmd为读取通过ID获取要修改内容信息,如果cmd不为读取并且ID为零为新增动作,如果不为读取和新增则为修改动作
if ($cmd == "read") {
    $str_query1 = "Select * from Trainings where TrainingId={$TrainingId}";
开发者ID:ahmatjan,项目名称:iLearn_iSearch_API,代码行数:31,代码来源:Trainings_modify.php

示例7: my_profile

} else {
    echo "正しく実行できませんでした。";
}
function my_profile()
{
    echo "中村誠希</br>";
    echo "1991年9月14日</br>";
    echo "ヤッホー!!</br>";
    return true;
}
//一回目の表示
my_profile();
//2回目の表示
my_profile();
//課題2
//引数を指定
check_number(5);
function check_number($number)
{
    if ($number % 2 == 0) {
        echo "偶数です。";
    } else {
        echo "奇数です。";
    }
}
?>


    </body>

</html>
开发者ID:masaki4680,项目名称:camp-challenge,代码行数:31,代码来源:util.php

示例8: sleep

        return SYMBOL_ERROR;
    }
    return $check_str;
}
//get data from client
$cmd;
$FileId;
//query
$link;
//1.get information from client
if (($cmd = check_command($_GET["cmd"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR_CMD;
    return;
}
if (($CoursewareId = check_number($_GET["CoursewareId"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
//link
$link = @mysqli_connect(DB_HOST, ADMIN_ACCOUNT, ADMIN_PASSWORD, CONNECT_DB);
if (!$link) {
    sleep(DELAY_SEC);
    echo DB_ERROR;
    return;
}
//----- query -----
//***Step19 删除动作SQL语句
$str_query1 = "Update Coursewares set Status=-1 where CoursewareId={$CoursewareId}";
/////////////////////
开发者ID:ahmatjan,项目名称:iLearn_iSearch_API,代码行数:31,代码来源:Coursewares_delete.php

示例9: sleep

        return SYMBOL_ERROR;
    }
    return $check_str;
}
//get data from client
$cmd;
$ProbId;
//query
$link;
//1.get information from client
if (($cmd = check_command($_GET["cmd"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR_CMD;
    return;
}
if (($ProbId = check_number($_GET["ProbId"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
//link
$link = @mysqli_connect(DB_HOST, ADMIN_ACCOUNT, ADMIN_PASSWORD, CONNECT_DB);
if (!$link) {
    sleep(DELAY_SEC);
    echo DB_ERROR;
    return;
}
$TitleStr = MSG_PROBLEM_MODIFY;
//----- query -----
//***Step14 如果cmd为读取通过ID获取要修改内容信息,如果cmd不为读取并且ID为零为新增动作,如果不为读取和新增则为修改动作
if (strcmp($cmd, "read") == 0) {
开发者ID:ahmatjan,项目名称:iLearn_iSearch_API,代码行数:31,代码来源:Problems_modify.php

示例10: sleep

        return SYMBOL_ERROR;
    }
    return $check_str;
}
//get data from client
$cmd;
$NewId;
//query
$link;
//1.get information from client
if (($cmd = check_command($_GET["cmd"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR_CMD;
    return;
}
if (($PPTId = check_number($_GET["pptId"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
//link
// $link = @mysqli_connect(DB_HOST, ADMIN_ACCOUNT, ADMIN_PASSWORD, CONNECT_DB);
if (!$link) {
    sleep(DELAY_SEC);
    echo DB_ERROR;
    return;
}
function CWList($coursewareList)
{
    if (strlen($coursewareList) > 0) {
        $coursewareList = substr($coursewareList, 1);
开发者ID:ahmatjan,项目名称:iLearn_iSearch_API,代码行数:31,代码来源:CoursewarePackets_modify.php

示例11: sleep

//query result
$row;
//1 data array
$return_string;
//1.get information from client
if (($cmd = check_command($_GET["cmd"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR_CMD;
    return;
}
if (($searchQuestionsNameDesc = check_name($_GET["searchQuestionsNameDesc"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
if (($QuestionstatusCheckbox = check_number($_GET["QuestionstatusCheckbox"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
if (($searchQuestionsfrom15 = check_range_begin($_GET["searchQuestionsfrom15"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
if (($searchQuestionsto15 = check_range_end($_GET["searchQuestionsto15"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
//link
开发者ID:ahmatjan,项目名称:iLearn_iSearch_API,代码行数:31,代码来源:Questions_load.php

示例12: check_number

function check_number($check_str)
{
    if (!is_numeric($check_str)) {
        return SYMBOL_ERROR;
    }
    if ($check_str < 0) {
        return SYMBOL_ERROR;
    }
    return $check_str;
}
//get data from client
$cmd;
$UserId;
//query
$link;
if (($CoursePacketId = check_number($_POST["coursepacket_id"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo DB_ERROR;
    return;
}
//link
$link = @mysqli_connect(DB_HOST, ADMIN_ACCOUNT, ADMIN_PASSWORD, CONNECT_DB);
if (!$link) {
    sleep(DELAY_SEC);
    echo DB_ERROR;
    return;
}
$users_id = $_POST["users_id"];
// employId & userWId
// if ($users_id[0] == "null")
// {
开发者ID:ahmatjan,项目名称:iLearn_iSearch_API,代码行数:31,代码来源:CoursePackets_update_roll.php

示例13: sleep

if (($cmd = check_command($_GET["cmd"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR_CMD;
    return;
}
if (($searchExamsNameAndMemo = check_name($_GET["searchExamsNameAndMemo"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
if (($statusCheckbox = check_number($_GET["statusCheckbox"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
if (($searchType = check_number($_GET["searchType"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
if (($searchExamsfrom1 = check_range_begin($_GET["range_begin"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
if (($searchExamsto1 = check_range_end($_GET["range_end"])) == SYMBOL_ERROR) {
    sleep(DELAY_SEC);
    echo SYMBOL_ERROR;
    return;
}
//link
开发者ID:ahmatjan,项目名称:iLearn_iSearch_API,代码行数:31,代码来源:Exams_load.php

示例14: output_html5_header

output_html5_header('Process Transaction', array("bootstrap/css/bootstrap.css", "bootstrap/css/bootstrap-theme.css", "css/style.css"), array("js/jquery.min.js", "bootstrap/js/bootstrap.min.js"));
if (array_key_exists('loggedin', $_SESSION)) {
    if (count($_POST) == 8 && array_key_exists('name', $_POST) && array_key_exists('cardNum', $_POST) && array_key_exists('cvc', $_POST) && array_key_exists('expM', $_POST) && array_key_exists('expY', $_POST)) {
        $name = htmlspecialchars(trim($_POST['name']));
        $cardNum = htmlspecialchars(trim($_POST['cardNum']));
        $cvc = htmlspecialchars(trim($_POST['cvc']));
        $expM = htmlspecialchars(trim($_POST['expM']));
        $expY = htmlspecialchars(trim($_POST['expY']));
        $errorCVC = false;
        $errorMY = false;
        $errorDate = false;
        if (!check_number($cvc)) {
            $errorCVC = true;
            $_SESSION['errorCVC'] = true;
        }
        if (!check_number($expM) && !check_number($expY)) {
            $errorMY = true;
            $_SESSION['errorMY'] = true;
        } else {
            date_default_timezone_set('America/Toronto');
            $year = date('Y');
            $month = date('m');
            if ($expY <= $year) {
                if ($expM <= $month) {
                    $errorDate = true;
                    $_SESSION['errorDate'] = true;
                }
            }
        }
        db_connect();
        $user_id = db_get_user_id($_SESSION['loggedin']);
开发者ID:Naisargi1,项目名称:YarnStore,代码行数:31,代码来源:process.php

示例15: check_number

<!DOCTYPE html>
<html lang="ja">

<head>
<meta charset="UTF-8">
      <title>3_7challenge</title>
</head>
  <body>
    <!-- 課題7:初期値3のグローバルな値を2倍していく処理の関数と、
          staticとしてその関数が何回実行されたのかを保持する変数を設ける。
          この関数を20回呼び出す -->
    <?php 
$global_number = 3;
function check_number()
{
    static $local_number = 0;
    global $global_number;
    $global_number = $global_number * 2;
    $local_number += 1;
    //実行回数のカウント
    echo $local_number . '回目:' . $global_number . '<br>';
}
for ($i = 0; $i < 20; $i++) {
    check_number() * $i;
}
?>
  </body>

</html>
开发者ID:Taka-Haru,项目名称:Challenge,代码行数:29,代码来源:3_7challenge.php


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