本文整理汇总了PHP中Utilities::createToken方法的典型用法代码示例。如果您正苦于以下问题:PHP Utilities::createToken方法的具体用法?PHP Utilities::createToken怎么用?PHP Utilities::createToken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utilities
的用法示例。
在下文中一共展示了Utilities::createToken方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: joinMaestroView
public function joinMaestroView($attempt = 0)
{
$attempt = strip_tags(htmlspecialchars($attempt));
$attempt = filter_var($attempt, FILTER_SANITIZE_NUMBER_INT);
$attempt = filter_var($attempt, FILTER_VALIDATE_INT);
$attempt = intval($attempt);
$this->view = new JoinView($this->app->urlFor('admin-maestro-post'), Utilities::createToken(), $attempt);
$this->view->display();
}
示例2: loginView
public function loginView($params)
{
$attempt = strip_tags(htmlspecialchars($params['attempt']));
$attempt = filter_var($attempt, FILTER_SANITIZE_STRING);
$attempt = filter_var($attempt, FILTER_VALIDATE_INT);
$attempt = intval($attempt);
$join = $this->app->urlFor('join');
$action = $this->app->urlFor('loginPost');
/*if ( $params['admin'] )
$action = $this->app->urlFor('admin-login-post');
else
$action = $this->app->urlFor('loginPost');*/
$this->view = new LoginView($action, Utilities::createToken(), $join, $attempt);
$this->view->display();
//Utilities::printData( $params );
//var_dump($_SESSION['proceso']);
}
示例3: cambiarFotoView
public function cambiarFotoView($params)
{
$usuario_id = strip_tags(htmlspecialchars($params['usuario']));
$usuario_id = intval($usuario_id);
$usuario_id = filter_var($usuario_id, FILTER_VALIDATE_INT);
$error = 0;
if (!$usuario_id || $usuario_id == 0) {
$error = 1;
}
$usuario = Perfil::find($usuario_id);
if (count($usuario) == 0) {
$error = 2;
}
$action = '/usuario/' . $usuario_id . '/foto/';
$session = Utilities::getSession();
$links = Utilities::getMenu($session);
$this->view = new FotoView($action, Utilities::createToken(), $usuario, $links, $error);
$this->view->display();
}
示例4: loginView
public function loginView($attempt = 0)
{
$attempt = strip_tags(htmlspecialchars($attempt));
$attempt = filter_var($attempt, FILTER_SANITIZE_STRING);
$attempt = intval($attempt);
$attempt = filter_var($attempt, FILTER_VALIDATE_INT);
$action = $this->app->urlFor('maestro-login-post');
$join = $this->app->urlFor('join');
$this->view = new LoginView($action, Utilities::createToken(), $join, $attempt);
$this->view->display();
}
示例5: addFileLeccion
public function addFileLeccion($params)
{
$attempt = 0;
$leccion_id = strip_tags(htmlspecialchars($params['leccion']));
$leccion_id = intval($leccion_id);
if (!$leccion_id) {
$this->app->redirect($this->app->urlFor('Index'));
}
$action = '/curso/leccion/' . $leccion_id . '/file';
if (array_key_exists('get', $params)) {
$attempt = strip_tags(htmlspecialchars($params['get']));
}
if (isset($_SESSION['upload'])) {
if ($_SESSION['upload'] == 1) {
unset($_SESSION['upload']);
$attempt = 5;
}
}
$this->view = new LeccionFileView($action, Utilities::createToken(), $attempt);
$this->view->display();
}