• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP no_permission函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: cpanel

function cpanel()
{
    global $logged;
    if (!$logged['username']) {
        die(no_permission());
    } else {
        $Temp = new Template();
        $Temp->dir = $logged['dskin'];
        $Temp->file = "cpanel_body.tpl";
        $Temp->tp();
        $Temp->tr(array('BODY' => CPanelPages($_GET['option'])));
        echo $Temp->html;
    }
}
开发者ID:exts,项目名称:nab145,代码行数:14,代码来源:cpanel.php


示例2: check_login

global $config;
check_login ();

// Get parameters
$id_project = get_parameter ('id_project');
$id_task = get_parameter ('id_task', -1);
$project_manager = get_db_value ('id_owner', 'tproject', 'id', $id_project);
$operation = (string) get_parameter ('operation');
$title = get_parameter ("title", "");
$description = get_parameter ("description", "");

// ACL
$task_permission = get_project_access ($config["id_user"], $id_project, $id_task, false, true);
if (!$task_permission["manage"]) {
	audit_db($config["id_user"], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access to task email report  without permission");
	no_permission();
}

if ($operation == "generate_email") {
	$task_participants = get_db_all_rows_sql ("SELECT direccion, nombre_real FROM tusuario, trole_people_task WHERE tusuario.id_usuario = trole_people_task.id_user AND trole_people_task.id_task = $id_task");
	$participants ="";
	foreach ($task_participants as $participant){
		$participant["direccion"];
		$text = ascii_output ($description);
		$subject = ascii_output ($title);
		integria_sendmail ($participant["direccion"], $subject, $text);
	}
	echo ui_print_success_message (__("Operation successfully completed"), '', true, 'h3', true);
}

// Get names
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:task_emailreport.php


示例3: define

    if (isset($site_mods['comment']) and isset($module_config[$module_name]['activecomm'])) {
        define('NV_COMM_ID', $id);
        //ID bài viết hoặc
        define('NV_COMM_AREA', $module_info['funcs'][$op]['func_id']);
        //để đáp ứng comment ở bất cứ đâu không cứ là bài viết
        //check allow comemnt
        $allowed = $module_config[$module_name]['allowed_comm'];
        //tuy vào module để lấy cấu hình. Nếu là module news thì có cấu hình theo bài viết
        if ($allowed == '-1') {
            $allowed = $news_contents['allowed_comm'];
        }
        define('NV_PER_PAGE_COMMENT', 5);
        //Số bản ghi hiển thị bình luận
        require_once NV_ROOTDIR . '/modules/comment/comment.php';
        $area = defined('NV_COMM_AREA') ? NV_COMM_AREA : 0;
        $checkss = md5($module_name . '-' . $area . '-' . NV_COMM_ID . '-' . $allowed . '-' . NV_CACHE_PREFIX);
        $content_comment = nv_comment_module($module_name, $checkss, $area, NV_COMM_ID, $allowed, 1);
    } else {
        $content_comment = '';
    }
    $contents = detail_theme($news_contents, $array_keyword, $related_new_array, $related_array, $topic_array, $content_comment);
    $id_profile_googleplus = $news_contents['gid'];
    $page_title = $news_contents['title'];
    $key_words = implode(', ', $key_words);
    $description = $news_contents['hometext'];
} else {
    $contents = no_permission($global_array_cat[$catid]['groups_view']);
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
开发者ID:volong1012,项目名称:nukeviet,代码行数:31,代码来源:detail.php


示例4: elseif

        }
        if ($func_who_view == 1 and defined('NV_IS_USER')) {
            $allowed = true;
        } elseif ($func_who_view == 2 and defined('NV_IS_MODADMIN')) {
            $allowed = true;
        } elseif ($func_who_view == 3 and defined('NV_IS_USER') and nv_is_in_groups($user_info['in_groups'], $global_array_cat[$catid]['groups_view'])) {
            $allowed = true;
        }
        if ($allowed) {
            $feature = array('cmable' => $photo_data['allowed_comm'], 'voteable' => $photo_data['allowed_rating']);
            $comment_array = np_comment('photos', $pid, $photo_data['allowed_comm'], 0);
            $comment_array['ver'] = $ver;
            $photo_data['comments'] = comment_theme('photos', $pid, $feature, $comment_array);
            $photo_data['scwidth'] = $scwidth;
            $photo_data['scheight'] = $scheight;
            $photo_data['fitwidth'] = $fitwidth;
            $photo_data['fitheight'] = $fitheight;
            $contents = np_view_photo($photo_data, $ver);
        } else {
            $msg = no_permission($func_who_view);
            $contents = np_theme_message($msg);
        }
    }
}
include NV_ROOTDIR . "/includes/header.php";
if ($ver == 0) {
    echo nv_site_theme($contents);
} else {
    echo $contents;
}
include NV_ROOTDIR . "/includes/footer.php";
开发者ID:hoangvtien,项目名称:nphoto,代码行数:31,代码来源:photo.php


示例5: nv_url_rewrite

        $news_contents['link_family_tree'] = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/' . $alias_family_tree . $global_config['rewrite_exturl'], true);
        $news_contents['link_main'] = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . $global_config['rewrite_exturl'], true);
        $news_contents['ftitle'] = $global_array_fam[$fid]['title'];
        $array_mod_title[] = array('title' => $news_contents['title'], 'link' => $news_contents['link_main']);
        $body_contents = $db->query('SELECT bodyhtml as bodytext, rule, content, imgposition, copyright, allowed_send, allowed_print, allowed_save, gid FROM ' . NV_PREFIXLANG . '_' . $module_data . '_bodyhtml_' . ceil($news_contents['id'] / 2000) . ' where id=' . $news_contents['id'])->fetch();
        $news_contents = array_merge($news_contents, $body_contents);
        unset($body_contents);
        if ($news_contents['id'] > 0 and $array_op[2] == "Manager") {
            $array_mod_title[] = array('title' => $lang_module['manager'], 'link' => $base_url_rewrite);
            $contents = manager_theme($news_contents, $list_users, $array_keyword, $content_comment);
        } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_family_tree and $count_op == 4 and $array_op[3] != '') {
            $link_alias_family_tree = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/' . $alias_family_tree . $global_config['rewrite_exturl'], true);
            $array_mod_title[] = array('title' => $lang_module['family_tree'], 'link' => $link_alias_family_tree);
            $contents = nv_theme_genealogy_detail($news_contents, $info_users, $array_parentid, $OrgChart);
        } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_family_tree) {
            $array_mod_title[] = array('title' => $lang_module['family_tree'], 'link' => $base_url_rewrite);
            $contents = view_family($news_contents, $list_users, $array_keyword, $content_comment);
        }
        $id_profile_googleplus = $news_contents['gid'];
        $page_title = $news_contents['title'];
        $key_words = implode(', ', $key_words);
        $description = $news_contents['hometext'];
    } else {
        $contents = no_permission($global_array_fam[$fid]['groups_view']);
    }
} else {
    $contents = no_permission($global_array_fam[$fid]['groups_view']);
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
开发者ID:hoangvtien,项目名称:nv4_module_genealogy,代码行数:31,代码来源:manager.php


示例6: parse_url

        $url_info = parse_url($client_info['selfurl']);
        $content_comment = nv_comment_module($module_name, $checkss, $area, NV_COMM_ID, $allowed, 1);
    } else {
        $content_comment = '';
    }
    // truyen bien sang module block detail
    global $data_album;
    $data_album = $album;
    // truyen thong tin seo
    $page_title = !empty($album['meta_title']) ? $album['meta_title'] : $album['name'];
    $key_words = !empty($album['meta_keyword']) ? $album['meta_keyword'] : $album['name'];
    $description = !empty($album['meta_description']) ? $album['meta_description'] : strip_tags($album['description']);
    // Phan trang
    $generate_page = nv_alias_page($page_title, $base_url, $num_items, $per_page, $page);
    // goi ham xu ly giao dien
    if ($module_config[$module_name]['album_view'] == 'album_view_grid') {
        $contents = detail_album($album, $array_photo, $other_category_album, $content_comment, $generate_page);
    } else {
        $contents = detail_album($album, $array_photo, $other_category_album, $content_comment, '');
    }
} else {
    // khong co quyen xem album
    $contents = no_permission($lang_module['no_permission_album']);
}
if ($page > 1) {
    $page_title .= ' ' . NV_TITLEBAR_DEFIS . ' ' . $lang_global['page'] . ' ' . $page;
    $description .= ' ' . $page;
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
开发者ID:hongoctrien,项目名称:module_photos,代码行数:31,代码来源:detail_album.php


示例7: array_map

        }
        $ratingdetail = array_map("intval", explode("|", $news_contents['ratingdetail']));
        $ratingdetail[0] = isset($ratingdetail[0]) ? intval($ratingdetail[0]) : 0;
        $ratingdetail[1] = isset($ratingdetail[1]) ? intval($ratingdetail[1]) : 0;
        $news_contents['stringrating'] = sprintf($lang_module['stringrating'], $ratingdetail[0], $ratingdetail[1]);
        $ratingdetail[1] = $ratingdetail[1] > 0 ? $ratingdetail[1] : 1;
        $news_contents['numberrating'] = round($ratingdetail[0] / $ratingdetail[1]) - 1;
        $news_contents['langstar'] = array("note" => $lang_module['star_note'], "verypoor" => $lang_module['star_verypoor'], "poor" => $lang_module['star_poor'], "ok" => $lang_module['star_ok'], "good" => $lang_module['star_good}'], "verygood" => $lang_module['star_verygood']);
    }
    $page_title = $news_contents['title'];
    $key_words = $news_contents['keywords'];
    $description = $news_contents['hometext'];
    if (empty($news_contents['author'])) {
        $sql = $db->sql_query(" SELECT `username`, `full_name` FROM `" . NV_USERS_GLOBALTABLE . "` WHERE `userid` = '" . $news_contents['admin_id'] . "' LIMIT 0,1 ");
        $chk_u = $db->sql_numrows($sql);
        if ($chk_u) {
            list($row) = $db->sql_fetchrowset($sql);
        }
        $news_contents['author_name'] = empty($row['full_name']) ? $row['username'] : $row['full_name'];
    } else {
        $news_contents['author_name'] = $news_contents['author'];
    }
    $contents = detail_theme($news_contents, $related_new_array, $related_array, $topic_array, $commentenable);
} else {
    $contents = no_permission($func_who_view);
}
include NV_ROOTDIR . "/includes/header.php";
$results = nv_site_theme($contents);
// new dBug($results);
echo $results;
include NV_ROOTDIR . "/includes/footer.php";
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:31,代码来源:detail.php


示例8: ON

    }
    $photo->closeCursor();
    // album cung chu de
    $sql = 'SELECT a.album_id, a.category_id, a.name, a.alias, a.capturelocal, a.description, a.num_photo, a.date_added, r.file, r.thumb FROM ' . TABLE_PHOTO_NAME . '_album a 
		LEFT JOIN  ' . TABLE_PHOTO_NAME . '_rows r ON ( a.album_id = r.album_id )
		WHERE a.status= 1 AND a.category_id=' . $album['category_id'] . ' AND r.defaults = 1 AND a.album_id != ' . $album['album_id'] . ' 
		ORDER BY a.date_added DESC 
		LIMIT 0, 6';
    $result = $db->query($sql);
    $other_category_album = array();
    while ($item = $result->fetch()) {
        $item['link'] = $global_photo_cat[$album['category_id']]['link'] . '/' . $item['alias'] . '-' . $item['album_id'] . $global_config['rewrite_exturl'];
        $other_category_album[] = $item;
    }
    $result->closeCursor();
    // truyen bien sang module block detail
    global $data_album;
    $data_album = $album;
    // goi ham xu ly giao dien
    $contents = detail_album($album, $array_photo, $other_category_album);
    // truyen thong tin seo
    $page_title = $album['meta_title'];
    $key_words = $album['meta_keyword'];
    $description = $album['meta_description'];
} else {
    // khong co quyen xem album
    $contents = no_permission($global_photo_cat[$category_id]['groups_view']);
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
开发者ID:hpleduit,项目名称:module_photos,代码行数:31,代码来源:detail_album.php


示例9: unset

        $next_photo['link'] = $global_photo_album[$next_photo['album_id']]['link'] . '/' . $next_photo['row_id'] . $global_config['rewrite_exturl'];
    }
    unset($sql, $list);
    //Previous Photo
    $sql = 'SELECT row_id, album_id, name, status, description FROM ' . NV_PREFIXLANG . '_' . $module_data . '_rows WHERE row_id < ' . $row['row_id'] . ' AND album_id=' . $row['album_id'] . ' ORDER BY row_id DESC LIMIT 1';
    $list = nv_db_cache($sql, 'row_id', $module_name);
    foreach ($list as $previous_photo) {
        $previous_photo['link'] = $global_photo_album[$previous_photo['album_id']]['link'] . '/' . $previous_photo['row_id'] . $global_config['rewrite_exturl'];
    }
    unset($sql, $list);
    // rewrite link
    $base_url_rewrite = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=' . $global_photo_cat[$category_id]['alias'] . '/' . $global_photo_album[$row['album_id']]['alias'] . '-' . $row['album_id'] . '/' . $row['row_id'] . $global_config['rewrite_exturl'], true);
    if ($_SERVER['REQUEST_URI'] != $base_url_rewrite) {
        Header('Location: ' . $base_url_rewrite);
        die;
    }
    // truyen bien ra module block
    global $data_detail;
    $data_detail = $row;
    // truyen thong tin seo
    $page_title = !empty($row['name']) ? $row['name'] : $global_photo_album[$row['album_id']]['name'];
    $key_words = !empty($global_photo_album[$row['album_id']]['meta_keyword']) ? $global_photo_album[$row['album_id']]['meta_keyword'] : $global_photo_album[$row['album_id']]['name'];
    $description = !empty($row['description']) ? $row['description'] : strip_tags($global_photo_album[$row['album_id']]['description']);
    // goi ham xu ly giao dien
    $contents = detail($row, $next_photo, $previous_photo);
} else {
    $contents = no_permission($lang_module['no_permission_detailed']);
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
开发者ID:hoangvtien,项目名称:module-photos,代码行数:31,代码来源:detail.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP no_perms_error函数代码示例发布时间:2022-05-15
下一篇:
PHP no_output_done函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap