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

PHP DashboardController类代码示例

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

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



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

示例1: authControl

 public function authControl()
 {
     $this->app_session->logout();
     $controller = new DashboardController(true);
     $controller->addSuccessMessage("You have successfully logged out.");
     return $controller->go();
 }
开发者ID:unruthless,项目名称:ThinkUp,代码行数:7,代码来源:class.LogoutController.php


示例2: control

 public function control()
 {
     $this->setPageTitle('Log in');
     $this->setViewTemplate('session.login.tpl');
     $this->view_mgr->addHelp('login', 'userguide/accounts/index');
     $this->disableCaching();
     //don't show login form if already logged in
     if ($this->isLoggedIn()) {
         $controller = new DashboardController(true);
         return $controller->go();
     } else {
         $owner_dao = DAOFactory::getDAO('OwnerDAO');
         if (isset($_POST['Submit']) && $_POST['Submit'] == 'Log In' && isset($_POST['email']) && isset($_POST['pwd'])) {
             if ($_POST['email'] == '' || $_POST['pwd'] == '') {
                 if ($_POST['email'] == '') {
                     $this->addErrorMessage("Email must not be empty");
                     return $this->generateView();
                 } else {
                     $this->addErrorMessage("Password must not be empty");
                     return $this->generateView();
                 }
             } else {
                 $session = new Session();
                 $user_email = $_POST['email'];
                 if (get_magic_quotes_gpc()) {
                     $user_email = stripslashes($user_email);
                 }
                 $this->addToView('email', $user_email);
                 $owner = $owner_dao->getByEmail($user_email);
                 if (!$owner) {
                     $this->addErrorMessage("Incorrect email");
                     return $this->generateView();
                 } elseif (!$owner->is_activated) {
                     $this->addErrorMessage("Inactive account. " . $owner->account_status . ". " . '<a href="forgot.php">Reset your password.</a>');
                     return $this->generateView();
                 } elseif (!$session->pwdCheck($_POST['pwd'], $owner_dao->getPass($user_email))) {
                     //failed login
                     if ($owner->failed_logins >= 10) {
                         $owner_dao->deactivateOwner($user_email);
                         $owner_dao->setAccountStatus($user_email, "Account deactivated due to too many failed logins");
                     }
                     $owner_dao->incrementFailedLogins($user_email);
                     $this->addErrorMessage("Incorrect password");
                     return $this->generateView();
                 } else {
                     // this sets variables in the session
                     $session->completeLogin($owner);
                     $owner_dao->updateLastLogin($user_email);
                     $owner_dao->resetFailedLogins($user_email);
                     $owner_dao->clearAccountStatus('');
                     $controller = new DashboardController(true);
                     return $controller->control();
                 }
             }
         } else {
             return $this->generateView();
         }
     }
 }
开发者ID:narpaldhillon,项目名称:ThinkUp,代码行数:59,代码来源:class.LoginController.php


示例3: bounce

 /**
  * Bounce user to public page or to error page.
  * @TODO bounce back to original action once signed in
  */
 protected function bounce() {
     if (get_class($this)=='DashboardController' || get_class($this)=='PostController') {
         $controller = new DashboardController(true);
         return $controller->go();
     } else {
         $config = Config::getInstance();
         throw new Exception('You must <a href="'.$config->getValue('site_root_path').
         'session/login.php">log in</a> to do this.');
     }
 }
开发者ID:rgoncalves,项目名称:ThinkUp,代码行数:14,代码来源:class.ThinkUpAuthController.php


示例4: bounce

 /**
  * Bounce user to public page or to error page.
  * @TODO bounce back to original action once signed in
  */
 protected function bounce()
 {
     $config = Config::getInstance();
     if (get_class($this) == 'DashboardController' || get_class($this) == 'PostController') {
         $controller = new DashboardController(true);
         return $controller->go();
     } else {
         throw new ControllerAuthException('You must log in to access this controller: ' . get_class($this));
     }
 }
开发者ID:randi2kewl,项目名称:ThinkUp,代码行数:14,代码来源:class.ThinkUpAuthController.php


示例5: go

 public function go()
 {
     if ($this->isLoggedIn()) {
         // If logged in, we go to DashboardController
         $controller = new DashboardController();
         echo $controller->go();
     } else {
         // If is not logged in, we go to LoginController
         $controller = new LoginController();
         echo $controller->go();
     }
 }
开发者ID:JoffreyO,项目名称:hackademic,代码行数:12,代码来源:class.BackendController.php


示例6: command

 public function command()
 {
     $geyser_id = Request::post('geyser_id');
     $element_select = Request::post('e');
     $gstate_select = Request::post('g');
     $schedule_select = Request::post('s');
     $settings_url = "http://localhost:8080/om2m/nscl/applications/geyser_" . $geyser_id . "/containers/SETTINGS/contentInstances";
     $schedule_url = "http://localhost:8080/om2m/nscl/applications/Scheduler/containers/SCHEDULE_" . $geyser_id . "/contentInstances";
     if (!empty($element_select)) {
         $data = '{"Gstate":' . '"' . $gstate_select . '"' . '}';
         DashboardController::doPOST($settings_url, $data);
     } else {
         if (!empty($gstate_select)) {
             $data = '{"Rstate":' . '"' . $element_select . '"' . '}';
             DashboardController::doPOST($settings_url, $data);
         } else {
             if (!empty($schedule_select)) {
                 if (strcmp($schedule_select, "low") == 0) {
                     $data = "40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40";
                 } else {
                     if (strcmp($schedule_select, "smart") == 0) {
                         $data = "35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,60,60,60,60,60,60,60,60,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,50,50,50,50,50,50,50,50,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35";
                     } else {
                         if (strcmp($schedule_select, "high") == 0) {
                             $data = "65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65";
                         }
                     }
                 }
                 DashboardController::doPOST($schedule_url, $data);
             }
         }
     }
     $this->View->render('dashboard/index');
 }
开发者ID:AndrewCloete,项目名称:PHP_webapp,代码行数:34,代码来源:DashboardController.php


示例7: control

 public function control()
 {
     $this->setPageTitle('Log in');
     $this->setViewTemplate('session.login.tpl');
     $this->disableCaching();
     //don't show login form if already logged in
     if ($this->isLoggedIn()) {
         $controller = new DashboardController(true);
         return $controller->go();
     } else {
         $od = DAOFactory::getDAO('OwnerDAO');
         if (isset($_POST['Submit']) && $_POST['Submit'] == 'Log In' && isset($_POST['email']) && isset($_POST['pwd'])) {
             if ($_POST['email'] == '' || $_POST['pwd'] == '') {
                 if ($_POST['email'] == '') {
                     $this->addErrorMessage("Email must not be empty");
                     return $this->generateView();
                 } else {
                     $this->addErrorMessage("Password must not be empty");
                     return $this->generateView();
                 }
             } else {
                 $session = new Session();
                 $user_email = $_POST['email'];
                 $this->addToView('email', $user_email);
                 $owner = $od->getByEmail($user_email);
                 if (!$owner) {
                     $this->addErrorMessage("Incorrect email");
                     return $this->generateView();
                 } elseif (!$session->pwdCheck($_POST['pwd'], $od->getPass($user_email))) {
                     $this->addErrorMessage("Incorrect password");
                     return $this->generateView();
                 } else {
                     // this sets variables in the session
                     $session->completeLogin($owner);
                     $od->updateLastLogin($user_email);
                     $controller = new DashboardController(true);
                     return $controller->control();
                 }
             }
         } else {
             return $this->generateView();
         }
     }
 }
开发者ID:unruthless,项目名称:ThinkUp,代码行数:44,代码来源:class.LoginController.php


示例8: listStudents

 public function listStudents()
 {
     $toReturn = array('students' => array(), "classes" => array());
     if (Input::get('selectType') == "selStudents") {
         $studentIds = array();
         $studentList = Input::get('studentInfo');
         while (list($key, $value) = each($studentList)) {
             $studentIds[] = $value['id'];
         }
         $students = User::whereIn('id', $studentIds)->get();
         foreach ($students as $value) {
             $toReturn['students'][$value->id] = array("id" => $value->id, "fullName" => $value->fullName, "class" => $value->studentClass, "acYear" => $value->studentAcademicYear);
         }
     } else {
         $students = User::where('studentAcademicYear', Input::get('acYear'))->where('studentClass', Input::get('classId'))->where('role', 'student')->where('activated', 1)->get();
         foreach ($students as $value) {
             $toReturn['students'][$value->id] = array("id" => $value->id, "fullName" => $value->fullName, "class" => $value->studentClass, "acYear" => $value->studentAcademicYear);
         }
     }
     $DashboardController = new DashboardController();
     $toReturn['classes'] = $DashboardController->classesList(Input::get('acYear'));
     return $toReturn;
 }
开发者ID:schoex,项目名称:Campusmate,代码行数:23,代码来源:promotionController.php


示例9: control

 public function control()
 {
     if ($this->isLoggedIn()) {
         $controller = new DashboardController(true);
         return $controller->go();
     } else {
         // register form validation
         $this->addHeaderCSS('assets/css/validate_password.css');
         $this->addHeaderJavaScript('assets/js/jquery.validate.min.js');
         $this->addHeaderJavaScript('assets/js/jquery.validate.password.js');
         $this->addHeaderJavaScript('assets/js/validate_password.js');
         $config = Config::getInstance();
         $is_registration_open = $config->getValue('is_registration_open');
         $this->disableCaching();
         $invite_dao = DAOFactory::getDAO('InviteDAO');
         if (isset($_GET['code'])) {
             $invite_code = $_GET['code'];
         } else {
             $invite_code = null;
         }
         $this->addToView('invite_code', $invite_code);
         $is_invite_code_valid = $invite_dao->isInviteValid($invite_code);
         if ($invite_code != null && $is_invite_code_valid) {
             $this->addSuccessMessage("Welcome, VIP! You've been invited to register on " . $config->getValue('app_title_prefix') . "ThinkUp.");
         }
         $has_been_registered = false;
         if (!$is_registration_open && !$is_invite_code_valid) {
             $this->addToView('closed', true);
             $disable_xss = true;
             $this->addErrorMessage('<p>Sorry, registration is closed on this installation of ' . $config->getValue('app_title_prefix') . "ThinkUp.</p>" . '<p><a href="http://thinkupapp.com">Install ThinkUp on your own server.</a></p>', null, $disable_xss);
         } else {
             $owner_dao = DAOFactory::getDAO('OwnerDAO');
             $this->addToView('closed', false);
             $captcha = new Captcha();
             if (isset($_POST['Submit']) && $_POST['Submit'] == 'Register') {
                 foreach ($this->REQUIRED_PARAMS as $param) {
                     if (!isset($_POST[$param]) || $_POST[$param] == '') {
                         $this->addErrorMessage('Please fill out all required fields.');
                         $this->is_missing_param = true;
                     }
                 }
                 if (!$this->is_missing_param) {
                     $valid_input = true;
                     if (!Utils::validateEmail($_POST['email'])) {
                         $this->addErrorMessage("Incorrect email. Please enter valid email address.", 'email');
                         $valid_input = false;
                     }
                     if (strcmp($_POST['pass1'], $_POST['pass2']) || empty($_POST['pass1'])) {
                         $this->addErrorMessage("Passwords do not match.", 'password');
                         $valid_input = false;
                     } else {
                         if (!preg_match("/(?=.{8,})(?=.*[a-zA-Z])(?=.*[0-9])/", $_POST['pass1'])) {
                             $this->addErrorMessage("Password must be at least 8 characters and contain both numbers " . "and letters.", 'password');
                             $valid_input = false;
                         }
                     }
                     if (!$captcha->doesTextMatchImage()) {
                         $this->addErrorMessage("Entered text didn't match the image. Please try again.", 'captcha');
                         $valid_input = false;
                     }
                     if ($valid_input) {
                         if ($owner_dao->doesOwnerExist($_POST['email'])) {
                             $this->addErrorMessage("User account already exists.", 'email');
                         } else {
                             // Insert the details into the database
                             $activation_code = $owner_dao->create($_POST['email'], $_POST['pass2'], $_POST['full_name']);
                             if ($activation_code != false) {
                                 $es = new ViewManager();
                                 $es->caching = false;
                                 $es->assign('application_url', Utils::getApplicationURL(false));
                                 $es->assign('email', urlencode($_POST['email']));
                                 $es->assign('activ_code', $activation_code);
                                 $message = $es->fetch('_email.registration.tpl');
                                 Mailer::mail($_POST['email'], "Activate Your Account on " . $config->getValue('app_title_prefix') . "ThinkUp", $message);
                                 SessionCache::unsetKey('ckey');
                                 $this->addSuccessMessage("Success! Check your email for an activation link.");
                                 //delete invite code
                                 if ($is_invite_code_valid) {
                                     $invite_dao->deleteInviteCode($invite_code);
                                 }
                                 $has_been_registered = true;
                             } else {
                                 $this->addErrorMessage("Unable to register a new user. Please try again.");
                             }
                         }
                     }
                 }
                 if (isset($_POST["full_name"])) {
                     $this->addToView('name', $_POST["full_name"]);
                 }
                 if (isset($_POST["email"])) {
                     $this->addToView('mail', $_POST["email"]);
                 }
                 $this->addToView('has_been_registered', $has_been_registered);
             }
             $challenge = $captcha->generate();
             $this->addToView('captcha', $challenge);
         }
         $this->view_mgr->addHelp('register', 'userguide/accounts/index');
         return $this->generateView();
//.........这里部分代码省略.........
开发者ID:randomecho,项目名称:ThinkUp,代码行数:101,代码来源:class.RegisterController.php


示例10: DashboardController

	<!-- END HEADER INNER -->
</div>
<!-- END HEADER -->
<div class="clearfix">
</div>
<!-- BEGIN CONTAINER -->
<div class="page-container">
	<!-- BEGIN SIDEBAR -->
	<div class="page-sidebar-wrapper">
		<div class="page-sidebar navbar-collapse collapse">
			<ul class="page-sidebar-menu" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200">
				<!-- DOC: To remove the sidebar toggler from the sidebar you just need to completely remove the below "sidebar-toggler-wrapper" LI element -->
				
                                <!-- ACA SE CREARA EL DASHBOARD DINAMICO -->
                                <?php 
$dashboard = new DashboardController();
echo $dashboard->get_dashboard_sidebar_menu($rol, "Gestionar Usuarios");
?>
				<!--FINAL DEL DASHBOARD DINAMICO -->
			</ul>
			<!-- END SIDEBAR MENU -->
		</div>
	</div>
	<!-- END SIDEBAR -->
	<!-- BEGIN CONTENT -->
	<div class="page-content-wrapper">
		<div class="page-content">
			<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<div class="modal fade" id="portlet-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
开发者ID:E89son,项目名称:LieisonCMS,代码行数:31,代码来源:dashboard_gestion_usuarios.php


示例11: testCleanXSS

 public function testCleanXSS()
 {
     $with_xss = true;
     $builders = $this->buildData($with_xss);
     $this->simulateLogin('[email protected]');
     //required params
     $_GET['u'] = 'ev';
     $_GET['n'] = 'twitter';
     $_GET['v'] = 'tweets-all';
     $controller = new DashboardController(true);
     $results = $controller->go();
     $this->assertNoPattern("/This is post <script>alert\\('wa'\\);<\\/script>\\d+/", $results);
     $this->assertPattern("/This is post &#60;script&#62;alert\\(&#39;wa&#39;\\);&#60;\\/script&#62;\\d+/", $results);
 }
开发者ID:rmanalan,项目名称:ThinkUp,代码行数:14,代码来源:TestOfDashboardController.php


示例12: set_allowed_dashlets

 public static function set_allowed_dashlets($dashlets)
 {
     Config::inst()->update('DashboardController', 'allowed_dashlets', $dashlets);
     self::$allowed_dashlets = $dashlets;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-frontend-dashboards,代码行数:5,代码来源:DashboardController.php


示例13: unset

$this_section = SECTION_DASHBOARD;
unset($_SESSION['this_section']);
//for hmtl editor repository
// get actions
$actions = array('listing', 'store_user_block', 'disable_block');
$action = 'listing';
if (isset($_GET['action']) && in_array($_GET['action'], $actions)) {
    $action = $_GET['action'];
}
// load styles from dashboard plugins
$dashboar_plugin_styles = DashboardManager::get_links_for_styles_from_dashboard_plugins();
$htmlHeadXtra[] = $dashboar_plugin_styles;
// interbreadcrumb
//$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('Dashboard'));
// course description controller object
$dashboard_controller = new DashboardController();
if (isset($_GET['path'])) {
    $path = $_GET['path'];
}
// distpacher actions to controller
switch ($action) {
    case 'listing':
        $dashboard_controller->display();
        break;
    case 'store_user_block':
        $dashboard_controller->store_user_block();
        break;
    case 'disable_block':
        $dashboard_controller->close_user_block($path);
        break;
    default:
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:index.php


示例14: __construct

 public function __construct()
 {
     $dashboard = App::make('Lib\\Repositories\\Dashboard\\DashboardRepositoryInterface');
     $validator = App::make('Lib\\Services\\Validation\\DashboardValidator');
     $scraper = App::make('Lib\\Services\\Scraping\\Scraper');
     parent::__construct($dashboard, $validator, $scraper);
 }
开发者ID:onlystar1991,项目名称:mtdb,代码行数:7,代码来源:StreamingDashboardController.php


示例15: Initialize

 /**
  * Hightlight menu path. Automatically run on every use.
  *
  * @since 2.0.0
  * @access public
  */
 public function Initialize()
 {
     parent::Initialize();
     if ($this->Menu) {
         $this->Menu->HighlightRoute('/dashboard/settings');
     }
 }
开发者ID:Raz0r,项目名称:Garden,代码行数:13,代码来源:class.settingscontroller.php


示例16: initialize

 /**
  * Runs before every call to this controller.
  */
 public function initialize()
 {
     parent::initialize();
     Gdn_Theme::section('Dashboard');
     set_time_limit(0);
     // Is this even doing anything?
 }
开发者ID:sitexa,项目名称:vanilla,代码行数:10,代码来源:class.utilitycontroller.php


示例17: initialize

 /**
  * Runs before every call to this controller.
  */
 public function initialize()
 {
     parent::initialize();
     Gdn_Theme::section('Dashboard');
     $this->Model = new DBAModel();
     $this->Form = new Gdn_Form();
     $this->addJsFile('dba.js');
 }
开发者ID:vanilla,项目名称:vanilla,代码行数:11,代码来源:class.dbacontroller.php


示例18: initialize

 /**
  * Set menu path. Automatically run on every use.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     parent::initialize();
     Gdn_Theme::section('Dashboard');
     if ($this->Menu) {
         $this->Menu->highlightRoute('/dashboard/settings');
     }
 }
开发者ID:caidongyun,项目名称:vanilla,代码行数:14,代码来源:class.routescontroller.php


示例19: Initialize

 public function Initialize()
 {
     parent::Initialize();
     Gdn_Theme::Section('Dashboard');
     $this->Model = new DBAModel();
     $this->Form = new Gdn_Form();
     $this->Form->InputPrefix = '';
     $this->AddJsFile('dba.js');
 }
开发者ID:3marproof,项目名称:vanilla,代码行数:9,代码来源:class.dbacontroller.php


示例20: index

 public function index()
 {
     $glparams = DataObjectFactory::Factory('GLParams');
     if (is_null($glparams->ar_disposals_proceeds_account()) || is_null($glparams->ar_disposals_proceeds_centre()) || is_null($glparams->ar_pl_suspense_account()) || is_null($glparams->ar_pl_suspense_centre())) {
         $flash = Flash::Instance();
         $flash->addError('GL Support is not enabled');
     }
     parent::index();
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:9,代码来源:IndexController.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Dashlet类代码示例发布时间:2022-05-23
下一篇:
PHP Dashboard类代码示例发布时间: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