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


PHP _alert_back函数代码示例

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


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

示例1: _check_password

/**
 * _check_password() 检查密码是否符合规则并加密
 * @access public
 * @param string $pwd1 密码
 * @param string $pwd2 确认密码
 * @param int $minsize 密码最小长度
 * @return string 符合规则加密后的密码
 */
function _check_password($pwd, $minsize)
{
    if (strlen($pwd) < $minsize) {
        _alert_back("密码不得小于" . $minsize . '位');
    }
    return _mysql_string(sha1($pwd));
}
开发者ID:hikobe8,项目名称:Guest,代码行数:15,代码来源:login.func.php

示例2: _check_time

/**
 * 检查保存时间是错误
 * @param unknown $_string
 * @return unknown|string
 */
function _check_time($_string)
{
    $_time = array('0', '1', '2', '3');
    if (!in_array($_string, $_time)) {
        _alert_back('保存时间出现错误!');
    }
    return _mysql_string($_string);
}
开发者ID:PantaSun,项目名称:Multi-user-system-messages,代码行数:13,代码来源:login.func.php

示例3: _login_state

/**
 * _login_state判断登录状态和权限
 * @param $level 当前页面所需要最低权限
 */
function _login_state($level)
{
    if (!$_SESSION['num'] || !$_SESSION['username']) {
        _location("请先登录!", "login.php");
    }
    if ($level > $_SESSION['level']) {
        _alert_back("权限不足!");
    }
}
开发者ID:bboot9001,项目名称:phpbeginner_gmanage,代码行数:13,代码来源:global.func.php

示例4: _alert_back

            }
        }
        $_html['face_html'] .= '</select>';
        //签名开关
        if ($_html['switch'] == 1) {
            $_html['switch_html'] = '<input type="radio" name="switch" value="1" checked="checked"/>启用 <input type="radio" name="switch" value="0" />禁用';
        } else {
            if ($_html['switch'] == 0) {
                $_html['switch_html'] = '<input type="radio" name="switch" value="1" />启用 <input type="radio" name="switch" value="0" checked="checked"/>禁用';
            }
        }
    } else {
        _alert_back('此用户不存在');
    }
} else {
    _alert_back('非法登陆');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
require ROOT_PATH . 'includes/title.inc.php';
?>
<script type="text/javascript" src="js/code.js"></script>
<script type="text/javascript" src="js/member_modify.js"></script>
</head>

<body>
开发者ID:zhangwenhua029,项目名称:forum-2,代码行数:30,代码来源:member_modify.php

示例5: _check_password

/**
 * _check_password验证密码
 * @access public
 * @param string $_first_pass
 * @param int $_min_num
 * @return string $_first_pass 返回一个加密后的密码
 */
function _check_password($_string, $_min_num = 6)
{
    //判断密码
    if (strlen($_string) < $_min_num) {
        _alert_back('密码不得小于' . $_min_num . '位!');
    }
    //将密码返回
    return sha1($_string);
}
开发者ID:vpsguan,项目名称:guantest,代码行数:16,代码来源:login.inc.php

示例6: _checkemail

/**
 * 邮箱验证
 * @param $_string
 */
function _checkemail($_string)
{
    if (empty($_string)) {
        _alert_back('邮箱不得为空!');
    }
    if (!preg_match('/^[\\w\\-\\.]+@[\\w\\-\\.]+(\\.\\w+)+$/', $_string)) {
        _alert_back('邮件格式不对!');
    }
    return $_string;
}
开发者ID:vpsguan,项目名称:guantest,代码行数:14,代码来源:registe.inc.php

示例7: _check_details

function _check_details($content)
{
    //取出二边空格
    $content = trim($content);
    //判断是否为空
    if ($content == '') {
        _alert_back('事由不可以为空!');
    }
    //判断是否含有敏感字符
    $char_patern = '/[<>\'\\"\\ ]/';
    if (preg_match($char_patern, $content)) {
        _alert_back('内容不得包含敏感字符!');
    }
    return _mysql_string($content);
}
开发者ID:bboot9001,项目名称:phpbeginner_gmanage,代码行数:15,代码来源:funds.func.php

示例8: define

<?php

//define the constant IN_TG to include common.inc.php
define('IN_TG', true);
//a constant for different scripts calling
define("SCRIPT", "article_modify");
//include common.inc.php
require dirname(__FILE__) . '/includes/common.inc.php';
if (isset($_SERVER["HTTP_REFERER"])) {
    $_skinurl = $_SERVER["HTTP_REFERER"];
    if (empty($_skinurl) || !isset($_GET['id'])) {
        _alert_back('Illegal access');
    } else {
        //validate id
        if ($_GET['id'] != 1 && $_GET['id'] != 2 && $_GET['id'] != 3) {
            _alert_back('Invalid ID');
        }
        //create a cookie to save the skin id
        setcookie('skin', $_GET['id']);
        _location(null, $_skinurl);
    }
}
开发者ID:Zhiming,项目名称:PHP,代码行数:22,代码来源:skin.php

示例9: _fetch_array

        }
    }
}
if ($_GET['action'] == modify) {
    if ($_GET['num']) {
        $row = _fetch_array("SELECT * FROM gm_teacher WHERE gm_num='{$_GET['num']}'");
    }
    if ($_POST['submit'] == '提 交') {
        include ROOT_PATH . 'includes/register.func.php';
        $name = _check_username($_POST['name']);
        $num = _check_num($_POST['num']);
        $zc = $_POST['zc'];
        if (_query("UPDATE gm_teacher SET gm_username='{$name}',gm_zc='{$zc}' WHERE gm_num='{$num}'")) {
            _alert_back("修改成功!");
        } else {
            _alert_back("修改失败!");
        }
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
require ROOT_PATH . 'includes/title_admin.inc.php';
?>
</head>
<body>
<?php 
开发者ID:bboot9001,项目名称:phpbeginner_gmanage,代码行数:31,代码来源:add_teacher.php

示例10: _check_code

/**
 * _check_code
 * @param string $_first_code
 * @param string $_end_code
 * @return void 验证码比对
 */
function _check_code($_first_code, $_end_code)
{
    if ($_first_code != $_end_code) {
        _alert_back('验证码不正确!');
    }
}
开发者ID:zhangshuhui2014,项目名称:foodcool,代码行数:12,代码来源:global.func.php

示例11: array

if ($_GET['action'] == 'delete' && isset($_POST['ids'])) {
    $_clean = array();
    $_clean['ids'] = _mysql_string(implode(',', $_POST['ids']));
    //为了防止cookies伪造,还要比对一下唯一标识符uniqid()
    if (!!($_rows = _fetch_array("SELECT\n                                    tg_uniqid\n                                FROM\n                                    tg_user\n                                WHERE\n                                    tg_username='{$_COOKIE['username']}'\n                                LIMIT\n                                    1"))) {
        _uniqid($_rows['tg_uniqid'], $_COOKIE['uniqid']);
        _query("DELETE FROM\n\t               tg_flower\n\t           WHERE\n\t               tg_id\n\t           IN\n\t               ({$_clean['ids']})");
        if (_affected_rows()) {
            _close();
            _location('花朵删除成功', 'member_flower.php');
        } else {
            _close();
            _alert_back('花朵删除失败');
        }
    } else {
        _alert_back('非法登录');
    }
}
//分页模块
global $_pagesize, $_pagenum;
_page("SELECT tg_id FROM tg_flower WHERE tg_touser='{$_COOKIE['username']}'", 15);
//第一个参数获取总条数,第二个参数,指定每页多少条
$_result = _query("SELECT\n                    tg_id,tg_fromuser,tg_flower,tg_content,tg_date\n                FROM\n                    tg_flower\n                WHERE\n                    tg_touser='{$_COOKIE['username']}'\n                ORDER BY\n                    tg_date DESC\n                LIMIT\n                        {$_pagenum},{$_pagesize}\n                 ");
?>

<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<?php 
require ROOT_PATH . 'includes/title.inc.php';
开发者ID:xiaohuazheng,项目名称:twbm1.0,代码行数:31,代码来源:member_flower.php

示例12: _check_content

/**
 * _check_content检查内容
 * @param $content
 */
function _check_content($content)
{
    //判断是否为空
    if ($content == '') {
        _alert_back('内容不可以为空!');
    }
    //判断是否含有敏感字符
    $char_patern = '/[<>\'\\"]/';
    if (preg_match($char_patern, $content)) {
        _alert_back('内容不得包含敏感字符!\\n如:英文状态下的< >和单双引号');
    }
    return _mysql_string($content);
}
开发者ID:bboot9001,项目名称:phpbeginner_gmanage,代码行数:17,代码来源:register.func.php

示例13: _check_content

/**
 * _check_content 检查输入的内容
 * @param string $_content 内容
 * @return string 过滤的内容
 */
function _check_content($_content)
{
    if (mb_strlen($_content, 'utf-8') < 5 || mb_strlen($_content, 'utf-8') > 200) {
        _alert_back("内容不得小于5字或大于200字!");
    }
    return $_content;
}
开发者ID:hikobe8,项目名称:Guest,代码行数:12,代码来源:check.func.php

示例14: _fetch_array

            $_html['pre'] = '<a href="photo_detail.php?id=' . $_html['preid']['id'] . '#pre">上一页</a>';
        } else {
            $_html['pre'] = '<span>到头了</span>';
        }
        //下一页,取得比自己小的ID中,最大的那个即可。
        $_html['nextid'] = _fetch_array("SELECT \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmax(tg_id) \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAS \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttg_photo \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttg_sid='{$_html['sid']}' \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttg_id<'{$_html['id']}'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1\r\n\t\t");
        if (!empty($_html['nextid']['id'])) {
            $_html['next'] = '<a href="photo_detail.php?id=' . $_html['nextid']['id'] . '#next">下一页</a>';
        } else {
            $_html['next'] = '<span>到底了</span>';
        }
    } else {
        _alert_back('不存在此图片!');
    }
} else {
    _alert_back('非法操作!');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
require ROOT_PATH . 'includes/title.inc.php';
?>
<script type="text/javascript" src="js/code.js"></script>
<script type="text/javascript" src="js/article.js"></script>
</head>
<body>
<?php 
require ROOT_PATH . 'includes/header.inc.php';
开发者ID:xiaoyinzhang,项目名称:testRep,代码行数:31,代码来源:photo_detail.php

示例15: define

*/
//防止恶意调用
define('IN_GM', true);
//定义个常量,用来指定本页的内容
define('SCRIPT', 'message_add_s');
//引入公共文件
require dirname(__FILE__) . '/includes/common.inc.php';
//判断登录状态和权限
_login_state(1);
if ($_POST['submit'] == "提 交") {
    include ROOT_PATH . 'includes/register.func.php';
    $content = _check_content($_POST['content']);
    if (_query("INSERT INTO gm_message(gm_username,gm_num,gm_content,gm_systime)\r\n\t\tVALUES('{$_SESSION['username']}','{$_SESSION['num']}','{$content}',NOW())") or die(mysql_error())) {
        _location("发布成功!", "message_s.php");
    } else {
        _alert_back("发布失败!");
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
require ROOT_PATH . 'includes/title_student.inc.php';
?>
</head>
<body>
<?php 
require ROOT_PATH . 'includes/header_student.inc.php';
开发者ID:bboot9001,项目名称:phpbeginner_gmanage,代码行数:31,代码来源:message_add_s.php


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