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

PHP special_char函数代码示例

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

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



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

示例1: strftime

     $colornamedest_endtag = "</FONT>";
     $DbColor->close();
 } else {
     $colorname_tag = "";
     $colornamedest_tag = "";
     $colorname_endtag = "";
     $colornamedest_endtag = "";
 }
 $NewMsg = "<tr align=texttop valign=top>";
 $Time = strftime(L_SHORT_DATETIME, $Time + C_TMZ_OFFSET * 60 * 60);
 if (stristr(PHP_OS, 'win') && (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese"))) {
     $Time = str_replace(" ", "", $Time);
 }
 $NewMsg .= "<td width=\"1%\" nowrap=\"nowrap\">" . $Time . "</td><td width=\"1%\" nowrap=\"nowrap\">" . $Room . "</td>";
 if ($Dest != " *" && $User != "SYS room" && $User != "SYS image" && $User != "SYS video" && $User != "SYS utube" && $User != "SYS math" && $User != "SYS topic" && $User != "SYS topic reset" && substr($User, 0, 8) != "SYS dice") {
     $User = $colorname_tag . "[" . special_char($User, $Latin1) . "]" . $colorname_endtag;
     if ($Dest != "") {
         $Dest = ">" . $colornamedest_tag . "[" . htmlspecialchars(stripslashes($Dest)) . "]" . $colornamedest_endtag;
     }
     $NewMsg .= "<td width=\"1%\" nowrap=\"nowrap\"><B>{$User}{$Dest}</B></td><td>{$Message}</td>";
 }
 if ($User == "SYS image") {
     $NewMsg .= "<td width=\"1%\" nowrap=\"nowrap\"><B>[{$Dest}]</B></td><td>" . L_PIC . " {$Dest}: <A href=" . $Message . " onMouseOver=\"window.status='" . sprintf(L_CLICK, L_FULLSIZE_PIC) . ".'; return true\" title=\"" . sprintf(L_CLICK, L_FULLSIZE_PIC) . "\" target=_blank>" . $Message . "</A></td>";
 }
 if ($User == "SYS video" || $User == "SYS utube") {
     $NewMsg .= "<td width=\"1%\" nowrap=\"nowrap\"><B>[{$Dest}]</B></td><td>" . L_VIDEO . " {$Dest}: <A href=" . $Message . " onMouseOver=\"window.status='" . sprintf(L_CLICK, L_ORIG_VIDEO) . ".'; return true\" title=\"" . sprintf(L_CLICK, L_ORIG_VIDEO) . "\" target=_blank>" . $Message . "</A></td>";
 }
 if ($User == "SYS announce") {
     if ($Message == 'L_RELOAD_CHAT') {
         $Message = L_RELOAD_CHAT;
     }
开发者ID:pradyumnasagar,项目名称:pratechsha,代码行数:31,代码来源:chatroom_extras.php


示例2: list

        list($password, $perms, $rooms) = $DbLink->next_record();
        $DbLink->clean_results();
        if ($password != $PWD_Hash || $perms != "moderator" && $perms != "admin" && $perms != "topmod" || $perms == "moderator" && (!room_in(stripslashes($R), $rooms, $Charset) && !room_in("*", $rooms, $Charset))) {
            $Error = L_NO_MODERATOR;
        } else {
            // Ensure the user to be promoted is a registered one
            $DbLink->query("SELECT latin1,perms,rooms FROM " . C_REG_TBL . " WHERE username='{$UU}' LIMIT 1");
            if ($DbLink->num_rows() == 0) {
                $Error = sprintf(L_NONREG_USER, stripslashes($UU));
                $DbLink->clean_results();
            } else {
                list($Latin1_UU, $perms, $rooms) = $DbLink->next_record();
                $DbLink->clean_results();
                // Promote the user if is not already moderator for the current room or admin
                if ($perms == "admin" || $perms == "topmod") {
                    $Error = sprintf(L_ADMIN, stripslashes($UU));
                } elseif (!room_in($R, addslashes($rooms), $Charset) && !room_in("*", addslashes($rooms), $Charset)) {
                    $rooms .= stripslashes($rooms == "" ? $R : ",{$R}");
                    $DbLink->query("UPDATE " . C_REG_TBL . " SET perms='moderator', rooms='" . addslashes($rooms) . "' WHERE username='{$UU}'");
                    $DbLink->query("UPDATE " . C_USR_TBL . " SET status='m' WHERE username='{$UU}'");
                    $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '{$R}', 'SYS promote', '{$Latin1}', " . time() . ", '', 'sprintf(L_MODERATOR, \"" . special_char($UU, $Latin1_UU) . "\")', '', '')");
                    $IsCommand = true;
                    $RefreshMessages = true;
                    $CleanUsrTbl = 1;
                } else {
                    $Error = sprintf(L_IS_MODERATOR, stripslashes($UU));
                }
            }
        }
    }
}
开发者ID:pradyumnasagar,项目名称:pratechsha,代码行数:31,代码来源:promote.cmd.php


示例3: traducir

function traducir($lineas, $origen, $destino)
{
    $traduccion = array();
    //Client ID of the application.
    $clientID = "TU ID DE CLIENTE";
    //Client Secret key of the application.
    $clientSecret = "TU ID DE APLICACION o SECRETO DE CLIENTE";
    //OAuth Url.
    $authUrl = "https://datamarket.accesscontrol.windows.net/v2/OAuth2-13/";
    //Application Scope Url
    $scopeUrl = "http://api.microsofttranslator.com";
    //Application grant type
    $grantType = "client_credentials";
    //Create the AccessTokenAuthentication object.
    $authObj = new AccessTokenAuthentication();
    //Get the Access token.
    $accessToken = $authObj->getTokens($grantType, $scopeUrl, $clientID, $clientSecret, $authUrl);
    //Create the authorization Header string.
    $authHeader = "Authorization: Bearer " . $accessToken;
    //Set the Params.
    $fromLanguage = $origen;
    $toLanguage = $destino;
    $user = 'Testuser';
    $category = "general";
    $uri = null;
    $contentType = "text/html";
    $maxTranslation = 5;
    //Input text Array.
    $inputStrArr = array(utf8_encode(html_entity_decode(special_char($lineas[0]))), utf8_encode(html_entity_decode(special_char($lineas[1]))), utf8_encode(html_entity_decode(special_char($lineas[2]))), utf8_encode(html_entity_decode(special_char($lineas[3]))), utf8_encode(html_entity_decode(special_char($lineas[4]))));
    /*print_r($inputStrArr);
    		die;*/
    //HTTP GetTranslationsArray Method Url.
    $getTranslationUrl = "http://api.microsofttranslator.com/V2/Http.svc/GetTranslationsArray";
    //Create the Translator Object.
    $translatorObj = new HTTPTranslator();
    //Get the Request XML Format.
    $requestXml = $translatorObj->createReqXML($fromLanguage, $toLanguage, $category, $contentType, $user, $inputStrArr, $maxTranslation);
    //Call HTTP Curl Request.
    $curlResponse = $translatorObj->curlRequest($getTranslationUrl, $authHeader, $requestXml);
    // Interprets a string of XML into an object.
    $xmlObj = simplexml_load_string($curlResponse);
    $translationResponse = $xmlObj->GetTranslationsResponse;
    $y = 0;
    foreach ($translationResponse as $translationArr) {
        $translationMatchArr = $translationArr->Translations->TranslationMatch;
        echo $inputStrArr[$y] . " = ";
        foreach ($translationMatchArr as $translationMatch) {
            echo $translationMatch->TranslatedText . '<br>';
            $traduccion[] = $translationMatch->TranslatedText;
        }
        $y++;
    }
    return $traduccion;
}
开发者ID:psj3120,项目名称:traductor_archivos,代码行数:54,代码来源:traductor.php


示例4: session_name

  OpenPOM

  Copyright 2010, Exosec
  Licensed under GPL Version 2.
  http://www.gnu.org/licenses/
*/
require_once "config.php";
session_name(str_replace(" ", "", $CODENAME));
session_start();
if (!isset($_SESSION['USER'])) {
    die;
}
require_once "lang.php";
require_once "query-history.php";
require_once "utils.php";
special_char();
if (!isset($_GET['id']) || !is_numeric($_GET['id']) || !isset($_GET['type']) || !isset($_GET['host']) || !isset($_GET['svc'])) {
    die('bad arguments');
}
$id = $_GET['id'];
$type = $_GET['type'];
$host = $_GET['host'];
$svc = $_GET['svc'];
$MY_GET = "&id=" . $id . "&type=" . $type . "&host=" . $host . "&svc=" . $svc;
if (!isset($_SESSION['STEP'])) {
    $MY_STEP = 100;
} else {
    $MY_STEP = $_SESSION['STEP'];
}
if (isset($_GET['first']) && is_numeric($_GET['first']) && $_GET['first'] >= 0) {
    $MY_FIRST = $_GET['first'];
开发者ID:laiello,项目名称:openpom,代码行数:31,代码来源:history.php


示例5: AddMessage

                } else {
                    // end R Dickow /away command modification addition.
                    AddMessage(stripslashes($Cmd[3]), $T, $UR, $U, $C, $Cmd[2], $Read, $R, $Charset);
                    if (stristr(mb_convert_case(trim($Cmd[2]), MB_CASE_LOWER, $Charset), mb_convert_case(C_BOT_NAME, MB_CASE_LOWER, $Charset))) {
                        include "lib/bot_priv.lib.php";
                    }
                    $IsCommand = true;
                    $RefreshMessages = true;
                }
            } elseif (stristr(mb_convert_case(trim($Cmd[2]), MB_CASE_LOWER, $Charset), mb_convert_case(C_BOT_NAME, MB_CASE_LOWER, $Charset))) {
                $Error = sprintf(L_NOT_ONLINE, special_char($Cmd[2], $Latin1));
            } else {
                $Read = "Neww";
                AddMessage(stripslashes($Cmd[3]) . " (Offline)", '1', 'Offline PMs', $U, $C, $Cmd[2], $Read, $R, $Charset);
                $IsCommand = true;
                $RefreshMessages = true;
                if (C_PRIV_POPUP) {
                    $Error = sprintf(L_PRIV_NOT_ONLINE, special_char($Cmd[2], $Latin1));
                } else {
                    $Error = sprintf(L_NOT_ONLINE, special_char($Cmd[2], $Latin1));
                }
            }
            if (C_EN_STATS) {
                $DbLink->query("UPDATE " . C_STS_TBL . " SET pms_sent=pms_sent+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='{$U}'");
            }
            $DbLink->close();
            unset($Found, $b);
            $M1 = $Cmd[0];
        }
    }
}
开发者ID:phpMyChat-Plus,项目名称:phpmychat-plus,代码行数:31,代码来源:wisp.cmd.php


示例6: special_char

				<TD VALIGN=CENTER ALIGN=CENTER>
					<INPUT TYPE="hidden" NAME="user_<?php 
        echo $usrHash;
        ?>
" VALUE="1">
					<INPUT type=checkbox name="selected_<?php 
        echo $usrHash;
        ?>
" value="1">
				</TD>
				<TD VALIGN=CENTER ALIGN="<?php 
        echo $CellAlign;
        ?>
">
					<B><?php 
        echo special_char($username, $Latin1) . "" . $bannished_user;
        ?>
</B>
				</TD>
				<TD VALIGN=CENTER ALIGN=CENTER>
					<FONT size=-2><?php 
        echo $login_counter;
        ?>
</FONT>
				</TD>
				<TD VALIGN=CENTER ALIGN="<?php 
        echo $CellAlign;
        ?>
">
					<?php 
        $regTime1 = strftime(L_SHORT_DATETIME, $regTime + C_TMZ_OFFSET * 60 * 60);
开发者ID:phpMyChat-Plus,项目名称:phpmychat-plus,代码行数:31,代码来源:admin1.php


示例7: elseif

 } elseif ($User == stripslashes($U)) {
     $User = "<a onClick=\"window.parent.userClick('" . special_char($User, $Latin1, 1) . "',false,'" . special_char($U, $Latin1, 1) . "'); return false\" title='" . L_USE_NAME . "' onMouseOver=\"window.status='" . L_USE_NAME1 . "'; return true\" CLASS=\"sender\">" . $colorname_tag . "[" . special_char($User, $Latin1, 0) . "]" . $colorname_endtag . "</a>";
 } elseif ($User == C_QUOTE_NAME) {
     $User = "<a onClick=\"window.parent.userClick('" . special_char($User, $Latin1, 1) . "',false); return false\" title='" . L_USE_NAME . "' onMouseOver=\"window.status='" . L_USE_NAME1 . "'; return true\" CLASS=\"sender\">" . $colorname_tag . "[" . special_char($User, $Latin1, 0) . "]" . $colorname_endtag . "</a>";
 }
 if ($Dest != "" && $Dest != stripslashes($U) && $Dest != C_QUOTE_NAME) {
     $Dest = htmlspecialchars(stripslashes($Dest));
     if (C_ENABLE_PM && C_PRIV_POPUP && $allowpopupu) {
         $Dest = "<a onClick=\"window.parent.send_popup('/to " . special_char($Dest, $Latin1, 1) . "');\" title='" . L_SEND_PM_1 . "' onMouseOver=\"window.status='" . L_SEND_PM_2 . "'; return true\" CLASS=\"sender\">" . $colornamedest_tag . "[" . special_char($Dest, $Latin1, 0) . "]" . $colornamedest_endtag . "</a>";
     } elseif (C_ENABLE_PM) {
         $Dest = "<a onClick=\"window.parent.userClick('" . special_char($Dest, $Latin1, 1) . "',true);\" title='" . L_SEND_PM_1 . "' onMouseOver=\"window.status='" . L_SEND_PM_2 . "'; return true\" CLASS=\"sender\">" . $colornamedest_tag . "[" . special_char($Dest, $Latin1, 0) . "]" . $colornamedest_endtag . "</a>";
     } else {
         $Dest = "<a onClick=\"window.parent.userClick('" . special_char($Dest, $Latin1, 1) . "',false); return false\" title='" . L_USE_NAME . "' onMouseOver=\"window.status='" . L_USE_NAME1 . "'; return true\" CLASS=\"sender\">" . $colornamedest_tag . "[" . special_char($Dest, $Latin1, 0) . "]" . $colornamedest_endtag . "</a>";
     }
 } elseif ($Dest == stripslashes($U)) {
     $Dest = "<a onClick=\"window.parent.userClick('" . special_char($Dest, $Latin1, 1) . "',false,'" . special_char($U, $Latin1, 1) . "'); return false\" title='" . L_USE_NAME . "' onMouseOver=\"window.status='" . L_USE_NAME1 . "'; return true\" CLASS=\"sender\">" . $colornamedest_tag . "[" . special_char($Dest, $Latin1, 0) . "]" . $colornamedest_endtag . "</a>";
 }
 if ($Dest != "") {
     $Dest = "</B><BDO dir=\"{$textDirection}\"></BDO></td><td width=\"1%\" valign=\"top\"><B>></B></td><td width=\"1%\" valign=\"top\"><B>" . $colornamedest_tag . $Dest;
 }
 // Avatar System Start:
 if (C_USE_AVATARS) {
     $avatar = "<a onClick=\"window.parent.runCmd('whois','" . special_char2(stripslashes($Userx), $Latin1) . "'); return false\" onMouseOver=\"window.status='" . L_PROFILE . ".'; return true\" title=\"" . L_PROFILE . "\"><img align=\"center\" src=\"{$avatar}\" width=" . C_AVA_WIDTH . " height=" . C_AVA_HEIGHT . " alt=\"" . L_PROFILE . "\" border=0></a>";
     if ($ST != 1) {
         $NewMsg .= "</td><td width=\"1%\" nowrap=\"nowrap\" valign=\"top\">" . $avatar . "</td><td width=\"1%\" nowrap=\"nowrap\" valign=\"top\"><B>" . $colorname_tag . "{$User}{$Dest}" . $colornamedest_endtag . "</B><BDO dir=\"{$textDirection}\"></BDO></td><td valign=\"top\">" . $Message . "</td></tr></table>";
     } else {
         $NewMsg .= $avatar . "</td><td width=\"1%\" nowrap=\"nowrap\" valign=\"top\"><B>" . $colorname_tag . "{$User}{$Dest}" . $colornamedest_endtag . "</B><BDO dir=\"{$textDirection}\"></BDO></td><td valign=\"top\">" . $Message . "</td></tr></table>";
     }
 } else {
     if ($ST != 1) {
         $NewMsg .= "</td><td width=\"1%\" nowrap=\"nowrap\" valign=\"top\"><B>" . $colorname_tag . "{$User}{$Dest}" . $colornamedest_endtag . "</B><BDO dir=\"{$textDirection}\"></BDO></td><td valign=\"top\">" . $Message . "</td></tr></table>";
开发者ID:pradyumnasagar,项目名称:pratechsha,代码行数:31,代码来源:messagesL.php


示例8: special_char

        echo $usrHash;
        ?>
" VALUE="1">
			<TR>
				<TD VALIGN=CENTER ALIGN=CENTER>
					<INPUT type=checkbox name="selected_<?php 
        echo $usrHash;
        ?>
" value="1">
				</TD>
				<TD VALIGN=CENTER ALIGN="<?php 
        echo $CellAlign;
        ?>
">
					<?php 
        echo special_char($username, $Latin1);
        ?>
				</TD>
				<TD VALIGN=CENTER ALIGN="<?php 
        echo $CellAlign;
        ?>
">
					<?php 
        echo date("M j, Y - h:i a", $lastTime + C_TMZ_OFFSET * 60 * 60);
        ?>
				</TD>
				<TD VALIGN=CENTER ALIGN=CENTER>
					<?php 
        echo $IP;
        ?>
				</TD>
开发者ID:valarmoghulis,项目名称:php,代码行数:31,代码来源:admin1.php


示例9: checkwords

     }
     //if user is using a swear word (defined in swearing.lib.php), the font color will resets to default. this is to keep your database as well as our computer clean of swearing (no swear into your cookies on your local computer).
     $M = checkwords($M, false, $Charset);
     if (C_EN_STATS && isset($Found) && $b > 0) {
         $DbLink->query("UPDATE " . C_STS_TBL . " SET swears_posted=swears_posted+{$b} WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='{$U}'");
     }
     unset($Found, $b);
 }
 // Bob Dickow Custom code for /away command modification - modified by Ciprian for Plus behaviour.:
 $DbLink->query("SELECT awaystat FROM " . C_USR_TBL . " WHERE username='{$U}'");
 if ($DbLink->num_rows() != 0) {
     list($awaystat) = $DbLink->next_record();
 }
 $DbLink->clean_results();
 if ($awaystat == 1) {
     $Msg = "sprintf(L_BACK, \"" . special_char($U, $Latin1) . "\")";
     $time_back = time() - 1;
     $awaystat = 0;
     $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '{$R}', 'SYS away', '{$Latin1}', '{$time_back}', '', '" . addslashes($Msg) . "', '', '{$RF}')");
     $DbLink->query("UPDATE " . C_USR_TBL . " SET awaystat='0' WHERE username='{$U}'");
     if (C_EN_STATS) {
         $DbLink->query("UPDATE " . C_STS_TBL . " SET seconds_away=seconds_away+(" . time() . "-last_away), longest_away=IF(" . time() . "-last_away < longest_away, longest_away, " . time() . "-last_away), last_away='' WHERE (stat_date=FROM_UNIXTIME(last_away,'%Y-%m-%d') OR stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d')) AND room='{$R}' AND username='{$U}'");
     }
 }
 AddMessage(stripslashes($M), $T, $R, $U, $C, "", "", $RF, $Charset);
 // END Bob Dickow custom code for /away command modification - modified by Ciprian for Plus behaviour..
 $RefreshMessages = true;
 if (C_EN_STATS) {
     $DbLink->query("UPDATE " . C_STS_TBL . " SET posts_sent=posts_sent+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='{$U}'");
 }
 if (C_EN_STATS && $IsCommand) {
开发者ID:pradyumnasagar,项目名称:pratechsha,代码行数:31,代码来源:handle_inputH.php


示例10: special_char

		<TD CLASS="whois" nowrap="nowrap"><?php 
    echo special_char($country, $Latin1);
    ?>
</TD>
	</TR>
	<?php 
}
if ($slang) {
    ?>
	<TR>
		<TD CLASS="whois" nowrap="nowrap"><?php 
    echo L_PRO_1a;
    ?>
: </TD>
		<TD CLASS="whois" nowrap="nowrap"><?php 
    echo special_char($slang, $Latin1);
    ?>
</TD>
	</TR>
	<?php 
}
if ($showemail || $power != "weak" && $email != '[email protected]' && $email != '[email protected]') {
    ?>
	<TR>
		<TD CLASS="whois" nowrap="nowrap"><?php 
    echo L_REG_8;
    ?>
: </TD>
		<TD nowrap="nowrap"><A HREF="mailto:<?php 
    echo htmlspecialchars($email);
    ?>
开发者ID:phpMyChat-Plus,项目名称:phpmychat-plus,代码行数:31,代码来源:whois_popup.php


示例11: VALUES

     $DbLink->query("UPDATE " . C_USR_TBL . " SET room='{$R}',u_time='{$current_time}', ip='{$IP}', country_code='{$COUNTRY_CODE}', country_name='{$COUNTRY_NAME}' WHERE username='{$U}'");
 } else {
     $DbLink->query("INSERT INTO " . C_USR_TBL . " VALUES ('{$R}', '{$U}', '{$Latin1}', '{$current_time}', '{$status}', '{$IP}', '0', '{$current_time}', '{$email}', '{$COUNTRY_CODE}', '{$COUNTRY_NAME}')");
     // Ghost Control mod by Ciprian
     if (C_SPECIAL_GHOSTS != "") {
         $sghosts = "";
         $sghosts = str_replace("'", "", C_SPECIAL_GHOSTS);
         $sghosts = str_replace(" AND username != ", ",", $sghosts);
     }
     if ($sghosts != "" && ghosts_in(stripslashes($U), $sghosts, $Charset) || C_HIDE_ADMINS && ($status == "a" || $status == "t") || C_HIDE_MODERS && $status == "m") {
     } else {
         // next line WELCOME SOUND feature altered for compatibility with /away command R Dickow:
         if (ALLOW_ENTRANCE_SOUND == "1" || ALLOW_ENTRANCE_SOUND == "3") {
             $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '{$R}', 'SYS enter', '{$Latin1}', '{$current_time}', '', 'stripslashes(sprintf(L_ENTER_ROM, \"" . special_char($U, $Latin1) . "\"))', '', '')");
         } else {
             $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '{$R}', 'SYS enter', '{$Latin1}', '{$current_time}', '', 'stripslashes(sprintf(L_ENTER_ROM_NOSOUND, \"" . special_char($U, $Latin1) . "\"))', '', '')");
         }
         if (C_EN_STATS) {
             $DbLink->query("SELECT room FROM " . C_STS_TBL . " WHERE stat_date='" . date("Y-m-d") . "' AND username='{$U}' AND room='{$R}'");
             if ($DbLink->num_rows() != 0) {
                 $DbLink->query("UPDATE " . C_STS_TBL . " SET logins=logins+1,last_in='{$current_time}' WHERE stat_date='" . date("Y-m-d") . "' AND room='{$R}' AND username='{$U}'");
             } else {
                 $DbLink->query("INSERT INTO " . C_STS_TBL . " VALUES ('" . date("Y-m-d") . "', '{$R}', '{$U}', '{$reguser}', '{$current_time}', '', '', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '{$IP}', '{$COUNTRY_CODE}', '{$COUNTRY_NAME}')");
             }
         }
     }
     if (C_WELCOME) {
         // Delete old welcome messages sent to the current user
         $DbLink->query("DELETE FROM " . C_MSG_TBL . " WHERE username LIKE 'SYS welcome' AND address = '{$U}'");
         // Insert a new welcome message in the messages table
         $current_time_plus = $current_time + 1;
开发者ID:phpMyChat-Plus,项目名称:phpmychat-plus,代码行数:31,代码来源:remotelogin.lib.php


示例12: special_char2

                        if (COLOR_NAMES) {
                            echo "<a onClick=\"window.parent.send_popup('/wisp " . special_char2($OtherUsera, $Latin1) . "');\" " . userClass($status, $OtherUsera) . " title='" . L_WHSP . "' onMouseOver=\"window.status='" . L_SEND_WHSP . "'; return true\"><span style=color:" . userColor($status, $colorname) . ";>" . special_char($OtherUser, $Latin1, $status) . "</span></a><br />\n";
                        } else {
                            echo "<a onClick=\"window.parent.send_popup('/wisp " . special_char2($OtherUsera, $Latin1) . "');\" " . userClass($status, $OtherUsera) . " title='" . L_WHSP . "' onMouseOver=\"window.status='" . L_SEND_WHSP . "'; return true\">" . special_char($OtherUser, $Latin1, $status) . "</a><br />\n";
                        }
                    } elseif (C_ENABLE_PM) {
                        if (COLOR_NAMES) {
                            echo "<a onClick=\"window.parent.userClick2('" . special_char2($OtherUsera, $Latin1) . "',true);\" " . userClass($status, $OtherUsera) . " title='" . L_WHSP . "' onMouseOver=\"window.status='" . L_SEND_WHSP . "'; return true\"><span style=color:" . userColor($status, $colorname) . ";>" . special_char($OtherUser, $Latin1, $status) . "</span></a><br />\n";
                        } else {
                            echo "<a onClick=\"window.parent.userClick2('" . special_char2($OtherUsera, $Latin1) . "',true);\" " . userClass($status, $OtherUsera) . " title='" . L_WHSP . "' onMouseOver=\"window.status='" . L_SEND_WHSP . "'; return true\">" . special_char($OtherUser, $Latin1, $status) . "</a><br />\n";
                        }
                    } else {
                        if (COLOR_NAMES) {
                            echo "<a onClick=\"window.parent.userClick2('" . special_char2($OtherUsera, $Latin1) . "',false);\" " . userClass($status, $OtherUsera) . " title='" . L_USE_NAME . " ({$OtherUser})' onMouseOver=\"window.status='" . L_USE_NAME . " ({$OtherUser})'; return true\"><span style=color:" . userColor($status, $colorname) . ";>" . special_char($OtherUser, $Latin1, $status) . "</span></a><br />\n";
                        } else {
                            echo "<a onClick=\"window.parent.userClick2('" . special_char2($OtherUsera, $Latin1) . "',false);\" " . userClass($status, $OtherUsera) . " title='" . L_USE_NAME . " ({$OtherUser})' onMouseOver=\"window.status='" . L_USE_NAME . " ({$OtherUser})'; return true\">" . special_char($OtherUser, $Latin1, $status) . "</a><br />\n";
                        }
                    }
                }
                echo "</DIV>\n";
            }
        }
        $OthersUsers->clean_results();
    }
    $OthersUsers->close();
}
$DbLink->clean_results();
// Display all rest default rooms
for ($k = 0; $k < count($DefaultChatRooms); $k++) {
    $tmpRoom = stripslashes($DefaultChatRooms[$k]);
    $tmpDispRoom = $tmpRoom;
开发者ID:pradyumnasagar,项目名称:pratechsha,代码行数:31,代码来源:usersL.php


示例13: str_replace

    if (stripos(mb_convert_case($Cmd[3], MB_CASE_LOWER, $Charset), mb_convert_case($U, MB_CASE_LOWER, $Charset)) !== false) {
        $Cmd[31] = str_replace($U, '', $Cmd[3]);
        $Cmd[31] = str_replace(',,', ',', $Cmd[31]);
        $Cmd[31] = rtrim($Cmd[31], ',');
        $Cmd[3] = ltrim($Cmd[31], ',');
        $Error = L_ERR_USR_19;
    }
    // Get all addressee and insert a message for each one
    $NotInvited = "";
    $Invited = explode(",", $Cmd[3]);
    for ($i = 0; $i < count($Invited); $i++) {
        $Invited[$i] = trim($Invited[$i]);
        if ($Invited[$i] == "") {
            continue;
        }
        $DbLink->query("SELECT username FROM " . C_USR_TBL . " WHERE username='{$Invited[$i]}' || username='" . mb_convert_case($Invited[$i], MB_CASE_LOWER, $Charset) . "'");
        if ($DbLink->num_rows() != 0) {
            $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '{$R}', 'SYS inviteTo', '{$Latin1}', '{$TimeSend}', '{$Invited[$i]}', 'sprintf(L_INVITE, \"" . special_char($U, $Latin1) . "\", \"join\", \"{$T} #" . addslashes(special_char($R, 0)) . "\", \"" . special_char($R, 0) . "\"){$ReqRegist}', '', '')");
            // Insert a message for the sender
            $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '{$R}', 'SYS inviteFrom', '{$Latin1}', '{$TimeSend}', '{$U}', 'sprintf(L_INVITE_DONE, \"" . special_char($Invited[$i], 0) . "\")', '', '')");
        } else {
            if ($NotInvited == "") {
                $NotInvited = $Invited[$i];
            } else {
                $NotInvited .= "," . $Invited[$i];
            }
            $Error = sprintf(L_NOT_ONLINE, special_char($NotInvited, $Latin1));
        }
    }
    unset($Invited, $NotInvited);
}
开发者ID:phpMyChat-Plus,项目名称:phpmychat-plus,代码行数:31,代码来源:invite.cmd.php


示例14: strtolower

                         }
                         if ($COUNTRY_CODE != "LAN") {
                             $COUNTRY_NAME = $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$COUNTRY_CODE]];
                         }
                         if ($PROXY || substr($IP, 0, 1) == "p") {
                             $COUNTRY_NAME .= " (Proxy Server)";
                         }
                     }
                     $c_flag = "&nbsp;<img src=\"./plugins/countryflags/flags/" . strtolower($COUNTRY_CODE) . ".gif\" alt=\"" . $COUNTRY_NAME . "\" title=\"" . $COUNTRY_NAME . "\" border=\"0\">&nbsp;(" . $COUNTRY_CODE . ")";
                 }
                 // GeoIP country flags Mod End.
                 $room_time = strftime(L_SHORT_DATETIME, $room_time + C_TMZ_OFFSET * 60 * 60);
                 if (stristr(PHP_OS, 'win') && (strstr($L, "chinese") || strstr($L, "korean") || strstr($L, "japanese"))) {
                     $room_time = str_replace(" ", "", $room_time);
                 }
                 echo "-&nbsp;<a " . userClass($status, $Username) . ";>" . special_char($Username, $Latin1, $status) . "</a><BDO dir=\"{$textDirection}\"></BDO><font size=1>&nbsp;(" . $room_time . ")" . (isset($c_flag) ? $c_flag : "") . "</font><br />";
                 // GeoIP Country flags initialization
                 unset($IP);
                 unset($COUNTRY_CODE);
                 unset($COUNTRY_NAME);
                 unset($c_flag);
             }
             echo "</DIV>";
             $ChildNb[$id] = $j;
         }
     }
     $Users->clean_results();
 }
 // GeoIP mode for country flags
 if (isset($gi) && $gi != "") {
     geoip_close($gi);
开发者ID:phpMyChat-Plus,项目名称:phpmychat-plus,代码行数:31,代码来源:users_popupH.php


示例15: sprintf

     if ($DbLink->num_rows() == 0) {
         $DbLink->clean_results();
         $Error = sprintf(L_NONEXIST_USER, stripslashes($UU));
     } else {
         list($status) = $DbLink->next_record();
         $DbLink->clean_results();
         // Ensure the user to be kicked is not a more powerfull user (admin>moderator)
         if ($status == "a" || $status == "t" || $status == "m" && ($perms != "admin" && $perms != "topmod")) {
             $Error = sprintf(L_NO_KICKED, stripslashes($UU));
         } else {
             $DbLink->query("UPDATE " . C_USR_TBL . " SET u_time='" . time() . "', status='k' WHERE " . $Query4Moder . "username='{$UU}'");
             if ($Cmd[3] != "") {
                 $Reason = trim($Cmd[3]);
                 $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '{$R}', 'SYS exit', '{$Latin1}', " . time() . ", '', 'sprintf(L_KICKED_REASON, \"" . special_char($UU, $Latin1) . "\", \"" . $Reason . "\")', '', '')");
             } else {
                 $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ({$T}, '{$R}', 'SYS exit', '{$Latin1}', " . time() . ", '', 'sprintf(L_KICKED, \"" . special_char($UU, $Latin1) . "\")', '', '')");
             }
             // Statistics mod by Ciprian
             if (C_EN_STATS) {
                 $curtime = time();
                 $DbLink->query("UPDATE " . C_STS_TBL . " SET seconds_away=seconds_away+({$curtime}-last_away), longest_away=IF({$curtime}-last_away < longest_away, longest_away, {$curtime}-last_away), last_away='' WHERE (stat_date=FROM_UNIXTIME(last_away,'%Y-%m-%d') OR stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d')) AND room='{$R}' AND username='{$UU}' AND last_away!='0'");
                 $DbLink->query("UPDATE " . C_STS_TBL . " SET seconds_in=seconds_in+({$curtime}-last_in), longest_in=IF({$curtime}-last_in < longest_in, longest_in, {$curtime}-last_in), last_in='', kicks_rcvd=kicks_rcvd+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='{$UU}' AND last_in!='0'");
                 $DbLink->query("UPDATE " . C_STS_TBL . " SET kicks_sent=kicks_sent+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='{$U}'");
             }
             $IsCommand = true;
             $RefreshMessages = true;
             $CleanUsrTbl = 1;
         }
     }
 } elseif ($UU == "*") {
     $DbLink->query("SELECT username FROM " . C_USR_TBL . " WHERE username!='{$U}' AND room='{$R}'");
开发者ID:phpMyChat-Plus,项目名称:phpmychat-plus,代码行数:31,代码来源:kick.cmd.php


示例16: list

$DbLink->query("SELECT awaystat FROM " . C_USR_TBL . " WHERE username='{$U}'");
if ($DbLink->num_rows() != 0) {
    list($awaystat) = $DbLink->next_record();
}
$DbLink->clean_results();
if ($awaystat < 2) {
    if ($awaystat == 0) {
        $msgstr = 'L_AWAY';
        $awaystat = 1;
        $time = time() - 1;
    } else {
        $msgstr = 'L_BACK';
        $awaystat = 0;
        $time = time() + 1;
    }
    $msg = "sprintf(" . $msgstr . ", \"" . special_char($U, $Latin1) . "\")";
    $xtra = $Cmd[2];
    if ($xtra != "") {
        // Text formating tags
        if (C_HTML_TAGS_KEEP == "none") {
            if (!C_HTML_TAGS_SHOW) {
                // eliminates every HTML like tags
                #			$xtra = ereg_replace("<[^>]+>", "", $xtra);
                $xtra = preg_replace("/<[^>]+>/", "", $xtra);
            } else {
                // or keep it without effect
                $xtra = str_replace("<", "&lt;", $xtra);
                $xtra = str_replace(">", "&gt;", $xtra);
            }
        } else {
            // then C_HTML_TAGS_KEEP == "simple", we keep U, B and I tags
开发者ID:phpMyChat-Plus,项目名称:phpmychat-plus,代码行数:31,代码来源:away.cmd.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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