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


PHP stderr函数代码示例

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


在下文中一共展示了stderr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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('&amp;', '&', $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


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