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


PHP functions::mysql_query方法代码示例

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


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

示例1: dirname

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <?php 
$path = dirname(__FILE__);
include $path . '/functions.php';
functions::start();
?>
    </head>
    <body>
        <?php 
$admresult = functions::mysql_query("SELECT admin FROM " . TABLE_PREFIX . "_setting", "admin", false);
if (!functions::is_logined($admresult) == true) {
    echo '<center>此页面为管理界面,非管理人员请离开!</center>';
} else {
    functions::admin();
}
?>
    </body>
</html>
开发者ID:Kuludu,项目名称:HR-management,代码行数:21,代码来源:admin.php

示例2: dirname

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <?php 
$path = dirname(__FILE__);
include $path . '/functions.php';
functions::start();
?>
    </head>
    <body>
        <?php 
if (!empty($_GET["name"])) {
    $name = htmlspecialchars($_GET["name"]);
    if (functions::is_logined($name) == true) {
        functions::print_form("member.php?name=" . $name, "change_pwd", '<center>更改密码<input type="text" name="pwd" /></center>');
        if (!empty($_POST["pwd"])) {
            $pwd = htmlspecialchars($_POST["pwd"]);
            functions::mysql_query('UPDATE ' . TABLE_PREFIX . '_members SET pwd="' . $pwd . '" WHERE uname="' . $name . '"', "", true);
        }
    } else {
        header("Location:login.php");
    }
} else {
    header("Location:login.php");
}
?>
    </body>
</html>
开发者ID:Kuludu,项目名称:HR-management,代码行数:29,代码来源:member.php

示例3: htmlspecialchars

functions::chk_code();
if (!empty($_POST["uname"]) && !empty($_POST["pwd"])) {
    $name = htmlspecialchars($_POST["uname"]);
    $pwd = htmlspecialchars($_POST["pwd"]);
    $admin = functions::mysql_query("SELECT admin FROM " . TABLE_PREFIX . "_setting", "admin", false);
    if ($name === $admin) {
        $admin_pwd = functions::mysql_query("SELECT safe_code FROM " . TABLE_PREFIX . "_setting", "safe_code", false);
        if ($admin_pwd === $pwd) {
            functions::register_session($name);
            header('Location: admin.php');
            exit;
        } else {
            die("<center>账户或密码错误</center>");
        }
    }
    $is_exit = functions::mysql_query('SELECT count(*) FROM ' . TABLE_PREFIX . '_members WHERE uname="' . $name . '"', "count(*)", false);
    if ($is_exit == 0) {
        die("<center>账户或密码错误</center>");
    } else {
        $rpwd = functions::mysql_query('SELECT pwd FROM ' . TABLE_PREFIX . '_members WHERE uname="' . $name . '"', "pwd", false);
    }
    if ($pwd === $rpwd) {
        functions::register_session($name);
        header('Location: member.php?name=' . $name);
    } else {
        die("<center>账户或密码错误</center>");
    }
}
?>
</body>
</html>
开发者ID:Kuludu,项目名称:HR-management,代码行数:31,代码来源:login.php

示例4: MAX

                <img src="validatecode.php" title="看不清,点击换一张" onclick="this.src = 'validatecode.php?' + Math.random();"></center> 
            <center><input type="submit" value="提交"></input></center>
            <form>
                <?php 
/*
 * 检测重名尚未完成
 */
functions::chk_code();
if (!empty($_POST["name"])) {
    $icount = functions::mysql_query("SELECT MAX(id) FROM " . TABLE_PREFIX . "_applicant", "MAX(id)", false);
    $nowid = $icount + 1;
    $name = htmlspecialchars($_POST["name"]);
    functions::mysql_query("INSERT INTO " . TABLE_PREFIX . '_applicant(`id`,`name`,`ips`,`pass`) VALUES(' . $nowid . ',"' . $name . '","' . $vistorip . '","false")', "", true);
    $answers = array();
    for ($id = 1; $id <= $qcount; $id++) {
        $answer = htmlspecialchars($_POST["q" . $id]);
        $question = functions::mysql_query("SELECT question FROM " . TABLE_PREFIX . "_questions WHERE id=" . $id, "question", false);
        $data = '<center>问题:' . $question . '       回答:' . $answer . '</center></br>';
        $answers[$id] = $data;
    }
    $word = implode("", $answers);
    $file = '<?php echo "' . $word . '"; ?>';
    $f_open = fopen($path . "/applicant/" . $nowid . ".php", "w");
    fwrite($f_open, $file);
    fclose($f_open);
    echo '<script>alert("成功提交申请");</script>';
    die('<center>提交成功,请等待审核</center>');
}
?>
                </body>
                </html>
开发者ID:Kuludu,项目名称:HR-management,代码行数:31,代码来源:applicant.php


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