本文整理汇总了PHP中Control类的典型用法代码示例。如果您正苦于以下问题:PHP Control类的具体用法?PHP Control怎么用?PHP Control使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Control类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: registrar
public function registrar()
{
//funcion para registrar los nuevos usuarios...
$conexion = new Conexion();
$conexion = $conexion->conectar();
$email = $conexion->real_escape_string(strip_tags($_POST['email']));
$nombre = $conexion->real_escape_string(strip_tags($_POST['nombre']));
$apellido = $conexion->real_escape_string(strip_tags($_POST['apellido']));
$edad = $conexion->real_escape_string(strip_tags($_POST['edad']));
$genero = $conexion->real_escape_string(strip_tags($_POST['genero']));
$grado = $conexion->real_escape_string(strip_tags($_POST['grado']));
$password = $conexion->real_escape_string(strip_tags($_POST['password']));
$codigo = sha1(mt_rand() . time() . mt_rand() . $_SERVER['REMOTE_ADDR']);
//se genera un codigo aleatorio para enviar
//por correo para verificar y activar la cuenta
$user = new Usuario();
//se agrega el usuario a la bd
$user->addUser($conexion, $email, $nombre, $apellido, $edad, $genero, $grado, $password);
$control = new Control($email);
//se agrega los respectivos datos a la tabla control
$control->addControl($conexion);
$activar = new Activacion();
//se agrega los respectivos datos a la tabla activacion
$activar->add($conexion, $email, $codigo);
//se agrega el link que ayudara a la activación de la cuenta
$contenido = 'Hola, para activar tu cuenta haz click en el siguiente link:
' . "\n" . '
<a href="localhost:8080/neuroentrenamiento/Controlador/userController.php?value=activar&email=' . urlencode($email) . '&code=' . $codigo . '">localhost:8080/neuroentrenamiento/Controlador/userController.php?value=activar&email=' . urlencode($email) . '&code=' . $codigo . '</a>
O copia el siguiente link en la barra de direcciones de tu navegador:
' . "\n" . '
localhost:8080/neuroentrenamiento/Controlador/userController.php?value=activar&email=' . urlencode($email) . '&code=' . $codigo;
mail($email, "Por favor activa tu cuenta", $contenido);
//se envia el correo para que pueda ser activada la cuenta
header("location: ../Vista/pruebas/msg/registermsg.html");
}
开发者ID:shikamarucb,项目名称:neuroentrenamiento,代码行数:35,代码来源:userController.php
示例2: testSetGetIsSpaceDelimited
/**
* setIsSpaceDelimited() and getIsSpaceDelimited() should set and get the
* flag, respectively
*/
public function testSetGetIsSpaceDelimited()
{
$control = new Control();
$control->setIsSpaceDelimited(true);
$this->assertTrue($control->getIsSpaceDelimited());
return;
}
开发者ID:jstewmc,项目名称:rtf,代码行数:11,代码来源:ControlTest.php
示例3: accederPruebasMate
public function accederPruebasMate($tipo)
{
//funcion para comprobar que el usuario haga las preubas del dia
date_default_timezone_set("America/Bogota");
$fechaAct = date("Y-m-d");
$email = $_SESSION['session'];
$conexion = new Conexion();
$conexion = $conexion->conectar();
$control = new Control($email);
$data = $control->getControl($conexion);
$datos = $data->fetch_array(MYSQLI_ASSOC);
$dia = $datos["dia_usuario"];
$semana = $datos["semana_usuario"];
$contador = $datos["contador_actividad"];
$resultado = new Resultado();
$result = $resultado->getResult($conexion, $email, $dia, $semana);
$informs = $result->fetch_all(MYSQLI_ASSOC);
$i = 0;
if ($fechaAct != $datos["fecha"] || $result->num_rows != 0) {
foreach ($informs as $info) {
if ($info['prueba_tipo'] == $tipo) {
$i = $i + 1;
}
}
if ($i == 0) {
return true;
} else {
//echo "No puedes realizar esta prueba de nuevo";
header("Location: ../msg/againmsg.html");
}
} else {
echo "No puedes hacer mas pruebas por el dia de hoy. Por favor regresa mañana";
header("Location: ../msg/endedmsg.html");
}
}
开发者ID:shikamarucb,项目名称:neuroentrenamiento,代码行数:35,代码来源:permisos.php
示例4: getControl
public function getControl($email)
{
$conexion = new Conexion();
$conexion = $conexion->conectar();
$datos = new Control($email);
$info = $datos->getControl($conexion);
return $resultado = $info->fetch_array(MYSQLI_ASSOC);
}
开发者ID:shikamarucb,项目名称:neuroentrenamiento,代码行数:8,代码来源:datosControl.php
示例5: handle
/**
* Web app handle
*/
public function handle()
{
$action = isset($_GET["action"]) ? trim($_GET["action"]) : "list";
$control = new Control();
switch ($action) {
case "detail":
$control->detailAction();
break;
default:
$control->listAction();
}
}
开发者ID:chenwenzhang,项目名称:initially-rpc,代码行数:15,代码来源:App.php
示例6: getAdminFormXML
/**
* @mcms_message ru.molinos.cms.admin.form.backup
*/
public function getAdminFormXML(Context $ctx)
{
$form = new Form(array('action' => '?q=backup.rpc', 'title' => t('Архивирование сайта')));
$form->addControl(new EnumRadioControl(array('value' => 'action', 'label' => t('Выберите операцию'), 'options' => array('backup' => t('Скачать архив сайта')), 'required' => true)));
$form->addControl(new SubmitControl(array('text' => t('Продолжить'))));
return $form->getXML(Control::data(array()));
}
开发者ID:umonkey,项目名称:molinos-cms,代码行数:10,代码来源:class.backupform.php
示例7: __construct
function __construct()
{
parent::Control();
$this->load_model("msg");
$this->load_model("reply");
$this->load_model("cate");
}
开发者ID:ahmatjan,项目名称:yida,代码行数:7,代码来源:reply.php
示例8: setValue
/**
* Set the value of the control.
*
* @param string $value
* @return Control $this
*/
public function setValue($value)
{
if ($this->getOption('multiple') && !is_array($value)) {
$value = (string) $value === '' ? [] : (array) $value;
}
return parent::setValue($value);
}
开发者ID:sachsy,项目名称:formbuilder,代码行数:13,代码来源:Choice.php
示例9: __construct
function __construct()
{
parent::Control();
$this->load_model("user");
$this->load_model("usergroup");
$this->load_model("user_model", true);
}
开发者ID:norain2050,项目名称:hkgbf,代码行数:7,代码来源:usercp.php
示例10: toInput
public function toInput()
{
if ($this->value == $this->getValue()) {
$this->set("checked");
}
return parent::toInput();
}
开发者ID:fruition-sciences,项目名称:phpfw,代码行数:7,代码来源:Radio.php
示例11: getXML
public function getXML($data)
{
$content = self::getChildrenXML($data);
if (!empty($content)) {
return parent::wrapXML(array('type' => 'group', 'tab' => (bool) $this->tab, 'mode' => $this->mode), $content);
}
}
开发者ID:umonkey,项目名称:molinos-cms,代码行数:7,代码来源:control.fieldset.php
示例12: init
/**
* Initializes the control
*/
public function init()
{
parent::init();
if (gettype($this->model)=='string')
$this->model=Model::Instance($this->model);
if (!$this->content->fields)
$this->fields=$this->build_default_fields();
else
{
foreach($this->content->fields->field as $f)
{
$flat=array();
foreach($f->attributes() as $k => $v)
$flat[(string)$k]=(string)$v;
$flat['value']=$this->model->{$flat['id']};
$this->fields[]=$flat;
}
}
// auto magic
if ( (($this->allow_create) && ($this->controller->method=='PUT')) || (($this->allow_update) && ($this->controller->method=='POST')) )
$this->save();
}
开发者ID:jawngee,项目名称:Thor,代码行数:28,代码来源:form.php
示例13: __construct
public function __construct($params, $interface = "InterfaceProducao.html")
{
$this->producao = new ModelProducao();
$this->producaoDAO = new ProducaoDAO();
parent::__construct($params, $interface);
parent::paginado($this->producao, 15);
}
开发者ID:cokita,项目名称:srp,代码行数:7,代码来源:AdminProducao.php
示例14: __construct
public function __construct($util, $get = null)
{
parent::__construct($util);
$this->model();
$model = new Model();
$data["auth"] = $this->util->estAuthent();
if (!isset($get["num"])) {
$data["liste"] = $model->getElevesGroupe($util->getNumGroupe());
$data["droit"] = $this->util->estProf();
$model->close();
$this->setViewMenu();
$this->view->init('passprof.php', $data);
$this->setViewBas();
} else {
$l = $get["l"];
if ($get["l"] == "p") {
$data["tableau"] = $model->getTableauSyntheseNew($get["num"]);
$data["synth"] = $model->getSynth($get["num"]);
$model->close();
$this->view->init('synthese.php', $data);
} else {
$data["bilan"] = $model->getBilan($get["num"]);
$model->close();
$this->setViewMenu();
$this->view->init('bilan.php', $data);
$this->setViewBas();
}
}
}
开发者ID:PierreBeillon,项目名称:SuiviSIO,代码行数:29,代码来源:Passprof.class.php
示例15: __construct
public function __construct($params, $interface = "InterfaceProducao_Cadastro.html")
{
$this->producao = new ModelProducao();
$this->producaoDAO = new ProducaoDAO();
$this->sgv = 0;
parent::__construct($params, $interface);
}
开发者ID:cokita,项目名称:srp,代码行数:7,代码来源:AdminProducao_Cadastro.php
示例16: prepareUserValue
public function prepareUserValue($value, $getValue = null)
{
if (empty($value)) {
$value = null;
}
return parent::prepareUserValue($value, $getValue);
}
开发者ID:deadem,项目名称:djem,代码行数:7,代码来源:Date.php
示例17: saveState
/**
* Save params
* @param array
* @return void
*/
public function saveState(array &$params)
{
parent::saveState($params);
if (isset($params['order'])) {
$params['order'] = implode('.', $params['order']);
}
}
开发者ID:vrana,项目名称:nette,代码行数:12,代码来源:test.link.php
示例18: __construct
public function __construct($util, $get = null)
{
parent::__construct($util);
$data["auth"] = $this->setViewMenu();
$this->view->init('corpsaccueil.php', $data);
$this->setViewBas();
}
开发者ID:PierreBeillon,项目名称:SuiviSIO,代码行数:7,代码来源:Accueil.class.php
示例19: getXML
public function getXML($data)
{
if (empty($data->{$this->value})) {
return;
}
return parent::wrapXML(array('value' => $this->renderContent($data->{$this->value})));
}
开发者ID:umonkey,项目名称:molinos-cms,代码行数:7,代码来源:control.orderdetails.php
示例20: __construct
public function __construct($util, $get = null)
{
parent::__construct($util);
$this->model();
$this->setViewMenu();
if (isset($get["vers"])) {
$vers = $get["vers"];
} else {
$vers = 1;
}
if (isset($get["depuis"])) {
$depuis = $get["depuis"];
} else {
$depuis = 1;
}
$model = new Model();
if (isset($get["enregistrer"])) {
//on a cliqué un bouton enregistrer
if (isset($get["li"])) {
//il y a des situs (inutile ici...)
$model->validSitu($get["chk"], $this->util->getId(), $get["li"]);
}
}
$data["lessitus"] = $model->getSitus($util->getId(), $util->getNumGroupe(), $vers);
$data["auth"] = $this->util->estAuthent();
$data["vers"] = $vers;
$data["type"] = "V";
//validations
$this->view->init('dessitus.php', $data);
$this->setViewBas();
$model->close();
}
开发者ID:PierreBeillon,项目名称:SuiviSIO,代码行数:32,代码来源:Valid.class.php
注:本文中的Control类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论