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


PHP TabController::getOwnTabs方法代码示例

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


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

示例1: BaseBlogData

 function BaseBlogData(&$info)
 {
     $request = Project::getRequest();
     $request_user_id = (int) Project::getUser()->getShowedUser()->id;
     if ($request_user_id <= 0) {
         Project::getResponse()->redirect($request->createUrl('Index', 'Index', null, false));
     }
     $user_id = (int) Project::getUser()->getDbUser()->id;
     if ($request_user_id === $user_id) {
         $v = new BlogView();
         $v->ControlPanel();
         $info['control_panel'] = $v->parse();
         $info['blog_owner'] = true;
     } else {
         $info['control_panel'] = null;
         $info['blog_owner'] = false;
     }
     //	$info['tab_list'] = TabController::getOwnTabs(false, false, false, false, false, false, true, false);
     $info['tab_list'] = TabController::getOwnTabs(false, false, false, true);
     // User blog tree
     $blog_model = Project::getUser()->getShowedUser()->getBlog();
     $tree_model = new BlogTreeModel();
     $info['branch_list'] = $tree_model->getBranchList($blog_model->id, $user_id);
     $info['blog_info']['title'] = $blog_model->title;
 }
开发者ID:amanai,项目名称:next24,代码行数:25,代码来源:BlogController.php

示例2: __construct

 function __construct($view_class = null)
 {
     if ($view_class === null) {
         $view_class = "PlacesView";
     }
     $this->session = Project::getSession();
     parent::__construct($view_class);
     $this->_view->assign('tab_list', TabController::getOwnTabs(true));
     $this->user = Project::getUser()->getShowedUser();
     $this->_view->assign('user_profile', $this->user->data());
     $this->_view->assign('session', $this->session);
     $this->_view->assign('user_default_avatar', $this->user->getUserAvatar($this->user->id));
 }
开发者ID:amanai,项目名称:next24,代码行数:13,代码来源:PlacesController.php

示例3: AlbumAction

 public function AlbumAction($edit = false, $filter = array(), $album_id = null)
 {
     $this->BaseSiteData();
     $request_user_id = (int) Project::getUser()->getShowedUser()->id;
     $user_id = (int) Project::getUser()->getDbUser()->id;
     $album_id = (int) $album_id > 0 ? $album_id : (int) Project::getRequest()->getKeyByNumber(0);
     $info = array();
     if ($request_user_id === $user_id && $edit === true) {
         $info['can_edit'] = true;
         $info['access_list'] = HelpFunctions::getAccessList();
     }
     if ((int) Project::getUser()->getShowedUser()->id <= 0) {
         $tabs = TabController::getMainAlbumTabs(false, false, true);
     } else {
         //	$tabs = TabController::getOwnTabs(false, true);
         $tabs = TabController::getOwnTabs(false, false, true);
     }
     $info['tab_list'] = $tabs;
     $album_model = new AlbumModel();
     $album_model->load($album_id);
     $info['thumbnail_id'] = (int) $album_model->thumbnail_id;
     $this->BaseAlbumData($info, $album_id);
     $photo_model = new PhotoModel();
     $photo_model->filter = $filter;
     $pager = new DbPager(Project::getRequest()->getKeyByNumber(1), $this->getParam('photo_per_page', self::DEFAULT_PHOTO_PER_PAGE));
     $photo_model->setPager($pager);
     $list = $photo_model->loadByAlbumUser($request_user_id, $album_id);
     $this->checkImages($list);
     $info['photo_list'] = $list;
     $info['list_pager'] = $photo_model->getPager();
     $info['list_controller'] = 'Photo';
     $info['list_action'] = 'Album';
     $info['list_user'] = null;
     $info['user_id'] = $user_id;
     $this->_view->assign('current_album_name', $album_model->name);
     $this->_view->PhotoList($info);
     $this->_view->parse();
 }
开发者ID:amanai,项目名称:next24,代码行数:38,代码来源:PhotoController.php

示例4: BookmarksImportFormAction

 /**
  * Action: Импортирование закладок открытие формы
  */
 public function BookmarksImportFormAction($p_is_message = null)
 {
     $v_request = Project::getRequest();
     $data = array();
     //$this->_BaseSiteData($data);
     $data['action'] = 'BookmarksImportForm';
     // -- Открытие формы для вывода сообщения о успешности импорта = TRUE
     $data['is_show_message'] = $p_is_message == true ? true : false;
     $data['import_make_url'] = $v_request->createUrl('Bookmarks', 'BookmarksImportMake');
     $data['max_file_upload_size'] = self::C_MAX_FILE_UPLOAD_SIZE;
     $this->_get_catalogs($data, $v_categoryID);
     $this->_view->assign('tab_list', TabController::getOwnTabs(false, false, false, false, false, true, false, false, false, false));
     // $this->_view->assign('tab_list', TabController::getBookmarksTabs(false, false, false, false, false, true)); // Show tabs
     $this->_view->Bookmarks_Import($data);
     $this->_view->parse();
 }
开发者ID:amanai,项目名称:next24,代码行数:19,代码来源:BookmarksController.php

示例5: include

<?php include($this -> _include('../header.tpl.php')); ?>
<?php $request = Project::getRequest(); ?>
<?php if($this->showed_user_profile['id'])  { ?>
	<?php $this->tab_list = TabController::getOwnTabs(false,false,false,false,false,true,false,false,false,false); ?>
	<?php include($this -> _include('../profile_line.tpl.php')); ?>	
<? } ?>
<!-- Форма просмотра закладки BookmarksViewAction -->
				<div class="columns-page clearfix">
					<div class="main"><div class="wrap">
					<?php if(!$this->showed_user_profile['id'])  { ?>
						<ul class="view-filter clearfix">
							<?php include($this -> _include('../tab_panel.tpl.php')); ?>
						</ul>
					<? } ?>	
						<!-- /view-filter -->
						<div class="display-filter clearfix">
							<div class="breadcrumbs">
								<? if (count($this->bookmark_row > 0)) { ?>
									<?=$this->bookmark_row['bookmark_category']; ?>
								<? } ?>	
							</div>
						</div>
						<!-- /display-filter -->
						<? if (count($this->bookmark_row > 0)) { ?>
						<div class="blog-post main-blog-post clearfix">
							<h2><?=$this->bookmark_row['title'];?></h2>
							<div class="number-of"><div>просмотры:  <strong><?=number_format($this->bookmark_row['views'], 0, '',' '); ?></strong></div></div>
							<p class="bookmark-meta">добавил: <a href="<?=$request->createUrl('Index','Index', null, $this->bookmark_row['login']);?>"><?=$this->bookmark_row['login']; ?></a>, <span class="date"><?=date_format(new DateTime($this->bookmark_row['creation_date']),'d.m.y H:i'); ?></span></p>
							<div class="bookmark-info">
								<div class="bookmark-screen">
								<?php 
开发者ID:amanai,项目名称:next24,代码行数:31,代码来源:bookmarks_view.tpl.php

示例6: BaseAlbumData

 protected function BaseAlbumData(&$info, $album_id, $album_list = false)
 {
     $request_user_id = (int) Project::getUser()->getShowedUser()->id;
     $user_id = (int) Project::getUser()->getDbUser()->id;
     if (Project::getUser()->isMyArea()) {
         $v = new AlbumView();
         $v->ControlPanel();
         $info['control_panel'] = $v->parse();
     } else {
         $info['control_panel'] = null;
     }
     if ($request_user_id > 0) {
         //	$info['tab_list'] = TabController::getOwnTabs(false, true);
         $info['tab_list'] = TabController::getOwnTabs(false, false, true);
     }
     $tmp = array();
     $album_model = new AlbumModel();
     $tmp['album_menu_list'] = $album_model->loadByUser($request_user_id, $user_id);
     $tmp['album_id'] = $album_id;
     if (Project::getUser()->isMyArea()) {
         $tmp['album_owner'] = true;
     }
     $v = new AlbumView();
     $v->AlbumMenu($tmp);
     $info['album_menu'] = $v->parse();
     if ($album_list !== false) {
         $info[$album_list] = $tmp['album_menu_list'];
     }
 }
开发者ID:amanai,项目名称:next24,代码行数:29,代码来源:AlbumController.php

示例7: ManagedQuestionAction

 public function ManagedQuestionAction()
 {
     $request = Project::getRequest();
     $data = array();
     $question_model = new QuestionModel();
     $question_cat_model = new QuestionCatModel();
     $data['question_cat_list'] = $question_cat_model->loadAll();
     $id = (int) $request->getKeyByNumber(0);
     if (!$request->submit) {
         $question_cat_model = new QuestionCatModel();
         if ($id > 0) {
             $data['question'] = $question_model->loadQuestion($id);
             $tags_model = new QuestionTagModel();
             $tags = $tags_model->loadWhere(null, null, $id);
             foreach ($tags as $tag) {
                 $data['question_tag_list'] .= $tag['name'] . ', ';
             }
             $data['question_tag_list'] = rtrim($data['question_tag_list'], ', ');
             $data['tab_manage_question_name'] = "Редактирование вопроса";
         }
         $data['question_cat'] = $question_cat_model->loadAll();
         $this->BaseSiteData($data);
         $this->_view->assign('tab_list', TabController::getOwnTabs(false, false, false, false, false, false, true, false, false, false));
         //$this->_view->assign('tab_list', TabController::getQuestionAnswerTabs(false, false, false, false, true));
         $this->_view->ManagedQuestion($data);
         $this->_view->parse();
     } else {
         if ($id > 0) {
             $data['question'] = $question_model->load($id);
             if ($question_model->user_id != Project::getUser()->getDbUser()->id) {
                 if ($request->desktop_question) {
                     Project::getResponse()->redirect($request->createUrl('QuestionAnswer', 'UserQuestions'));
                 } else {
                     Project::getResponse()->redirect($request->createUrl('QuestionAnswer', 'List'));
                 }
             }
         }
         if ($request->question_text == null) {
             //TODO validator
             $data['error'][] = "Заполните текст вопроса";
             $question_cat_model = new QuestionCatModel();
             $data['question_cat'] = $question_cat_model->loadAll();
             $data['question_tag_list'] = $request->tags;
             $data['question']['q_text'] = $request->question_text;
             $data['question']['question_cat_id'] = (int) $request->cat_id;
             $data['question']['user_id'] = Project::getUser()->getDbUser()->id;
             $data['question']['creation_date'] = date("Y-m-d H:i:s");
             $this->BaseSiteData($data);
             $this->_view->ManagedQuestion($data);
             $this->_view->parse();
             return;
         }
         $question_model->q_text = $request->question_text;
         $question_model->questions_cat_id = (int) $request->cat_id;
         $question_model->user_id = Project::getUser()->getDbUser()->id;
         $question_model->creation_date = date("Y-m-d H:i:s");
         $q_id = $question_model->save();
         $tag_model = new QuestionTagModel();
         $question_tag_model = new QTagModel();
         $question_tag_model->deleteByQuestionId($id);
         //TODO: revamp
         $tags_ar = array();
         $tags_ar = explode(",", $request->tags);
         foreach ($tags_ar as $tag) {
             $tag = trim($tag);
             if (count($tag_model->loadByName($tag)) <= 0) {
                 $tag_model->name = $tag;
                 $tag_id = $tag_model->save();
                 /*if(count($question_tag_model->loadWhere($q_id, $tag_model->id)) <= 0) {
                 			$question_tag_model->question_id = $q_id;
                 			$question_tag_model->question_tag_id = $tag_model->id;
                 			$question_tag_model->save();
                 			$question_tag_model->clear();	
                 		}*/
             } else {
                 $tag_id = $tag_model->id;
             }
             $tag_model->clear();
             $question_tag_model->question_id = $q_id;
             $question_tag_model->question_tag_id = $tag_id;
             $question_tag_model->save();
             $question_tag_model->clear();
         }
         if ($request->desktop_question) {
             Project::getResponse()->redirect($request->createUrl('QuestionAnswer', 'UserQuestions'));
         } else {
             Project::getResponse()->redirect($request->createUrl('QuestionAnswer', 'List'));
         }
     }
 }
开发者ID:amanai,项目名称:next24,代码行数:90,代码来源:QuestionAnswerController.php

示例8: MoodAction

 public function MoodAction()
 {
     $userModel = new UserModel();
     $user = Project::getUser()->getShowedUser();
     $isAdmin = $user->user_type_id == 1 ? true : false;
     $request = Project::getRequest();
     $this->_view->clearFlashMessages();
     $noErrors = true;
     if ($request->mood_action == 'ok') {
         if ($request->add_mood) {
             if (!$request->mood_name) {
                 $this->_view->addFlashMessage(FM::ERROR, "Выберите текст настроения");
                 $noErrors = false;
             }
             if ($noErrors) {
                 $userModel->addMood($user->id, $request->mood_name);
                 Project::getResponse()->redirect(Project::getRequest()->createUrl('User', 'Mood'));
             }
         } elseif ($request->change_mood) {
             $aMoodNames = $request->moods;
             foreach ($aMoodNames as $mood_id => $mood_name) {
                 $userModel->changeMood($mood_id, $mood_name);
             }
             $aMoodDelete = $request->del_moods;
             foreach ($aMoodDelete as $mood_id => $mood_del_val) {
                 $userModel->delMood($mood_id);
             }
         }
     }
     $this->_view->assign('user_moods', $userModel->getAllUserMoods($user->id));
     $this->_view->assign('user_default_avatar', $userModel->getUserAvatar($user->id));
     $this->_view->assign('user_profile', $user->data());
     $this->_view->assign('user', $user);
     $this->_view->assign('isAdmin', $isAdmin);
     $this->_view->assign('tab_list', TabController::getOwnTabs(true));
     $this->_view->MoodPage();
     $this->_view->parse();
 }
开发者ID:amanai,项目名称:next24,代码行数:38,代码来源:UserController.php

示例9: MyFeedsAction

 public function MyFeedsAction()
 {
     $newsModel = new NewsModel();
     $request = Project::getRequest();
     $user = Project::getUser()->getDbUser();
     $isAdmin = $user->user_type_id == 1 ? true : false;
     if ($user->user_type_id == 1 || $user->user_type_id == 4) {
         $this->_view->assign('is_partner', 1);
     }
     $this->_view->assign('isAdmin', $isAdmin);
     $this->_view->assign('tab_list', TabController::getOwnTabs(false, false, false, false, false, false, false, true, false, false));
     //	    $this-> _view -> assign('tab_list', TabController::getNewsTabs($user->id, $isAdmin, false, false, true)); // Show tabs
     $aListNewsTreeFeeds = $newsModel->getNewsTreeFeedsByUserId($user->id, false, false, false);
     $this->_view->assign('aListNewsTreeFeeds', $aListNewsTreeFeeds);
     //  News tree feeds for current user
     $this->_view->MyFeedPage();
     $this->_view->parse();
 }
开发者ID:amanai,项目名称:next24,代码行数:18,代码来源:NewsController.php

示例10: BaseSubscribeData

 function BaseSubscribeData(&$info)
 {
     //	$info['tab_list'] = TabController::getOwnTabs(false, false, false, false, false, false, false, true);
     $info['tab_list'] = TabController::getOwnTabs(false, false, false, false, false, false, false, true);
 }
开发者ID:amanai,项目名称:next24,代码行数:5,代码来源:SubscribeController.php

示例11: FriendAction

 public function FriendAction()
 {
     $request = Project::getRequest();
     $this->_view->clearFlashMessages();
     $user = Project::getUser()->getDbUser();
     $userModel = new UserModel();
     $friendModel = new FriendModel();
     $messagesModel = new MessagesModel();
     $isDefAction = true;
     //$this -> _view -> addFlashMessage(FM::ERROR, "Выберите из списка друзей или введите имя вручную");
     if ($request->messageAction == "changeGroup") {
         $group_id = $request->group_id;
         $friendGroup = $friendModel->getFriendGroupById($group_id);
         if ($friendGroup) {
             $isDefAction = false;
             if ($request->save_group) {
                 $group_name = $request->group_name;
                 if (!$friendModel->isDublicateGroup($user->id, htmlspecialchars($group_name))) {
                     $friendModel->changeOneValue('friend_group', $group_id, 'name', htmlspecialchars($group_name));
                     Project::getResponse()->redirect(Project::getRequest()->createUrl('Messages', 'Friend'));
                 } else {
                     $this->_view->addFlashMessage(FM::ERROR, "Группа с таким именем уже существует");
                 }
             } elseif ($request->del_group) {
                 $friendModel->changeFriendsGroup($user->id, $group_id, 0);
                 $friendModel->delOneRecord('friend_group', $group_id);
                 Project::getResponse()->redirect(Project::getRequest()->createUrl('Messages', 'Friend'));
             } else {
                 $group_name = $friendGroup['name'];
             }
             $this->_view->assign('pageAction', 'changeGroup');
             $this->_view->assign('groupName', $group_name);
         }
         $this->_view->assign('group_id', $group_id);
     } elseif ($request->messageAction == "changeFriend") {
         $friend_table_id = $request->friend_table_id;
         $friend = $friendModel->getFriendById($friend_table_id);
         if ($friend) {
             if ($request->save_friend) {
                 $friendModel->load($friend_table_id);
                 $friendModel->group_id = $request->group_id;
                 $friendModel->note = htmlspecialchars($request->note);
                 $friendModel->save();
                 Project::getResponse()->redirect(Project::getRequest()->createUrl('Messages', 'Friend'));
             }
             $isDefAction = false;
             $this->_view->assign('pageAction', 'changeFriend');
             $this->_view->assign('friend', $friend);
             $this->_view->assign('aFriendGroups', $friendModel->getUserFriendGroups($user->id));
         }
     } elseif ($request->messageAction == "addGroupFriend") {
         if ($request->add_group) {
             if (!$friendModel->isDublicateGroup($user->id, htmlspecialchars($request->group_name))) {
                 $friendModel->addFriendGroup($user->id, $request->group_name, null);
                 Project::getResponse()->redirect(Project::getRequest()->createUrl('Messages', 'Friend'));
             } else {
                 $this->_view->addFlashMessage(null, "Группа с таким именем уже существует");
             }
         } elseif ($request->add_friend) {
             $friend = $userModel->getUserByLogin($request->friend_name);
             if ($friend && $friendModel->isFriend($user->id, $friend['id'])) {
                 $this->_view->addFlashMessage(FM::ERROR, "Этот пользователь уже добавлен в Ваши друзья");
             } elseif ($friend) {
                 $friendModel->load(0);
                 $friendModel->friend_id = $friend['id'];
                 $friendModel->user_id = $user->id;
                 $friendModel->group_id = 0;
                 $friendModel->save();
                 Project::getResponse()->redirect(Project::getRequest()->createUrl('Messages', 'Friend'));
             } else {
                 $this->_view->addFlashMessage(FM::ERROR, "Пользователя с таким именем нет");
             }
         }
     }
     if ($isDefAction) {
         $this->_view->assign('pageAction', 'main');
     }
     $aGroupMessagesCount = array();
     $aGroupMessagesCount['all'] = array("new" => $messagesModel->getCountMessagesToUser($user->id, -1, 1, 0), "read" => $messagesModel->getCountMessagesToUser($user->id, -1, 1, 1));
     $this->_view->assign('aGroupMessagesCount', $aGroupMessagesCount);
     $aFriendGroups = $friendModel->getUserFriendGroups($user->id);
     $this->_view->assign('tab_list', TabController::getOwnTabs(false, true, false, false, false, false, false, false, false, false));
     $this->_view->assign('aFriendGroups', $aFriendGroups);
     $this->_view->assign('user_id', $user->id);
     $this->_view->FriendPage();
     $this->_view->parse();
 }
开发者ID:amanai,项目名称:next24,代码行数:87,代码来源:MessagesController.php


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