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


PHP security::fromHTML方法代码示例

本文整理汇总了PHP中security::fromHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP security::fromHTML方法的具体用法?PHP security::fromHTML怎么用?PHP security::fromHTML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在security的用法示例。


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

示例1:

             } else {
                 echo "Account with such username not found.<br/>";
                 misc::back();
             }
         }
     }
     //lol
     echo "<br/><br/>";
 }
 $myJID = user::accountJIDbyUsername($_SESSION['username']);
 $nMsgCount = core::$sql->numRows("select * from srcms_privatemessages where receiver='{$myJID}'");
 if (isset($_GET['view'])) {
     $nMsgID = (int) $_GET['view'];
     if (core::$sql->numRows("select * from srcms_privatemessages where receiver='{$myJID}' and id='{$nMsgID}'") > 0) {
         $msgData = core::$sql->fetchArray("select * from srcms_privatemessages where id='{$nMsgID}'");
         $msgData['msg'] = security::fromHTML($msgData['msg']);
         $msgData['msg'] = misc::applyAttributesToText($msgData['msg']);
         $szSender = user::usernamyByJID($msgData['sender']);
         echo "<br/><table id='table-3' width='380' border='1' cellpadding='0' cellspacing='0'>\r\n\t\t\t\t\t\t\t\t\t<td>Title</td><td>{$msgData['title']}</td><tr/>\r\n\t\t\t\t\t\t\t\t\t<td>From</td><td><a href='?pg=viewprofile&username={$szSender}'>{$szSender}</a></td><tr/>\r\n\t\t\t\t\t\t\t\t\t<td height='50'>Text</td><td width='300' height='50'>{$msgData['msg']}</td>\r\n\t\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t ";
         core::$sql->exec("update srcms_privatemessages set viewed='1' where id='{$nMsgID}'");
         echo "<br/><br/><br/>";
     } else {
         echo "You can't view message that does not belong to you.<br/>";
     }
 }
 if ($nMsgCount > 0) {
     if ($nMsgCount == $core->aConfig['maxPrivMsg']) {
         echo "Your inbox is full. <br/>";
     }
     $hQuery = core::$sql->exec("select * from srcms_privatemessages where receiver='{$myJID}' order by time desc");
     echo "<table id='table-3' border='1' cellpadding='0' cellspacing='0'>\r\n\t\t\t\t\t\t\t<td>From</td><td>Title</td><td>Time</td><td>Viewed</td><td>Link to view it</td><td>Delete</td><tr/>";
开发者ID:EbrahemS,项目名称:SRCMS,代码行数:31,代码来源:ucp.php

示例2: while

<?php

$hQuery = core::$sql->exec("select * from srcms_downloads order by id desc");
echo "<table border='0' id='table-3' cellpadding='0' cellspacing='0'>\r\n\t<td align='center'>Name</td><td align='center'>Link</td><td align='center'>Description</td><tr/>";
while ($row = mssql_fetch_array($hQuery)) {
    $szName = security::fromHTML($row['name']);
    $szDesc = security::fromHTML($row['description']);
    echo "<td align='center'>{$szName}</td><td align='center'><a href='{$row['link']}' target='blank'><b>CLICK HERE</b></a></td>\r\n\t\t  <td align='center'>{$szDesc}</td><tr/>";
}
echo "</table>";
开发者ID:EbrahemS,项目名称:SRCMS,代码行数:10,代码来源:dl.php

示例3: array

 $hGetComments = core::$sql->exec("select * from srcms_newscomments where newsID='{$nID}'");
 $commentData = array();
 $a = 0;
 while ($row = mssql_fetch_array($hGetComments)) {
     $commentData[$a] = array($row['id'], $row['text'], $row['author'], $row['time']);
     $a++;
 }
 $_GET['page'] = (int) $_GET['page'];
 if (!isset($_GET['page'])) {
     $_GET['page'] = 1;
 }
 for ($i = ($_GET['page'] - 1) * 10; $i < $_GET['page'] * 10; $i++) {
     $nCommentID = $commentData[$i][0];
     $szText = $commentData[$i][1];
     $szText = misc::applyAttributesToText($szText);
     $szText = security::fromHTML($szText);
     $szAuthor = $commentData[$i][2];
     $szTime = $commentData[$i][3];
     if (strlen($szText) == 0) {
         break;
     }
     $szAvatar = user::getUserAvatarUrl($szAuthor);
     $commentPanelLinks = "";
     $isCommentOwner = core::$sql->getRow("select whois from srcms_userprofiles where JID='" . user::accountJIDbyUsername($szAuthor) . "'");
     $isAdmin = core::$sql->getRow("select whois from srcms_userprofiles where JID='" . user::accountJIDbyUsername($_SESSION['username']) . "'");
     if ($szAuthor == $_SESSION['username'] || $isAdmin == "admin") {
         $commentPanelLinks = "<a href='?pg=news&del={$nCommentID}&backid={$nID}'><b>Delete</b></a>";
     }
     $szRank = user::getRankText($isCommentOwner);
     echo "\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t<img src='{$szAvatar}'></img>\r\n\t\t\t\t<table id='table-3' border='0' cellpadding='0' cellspacing='0'>\r\n\t\t\t\t<td valign='top' style='padding-left:15px' width='700'>\r\n\t\t\t\t<br/>posted by  <a href='?pg=viewprofile&username={$szAuthor}'>[ {$szRank} ] {$szAuthor} </a>  at {$szTime} </a>\r\n\t\t\t\t<hr>\r\n\t\t\t\t<br/>{$szText}<br/>\r\n\t\t\t\t<hr>\r\n\t\t\t\t<font align='right'>{$commentPanelLinks}</font>\r\n\t\t\t\t</td>\r\n\t\t\t\t</table>\r\n\t\t\t\t<hr/>\r\n\t\t\t\t";
 }
开发者ID:EbrahemS,项目名称:SRCMS,代码行数:31,代码来源:news.php


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