本文整理汇总了PHP中Connect::conn方法的典型用法代码示例。如果您正苦于以下问题:PHP Connect::conn方法的具体用法?PHP Connect::conn怎么用?PHP Connect::conn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Connect
的用法示例。
在下文中一共展示了Connect::conn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: realpath
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
$root = realpath(filter_input(INPUT_SERVER, "DOCUMENT_ROOT"));
include $root . "/soccermail/mysql/connect.php";
include $root . "/soccermail/module/segud.php";
$connect = new Connect();
$conn = $connect->conn("soccermail");
$segud = new Segud();
if ($conn != false) {
if ($segud->exists("user_id", "97112514426", "profile", $conn)) {
echo "el usuario existe";
} else {
echo "el usuario no existe";
}
}
?>
</body>
</html>
示例2: construct
function construct()
{
$field = array("us_ide", "us_id", "us_nam", "us_su", "us_da", "us_mo", "us_ye", "us_ge", "us_re", "us_pho", "us_mob", "us_na", "us_em", "us_pa");
$register = new Register();
$vfields = $register->vfields($field);
if ($vfields != false) {
$year = date("Y");
$month = date("m");
$day = date("d");
$hours = date("H");
$minutes = date("i");
$seconds = date("s");
$user = new User();
$us_id = $user->iget("us_id");
$us_su = $user->iget("us_su");
$us_da = $user->iget("us_da");
$us_mo = $user->iget("us_mo");
$us_ye = $user->iget("us_ye");
$us_ge = $user->iget("us_ge");
$us_re = $user->iget("us_re");
$us_ide = $user->iget("us_ide");
$us_nam = $user->iget("us_nam");
$us_pho = $user->iget("us_pho");
$us_mob = $user->iget("us_mob");
if ($user->vdate($us_da, $us_mo, $us_ye, $year, $month, $day)) {
if ($vfields == "account") {
$us_na = $user->iget("us_na");
$us_em = $user->iget("us_em");
$us_pa = $user->iget("us_pa");
if ($user->vemail($us_em)) {
if ($user->vpassword($us_pa)) {
$connect = new Connect();
$conn = $connect->conn("soccermail");
if ($conn != false) {
$segud = new Segud();
if ($segud->existsv2("id", $us_id, "identity", $us_ide, "applicant", $conn)) {
if (!$segud->exists("name", $us_na, "account", $conn)) {
if (!$segud->exists("email", $us_em, "account", $conn)) {
$us_sc = $segud->get("school", "id", $us_id, "applicant", $conn);
$data = array($us_id, $us_nam, $us_su, $us_da, $us_mo, $us_ye, $us_ge, $us_re, $us_pho, $us_mob, $us_ide, $us_sc);
if ($segud->set($data, "user", $conn)) {
if ($segud->delete("id", $us_id, "applicant", $conn)) {
$data = array($us_id, $day, $month, $year, $seconds, $minutes, $hours);
if ($segud->set($data, "signup", $conn)) {
$us_bi = "La biografía de " . $us_nam;
$us_ph = "La foto de " . $us_nam;
$us_he = "El encabezado de " . $us_nam;
$data = array($us_id, $us_bi, $us_ph, $us_he);
if ($segud->set($data, "profile", $conn)) {
$mysqli = $conn->query("select max(id) from account");
$row = $mysqli->fetch_array(MYSQLI_NUM);
$ac_id = trim($row[0]) + 1;
$data = array($ac_id, "true", "true", $us_id, $us_na, $us_em, $us_pa);
if ($segud->set($data, "account", $conn)) {
$data = array($us_id, 0, 0);
if ($segud->set($data, "follow", $conn)) {
$us_ag = filter_input(INPUT_SERVER, "HTTP_USER_AGENT");
$ip = $user->ip();
$os = $user->os($us_ag);
$browser = $user->browser($us_ag);
$version = $user->version($us_ag, $os);
$data = array($ac_id, $day, $month, $year, $seconds, $minutes, $hours, $os, $version, $browser, $ip);
if ($segud->set($data, "login", $conn)) {
if ($segud->update("session", "true", "id", $ac_id, "account", $conn)) {
session_start();
$_SESSION["logac_id"] = $ac_id;
$_SESSION["logus_em"] = $us_em;
$_SESSION["logus_id"] = $us_id;
$_SESSION["logus_na"] = $us_na;
$_SESSION["logus_sc"] = $us_sc;
$_SESSION["session"] = true;
if ($connect->close($conn)) {
echo "true";
}
/*close conn*/
}
}
}
}
}
}
}
}
} else {
echo "La dirección de correo electrónico ya ha sido registrada.";
}
} else {
echo "El nombre de usuario ya existe, intenta nuevamente con uno distinto.";
}
} else {
echo "El documento de identidad no ha sido registrado o no corresponde al tipo de usuario " . "del mismo. Obtén más información con un entrenador de la escuela.";
}
}
} else {
echo "La contraseña no es segura. Por favor verifica que tenga mayúsculas, números y que sea" . "almenos de 9 caracteres, e inténtalo nuevamente.";
}
} else {
echo "La dirección de correo electrónico es incorrecta. Si presentas algún inconveniente " . "con el símbolo del arroba puedes copiarlo: " . "<b>" . "@" . "</b>" . " y pegarlo.";
}
}
//.........这里部分代码省略.........