本文整理汇总了PHP中stderr函数的典型用法代码示例。如果您正苦于以下问题:PHP stderr函数的具体用法?PHP stderr怎么用?PHP stderr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了stderr函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: parked
function parked()
{
global $CURUSER;
if ($CURUSER["parked"] == "yes") {
stderr("Error", "<b>Your account is currently parked.</b>");
}
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:7,代码来源:user_functions.php
示例2: write_staffs2
function write_staffs2()
{
global $lang;
//==ids
$t = '$INSTALLER09';
$iconfigfile = "<" . "?php\n/**\n{$lang['staffcfg_file_created']}" . date('M d Y H:i:s') . ".\n{$lang['staffcfg_mod_by']}\n**/\n";
$ri = sql_query("SELECT id, username, class FROM users WHERE class BETWEEN " . UC_STAFF . " AND " . UC_MAX . " ORDER BY id ASC") or sqlerr(__FILE__, __LINE__);
$iconfigfile .= "" . $t . "['allowed_staff']['id'] = array(";
while ($ai = mysqli_fetch_assoc($ri)) {
$ids[] = $ai['id'];
$usernames[] = "'" . $ai["username"] . "' => 1";
}
$iconfigfile .= "" . join(",", $ids);
$iconfigfile .= ");";
$iconfigfile .= "\n?" . ">";
$filenum = fopen('./cache/staff_settings.php', 'w');
ftruncate($filenum, 0);
fwrite($filenum, $iconfigfile);
fclose($filenum);
//==names
$t = '$INSTALLER09';
$nconfigfile = "<" . "?php\n/**\n{$lang['staffcfg_file_created']}" . date('M d Y H:i:s') . ".\n{$lang['staffcfg_mod_by']}\n**/\n";
$nconfigfile .= "" . $t . "['staff']['allowed'] = array(";
$nconfigfile .= "" . join(",", $usernames);
$nconfigfile .= ");";
$nconfigfile .= "\n?" . ">";
$filenum1 = fopen('./cache/staff_settings2.php', 'w');
ftruncate($filenum1, 0);
fwrite($filenum1, $nconfigfile);
fclose($filenum1);
stderr($lang['staffcfg_success'], $lang['staffcfg_updated']);
}
开发者ID:Bigjoos,项目名称:U-232-V5,代码行数:32,代码来源:staff_config.php
示例3: showLoginPasswordProtect
function showLoginPasswordProtect($error_msg)
{
stderr("Admin Login", "\n\n<html>\n<head>\n <META HTTP-EQUIV=CACHE-CONTROL CONTENT=NO-CACHE>\n <META HTTP-EQUIV=PRAGMA CONTENT=NO-CACHE>\n</head>\n<body>\n <style>\n input { border: 1px solid black; }\n </style>\n<table align=center cellpadding=2 cellspacing=2 border=1 width=90%>\n<tr>\n<td align=center class=lista>\n <form method=post>\n\n\t<div><center><font color=red><b>\n\tYou are now entering a page that needs extra login details. Be sure\n\tthat you are entering the correct information</b></center></font></div>\n</td>\n</tr>\n</table>\n <br><div align=center><font color=red size=3><b>" . $error_msg . "</b></font></div><br>\n<table align=center class=lista border=0 cellpadding=10>\n<tr>\n<td class=embedded>\n<h2><center>Login Form</center></h2>\n<table align=center class=lista border=0 cellpadding=10>\n<tr>\n<td align=right class=header>Username:</td><td class=lista><input type=input name=access_login size=40 /></td></tr>\n<tr>\n<td align=right class=header>Password:</td>\n<td class=lista><input type=password name=access_password size=40 /></td>\n</tr>\n<tr>\n<td align=left class=header>Submit :</td>\n<td align=left class=lista><center><input type=submit name=Submit value=Enter /></center></td>\n</tr>\n</table>\n</table>\n </form>\n <br>\n </div>\n</body>\n</html>\n\n<?php\n ");
stdfoot();
exit;
// stop at this point
die;
}
开发者ID:Karpec,项目名称:gizd,代码行数:8,代码来源:acp_pw.php
示例4: I_smell_a_rat
function I_smell_a_rat($var)
{
if (0 + $var == 1) {
$var = 0 + $var;
} else {
stderr($lang['bonus_error'], $lang['bonus_smellrat']);
}
}
开发者ID:Bigjoos,项目名称:U-232-V5,代码行数:8,代码来源:mybonus.php
示例5: I_smell_a_rat
function I_smell_a_rat($var)
{
if (0 + $var == 1) {
$var = 0 + $var;
} else {
stderr("Error", "I smell a rat!");
}
}
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:8,代码来源:mybonus.php
示例6: addbookmark
function addbookmark($torrentid)
{
global $CURUSER;
if (get_row_count("bookmarks", "WHERE userid={$CURUSER['id']} AND torrentid = {$torrentid}") > 0) {
stderr("Error", "Torrent already bookmarked");
}
sql_query("INSERT INTO bookmarks (userid, torrentid) VALUES ({$CURUSER['id']}, {$torrentid})") or sqlerr(__FILE__, __LINE__);
}
开发者ID:thefkboss,项目名称:U-232,代码行数:8,代码来源:bookmark.php
示例7: check
function check($id)
{
if (!is_valid_id($id)) {
return stderr("Error", "Invalid ID");
} else {
return true;
}
}
开发者ID:chenrizhi,项目名称:mtpt,代码行数:8,代码来源:maxlogin.php
示例8: validate
function validate($id)
{
global $lang;
if (!is_valid_id($id)) {
stderr($lang['failed_sorry'], "{$lang['failed_bad_id']}");
} else {
return true;
}
}
开发者ID:UniversalAdministrator,项目名称:U-232-V4,代码行数:9,代码来源:failedlogins.php
示例9: kaupa
function kaupa($PRI)
{
global $CURUSER, $lang;
if ($PRI > $CURUSER['coins']) {
stderr($lang['shop_error'], $lang['shop_notenn']);
} else {
sql_query("UPDATE users SET coins=coins-{$PRI} WHERE id={$CURUSER['id']}") or sqlerr(__FILE__, __LINE__);
}
}
开发者ID:thefkboss,项目名称:U-232,代码行数:9,代码来源:coins.php
示例10: check_banned_emails
function check_banned_emails($email)
{
$expl = explode("@", $email);
$wildemail = "*@" . $expl[1];
/* Ban emails by x0r @tbdev.net */
$res = sql_query("SELECT id, comment FROM bannedemails WHERE email = " . sqlesc($email) . " OR email = " . sqlesc($wildemail) . "") or sqlerr(__FILE__, __LINE__);
if ($arr = mysql_fetch_assoc($res)) {
stderr("Sorry..", "This email address is banned!<br /><br /><strong>Reason</strong>: {$arr['comment']}", false);
}
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:10,代码来源:user_functions.php
示例11: addbookmark
function addbookmark($torrentid)
{
global $CURUSER, $mc1, $INSTALLER09;
if (get_row_count("bookmarks", "WHERE userid=" . sqlesc($CURUSER['id']) . " AND torrentid = " . sqlesc($torrentid)) > 0) {
stderr("Error", "Torrent already bookmarked");
}
sql_query("INSERT INTO bookmarks (userid, torrentid) VALUES (" . sqlesc($CURUSER['id']) . ", " . sqlesc($torrentid) . ")") or sqlerr(__FILE__, __LINE__);
$mc1->delete_value('bookmm_' . $CURUSER['id']);
make_bookmarks($CURUSER['id'], 'bookmm_');
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:10,代码来源:bookmark.php
示例12: check_banned_emails
/**
* https://github.com/Bigjoos/
* Licence Info: GPL
* Copyright (C) 2010 U-232 v.3
* A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
* Project Leaders: Mindless, putyn.
*
*/
function check_banned_emails($email)
{
global $lang;
$expl = explode("@", $email);
$wildemail = "*@" . $expl[1];
/* Ban emails by x0r @tbdev.net */
$res = sql_query("SELECT id, comment FROM bannedemails WHERE email = " . sqlesc($email) . " OR email = " . sqlesc($wildemail)) or sqlerr(__FILE__, __LINE__);
if ($arr = mysqli_fetch_assoc($res)) {
stderr("{$lang['takesignup_user_error']}", "{$lang['takesignup_bannedmail']}" . htmlsafechars($arr['comment']));
}
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:19,代码来源:function_bemail.php
示例13: check
function check($task_name = 'Default')
{
global $CURUSER, $INSTALLER09, $lang, $_SESSION;
$returl = isset($_SERVER['HTTP_REFERER']) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : $INSTALLER09['baseurl'] . "/login.php";
$returl = str_replace('&', '&', $returl);
if (isset($_SESSION['HTTP_USER_AGENT']) && $_SESSION['HTTP_USER_AGENT'] != $_SERVER['HTTP_USER_AGENT']) {
stderr("Error", "Please resubmit the form. <a href='" . $returl . "'>Click HERE</a>", false);
}
if (isset($_SESSION['Task']) && $_SESSION['Task'] != md5('user_id:' . $CURUSER['id'] . '::taskname-' . $task_name . '::' . $_SESSION['Task_Time'])) {
stderr("Error", "Please resubmit the form. <a href='" . $returl . "'>Click HERE</a>", false);
}
$this->create();
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:13,代码来源:page_verify.php
示例14: bark
function bark($text = 'Username or password incorrect')
{
global $lang, $INSTALLER09, $mc1;
$sha = sha1($_SERVER['REMOTE_ADDR']);
$dict_key = 'dictbreaker:::' . $sha;
$flood = $mc1->get_value($dict_key);
if ($flood === false) {
$mc1->cache_value($dict_key, 'flood_check', 20);
} else {
die('Minimum 8 seconds between login attempts :)');
}
stderr($lang['tlogin_failed'], $text);
}
开发者ID:UniversalAdministrator,项目名称:U-232-V4,代码行数:13,代码来源:takelogin.php
示例15: check_admins
function check_admins($flag = true, $usertypes = "")
{
//$flag=false 表示是否为论坛版主,否则为各等级管理员;
global $lang_signin;
global $CURUSER;
if ($flag) {
if (get_user_class() < 12) {
stderr($lang_signin['std_sorry'], $lang_signin['std_permission_denied_only'] . get_user_class_name(12, false, true, true) . $lang_signin['std_or_above_can_view'], false, false, true, true);
}
} elseif ($usertypes == "admin") {
if (get_user_class() < 14) {
stderr($lang_signin['std_sorry'], $lang_signin['std_permission_denied_onlyadmin'] . get_user_class_name(14, false, true, true) . $lang_signin['std_or_admin_can_view'], false, false, true, true);
}
return true;
//不是管理员
} elseif ($usertypes == "forumman") {
//以下内容不在等级系统中
$mysql = "SELECT * FROM forummods WHERE forummods.userid = '" . $CURUSER['id'] . "'";
$res = mysql_query($mysql);
if ("" == mysql_fetch_array($res)) {
return false;
//bu是论坛版主
}
return true;
//确实是论坛版主
} elseif ($usertypes == "picker") {
$mysql = "SELECT * FROM users WHERE users.id = '" . $CURUSER['id'] . "' and users.picker = 'yes'";
$res = mysql_query($mysql);
if ("" == mysql_fetch_array($res)) {
return false;
//不是保种员
}
return true;
//确实是保种员
} elseif ($usertypes == "support") {
$mysql = "SELECT * FROM users WHERE users.id = '" . $CURUSER['id'] . "' and users.support = 'yes'";
$res = mysql_query($mysql);
if ("" == mysql_fetch_array($res)) {
return false;
//不是保种员
}
return true;
//确实是保种员
}
}
开发者ID:chenrizhi,项目名称:mtpt,代码行数:45,代码来源:signin.php
示例16: validusername
function validusername($username)
{
global $lang;
if ($username == "") {
return false;
}
$namelength = strlen($username);
if ($namelength < 3 or $namelength > 32) {
stderr($lang['takesignup_user_error'], $lang['takesignup_username_length']);
}
// The following characters are allowed in user names
$allowedchars = $lang['takesignup_allowed_chars'];
for ($i = 0; $i < $namelength; ++$i) {
if (strpos($allowedchars, $username[$i]) === false) {
return false;
}
}
return true;
}
开发者ID:CHEZDESIGN,项目名称:mytorrent,代码行数:19,代码来源:takesignup.php
示例17: takereport
function takereport($reportid, $type, $reason)
{
global $CURUSER, $lang_report, $Cache;
int_check($reportid);
// Check if takereason is set
if ($reason == '') {
stderr($lang_report['std_error'], $lang_report['std_missing_reason']);
die;
}
$res = sql_query("SELECT id FROM reports WHERE addedby = " . sqlesc($CURUSER[id]) . " AND reportid= " . sqlesc($reportid) . " AND type = " . sqlesc($type)) or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0) {
$date = sqlesc(date("Y-m-d H:i:s"));
sql_query("INSERT into reports (addedby,reportid,type,reason,added) VALUES (" . sqlesc($CURUSER[id]) . "," . sqlesc($reportid) . "," . sqlesc($type) . ", " . sqlesc(trim($reason)) . "," . $date . ")") or sqlerr(__FILE__, __LINE__);
$Cache->delete_value('staff_report_count');
$Cache->delete_value('staff_new_report_count');
stderr($lang_report['std_message'], $lang_report['std_successfully_reported']);
die;
} else {
stderr($lang_report['std_error'], $lang_report['std_already_reported_this']);
die;
}
}
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:22,代码来源:report.php
示例18: stderr
}
if (isset($_POST["unit"])) {
if ($openbet >= $maxusrbet) {
stderr($lang['gl_sorry'], "{$lang['casino_there_are_already']} " . htmlsafechars($openbet) . " {$lang['casino_bets_open_take_an_open_bet']} !");
}
if ($nobits <= 0) {
stderr($lang['gl_sorry'], " {$lang['casino_this_wont_work_enter_a_pos_val']}?");
}
if ($nobits == ".") {
stderr($lang['gl_sorry'], " {$lang['casino_this_wont_work_enter_without_a_dec']}?");
}
$newups = $CURUSER['uploaded'] - $nobits;
$debt = $nobits - $CURUSER['uploaded'];
if ($CURUSER['uploaded'] < $nobits) {
if ($alwdebt != 1) {
stderr($lang['gl_sorry'], "<h2>{$lang['casino_thats']} " . htmlsafechars(mksize($debt)) . " {$lang['casino_more_than_you_got']}!</h2>{$goback}");
}
}
$betsp = sql_query("SELECT id, amount FROM casino_bets WHERE userid = " . sqlesc($CURUSER['id']) . " ORDER BY time ASC") or sqlerr(__FILE__, __LINE__);
$tbet2 = mysqli_fetch_row($betsp);
$dummy = "<h2>{$lang['casino_bet_added_you_will_receive_a_pm_notify']}</h2>";
$user = $CURUSER['username'];
$bet = mksize($nobits);
$message = "[color=green][b]{$user}[/b][/color] {$lang['casino_has_just_placed_a']} [color=red][b]{$bet}[/b][/color] {$lang['casino_bet_in_the_casino']}";
$messages = "{$user} {$lang['casino_has_just_placed_a']} {$bet} {$lang['casino_bet_in_the_casino']}";
sql_query("INSERT INTO casino_bets ( userid, proposed, challenged, amount, time) VALUES (" . sqlesc($CURUSER['id']) . "," . sqlesc($CURUSER['username']) . ", 'empty', {$nobits}, {$time})") or sqlerr(__FILE__, __LINE__);
sql_query("UPDATE users SET uploaded = " . sqlesc($newups) . " WHERE id = " . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__);
sql_query("UPDATE casino SET deposit = deposit + " . sqlesc($nobits) . " WHERE userid = " . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__);
$update['uploaded'] = $newups;
//==stats
$mc1->begin_transaction('userstats_' . $CURUSER['id']);
开发者ID:UniversalAdministrator,项目名称:U-232-V4,代码行数:31,代码来源:casino.php
示例19: array
$id = 0 + $_GET["id"];
$points = 0 + $_GET["points"];
if (!is_valid_id($id) || !is_valid_id($points)) {
die;
}
$pointscangive = array("10", "20", "50", "100", "200", "500", "1000");
if (!in_array($points, $pointscangive)) {
stderr("Error", "You can't give that amount of points!!!");
}
$sdsa = mysql_query("SELECT 1 FROM coins WHERE torrentid=" . sqlesc($id) . " AND userid =" . sqlesc($CURUSER["id"])) or die;
$asdd = mysql_fetch_array($sdsa);
if ($asdd) {
stderr("Error", "You already gave points to this torrent.");
}
$res = mysql_query("SELECT owner,name FROM torrents WHERE id = " . sqlesc($id)) or die;
$row = mysql_fetch_assoc($res) or stderr("Error", "Torrent was not found");
$userid = $row["owner"];
if ($userid == $CURUSER["id"]) {
stderr("Error", "You can't give your self points!");
}
if ($CURUSER["seedbonus"] < $points) {
stderr("Error", "You dont have enough points");
}
mysql_query("INSERT INTO coins (userid, torrentid, points) VALUES (" . sqlesc($CURUSER["id"]) . ", " . sqlesc($id) . ", " . sqlesc($points) . ")") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE users SET seedbonus=seedbonus+" . $points . " WHERE id=" . sqlesc($userid)) or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE users SET seedbonus=seedbonus-" . $points . " WHERE id=" . sqlesc($CURUSER["id"])) or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE torrents SET points=points+" . $points . " WHERE id=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__);
$msg = sqlesc("You have been given " . $points . " points by " . $CURUSER["username"] . " for torrent [url=" . $TBDEV['baseurl'] . "/details.php?id=" . $id . "]" . $row["name"] . "[/url].");
mysql_query("INSERT INTO messages (sender, receiver, msg, added, subject) VALUES(0, {$userid}, {$msg}, " . sqlesc(time()) . ", 'You have been given a gift')") or sqlerr(__FILE__, __LINE__);
stderr("Done", "Successfully gave points to this torrent.");
开发者ID:thefkboss,项目名称:U-232,代码行数:30,代码来源:coin.php
示例20: isset
$request = isset($_POST['requesttitle']) ? $_POST['requesttitle'] : '';
if ($request == '') {
stderr("{$lang['error_error']}", "{$lang['error_title']}");
}
$cat = isset($_POST['category']) ? (int) $_POST['category'] : 0;
if (!is_valid_id($cat)) {
stderr("{$lang['error_error']}", "{$lang['error_cat']}");
}
$descrmain = isset($_POST['body']) ? $_POST['body'] : '';
if (!$descrmain) {
stderr("{$lang['error_error']}", "{$lang['error_descr']}");
}
$pic = '';
if (!empty($_POST['picture'])) {
if (!preg_match('/^https?:\\/\\/([a-zA-Z0-9\\-\\_]+\\.)+([a-zA-Z]{1,5}[^\\.])(\\/[^<>]+)+\\.(jpg|jpeg|gif|png|tif|tiff|bmp)$/i', $_POST['picture'])) {
stderr("{$lang['error_error']}", "{$lang['error_image']}");
}
$picture = $_POST['picture'];
// $picture2 = trim(urldecode($_POST['picture']));
// $headers = get_headers($picture2);
// if (strpos($headers[0], '200') === false)
// $picture = $INSTALLER09['baseurl'].'/pic/notfound.png';
$pic = "[img]" . $picture . "[/img]\n";
}
$descr = "{$pic}";
$descr .= "{$descrmain}";
$request2 = sqlesc($request);
$descr = sqlesc($descr);
sql_query("INSERT INTO requests (hits, userid, cat, request, descr, added) VALUES(1,{$CURUSER['id']}, {$cat}, {$request2}, {$descr}, " . TIME_NOW . ")") or sqlerr(__FILE__, __LINE__);
$id = mysql_insert_id();
sql_query("INSERT INTO voted_requests VALUES(0, {$id}, {$CURUSER['id']})") or sqlerr();
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:31,代码来源:new_request.php
注:本文中的stderr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论