本文整理汇总了PHP中check_dberror函数的典型用法代码示例。如果您正苦于以下问题:PHP check_dberror函数的具体用法?PHP check_dberror怎么用?PHP check_dberror使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_dberror函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_dberror
JFilterOutput::objectHTMLSafe($_POST);
$title = JRequest::getVar("title", "");
$description = JRequest::getVar('description', '', 'string', JREQUEST_ALLOWRAW);
$sdescription = JRequest::getVar('sdescription', '', 'string', JREQUEST_ALLOWRAW);
$created = JRequest::getVar("created", "");
$published = JRequest::getVar("published", 0);
$showdate = JRequest::getVar("showdate", "");
$kunena_db->setQuery("UPDATE #__fb_announcement SET title='{$title}', description='{$description}', sdescription='{$sdescription}', created=" . ($created != '' ? "'{$created}'" : "NOW()") . ", published='{$published}', showdate='{$showdate}' WHERE id={$id}");
if ($kunena_db->query()) {
$app->redirect(CKunenaLink::GetAnnouncementURL($fbConfig, 'show'), _ANN_SUCCESS_EDIT);
}
}
if ($do == "edit") {
$kunena_db->setQuery("SELECT * FROM #__fb_announcement WHERE id='{$id}'");
$anns = $kunena_db->loadObjectList();
check_dberror("Unable to load announcements.");
$ann = $anns[0];
$annID = $ann->id;
$anntitle = kunena_htmlspecialchars(stripslashes($ann->title));
$annsdescription = kunena_htmlspecialchars(stripslashes($ann->sdescription));
$anndescription = kunena_htmlspecialchars(stripslashes($ann->description));
$anncreated = $ann->created;
$annpublished = $ann->published;
$annordering = $ann->ordering;
$annshowdate = $ann->showdate;
$calendar = JHTML::_('calendar', $anncreated, 'created', 'addcreated');
//$document->addCustomTag('<link rel="stylesheet" type="text/css" media="all" href="' . JURI::root() . '/includes/js/calendar/calendar-mos.css" title="green" />');
?>
<script type = "text/javascript">
<!--
function validate_form()
示例2: showprf
function showprf($userid, $page)
{
$fbConfig =& CKunenaConfig::getInstance();
$kunena_acl =& JFactory::getACL();
$kunena_my =& JFactory::getUser();
$kunena_db =& JFactory::getDBO();
// ERROR: mixed global $fbIcons
global $fbIcons;
//Get userinfo needed later on, this limits the amount of queries
unset($userinfo);
$kunena_db->setQuery("SELECT a.*, b.* FROM #__fb_users AS a LEFT JOIN #__users AS b ON b.id=a.userid WHERE a.userid='{$userid}'");
$userinfo = $kunena_db->loadObject();
check_dberror('Unable to get user profile info.');
if (!$userinfo) {
$kunena_db->setQuery("SELECT * FROM #__users WHERE id='{$userid}'");
$userinfo = $kunena_db->loadObject();
check_dberror('Unable to get user profile info.');
if (!$userinfo) {
echo '<h3>' . _KUNENA_PROFILE_NO_USER . '</h3>';
return;
} else {
// Check moderator status (admin is moderator)
$aro_group = $kunena_acl->getAroGroup($userid);
$is_admin = strtolower($aro_group->name) == 'super administrator' || strtolower($aro_group->name) == 'administrator';
// there's no profile; set userid and moderator status.
$kunena_db->setQuery("INSERT INTO #__fb_users (userid,moderator) VALUES ('{$userid}','{$is_admin}')");
$kunena_db->query();
check_dberror('Unable to create user profile.');
$kunena_db->setQuery("SELECT a.*, b.* FROM #__fb_users AS a LEFT JOIN #__users AS b ON b.id=a.userid WHERE a.userid='{$userid}'");
$userinfo = $kunena_db->loadObject();
check_dberror('Unable to get user profile info.');
// TODO: For future use
// echo '<h3>' . _KUNENA_PROFILE_NOT_FOUND . '</h3>';
// return;
}
}
// User Hits
$kunena_db->setQuery('UPDATE #__fb_users SET uhits=uhits+1 WHERE userid=' . $userid);
$kunena_db->query() or trigger_dberror("Unable to update user hits.");
// get userprofile hits
$msg_userhits = $userinfo->uhits;
//get the username:
$fb_username = "";
if ($fbConfig->username) {
$fb_queryName = "username";
} else {
$fb_queryName = "name";
}
$fb_username = $userinfo->{$fb_queryName};
$lists["userid"] = $userid;
$msg_username = $fb_username;
// $msg_username = ($fmessage->email != "" && $kunena_my->id > 0 && $fbConfig->showemail == '1') ? "<a href=\"mailto:" . $fmessage->email . "\">" . $fb_username . "</a>" : $fb_username;
if ($fbConfig->allowavatar) {
$Avatarname = $userinfo->username;
if ($fbConfig->avatar_src == "jomsocial") {
// Get CUser object
$user =& CFactory::getUser($userid);
$msg_avatar = '<span class="fb_avatar"><img src="' . $user->getAvatar() . '" alt="" /></span>';
} else {
if ($fbConfig->avatar_src == "clexuspm") {
$msg_avatar = '<span class="fb_avatar"><img src="' . MyPMSTools::getAvatarLinkWithID($userid, "b") . '" alt="" /></span>';
} else {
if ($fbConfig->avatar_src == "cb") {
$kunenaProfile = CKunenaCBProfile::getInstance();
$msg_avatar = '<span class="fb_avatar">' . $kunenaProfile->showAvatar($userid, '', 0) . '</span>';
} else {
$avatar = $userinfo->avatar;
if ($avatar != '') {
if (!file_exists(KUNENA_PATH_UPLOADED . DS . 'avatars/l_' . $avatar)) {
$msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" style="max-width: ' . $fbConfig->avatarwidth . 'px; max-height: ' . $fbConfig->avatarheight . 'px;" /></span>';
} else {
$msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" /></span>';
}
} else {
$msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/nophoto.jpg" alt="" /></span>';
}
}
}
}
}
if ($fbConfig->showuserstats) {
//user type determination
$ugid = $userinfo->gid;
$uIsMod = 0;
$uIsAdm = 0;
if ($ugid > 0) {
//only get the groupname from the ACL if we're sure there is one
$agrp = strtolower($kunena_acl->get_group_name($ugid, 'ARO'));
}
if ($ugid == 0) {
$msg_usertype = _VIEW_VISITOR;
} else {
if (strtolower($agrp) == "administrator" || strtolower($agrp) == "superadministrator" || strtolower($agrp) == "super administrator") {
$msg_usertype = _VIEW_ADMIN;
$uIsAdm = 1;
} elseif ($uIsMod) {
$msg_usertype = _VIEW_MODERATOR;
} else {
$msg_usertype = _VIEW_USER;
}
//.........这里部分代码省略.........
示例3: editRank
function editRank($option, $id)
{
$kunena_db =& JFactory::getDBO();
$kunena_db->setQuery("SELECT * FROM #__fb_ranks WHERE rank_id = '{$id}'");
$kunena_db->query() or trigger_dberror("Unable to load ranks.");
$ranks = $kunena_db->loadObjectList();
check_dberror("Unable to load ranks.");
$rank_images = collectRanks();
$path = rankpath();
$path = $path['live'] . DS;
$edit_img = $filename_list = '';
foreach ($ranks as $row) {
foreach ($rank_images as $img) {
$image = $path . $img;
if ($img == $row->rank_image) {
$selected = ' selected="selected"';
$edit_img = $path . $img;
} else {
$selected = '';
}
if (strlen($img) > 255) {
continue;
}
$filename_list .= '<option value="' . kunena_htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
}
}
html_Kunena::editRank($option, KUNENA_LANGUAGE, $edit_img, $filename_list, $path, $row);
}
示例4: _getKunenaProperty
function _getKunenaProperty($field)
{
$kunena_db =& JFactory::getDBO();
if ($this->id == 0) {
return FALSE;
}
if ($this->kunenaProperties == NULL) {
$kunena_db->setQuery("SELECT * FROM #__fb_users WHERE userid='{$this->id}'", 0, 1);
$this->kunenaProperties = $kunena_db->loadAssoc();
check_dberror("Unable to load Kunena user information.");
}
if (array_key_exists($field, $this->kunenaProperties)) {
return $this->kunenaProperties[$field];
} else {
return FALSE;
}
}
示例5: showChildren
function showChildren($category, $prefix = "", &$allow_forum)
{
$kunena_db =& JFactory::getDBO();
$kunena_db->setQuery("SELECT id, name, parent FROM #__fb_categories WHERE parent='{$category}' AND published='1' ORDER BY ordering");
$forums = $kunena_db->loadObjectList();
check_dberror("Unable to load categories.");
foreach ($forums as $forum) {
if (in_array($forum->id, $allow_forum)) {
echo "<option value=\"{$forum->id}\">{$prefix} {$forum->name}</option>";
}
showChildren($forum->id, $prefix . "---", $allow_forum);
}
}
示例6: check_dberror
?>
<br /> <a href = "<?php
echo JRoute::_('index.php?option=com_comprofiler&Itemid=117&task=userAvatar');
?>
"><?php
echo _SET_NEW_AVATAR;
?>
</a>
<?php
}
} else {
$kunena_db->setQuery("SELECT avatar FROM #__fb_users WHERE userid='{$kunena_my->id}'");
$avatar = $kunena_db->loadResult();
check_dberror("Unable to load Kunena Avatar.");
if ($avatar != "") {
if (!file_exists(KUNENA_PATH_UPLOADED . DS . 'avatars/l_' . $avatar)) {
$msg_avatar = '<img src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" style="max-width: ' . $fbConfig->avatarlargewidth . 'px; max-height: ' . $fbConfig->avatarlargeheight . 'px;" />';
} else {
$msg_avatar = '<img src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/l_' . $avatar . '" alt="" />';
}
echo $msg_avatar;
?>
<br />
<input type = "checkbox" value = "1" name = "deleteAvatar"/><i> <?php
echo _USER_DELETEAV;
?>
</i>
示例7: getAllowedForums
function getAllowedForums($uid = 0, $gid = 0, &$kunena_acl)
{
$kunena_db =& JFactory::getDBO();
function _has_rights(&$kunena_acl, $gid, $access, $recurse)
{
if ($gid == $access) {
return 1;
}
if ($recurse) {
$childs = $kunena_acl->get_group_children($access, 'ARO', 'RECURSE');
return is_array($childs) and in_array($gid, $childs);
}
return 0;
}
$catlist = '';
$query = "SELECT c.id, c.pub_access, c.pub_recurse, c.admin_access, c.admin_recurse, c.moderated" . ",(m.userid IS NOT NULL) AS ismod FROM #__fb_categories c" . " LEFT JOIN #__fb_moderation m ON c.id=m.catid AND m.userid='{$uid}' WHERE published='1'";
$kunena_db->setQuery($query);
$rows = $kunena_db->loadObjectList();
check_dberror("Unable to load category list.");
if ($rows) {
foreach ($rows as $row) {
if ($gid == 24 || $gid == 25 or $row->moderated and $row->ismod or $row->pub_access == 0 or $row->pub_access == -1 and $uid > 0 or $row->pub_access > 0 and _has_rights($kunena_acl, $gid, $row->pub_access, $row->pub_recurse) or $row->admin_access > 0 and _has_rights($kunena_acl, $gid, $row->admin_access, $row->admin_recurse)) {
$catlist .= ($catlist == '' ? '' : ',') . $row->id;
}
}
}
return $catlist;
}
示例8: ceil
$totalpages = ceil($total / $threads_per_page);
echo $pagination = KunenaLatestxPagination($func, $sel, $page, $totalpages, $maxpages);
echo '</td>';
}
?>
</tr>
</table>
<!-- F: List Actions -->
<?php
if (count($threadids) > 0) {
//get all readTopics in an array
$readTopics = "";
$kunena_db->setQuery("SELECT readtopics FROM #__fb_sessions WHERE userid='{$kunena_my->id}'");
$readTopics = $kunena_db->loadResult();
check_dberror('Unable to load read topics.');
if (count($readTopics) == 0) {
$readTopics = "0";
}
//make sure at least something is in there..
//make it into an array
$read_topics = explode(',', $readTopics);
if (file_exists(KUNENA_ABSTMPLTPATH . '/flat.php')) {
include KUNENA_ABSTMPLTPATH . '/flat.php';
} else {
include KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'flat.php';
}
?>
<!-- B: List Actions -->
<table class="fb_list_actions" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
示例9: GetLatestPageAutoRedirectURL
function GetLatestPageAutoRedirectURL($fbConfig, $pid, $limit, $catid = 0)
{
$kunena_db =& JFactory::getDBO();
// First determine the thread, latest post and number of posts for the post supplied
$where = '';
if ($catid > 0) {
$where .= " AND a.catid = {$catid} ";
}
$kunena_db->setQuery("SELECT a.thread AS thread, MAX(a.id) AS latest_id, MAX(a.catid) AS catid, COUNT(*) AS totalmessages\n FROM #__fb_messages AS a,\n (SELECT MAX(thread) AS thread FROM #__fb_messages WHERE id='{$pid}') AS b\n WHERE a.thread = b.thread AND a.hold='0' {$where}\n GROUP BY a.thread");
$result = $kunena_db->loadObject();
check_dberror("Unable to retrieve latest post.");
if (!is_object($result)) {
return htmlspecialchars_decode(JRoute::_(KUNENA_LIVEURLREL . '&func=showcat&catid=' . $catid));
}
// Now Calculate the number of pages for this particular thread
$catid = $result->catid;
$threadPages = ceil($result->totalmessages / $limit);
// Finally build output block
return htmlspecialchars_decode(CKunenaLink::GetThreadPageURL($fbConfig, 'view', $catid, $result->thread, $threadPages, $limit));
}
示例10: ReportMessage
function ReportMessage($id, $catid, $reporter, $reason, $text, $type)
{
$kunena_my =& JFactory::getUser();
$kunena_db =& JFactory::getDBO();
$fbConfig =& CKunenaConfig::getInstance();
if (!$kunena_my->id) {
JError::raiseError(403, JText::_("ALERTNOTAUTH"));
return;
}
if (!empty($reason) && !empty($text)) {
$kunena_db->setQuery("SELECT a.*, b.mesid, b.message AS msg_text FROM #__fb_messages AS a" . " LEFT JOIN #__fb_messages_text AS b ON b.mesid = a.id" . " WHERE a.id='{$id}'");
$row = $kunena_db->loadObject();
$kunena_db->setQuery("SELECT username FROM #__users WHERE id={$row->userid}");
$baduser = $kunena_db->loadResult();
$kunena_db->setQuery("SELECT username FROM #__users WHERE id={$reporter}");
$sender = $kunena_db->loadResult();
if ($reason) {
$subject = "[" . stripslashes($fbConfig->board_title) . " " . _GEN_FORUM . "] " . _KUNENA_REPORT_MSG . ": " . $reason;
} else {
$subject = "[" . stripslashes($fbConfig->board_title) . " " . _GEN_FORUM . "] " . _KUNENA_REPORT_MSG . ": " . stripslashes($row->subject);
}
jimport('joomla.environment.uri');
$uri =& JURI::getInstance(JURI::base());
$msglink = $uri->toString(array('scheme', 'host', 'port')) . str_replace('&', '&', JRoute::_(KUNENA_LIVEURLREL . "&func=view&catid=" . $row->catid . "&id=" . $row->id) . '#' . $row->id);
$message = "" . _KUNENA_REPORT_RSENDER . " " . $sender;
$message .= "\n";
$message .= "" . _KUNENA_REPORT_RREASON . " " . $reason;
$message .= "\n";
$message .= "" . _KUNENA_REPORT_RMESSAGE . " " . $text;
$message .= "\n\n";
$message .= "" . _KUNENA_REPORT_POST_POSTER . " " . $baduser;
$message .= "\n";
$message .= "" . _KUNENA_REPORT_POST_SUBJECT . " " . stripslashes($row->subject);
$message .= "\n";
$message .= "" . _KUNENA_REPORT_POST_MESSAGE . "\n-----\n" . stripslashes($row->msg_text);
$message .= "\n-----\n\n";
$message .= "" . _KUNENA_REPORT_POST_LINK . " " . $msglink;
$message .= "\n\n\n\n** Powered by Kunena! - http://www.Kunena.com **";
$message = strtr($message, array(' ' => ''));
//get category moderators
$kunena_db->setQuery("SELECT userid FROM #__fb_moderation WHERE catid={$row->catid}");
$mods = $kunena_db->loadObjectList();
check_dberror("Unable to load moderators.");
//get admins
$kunena_db->setQuery("SELECT id FROM #__users WHERE gid >= 24");
$admins = $kunena_db->loadObjectList();
check_dberror("Unable to load admin.");
switch ($type) {
default:
case '0':
SendReporttoMail($sender, $subject, $message, $msglink, $mods, $admins);
break;
case '1':
SendReporttoPM($reporter, $subject, $message, $msglink, $mods, $admins);
break;
}
echo '<div align="center">' . _KUNENA_REPORT_SUCCESS;
echo CKunenaLink::GetAutoRedirectHTML(JRoute::_(KUNENA_LIVEURLREL . '&func=view&catid=' . $catid . '&id=' . $id) . '#' . $id, 3500);
} else {
echo '<div align="center">';
if (empty($reason)) {
echo _POST_FORGOT_SUBJECT;
} else {
if (empty($text)) {
echo _POST_FORGOT_MESSAGE;
}
}
}
echo '<br /><br />';
echo '<a href="' . JRoute::_(KUNENA_LIVEURLREL . '&func=view&catid=' . $catid . '&id=' . $id) . '#' . $id . '">' . _POST_SUCCESS_VIEW . '</a><br />';
echo '<a href="' . JRoute::_(KUNENA_LIVEURLREL . '&func=showcat&catid=' . $catid) . '">' . _POST_SUCCESS_FORUM . '</a><br />';
echo '</div>';
}
示例11: get_top_categories
/**
* Get top categories
* @return array
*/
function get_top_categories()
{
$kunena_db =& JFactory::getDBO();
$kunena_db->setQuery('SELECT catid,COUNT(id) as totalmsg FROM #__fb_messages' . ' GROUP BY c.id ORDER BY catid LIMIT 5');
$results = $kunena_db->loadObjectList();
check_dberror("Unable to load messages.");
if (count($results) > 0) {
$ids = implode(',', $results);
$kunena_db->setQuery('SELECT name FROM #__fb_categories WHERE id IN (' . $ids . ') ORDER BY catid');
$names = $kunena_db->loadResultArray();
$i = 0;
foreach ($results as $result) {
$result->name = $names[$i++];
}
} else {
$results = array();
}
return $results;
}
示例12: KUNENA_get_pathway
/**
* Function to print the pathway
* @param object database object
* @param object category object
* @param int the post id
* @param boolean set title
*/
function KUNENA_get_pathway(&$kunena_db, $obj_fb_cat, $bool_set_title, $obj_post = 0)
{
global $fbIcons;
$document =& JFactory::getDocument();
$fbConfig =& CKunenaConfig::getInstance();
//Get the Category's parent category name for breadcrumb
$kunena_db->setQuery("SELECT name, id FROM #__fb_categories WHERE id='" . $obj_fb_cat->getParent()) . "'";
$objCatParentInfo = $kunena_db->loadObject();
check_dberror("Unable to load categories.");
//get the Moderator list for display
$kunena_db->setQuery("SELECT * FROM #__fb_moderation AS m LEFT JOIN #__users AS u ON u.id=m.userid WHERE m.catid='" . $obj_fb_cat->getId() . "'");
$modslist = $kunena_db->loadObjectList();
check_dberror("Unable to load moderators.");
// echo '<div class="fb_pathway">';
// List of Forums
// show folder icon
$return = '<img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" border="0" alt="' . _GEN_FORUMLIST . '" style="vertical-align: middle;" /> ';
// link to List of Forum Categories
$return .= ' ' . fb_Link::GetKunenaLink(_GEN_FORUMLIST) . '<br />';
// List of Categories
if ($objCatParentInfo) {
if ($bool_set_title) {
$document->setTitle(stripslashes($objCatParentInfo->name) . ' - ' . stripslashes($obj_fb_cat->getName()) . ' - ' . stripslashes($fbConfig->board_title));
}
// show lines
$return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'tree-end.gif" alt="|-" border="0" style="vertical-align: middle;" />';
$return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" alt="' . $objCatParentInfo->name . '" border="0" style="vertical-align: middle;" /> ';
// link to Category
$return .= ' ' . fblink::GetCategoryLink('listcat', $objCatParentInfo->id, $objCatParentInfo->name) . '<br />';
$return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'tree-blank.gif" alt="| " border="0" style="vertical-align: middle;" />';
} else {
if ($bool_set_title) {
$document->setTitle(stripslashes($obj_fb_cat->getName()) . ' - ' . stripslashes($fbConfig->board_title));
}
}
// Forum
// show lines
$return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'tree-end.gif" alt="|-" border="0" style="vertical-align: middle;" />';
$return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" alt="+" border="0" style="vertical-align: middle;" /> ';
// Link to forum
$return .= ' ' . fbLink::GetCategoryLink('listcat', $obj_fb_cat->getId(), $obj_fb_cat->getName());
//check if this forum is locked
if ($obj_fb_cat->getLocked()) {
$return .= isset($fbIcons['forumlocked']) ? ' <img src="' . KUNENA_URLICONSPATH . $fbIcons['forumlocked'] . '" border="0" alt="' . _GEN_LOCKED_FORUM . '" title="' . _GEN_LOCKED_FORUM . '"/>' : ' <img src="' . KUNENA_URLIMAGESPATH . 'lock.gif" border="0" width="13" height="13" alt="' . _GEN_LOCKED_FORUM . '" title="' . _GEN_LOCKED_FORUM . '">';
}
// check if this forum is reviewed
if ($obj_fb_cat->getReview()) {
$return .= isset($fbIcons['forumreviewed']) ? ' <img src="' . KUNENA_URLICONSPATH . $fbIcons['forumreviewed'] . '" border="0" alt="' . _GEN_REVIEWED . '" title="' . _GEN_REVIEWED . '"/>' : ' <img src="' . KUNENA_URLIMAGESPATH . 'review.gif" border="0" width="15" height="15" alt="' . _GEN_REVIEWED . '" title="' . _GEN_REVIEWED . '">';
}
//check if this forum is moderated
if ($obj_fb_cat->getModerated()) {
$return .= isset($fbIcons['forummoderated']) ? ' <img src="' . KUNENA_URLICONSPATH . $fbIcons['forummoderated'] . '" border="0" alt="' . _GEN_MODERATED . '" title="' . _GEN_MODERATED . '"/>' : ' <img src="' . KUNENA_URLEMOTIONSPATH . 'moderate.gif" border="0" alt="' . _GEN_MODERATED . '" title="' . _GEN_MODERATED . '"/>';
$text = '';
if (count($modslist) > 0) {
foreach ($modslist as $mod) {
$text = $text . ', ' . $mod->username;
}
$return .= ' (' . _GEN_MODERATORS . ': ' . ltrim($text, ",") . ')';
}
}
if ($obj_post != 0) {
if ($bool_set_title) {
$document->setTitle(stripslashes($obj_post->subject) . ' - ' . stripslashes($fbConfig->board_title));
}
// Topic
// show lines
$return .= '<br /> <img src="' . KUNENA_URLIMAGESPATH . 'tree-blank.gif" alt="| " border="0" style="vertical-align: middle;" />';
$return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'tree-blank.gif" alt="| " border="0" style="vertical-align: middle;" />';
$return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'tree-end.gif" alt="|-" border="0" style="vertical-align: middle;" />';
$return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'folder.gif" alt="+" border="0" style="vertical-align: middle;" /> ';
$return .= ' <b>' . $obj_post->subject . '</b>';
// Check if the Topic is locked?
if ((int) $obj_post->locked != 0) {
$return .= ' <img src="' . KUNENA_URLIMAGESPATH . 'lock.gif" border="0" width="13" height="13" alt="' . _GEN_LOCKED_TOPIC . '" title="' . _GEN_LOCKED_TOPIC . '"/>';
}
}
// echo '</div>';
return $return;
}
示例13: load
public function load($KunenaUser = null)
{
$tables = CKunenaTables::getInstance();
if ($tables->check($this->GetConfigTableName())) {
$this->_db->setQuery("SELECT * FROM " . $this->GetConfigTableName());
$config = $this->_db->loadAssoc();
check_dberror("Unable to load configuration table.");
if ($config != null) {
$this->bind($config);
}
}
// Check for user specific overrides
if (is_object($KunenaUser)) {
// overload the settings with user specific ones
$this->DoUserOverrides($KunenaUser);
// Now the variables of the class contain the global settings
// overloaded with the user specific ones
// No other code changes required to support user specific settings.
}
}
示例14: isset
$fireinfo = isset($fbIcons['forummoderated']) ? ' <img src="' . KUNENA_URLICONSPATH . $fbIcons['forummoderated'] . '" border="0" alt="' . _GEN_MODERATED . '" title="' . _GEN_MODERATED . '"/>' : ' <img src="' . KUNENA_URLEMOTIONSPATH . 'review.gif" border="0" alt="' . _GEN_MODERATED . '" title="' . _GEN_MODERATED . '">';
$moderatedForum = 1;
}
for ($i = 0; $i < $jr_forum_count; $i++) {
if ($i == $jr_forum_count - 1) {
echo '<div class="path-element-last">' . $jr_path_menu[$i] . $fireinfo . '</div>';
} else {
echo '<div class="path-element">' . $jr_path_menu[$i] . '</div>';
}
}
//get viewing
$fb_queryName = $fbConfig->username ? "username" : "name";
$query = "SELECT w.userid, u.id, u.{$fb_queryName} AS username, k.showOnline FROM #__fb_whoisonline AS w LEFT JOIN #__users AS u ON u.id=w.userid LEFT JOIN #__fb_users AS k ON k.userid=w.userid WHERE w.link like '%" . addslashes($_SERVER['REQUEST_URI']) . "%' GROUP BY w.userid ORDER BY u.{$fb_queryName} ASC";
$kunena_db->setQuery($query);
$users = $kunena_db->loadObjectList();
check_dberror("Unable to load who is online.");
$total_viewing = count($users);
if ($sfunc == "userprofile") {
echo _USER_PROFILE;
echo $username;
} else {
echo "<div class=\"path-element-users\">({$total_viewing} " . _KUNENA_PATHWAY_VIEWING . ") ";
$totalguest = 0;
$lastone = end($users);
$divider = ', ';
foreach ($users as $user) {
if ($user->userid != 0) {
if ($user == $lastone && !$totalguest) {
$divider = '';
}
if ($user->showOnline > 0) {
示例15: com_install
function com_install()
{
$kunena_db = JFactory::getDBO();
// Determine MySQL version from phpinfo
$kunena_db->setQuery("SELECT VERSION() as mysql_version");
$mysqlversion = $kunena_db->loadResult();
//before we do anything else we want to check for minimum system requirements
if (version_compare(phpversion(), KUNENA_MIN_PHP, ">=") && version_compare($mysqlversion, KUNENA_MIN_MYSQL, ">")) {
//change fb menu icon
$kunena_db->setQuery("SELECT id FROM #__components WHERE admin_menu_link = 'option=com_kunena'");
$id = $kunena_db->loadResult();
check_dberror("Unable to find component.");
//add new admin menu images
$kunena_db->setQuery("UPDATE #__components SET admin_menu_img = 'components/com_kunena/images/kunenafavicon.png'" . ", admin_menu_link = 'option=com_kunena' " . "WHERE id='" . $id . "'");
$kunena_db->query();
check_dbwarning("Unable to set admin menu image.");
//install & upgrade class
$fbupgrade = new fx_Upgrade("com_kunena", "kunena.install.upgrade.xml", "fb_", "install", false);
// Start Installation/Upgrade
$fbupgrade->doUpgrade();
// THIS PROCEDURE IS UNTRANSLATED!
?>
<style>
.fbscs {
margin: 0;
padding: 0;
list-style: none;
}
.fbscslist {
list-style: none;
padding: 5px 10px;
margin: 3px 0;
border: 1px solid #66CC66;
background: #D6FEB8;
display: block;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333;
}
.fbscslisterror {
list-style: none;
padding: 5px 10px;
margin: 3px 0;
border: 1px solid #FF9999;
background: #FFCCCC;
display: block;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333;
}
</style>
<div style="border: 1px solid #ccc; background: #FBFBFB; padding: 10px; text-align: left; margin: 10px 0;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" valign="top" style="padding: 10px;"><a
href="index.php?option=com_kunena"><img
src="components/com_kunena/images/kunena.logo.png" alt="Kunena"
border="0"></a></td>
<td width="80%" valign="top" style="padding: 10px;">
<div style="clear: both; text-align: left; padding: 0 20px;">
<ul class="fbscs">
<?php
//
// We might want to make the file copy below part of the install as well
//
jimport('joomla.filesystem.folder');
$ret = JFolder::copy(JPATH_ROOT . DS . "components" . DS . "com_kunena" . DS . "kunena.files.distribution", JPATH_ROOT . DS . "images" . DS . "fbfiles", '', true);
if ($ret !== true) {
?>
<li class="fbscslisterror">
<div
style="border: 1px solid #FF6666; background: #FFCC99; padding: 10px; text-align: left; margin: 10px 0;">
<img src='images/publish_x.png' align='absmiddle' />
Creation/permission setting of the following directories failed: <br />
<pre> <?php
echo JPATH_ROOT;
?>
/images/fbfiles/
<?php
echo JPATH_ROOT;
?>
/images/fbfiles/avatars
<?php
echo JPATH_ROOT;
?>
/images/fbfiles/avatars/gallery (you have to put avatars inside if you want to use it)
<?php
echo JPATH_ROOT;
?>
/images/fbfiles/category_images
<?php
echo JPATH_ROOT;
?>
/images/fbfiles/files
//.........这里部分代码省略.........