• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_langfolder_cookie函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: purge_neighbors_cache

function purge_neighbors_cache()
{
    global $CURUSER;
    $cachefile = "cache/" . get_langfolder_cookie() . "/neighbors/" . $CURUSER['id'] . ".html";
    if (file_exists($cachefile)) {
        unlink($cachefile);
    }
}
开发者ID:chenrizhi,项目名称:mtpt,代码行数:8,代码来源:friends.php


示例2: get_langfile_path

function get_langfile_path($script_name = "", $target = false, $lang_folder = "")
{
    global $CURLANGDIR;
    $CURLANGDIR = get_langfolder_cookie();
    if ($lang_folder == "") {
        $lang_folder = $CURLANGDIR;
    }
    return "lang/" . ($target == false ? $lang_folder : "_target") . "/lang_" . ($script_name == "" ? substr(strrchr($_SERVER['SCRIPT_NAME'], '/'), 1) : $script_name);
}
开发者ID:skygunner,项目名称:ekucms,代码行数:9,代码来源:functions.php


示例3: invite

function invite($email)
{
    global $CURUSER;
    global $SITENAME;
    global $BASEURL;
    global $SITEEMAIL;
    global $lang_takeinvite;
    $id = $CURUSER[id];
    $email = unesc(htmlspecialchars(trim($email)));
    $email = safe_email($email);
    if (!$email) {
        bark($lang_takeinvite['std_must_enter_email']);
    }
    if (!check_email($email)) {
        bark($lang_takeinvite['std_invalid_email_address']);
    }
    if (EmailBanned($email)) {
        bark($lang_takeinvite['std_email_address_banned']);
    }
    if (!EmailAllowed($email)) {
        bark($lang_takeinvite['std_wrong_email_address_domains'] . allowedemails());
    }
    $body = "\n你好,\n\n我邀请你加入 {$SITENAME}, 这是一个拥有丰富资源的非开放社区. \n如果你有兴趣加入我们请阅读规则并确认邀请.最后,确保维持一个良好的分享率 \n分享允许的资源.\n\n欢迎到来! :)\n";
    $body = str_replace("<br />", "<br />", nl2br(trim(strip_tags($body))));
    if (!$body) {
        bark($lang_takeinvite['std_must_enter_personal_message']);
    }
    // check if email addy is already in use
    $a = @mysql_fetch_row(@sql_query("select count(*) from users where email=" . sqlesc($email))) or die(mysql_error());
    if ($a[0] != 0) {
        bark($lang_takeinvite['std_email_address'] . htmlspecialchars($email) . $lang_takeinvite['std_is_in_use']);
    }
    $b = @mysql_fetch_row(@sql_query("select count(*) from invites where invitee=" . sqlesc($email))) or die(mysql_error());
    if ($b[0] != 0) {
        bark($lang_takeinvite['std_invitation_already_sent_to'] . htmlspecialchars($email) . $lang_takeinvite['std_await_user_registeration']);
    }
    $ret = sql_query("SELECT username FROM users WHERE id = " . sqlesc($id)) or sqlerr();
    $arr = mysql_fetch_assoc($ret);
    $hash = md5(mt_rand(1, 10000) . $CURUSER['username'] . TIMENOW . $CURUSER['passhash']);
    $title = $SITENAME . $lang_takeinvite['mail_tilte'];
    $message = <<<EOD
{$lang_takeinvite['mail_one']}{$arr[username]}{$lang_takeinvite['mail_two']}
<b><a href="http://{$BASEURL}/signup.php?type=invite&invitenumber={$hash}" target="_blank">{$lang_takeinvite['mail_here']}</a></b><br />
http://{$BASEURL}/signup.php?type=invite&invitenumber={$hash}
<br />{$lang_takeinvite['mail_three']}{$invite_timeout}{$lang_takeinvite['mail_four']}{$arr[username]}{$lang_takeinvite['mail_five']}<br />
{$body}
<br /><br />{$lang_takeinvite['mail_six']}
EOD;
    sent_mail($email, $SITENAME, $SITEEMAIL, change_email_encode(get_langfolder_cookie(), $title), change_email_encode(get_langfolder_cookie(), $message), "invitesignup", false, false, '', get_email_encode(get_langfolder_cookie()));
    //this email is sent only when someone give out an invitation
    sql_query("INSERT INTO invites (inviter, invitee, hash, time_invited) VALUES ('" . mysql_real_escape_string($id) . "', '" . mysql_real_escape_string($email) . "', '" . mysql_real_escape_string($hash) . "', " . sqlesc(date("Y-m-d H:i:s")) . ")");
}
开发者ID:NullYing,项目名称:mtpt,代码行数:52,代码来源:viewinvitebox.php


示例4: sqlesc

                        $updateset[] = "editsecret = " . sqlesc($sec);
                        $subject = "{$SITENAME}" . $lang_usercp['mail_profile_change_confirmation'];
                        $body = <<<EOD
{$lang_usercp['mail_change_email_one']}{$CURUSER["username"]}{$lang_usercp['mail_change_email_two']}({$email}){$lang_usercp['mail_change_email_three']}

{$lang_usercp['mail_change_email_four']}{$_SERVER["REMOTE_ADDR"]}{$lang_usercp['mail_change_email_five']}

{$lang_usercp['mail_change_email_six']}<b><a href="http://{$BASEURL}/confirmemail.php/{$CURUSER["id"]}/{$hash}/{$obemail}" target="_blank">{$lang_usercp['mail_here']}</a></b>{$lang_usercp['mail_change_email_six_1']}<br />
http://{$BASEURL}/confirmemail.php/{$CURUSER["id"]}/{$hash}/{$obemail}

{$lang_usercp['mail_change_email_seven']}

------{$lang_usercp['mail_change_email_eight']}
{$lang_usercp['mail_change_email_nine']}
EOD;
                        sent_mail($email, $SITENAME, $SITEEMAIL, change_email_encode(get_langfolder_cookie(), $subject), change_email_encode(get_langfolder_cookie(), str_replace("<br />", "<br />", nl2br($body))), "profile change", false, false, '', get_email_encode(get_langfolder_cookie()));
                        // Add comment for email change
                        /*$res = sql_query("SELECT * FROM users WHERE id = ".sqlesc($CURUSER["id"])) or sqlerr(__FILE__, __LINE__);
                        		$arr = mysql_fetch_assoc($res);
                        		$modcomment = $arr['modcomment'];*/
                        $modcomment = $CURUSER['modcomment'];
                        $modcomment = date("Y-m-d") . " - " . "change email address: " . $CURUSER["email"] . " -> " . $email . "\n" . $modcomment;
                        sql_query("UPDATE users SET modcomment = " . sqlesc($modcomment) . " WHERE id = " . $CURUSER["id"]) or sqlerr(__FILE__, __LINE__);
                    }
                    if ($privacy != "normal" && $privacy != "low" && $privacy != "strong") {
                        die("whoops");
                    }
                    $updateset[] = "privacy = " . sqlesc($privacy);
                    if ($CURUSER['privacy'] != $privacy) {
                        $privacyupdated = 1;
                    }
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:31,代码来源:usercp.php


示例5: sent_mail

{$lang_confirm_resend['mail_this_link']} </a></b><br />
http://{$BASEURL}/confirm.php?id={$id}&secret={$psecret}
{$lang_confirm_resend['mail_four_1']}
<b><a href="javascript:void(null)" onclick="window.open('http://{$BASEURL}/confirm_resend.php')">{$lang_confirm_resend['mail_here']}</a></b><br />
http://{$BASEURL}/confirm_resend.php
<br />
{$lang_confirm_resend['mail_five']}
EOD;
    sent_mail($email, $SITENAME, $SITEEMAIL, change_email_encode(get_langfolder_cookie(), $title), change_email_encode(get_langfolder_cookie(), $body), "signup", false, false, '', get_email_encode(get_langfolder_cookie()));
    header("Location: " . get_protocol_prefix() . "{$BASEURL}/ok.php?type=signup&email=" . rawurlencode($email));
} else {
    stdhead();
    $s = "<select name=\"sitelanguage\" onchange='submit()'>\n";
    $langs = langlist("site_lang");
    foreach ($langs as $row) {
        if ($row["site_lang_folder"] == get_langfolder_cookie()) {
            $se = " selected=\"selected\"";
        } else {
            $se = "";
        }
        $s .= "<option value=\"" . $row["id"] . "\" " . $se . ">" . htmlspecialchars($row["lang_name"]) . "</option>\n";
    }
    $s .= "\n</select>";
    ?>
	<form method="get" action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
">
<?php 
    print "<div align=\"right\">" . $lang_confirm_resend['text_select_lang'] . $s . "</div>";
    ?>
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:31,代码来源:confirm_resend.php


示例6: header

<?php

require_once "include/bittorrent.php";
header("Content-Type: text/html; charset=utf-8");
if (!mkglobal("username:password")) {
    die;
}
dbconn();
require_once get_langfile_path("", false, get_langfolder_cookie());
cur_user_check();
function bark($text = "")
{
    global $lang_takelogin;
    $text = $text == "" ? $lang_takelogin['std_login_fail_note'] : $text;
    stderr($lang_takelogin['std_login_fail'], $text, false);
}
if ($iv == "yes") {
    check_code($_POST['imagehash'], $_POST['imagestring'], 'login.php', true);
}
if (get_magic_quotes_gpc()) {
    $username = stripslashes($username);
}
$res = sql_query("SELECT id, passhash, secret, enabled, status FROM users WHERE username = " . "'" . mysql_real_escape_string($username) . "'");
$row = mysql_fetch_array($res);
if (!$row) {
    failedlogins();
}
if ($row['status'] == 'pending') {
    failedlogins($lang_takelogin['std_user_account_unconfirmed']);
}
if ($row["passhash"] != md5($row["secret"] . $password . $row["secret"])) {
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:31,代码来源:takelogin.php


示例7: sql_query

{$lang_takesignup['mail_this_link']} </a></b><br />
http://{$BASEURL}/confirm.php?id={$id}&secret={$psecret}
{$lang_takesignup['mail_four_1']}
<b><a href="javascript:void(null)" onclick="window.open('http://{$BASEURL}/confirm_resend.php')">{$lang_takesignup['mail_here']}</a></b><br />
http://{$BASEURL}/confirm_resend.php
<br />
{$lang_takesignup['mail_five']}
EOD;
if ($type == 'invite') {
    //don't forget to delete confirmed invitee's hash code from table invites
    sql_query("DELETE FROM invites WHERE hash = '" . mysql_real_escape_string($code) . "'");
    $dt = sqlesc(date("Y-m-d H:i:s"));
    $subject = sqlesc($lang_takesignup_target[get_user_lang($inviter)]['msg_invited_user_has_registered']);
    $msg = sqlesc($lang_takesignup_target[get_user_lang($inviter)]['msg_user_you_invited'] . $usern . $lang_takesignup_target[get_user_lang($inviter)]['msg_has_registered']);
    //sql_query("UPDATE users SET uploaded = uploaded + 10737418240 WHERE id = $inviter"); //add 10GB to invitor's uploading credit
    sql_query("INSERT INTO messages (sender, receiver, subject, added, msg) VALUES(0, {$inviter}, {$subject}, {$dt}, {$msg})") or sqlerr(__FILE__, __LINE__);
    $Cache->delete_value('user_' . $inviter . '_unread_message_count');
    $Cache->delete_value('user_' . $inviter . '_inbox_count');
}
if ($verification == 'admin') {
    if ($type == 'invite') {
        header("Location: " . get_protocol_prefix() . "{$BASEURL}/ok.php?type=inviter");
    } else {
        header("Location: " . get_protocol_prefix() . "{$BASEURL}/ok.php?type=adminactivate");
    }
} elseif ($verification == 'automatic' || $smtptype == 'none') {
    header("Location: " . get_protocol_prefix() . "{$BASEURL}/confirm.php?id={$id}&secret={$psecret}");
} else {
    sent_mail($send_email, $SITENAME, $SITEEMAIL, change_email_encode(get_langfolder_cookie(), $title), change_email_encode(get_langfolder_cookie(), $body), "signup", false, false, '', get_email_encode(get_langfolder_cookie()));
    header("Location: " . get_protocol_prefix() . "{$BASEURL}/ok.php?type=signup&email=" . rawurlencode($send_email));
}
开发者ID:skygunner,项目名称:ekucms,代码行数:31,代码来源:takesignup.php


示例8: dbconn

<?php

require_once "include/bittorrent.php";
dbconn();
$langid = 0 + $_GET['sitelanguage'];
if ($langid) {
    $lang_folder = validlang($langid);
    if (get_langfolder_cookie() != $lang_folder) {
        set_langfolder_cookie($lang_folder);
        header("Location: " . $_SERVER['PHP_SELF']);
    }
}
require_once get_langfile_path("", false, $CURLANGDIR);
failedloginscheck();
cur_user_check();
unset($returnto);
if (!empty($_GET["returnto"])) {
    $returnto = $_GET["returnto"];
    if (!$_GET["nowarn"]) {
        print "<h1>" . $lang_login['h1_not_logged_in'] . "</h1>\n";
        print "<p><b>" . $lang_login['p_error'] . "</b> " . $lang_login['p_after_logged_in'] . "</p>\n";
    }
}
//show_image_code ();
//stdhead($lang_login['head_login']);
$select = 'login';
$smarty->assign("select", $select);
$smarty->assign("show", 'no');
$signuplist = $smarty->fetch(MTPTTEMPLATES . '/signuplist.html');
$smarty->assign("signuplist", $signuplist);
$smarty->assign("returnto", $returnto);
开发者ID:NullYing,项目名称:mtpt,代码行数:31,代码来源:login.php


示例9: count

$a = @mysql_fetch_row(@sql_query("select count(*) from users where email=" . sqlesc($email))) or die(mysql_error());
if ($a[0] != 0) {
    bark($lang_takeinvite['std_email_address'] . htmlspecialchars($email) . $lang_takeinvite['std_is_in_use']);
}
$b = @mysql_fetch_row(@sql_query("select count(*) from invites where invitee=" . sqlesc($email))) or die(mysql_error());
if ($b[0] != 0) {
    bark($lang_takeinvite['std_invitation_already_sent_to'] . htmlspecialchars($email) . $lang_takeinvite['std_await_user_registeration']);
}
$ret = sql_query("SELECT username FROM users WHERE id = " . sqlesc($id)) or sqlerr();
$arr = mysql_fetch_assoc($ret);
$hash = md5(mt_rand(1, 10000) . $CURUSER['username'] . TIMENOW . $CURUSER['passhash']);
$title = $SITENAME . $lang_takeinvite['mail_tilte'];
$message = <<<EOD
{$lang_takeinvite['mail_one']}{$arr[username]}{$lang_takeinvite['mail_two']}
<b><a href="javascript:void(null)" onclick="window.open('http://{$BASEURL}/signup.php?type=invite&invitenumber={$hash}')">{$lang_takeinvite['mail_here']}</a></b><br />
http://{$BASEURL}/signup.php?type=invite&invitenumber={$hash}
<br />{$lang_takeinvite['mail_three']}{$invite_timeout}{$lang_takeinvite['mail_four']}{$arr[username]}{$lang_takeinvite['mail_five']}<br />
{$body}
<br /><br />{$lang_takeinvite['mail_six']}
EOD;
sql_query("UPDATE users SET invites = invites - 1 WHERE id = " . mysql_real_escape_string($id) . "") or sqlerr(__FILE__, __LINE__);
sql_query("INSERT INTO invites (inviter, invitee, hash, time_invited) VALUES ('" . mysql_real_escape_string($id) . "', '" . mysql_real_escape_string($email) . "', '" . mysql_real_escape_string($hash) . "', " . sqlesc(date("Y-m-d H:i:s")) . ")");
sent_mail($email, $SITENAME, $SITEEMAIL, change_email_encode(get_langfolder_cookie(), $title), change_email_encode(get_langfolder_cookie(), $message), "invitesignup", false, false, '', get_email_encode(get_langfolder_cookie()));
//this email is sent only when someone give out an invitation
header("Refresh: 0; url=invite.php?id=" . htmlspecialchars($id) . "&sent=1");
?>
 
  
    

开发者ID:chenrizhi,项目名称:mtpt,代码行数:26,代码来源:takeinvite.php


示例10: dbconn

<?php

require_once "include/bittorrent.php";
dbconn();
require_once get_langfile_path();
$id = isset($_POST['id']) ? 0 + $_POST['id'] : (isset($_GET['id']) ? 0 + $_GET['id'] : die);
int_check($id, true);
$email = unesc(htmlspecialchars(trim($_POST["email"])));
if (isset($_POST[conusr])) {
    sql_query("UPDATE users SET status = 'confirmed', editsecret = '' WHERE id IN (" . implode(", ", $_POST[conusr]) . ") AND status='pending'");
} else {
    stderr($lang_takeconfirm['std_sorry'], $lang_takeconfirm['std_no_buddy_to_confirm'] . "<a class=altlink href=invite.php?id={$CURUSER['id']}>" . $lang_takeconfirm['std_here_to_go_back'], false);
}
$title = $SITENAME . $lang_takeconfirm['mail_title'];
$body = <<<EOD
{$lang_takeconfirm['mail_content_1']}
<b><a href="javascript:void(null)" onclick="window.open('http://{$BASEURL}/login.php')">{$lang_takeconfirm['mail_here']}</a></b><br />
http://{$BASEURL}/login.php
{$lang_takeconfirm['mail_content_2']}
EOD;
//this mail is sent when the site is using admin(open/closed)/inviter(closed) confirmation and the admin/inviter confirmed the pending user
sent_mail($email, $SITENAME, $SITEEMAIL, change_email_encode(get_langfolder_cookie(), $title), change_email_encode(get_langfolder_cookie(), $body), "invite confirm", false, false, '', get_email_encode(get_langfolder_cookie()));
header("Refresh: 0; url=invite.php?id=" . htmlspecialchars($CURUSER[id]));
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:23,代码来源:takeconfirm.php


示例11: dbconn

dbconn();
require_once get_langfile_path();
loggedinorreturn();
if (get_user_class() < UC_SYSOP) {
    permissiondenied();
}
$action = isset($_POST['action']) ? htmlspecialchars($_POST['action']) : '';
if ($action == "sendmail") {
    $email = htmlspecialchars(trim($_POST['email']));
    $email = safe_email($email);
    if (!check_email($email)) {
        stderr($lang_mailtest['std_error'], $lang_mailtest['std_invalid_email_address']);
    }
    $title = $SITENAME . $lang_mailtest['text_smtp_testing_mail'];
    $body = <<<EOD
{$lang_mailtest['mail_test_mail_content']}
EOD;
    $SITENAME_ENCODE = "=?UTF-8?B?" . base64_encode($SITENAME) . "?=";
    sent_mail($email, $SITENAME_ENCODE, $SITEEMAIL, change_email_encode(get_langfolder_cookie(), $title), change_email_encode(get_langfolder_cookie(), $body), '', false, false, '', get_email_encode(get_langfolder_cookie()));
    stderr($lang_mailtest['std_success'], $lang_mailtest['std_success_note']);
} else {
    stdhead($lang_mailtest['head_mail_test']);
    print "<h1 align=\"center\">" . $lang_mailtest['text_mail_test'] . "</h1>";
    print "<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n";
    print "<form method='post' action='mailtest.php'>";
    print "<input type='hidden' name='action' value='sendmail'>";
    tr($lang_mailtest['row_enter_email'], "<input type='text' name='email' size=35><br />" . $lang_mailtest['text_enter_email_note'], 1);
    print "<tr><td colspan=\"2\" align=\"center\"><input type='submit' name='sendmail' value='" . $lang_mailtest['submit_send_it'] . "'></td></tr>";
    print "</form></table>";
    stdfoot();
}
开发者ID:chenrizhi,项目名称:mtpt,代码行数:31,代码来源:mailtest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_langs函数代码示例发布时间:2022-05-15
下一篇:
PHP get_langfile_path函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap