本文整理汇总了PHP中encryptIt函数的典型用法代码示例。如果您正苦于以下问题:PHP encryptIt函数的具体用法?PHP encryptIt怎么用?PHP encryptIt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了encryptIt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insertar
public function insertar()
{
$sessionActual = $this->session->userdata('logged_in');
$idEmpresa = $sessionActual['idEmpresa'];
$data['moneda'] = array('idEmpresa' => $idEmpresa, 'nombre' => $this->input->post('tipoMoneda_nombre'), 'signo' => $this->input->post('tipoMoneda_signo'), 'tipoCambio' => $this->input->post('tipoMoneda_tipoCambio'), 'eliminado' => '0');
$res = $this->Tipomoneda_model->insertar($data);
if (!$res) {
//Error en la transacci�n
echo 0;
} else {
// correcto
echo encryptIt($res);
}
}
示例2: insertar
public function insertar()
{
$sessionActual = $this->session->userdata('logged_in');
$idEmpresa = $sessionActual['idEmpresa'];
$data['formaPago'] = array('idEmpresa' => $idEmpresa, 'nombre' => $this->input->post('formaPago_nombre'), 'descripcion' => $this->input->post('formaPago_descripcion'), 'eliminado' => '0');
$res = $this->Formapago_model->insertar($data);
if (!$res) {
//Error en la transacción
echo 0;
} else {
// correcto
echo encryptIt($res);
}
}
示例3: insertar
public function insertar()
{
$sessionActual = $this->session->userdata('logged_in');
$idEmpresa = $sessionActual['idEmpresa'];
$gastoFijo = $this->input->post('gasto_tipo');
if ($gastoFijo == 1) {
$data['datos'] = array('idEmpresa' => $idEmpresa, 'idCategoriaGasto' => $this->input->post('gasto_categoria'), 'idProveedor' => $this->input->post('gasto_persona'), 'gastoFijo' => 1, 'codigo' => $this->input->post('gasto_codigo'), 'nombre' => $this->input->post('gasto_nombre'), 'monto' => $this->input->post('gasto_monto'), 'formaPago' => $this->input->post('gasto_formaPago'), 'eliminado' => '0');
} else {
$data['datos'] = array('idEmpresa' => $idEmpresa, 'idCategoriaGasto' => $this->input->post('gasto_categoria'), 'idProveedor' => $this->input->post('gasto_persona'), 'gastoFijo' => 0, 'codigo' => $this->input->post('gasto_codigo'), 'nombre' => $this->input->post('gasto_nombre'), 'monto' => $this->input->post('gasto_monto'), 'formaPago' => $this->input->post('gasto_formaPago'), 'eliminado' => '0');
}
$res = $this->Gasto_model->insertar($data);
if (!$res) {
//Error en la transacción
echo 0;
} else {
// correcto
echo encryptIt($res);
}
}
示例4: alertBox
// Validation
if ($_POST['entryTitle'] == "") {
$msgBox = alertBox($entryNameReq, "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['entryUsername'] == "") {
$msgBox = alertBox($entryUsernameReq, "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['entryPass'] == "") {
$msgBox = alertBox($entryPasswordReq, "<i class='fa fa-times-circle'></i>", "danger");
} else {
$entryTitle = encryptIt($_POST['entryTitle']);
$entryDesc = encryptIt($_POST['entryDesc']);
$entryUsername = encryptIt($_POST['entryUsername']);
$entryPass = encryptIt($_POST['entryPass']);
$entryUrl = encryptIt($_POST['entryUrl']);
$entryNotes = encryptIt($_POST['entryNotes']);
$stmt = $mysqli->prepare("UPDATE\n\t\t\t\t\t\t\t\t\t\tpwentries\n\t\t\t\t\t\t\t\t\tSET\n\t\t\t\t\t\t\t\t\t\tentryTitle = ?,\n\t\t\t\t\t\t\t\t\t\tentryDesc = ?,\n\t\t\t\t\t\t\t\t\t\tentryUsername = ?,\n\t\t\t\t\t\t\t\t\t\tentryPass = ?,\n\t\t\t\t\t\t\t\t\t\tentryUrl = ?,\n\t\t\t\t\t\t\t\t\t\tentryNotes = ?\n\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t\tentryId = ?");
$stmt->bind_param('sssssss', $entryTitle, $entryDesc, $entryUsername, $entryPass, $entryUrl, $entryNotes, $entryId);
$stmt->execute();
$msgBox = alertBox($accountEntryUpdatedMsg, "<i class='fa fa-check-square'></i>", "success");
$stmt->close();
}
}
}
}
// Get Data
$sqlStmt = "SELECT\n\t\t\t\t\tpwentries.entryId,\n\t\t\t\t\tpwentries.projectId,\n\t\t\t\t\tpwentries.adminId,\n\t\t\t\t\tpwentries.clientId,\n\t\t\t\t\tpwentries.entryTitle,\n\t\t\t\t\tpwentries.entryDesc,\n\t\t\t\t\tpwentries.entryUsername,\n\t\t\t\t\tpwentries.entryPass,\n\t\t\t\t\tpwentries.entryUrl,\n\t\t\t\t\tpwentries.entryNotes,\n\t\t\t\t\tDATE_FORMAT(pwentries.entryDate,'%M %d, %Y') AS entryDate,\n\t\t\t\t\tCONCAT(admins.adminFirstName,' ',admins.adminLastName) AS theAdmin,\n\t\t\t\t\tCONCAT(clients.clientFirstName,' ',clients.clientLastName) AS theClient,\n\t\t\t\t\tclientprojects.projectName\n\t\t\t\tFROM\n\t\t\t\t\tpwentries\n\t\t\t\t\tLEFT JOIN admins ON pwentries.adminId = admins.adminId\n\t\t\t\t\tLEFT JOIN clients ON pwentries.clientId = clients.clientId\n\t\t\t\t\tLEFT JOIN clientprojects ON pwentries.projectId = clientprojects.projectId\n\t\t\t\tWHERE pwentries.entryId = " . $entryId;
$res = mysqli_query($mysqli, $sqlStmt) or die('-1' . mysqli_error());
$row = mysqli_fetch_assoc($res);
// Decrypt Data
if ($row['entryTitle'] != '') {
示例5: label
<div id="rechazar" class="modal">
<div class="modal-header">
<p><?php
echo label('nombreSistema');
?>
</p>
<a class="modal-action modal-close cerrar-modal"><i class="mdi-content-clear"></i></a>
</div>
<form id="formRechazar" action="<?php
echo base_url();
?>
ManejadorPDF/enviarCotizacionRechazada/<?php
echo $resultado['idEmpresa'];
?>
/<?php
echo encryptIt($resultado['idCotizacion']);
?>
">
<div class="modal-content">
<p style="text-align: center"><?php
echo label('rechazar_titulo');
?>
</p>
<div class="input-field col s12 m6">
<input id="envio_asunto" name="envio_asunto" type="text" value="<?php
echo label('rechazar_asuntoDefecto');
?>
">
<label for="envio_asunto"><?php
echo label('envio_asunto');
示例6: encryptIt
</div>
</form>
<script type = "text/javascript">
//tooltips for textbox
$('#username').tooltip({'trigger':'focus', 'title': 'Your username / Email'});
$('#pwd').tooltip({'trigger':'focus', 'title': 'Minimum 6 Characters'});
</script>
<div class="col-md-offset-3 col-md-8">
<p id = "nouser" class="text-danger"></p>
</div>
<?php
if (isset($_POST['loginsubmit'])) {
$user = $_POST['uusername'];
$password = $_POST['pwd'];
$encryptedpwd = encryptIt($password);
$query1 = "select username,password from users where username='" . $user . "' and password='" . $encryptedpwd . "'";
$result1 = mysqli_query($connection, $query1);
$num_rows1 = mysqli_num_rows($result1);
$query2 = "select username,email,password from users where email='" . $user . "' and password='" . $encryptedpwd . "'";
$result2 = mysqli_query($connection, $query2);
$num_rows2 = mysqli_num_rows($result2);
if ($num_rows1 == 1 || $num_rows2 == 1) {
if ($num_rows2 == 1) {
$res = mysqli_fetch_assoc($result2);
$user = $res['username'];
}
$_SESSION['user'] = $user;
echo "<meta http-equiv='refresh' content='0; url=productHome.php'>";
} else {
echo "\n\t\t\t\t\t\t<script type = 'text/javascript'>\n\t\t\t\t\t\tdocument.getElementById('nouser').innerHTML = 'User Not Found, Please Try Again..';\n\t\t\t\t\t\t</script>\n\t\t\t\t\t";
示例7: encryptIt
?>
</th>
</tr>
</thead>
<tbody>
<?php
$idPersonaEncriptado = '';
if (isset($resultado)) {
$idPersonaEncriptado = encryptIt($resultado['idProveedor']);
$archivos = $resultado['archivos'];
$contador = 0;
foreach ($archivos as $file) {
$idEmpresa = $this->session->userdata('logged_in')['idEmpresa'];
$idPersona = $file['idPersona'];
$idPersonaEncriptado = encryptIt($file['idPersona']);
$idEncriptado = encryptIt($file['idArchivoPersona']);
?>
<tr id="fila<?php
echo $contador;
?>
" data-idElemento="<?php
echo $idEncriptado;
?>
">
<td style="text-align: center;">
<input type="checkbox" class="filled-in checkbox-file" id="<?php
echo $idEncriptado;
?>
"/>
<label for="<?php
echo $idEncriptado;
示例8: alertBox
$msgBox = alertBox($accountPassReq, "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($currentPass != $_POST['passwordOld']) {
$msgBox = alertBox($accountPassError, "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['password'] == '') {
$msgBox = alertBox($accountNewPass, "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['password_r'] == '') {
$msgBox = alertBox($retypeAccountPass, "<i class='fa fa-times-circle'></i>", "danger");
} else {
if ($_POST['password'] != $_POST['password_r']) {
$msgBox = alertBox($accountPassNotMatch, "<i class='fa fa-times-circle'></i>", "danger");
} else {
if (isset($_POST['password']) && $_POST['password'] != "") {
$password = encryptIt($_POST['password']);
} else {
$password = $_POST['passwordOld'];
}
$stmt = $mysqli->prepare("UPDATE\n\t\t\t\t\t\t\t\t\t\tclients\n\t\t\t\t\t\t\t\t\tSET\n\t\t\t\t\t\t\t\t\t\tpassword = ?\n\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t\tclientId = ?");
$stmt->bind_param('ss', $password, $clientId);
$stmt->execute();
$msgBox = alertBox($accountPassUpdatedMsg, "<i class='fa fa-check-square'></i>", "success");
$stmt->close();
}
}
}
}
}
}
// Get Data
示例9: array
<?php
require_once 'support/config.php';
// var_dump($_POST);
// die;
if (!empty($_POST)) {
$user = $con->myQuery("SELECT first_name,middle_name,last_name,id,location_id,user_type_id as user_type,location_id,is_login,is_active,password_question FROM users WHERE BINARY username=? AND BINARY password=? AND is_deleted=0", array($_POST['username'], encryptIt($_POST['password'])))->fetch(PDO::FETCH_ASSOC);
if (!empty($_SESSION[WEBAPP]['attempt_no']) && $_SESSION[WEBAPP]['attempt_no'] > 1) {
Alert("Maximum login attempts achieved. <br/>Your account will be deactivated. </br> Contact your system administrator to retreive your password.", "danger");
unset($_SESSION[WEBAPP]['attempt_no']);
$con->myQuery("UPDATE users SET is_active=0 WHERE username=?", array($_POST['username']));
redirect("frmlogin.php");
die;
}
if (empty($user)) {
Alert("Invalid Username/Password", "danger");
redirect('frmlogin.php');
if (!empty($_SESSION[WEBAPP]['attempt_no'])) {
// setcookie("attempt_no",$_SESSION[WEBAPP]['attempt_no']+1,time()+(3600));
$_SESSION[WEBAPP]['attempt_no'] += 1;
} else {
$_SESSION[WEBAPP]['attempt_no'] = 1;
}
} else {
if ($user['is_login'] == 0) {
if ($user['is_active'] == 1) {
unset($_SESSION[WEBAPP]['attempt_no']);
$con->myQuery("UPDATE users SET is_login=1 WHERE id=?", array($user['id']));
$user['password_question'] = !empty($user['password_question']);
$_SESSION[WEBAPP]['user'] = $user;
refresh_activity($_SESSION[WEBAPP]['user']['id']);
示例10: alertBox
$msgBox = alertBox($accountEmailReq, "<i class='fa fa-times-circle'></i>", "danger");
} else {
$query = "SELECT empEmail FROM employees WHERE empEmail = ?";
$stmt = $mysqli->prepare($query);
$stmt->bind_param("s", $theEmail);
$stmt->execute();
$stmt->bind_result($empEmail);
$stmt->store_result();
$numrows = $stmt->num_rows();
if ($numrows == 1) {
// Generate a RANDOM Hash for a password
$randomPassword = uniqid(rand());
// Take the first 8 digits and use them as the password we intend to email the Employee
$emailPassword = substr($randomPassword, 0, 8);
// Encrypt $emailPassword for the database
$newpassword = encryptIt($emailPassword);
//update password in db
$updatesql = "UPDATE employees SET password = ? WHERE empEmail = ?";
$update = $mysqli->prepare($updatesql);
$update->bind_param("ss", $newpassword, $theEmail);
$update->execute();
// Send out the email in HTML
$installUrl = $set['installUrl'];
$siteName = $set['siteName'];
$businessEmail = $set['businessEmail'];
$subject = $resetPassEmailSubject;
$message = '<html><body>';
$message .= '<h3>' . $subject . '</h3>';
$message .= '<p>' . $resetPassEmail1 . '</p>';
$message .= '<hr>';
$message .= '<p>' . $emailPassword . '</p>';
示例11: label
echo label('Cliente_tablaCotizador');
?>
</th> -->
<th><?php
echo label('Cliente_tablaOpciones');
?>
</th>
</tr>
</thead>
<tbody>
<?php
if (isset($lista)) {
if ($lista !== false) {
$contador = 0;
foreach ($lista as $fila) {
$idEncriptado = encryptIt($fila['idCliente']);
$juridico = $fila['juridico'];
?>
<tr id="fila<?php
echo $contador;
?>
" data-idElemento="<?php
echo $idEncriptado;
?>
">
<td style="text-align: center;">
<input type="checkbox" class="filled-in checkbox"
id="<?php
echo $idEncriptado;
?>
"/>
示例12: VALUES
$avatarTypes = $mysqli->real_escape_string($_POST['avatarTypes']);
// Add data to the siteSettings Table
$stmt = $mysqli->prepare("\n\t\t\t\t\t\t\t\t\tINSERT INTO\n\t\t\t\t\t\t\t\t\t\tsitesettings(\n\t\t\t\t\t\t\t\t\t\t\tinstallUrl,\n\t\t\t\t\t\t\t\t\t\t\tsiteName,\n\t\t\t\t\t\t\t\t\t\t\tbusinessName,\n\t\t\t\t\t\t\t\t\t\t\tbusinessAddress,\n\t\t\t\t\t\t\t\t\t\t\tbusinessEmail,\n\t\t\t\t\t\t\t\t\t\t\tbusinessPhone,\n\t\t\t\t\t\t\t\t\t\t\tuploadPath,\n\t\t\t\t\t\t\t\t\t\t\ttemplatesPath,\n\t\t\t\t\t\t\t\t\t\t\tfileTypesAllowed,\n\t\t\t\t\t\t\t\t\t\t\tavatarFolder,\n\t\t\t\t\t\t\t\t\t\t\tavatarTypes\n\t\t\t\t\t\t\t\t\t\t) VALUES (\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?\n\t\t\t\t\t\t\t\t\t\t)");
$stmt->bind_param('sssssssssss', $installUrl, $siteName, $businessName, $businessAddress, $businessEmail, $businessPhone, $uploadPath, $templatesPath, $fileTypesAllowed, $avatarFolder, $avatarTypes);
$stmt->execute();
$stmt->close();
$adminEmail = $mysqli->real_escape_string($_POST['adminEmail']);
$password = $mysqli->real_escape_string($_POST['password']);
$adminFirstName = $mysqli->real_escape_string($_POST['adminFirstName']);
$adminLastName = $mysqli->real_escape_string($_POST['adminLastName']);
$hash = md5(rand(0, 1000));
$isAdmin = $isActive = '1';
$adminRole = 'Site Administrator';
$createDate = date("Y-m-d H:i:s");
// Encrypt Password
$newPassword = encryptIt($password);
// Add the new Admin Account
$stmt = $mysqli->prepare("\n\t\t\t\t\t\t\t\t\tINSERT INTO\n\t\t\t\t\t\t\t\t\t\tadmins(\n\t\t\t\t\t\t\t\t\t\t\tadminEmail,\n\t\t\t\t\t\t\t\t\t\t\tpassword,\n\t\t\t\t\t\t\t\t\t\t\tadminFirstName,\n\t\t\t\t\t\t\t\t\t\t\tadminLastName,\n\t\t\t\t\t\t\t\t\t\t\tcreateDate,\n\t\t\t\t\t\t\t\t\t\t\thash,\n\t\t\t\t\t\t\t\t\t\t\tisAdmin,\n\t\t\t\t\t\t\t\t\t\t\tadminRole,\n\t\t\t\t\t\t\t\t\t\t\tisActive\n\t\t\t\t\t\t\t\t\t\t) VALUES (\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?,\n\t\t\t\t\t\t\t\t\t\t\t?\n\t\t\t\t\t\t\t\t\t\t)");
$stmt->bind_param('sssssssss', $adminEmail, $newPassword, $adminFirstName, $adminLastName, $createDate, $hash, $isAdmin, $adminRole, $isActive);
$stmt->execute();
$stmt->close();
if (is_file('../config.php')) {
include '../config.php';
// Get Settings Data
$settingsql = "SELECT installUrl, siteName, businessEmail FROM sitesettings";
$settingres = mysqli_query($mysqli, $settingsql) or die('-2' . mysqli_error());
$set = mysqli_fetch_assoc($settingres);
// Get Admin Data
$adminsql = "SELECT adminEmail, adminFirstName, adminLastName FROM admins";
$adminres = mysqli_query($mysqli, $adminsql) or die('-3' . mysqli_error());
$admin = mysqli_fetch_assoc($adminres);
示例13: verificar
public function verificar()
{
$data['correo'] = $this->input->post('username');
$data['contrasena'] = $this->input->post('password');
$rememberLogin = 0;
if ($this->input->post('remember-me')) {
$rememberLogin = 1;
}
$resultado = $this->Usuario_model->cargarPorCorreoUsuarioContrasena($data);
if ($resultado == 0) {
echo 0;
//Error en la transacci�n
} else {
if ($resultado == 1) {
echo 1;
//no encontrado
} else {
if ($resultado == 2) {
echo 2;
//si encontrado pero contrasena mala
} else {
if ($rememberLogin) {
$this->input->set_cookie('logged_in_touch', $data['correo'], 2592000);
}
$idUsuario = $resultado['idUsuario'];
$idEmpresa = $resultado['idEmpresa'];
$resultado_datos = $this->Usuario_model->datosPerfil($idUsuario);
$sess_array = array('idEmpresa' => $idEmpresa, 'idUsuario' => $idUsuario, 'idUsuarioEncriptado' => encryptIt($idUsuario), 'nombreUsuario' => $resultado_datos['nombreUsuario'], 'rolesUsuario' => $resultado_datos['roles_string'], 'rutaImagenUsuario' => base_url() . 'files/empresas/' . $idEmpresa . '/usuarios/' . $idUsuario . '/' . $resultado_datos['fotografia'], 'administrador' => $resultado['roles']['rolAdministrador'], 'aprobador' => $resultado['roles']['rolAprobador'], 'cotizador' => $resultado['roles']['rolCotizador'], 'contador' => $resultado['roles']['rolContador']);
$this->session->set_userdata('logged_in', $sess_array);
echo 3;
//correcto
}
}
}
}
示例14: date
} else {
echo $fila['codigo'] . '-' . $fila['numero'];
}
?>
</a>
</td>
<td>
<?php
echo date("d-m-Y", strtotime($fila['fechaCreacion']));
?>
<td>
<a href="<?php
echo base_url();
?>
clientes/editar/<?php
echo encryptIt($fila['idCliente']);
?>
#tab-informacion">
<?php
echo $fila['cliente'];
?>
</a>
</td>
<!-- <td>-->
<!-- <a href="--><?php
//= base_url();
?>
<!--usuarios/editar/--><?php
//= encryptIt($fila['idUsuario'])
?>
<!--#tab-informacion">-->
示例15: label
echo label('tablaCategoriasPersona_descripcion');
?>
</th>
<th><?php
echo label('tablaCategoriasPersona_opciones');
?>
</th>
</tr>
</thead>
<tbody>
<?php
if (isset($lista)) {
if ($lista !== false) {
$contador = 0;
foreach ($lista as $fila) {
$idEncriptado = encryptIt($fila['idCategoriaPersona']);
?>
<tr id="fila<?php
echo $contador;
?>
" data-idElemento="<?php
echo $idEncriptado;
?>
">
<td style="text-align: center;">
<input type="checkbox" class="filled-in checkbox" id="<?php
echo $idEncriptado;
?>
"/>
<label for="<?php