本文整理汇总了PHP中get_protocol_prefix函数的典型用法代码示例。如果您正苦于以下问题:PHP get_protocol_prefix函数的具体用法?PHP get_protocol_prefix怎么用?PHP get_protocol_prefix使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_protocol_prefix函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strpos
} else {
$school = strpos($arr["ip"], ':') ? school_ip_location($arr["ip"], false) : '';
$userip = str_replace(':', '', $arr['ip']);
$guestid = substr($userip, strlen($userip) - 8);
$username = "<b title='" . $school . "'>游客" . $guestid . "</b>";
$arr2["username"] = "游客" . $guestid;
}
if ($CURUSER['timetype'] != 'timealive') {
$time = strftime("%m.%d %H:%M", $arr["date"]);
} else {
$time = get_elapsed_time($arr["date"]) . $lang_shoutbox['text_ago'];
}
$messtext = $arr["text"];
$messtext = str_replace("[@" . $CURUSER['username'] . "]", "[color=Red][b]@" . $CURUSER['username'] . "[/b][/color]", $messtext);
//将回复给自己的名字染红
// print("<tr><td class=\"shoutrow\"><span class='date'>[".$time."]</span> ".
// $del ." <span onclick=\"retuser('".$arr2["username"]."');\" style=\"cursor:pointer;\">[@]</span> ". $username." " . format_comment($messtext,1,true,true,600,true,false)."
// </td></tr>\n");
// $i++;
// }
// print("</table>");
// }
print "<div class=\"shoutrow\"> <img class=\"shoutbox_avatar\" src=" . ($arr2["avatar"] ? "'{$arr2['avatar']}'" : "'" . get_protocol_prefix() . $BASEURL . "/pic/default_avatar.png'") . " ><h3 class=\"shoutbox_main\"> <span class=\"shoutbox_del\"> " . $del . " </span> " . $username . " : <span class=\"shoutbox_content\"> " . format_comment($messtext, true, false, true, true, 600, true, false) . " </span><br> <span class='date'>[" . $time . "]</span> <span class=\"shoutbox_reply\" > <a onclick=\"retuser('" . $arr2["username"] . "');\" style=\"cursor:pointer;\" >[@]</a></span></h3></div>\n";
$i++;
}
print "</table>";
}
?>
</body>
</html>
示例2: get_searchbox_value
$showaudiocodec = $allowtorrents && get_searchbox_value($brsectiontype, 'showaudiocodec') || $allowspecial && get_searchbox_value($spsectiontype, 'showaudiocodec');
//whether show languages or not
stdhead($lang_upload['head_upload']);
?>
<form id="compose" enctype="multipart/form-data" action="takeupload.php" method="post" name="upload">
<?php
print "<p align=\"center\">" . $lang_upload['text_red_star_required'] . "</p>";
?>
<table border="1" cellspacing="0" cellpadding="5" width="940">
<tr>
<td class='colhead' colspan='2' align='center'>
<?php
echo $lang_upload['text_tracker_url'];
?>
: <b><?php
echo get_protocol_prefix() . $announce_urls[0];
?>
</b>
<?php
if (!is_writable($torrent_dir)) {
print "<br /><br /><b>ATTENTION</b>: Torrent directory isn't writable. Please contact the administrator about this problem!";
}
if (!$max_torrent_size) {
print "<br /><br /><b>ATTENTION</b>: Max. Torrent Size not set. Please contact the administrator about this problem!";
}
?>
</td>
</tr>
<?php
tr($lang_upload['row_torrent_file'] . "<font color=\"red\">*</font>", "<input type=\"file\" class=\"file\" id=\"torrent\" name=\"file\" onchange=\"getname()\" />\n", 1);
if ($altname_main == 'yes') {
示例3: elseif
} elseif ($user['enabled'] == 'no' || $user['parked'] == 'yes') {
die("account disabed or parked");
}
$oldip = $user['ip'];
$user['ip'] = getip();
$CURUSER = $user;
} else {
loggedinorreturn();
parked();
$letdown = $_GET['letdown'];
if (!$letdown && $CURUSER['showdlnotice'] == 1) {
header("Location: " . get_protocol_prefix() . "{$BASEURL}/downloadnotice.php?torrentid=" . $id . "&type=firsttime");
} elseif (!$letdown && $CURUSER['showclienterror'] == 'yes') {
header("Location: " . get_protocol_prefix() . "{$BASEURL}/downloadnotice.php?torrentid=" . $id . "&type=client");
} elseif (!$letdown && $CURUSER['leechwarn'] == 'yes') {
header("Location: " . get_protocol_prefix() . "{$BASEURL}/downloadnotice.php?torrentid=" . $id . "&type=ratio");
}
}
//User may choose to download torrent from RSS. So log ip changes when downloading torrents.
if ($iplog1 == "yes") {
if ($oldip != $CURUSER["ip"] && $CURUSER["ip"]) {
sql_query("INSERT INTO iplog (ip, userid, access) VALUES (" . sqlesc($CURUSER['ip']) . ", " . $CURUSER['id'] . ", '" . $CURUSER['last_access'] . "')");
}
}
//User may choose to download torrent from RSS. So update his last_access and ip when downloading torrents.
sql_query("UPDATE users SET last_access = " . sqlesc(date("Y-m-d H:i:s")) . ", ip = " . sqlesc($CURUSER['ip']) . " WHERE id = " . sqlesc($CURUSER['id']));
/*
@ini_set('zlib.output_compression', 'Off');
@set_time_limit(0);
if (@ini_get('output_handler') == 'ob_gzhandler' AND @ob_get_length() !== false)
示例4: str_replace
{$lang_takeupload_target[$langfolder_array[$i]]['mail_hi']}
{$lang_takeupload_target[$langfolder_array[$i]]['mail_new_torrent']}
{$lang_takeupload_target[$langfolder_array[$i]]['mail_torrent_name']}{$torrent}
{$lang_takeupload_target[$langfolder_array[$i]]['mail_torrent_size']}{$size}
{$lang_takeupload_target[$langfolder_array[$i]]['mail_torrent_category']}{$cat}
{$lang_takeupload_target[$langfolder_array[$i]]['mail_torrent_uppedby']}{$uploader}
{$lang_takeupload_target[$langfolder_array[$i]]['mail_torrent_description']}
-------------------------------------------------------------------------------------------------------------------------
{$description}
-------------------------------------------------------------------------------------------------------------------------
{$lang_takeupload_target[$langfolder_array[$i]]['mail_torrent']}<b><a href="javascript:void(null)" onclick="window.open('http://{$BASEURL}/details.php?id={$id}&hit=1')">{$lang_takeupload_target[$langfolder_array[$i]]['mail_here']}</a></b><br />
http://{$BASEURL}/details.php?id={$id}&hit=1
------{$lang_takeupload_target[$langfolder_array[$i]]['mail_yours']}
{$lang_takeupload_target[$langfolder_array[$i]]['mail_team']}
EOD;
$body_arr[$langfolder_array[$i]] = str_replace("<br />", "<br />", nl2br($body_arr[$langfolder_array[$i]]));
$i++;
}
while ($arr = mysql_fetch_array($res)) {
$current_lang = $arr["lang"];
$to = $arr["email"];
sent_mail($to, $SITENAME, $SITEEMAIL, change_email_encode(validlang($current_lang), $lang_takeupload_target[validlang($current_lang)]['mail_title'] . $torrent), change_email_encode(validlang($current_lang), $body_arr[validlang($current_lang)]), "torrent upload", false, false, '', get_email_encode(validlang($current_lang)), "eYou");
}
}
header("Location: " . get_protocol_prefix() . "{$BASEURL}/details.php?id=" . htmlspecialchars($id) . "&uploaded=1");
示例5: httperr
require_once "include/bittorrent.php";
if (!preg_match(':^/(\\d{1,10})/([\\w]{32})/(.+)$:', $_SERVER["PATH_INFO"], $matches)) {
httperr();
}
$id = 0 + $matches[1];
$md5 = $matches[2];
$email = urldecode($matches[3]);
//print($email);
//die();
if (!$id) {
httperr();
}
dbconn();
$res = sql_query("SELECT editsecret FROM users WHERE id = {$id}");
$row = mysql_fetch_array($res);
if (!$row) {
httperr();
}
$sec = hash_pad($row["editsecret"]);
if (preg_match('/^ *$/s', $sec)) {
httperr();
}
if ($md5 != md5($sec . $email . $sec)) {
httperr();
}
sql_query("UPDATE users SET editsecret='', email=" . sqlesc($email) . " WHERE id={$id} AND editsecret=" . sqlesc($row["editsecret"]));
if (!mysql_affected_rows()) {
httperr();
}
header("Refresh: 0; url=" . get_protocol_prefix() . "{$BASEURL}/usercp.php?action=security&type=saved");
示例6: stderr
</div>
</div>
<?php
}
$action = $_GET['action'];
if ($action == 'del') {
$id = 0 + $_GET['id'];
if (!$id) {
stderr($lang_admanage['std_error'], $lang_admanage['std_invalid_id']);
}
$res = sql_query("SELECT * FROM advertisements WHERE id = " . sqlesc($id) . " LIMIT 1");
if ($row = mysql_fetch_array($res)) {
sql_query("DELETE FROM advertisements WHERE id = " . sqlesc($row['id'])) or sqlerr(__FILE__, __LINE__);
}
$Cache->delete_value('current_ad_array', false);
header("Location: " . get_protocol_prefix() . $BASEURL . "/admanage.php");
die;
} elseif ($action == 'edit') {
$id = 0 + $_GET['id'];
if (!$id) {
stderr($lang_admanage['std_error'], $lang_admanage['std_invalid_id']);
} else {
$res = sql_query("SELECT * FROM advertisements WHERE id = " . sqlesc($id) . " LIMIT 1");
if (!($row = mysql_fetch_array($res))) {
stderr($lang_admanage['std_error'], $lang_admanage['std_invalid_id']);
} else {
$position = $row['position'];
stdhead($lang_admanage['head_edit_ad']);
print "<form method=\"post\" action=\"?action=submit&position=" . $position . "\">";
print "<input type=\"hidden\" name=\"isedit\" value=\"1\" />";
print "<input type=\"hidden\" name=\"id\" value=\"" . $id . "\" />";
示例7: sent_mail
$usern = $arr["username"];
$id = $arr["id"];
$title = $SITENAME . $lang_confirm_resend['mail_title'];
$body = <<<EOD
{$lang_confirm_resend['mail_one']}{$usern}{$lang_confirm_resend['mail_two']}({$email}){$lang_confirm_resend['mail_three']}{$ip}{$lang_confirm_resend['mail_four']}
<b><a href="javascript:void(null)" onclick="window.open('http://{$BASEURL}/confirm.php?id={$id}&secret={$psecret}')">
{$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
示例8: fopen
}
//move_uploaded_file($tmpname, "$torrent_dir/$id.torrent");
$fp = fopen("{$torrent_dir}/{$id}.torrent", "w");
if ($fp) {
@fwrite($fp, benc($dict), strlen(benc($dict)));
fclose($fp);
}
//===add karma
KPS("+", $uploadtorrent_bonus, $CURUSER["id"]);
//===end
write_log("Torrent {$id} ({$torrent}) was uploaded by {$anon} , by autotransfer");
//===notify people who voted on offer thanks CoLdFuSiOn :)
if ($is_offer) {
$res = sql_query("SELECT `userid` FROM `offervotes` WHERE `userid` != " . $CURUSER["id"] . " AND `offerid` = " . sqlesc($offerid) . " AND `vote` = 'yeah'") or sqlerr(__FILE__, __LINE__);
while ($row = mysql_fetch_assoc($res)) {
$pn_msg = $lang_takeupload_target[get_user_lang($row["userid"])]['msg_offer_you_voted'] . $torrent . $lang_takeupload_target[get_user_lang($row["userid"])]['msg_was_uploaded_by'] . $CURUSER["username"] . $lang_takeupload_target[get_user_lang($row["userid"])]['msg_you_can_download'] . "[url=" . get_protocol_prefix() . "{$BASEURL}/details.php?id={$id}&hit=1]" . $lang_takeupload_target[get_user_lang($row["userid"])]['msg_here'] . "[/url]";
//=== use this if you DO have subject in your PMs
$subject = $lang_takeupload_target[get_user_lang($row["userid"])]['msg_offer'] . $torrent . $lang_takeupload_target[get_user_lang($row["userid"])]['msg_was_just_uploaded'];
//=== use this if you DO NOT have subject in your PMs
//$some_variable .= "(0, $row[userid], '" . date("Y-m-d H:i:s") . "', " . sqlesc($pn_msg) . ")";
//=== use this if you DO have subject in your PMs
sql_query("INSERT INTO messages (sender, subject, receiver, added, msg) VALUES (0, " . sqlesc($subject) . ", {$row['userid']}, " . sqlesc(date("Y-m-d H:i:s")) . ", " . sqlesc($pn_msg) . ")") or sqlerr(__FILE__, __LINE__);
//=== use this if you do NOT have subject in your PMs
//sql_query("INSERT INTO messages (sender, receiver, added, msg) VALUES ".$some_variable."") or sqlerr(__FILE__, __LINE__);
//===end
}
//=== delete all offer stuff
sql_query("DELETE FROM offers WHERE id = " . $offerid);
sql_query("DELETE FROM offervotes WHERE offerid = " . $offerid);
sql_query("DELETE FROM comments WHERE offer = " . $offerid);
}
示例9: list
$count = $row[0];
$perpage = 10;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, $_SERVER["PHP_SELF"] . "?out=" . $_GET["out"] . "&");
print "<h1>BitBucket Log</h1>\n";
print "Total Images Stored: {$count}";
echo $pagertop;
$res = sql_query("SELECT * FROM bitbucket ORDER BY added DESC {$limit}") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0) {
print "<b>BitBucket Log is empty</b>\n";
} else {
print "<table align='center' border='0' cellspacing='0' cellpadding='5'>\n";
while ($arr = mysql_fetch_assoc($res)) {
$date = substr($arr['added'], 0, strpos($arr['added'], " "));
$time = substr($arr['added'], strpos($arr['added'], " ") + 1);
$name = $arr["name"];
list($width, $height, $type, $attr) = getimagesize("" . get_protocol_prefix() . "{$BASEURL}/{$bitbucket}/{$name}");
$url = str_replace(" ", "%20", htmlspecialchars("{$bitbucket}/{$name}"));
print "<tr>";
print "<td><center><a href={$url}><img src=\"" . $url . "\" border=0 onLoad='SetSize(this, 400)'></a></center>";
print "Uploaded by: " . get_username($arr[owner]) . "<br />";
print "(#{$arr['id']}) Filename: {$name} ({$width} x {$height})";
if (get_user_class() >= UC_MODERATOR) {
print " <b><a href=?delete={$arr['id']}>[Delete]</a></b><br />";
}
print "Added: {$date} {$time}";
print "</tr>";
}
print "</table>";
}
echo $pagerbottom;
stdfoot();
示例10: get_protocol_prefix
?>
<p><?php
echo $lang_login['p_forget_pass_recover'];
?>
</p>
<p><?php
echo $lang_login['p_resend_confirm'];
?>
</p>
<?php
}
if ($showhelpbox_main != 'no') {
?>
<table width="700" class="main" border="0" cellspacing="0" cellpadding="0"><tr><td class="embedded">
<h2><?php
echo $lang_login['text_helpbox'];
?>
<font class="small"> - <?php
echo $lang_login['text_helpbox_note'];
?>
<font id= "waittime" color="red"></font></h2>
<?php
print "<table width='100%' border='1' cellspacing='0' cellpadding='1'><tr><td class=\"text\">\n";
print "<iframe src='" . get_protocol_prefix() . $BASEURL . "/shoutbox.php?type=helpbox' width='650' height='180' frameborder='0' name='sbox' marginwidth='0' marginheight='0'></iframe><br /><br />\n";
print "<form action='" . get_protocol_prefix() . $BASEURL . "/shoutbox.php' id='helpbox' method='get' target='sbox' name='shbox'>\n";
print $lang_login['text_message'] . "<input type='text' id=\"hbtext\" name='shbox_text' autocomplete='off' style='width: 500px; border: 1px solid gray' ><input type='submit' id='hbsubmit' class='btn' name='shout' value=\"" . $lang_login['sumbit_shout'] . "\" /><input type='reset' class='btn' value=" . $lang_login['submit_clear'] . " /> <input type='hidden' name='sent' value='yes'><input type='hidden' name='type' value='helpbox' />\n";
print "<div id=sbword style=\"display: none\">" . $lang_login['sumbit_shout'] . "</div>";
print smile_row("shbox", "shbox_text");
print "</td></tr></table></form></td></tr></table>";
}
stdfoot();
示例11: array
<?php
$lang_linksmanage = array('head_apply_for_links' => "링크 신청하기", 'text_apply_for_links' => "링크 신청하기", 'text_rules' => "링크 교환에 대한 규칙:", 'text_rule_one' => "1. 먼저 우리 사이트의 링크 <a href=\"" . get_protocol_prefix() . $BASEURL . "\" title=\"{$SLOGAN}\" target=\"_blank\">{$SITENAME}</a> 를 님의 사이트에 올려주세요.", 'text_rule_two' => "2. 당신의 사이트는<strong>불법적인 곳이 아니어야 합니다</strong>. {$SITENAME} 사이트의 관리자는 당신의 사이트에 대한 어떤 책임도 없습니다.", 'text_rule_three' => "3. 우리 {$SITENAME} 의 모든 링크는 텍스트로만 가능합니다.", 'text_rule_four' => "4. 당신의 사이트는 하루 50명 이상 방문, 최수 200명 이상의 회원이 있어야만 합니다.", 'text_rule_five' => "5. 우리는 {$SITENAME} 의 링크를 <strong>사전 통지없이 수정, 삭제할 수 있습니다.</strong>", 'text_rule_six' => "6. 위와 같은 규정을 확인하셨다면 언제든지 {$SITENAME} 와의 링크 교환을 신청해주세요. 그렇지만 우리가 모든 요청을 받아들일 수 있을지는 모르겠습니다.", 'text_red_star_required' => "<p >빨간 별표 (<font color=red>*</font>) 로 표시된 필드는 반드시 입력하셔야 합니다.</p>\n", 'text_site_name' => "사이트 이름", 'text_url' => "URL", 'text_title' => "제목", 'text_title_note' => "이것은 링크에 대한 풍선도움말(툴팁)을 표시하는데 사용됩니다. 예. <a href='http://www.nexusphp.com' title='The Ultimate File Sharing Solution' target='_blank'><b>NexusPHP</b></a>", 'text_administrator' => "사이트 관리자", 'text_administrator_note' => "우리는 사이트 관리자의 <b>본명</b>을 알아야만 합니다.", 'text_email' => "이메일", 'text_reason' => "이유", 'submit_okay' => "확인", 'submit_reset' => "취소", 'std_error' => "에러", 'std_no_sitename' => "사이트 이름은 꼭 쓰셔야 합니다.", 'std_no_url' => "URL 은 꼭 쓰셔야 합니다.", 'std_no_admin' => "관리자는 꼭 쓰셔야 합니다. 우린 관리자의 이름을 알고 싶습니다.", 'std_no_email' => "이메일 주소도 꼭 쓰셔야 합니다.", 'std_invalid_email' => "이메일 주소가 잘못 되었습니다.", 'std_no_reason' => "입력하실 수 없는 항목이 있따면 저희에게 이유를 알려주세요.", 'std_reason_too_short' => "이유가 너무 짧네요. 좀더 자세히 얘기해주세요.", 'std_success' => "성공", 'std_success_note' => "요청하신 내용이 보내졌습니다. 이제 대답을 기다려주세요.", 'text_sitename_note' => "요청하신 사이트의 이름. 예. <i>NexusPHP</i>", 'text_url_note' => "e.g. <i>http://www.nexusphp.com</i>", 'text_email_note' => "관리자 이메일 주소", 'std_missing_form_data' => "Missing form data.", 'std_unable_creating_new_link' => "Unable to create new link.", 'std_links_manage' => "Links Manage", 'text_add_link' => "Add Link", 'text_manage_links' => "Manage Links", 'text_modify' => "Modify", 'text_edit' => "Edit", 'text_delete' => "Delete", 'text_no_links_found' => "Sorry, no links were found!", 'text_edit_link' => "Edit Link", 'js_sure_to_delete_link' => "Are you sure you want to delete this link?");
示例12: loggedinorreturn
function loggedinorreturn($mainpage = false)
{
global $CURUSER, $BASEURL;
if (!$CURUSER) {
if ($mainpage) {
header("Location: " . get_protocol_prefix() . "{$BASEURL}/login.php");
} else {
$to = $_SERVER["REQUEST_URI"];
$to = basename($to);
header("Location: " . get_protocol_prefix() . "{$BASEURL}/login.php?returnto=" . rawurlencode($to));
}
exit;
}
}
示例13: htmlspecialchars
?>
.png" /></a></div><div style="padding-top: 10px"><?php
echo $lang_promotionlink['text_bbcode_userbar_note'];
?>
</div></td></tr>
<tr><td class="colfollow"><?php
echo $lang_promotionlink['row_bbcode_userbar_alt'];
?>
</td><td class="colfollow"><textarea cols="50" rows="4"><?php
echo htmlspecialchars("[url=" . $yourlink . "][img]" . get_protocol_prefix() . $BASEURL . "/cc98bar.php/id" . $CURUSER['id'] . ".png[/img][/url]");
?>
</textarea></td><td class="colfollow"><div><a href="<?php
echo $yourlink;
?>
"><img src="<?php
echo get_protocol_prefix() . $BASEURL;
?>
/cc98bar.php/id<?php
echo $CURUSER['id'];
?>
.png" /></a></div><div style="padding-top: 10px"><?php
echo $lang_promotionlink['text_bbcode_userbar_alt_note'];
?>
</div></td></tr>
<?php
}
?>
</table>
</div>
<?php
end_frame();
示例14: sql_query
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES (0, {$userid}, {$subject}, {$msg}, {$added})") or sqlerr(__FILE__, __LINE__);
} else {
$modcomment = date("Y-m-d") . " - Upload disabled by " . $CURUSER['username'] . ".\n" . $modcomment;
$subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_upload_rights_removed']);
$msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_upload_rights_removed'] . $CURUSER['username'] . $lang_modtask_target[get_user_lang($userid)]['msg_probably_reason_two']);
$added = sqlesc(date("Y-m-d H:i:s"));
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES (0, {$userid}, {$subject}, {$msg}, {$added})") or sqlerr(__FILE__, __LINE__);
}
}
if ($downloadpos != $curdownloadpos) {
if ($downloadpos == 'yes') {
$modcomment = date("Y-m-d") . " - Download enabled by " . $CURUSER['username'] . ".\n" . $modcomment;
$subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_download_rights_restored']);
$msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_download_rights_restored'] . $CURUSER['username'] . $lang_modtask_target[get_user_lang($userid)]['msg_you_can_download']);
$added = sqlesc(date("Y-m-d H:i:s"));
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES (0, {$userid}, {$subject}, {$msg}, {$added})") or sqlerr(__FILE__, __LINE__);
} else {
$modcomment = date("Y-m-d") . " - Download disabled by " . $CURUSER['username'] . ".\n" . $modcomment;
$subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_download_rights_removed']);
$msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_download_rights_removed'] . $CURUSER['username'] . $lang_modtask_target[get_user_lang($userid)]['msg_probably_reason_three']);
$added = sqlesc(date("Y-m-d H:i:s"));
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES (0, {$userid}, {$subject}, {$msg}, {$added})") or sqlerr(__FILE__, __LINE__);
}
}
$updateset[] = "modcomment = " . sqlesc($modcomment);
sql_query("UPDATE users SET " . implode(", ", $updateset) . " WHERE id={$userid}") or sqlerr(__FILE__, __LINE__);
$returnto = htmlspecialchars($_POST["returnto"]);
header("Location: " . get_protocol_prefix() . "{$BASEURL}/{$returnto}");
die;
}
puke();
示例15: stdmsg
if ($userid == $useridgift) {
stdmsg($lang_mybonus['text_huh'], $lang_mybonus['text_karma_self_giving_warning'], 0);
stdfoot();
die;
}
if (!$useridgift) {
stdmsg($lang_mybonus['text_error'], $lang_mybonus['text_receiver_not_exists'], 0);
stdfoot();
die;
}
sql_query("UPDATE users SET seedbonus = seedbonus - {$points}, bonuscomment = " . sqlesc($bonuscomment) . " WHERE id = " . sqlesc($userid)) or sqlerr(__FILE__, __LINE__);
sql_query("UPDATE users SET seedbonus = seedbonus + {$aftertaxpoint}, bonuscomment = " . sqlesc($newreceiverbonuscomment) . " WHERE id = " . sqlesc($useridgift));
//===send message
$subject = sqlesc($lang_mybonus_target[get_user_lang($useridgift)]['msg_someone_loves_you']);
$added = sqlesc(date("Y-m-d H:i:s"));
$msg = $lang_mybonus_target[get_user_lang($useridgift)]['msg_you_have_been_given'] . $points2 . $lang_mybonus_target[get_user_lang($useridgift)]['msg_after_tax'] . $points2receiver . $lang_mybonus_target[get_user_lang($useridgift)]['msg_karma_points_by'] . $CURUSER['username'];
if ($message) {
$msg .= "\n" . $lang_mybonus_target[get_user_lang($useridgift)]['msg_personal_message_from'] . $CURUSER['username'] . $lang_mybonus_target[get_user_lang($useridgift)]['msg_colon'] . $message;
}
$msg = sqlesc($msg);
sql_query("INSERT INTO messages (sender, subject, receiver, msg, added) VALUES(0, {$subject}, {$useridgift}, {$msg}, {$added})") or sqlerr(__FILE__, __LINE__);
$usernamegift = unesc($_POST["username"]);
redirect("" . get_protocol_prefix() . "{$BASEURL}/mybonus.php?do=transfer");
} else {
print "<table width=\"940\"><tr><td class=\"colhead\" align=\"left\" colspan=\"2\"><h1>" . $lang_mybonus['text_oups'] . "</h1></td></tr>";
print "<tr><td align=\"left\"></td><td align=\"left\">" . $lang_mybonus['text_not_enough_karma'] . "<br /><br /></td></tr></table>";
}
}
}
}
stdfoot();