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


PHP CKunenaTools::KDeletePerm方法代码示例

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


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

示例1: __construct


//.........这里部分代码省略.........
                                $KunenaUserAPI = new KunenaUserAPI();
                                $cb = KGetArrayReverseInts("cb");
                                $result = $KunenaUserAPI->unfavoriteThreads($kunena_my->id, $cb);
                                if ($result) {
                                    $message = JText::_('COM_KUNENA_USER_UNFAVORITE_YES');
                                } else {
                                    $message = JText::_('COM_KUNENA_POST_UNFAVORITED_TOPIC');
                                }
                                while (@ob_end_clean()) {
                                }
                                $kunena_app->redirect(CKunenaLink::GetProfileURL($kunena_my->id, false), $message);
                                break;
                            case "bulkSub":
                                if (!JRequest::checkToken()) {
                                    $kunena_app->enqueueMessage(JText::_('COM_KUNENA_ERROR_TOKEN'), 'error');
                                    while (@ob_end_clean()) {
                                    }
                                    $kunena_app->redirect(CKunenaLink::GetProfileURL($kunena_my->id, false));
                                }
                                require_once JPATH_ROOT . '/administrator/components/com_kunena/libraries/api.php';
                                $KunenaUserAPI = new KunenaUserAPI();
                                $cb = KGetArrayReverseInts("cb");
                                $result = $KunenaUserAPI->unsubscribeThreads($kunena_my->id, $cb);
                                if ($result) {
                                    $message = JText::_('COM_KUNENA_USER_UNSUBSCRIBE_YES');
                                } else {
                                    $message = JText::_('COM_KUNENA_POST_NO_UNSUBSCRIBED_TOPIC');
                                }
                                while (@ob_end_clean()) {
                                }
                                $kunena_app->redirect(CKunenaLink::GetProfileURL($kunena_my->id, false), $message);
                                break;
                            case "bulkDelPerm":
                                CKunenaTools::KDeletePerm();
                                break;
                            case "bulkRestore":
                                CKunenaTools::KUndelete();
                                break;
                        }
                        break;
                    case 'template':
                        jimport('joomla.filesystem.path');
                        $name = JRequest::getString('name', JRequest::getString('kunena_template', '', 'COOKIE'));
                        while (@ob_end_clean()) {
                        }
                        if ($name) {
                            $name = JPath::clean($name);
                            if (!is_readable(KPATH_SITE . "/template/{$name}/template.xml")) {
                                $name = 'default';
                            }
                            setcookie('kunena_template', $name, 0, JURI::root(true) . '/');
                        } else {
                            setcookie('kunena_template', null, time() - 3600, JURI::root(true) . '/');
                        }
                        $kunena_app->redirect(CKunenaLink::GetKunenaURL(false));
                        break;
                    case 'credits':
                        include JPATH_COMPONENT . '/lib/kunena.credits.php';
                        break;
                    default:
                        require_once KUNENA_PATH_FUNCS . '/listcat.php';
                        $page = new CKunenaListcat($catid);
                        $page->display();
                        break;
                }
                if (JDEBUG) {
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:67,代码来源:kunena.php


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