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


PHP alertMes函数代码示例

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


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

示例1: checkLogined

function checkLogined()
{
    if ($_SESSION['username'] == "" && $_COOKIE['username'] == "") {
        alertMes("您还没有登录,请先登录", "index.php?c=list&cs=kehu&login");
        return false;
    }
}
开发者ID:norain2050,项目名称:hkgbf,代码行数:7,代码来源:checkLogined.php

示例2: checkLogined

/**
 * 检查是否有登陆
 */
function checkLogined()
{
    $SAID = @$_SESSION['adminId'];
    $CAID = @$_COOKIE['adminId'];
    if ($SAID == "" && $CAID == "") {
        alertMes("请先登陆", "login.php");
    }
}
开发者ID:hiden2,项目名称:shopImooc-1,代码行数:11,代码来源:admin.inc.php

示例3: addOrder

function addOrder()
{
    $arr = $_POST;
    $arr['user_id'] = $_SESSION['user_id'];
    $arr['oDate'] = date('Y-m-d');
    if ($arr['oName'] == '' && $arr['oPrice'] == '' && $arr['oQuantity'] == '' && $arr['oUnit'] == '') {
        echo "<script>alert('请填写完整信息');</script>";
    } else {
        $res = insert("tpexpress_order", $arr);
        //echo "<img src='images/default/check.png' class='check-icon'></img>";
        alertMes('商品订单添加成功', 'order.php');
    }
}
开发者ID:win87,项目名称:lago,代码行数:13,代码来源:package.inc.php

示例4: checkLogined

function checkLogined()
{
    //    if((!isset($_SESSION['adminId']))){
    //        alertMes("Login first!", "login.php");
    //    }
    // To check whether _SESSION or _COOKIE has been defined
    if (!isset($_SESSION['adminId']) && !isset($_COOKIE['adminId'])) {
        alertMes("请先登录!", "login.php");
    }
    if (@$_SESSION['adminId'] == "" && $_COOKIE['adminId'] == "") {
        alertMes("请先登录!", "login.php");
    }
}
开发者ID:BigeyeDestroyer,项目名称:biogas,代码行数:13,代码来源:admin.inc.php

示例5: delCate

/**
 *删除分类
 * @param string $where
 * @return string
 */
function delCate($id)
{
    $res = checkProExist($id);
    if (!$res) {
        $where = "type_id=" . $id;
        if (delete("tigris_user_type", $where)) {
            $mes = "Deleted success!<br/><a href='listCate.php'>View list</a>|<a href='addCate.php'>Add user type</a>";
        } else {
            $mes = "Deleted failed!<br/><a href='listCate.php'>View list</a>";
        }
        return $mes;
    } else {
        alertMes("Can't delelte, please delete the content in the cate first!", "listPro.php");
    }
}
开发者ID:win87,项目名称:homarget2,代码行数:20,代码来源:cate.inc.php

示例6: delCate

/**
 *删除分类
 * @param string $where
 * @return string
 */
function delCate($id)
{
    $res = checkProExist($id);
    if (!$res) {
        $where = "id=" . $id;
        if (delete("imooc_cate", $where)) {
            $mes = "分类删除成功!<br/><a href='listCate.php'>查看分类</a>|<a href='addCate.php'>添加分类</a>";
        } else {
            $mes = "删除失败!<br/><a href='listCate.php'>请重新操作</a>";
        }
        return $mes;
    } else {
        alertMes("不能删除分类,请先删除该分类下的商品", "listPro.php");
    }
}
开发者ID:juedaiyuer,项目名称:codeworkplace,代码行数:20,代码来源:cate.inc.php

示例7: doWaterPic

/**
 *图片水印
 * @param int $id
 * @return string
 */
function doWaterPic($id)
{
    $rows = getProImgsById($id);
    if ($rows) {
        foreach ($rows as $row) {
            $filename = "../image_800/" . $row['albumPath'];
            waterPic($filename);
            /* waterPic() --image.func.php 图片水印*/
        }
        //$mes="操作成功";
        alertMes("添加图片水印成功!", "listProImages.php");
    } else {
        alertMes("添加图片水印失败!", "listProImages.php");
    }
    return $mes;
}
开发者ID:lucas1111,项目名称:shop,代码行数:21,代码来源:album.inc.php

示例8: checkUser

 public function checkUser()
 {
     $username = I('post.userName');
     $pwd = I('post.passWord');
     $autoLogin = I('post.remember_me');
     $ica = M("ica_admin");
     //查询数据库
     $result = $ica->where("admin = '{$username}' AND password = '{$pwd}'")->find();
     if ($result == null || $result == FALSE) {
         alertMes("用户名或密码错误!请重新登录", C('ADMIN_PATH') . "/login");
     } else {
         if ($autoLogin == !null) {
             cookie("adminId", $result['id'], 7 * 24 * 3600);
             cookie("adminName", $result['name'], 7 * 24 * 3600);
         }
         session('adminName', $result['name']);
         session('adminId', $result['id']);
         alertMes("登录成功!", C('ADMIN_PATH'));
     }
 }
开发者ID:BysunLin,项目名称:hamero,代码行数:20,代码来源:LoginController.class.php

示例9: checkLogined

<?php

require_once '../include.php';
checkLogined();
$rows = getAllProv();
if (!$rows) {
    alertMes("没有相应省份,请先添加省份!!", "addProv.php");
}
$rows_city = getAllCity();
if (!$rows_city) {
    alertMes("没有相应城市,请先添加城市!!", "addCity.php");
}
?>

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>-.-</title>
<link href="./styles/global.css"  rel="stylesheet"  type="text/css" media="all" />
<script type="text/javascript" charset="utf-8" src="../plugins/kindeditor/kindeditor.js"></script>
<script type="text/javascript" charset="utf-8" src="../plugins/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript" src="./scripts/jquery-1.6.4.js"></script>
<script>
        KindEditor.ready(function(K) {
                window.editor = K.create('#editor_id');
        });
        $(document).ready(function(){
        	$("#selectFileBtn").click(function(){
        		$fileField = $('<input type="file" name="thumbs[]"/>');
        		$fileField.hide();
开发者ID:BigeyeDestroyer,项目名称:biogas,代码行数:31,代码来源:addUser.php

示例10: elseif

\t将文件剪切到:<input type="text" name="dstname" placeholder="将文件剪切到"/>
\t<input type="hidden" name="path" value="{$path}" />
\t<input type='hidden' name='filename' value='{$filename}' />
\t<input type="submit" value="剪切文件"/>
\t</form>
EOF;
    echo $str;
} elseif ($act == "doCutFile") {
    $dstname = $_REQUEST['dstname'];
    $mes = cutFile($filename, $path . "/" . $dstname);
    alertMes($mes, $redirect);
} elseif ($act == "上传文件") {
    //print_r($_FILES);
    $fileInfo = $_FILES['myFile'];
    $mes = uploadFile($fileInfo, $path);
    alertMes($mes, $redirect);
}
?>
<!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" />
<title>Insert title here</title>
<link rel="stylesheet" href="cikonss.css" />
<script src="jquery-ui/js/jquery-1.10.2.js"></script>
<script src="jquery-ui/js/jquery-ui-1.10.4.custom.js"></script>
<script src="jquery-ui/js/jquery-ui-1.10.4.custom.min.js"></script>
<link rel="stylesheet" href="jquery-ui/css/ui-lightness/jquery-ui-1.10.4.custom.css"  type="text/css"/>
<style type="text/css">
	body,p,div,ul,ol,table,dl,dd,dt{
		margin:0;
开发者ID:vipmorgana,项目名称:PHP,代码行数:31,代码来源:index.php

示例11: checkAdmin

<?php

require_once '../include.php';
$username = $_POST['username'];
$password = $_POST['password'];
$verify = $_POST['verify'];
$verify1 = $_SESSION['verify2'];
if ($verify == $verify1) {
    $sql = "select * from imooc_admin where username='{$username}' password='{$password}'";
    $row = checkAdmin($sql);
    if ($row) {
        alertMes("登陆成功", "../index.php");
    } else {
        alertMes("登陆失败,密码错误", "login.php");
    }
} else {
    alertMes("登陆失败,重新登录", "login.php");
}
开发者ID:WeiGrand,项目名称:phpShop,代码行数:18,代码来源:doLogin.php

示例12: udelImg

function udelImg($album_id, $img_path)
{
    $sql = "delete from tg_house_img where album_id = {$album_id} and img_path='{$img_path}'";
    $res = mysql_query($sql);
    if ($res) {
        header('location: edit-profile.php');
    } else {
        alertMes('Delete failed!', 'edit-profile.php');
    }
}
开发者ID:win87,项目名称:homarget2,代码行数:10,代码来源:user.inc.php

示例13: error_reporting

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>新增用户</title>
</head>
<body>
  <?php 
error_reporting(0);
require_once 'commonfunc.php';
$url = 'index.php';
$Username = $_POST['Username'];
$Sex = $_POST['Sex'];
$Phonenumber = $_POST['Phonenumber'];
$Userlevel = $_POST['Userlevel'];
$dbc = mysqli_connect('localhost', 'root', '6581526', 'mms_t') or die('数据插入失败,请重新插入');
$query = "INSERT INTO userinfo ( Username,Sex,Phonenumber,Userlevel ) Values ('{$Username}','{$Sex}','{$Phonenumber}','Userlevel')";
$res = mysqli_query($dbc, $query) or die('数据插入失败,请重新插入');
if ($res) {
    $mes = '添加成功';
} else {
    $mes = '添加失败';
}
alertMes($mes, $url);
mysqli_close($dbc);
?>
</body>
</html>



开发者ID:AdamOnTheWay,项目名称:Member-Management-System,代码行数:27,代码来源:Add.php

示例14: md5

<?php

require_once '../include.php';
$username = $_POST['username'];
$password = md5($_POST['password']);
$verify = $_POST['verify'];
$verify1 = $_SESSION['verify'];
$autoFlag = isset($_POST['autoFlag']) ? $_POST['autoFlag'] : '';
if ($verify == $verify1) {
    $sql = "select * from imooc_admin where username='{$username}' and password='{$password}'";
    $res = checkAdmin($sql);
    if ($res) {
        if ($autoFlag) {
            setcookie("adminId", $row['id'], time() + 7 * 24 * 3600);
            setcookie("adminName", $res['username'], time() + 7 * 24 * 3600);
        }
        $_SESSION['adminName'] = $res['username'];
        $_SESSION['adminId'] = $res['id'];
        header("location:index.php");
    } else {
        alertMes("登陆失败,重新登陆", "login.php");
    }
} else {
    alertMes("验证码错误", "login.php");
}
开发者ID:yangdc,项目名称:mooc,代码行数:25,代码来源:doLogin.php

示例15: alertMes

//$sql="select * from admin";
//$totalRows=getResultNum($sql);
//$pageSize=2;
//$totalPage=ceil($totalRows/$pageSize);
//$pageSize=2;
//$page=$_REQUEST['page']?(int)$_REQUEST['page']:1;
//if($page<1||$page==null||!is_numeric($page)){
//	$page=1;
//}
//if($page>=$totalPage)$page=$totalPage;
//$offset=($page-1)*$pageSize;
//$sql="select id,username,email from imooc_admin limit {$offset},{$pageSize}";
//$rows=fetchAll($sql);
//$rows=getAllAdmin();
if (!$rows) {
    alertMes("sorry,没有管理员,请添加!", "addAdmin.php");
    exit;
}
?>
<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>管理员列表</title>
        <link rel="stylesheet" href="styles/backstage.css">
    </head>

<body>
<div class="details">
                    <div class="details_operation clearfix">
                        <div class="bui_select">
开发者ID:lucas1111,项目名称:shop,代码行数:31,代码来源:listAdmin.php


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