本文整理汇总了PHP中bd::getAllDatos方法的典型用法代码示例。如果您正苦于以下问题:PHP bd::getAllDatos方法的具体用法?PHP bd::getAllDatos怎么用?PHP bd::getAllDatos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bd
的用法示例。
在下文中一共展示了bd::getAllDatos方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bd
<div class="form-group col-xs-12 col-sm-12 col-md-12 col-lg-12 input">
<input type="text"
placeholder="Ingrese un numero de telefono..." name="e_telefono_admin"
class=" form-input" id="e_telefono_admin">
</div>
<div class="col-xs-12">
<span class="marL10"><i class="fa fa-map-marker"></i>
Sambil</span>
</div>
<div class="form-group col-xs-12 col-sm-12 col-md-12 col-lg-12 input" >
<select disabled="disabled" class="error-select form-select " id="e_estado_admin" >
<?php
$sede_obj = new bd();
$id_sede = $usua->u_id_sede;
$row = array('indice' => 'id', 'value' => $id_sede);
$sedes = $sede_obj->getAllDatos("sedes", $row);
foreach ($sedes as $sede) {
?>
<option value="<?php
echo $sede["id"];
?>
"><?php
echo $sede["nombre"];
?>
</option>
<?php
}
?>
</select>
<input type="hidden" value="<?php
示例2: ingresoUsuario
public function ingresoUsuario($login, $password, $url)
{
$bd = new bd();
$foto = new fotos();
if (isset($login["seudonimo"])) {
$condicion = "seudonimo = '{$login["seudonimo"]}'";
} else {
$condicion = "email = '{$login["email"]}'";
}
$hash = hash("sha256", $password);
if ($url == "admin") {
$condicion = "{$condicion} AND password = '{$hash}' AND id_rol <= 2 ";
} else {
$condicion = "{$condicion} AND password = '{$hash}'";
}
$result = $bd->doSingleSelect($this->a_table, $condicion);
if (!empty($result)) {
if ($result["bandera"] == 0) {
if ($result["status_usuarios_id"] == '1') {
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
$_SESSION["id"] = $result["usuarios_id"];
$_SESSION["seudonimo"] = $result["seudonimo"];
$_SESSION["nivel"] = $result["nivel"];
$_SESSION["fotoperfil"] = $foto->buscarFotoUsuario($result["usuarios_id"]);
$_SESSION["id_rol"] = $result["id_rol"];
$this->buscarUsuario($_SESSION["id"]);
$row = array('indice' => 'id', 'value' => $this->u_id_sede);
$valsede = $bd->getAllDatos("sedes", $row);
if (!empty($valsede)) {
$_SESSION['code_sambil'] = $valsede[0]['codigo'];
}
setcookie("c_id", $result["usuarios_id"], time() + 7776000, '/');
setcookie("c_seudonimo", $result["seudonimo"], time() + 7776000, '/');
setcookie("c_nivel", $result["nivel"], time() + 7776000, '/');
setcookie("c_fotoperfil", $foto->buscarFotoUsuario($result["usuarios_id"]), time() + 7776000, '/');
setcookie("c_id_rol", $result["id_rol"], time() + 7776000, '/');
return array(1, $result["usuarios_id"]);
} else {
return array(4, $result["usuarios_id"]);
}
} else {
return array(3, $result["usuarios_id"]);
}
} else {
return array(2, "");
}
}