本文整理汇总了PHP中ew_Encrypt函数的典型用法代码示例。如果您正苦于以下问题:PHP ew_Encrypt函数的具体用法?PHP ew_Encrypt怎么用?PHP ew_Encrypt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ew_Encrypt函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: Page_Main
function Page_Main()
{
global $conn;
$GLOBALS["Page"] =& $this;
//**$conn = ew_Connect();
// Global Page Loading event (in userfn*.php)
//**Page_Loading();
if (ob_get_length()) {
ob_end_clean();
}
$time = time();
$_SESSION["EW_LAST_REFRESH_TIME"] = $time;
echo ew_Encrypt($time);
// Global Page Unloaded event (in userfn*.php)
//**Page_Unloaded();
// Close connection
//**ew_CloseConn();
}
开发者ID:NoSympathy,项目名称:Dashboard,代码行数:18,代码来源:ewsession12.php
示例2: RenderListOptionsExt
function RenderListOptionsExt()
{
global $Security, $Language;
$links = "";
$btngrps = "";
$sSqlWrk = "[codigo_bodega]='" . ew_AdjustSql($this->codigo_bodega->CurrentValue) . "'";
// Column "detail_in_bodegaubicaciones"
$link = "";
$option =& $this->ListOptions->Items["detail_in_bodegaubicaciones"];
$url = "in_bodegaubicacionespreview.php?t=in_bodegas&f=" . ew_Encrypt($sSqlWrk);
$btngrp = "<div data-table=\"in_bodegaubicaciones\" data-url=\"" . $url . "\" class=\"btn-group\">";
if ($Security->IsLoggedIn()) {
$label = $Language->TablePhrase("in_bodegaubicaciones", "TblCaption");
$link = "<li><a href=\"#\" data-toggle=\"tab\" data-table=\"in_bodegaubicaciones\" data-url=\"" . $url . "\">" . $label . "</a></li>";
$links .= $link;
$detaillnk = ew_JsEncode3("in_bodegaubicacioneslist.php?" . EW_TABLE_SHOW_MASTER . "=in_bodegas&fk_codigo_bodega=" . urlencode(strval($this->codigo_bodega->CurrentValue)) . "");
$btngrp .= "<button type=\"button\" class=\"btn btn-default btn-sm\" title=\"" . $Language->TablePhrase("in_bodegaubicaciones", "TblCaption") . "\" onclick=\"window.location='" . $detaillnk . "'\">" . $Language->Phrase("MasterDetailListLink") . "</button>";
}
if ($GLOBALS["in_bodegaubicaciones_grid"]->DetailView && $Security->CanView() && $Security->IsLoggedIn()) {
$btngrp .= "<button type=\"button\" class=\"btn btn-default btn-sm\" title=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailViewLink")) . "\" onclick=\"window.location='" . $this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=in_bodegaubicaciones") . "'\">" . $Language->Phrase("MasterDetailViewLink") . "</button>";
}
$btngrp .= "</div>";
if ($link != "") {
$btngrps .= $btngrp;
$option->Body .= "<div class=\"hide ewPreview\">" . $link . $btngrp . "</div>";
}
// Hide detail items if necessary
$this->ListOptions->HideDetailItemsForDropDown();
// Column "preview"
$option =& $this->ListOptions->GetItem("preview");
if (!$option) {
// Add preview column
$option =& $this->ListOptions->Add("preview");
$option->OnLeft = FALSE;
if ($option->OnLeft) {
$option->MoveTo($this->ListOptions->ItemPos("checkbox") + 1);
} else {
$option->MoveTo($this->ListOptions->ItemPos("checkbox"));
}
$option->Visible = !($this->Export != "" || $this->CurrentAction == "gridadd" || $this->CurrentAction == "gridedit");
$option->ShowInDropDown = FALSE;
$option->ShowInButtonGroup = FALSE;
}
if ($option) {
$option->Body = "<span class=\"ewPreviewRowBtn icon-expand\"></span>";
$option->Body .= "<div class=\"hide ewPreview\">" . $links . $btngrps . "</div>";
if ($option->Visible) {
$option->Visible = $link != "";
}
}
// Column "details" (Multiple details)
$option =& $this->ListOptions->GetItem("details");
if ($option) {
$option->Body .= "<div class=\"hide ewPreview\">" . $links . $btngrps . "</div>";
if ($option->Visible) {
$option->Visible = $links != "";
}
}
}
开发者ID:erick-chali,项目名称:Ubicacion,代码行数:59,代码来源:in_bodegaslist.php
示例3: ew_Encrypt
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
$sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
?>
<input type="hidden" name="s_x<?php
echo $gastos_mantenimientos_grid->RowIndex;
?>
_id_tipo_gasto" id="s_x<?php
echo $gastos_mantenimientos_grid->RowIndex;
?>
_id_tipo_gasto" value="s=<?php
echo ew_Encrypt($sSqlWrk);
?>
&f0=<?php
echo ew_Encrypt("`codigo` = {filter_value}");
?>
&t0=3">
</span>
<?php
}
} else {
?>
<span id="el$rowindex$_gastos_mantenimientos_id_tipo_gasto" class="form-group gastos_mantenimientos_id_tipo_gasto">
<span<?php
echo $gastos_mantenimientos->id_tipo_gasto->ViewAttributes();
?>
>
<p class="form-control-static"><?php
echo $gastos_mantenimientos->id_tipo_gasto->ViewValue;
?>
开发者ID:scintes,项目名称:sistemas,代码行数:31,代码来源:gastos_mantenimientosgrid.php
示例4: Page_Main
function Page_Main()
{
global $conn, $Language, $gsFormError;
global $Breadcrumb;
$Breadcrumb = new cBreadcrumb();
$Breadcrumb->Add("forgotpwd", "<span id=\"ewPageCaption\">" . $Language->Phrase("RequestPwdPage") . "</span>", ew_CurrentUrl());
$bPostBack = ew_IsHttpPost();
$bValidEmail = FALSE;
if ($bPostBack) {
// Setup variables
$this->Email = $_POST["email"];
$bValidEmail = $this->ValidateForm($this->Email);
if ($bValidEmail) {
$this->Action = "activate";
$this->ActivateCode = ew_Encrypt($this->Email);
} else {
$this->setFailureMessage($gsFormError);
}
// Handle email activation
} elseif (@$_GET["action"] != "") {
$this->Action = $_GET["action"];
$this->Email = @$_GET["email"];
$this->ActivateCode = @$_GET["code"];
if ($this->Email != ew_Decrypt($this->ActivateCode) || strtolower($this->Action) != "confirm") {
// Email activation
if ($this->getFailureMessage() == "") {
$this->setFailureMessage($Language->Phrase("ActivateFailed"));
}
// Set activate failed message
$this->Page_Terminate("login.php");
// Go to login page
}
}
if ($this->Action != "") {
$bEmailSent = FALSE;
// Set up filter (SQL WHERE clause) and get Return SQL
// SQL constructor in usuario class, usuarioinfo.php
$sFilter = str_replace("%e", ew_AdjustSql($this->Email), EW_USER_EMAIL_FILTER);
$this->CurrentFilter = $sFilter;
$sSql = $this->SQL();
if ($RsUser = $conn->Execute($sSql)) {
if (!$RsUser->EOF) {
$rsold = $RsUser->fields;
$bValidEmail = TRUE;
// Call User Recover Password event
$bValidEmail = $this->User_RecoverPassword($rsold);
if ($bValidEmail) {
$sUserName = $rsold['usuario'];
$sPassword = $rsold['contrasenia'];
if (EW_ENCRYPTED_PASSWORD) {
if (strtolower($this->Action) == "confirm") {
$sPassword = substr($sPassword, 0, 16);
// Use first 16 characters only
$rsnew = array('contrasenia' => $sPassword);
// Reset the password
$this->Update($rsnew);
}
} else {
$this->Action = "confirm";
// Send password directly if not MD5
}
}
} else {
$bValidEmail = FALSE;
$this->setFailureMessage($Language->Phrase("InvalidEmail"));
}
if ($bValidEmail) {
$Email = new cEmail();
if (strtolower($this->Action) == "confirm") {
$Email->Load("phptxt/forgotpwd.txt");
$Email->ReplaceContent('<!--$Password-->', $sPassword);
} else {
$Email->Load("phptxt/resetpwd.txt");
$sActivateLink = ew_FullUrl() . "?action=confirm";
$sActivateLink .= "&email=" . $this->Email;
$sActivateLink .= "&code=" . $this->ActivateCode;
$Email->ReplaceContent('<!--$ActivateLink-->', $sActivateLink);
}
$Email->ReplaceSender(EW_SENDER_EMAIL);
// Replace Sender
$Email->ReplaceRecipient($this->Email);
// Replace Recipient
$Email->ReplaceContent('<!--$UserName-->', $sUserName);
$Email->Charset = EW_EMAIL_CHARSET;
$Args = array();
if (EW_ENCRYPTED_PASSWORD && strtolower($this->Action) == "confirm") {
$Args["rs"] =& $rsnew;
}
if ($this->Email_Sending($Email, $Args)) {
$bEmailSent = $Email->Send();
}
}
$RsUser->Close();
}
if ($bEmailSent) {
if ($this->getSuccessMessage() == "") {
if (strtolower($this->Action) == "confirm") {
$this->setSuccessMessage($Language->Phrase("PwdEmailSent"));
} else {
$this->setSuccessMessage($Language->Phrase("ResetPwdEmailSent"));
//.........这里部分代码省略.........
开发者ID:scintes,项目名称:sistemas,代码行数:101,代码来源:forgotpwd.php
示例5: ew_Encrypt
}
if (!$GLOBALS["deudas"]->UserIDAllow("add")) {
$sWhereWrk = $GLOBALS["socios"]->AddUserIDFilter($sWhereWrk);
}
// Call Lookup selecting
$deudas->Lookup_Selecting($deudas->id_socio, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
$sSqlWrk .= " ORDER BY `propietario` DESC";
?>
<input type="hidden" name="s_x_id_socio" id="s_x_id_socio" value="s=<?php
echo ew_Encrypt($sSqlWrk);
?>
&f0=<?php
echo ew_Encrypt("`socio_nro` = {filter_value}");
?>
&t0=3">
</span>
<?php
}
echo $deudas->id_socio->CustomMsg;
?>
</div></div>
</div>
<?php
}
?>
</div>
<?php
if (in_array("detalle_deudas", explode(",", $deudas->getCurrentDetailTable())) && $detalle_deudas->DetailAdd) {
开发者ID:scintes,项目名称:sistemas,代码行数:31,代码来源:cciag_deudasadd.php
示例6: ew_Encrypt
?>
</select>
<?php
$sSqlWrk = "SELECT `idhospital`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `hospital`";
$sWhereWrk = "";
// Call Lookup selecting
$nivel->Lookup_Selecting($nivel->idhospital, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
?>
<input type="hidden" name="s_x_idhospital" id="s_x_idhospital" value="s=<?php
echo ew_Encrypt($sSqlWrk);
?>
&f0=<?php
echo ew_Encrypt("`idhospital` = {filter_value}");
?>
&t0=3">
</span>
<?php
}
echo $nivel->idhospital->CustomMsg;
?>
</div></div>
</div>
<?php
}
?>
</div>
<?php
if (in_array("sala", explode(",", $nivel->getCurrentDetailTable())) && $sala->DetailAdd) {
开发者ID:AngeloGalindo,项目名称:PracticasGrupo9DesarrolloWeb,代码行数:31,代码来源:niveladd.php
示例7: LookupFilterQuery
function LookupFilterQuery()
{
foreach ($this->LookupFilters as $key => &$value) {
if (preg_match('/^f\\d+$|^s$/', $key)) {
// "f<n>" or "s"
$value = ew_Encrypt($value);
}
// Encrypt SQL and filter
}
return http_build_query($this->LookupFilters);
}
开发者ID:NaurozAhmad,项目名称:Senho,代码行数:11,代码来源:phpfn12.php
示例8: ew_Encrypt
?>
</select>
<?php
$sSqlWrk = "SELECT `userlevelid`, `userlevelname` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `userlevels`";
$sWhereWrk = "";
// Call Lookup selecting
$userlevelpermissions->Lookup_Selecting($userlevelpermissions->userlevelid, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
?>
<input type="hidden" name="s_x_userlevelid" id="s_x_userlevelid" value="s=<?php
echo ew_Encrypt($sSqlWrk);
?>
&f0=<?php
echo ew_Encrypt("`userlevelid` = {filter_value}");
?>
&t0=3">
</span>
<?php
echo $userlevelpermissions->userlevelid->CustomMsg;
?>
</td>
</tr>
<?php
}
if ($userlevelpermissions->_tablename->Visible) {
// tablename
?>
<tr id="r__tablename">
<td><span id="elh_userlevelpermissions__tablename"><?php
开发者ID:scintes,项目名称:sistemas,代码行数:31,代码来源:cciaguserlevelpermissionsadd.php
示例9: ew_Encrypt
?>
</select>
<?php
$sSqlWrk = "SELECT `idnivel`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `nivel`";
$sWhereWrk = "";
// Call Lookup selecting
$sala->Lookup_Selecting($sala->idnivel, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
?>
<input type="hidden" name="s_x_idnivel" id="s_x_idnivel" value="s=<?php
echo ew_Encrypt($sSqlWrk);
?>
&f0=<?php
echo ew_Encrypt("`idnivel` = {filter_value}");
?>
&t0=3">
</span>
<?php
}
echo $sala->idnivel->CustomMsg;
?>
</div></div>
</div>
<?php
}
?>
</div>
<input type="hidden" data-field="x_idsala" name="x_idsala" id="x_idsala" value="<?php
echo ew_HtmlEncode($sala->idsala->CurrentValue);
开发者ID:AngeloGalindo,项目名称:PracticasGrupo9DesarrolloWeb,代码行数:31,代码来源:salaedit.php
示例10: ew_Encrypt
?>
</select>
<?php
$sSqlWrk = "SELECT `idmunicipio`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `municipio`";
$sWhereWrk = "";
// Call Lookup selecting
$hospital->Lookup_Selecting($hospital->idmunicipio, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
?>
<input type="hidden" name="s_x_idmunicipio" id="s_x_idmunicipio" value="s=<?php
echo ew_Encrypt($sSqlWrk);
?>
&f0=<?php
echo ew_Encrypt("`idmunicipio` = {filter_value}");
?>
&t0=3">
</span>
<?php
}
echo $hospital->idmunicipio->CustomMsg;
?>
</div></div>
</div>
<?php
}
?>
</div>
<?php
if (in_array("nivel", explode(",", $hospital->getCurrentDetailTable())) && $nivel->DetailAdd) {
开发者ID:AngeloGalindo,项目名称:PracticasGrupo9DesarrolloWeb,代码行数:31,代码来源:hospitaladd.php
示例11: ew_Encrypt
?>
</select>
<?php
$sSqlWrk = "SELECT `idcuenta`, `idcuenta` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `cuenta`";
$sWhereWrk = "";
// Call Lookup selecting
$internado_diario->Lookup_Selecting($internado_diario->idcuenta, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
?>
<input type="hidden" name="s_x_idcuenta" id="s_x_idcuenta" value="s=<?php
echo ew_Encrypt($sSqlWrk);
?>
&f0=<?php
echo ew_Encrypt("`idcuenta` = {filter_value}");
?>
&t0=3">
</span>
<?php
}
echo $internado_diario->idcuenta->CustomMsg;
?>
</div></div>
</div>
<?php
}
if ($internado_diario->fecha->Visible) {
// fecha
?>
<div id="r_fecha" class="form-group">
开发者ID:AngeloGalindo,项目名称:PracticasGrupo9DesarrolloWeb,代码行数:31,代码来源:internado_diarioedit.php
示例12: ew_Encrypt
?>
</select>
<?php
$sSqlWrk = "SELECT `idcontinente`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `continente`";
$sWhereWrk = "";
// Call Lookup selecting
$pais->Lookup_Selecting($pais->idcontinente, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
?>
<input type="hidden" name="s_x_idcontinente" id="s_x_idcontinente" value="s=<?php
echo ew_Encrypt($sSqlWrk);
?>
&f0=<?php
echo ew_Encrypt("`idcontinente` = {filter_value}");
?>
&t0=3">
</span>
<?php
}
echo $pais->idcontinente->CustomMsg;
?>
</div></div>
</div>
<?php
}
if ($pais->estado->Visible) {
// estado
?>
<div id="r_estado" class="form-group">
开发者ID:AngeloGalindo,项目名称:PracticasGrupo9DesarrolloWeb,代码行数:31,代码来源:paisedit.php
示例13: ew_Encrypt
" value="<?php
echo $user_add->Token;
?>
">
<?php
}
?>
<input type="hidden" name="t" value="user">
<input type="hidden" name="a_add" id="a_add" value="A">
<!-- Fields to prevent google autofill -->
<input class="hidden" type="text" name="<?php
echo ew_Encrypt(ew_Random());
?>
">
<input class="hidden" type="password" name="<?php
echo ew_Encrypt(ew_Random());
?>
">
<div>
<?php
if ($user->username->Visible) {
// username
?>
<div id="r_username" class="form-group">
<label id="elh_user_username" for="x_username" class="col-sm-2 control-label ewLabel"><?php
echo $user->username->FldCaption();
echo $Language->Phrase("FieldRequiredIndicator");
?>
</label>
<div class="col-sm-10"><div<?php
echo $user->username->CellAttributes();
开发者ID:ahmarmahmood,项目名称:tabedaar,代码行数:31,代码来源:useradd.php
示例14: ew_Encrypt
$in_bodegaubicaciones->Lookup_Selecting($in_bodegaubicaciones->Seccion_id, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
?>
<input type="hidden" name="s_x<?php
echo $in_bodegaubicaciones_grid->RowIndex;
?>
_Seccion_id" id="s_x<?php
echo $in_bodegaubicaciones_grid->RowIndex;
?>
_Seccion_id" value="s=<?php
echo ew_Encrypt($sSqlWrk);
?>
&f0=<?php
echo ew_Encrypt("[Seccion_Id] = {filter_value}");
?>
&t0=3">
</span>
<?php
} else {
?>
<span id="el$rowindex$_in_bodegaubicaciones_Seccion_id" class="form-group in_bodegaubicaciones_Seccion_id">
<span<?php
echo $in_bodegaubicaciones->Seccion_id->ViewAttributes();
?>
>
<p class="form-control-static"><?php
echo $in_bodegaubicaciones->Seccion_id->ViewValue;
?>
</p></span>
开发者ID:erick-chali,项目名称:Ubicacion,代码行数:31,代码来源:in_bodegaubicacionesgrid.php
示例15: Page_Main
function Page_Main()
{
global $UserTableConn, $Language, $gsFormError;
global $Breadcrumb;
$Breadcrumb = new cBreadcrumb();
$Breadcrumb->Add("forgotpwd", "RequestPwdPage", ew_CurrentUrl(), "", "", TRUE);
$bPostBack = ew_IsHttpPost();
$bValidEmail = FALSE;
if ($bPostBack) {
// Setup variables
$this->Email = $_POST["email"];
$bValidEmail = $this->ValidateForm($this->Email);
if ($bValidEmail) {
if (EW_ENCRYPTED_PASSWORD) {
$this->Action = "reset";
} else {
$this->Action = "confirm";
}
// Send password directly if not MD5
$this->ActivateCode = ew_Encrypt($this->Email);
} else {
$this->setFailureMessage($gsFormError);
}
// Handle email activation
} elseif (@$_GET["action"] != "") {
$this->Action = $_GET["action"];
$this->Email = @$_GET["email"];
$this->ActivateCode = @$_GET["code"];
if ($this->Email != ew_Decrypt($this->ActivateCode) || strtolower($this->Action) != "confirm" && strtolower($this->Action) != "reset") {
// Email activation
if ($this->getFailureMessage() == "") {
$this->setFailureMessage($Language->Phrase("ActivateFailed"));
}
// Set activate failed message
$this->Page_Terminate("login.php");
// Go to login page
}
if (strtolower($this->Action) == "reset") {
$this->Action = "resetpassword";
}
}
if ($this->Action != "") {
$bEmailSent = FALSE;
// Set up filter (SQL WHERE clause) and get Return SQL
// SQL constructor in user class, userinfo.php
$sFilter = str_replace("%e", ew_AdjustSql($this->Email, EW_USER_TABLE_DBID), EW_USER_EMAIL_FILTER);
$this->CurrentFilter = $sFilter;
$sSql = $this->SQL();
if ($RsUser = $UserTableConn->Execute($sSql)) {
if (!$RsUser->EOF) {
$rsold = $RsUser->fields;
$bValidEmail = TRUE;
// Call User Recover Password event
$bValidEmail = $this->User_RecoverPassword($rsold);
if ($bValidEmail) {
$sUserName = $rsold['CODE'];
$sPassword = $rsold['PASS'];
}
} else {
$bValidEmail = FALSE;
$this->setFailureMessage($Language->Phrase("InvalidEmail"));
}
$RsUser->Close();
if ($bValidEmail) {
if (strtolower($this->Action) == "resetpassword") {
// Reset password
$_SESSION[EW_SESSION_USER_PROFILE_USER_NAME] = $sUserName;
// Save login user name
$_SESSION[EW_SESSION_STATUS] = "passwordreset";
$this->Page_Terminate("changepwd.php");
} else {
$Email = new cEmail();
if (strtolower($this->Action) == "confirm") {
$Email->Load(EW_EMAIL_FORGOTPWD_TEMPLATE);
$Email->ReplaceContent('<!--$Password-->', $sPassword);
} else {
$Email->Load(EW_EMAIL_RESETPWD_TEMPLATE);
$sActivateLink = ew_FullUrl() . "?action=reset";
$sActivateLink .= "&email=" . $this->Email;
$sActivateLink .= "&code=" . $this->ActivateCode;
$Email->ReplaceContent('<!--$ActivateLink-->', $sActivateLink);
}
$Email->ReplaceSender(EW_SENDER_EMAIL);
// Replace Sender
$Email->ReplaceRecipient($this->Email);
// Replace Recipient
$Email->ReplaceContent('<!--$UserName-->', $sUserName);
$Args = array();
if (EW_ENCRYPTED_PASSWORD && strtolower($this->Action) == "confirm") {
$Args["rs"] =& $rsnew;
}
if ($this->Email_Sending($Email, $Args)) {
$bEmailSent = $Email->Send();
}
}
}
}
if ($bEmailSent) {
if ($this->getSuccessMessage() == "") {
if (strtolower($this->Action) == "confirm") {
//.........这里部分代码省略.........
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:101,代码来源:forgotpwd.php
示例16: ew_Encrypt
$medicina->Lookup_Selecting($medicina->idlaboratorio, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
?>
<input type="hidden" name="s_x<?php
echo $medicina_grid->RowIndex;
?>
_idlaboratorio" id="s_x<?php
echo $medicina_grid->RowIndex;
?>
_idlaboratorio" value="s=<?php
echo ew_Encrypt($sSqlWrk);
?>
&f0=<?php
echo ew_Encrypt("`idlaboratorio` = {filter_value}");
?>
&t0=3">
</span>
<?php
}
} else {
?>
<span id="el$rowindex$_medicina_idlaboratorio" class="form-group medicina_idlaboratorio">
<span<?php
echo $medicina->idlaboratorio->ViewAttributes();
?>
>
<p class="form-control-static"><?php
echo $medicina->idlaboratorio->ViewValue;
?>
开发者ID:AngeloGalindo,项目名称:PracticasGrupo9DesarrolloWeb,代码行数:31,代码来源:medicinagrid.php
示例17: ew_Encrypt
?>
</select>
<?php
$sSqlWrk = "SELECT `idespecialidad`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `especialidad`";
$sWhereWrk = "";
// Call Lookup selecting
$doctor_especialidad->Lookup_Selecting($doctor_especialidad->idespecialidad, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
?>
<input type="hidden" name="s_x_idespecialidad" id="s_x_idespecialidad" value="s=<?php
echo ew_Encrypt($sSqlWrk);
?>
&f0=<?php
echo ew_Encrypt("`idespecialidad` = {filter_value}");
?>
&t0=3">
</span>
<?php
}
echo $doctor_especialidad->idespecialidad->CustomMsg;
?>
</div></div>
</div>
<?php
}
?>
</div>
<?php
if (in_array("doctor", explode(",", $doctor_especialidad->getCurrentDetailTable())) && $doctor->DetailAdd) {
开发者ID:AngeloGalindo,项目名称:PracticasGrupo9DesarrolloWeb,代码行数:31,代码来源:doctor_especialidadadd.php
示例18: Page_Main
//.........这里部分代码省略.........
// Set activate failed message
$this->Page_Terminate("cciaglogin.php");
// Go to login page
}
switch ($this->CurrentAction) {
case "I":
// Blank record, no action required
break;
case "A":
// Add
// Check for duplicate User ID
$sFilter = str_replace("%u", ew_AdjustSql($this->usuario->CurrentValue), EW_USER_NAME_FILTER);
// Set up filter (SQL WHERE clause) and get return SQL
// SQL constructor in usuario class, usuarioinfo.php
$this->CurrentFilter = $sFilter;
$sUserSql = $this->SQL();
if ($rs = $conn->Execute($sUserSql)) {
if (!$rs->EOF) {
$bUserExists = TRUE;
$this->RestoreFormValues();
// Restore form values
$this->setFailureMessage($Language->Phrase("UserExists"));
// Set user exist message
}
$rs->Close();
}
if (!$bUserExists) {
$this->SendEmail = TRUE;
// Send email on add success
if ($this->AddRow()) {
// Add record
// Load user email
$sReceiverEmail = $this->_email->CurrentValue;
if ($sReceiverEmail == "") {
// Send to recipient directly
$sReceiverEmail = EW_RECIPIENT_EMAIL;
$sBccEmail = "";
} else {
// Bcc recipient
$sBccEmail = EW_RECIPIENT_EMAIL;
}
// Set up email content
if ($sReceiverEmail != "") {
$Email = new cEmail();
$Email->Load("phptxt/cciagregister.txt");
$Email->ReplaceSender(EW_SENDER_EMAIL);
// Replace Sender
$Email->ReplaceRecipient($sReceiverEmail);
// Replace Recipient
if ($sBccEmail != "") {
$Email->AddBcc($sBccEmail);
}
// Add Bcc
$Email->ReplaceContent('<!--FieldCaption_email-->', $this->_email->FldCaption());
$Email->ReplaceContent('<!--email-->', strval($this->_email->FormValue));
$sActivateLink = ew_FullUrl() . "?action=confirm";
$sActivateLink .= "&email=" . $this->_email->CurrentValue;
$sToken = ew_Encrypt($this->_email->CurrentValue) . "," . ew_Encrypt($this->usuario->CurrentValue) . "," . ew_Encrypt($this->contrasenia->FormValue);
$sActivateLink .= "&token=" . $sToken;
$Email->ReplaceContent("<!--ActivateLink-->", $sActivateLink);
$Email->Charset = EW_EMAIL_CHARSET;
// Get new recordset
$this->CurrentFilter = $this->KeyFilter();
$sSql = $this->SQL();
$rsnew = $conn->Execute($sSql);
$Args = array();
$Args["rs"] = $rsnew->fields;
$bEmailSent = FALSE;
if ($this->Email_Sending($Email, $Args)) {
$bEmailSent = $Email->Send();
}
// Send email failed
if (!$bEmailSent) {
$this->setFailureMessage($Email->SendErrDescription);
}
}
if ($this->getSuccessMessage() == "") {
$this->setSuccessMessage($Language->Phrase("RegisterSuccessActivate"));
}
// Activate success
$this->Page_Terminate("cciaglogin.php");
// Return
} else {
$this->RestoreFormValues();
// Restore form values
}
}
}
// Render row
if ($this->CurrentAction == "F") {
// Confirm page
$this->RowType = EW_ROWTYPE_VIEW;
// Render view
} else {
$this->RowType = EW_ROWTYPE_ADD;
// Render add
}
$this->ResetAttrs();
$this->RenderRow();
}
开发者ID:scintes,项目名称:sistemas,代码行数:101,代码来源:cciagregister.php
示例19: Page_Main
//.........这里部分代码省略.........
$this->Username = ew_RemoveXSS(ew_StripSlashes($_POST["username"]));
$sPassword = ew_RemoveXSS(ew_StripSlashes(@$_POST["password"]));
$this->LoginType = strtolower(ew_RemoveXSS(@$_POST["type"]));
} else {
if (EW_ALLOW_LOGIN_BY_URL && isset($_GET["username"])) {
$this->Username = ew_RemoveXSS(ew_StripSlashes($_GET["username"]));
$sPassword = ew_RemoveXSS(ew_StripSlashes(@$_GET["password"]));
$this->LoginType = strtolower(ew_RemoveXSS(@$_GET["type"]));
$encrypted = !empty($_GET["encrypted"]);
}
}
if ($this->Username != "") {
$bValidate = $this->ValidateForm($this->Username, $sPassword);
if (!$bValidate) {
$this->setFailureMessage($gsFormError);
}
$_SESSION[EW_SESSION_USER_LOGIN_TYPE] = $this->LoginType;
// Save user login type
$_SESSION[EW_SESSION_USER_PROFILE_USER_NAME] = $this->Username;
// Save login user name
$_SESSION[EW_SESSION_USER_PROFILE_LOGIN_TYPE] = $this->LoginType;
// Save login type
// Max login attempt checking
if ($UserProfile->ExceedLoginRetry($this->Username)) {
$bValidate = FALSE;
$this->setFailureMessage(str_replace("%t", EW_USER_PROFILE_RETRY_LOCKOUT, $Language->Phrase("ExceedMaxRetry")));
}
} else {
if ($Security->IsLoggedIn()) {
if ($this->getFailureMessage() == "") {
$this->Page_Terminate($sLastUrl);
}
// Return to last accessed page
}
$bValidate = FALSE;
// Restore settings
if (@$_COOKIE[EW_PROJECT_NAME]['Checksum'] == strval(crc32(md5(EW_RANDOM_KEY)))) {
$this->Username = ew_Decrypt(@$_COOKIE[EW_PROJECT_NAME]['Username']);
}
if (@$_COOKIE[EW_PROJECT_NAME]['AutoLogin'] == "autologin") {
$this->LoginType = "a";
} elseif (@$_COOKIE[EW_PROJECT_NAME]['AutoLogin'] == "rememberusername") {
$this->LoginType = "u";
} else {
$this->LoginType = "";
}
}
$bValidPwd = FALSE;
if ($bValidate) {
// Call Logging In event
$bValidate = $this->User_LoggingIn($this->Username, $sPassword);
if ($bValidate) {
$bValidPwd = $Security->ValidateUser($this->Username, $sPassword, FALSE, $encrypted);
// Manual login
if (!$bValidPwd) {
if ($this->getFailureMessage() == "") {
$this->setFailureMessage($Language->Phrase("InvalidUidPwd"));
}
// Invalid user id/password
}
} else {
if ($this->getFailureMessage() == "") {
$this->setFailureMessage($Language->Phrase("LoginCancelled"));
}
// Login cancelled
}
}
}
if ($bValidPwd) {
// Write cookies
if ($this->LoginType == "a") {
// Auto login
setcookie(EW_PROJECT_NAME . '[AutoLogin]', "autologin", EW_COOKIE_EXPIRY_TIME);
// Set autologin cookie
setcookie(EW_PROJECT_NAME . '[Username]', ew_Encrypt($this->Username), EW_COOKIE_EXPIRY_TIME);
// Set user name cookie
setcookie(EW_PROJECT_NAME . '[Password]', ew_Encrypt($sPassword), EW_COOKIE_EXPIRY_TIME);
// Set passw
|
请发表评论