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

PHP CKunenaTools类代码示例

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

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



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

示例1: _deleteUser

 /**
  * Delete a user
  *
  * @access protected
  * @param unknown_type $UserID
  * @return boolean
  */
 protected function _deleteUser($UserID)
 {
     // Sanitize parameters!
     $UserID = intval($UserID);
     if (!CKunenaTools::isAdmin($this->_my->id)) {
         $this->_errormsg = JText::_('COM_KUNENA_MODERATION_ERROR_NOT_ADMIN');
         return false;
     }
     if ($UserID == $this->_my->id) {
         $this->_errormsg = JText::_('COM_KUNENA_MODERATION_ERROR_USER_DELETE_YOURSELF');
         return false;
     }
     if (!$UserID) {
         $this->_errormsg = JText::_('COM_KUNENA_MODERATION_ERROR_USER_DELETE_ANONYMOUS');
         return false;
     }
     $user = JUser::getInstance($UserID);
     if (!$user->id) {
         $this->_errormsg = JText::_('COM_KUNENA_MODERATION_ERROR_USER_DELETE_NO_USER', $UserID);
         return false;
     }
     // Nobody can delete admins
     if (CKunenaTools::isAdmin($UserID)) {
         $this->_errormsg = JText::_('COM_KUNENA_MODERATION_ERROR_USER_DELETE_ADMIN', $user->username);
         return false;
     }
     $user->delete();
     $this->_db->setQuery("DELETE FROM #__kunena_users WHERE `userid`={$this->_db->Quote($UserID)};");
     $this->_db->query();
     if (KunenaError::checkDatabaseError()) {
         return false;
     }
     return true;
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:41,代码来源:kunena.moderation.tools.class.php


示例2: getUserLink

 /**
  * adds the link for the connect param
  * @since 1.7.3
  * @param  $user pass-by-reference
  * @return void
  */
 private function getUserLink(&$user)
 {
     $username = KunenaFactory::getUser($user['userid'])->getName();
     if ($user['leapcorrection'] == $this->timeo->format('z', true) + 1) {
         $subject = getSubject($username);
         $db = JFactory::getDBO();
         $query = "SELECT id,catid,subject,time as year FROM #__kunena_messages WHERE subject='{$subject}'";
         $db->setQuery($query, 0, 1);
         $post = $db->loadAssoc();
         if ($db->getErrorMsg()) {
             KunenaError::checkDatabaseError();
         }
         $catid = $this->params->get('bcatid');
         $postyear = new JDate($post['year'], $this->soffset);
         if (empty($post) && !empty($catid) || !empty($post) && !empty($catid) && $postyear->format('Y', true) < $this->timeo->format('Y', true)) {
             $botname = $this->params->get('swkbbotname', JText::_('SW_KBIRTHDAY_FORUMPOST_BOTNAME_DEF'));
             $botid = $this->params->get('swkbotid');
             $time = CKunenaTimeformat::internalTime();
             //Insert the birthday thread into DB
             $query = "INSERT INTO #__kunena_messages (catid,name,userid,email,subject,time, ip)\n\t\t    \t\tVALUES({$catid},'{$botname}',{$botid}, '','{$subject}', {$time}, '')";
             $db->setQuery($query);
             $db->query();
             if ($db->getErrorMsg()) {
                 KunenaError::checkDatabaseError();
             }
             //What ID get our thread?
             $messid = (int) $db->insertID();
             //Insert the thread message into DB
             $message = getMessage($username);
             $query = "INSERT INTO #__kunena_messages_text (mesid,message)\n                    VALUES({$messid},'{$message}')";
             $db->setQuery($query);
             $db->query();
             if ($db->getErrorMsg()) {
                 KunenaError::checkDatabaseError();
             }
             //We know the thread ID so we can update the parent thread id with it's own ID because we know it's
             //the first post
             $query = "UPDATE #__kunena_messages SET thread={$messid} WHERE id={$messid}";
             $db->setQuery($query);
             $db->query();
             if ($db->getErrorMsg()) {
                 KunenaError::checkDatabaseError();
             }
             // now increase the #s in categories
             CKunenaTools::modifyCategoryStats($messid, 0, $time, $catid);
             $user['link'] = CKunenaLink::GetViewLink('view', $messid, $catid, '', $username);
             $uri = JFactory::getURI();
             if ($uri->getVar('option') == 'com_kunena') {
                 $app =& JFactory::getApplication();
                 $app->redirect($uri->toString());
             }
         } elseif (!empty($post)) {
             $user['link'] = CKunenaLink::GetViewLink('view', $post['id'], $post['catid'], '', $username);
         }
     } else {
         $user['link'] = CKunenaLink::GetProfileLink($user['userid']);
     }
 }
开发者ID:rich20,项目名称:mod_sw_kbirthday_J16,代码行数:64,代码来源:forum.php


示例3: convertDate

function convertDate($date)
{
    // used for non-FB dates only!
    $format = _KUNENA_USRL_DATE_FORMAT;
    if ($date != "0000-00-00 00:00:00" && preg_match('`(\\d{4})-(\\d{2})-(\\d{2})[[:space:]](\\d{2}):(\\d{2}):(\\d{2})`', $date, $regs)) {
        $date = mktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]);
        $date = $date > -1 ? strftime($format, CKunenaTools::fbGetShowTime($date, 'UTC')) : '-';
    } else {
        $date = _KUNENA_USRL_NEVER;
    }
    return $date;
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:12,代码来源:userlist.php


示例4: convertDate

function convertDate($date)
{
    // used for non-FB dates only!
    $format = _KUNENA_USRL_DATE_FORMAT;
    if ($date != "0000-00-00 00:00:00" && ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})[ ]([0-9]{2}):([0-9]{2}):([0-9]{2})", $date, $regs)) {
        $date = mktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]);
        $date = $date > -1 ? strftime($format, CKunenaTools::fbGetShowTime($date, 'UTC')) : '-';
    } else {
        $date = _KUNENA_USRL_NEVER;
    }
    return $date;
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:12,代码来源:userlist.php


示例5: __construct

 function __construct()
 {
     $this->_db =& JFactory::getDBO();
     $this->_my =& JFactory::getUser();
     $this->_session =& KunenaFactory::getSession();
     $this->_config = KunenaFactory::getConfig();
     $this->_isimage = false;
     $this->_isfile = false;
     if (CKunenaTools::isModerator($this->_my->id) || $this->_my->id && $this->_config->allowimageregupload || !$this->_my->id && $this->_config->allowimageupload) {
         $this->validImageExts = explode(',', $this->_config->imagetypes);
     }
     if (CKunenaTools::isModerator($this->_my->id) || $this->_my->id && $this->_config->allowfileregupload || !$this->_my->id && $this->_config->allowfileupload) {
         $this->validFileExts = explode(',', $this->_config->filetypes);
     }
     $this->setImageResize(intval($this->_config->imagesize) * 1024, intval($this->_config->imagewidth), intval($this->_config->imageheight), intval($this->_config->imagequality));
 }
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:16,代码来源:kunena.upload.class.php


示例6: KUNENA_timeformat

function KUNENA_timeformat($logTime, $show_today = true)
{
    // formatts a time in Display space! Don't pass internal times!
    // ToDo: Pass format!
    $usertime_format = _KUNENA_DT_DATETIME_FMT;
    $app =& JFactory::getApplication();
    $time = $logTime;
    $todayMod = 2;
    // We can't have a negative date (on Windows, at least.)
    if ($time < 0) {
        $time = 0;
    }
    // Today and Yesterday?
    if ($show_today === true) {
        // Get the current time.
        $nowtime = CKunenaTools::fbGetShowTime();
        $then = @getdate($time);
        $now = @getdate($nowtime);
        // Try to make something of a time format string...
        $s = strpos($usertime_format, '%S') === false ? '' : ':%S';
        if (strpos($usertime_format, '%H') === false && strpos($usertime_format, '%T') === false) {
            $today_fmt = '%I:%M' . $s . ' %p';
        } else {
            $today_fmt = '%H:%M' . $s;
        }
        // Same day of the year, same year.... Today!
        if ($then['yday'] == $now['yday'] && $then['year'] == $now['year']) {
            return '' . _TIME_TODAY . '' . KUNENA_timeformat($logTime, $today_fmt);
        }
        // Day-of-year is one less and same year, or it's the first of the year and that's the last of the year...
        if ($todayMod == '2' && ($then['yday'] == $now['yday'] - 1 && $then['year'] == $now['year'] || $now['yday'] == 0 && $then['year'] == $now['year'] - 1 && $then['mon'] == 12 && $then['mday'] == 31)) {
            return '' . _TIME_YESTERDAY . '' . KUNENA_timeformat($logTime, $today_fmt);
        }
    }
    $str = !is_bool($show_today) ? $show_today : $usertime_format;
    // Do-it-yourself time localization.  Fun.
    foreach (array('%a' => 'days_short', '%A' => 'days', '%b' => 'months_short', '%B' => 'months') as $token => $text_label) {
        if (strpos($str, $token) !== false) {
            $str = str_replace($token, $GLOBALS['KUNENA_DT_txt'][$text_label][(int) strftime($token === '%a' || $token === '%A' ? '%w' : '%m', $time)], $str);
        }
    }
    if (strpos($str, '%p')) {
        $str = str_replace('%p', strftime('%H', $time) < 12 ? 'am' : 'pm', $str);
    }
    // Format any other characters..
    return strftime($str, $time);
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:47,代码来源:kunena.timeformat.class.php


示例7: display

 function display()
 {
     if (!$this->config->showannouncement) {
         return;
     }
     $do = JRequest::getVar("do", "");
     $id = intval(JRequest::getVar("id", ""));
     switch ($do) {
         case 'read':
             $this->getAnnouncement($id, 1);
             CKunenaTools::loadTemplate('/announcement/read.php');
             break;
         case 'show':
             $this->getAnnouncements(0, 5);
             CKunenaTools::loadTemplate('/announcement/show.php');
             break;
         case 'edit':
             if (!$this->canEdit) {
                 while (@ob_end_clean()) {
                 }
                 $this->app->redirect(CKunenaLink::GetKunenaURL(false), JText::_('COM_KUNENA_POST_NOT_MODERATOR'));
                 return;
             }
             $this->getAnnouncement($id, 0);
             // Continue
         // Continue
         case 'add':
             if (!$this->canEdit) {
                 while (@ob_end_clean()) {
                 }
                 $this->app->redirect(CKunenaLink::GetKunenaURL(false), JText::_('COM_KUNENA_POST_NOT_MODERATOR'));
                 return;
             }
             CKunenaTools::loadTemplate('/announcement/edit.php');
             break;
         case 'delete':
             $this->delete($id);
             break;
         case 'doedit':
             $this->edit($id);
             break;
         default:
             $this->getAnnouncements(0, 5);
             CKunenaTools::loadTemplate('/announcement/show.php');
     }
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:46,代码来源:kunena.announcement.class.php


示例8: while

         }
         $kunena_app->redirect(CKunenaLink::GetLatestPageAutoRedirectURL($pid, $kunena_config->messages_per_page, $catid));
     } else {
         while (@ob_end_clean()) {
         }
         $kunena_app->redirect(CKunenaLink::GetMyProfileURL($userid));
     }
     return;
 }
 // This checkes to see if it's not too soon for a new karma change
 if (!CKunenaTools::isModerator($kunena_my->id, $catid)) {
     $userprofile = KunenaFactory::getUser($kunena_my->id);
     $karma_time_old = $userprofile->karma_time;
     $karma_time_diff = $time - $karma_time_old;
 }
 if (CKunenaTools::isModerator($kunena_my->id, $catid) || $karma_time_diff >= $karma_min_seconds) {
     if ($do == "increase") {
         $kunena_db->setQuery("UPDATE #__kunena_users SET karma_time={$kunena_db->Quote($time)} WHERE userid={$kunena_db->Quote($kunena_my->id)} ");
         $kunena_db->query();
         if (KunenaError::checkDatabaseError()) {
             return;
         }
         $kunena_db->setQuery("UPDATE #__kunena_users SET karma=karma+1 WHERE userid={$kunena_db->Quote($userid)}");
         $kunena_db->query();
         if (KunenaError::checkDatabaseError()) {
             return;
         }
         // Activity integration
         $activity = KunenaFactory::getActivityIntegration();
         $activity->onAfterKarma($userid, $kunena_my->id, 1);
         if ($pid) {
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:kunena.karma.php


示例9: dofreePDF

function dofreePDF($kunena_db)
{
    global $aro_group;
    $app =& JFactory::getApplication();
    $kunena_acl =& JFactory::getACL();
    $kunena_my =& JFactory::getUser();
    $fbConfig =& CKunenaConfig::getInstance();
    require_once KUNENA_PATH_LIB . DS . 'kunena.authentication.php';
    $is_Mod = 0;
    $catid = JRequest::getInt('catid', 2);
    if (!$is_admin) {
        $kunena_db->setQuery("SELECT userid FROM #__fb_moderation WHERE catid='{$catid}' AND userid='{$kunena_my->id}'");
        if ($kunena_db->loadResult()) {
            $is_Mod = 1;
        }
    } else {
        $is_Mod = 1;
    }
    //superadmins always are
    if (!$is_Mod) {
        //get all the info on this forum:
        $kunena_db->setQuery("SELECT id, pub_access, pub_recurse, admin_access, admin_recurse FROM #__fb_categories WHERE id='{$catid}'");
        $row = $kunena_db->loadObjectList();
        check_dberror("Unable to load category detail.");
        $allow_forum = explode(',', CKunenaTools::getAllowedForums($kunena_my->id, $aro_group->id, $kunena_acl));
    }
    if ($is_Mod || in_array($catid, $allow_forum)) {
        $id = JRequest::getInt('id', 1);
        $catid = JRequest::getInt('catid', 2);
        //first get the thread id for the current post to later on determine the parent post
        $kunena_db->setQuery("SELECT thread FROM #__fb_messages WHERE id='{$id}' AND catid='{$catid}'");
        $threadid = $kunena_db->loadResult();
        //load topic post and details
        $kunena_db->setQuery("SELECT a.*, b.* FROM #__fb_messages AS a, #__fb_messages_text AS b WHERE a.thread='{$threadid}' AND a.catid='{$catid}' AND a.parent='0' AND a.id=b.mesid");
        $row = $kunena_db->loadObjectList();
        check_dberror("Unable to load message details.");
        if (file_exists(KUNENA_ROOT_PATH . DS . 'includes/class.ezpdf.php')) {
            include KUNENA_ROOT_PATH . DS . 'includes/class.ezpdf.php';
            $pdf = new Cezpdf('a4', 'P');
            //A4 Portrait
        } elseif (class_exists('JDocument')) {
            $pdf = new fbpdfwrapper();
        } else {
            echo 'No supported pdf class found!';
            exit;
        }
        if (empty($row)) {
            //if the messages doesn't exist don't need to continue
            //Doesn't work Fatal error: Call to undefined method CKunenaLink::GetKunenaURL()
            //$app->redirect ( CKunenaLink::GetKunenaURL(true), _KUNENA_PDF_NOT_GENERATED_MESSAGE_DELETED );
        } else {
            $mes_text = $row[0]->message;
            filterHTML($mes_text);
            $pdf->ezSetCmMargins(2, 1.5, 1, 1);
            $pdf->selectFont('./fonts/Helvetica.afm');
            //choose font
            $all = $pdf->openObject();
            $pdf->saveState();
            $pdf->setStrokeColor(0, 0, 0, 1);
            // footer
            $pdf->line(10, 40, 578, 40);
            $pdf->line(10, 822, 578, 822);
            $pdf->addText(30, 34, 6, $fbConfig->board_title . ' - ' . $app->getCfg('sitename'));
            $strtmp = _KUNENA_PDF_VERSION;
            $strtmp = str_replace('%version%', "NEW VERSION GOES HERE", $strtmp);
            // TODO: fxstein - Need to change version handling
            $pdf->addText(250, 34, 6, $strtmp);
            $strtmp = _KUNENA_PDF_DATE;
            $strtmp = str_replace('%date%', date('j F, Y, H:i', CKunenaTools::fbGetShowTime()), $strtmp);
            $pdf->addText(450, 34, 6, $strtmp);
            $pdf->restoreState();
            $pdf->closeObject();
            $pdf->addObject($all, 'all');
            $pdf->ezSetDy(30);
            $txt0 = $row[0]->subject;
            $pdf->ezText($txt0, 14);
            $pdf->ezText(_VIEW_POSTED . " " . $row[0]->name . " - " . date(_DATETIME, $row[0]->time), 8);
            $pdf->ezText("_____________________________________", 8);
            //$pdf->line( 10, 780, 578, 780 );
            $txt3 = "\n";
            $txt3 .= stripslashes($mes_text);
            $pdf->ezText($txt3, 10);
            $pdf->ezText("\n============================================================================\n\n", 8);
            //now let's try to see if there's more...
            $kunena_db->setQuery("SELECT a.*, b.* FROM #__fb_messages AS a, #__fb_messages_text AS b WHERE a.catid='{$catid}' AND a.thread='{$threadid}' AND a.id=b.mesid AND a.parent!='0' ORDER BY a.time ASC");
            $replies = $kunena_db->loadObjectList();
            check_dberror("Unable to load messages & detail.");
            $countReplies = count($replies);
            if ($countReplies > 0) {
                foreach ($replies as $reply) {
                    $mes_text = $reply->message;
                    filterHTML($mes_text);
                    $txt0 = $reply->subject;
                    $pdf->ezText($txt0, 14);
                    $pdf->ezText(_VIEW_POSTED . " " . $reply->name . " - " . date(_DATETIME, $reply->time), 8);
                    $pdf->ezText("_____________________________________", 8);
                    $txt3 = "\n";
                    $txt3 .= stripslashes($mes_text);
                    $pdf->ezText($txt3, 10);
                    $pdf->ezText("\n============================================================================\n\n", 8);
//.........这里部分代码省略.........
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:101,代码来源:kunena.pdf.php


示例10: fbMovePosts

 function fbMovePosts($catid, $isMod, $return)
 {
     $app =& JFactory::getApplication();
     $backUrl = $app->getUserState("com_kunena.ActionBulk");
     $kunena_db =& JFactory::getDBO();
     $kunena_my =& JFactory::getUser();
     // $isMod if user is moderator in the current category
     if (!$isMod) {
         // Test also if user is a moderator in some other category
         $kunena_db->setQuery("SELECT userid FROM #__fb_moderation WHERE userid='{$kunena_my->id}'");
         $isMod = $kunena_db->loadResult();
         check_dberror("Unable to load moderation info.");
     }
     $isAdmin = CKunenaTools::isModOrAdmin();
     //isMod will stay until better group management comes in
     if (!$isAdmin && !$isMod) {
         $app->redirect($return, _POST_NOT_MODERATOR);
     }
     $catid = (int) $catid;
     if ($catid > 0) {
         $items = fbGetArrayInts("fbDelete");
         // start iterating here
         foreach ($items as $id => $value) {
             $id = (int) $id;
             $kunena_db->setQuery("SELECT subject, catid, time AS timestamp FROM #__fb_messages WHERE id='{$id}'");
             $oldRecord = $kunena_db->loadObjectList();
             check_dberror("Unable to load message detail.");
             $newCatObj = new jbCategory($kunena_db, $oldRecord[0]->catid);
             if (fb_has_moderator_permission($kunena_db, $newCatObj, $kunena_my->id, $isAdmin)) {
                 $newSubject = _MOVED_TOPIC . " " . $oldRecord[0]->subject;
                 $kunena_db->setQuery("SELECT MAX(time) AS timestamp FROM #__fb_messages WHERE thread='{$id}'");
                 $lastTimestamp = $kunena_db->loadResult();
                 check_dberror("Unable to load messages max(time).");
                 if ($lastTimestamp == "") {
                     $lastTimestamp = $oldRecord[0]->timestamp;
                 }
                 //perform the actual move
                 $kunena_db->setQuery("UPDATE #__fb_messages SET `catid`='{$catid}' WHERE `id`='{$id}' OR `thread`='{$id}'");
                 $kunena_db->query();
                 check_dberror("Unable to move thread.");
                 $err = _POST_SUCCESS_MOVE;
             } else {
                 $err = _POST_NOT_MODERATOR;
             }
         }
         //end foreach
     } else {
         $err = _POST_NO_DEST_CATEGORY;
     }
     CKunenaTools::reCountBoards();
     $app->redirect($return, $err);
 }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:52,代码来源:class.kunena.php


示例11: switch

     $app->redirect(htmlspecialchars_decode(JRoute::_(KUNENA_LIVEURLREL . '&amp;func=showcat&amp;catid=' . $catid)), _GEN_FORUM_MARKED);
     break;
     #########################################################################################
 #########################################################################################
 case 'karma':
     include KUNENA_PATH_LIB . DS . 'kunena.karma.php';
     break;
     #########################################################################################
 #########################################################################################
 case 'bulkactions':
     switch ($do) {
         case "bulkDel":
             CKunenaTools::fbDeletePosts($is_Moderator, $return);
             break;
         case "bulkMove":
             CKunenaTools::fbMovePosts($catid, $is_Moderator, $return);
             break;
     }
     break;
     ######################
     /*    template chooser    */
 ######################
 /*    template chooser    */
 case "templatechooser":
     $fb_user_template = strval(JRequest::getVar('fb_user_template', '', 'COOKIE'));
     $fb_user_img_template = strval(JRequest::getVar('fb_user_img_template', $fb_user_img_template));
     $fb_change_template = strval(JRequest::getVar('fb_change_template', $fb_user_template));
     $fb_change_img_template = strval(JRequest::getVar('fb_change_img_template', $fb_user_img_template));
     if ($fb_change_template) {
         // clean template name
         $fb_change_template = preg_replace('#\\W#', '', $fb_change_template);
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:kunena.php


示例12: trashrestore

function trashrestore($option, $cid)
{
    $kunena_app =& JFactory::getApplication();
    $kunena_db =& JFactory::getDBO();
    JArrayHelper::toInteger($cid);
    if ($cid) {
        foreach ($cid as $id) {
            $kunena_db->setQuery("SELECT * FROM #__kunena_messages WHERE id={$id} AND hold=2");
            $mes = $kunena_db->loadObject();
            if (KunenaError::checkDatabaseError()) {
                return;
            }
            $kunena_db->setQuery("UPDATE #__kunena_messages SET hold=0 WHERE hold IN (2,3) AND thread={$mes->thread} ");
            $kunena_db->query();
            if (KunenaError::checkDatabaseError()) {
                return;
            }
            CKunenaTools::reCountUserPosts();
            CKunenaTools::reCountBoards();
        }
    }
    while (@ob_end_clean()) {
    }
    $kunena_app->redirect(JURI::base() . "index.php?option={$option}&task=showtrashview", JText::_('COM_KUNENA_TRASH_RESTORE_DONE'));
}
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:25,代码来源:admin.kunena.php


示例13: showForm

 public function showForm()
 {
     if (!$this->reportAllowed()) {
         return false;
     }
     CKunenaTools::loadTemplate('/plugin/report/report.php');
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:7,代码来源:kunena.report.class.php


示例14:

    $this->displayContents();
    ?>
			</td>
			<td rowspan="2" class="kprofile-right">
				<?php 
    $this->displayProfile('vertical');
    ?>
			</td>
		</tr>
		<tr>
			<td class="kbuttonbar-right">
				<?php 
    $this->displayActions();
    ?>
				<?php 
    $this->displayThankyou();
    ?>
			</td>
		</tr>
	</tbody>
</table>

<?php 
}
?>

<!-- Begin: Message Module Position -->
	<?php 
CKunenaTools::showModulePosition('kunena_msg_' . $this->mmm);
?>
<!-- Finish: Message Module Position -->
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:message.php


示例15: isset

     // TODO: Enable split when it's fixed
     // $msg_split = CKunenaLink::GetTopicPostLink('split', $catid, $fmessage->id , isset($fbIcons['split']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['split'] . '" alt="' . _GEN_SPLIT . '" border="0" title="' . _GEN_SPLIT . '" />':_GEN_SPLIT);
 }
 if ($fbConfig->useredit && $kunena_my->id != "") {
     //Now, if the viewer==author and the viewer is allowed to edit his/her own post then offer an 'edit' link
     $allowEdit = 0;
     if ($kunena_my->id == $userinfo->userid) {
         if ((int) $fbConfig->useredittime == 0) {
             $allowEdit = 1;
         } else {
             //Check whether edit is in time
             $modtime = $fmessage->modified_time;
             if (!$modtime) {
                 $modtime = $fmessage->time;
             }
             if ($modtime + (int) $fbConfig->useredittime >= CKunenaTools::fbGetInternalTime()) {
                 $allowEdit = 1;
             }
         }
     }
     if ($allowEdit) {
         $msg_edit = CKunenaLink::GetTopicPostLink('edit', $catid, $fmessage->id, isset($fbIcons['edit']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['edit'] . '" alt="Edit" border="0" title="' . _VIEW_EDIT . '" />' : _GEN_EDIT);
         $showedEdit = 1;
     }
 }
 if ($is_Moderator && $showedEdit != 1) {
     //Offer a moderator always the edit link except when it is already showing..
     $msg_edit = CKunenaLink::GetTopicPostLink('edit', $catid, $fmessage->id, isset($fbIcons['edit']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['edit'] . '" alt="Edit" border="0" title="' . _VIEW_EDIT . '" />' : _GEN_EDIT);
 }
 //(JJ)
 if (file_exists(KUNENA_ABSTMPLTPATH . '/message.php')) {
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:view.php


示例16: display

 function display()
 {
     if (!$this->allow) {
         echo JText::_('COM_KUNENA_NO_ACCESS');
         return;
     }
     if ($this->func == 'mylatest') {
         $this->getMyLatest();
     } else {
         if ($this->func == 'latestposts') {
             $this->getLatestPosts();
         } else {
             if ($this->func == 'latesttopics') {
                 $this->getLatestTopics();
             } else {
                 if ($this->func == 'noreplies') {
                     $this->getNoReplies();
                 } else {
                     if ($this->func == 'subscriptions') {
                         $this->getSubscriptions();
                     } else {
                         if ($this->func == 'catsubscriptions') {
                             $this->getCategoriesSubscriptions();
                         } else {
                             if ($this->func == 'favorites') {
                                 $this->getFavorites();
                             } else {
                                 if ($this->func == 'userposts') {
                                     $this->getUserPosts();
                                 } else {
                                     if ($this->func == 'owntopics') {
                                         $this->getOwnTopics();
                                     } else {
                                         if ($this->func == 'saidthankyouposts') {
                                             $this->getSaidThankYouPosts();
                                         } else {
                                             if ($this->func == 'gotthankyouposts') {
                                                 $this->getGotThankYouPosts();
                                             } else {
                                                 if ($this->func == 'unapproved') {
                                                     $this->getUnapprovedPosts();
                                                 } else {
                                                     if ($this->func == 'deleted') {
                                                         $this->getDeletedPosts();
                                                     } else {
                                                         $this->getLatest();
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     if (!$this->allow) {
         echo JText::_('COM_KUNENA_NO_ACCESS');
         return;
     }
     //meta description and keywords
     $metaKeys = $this->header . kunena_htmlspecialchars(", {$this->config->board_title}, ") . $this->app->getCfg('sitename');
     $metaDesc = $this->header . kunena_htmlspecialchars(" ({$this->page}/{$this->totalpages}) - {$this->config->board_title}");
     $cur = $this->document->get('description');
     $metaDesc = $cur . '. ' . $metaDesc;
     $this->document =& JFactory::getDocument();
     $this->document->setMetadata('robots', 'noindex, follow');
     $this->document->setMetadata('keywords', $metaKeys);
     $this->document->setDescription($metaDesc);
     $this->document->setTitle($this->title . ' - ' . $this->config->board_title);
     if (!isset($this->total)) {
         $this->total = 0;
     }
     CKunenaTools::loadTemplate('/threads/latestx.php');
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:78,代码来源:latestx.php


示例17: unlink

                 }
                 if (file_exists($fileLocation_l)) {
                     CKunenaFile::delete($fileLocation_l);
                 }
                 CKunenaFile::copy($src_file, $fileLocation);
                 break;
         }
         // delete original file
         unlink($src_file);
         $kunena_db->setQuery("UPDATE #__fb_users SET avatar='{$newFileName}' WHERE userid={$kunena_my->id}");
         $kunena_db->query() or trigger_dberror("Unable to update avatar.");
         $app->redirect(JRoute::_(KUNENA_LIVEURLREL . '&func=myprofile'), _UPLOAD_UPLOADED);
     case 'gallery':
         require_once KUNENA_PATH_LIB . DS . 'kunena.helpers.php';
         $newAvatar = JRequest::getVar('newAvatar', '');
         $newAvatar = CKunenaTools::fbRemoveXSS($newAvatar);
         if ($newAvatar == '') {
             $app->enqueueMessage(_UPLOAD_ERROR_CHOOSE, 'notice');
             $app->redirect(JRoute::_(KUNENA_LIVEURLREL . '&amp;func=myprofile&do=avatar'));
         }
         $kunena_db->setQuery("UPDATE #__fb_users SET avatar='{$kunena_db->getEscaped($newAvatar)}' WHERE userid={$kunena_my->id}");
         $kunena_db->query() or trigger_dberror("Unable to update user avatar.");
         $app->redirect(JRoute::_(KUNENA_LIVEURLREL . '&func=myprofile'), _UPLOAD_UPLOADED);
         break;
 }
 if ($task == 'default') {
     if ($fbConfig->allowavatar) {
         ?>
     <td class = "fb_myprofile_right" valign = "top">
         <!-- B:My Profile Right -->
         <!-- B: My AVATAR -->
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:myprofile_avatar_upload.php


示例18: displayLoginBox

 function displayLoginBox()
 {
     require_once KUNENA_PATH_LIB . '/kunena.login.php';
     $type = CKunenaLogin::getType();
     if ($type == 'login') {
         CKunenaTools::loadTemplate('/loginbox/login.php');
     } else {
         CKunenaTools::loadTemplate('/loginbox/logout.php');
     }
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:10,代码来源:class.kunena.php


示例19: displayEdit

 function displayEdit()
 {
     $user = JFactory::getUser();
     if ($user->id != $this->profile->userid) {
         return;
     }
     CKunenaTools::loadTemplate('/profile/edit.php');
 }
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:8,代码来源:profile.php


示例20: editUserProfile


//.........这里部分代码省略.........
        } else {
            echo "<td>&nbsp;</td>";
        }
        ?>
                        </tr>

                        <tr cellspacing = "3" colspan = "2">
                            &nbsp;

                            </td>
                        </tr>
            </table>

        <table border = 0 cellspacing = 0 width = "100%" align = "center" class = "adminform">
            <tr>
                <th colspan = "2" class = "title">
<?php 
        echo _KUNENA_MOD_NEW;
        ?>

            </td>
            </tr>
                        </tr>

                        <tr>


    <td width = "150" class = "contentpane">
    <?php 
        echo _KUNENA_ISMOD;
        ?>

                    <?php 
        //admins are always moderators
        if (CKunenaTools::isModOrAdmin($uid)) {
            echo _KUNENA_ISADM;
            ?>
 <input type = "hidden" name = "moderator" value = "1">
                    <?php 
        } else {
            echo $selectMod;
        }
        ?>
                        </td>
                        <td>
<?php 
        echo $modCats;
        ?>
                        </td>
                        </tr>

            </table>
            <input type = "hidden" name = "uid" value = "<?php 
        echo $uid;
        ?>
">

            <input type = "hidden" name = "task" value = ""/>

            <input type = "hidden" name = "option" value = "com_kunena"/>
        </form>

        <table border = 0 cellspacing = 0 width = "100%" align = "center" class = "adminform">
            <tr>
                <th colspan = "2" class = "title">
<?php 
        echo _KUNENA_SUBFOR;
        ?>
 <?php 
        echo $username;
        ?>

            </td>
            </tr>

            <?php 
        $enum = 1;
        //reset value
        $k = 0;
        //value for alternating rows
        if ($csubslist > 0) {
            foreach ($subslist as $subs) {
                //get all message details for each subscription
                $kunena_db->setQuery("select * from #__fb_messages where id={$subs->thread}");
                $subdet = $kunena_db->loadObjectList();
                check_dberror("Unable to load subscription messages.");
                foreach ($subdet as $sub) {
                    $k = 1 - $k;
                    echo "<tr class=\"row{$k}\">";
                    echo "  <td>{$enum}: " . html_entity_decode_utf8(stripslashes($sub->subject)) . " by " . html_entity_decode_utf8(stripslashes($sub->name));
                    echo "  <td>&nbsp;</td>";
                    echo "</tr>";
                    $enum++;
                }
            }
        } else {
            echo "<tr><td class=\"message\">" . _KUNENA_NOSUBS . "</td></tr>";
        }
        echo "</table>";
    }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:101,代码来源:admin.kunena.html.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP CLI类代码示例发布时间:2022-05-23
下一篇:
PHP CKunenaLink类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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