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


PHP judge_role函数代码示例

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


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

示例1: session_start

<?php

session_start();
include_once '../../frame.php';
$role = judge_role();
$yh_id = intval($_POST['id']);
$db = get_db();
$info = $db->query("select id from fb_yh_xx where yh_id={$yh_id}");
if ($db->record_count == 1) {
    $id = $info[0]->id;
} else {
    $id = 0;
}
$info = new table_class('fb_yh_xx');
if ($id != 0) {
    $info->find($id);
}
$info->update_attributes($_POST['info'], false);
if ($_FILES['tx']['name'] != null) {
    $upload = new upload_file_class();
    $upload->save_dir = "/upload/user/";
    $img = $upload->handle('tx', 'filter_pic');
    if ($img === false) {
        alert('上传文件失败 !');
        redirect($_SERVER['HTTP_REFERER']);
    }
    $info->tx = "/upload/user/{$img}";
}
$info->yh_id = $yh_id;
$info->save();
redirect('index.php');
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:edit_info.post.php

示例2: session_start

<?php

session_start();
include_once '../../frame.php';
judge_role();
$search = $_REQUEST['search'];
$db = get_db();
$sql = "SELECT * FROM fb_investor_sign f where 1=1";
$sea = $_REQUEST['sea'];
if ($sea != '') {
    if ($sea == '风险投资') {
        $sea = 1;
    } else {
        if ($sea == '出售投资') {
            $sea = 2;
        } else {
            if ($sea == '天使投资') {
                $sea = 3;
            }
        }
    }
    $sql .= " and name like '%{$sea}%' or item_type like '%{$sea}%' or company_name like '%{$sea}%' or item_name like '%{$sea}%' or email like '%{$sea}%'";
}
$record = $db->paginate($sql, 30);
$count = count($record);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv=Content-Type content="text/html; charset=utf-8">
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:sign_list.php

示例3: judge_role

<?php

require_once '../frame.php';
judge_role('admin');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv=Content-Type content="text/html; charset=utf-8">
	<meta http-equiv=Content-Language content=zh-CN>
	<title>迅傲信息</title>
	<?php 
css_include_tag('admin');
use_jquery();
js_include_tag('jquery.cookie.js', 'pubfun');
?>
</head>
<body style="background:url(/images/admin/bg.jpg) repeat-x;">
	<div id=admin_body>
		<div id=part1>
			<div id=nav style="width:360px;">欢迎你:  <?php 
echo $_SESSION["nick_name"];
?>
</div>
			<div id=title><?php 
echo $site_name;
?>
后台管理</div>
			<div id=index><a href="/index.php" target="_blank">动态主页</a></div>
		</div>
		<div id=part2>
开发者ID:justin1986,项目名称:frame2,代码行数:31,代码来源:admin.php


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