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


PHP app::getClass方法代码示例

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


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

示例1: setContent

 public function setContent($html)
 {
     if (\app::getClass('user')->VerifyConnexion() && $_SESSION['permissions'] & 128) {
         /* perm 128 = configure blocks */
         return \tools::file_put_contents(PROFILE_PATH . $this->getConfig('viewPath'), \tools::sanitize($html));
     }
     return FALSE;
 }
开发者ID:saitinet,项目名称:parsimony,代码行数:8,代码来源:block.php

示例2: t

                            ?>
</div>
											<!-- NESTED COMMENTS ANSWER -->
								</li>
							<?php 
                        }
                        ?>
						<?php 
                    }
                    ?>
					</ul>
					<?php 
                    // if config provides that user must me connected
                    if ($configs['loggedin'] == "1") {
                        // check if user connected
                        if (\app::getClass('user')->VerifyConnexion()) {
                            // Post a comment
                            ?>
							<h4 class="title"><?php 
                            echo t('Post a comment');
                            ?>
</h4>

							<?php 
                            // Tpl: Login as & comment form
                            ?>
							<div class="userInfo">
								<?php 
                            echo t('Connected as') . ' <span>' . \app::$request->getParam('session_login') . '</span>';
                            ?>
								(<a class="logout" href="logout"><?php 
开发者ID:saitinet,项目名称:parsimony,代码行数:31,代码来源:view.php

示例3: renewPassAction

 public function renewPassAction()
 {
     $mail = \app::$request->getParam('mail');
     if ($mail !== FALSE && filter_var($mail, FILTER_VALIDATE_EMAIL)) {
         return \app::getClass('user')->resetPassword(filter_var($mail, FILTER_VALIDATE_EMAIL));
     } else {
         return t('Invalid E-mail');
     }
 }
开发者ID:saitinet,项目名称:parsimony,代码行数:9,代码来源:module.php

示例4: function

    CFInstall.check({
        mode: "inline", // the default
        oninstall: function(){
            alert("Chrome Frame is now installed. Restart your browser to start enjoying Parsimony!");
        }
    });
    });
</script>
<![endif]-->
<?php 
if (\app::getClass('user')->VerifyConnexion()) {
    header('Location: ' . BASE_PATH . 'index');
    exit;
}
if (isset($_POST['connexion'])) {
    $user = \app::getClass('user');
    $user->authentication($_POST['login'], $_POST['password']);
    if ($user->VerifyConnexion()) {
        header('Location: ' . BASE_PATH);
        exit;
    } else {
        echo '<div id="wrong">' . t('The username or password you entered is incorrect') . '</div>';
    }
}
?>
<!DOCTYPE html> 
<html> 
    <head> 
        <title><?php 
echo t('Login');
?>
开发者ID:saitinet,项目名称:parsimony,代码行数:31,代码来源:connect.php

示例5: determineRole

 /**
  * Determine Role & permissions
  */
 protected function determineRole()
 {
     /* Rights */
     define('DISPLAY', 1);
     define('INSERT', 2);
     define('UPDATE', 4);
     define('DELETE', 8);
     if (\app::getClass('user')->VerifyConnexion() === TRUE && (empty(app::$config['security']['allowedipadmin']) || preg_match('@' . preg_quote($_SERVER['REMOTE_ADDR'], '.') . '@', app::$config['security']['allowedipadmin']))) {
         /* Mainly to use in query block, session_ prefix to avoid collision */
         $this->setParams(array('session_id_user' => $_SESSION['id_user'], 'session_id_role' => $_SESSION['id_role'], 'session_permissions' => $_SESSION['permissions'], 'session_login' => $_SESSION['login']));
         if ($_SESSION['permissions'] > 0) {
             /* If user is a creator we display errors and active admin module */
             \app::$activeModules['admin'] = 1;
             error_reporting(-1);
             ini_set('display_errors', 1);
             set_error_handler('\\core\\classes\\app::errorHandler');
             set_exception_handler('\\core\\classes\\app::exceptionHandler');
             register_shutdown_function('\\core\\classes\\app::errorHandlerFatal');
         }
     } else {
         $_SESSION['permissions'] = 0;
         $_SESSION['id_role'] = 4;
         /* Mainly to use in query block */
         $this->setParams(array('session_id_user' => FALSE, 'session_id_role' => 4, 'session_permissions' => 0, 'session_login' => FALSE));
     }
     define('TOKEN', $_SESSION['TOKEN']);
 }
开发者ID:saitinet,项目名称:parsimony,代码行数:30,代码来源:request.php


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