本文整理汇总了PHP中checkgroup函数的典型用法代码示例。如果您正苦于以下问题:PHP checkgroup函数的具体用法?PHP checkgroup怎么用?PHP checkgroup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了checkgroup函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set_forumVotes
/**
* Cast Question Votes
* @param $info
* @param int $points
* @todo: move and improvise the voting system
*/
function set_forumVotes($info, $points = 0)
{
global $userdata;
// @todo: extend on user's rank threshold before can vote. - Reputation threshold- Roadmap 9.1
// @todo: allow multiple votes / drop $res - Roadmap 9.1
if (checkgroup($info['forum_vote']) && dbcount("('thread_id')", DB_FORUM_THREADS, "thread_locked='0'")) {
$data = array('forum_id' => $_GET['forum_id'], 'thread_id' => $_GET['thread_id'], 'post_id' => $_GET['post_id'], 'vote_points' => $points, 'vote_user' => $userdata['user_id'], 'vote_datestamp' => time());
$hasVoted = dbcount("('vote_user')", DB_FORUM_VOTES, "vote_user='" . intval($userdata['user_id']) . "' AND thread_id='" . intval($_GET['thread_id']) . "'");
if (!$hasVoted) {
$isSelfPost = dbcount("('post_id')", DB_FORUM_POSTS, "post_id='" . intval($_GET['post_id']) . "' AND post_user='" . intval($userdata['user_id']) . "");
if (!$isSelfPost) {
$result = dbquery_insert(DB_FORUM_VOTES, $data, 'save', array('noredirect' => 1, 'no_unique' => 1));
if ($result && $info['forum_answer_threshold'] > 0) {
$vote_result = dbquery("SELECT SUM('vote_points'), thread_id FROM " . DB_FORUM_VOTES . " WHERE post_id='" . $data['post_id'] . "'");
$v_data = dbarray($vote_result);
if ($info['forum_answer_threshold'] != 0 && $v_data['vote_points'] >= $info['forum_answer_threshold']) {
$result = dbquery("UPDATE " . DB_FORUM_THREADS . " SET 'thread_locked'='1' WHERE thread_id='" . $v_data['thread_id'] . "'");
}
}
redirect(FORUM . "viewthread.php?thread_id=" . $_GET['thread_id'] . "&post_id=" . $_GET['post_id']);
} else {
redirect(FORUM . "viewthread.php?thread_id=" . $_GET['thread_id'] . "&post_id=" . $_GET['post_id'] . '&error=vote_self');
}
} else {
redirect(FORUM . "viewthread.php?thread_id=" . $_GET['thread_id'] . "&post_id=" . $_GET['post_id'] . '&error=vote');
}
}
}
示例2: pdpDownload
function pdpDownload($id)
{
global $pdp, $userdata;
if (!$id) {
if (!iMEMBER) {
return;
}
$this->user_name = $userdata['user_name'];
$this->data = array('dl_name' => '', 'cat_id' => 0, 'dl_homepage' => '', 'dl_desc' => '', 'dl_abstract' => '', 'dl_copyright' => 'Copyright (C) ' . $userdata['user_name'] . ' ' . date('Y'), 'license_id' => 0, 'lizenz_url' => '', 'lizenz_okay' => 'N', 'lizenz_packet' => 'N');
return;
}
// get download
$res = dbquery("SELECT d.*, c.cat_access, fu.user_name," . " c.cat_download_access," . " IF(LENGTH(dl_desc), dl_desc, dl_abstract) AS description" . " FROM " . DB_PDP_DOWNLOADS . " AS d" . " LEFT JOIN " . DB_PDP_CATS . " AS c" . " ON c.cat_id=d.cat_id" . " LEFT JOIN " . DB_USERS . " AS fu ON" . " d.user_id=fu.user_id" . " WHERE d.download_id='" . $id . "'" . " LIMIT 1");
if (dbrows($res) != 1) {
fallback("index.php");
}
$data = dbarray($res);
if (!checkgroup($data['cat_access'])) {
return;
}
$this->id = $id;
$this->data = $data;
$this->status = $data['dl_status'];
$this->user_name = $data['user_name'];
$this->description = $data['description'];
//was enabled. why? unset($this->data['dl_status']);
// check what we can do
$this->can_edit = iPDP_ADMIN || iPDP_MOD || iMEMBER && $userdata['user_id'] == $this->data['user_id'] && ($pdp->settings['user_edit'] || $this->status == PDP_PRO_NEW) && $this->status != PDP_PRO_DEL && $this->status != PDP_PRO_CHECK;
$this->can_download = iPDP_ADMIN || iPDP_MOD || checkgroup($data['cat_download_access']);
// data[] should containt download-table data only
unset($this->data['user_name']);
unset($this->data['cat_access']);
unset($this->data['cat_download_access']);
unset($this->data['description']);
}
示例3: pdp_tmp_show_cat
function pdp_tmp_show_cat($parentid, $cat_array, $level, $sel_this)
{
$retval = "";
foreach ($cat_array as $myid => $thiscat) {
if ($thiscat['parentcat'] == $parentid && checkgroup($thiscat['access'])) {
$retval .= "<option value='{$myid}'" . ($sel_this == $myid ? " selected" : "") . ">" . str_repeat(" ", $level * 4) . $thiscat['name'] . "</option>";
$retval .= pdp_tmp_show_cat($myid, $cat_array, $level + 1, $sel_this);
}
}
return $retval;
}
示例4: prp_count_cats
function prp_count_cats($cat)
{
global $prp;
$count = 0;
$res = dbquery("SELECT cat_id, cat_access" . " FROM " . DB_PRP_CATS . "" . " WHERE top_cat='" . $cat . "'");
while ($data = dbarray($res)) {
if ($prp->settings['hide_cats'] && !checkgroup($data['cat_access'])) {
continue;
}
$count += prp_count_cats($data['cat_id']) + 1;
}
return $count;
}
示例5: mytask
function mytask()
{
$user_id = $_SESSION['USERID'];
$group = checkgroup($user_id);
$filter = '';
if ($group != 2 && $group != 5) {
$res_row = mysql_fetch_assoc(mysql_query("SELECT \tusers.id as person_id\r\n\t\t\t\t\t\t\t\t\t\t\tFROM \t`users`\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE \t`users`.`id` = {$user_id}"));
$filter = "AND (task.responsible_user_id ='{$res_row['person_id']}')";
}
$task_now_count1 = mysql_fetch_row(mysql_query(" SELECT IF(COUNT(*)>0,CONCAT('<span style=\"color:red;\">',COUNT(*),'</span>'), COUNT(*)),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tCOUNT(*)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `task`\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE task.`status` = 0 and task.actived=1 {$filter}"));
$task_process_count1 = mysql_fetch_row(mysql_query(" SELECT COUNT(*)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `task`\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE task.`status` = 1 and task.actived=1 {$filter}"));
$task_done_count1 = mysql_fetch_row(mysql_query(" SELECT COUNT(*)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `task`\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE task.actived=1 AND task.`status` = 2 {$filter}"));
$row = mysql_fetch_row(mysql_query("SELECT users.group_id\r\n\t\t\t\t\t\t\t\t FROM `users`\r\n\t\t\t\t\t\t\t\t WHERE users.id = '{$user_id}'"));
if ($task_now_count1[1] > 0) {
$new_task1 = '<span style="background-color: red; border-radius: 2px 2px 2px 2px; color: #FFFFFF; padding: 1px 2px; position: absolute; top: -5px; left: -6px;">NEW</span>';
}
$my_task_hide1 = '';
if ($row[0] != '') {
$my_task_hide1 = '
<div id="ctl00_ContentPlaceHolder1_tile_Declarations_NEW" class="tile_small" style="background:#9CC6F0; margin-top: 0px">
<p style="display: block!important;margin:8px 0 10px;">ჩემი დავალება</p>
' . $new_task1 . '
<div onclick="location.href=\'index.php?pg=13#tab-1\'" class="tile_waybill_notification tt-wrapper" title="გადაცემულია გასარკვევად" style="float: left; cursor: pointer;">
<span id="ctl00_ContentPlaceHolder1_lblSavedDecl">' . $task_now_count1[0] . '</span>
</div>
<div onclick="location.href=\'index.php?pg=13#tab-2\'" class="tile_waybill_notification tt-wrapper" title="გარკვევის პროცესშია" style="float: left; cursor: pointer;">
<span id="ctl00_ContentPlaceHolder1_lblSavedDecl">' . $task_process_count1[0] . '</span>
</div>
<div onclick="location.href=\'index.php?pg=13#tab-3\'" class="tile_waybill_notification tt-wrapper" title="მოგვარებულია" style="float: left; margin-top: 5px; cursor: pointer;">
<span id="ctl00_ContentPlaceHolder1_lblSavedDecl">' . $task_done_count1[0] . '</span>
</div>
</div>
';
} else {
$my_task_hide1 = "";
}
return $my_task_hide1;
}
示例6: pdpDownload
function pdpDownload($id)
{
global $pdp, $userdata;
if (!$id) {
return;
}
// get download
$res = dbquery("SELECT d.*, c.cat_access, fu.user_name," . " c.cat_download_access," . " IF(LENGTH(dl_desc), dl_desc, dl_abstract) AS description" . " FROM " . DB_PDP_DOWNLOADS . " AS d" . " LEFT JOIN " . DB_PDP_CATS . " AS c" . " ON c.cat_id=d.cat_id" . " LEFT JOIN " . DB_USERS . " AS fu ON" . " d.user_id=fu.user_id" . " WHERE d.download_id='" . $id . "'" . " LIMIT 1");
if (dbrows($res) != 1) {
fallback("index.php");
}
$data = dbarray($res);
if (!checkgroup($data['cat_access'])) {
return;
}
$this->id = $id;
$this->data = $data;
$this->status = $data['dl_status'];
unset($this->data['dl_status']);
// check what we can do
$this->can_edit = iPDP_ADMIN || iPDP_MOD || iMEMBER && $userdata['user_id'] == $this->data['user_id'] && ($pdp->settings['user_edit'] || $this->status == PDP_PRO_NEW) && $this->status != PDP_PRO_DEL && $this->status != PDP_PRO_CHECK;
$this->can_download = iPDP_ADMIN || iPDP_MOD || checkgroup($data['cat_download_access']);
}
示例7: dbquery
//GET ACCESS LEVEL AND REDIRECT IF CHEAT LOOP IS DETECTED
$detect = dbquery("SELECT kroax_access,kroax_cat FROM " . $db_prefix . "kroax WHERE kroax_id='{$url}'");
while ($detect_access = dbarray($detect)) {
$access = $detect_access['kroax_access'];
$kroax_cat = $detect_access['kroax_cat'];
}
if (checkgroup($access)) {
//PROCEED AS PLANNED
} else {
redirect(INFUSIONS . "the_kroax/kroax.php?noaccess");
}
$detect = dbquery("SELECT access FROM " . $db_prefix . "kroax_kategori WHERE cid='{$kroax_cat}'");
while ($detect_access = dbarray($detect)) {
$access = $detect_access['access'];
}
if (checkgroup($access)) {
//PROCEED AS PLANNED
} else {
redirect(INFUSIONS . "the_kroax/kroax.php?noaccess");
}
//END DETECTION
$counthits = dbquery("UPDATE " . $db_prefix . "kroax SET kroax_hits=kroax_hits+1 WHERE kroax_id='{$url}'");
$setplayed = dbquery("UPDATE " . $db_prefix . "kroax SET kroax_lastplayed='" . time() . "' WHERE kroax_id='{$url}'");
$result = dbquery("SELECT * FROM " . $db_prefix . "kroax WHERE kroax_id='{$url}'");
$data = dbarray($result);
$uresult = dbquery("SELECT user_id,user_name FROM " . $db_prefix . "users WHERE user_name='" . $data['kroax_uploader'] . "'");
$udata = dbarray($uresult);
$url = $data['kroax_url'];
$embed = $data['kroax_embed'];
$thumb = $data['kroax_tumb'];
$title = $data['kroax_titel'];
示例8: fallback
/***************************************************************************
* awEventCalendar *
* *
* Copyright (C) 2006-2008 Artur Wiebe *
* wibix@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
require_once 'include/common.php';
if (!isset($_GET['id']) || !isNum($_GET['id'])) {
fallback('index.php');
}
if ($awec_settings['show_birthday_to_group'] == -1 || !checkgroup($awec_settings['show_birthday_to_group'])) {
fallback('index.php');
}
$res = dbquery("SELECT user_name, user_id,\n\tuser_birthdate AS event_date,\n\t(YEAR(CURDATE())-YEAR(user_birthdate)) AS years_old,\n\tDATE_FORMAT(user_birthdate, '" . $awec_settings['date_fmt'] . "') AS date\n\tFROM " . DB_USERS . "\n\tWHERE user_id='" . $_GET['id'] . "'");
if (dbrows($res) == 0) {
fallback('index.php');
}
$event = dbarray($res);
$event['ev_title'] = sprintf($locale['awec_user_birthday']['title'], $event['user_name']);
/*
* GUI
*/
opentable($locale['EC300']);
awec_menu();
ec_render_birthday($event);
closetable();
示例9: temporary_permission
private function temporary_permission()
{
// Thread View Only -- Post DB must exists to know if can be edited or not
if (isset($thread_data['post_author'])) {
//'edit_lock' => $forum_settings['forum_edit_lock'] ? TRUE : FALSE,
$this->thread_info['permissions']['can_edit_post'] = iMOD || checkgroup($thread_data['forum_post']) && $thread_data['forum_lock'] == FALSE && $thread_data['post_author'] == $userdata['user_id'] ? TRUE : FALSE;
}
}
示例10: define
}
}
}
if (!defined("iMOD")) {
define("iMOD", false);
}
} else {
redirect("index.php");
}
} else {
define("iMOD", false);
}
if (isset($_POST['step']) && $_POST['step'] != "") {
$_GET['step'] = $_POST['step'];
}
if (!iMOD && !iADMIN || !checkgroup($data['forum_post'])) {
redirect("index.php");
}
if (isset($_POST['canceldelete'])) {
redirect("viewthread.php?forum_id=" . $_GET['forum_id'] . "&thread_id=" . $_GET['thread_id']);
}
if (isset($_GET['step']) && $_GET['step'] == "renew") {
$result = dbquery("SELECT post_id, post_author, post_datestamp FROM " . DB_POSTS . " WHERE thread_id='" . $_GET['thread_id'] . "' ORDER BY post_datestamp DESC LIMIT 0,1");
if (dbrows($result)) {
$data = dbarray($result);
$result = dbquery("UPDATE " . DB_POSTS . " SET post_datestamp='" . time() . "' WHERE post_id='" . $data['post_id'] . "'");
$result = dbquery("UPDATE " . DB_THREADS . " SET thread_lastpost='" . time() . "', thread_lastpostid='" . $data['post_id'] . "' WHERE thread_id='" . $_GET['thread_id'] . "'");
$result = dbquery("UPDATE " . DB_FORUMS . " SET forum_lastpost='" . time() . "', forum_lastuser='" . $data['post_author'] . "' WHERE forum_id='" . $_GET['forum_id'] . "'");
opentable($locale['458']);
echo "<div style='text-align:center'><br />\n" . $locale['459'] . "<br /><br />\n";
echo "<a href='viewforum.php?forum_id=" . $_GET['forum_id'] . "'>" . $locale['402'] . "</a><br /><br />\n";
示例11: dbquery
$members = dbquery("SELECT * FROM " . DB_USERS . " WHERE user_groups REGEXP('^\\\\.{$data['group_id']}\$|\\\\.{$data['group_id']}\\\\.|\\\\.{$data['group_id']}\$') or user_groups='" . $data['group_id'] . "' ORDER BY user_level DESC, user_name");
$members = dbrows($members);
$wallposts = dbcount("(comment_id)", DB_COMMENTS, "comment_type='g' and comment_item_id='" . $data['group_id'] . "'");
echo "<tr>\n<td class='tbl2' style='padding:7px;'><span style='font-size:13px;'><a href='" . FUSION_SELF . "?section=groups&view=" . $data['group_id'] . "' style='text-decoration:underline;'>" . $data['group_name'] . "</a></span>\n";
if ($data['group_description']) {
echo "<br />\n<span class='small'>" . trimlink($data['group_description'], 30) . "</span>\n";
}
echo "</td>\n";
echo "<td class='tbl1' style='white-space:nowrap;padding:7px;'>" . timePassed($data['group_created'], false) . "</td>\n";
echo "<td class='tbl2' style='text-align:center;padding:7px;'>{$members}</td>\n";
echo "<td class='tbl1' style='text-align:center;padding:7px;'>{$wallposts}</td>\n";
echo "<td class='tbl2' style='padding:7px;'>";
if ($wallposts) {
$latest = dbarray(dbquery("select c.*, u.* from " . DB_COMMENTS . " c\n\t\t\t\tleft join " . DB_USERS . " u on u.user_id=c.comment_name\n\t\t\t\twhere c.comment_type='g' and c.comment_item_id='" . $data['group_id'] . "' order by c.comment_datestamp desc limit 1"));
echo timepassed($latest['comment_datestamp']) . "<br />\n";
echo $locale['uc282'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $latest['user_id'] . "'>" . showLabel($latest['user_id']) . "</a>\n";
} else {
echo $locale['uc281'];
}
echo "</td>\n</tr>\n";
}
} else {
echo "<tr>\n<td class='tbl1' style='text-align:center;'>" . $locale['uc258'] . "</td>\n</tr>\n";
}
echo "<tr>\n<td class='tbl1' style='text-align:center;'" . ($rows ? " colspan='5'" : "") . ">" . (checkgroup($fb4['group_create']) ? "<a href='" . FUSION_SELF . "?section=groups&action=create'>" . $locale['uc256'] . "</a> :: " : "") . "<a href='" . FUSION_SELF . "?section=groups&action=search'>" . $locale['uc257'] . "</a></td>\n</tr>\n";
}
if (!defined("USER_CP")) {
echo "</table>\n</td>\n</tr>\n</table>\n";
closetable();
require_once THEMES . "templates/footer.php";
}
示例12: get_settings
include_once INCLUDES . "infusions_include.php";
// Check if a locale file is available that match the selected locale.
if (file_exists(INFUSIONS . "shoutbox_panel/locale/" . LANGUAGE . ".php")) {
// Load the locale file matching selection.
include INFUSIONS . "shoutbox_panel/locale/" . LANGUAGE . ".php";
} else {
// Load the default locale file.
include INFUSIONS . "shoutbox_panel/locale/English.php";
}
$shout_settings = get_settings("shoutbox_panel");
$archive_shout_link = "";
$archive_shout_message = "";
$result = dbquery("SELECT panel_access FROM " . DB_PANELS . " WHERE panel_filename='shoutbox_panel' AND panel_status='1'");
if (dbrows($result)) {
$data = dbarray($result);
if (!checkgroup($data['panel_access'])) {
redirect(BASEDIR . "index.php");
}
} else {
redirect(BASEDIR . "index.php");
}
if (iMEMBER && (isset($_GET['action']) && $_GET['action'] == "delete") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
if (iADMIN && checkrights("S") || iMEMBER && dbcount("(shout_id)", DB_SHOUTBOX, "shout_id='" . $_GET['shout_id'] . "' AND shout_name='" . $userdata['user_id'] . "' AND shout_hidden='0'")) {
$result = dbquery("DELETE FROM " . DB_SHOUTBOX . " " . (multilang_table("SB") ? "WHERE shout_language='" . LANGUAGE . "' AND" : "WHERE") . " shout_id='" . $_GET['shout_id'] . "'" . (iADMIN ? "" : " AND shout_name='" . $userdata['user_id'] . "'"));
}
redirect(FUSION_SELF);
}
function sbawrap($text)
{
global $locale;
$i = 0;
示例13: switch
<?php
require_once '../../includes/classes/core.php';
$action = $_REQUEST['act'];
$error = '';
$data = '';
switch ($action) {
case 'get_list':
$count = $_REQUEST['count'];
$hidden = $_REQUEST['hidden'];
$user = $_SESSION['USERID'];
$start = $_REQUEST['start'];
$end = $_REQUEST['end'];
$group_id = checkgroup($user);
$rResult = mysql_query("SELECT incomming_call.date,\r\n\t\t incomming_call.date,\r\n \t\t incomming_call.phone,\r\n \t asterisk_incomming.dst_extension,\r\n \t\t asterisk_incomming.dst_queue,\r\n \t\t IF(asterisk_incomming.disconnect_cause='COMPLETECALLER', 'აბონენტმა გათიშა', 'ოპერატორმა გათიშა'),\r\n \t\t persons.`name`,\r\n\t\t SEC_TO_TIME(asterisk_incomming.duration),\r\n \t IF({$group_id}!=3,CONCAT('<p onclick=play(', '\\'', DATE_FORMAT(asterisk_incomming.call_datetime, '%Y/%m/%d/'),(REPLACE(REPLACE(CONVERT(asterisk_incomming.file_name USING utf8),'/var/spool/asterisk/monitor/',''),'.wav','')),'.wav', '\\'', ')>მოსმენა</p>', '<a download=\\'audio.wav\\' href=\\'http://213.131.56.86:8989/', \r\n \t\t\tDATE_FORMAT(asterisk_incomming.call_datetime, '%Y/%m/%d/'),(REPLACE(REPLACE(asterisk_incomming.file_name,'/var/spool/asterisk/monitor/',''),'.wav','')),'.wav', '\\'>ჩამოტვირთვა</a>'),\r\n \t\t\tCONCAT('<p onclick=play(', '\\'', DATE_FORMAT(asterisk_incomming.call_datetime, '%Y/%m/%d/'),(REPLACE(REPLACE(CONVERT(asterisk_incomming.file_name USING utf8),'/var/spool/asterisk/monitor/',''),'.wav','')),'.wav', '\\'', ')>მოსმენა</p>'))\r\n \r\n FROM incomming_call\r\n JOIN asterisk_incomming ON incomming_call.asterisk_incomming_id = asterisk_incomming.id\r\n JOIN users ON users.id = incomming_call.user_id\r\n JOIN persons ON persons.id = users.person_id\r\n WHERE DATE(incomming_call.date) BETWEEN '{$start}' AND '{$end}' AND incomming_call.call_status_id=1");
$data = array("aaData" => array());
while ($aRow = mysql_fetch_array($rResult)) {
$row = array();
for ($i = 0; $i < $count; $i++) {
$row[] = $aRow[$i];
}
$data['aaData'][] = $row;
}
break;
default:
$error = 'Action is Null';
}
$data['error'] = $error;
echo json_encode($data);
function checkgroup($user)
{
示例14: showdate
echo "<span class='small'><strong>" . $locale['504'] . "</strong> " . showdate("shortdate", $data['user_joined']) . "</span><br />\n";
echo "<br /></td>\n<td valign='top' class='tbl1 forum_thread_user_post'>\n";
if (iMOD) {
echo "<div style='float:right'><input type='checkbox' name='delete_post[]' value='" . $data['post_id'] . "' /></div>\n";
}
$message = parseubb($message);
$message = isset($_GET['highlight']) ? "<div class='search_result'>" . $message . "</div>\n" : $message;
echo nl2br($message);
echo "<!--sub_forum_post_message-->";
$a_result = dbquery("SELECT * FROM " . DB_FORUM_ATTACHMENTS . " WHERE post_id='" . $data['post_id'] . "'");
$a_files = "";
$a_images = "";
$i_files = 0;
$i_images = 0;
if (dbrows($a_result)) {
if (checkgroup($fdata['forum_attach_download'])) {
while ($a_data = dbarray($a_result)) {
if (!file_exists(FORUM . "attachments/" . $a_data['attach_name'])) {
break;
}
if (in_array($a_data['attach_ext'], $imagetypes) && @getimagesize(FORUM . "attachments/" . $a_data['attach_name'])) {
$a_images .= display_image_attach($a_data['attach_name'], "100", "100", $data['post_id']) . "\n";
$i_images++;
} else {
if ($i_files > 0) {
$a_files .= "<br />\n";
}
$a_files .= "<a href='" . FUSION_SELF . "?thread_id=" . $_GET['thread_id'] . "&getfile=" . $a_data['attach_id'] . "'>" . $a_data['attach_name'] . "</a> ";
$a_files .= "[<span class='small'>" . parsebytesize(filesize(FORUM . "attachments/" . $a_data['attach_name'])) . " / " . $a_data['attach_count'] . $locale['507a'] . "</span>]\n";
$i_files++;
}
示例15: closetable
echo "<br />\n<span class='small'>" . $data['weblink_cat_description'] . "</span>";
}
echo "</td>\n";
$counter++;
}
echo "</tr>\n</table>\n";
} else {
echo "<div style='text-align:center'><br />\n" . $locale['430'] . "<br /><br />\n</div>\n";
}
closetable();
} else {
$res = 0;
$result = dbquery("SELECT weblink_cat_name, weblink_cat_sorting, weblink_cat_access FROM " . DB_WEBLINK_CATS . " WHERE weblink_cat_id='" . $_GET['cat_id'] . "'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['weblink_cat_access'])) {
$res = 1;
add_to_title($locale['global_201'] . $cdata['weblink_cat_name']);
opentable($locale['400'] . ": " . $cdata['weblink_cat_name']);
$rows = dbcount("(weblink_id)", DB_WEBLINKS, "weblink_cat='" . $_GET['cat_id'] . "'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) {
$_GET['rowstart'] = 0;
}
if ($rows != 0) {
$result = dbquery("SELECT weblink_id, weblink_name, weblink_description, weblink_datestamp, weblink_count FROM " . DB_WEBLINKS . " WHERE weblink_cat='" . $_GET['cat_id'] . "' ORDER BY " . $cdata['weblink_cat_sorting'] . " LIMIT " . $_GET['rowstart'] . "," . $settings['links_per_page']);
$numrows = dbrows($result);
$i = 1;
while ($data = dbarray($result)) {
if ($data['weblink_datestamp'] + 604800 > time() + $settings['timeoffset'] * 3600) {
$new = " <span class='small'>" . $locale['410'] . "</span>";
} else {