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


PHP Request::req方法代码示例

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


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

示例1: signSet

 private static function signSet()
 {
     $bd = new BaseDatos();
     $email = Request::req("email");
     $clave = Request::req("clave");
     $alias = Request::req("alias");
     $date = date('Y-m-d h:i:s');
     $activo = 1;
     $personal = 0;
     $administrador = 0;
     //-----------------------------------
     $email_a = $email;
     $titulo = Request::req("titulo");
     $descripcion = Request::req("descripcion");
     $perfil = Request::req("perfil");
     $galeria = Request::req("galeria");
     $style = "_plantilla1";
     $usuario = new Usuario($email, sha1($clave), $alias, $fecha, $activo, $personal, $administrador);
     $artista = new Artist($email, $titulo, $descripcion, $perfil, $galeria, $style);
     $manageUsurio = new ManageUser($bd);
     $manageArtist = new ManageArtist($bd);
     $manageUsurio->insert($usuario);
     $manageArtist->insert($artista);
     header("Location: ../frontend/index.php");
 }
开发者ID:ealvarez1990,项目名称:galeriaarte,代码行数:25,代码来源:ControladorLogin.php

示例2: read

 function read()
 {
     //añadimos a cada propiedad de la clase ($this->$key) su valor si lo pasamos con el mismo nombre
     foreach ($this as $key => $valor) {
         $this->{$key} = Request::req($key);
     }
 }
开发者ID:JuanManuelOlalla,项目名称:gallery,代码行数:7,代码来源:Imagen.php

示例3: loginSet

 function loginSet()
 {
     echo 'LOGIN';
     $email = Request::req("email");
     $clave = sha1(Request::req("clave"));
     header("Location: ../login/index.php?email={$email}&clave={$clave}");
 }
开发者ID:ealvarez1990,项目名称:galeriaarte,代码行数:7,代码来源:ControladorFrontEnd.php

示例4: handle

 function handle()
 {
     $op = Request::req("op");
     $metodo = $op;
     //Aquí le decimos si existe el metodo en la clase (podemos llamar a otra clase en lugar de this)
     if (method_exists($this, $metodo)) {
         $this->{$metodo}();
     } else {
         $this->principal();
     }
 }
开发者ID:maguria,项目名称:usuariosPlantillas,代码行数:11,代码来源:Controlador.php

示例5: handle

 static function handle()
 {
     $action = Request::req("action");
     $target = Request::req("target");
     $metodo = $action . ucfirst($target);
     if (method_exists(get_class(), $metodo)) {
         self::$metodo();
     } else {
         self::viewIndex();
     }
 }
开发者ID:davidgamarra,项目名称:DWESI_Practice5_ArtGallery,代码行数:11,代码来源:Controller.php

示例6: handle

 static function handle()
 {
     //gestionar la petición
     $bd = new DataBase();
     $gestor = new ManageObra($bd);
     $gestorArtista = new ManageArtista($bd);
     $action = Request::req("action");
     $do = Request::req("do");
     $metodo = $action . ucfirst($do);
     if (method_exists(get_class(), $metodo)) {
         self::$metodo($gestor, $gestorArtista);
     } else {
         self::readView($gestor, $gestorArtista);
     }
 }
开发者ID:carlosgrgr,项目名称:galeriaArte,代码行数:15,代码来源:ControladorObra.php

示例7: handle

 static function handle()
 {
     $bd = new DataBase();
     $gestor = new ManageRelations($bd);
     $action = Request::req("action");
     $do = Request::req("do");
     $metodo = $action . ucfirst($do);
     if (method_exists(get_class(), $metodo)) {
         //ucfirst pone la primera en mayuscula
         echo 'El método existe';
         self::$metodo($gestor);
     } else {
         echo 'la función no existe';
         self::readView($gestor);
     }
     $bd->close();
 }
开发者ID:jjorgosogarcia,项目名称:PhpGaleria,代码行数:17,代码来源:ControladorObraUsuario.php

示例8: editset

 private static function editset()
 {
     $user = self::user();
     if ($user) {
         $db = new Database();
         $manager = new ManagerUser($db);
         $user->set(Request::reqFull());
         $where['email'] = Request::req('old-email');
         $res = $manager->set($user, $where);
         $db->close();
     }
     self::editview();
 }
开发者ID:developdms,项目名称:Practica-5,代码行数:13,代码来源:Controller.php

示例9: registroYa

 private static function registroYa($gestor, $sesion)
 {
     $email = Request::req("email");
     if ($gestor->get($email)->getEmail() !== $email) {
         $artista = new Artista($email);
         $artista->read();
         $artista->setClave(sha1($artista->getClave()));
         if ($gestor->insert($artista)) {
             MailGoogle::sendMailActivacion($email);
             self::addArtista($gestor, $sesion, "Realizado con exito");
         } else {
             self::addArtista($gestor, $sesion, "Algun dato fallo al intentar modificarse" . var_dump($artista));
         }
     } else {
         self::addArtista($gestor, $sesion, "Ese correo ya existe");
     }
 }
开发者ID:izvDavid2015,项目名称:GaleriaDeArte,代码行数:17,代码来源:ControladorAdmin.php

示例10: header

<?php

require '../clases/AutoCarga.php';
header('Contet-Type: application/json');
$sesion = new Session();
$no = json_encode(array('login' => false));
$pagina = Request::req("pagina");
if ($pagina === null) {
    $pagina = 1;
}
if ($sesion->isLogged()) {
    $bd = new DataBase();
    $gestor = new ManageCity($bd);
    $pager = new Pager($gestor->count());
    $paginas = $pager->getPaginas();
    $ciudades = $gestor->getListJson($pagina);
    echo '{"ciudades":' . $ciudades . ', "paginas": ' . $paginas . '}';
    $bd->close();
} else {
    echo $no;
}
开发者ID:daw2015,项目名称:plantillas,代码行数:21,代码来源:ajaxCiudades.php

示例11: read2

 public function read2()
 {
     foreach ($this as $key => $value) {
         if (Request::req($key) === null) {
             $this->{$key} = 0;
         } else {
             if (Request::req($key) === "on") {
                 $this->{$key} = 1;
             } else {
                 $this->{$key} = Request::req($key);
             }
         }
     }
 }
开发者ID:izvDavid2015,项目名称:GaleriaDeArte,代码行数:14,代码来源:Cuadro.php

示例12: editset

 private static function editset()
 {
     $user = self::user();
     if ($user && Request::get('password') == Request::get('rpassword')) {
         $db = new Database();
         $manager = new ManagerUser($db);
         $user->set(Request::reqFull());
         $res = $manager->set($user, Request::req('old-email'));
         $db->close();
     }
     header('location:?op=edit&do=view');
 }
开发者ID:developdms,项目名称:Practica-5,代码行数:12,代码来源:Controller.php

示例13: writeStyle

 private static function writeStyle($gestor, $sesion)
 {
     $user = $sesion->getUser();
     $estilo = Request::req("estilo");
     $fp = fopen('../artista/Themes/' . $user->getTema() . '/assets/css/mystyle.css', 'w');
     fwrite($fp, $estilo);
     fclose($fp);
     self::changeStyle($gestor, $sesion);
 }
开发者ID:izvDavid2015,项目名称:GaleriaDeArte,代码行数:9,代码来源:ControladorArtista.php

示例14: Session

<?php

require '../../../../classes/AutoLoad.php';
$session = new Session();
$user = $session->getUser();
if ($user === NULL) {
    header('Location:../login.php');
    exit;
}
$request = Request::reqFull();
if (Request::req('administrator') == NULL) {
    $request['administrator'] = 0;
}
if (!Request::req('personal') == NULL) {
    $request['personal'] = 0;
}
$db = new Database();
$manager = new ManagerUser($db);
$user = $manager->get($request['pk']);
$user->set($request);
$res = $manager->set($user);
header("Location:../readuser.php?r={$res}&op=update");
开发者ID:developdms,项目名称:Practica-4,代码行数:22,代码来源:phpupdateuser.php

示例15: header

<?php

require '../clases/AutoCarga.php';
header('Contet-Type: application/json');
$sesion = new Session();
$no = json_encode(array('delete' => -1));
if ($sesion->isLogged()) {
    $bd = new DataBase();
    $gestor = new ManageCity($bd);
    $id = Request::req("ID");
    $r = $gestor->delete($id);
    $bd->close();
    $respuesta = '{"delete":' . $r . '}';
    echo $respuesta;
    //var_dump($bd->getError());
} else {
    echo $no;
}
开发者ID:daw2015,项目名称:plantillas,代码行数:18,代码来源:ajaxCityDelete.php


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