当前位置: 首页>>代码示例>>PHP>>正文


PHP TEAencrypt函数代码示例

本文整理汇总了PHP中TEAencrypt函数的典型用法代码示例。如果您正苦于以下问题:PHP TEAencrypt函数的具体用法?PHP TEAencrypt怎么用?PHP TEAencrypt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TEAencrypt函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: TEAencrypt

    echo $tbl_lesson_doc->doc_id->CurrentValue;
    ?>
"<?php 
    echo $wrkonchange;
    ?>
>
<?php 
    $sSqlWrk = "SELECT `doc_id`, `doc_name` FROM `tbl_doc`";
    $sWhereWrk = "`doc_name` LIKE '{query_value}%'";
    if ($sWhereWrk != "") {
        $sSqlWrk .= " WHERE " . $sWhereWrk;
    }
    $sSqlWrk .= " LIMIT " . EW_AUTO_SUGGEST_MAX_ENTRIES;
    ?>
<input type="hidden" name="q_x_doc_id" id="q_x_doc_id" value="s=<?php 
    echo TEAencrypt($sSqlWrk);
    ?>
&fn=<?php 
    echo urlencode($tbl_lesson_doc->doc_id->LookupFn);
    ?>
">
<script type="text/javascript">
var oas = new ew_AutoSuggest("x_doc_id", ftbl_lesson_docadd, false, EW_AUTO_SUGGEST_MAX_ENTRIES);
oas.formatResult = function(ar) {
	var dv = ar[1];
	for (var i = 2; i <= 4; i++)
		dv += (ar[i]) ? ew_ValueSeparator(i - 1, "x_doc_id") + ar[i] : "";
	return dv;
}
oas.ac.typeAhead = false;
ftbl_lesson_docadd.AutoSuggests["x_doc_id"] = oas;
开发者ID:huynt57,项目名称:bluebee-uet.com,代码行数:31,代码来源:tbl_lesson_docadd.php

示例2: WHERE

	<input type="text" name="sv_x_PromoCodeID" id="sv_x_PromoCodeID" value="<?php 
    echo $GiftCertificates->PromoCodeID->EditValue;
    ?>
" size="30"<?php 
    echo $GiftCertificates->PromoCodeID->EditAttributes();
    ?>
>&nbsp;<span id="em_x_PromoCodeID" class="ewMessage" style="display: none"><img src="images/alert-small.gif" alt="Value does not exist" width="16" height="16" border="0"></span>
	<div id="sc_x_PromoCodeID"></div>
</div>
<input type="hidden" name="x_PromoCodeID" id="x_PromoCodeID" value="<?php 
    echo $GiftCertificates->PromoCodeID->CurrentValue;
    ?>
">
<?php 
    $sSqlWrk = "SELECT `PromoCodeID`, `PromoCodeName` FROM `PromoCodes` WHERE (`PromoCodeName` LIKE '{query_value}%')";
    $sSqlWrk = TEAencrypt($sSqlWrk, EW_RANDOM_KEY);
    ?>
<input type="hidden" name="s_x_PromoCodeID" id="s_x_PromoCodeID" value="<?php 
    echo $sSqlWrk;
    ?>
">
<script type="text/javascript">
<!--
var oas_x_PromoCodeID = new ew_AutoSuggest("sv_x_PromoCodeID", "sc_x_PromoCodeID", "s_x_PromoCodeID", "em_x_PromoCodeID", "x_PromoCodeID", "", false);
oas_x_PromoCodeID.formatResult = function(ar) {	
	var df1 = ar[1];
	return df1;
};
oas_x_PromoCodeID.ac.typeAhead = false;

//-->
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:31,代码来源:GiftCertificatesadd.php

示例3: Page_Main

 function Page_Main()
 {
     global $Security, $Language, $UserProfile, $gsFormError;
     $sPassword = "";
     $sLastUrl = $Security->LastUrl();
     // Get last URL
     if ($sLastUrl == "") {
         $sLastUrl = "index.php";
     }
     if (IsLoggingIn()) {
         $this->Username = @$_SESSION[EW_SESSION_USER_PROFILE_USER_NAME];
         $sPassword = @$_SESSION[EW_SESSION_USER_PROFILE_PASSWORD];
         $this->LoginType = @$_SESSION[EW_SESSION_USER_PROFILE_LOGIN_TYPE];
         $bValidPwd = $Security->ValidateUser($this->Username, $sPassword, FALSE);
         if ($bValidPwd) {
             $_SESSION[EW_SESSION_USER_PROFILE_USER_NAME] = "";
             $_SESSION[EW_SESSION_USER_PROFILE_PASSWORD] = "";
             $_SESSION[EW_SESSION_USER_PROFILE_LOGIN_TYPE] = "";
         }
     } else {
         if (!$Security->IsLoggedIn()) {
             $Security->AutoLogin();
         }
         $this->Username = "";
         // Initialize
         if (@$_POST["username"] != "") {
             // Setup variables
             $this->Username = ew_RemoveXSS(ew_StripSlashes(@$_POST["username"]));
             $sPassword = ew_RemoveXSS(ew_StripSlashes(@$_POST["password"]));
             $this->LoginType = strtolower(ew_RemoveXSS(@$_POST["type"]));
         }
         if ($this->Username != "") {
             $bValidate = $this->ValidateForm($this->Username, $sPassword);
             if (!$bValidate) {
                 $this->setFailureMessage($gsFormError);
             }
             $_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
         } 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 = TEAdecrypt(@$_COOKIE[EW_PROJECT_NAME]['Username'], EW_RANDOM_KEY);
             }
             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);
                 // 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]', TEAencrypt($this->Username, EW_RANDOM_KEY), EW_COOKIE_EXPIRY_TIME);
             // Set user name cookie
             setcookie(EW_PROJECT_NAME . '[Password]', TEAencrypt($sPassword, EW_RANDOM_KEY), EW_COOKIE_EXPIRY_TIME);
             // Set password cookie
             setcookie(EW_PROJECT_NAME . '[Checksum]', crc32(md5(EW_RANDOM_KEY)), EW_COOKIE_EXPIRY_TIME);
         } elseif ($this->LoginType == "u") {
             // Remember user name
             setcookie(EW_PROJECT_NAME . '[AutoLogin]', "rememberusername", EW_COOKIE_EXPIRY_TIME);
             // Set remember user name cookie
             setcookie(EW_PROJECT_NAME . '[Username]', TEAencrypt($this->Username, EW_RANDOM_KEY), EW_COOKIE_EXPIRY_TIME);
             // Set user name cookie
             setcookie(EW_PROJECT_NAME . '[Checksum]', crc32(md5(EW_RANDOM_KEY)), EW_COOKIE_EXPIRY_TIME);
         } else {
//.........这里部分代码省略.........
开发者ID:Rastrian,项目名称:RBAC_Manager,代码行数:101,代码来源:login.php

示例4: ewrpt_AddEmailLog

function ewrpt_AddEmailLog($sender, $recipient, $subject, $message)
{
    $_SESSION[EWRPT_EXPORT_EMAIL_COUNTER]++;
    // Save to email log
    if (EWRPT_EMAIL_WRITE_LOG) {
        $dt = date("Y-m-d H:i:s");
        $ip = ewrpt_ServerVar("REMOTE_ADDR");
        $senderwrk = ewrpt_TruncateText($sender);
        $recipientwrk = ewrpt_TruncateText($recipient);
        $subjectwrk = ewrpt_TruncateText($subject);
        $messagewrk = ewrpt_TruncateText($message);
        // Save to database
        if (EWRPT_EMAIL_WRITE_LOG_TO_DATABASE) {
            global $conn;
            $sEmailSql = "INSERT INTO " . ewrpt_QuotedName(EWRPT_EMAIL_LOG_TABLE_NAME) . " (" . ewrpt_QuotedName(EWRPT_EMAIL_LOG_FIELD_NAME_DATETIME) . ", " . ewrpt_QuotedName(EWRPT_EMAIL_LOG_FIELD_NAME_IP) . ", " . ewrpt_QuotedName(EWRPT_EMAIL_LOG_FIELD_NAME_SENDER) . ", " . ewrpt_QuotedName(EWRPT_EMAIL_LOG_FIELD_NAME_RECIPIENT) . ", " . ewrpt_QuotedName(EWRPT_EMAIL_LOG_FIELD_NAME_SUBJECT) . ", " . ewrpt_QuotedName(EWRPT_EMAIL_LOG_FIELD_NAME_MESSAGE) . ") VALUES (" . ewrpt_QuotedValue($dt, EWRPT_DATATYPE_DATE) . ", " . ewrpt_QuotedValue($ip, EWRPT_DATATYPE_STRING) . ", " . ewrpt_QuotedValue($senderwrk, EWRPT_DATATYPE_STRING) . ", " . ewrpt_QuotedValue($recipientwrk, EWRPT_DATATYPE_STRING) . ", " . ewrpt_QuotedValue($subjectwrk, EWRPT_DATATYPE_STRING) . ", " . ewrpt_QuotedValue($messagewrk, EWRPT_DATATYPE_STRING) . ")";
            $conn->Execute($sEmailSql);
            // Save to log file
        } else {
            $pfx = "email";
            $sTab = "\t";
            $sHeader = "date/time" . $sTab . "ip" . $sTab . "sender" . $sTab . "recipient" . $sTab . "subject" . $sTab . "message";
            $sMsg = $dt . $sTab . $ip . $sTab . $senderwrk . $sTab . $recipientwrk . $sTab . $subjectwrk . $sTab . $messagewrk;
            $sFolder = EWRPT_UPLOAD_DEST_PATH;
            $randomkey = TEAencrypt(date("Ymd"), EWRPT_RANDOM_KEY);
            $sFn = $pfx . "_" . date("Ymd") . "_" . $randomkey . ".txt";
            $filename = ewrpt_UploadPathEx(TRUE, $sFolder) . $sFn;
            if (file_exists($filename)) {
                $fileHandler = fopen($filename, "a+b");
            } else {
                $fileHandler = fopen($filename, "a+b");
                fwrite($fileHandler, $sHeader . "\r\n");
            }
            fwrite($fileHandler, $sMsg . "\r\n");
            fclose($fileHandler);
        }
    }
}
开发者ID:asmirasurianie,项目名称:xaminer-v10,代码行数:37,代码来源:ewrfn4.php

示例5: ew_CreateQuery

function ew_CreateQuery($id, $sql)
{
    echo ew_HtmlElement("div", array("id" => $id, "class" => "ewDisplayNone"), TEAencrypt($sql));
}
开发者ID:huynt57,项目名称:bluebee-uet.com,代码行数:4,代码来源:ewshared9.php

示例6: Page_Main

 function Page_Main()
 {
     global $Security, $gsFormError;
     $sLastUrl = $Security->LastUrl();
     // Get Last Url
     if ($sLastUrl == "") {
         $sLastUrl = "index.php";
     }
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if (@$_POST["username"] != "") {
         // Setup variables
         $this->sUsername = ew_StripSlashes(@$_POST["username"]);
         $sPassword = ew_StripSlashes(@$_POST["password"]);
         $this->sLoginType = strtolower(@$_POST["rememberme"]);
         $bValidate = $this->ValidateForm($this->sUsername, $sPassword);
         if (!$bValidate) {
             $this->setMessage($gsFormError);
         }
     } else {
         if ($Security->IsLoggedIn()) {
             if ($this->getMessage() == "") {
                 $this->Page_Terminate($sLastUrl);
             }
             // Return to last accessed page
         }
         $bValidate = FALSE;
         // Restore settings
         $this->sUsername = @$_COOKIE[EW_PROJECT_NAME]['UserName'];
         if (@$_COOKIE[EW_PROJECT_NAME]['AutoLogin'] == "autologin") {
             $this->sLoginType = "a";
         } elseif (@$_COOKIE[EW_PROJECT_NAME]['AutoLogin'] == "rememberusername") {
             $this->sLoginType = "u";
         } else {
             $this->sLoginType = "";
         }
     }
     if ($bValidate) {
         $bValidPwd = FALSE;
         // Call loggin in event
         $bValidate = $this->User_LoggingIn($this->sUsername, $sPassword);
         if ($bValidate) {
             $bValidPwd = $Security->ValidateUser($this->sUsername, $sPassword);
             if (!$bValidPwd) {
                 $this->setMessage("Incorrect user ID or password");
             }
             // Invalid User ID/password
         } else {
             if ($this->getMessage() == "") {
                 $this->setMessage("Login cancelled");
             }
             // Login cancelled
         }
         if ($bValidPwd) {
             // Write cookies
             $expirytime = time() + 365 * 24 * 60 * 60;
             // Change cookie expiry time here
             if ($this->sLoginType == "a") {
                 // Auto login
                 setcookie(EW_PROJECT_NAME . '[AutoLogin]', "autologin", $expirytime);
                 // Set up autologin cookies
                 setcookie(EW_PROJECT_NAME . '[UserName]', $this->sUsername, $expirytime);
                 // Set up user name cookies
                 setcookie(EW_PROJECT_NAME . '[Password]', TEAencrypt($sPassword, EW_RANDOM_KEY), $expirytime);
                 // Set up password cookies
             } elseif ($this->sLoginType == "u") {
                 // Remember user name
                 setcookie(EW_PROJECT_NAME . '[AutoLogin]', "rememberusername", $expirytime);
                 // Set up remember user name cookies
                 setcookie(EW_PROJECT_NAME . '[UserName]', $this->sUsername, $expirytime);
                 // Set up user name cookies
             } else {
                 setcookie(EW_PROJECT_NAME . '[AutoLogin]', "", $expirytime);
                 // Clear autologin cookies
             }
             // Call loggedin event
             $this->User_LoggedIn($this->sUsername);
             $this->Page_Terminate($sLastUrl);
             // Return to last accessed URL
         } else {
             // Call user login error event
             $this->User_LoginError($this->sUsername, $sPassword);
         }
     }
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:86,代码来源:login.php

示例7: time

         $_SESSION[EW_SESSION_MESSAGE] = "Login cancelled";
     }
     // Login cancelled
 }
 //$_SESSION[EW_SESSION_SYS_ADMIN] = '5';
 if ($bValidPwd) {
     // Write cookies
     $expirytime = time() + 24 * 60 * 60;
     // Change cookie expiry time here
     if ($sLoginType == "a") {
         // Auto login
         setcookie(EW_PROJECT_NAME . '[AutoLogin]', "autologin", $expirytime);
         // Set up autologin cookies
         setcookie(EW_PROJECT_NAME . '[UserName]', $sUsername, $expirytime);
         // Set up user name cookies
         setcookie(EW_PROJECT_NAME . '[Password]', TEAencrypt($sPassword, EW_RANDOM_KEY), $expirytime);
         // Set up password cookies
     } elseif ($sLoginType == "u") {
         // Remember user name
         setcookie(EW_PROJECT_NAME . '[AutoLogin]', "rememberusername", $expirytime);
         // Set up remember user name cookies
         setcookie(EW_PROJECT_NAME . '[UserName]', $sUsername, $expirytime);
         // Set up user name cookies
     } else {
         setcookie(EW_PROJECT_NAME . '[AutoLogin]', "", $expirytime);
         // Clear autologin cookies
     }
     // Call loggedin event
     User_LoggedIn($sUsername);
     Page_Terminate('index.php');
     // Return to last accessed url
开发者ID:BGCX261,项目名称:zhss-svn-to-git,代码行数:31,代码来源:login.php


注:本文中的TEAencrypt函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。