本文整理汇总了PHP中ew_Encrypt函数的典型用法代码示例。如果您正苦于以下问题:PHP ew_Encrypt函数的具体用法?PHP ew_Encrypt怎么用?PHP ew_Encrypt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ew_Encrypt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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 != "";
}
}
}
示例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;
?>
示例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"));
//.........这里部分代码省略.........
示例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) {
示例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) {
示例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);
}
示例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
示例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);
示例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) {
示例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">
示例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">
示例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();
示例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>
示例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") {
//.........这里部分代码省略.........