本文整理汇总了PHP中htmlQuotes函数的典型用法代码示例。如果您正苦于以下问题:PHP htmlQuotes函数的具体用法?PHP htmlQuotes怎么用?PHP htmlQuotes使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了htmlQuotes函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPageTitle
function getPageTitle()
{
//set the page title (need tr grab client information)
$querystatement = "\n\t\t\t\tSELECT\n\t\t\t\t\tfirstname,\n\t\t\t\t\tlastname,\n\t\t\t\t\tcompany\n\t\t\t\tFROM\n\t\t\t\t\tclients\n\t\t\t\tWHERE\n\t\t\t\t\tid=" . $this->clientid;
$queryresult = $this->db->query($querystatement);
$refrecord = $this->db->fetchArray($queryresult);
$pageTitle = "Addresses: ";
if ($refrecord["company"] == "") {
$pageTitle .= $refrecord["firstname"] . " " . $refrecord["lastname"];
} else {
$pageTitle .= $refrecord["company"];
}
$pageTitle = htmlQuotes($pageTitle);
return $pageTitle;
}
示例2: getName
function getName($tabledefid, $recordid)
{
switch ($tabledefid) {
case "tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083":
default:
$querystatement = "\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\tif(clients.lastname!='',concat(clients.lastname,', ',clients.firstname,if(clients.company!='',concat(' (',clients.company,')'),'')),clients.company) AS thename\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tclients\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t`uuid` = '" . $recordid . "'\n\t\t\t\t\t";
break;
}
//endswitch tabledefid
$queryresult = $this->db->query($querystatement);
if ($this->db->numRows($queryresult)) {
$therecord = $this->db->fetchArray($queryresult);
return htmlQuotes($therecord["thename"]);
} else {
return "orphaned record: tableDefinitionID=" . $tabledefid . ", RecordID:" . $recordid;
}
}
示例3: display
function display($record)
{
$output = "{ prereqMet: ";
if ($record) {
$record["memo"] = str_replace("\r", "", str_replace("\n", " ", $record["memo"]));
$output .= "true, record: {";
foreach ($record as $key => $value) {
$output .= $key . ": '" . str_replace("'", "\\'", htmlQuotes($value)) . "',";
}
$output = substr($output, 0, -1) . "}";
} else {
$output .= "false";
}
//endif - record
$output .= "}";
header("Content-type: text/plain");
echo $output;
}
示例4: process
//.........这里部分代码省略.........
$processor->dateFormat = $this->options->dateFormat;
$processor->timeFormat = $this->options->timeFormat;
}
//end if
} else {
$processor = new phpbmsTable($this->db, $tabledefid);
$processor->dateFormat = $this->options->dateFormat;
$processor->timeFormat = $this->options->timeFormat;
}
//end if
$errorMessage = "";
if ($this->options->useUuid) {
if (!isset($request["data"]["uuid"])) {
$errorMessage = "The `uuid` field must be set.";
}
} else {
if (!isset($request["data"]["id"])) {
$errorMessage = "The `id` field must be set.";
}
}
//end if
if ($errorMessage) {
$this->sendError("Get failed from request number " . $i, $errorMessage);
} elseif (!$this->options->useUuid) {
$therecord = $processor->getRecord((int) $request["data"]["id"], $this->options->useUuid);
$thereturn = $therecord["id"];
$thevalue = (int) $request["data"]["id"];
} else {
$therecord = $processor->getRecord(mysql_real_escape_string($request["data"]["uuid"]), $this->options->useUuid);
$thereturn = $therecord["uuid"];
$thevalue = $request["data"]["uuid"];
}
if ($thereturn == $thevalue) {
$this->_addToResponse("retrieved", "record (" . htmlQuotes($thevalue) . ") retrieved in tabledef " . $tabledefid, $therecord);
} else {
$this->_addToResponse("retrieved", "no record found (" . htmlQuotes($thevalue) . ") in tabledef " . $tabledefid);
}
break;
case "delete":
case $deletebutton:
//======================================================
if (!is_array($request["data"])) {
$this->sendError("Passed data is not array in request number " . $i, $request["data"]);
} else {
include_once "include/search_class.php";
if ($hasTableClassOveride) {
@(include_once "modules/" . $modulename . "/include/" . $maintable . ".php");
$className = $maintable . "SearchFunctions";
if (class_exists($className)) {
$processor = new $className($this->db, $tabledefid, $request["data"]);
} else {
$processor = new searchFunctions($this->db, $tabledefid, $request["data"]);
}
} else {
$processor = new searchFunctions($this->db, $tabledefid, $request["data"]);
}
$result = $processor->delete_record($this->options->useUuid);
$this->_addToResponse($request["command"], $result);
}
//endif
break;
case "procedure":
//======================================================
if (!is_array($request["data"])) {
$this->sendError("Wrong passed procedure format, expected object in request number " . $i, $request["data"]);
} else {
示例5: display
function display()
{
?>
<div id="menu">
<h1><a href="<?php
echo APP_PATH . DEFAULT_LOAD_PAGE;
?>
" title="<?php
echo htmlQuotes(APPLICATION_NAME);
?>
" name="toptop"><span><?php
echo APPLICATION_NAME;
?>
</span></a></h1>
<div id="menuRighthand"><?php
echo htmlQuotes(trim($_SESSION["userinfo"]["firstname"] . " " . $_SESSION["userinfo"]["lastname"]));
?>
</div>
<ul id="menuBar">
<?php
$submenustring = "";
while ($menurecord = $this->db->fetchArray($this->menuresult)) {
if (hasRights($menurecord["roleid"])) {
if ($menurecord["link"]) {
if (strpos($menurecord["link"], "http") !== 0 && strpos($menurecord["link"], "javascript") !== 0) {
$menurecord["link"] = APP_PATH . $menurecord["link"];
}
?>
<li class="firstLevel"><a href="<?php
echo $menurecord["link"];
?>
"><?php
echo $menurecord["name"];
?>
</a></li><?php
} else {
?>
<li class="firstLevel"><a href="#toptop" class="topMenus" id="menu<?php
echo $menurecord["id"];
?>
"><?php
echo $menurecord["name"];
?>
</a></li><li class="submenusli"><ul class="submenuitems" id="submenu<?php
echo $menurecord["id"];
?>
"><?php
$subitemsquery = $this->getSubItems($menurecord["uuid"]);
if ($subitemsquery) {
$sep = false;
while ($subrecord = $this->db->fetchArray($subitemsquery)) {
if ($subrecord["name"] == "----") {
$sep = true;
} else {
if (hasRights($subrecord["roleid"])) {
if (strpos($subrecord["link"], "http") !== 0 && strpos($subrecord["link"], "javascript") !== 0) {
$subrecord["link"] = APP_PATH . $subrecord["link"];
}
if (strpos($subrecord["link"], "javascript") === 0) {
$subrecord["link"] = "#\" onclick=\"" . str_replace("javascript:", "", $subrecord["link"]);
}
?>
<li <?php
if ($sep) {
echo " class=\"menuSep\" ";
}
?>
><a href="<?php
echo $subrecord["link"];
?>
"> <?php
echo $subrecord["name"];
?>
</a></li><?php
$sep = false;
}
//end if
}
//end if
}
//end while
}
//end if
?>
</ul></li><?php
}
//end if
}
//end if
}
//end while
?>
</ul></div><?php
}
示例6: displaySystemMessages
function displaySystemMessages()
{
//shows system messages, but only if they exist
$querystatement = "\n SELECT\n notes.id,\n notes.subject,\n notes.content,\n concat(users.firstname,' ',users.lastname) AS createdby,\n notes.creationdate\n FROM\n notes INNER JOIN users ON notes.createdby=users.id\n WHERE\n type='SM'\n ORDER BY\n importance DESC,\n notes.creationdate";
$queryresult = $this->db->query($querystatement);
if ($this->db->numRows($queryresult)) {
?>
<div class="box" id="systemMessageContainer">
<h2>System Messages</h2>
<?php
while ($therecord = $this->db->fetchArray($queryresult)) {
$therecord["content"] = str_replace("\n", "<br />", htmlQuotes($therecord["content"]));
?>
<h3 class="systemMessageLinks"><?php
echo htmlQuotes($therecord["subject"]);
?>
<span>[ <?php
echo htmlQuotes(formatFromSQLDateTime($therecord["creationdate"]));
?>
<?php
echo htmlQuotes($therecord["createdby"]);
?>
]</span></h3>
<div class="systemMessages">
<p><?php
echo $therecord["content"];
?>
</p>
</div>
<?php
}
//end while
?>
</div>
<?php
}
//endif
}
示例7: showRecords
function showRecords($queryresult)
{
global $phpbms;
?>
<div class="fauxP">
<table border="0" cellpadding="0" cellspacing="0" class="querytable">
<tr>
<th nowrap="nowrap" class="queryheader">move</th>
<th align="left" nowrap="nowrap" class="queryheader" width="100%">name/field</th>
<th align="left" nowrap="nowrap" class="queryheader">ascending</th>
<th align="left" nowrap="nowrap" class="queryheader">access</th>
<th nowrap="nowrap" class="queryheader"> </th>
</tr>
<?php
$topdisplayorder = -1;
$row = 1;
while ($therecord = $this->db->fetchArray($queryresult)) {
$topdisplayorder = $therecord["displayorder"];
if ($row == 1) {
$row = 2;
} else {
$row = 1;
}
?>
<tr class="qr<?php
echo $row;
?>
noselects">
<td nowrap="nowrap"valign="top">
<button type="button" class="graphicButtons buttonUp" onclick="document.location='<?php
echo $_SERVER["PHP_SELF"] . "?id=" . $_GET["id"] . "&command=moveup&selid=" . $therecord["id"];
?>
';"><span>Move Up</span></button>
<button type="button" class="graphicButtons buttonDown" onclick="document.location='<?php
echo $_SERVER["PHP_SELF"] . "?id=" . $_GET["id"] . "&command=movedown&selid=" . $therecord["id"];
?>
';"><span>Move Down</span></button>
<?php
echo $therecord["displayorder"];
?>
</td>
<td valign="top"><?php
if ($therecord["name"]) {
echo "<strong>" . $therecord["name"] . "</strong><br />";
}
echo htmlQuotes($therecord["field"]);
?>
</td>
<td align="center" nowrap="nowrap"valign="top"><?php
echo booleanFormat($therecord["ascending"]);
?>
</td>
<td valign="top"><?php
$phpbms->displayRights($therecord["roleid"]);
?>
</td>
<td nowrap="nowrap"valign="top">
<button id="edit<?php
echo $therecord["id"];
?>
" name="doedit" type="button" onclick="document.location='<?php
echo $_SERVER["PHP_SELF"] . "?id=" . $_GET["id"] . "&command=edit&selid=" . $therecord["id"];
?>
';" class="graphicButtons buttonEdit"><span>edit</span></button>
<button id="delete<?php
echo $therecord["id"];
?>
" name="dodelete" type="button" onclick="document.location='<?php
echo $_SERVER["PHP_SELF"] . "?id=" . $_GET["id"] . "&command=delete&selid=" . $therecord["id"];
?>
';" class="graphicButtons buttonDelete"><span>delete</span></button>
</td>
</tr>
<?php
}
?>
<tr class="queryfooter">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table></div>
<?php
}
示例8: displayUsers
function displayUsers($uuid, $type)
{
$querystatement = "\n\t\t\t\tSELECT\n\t\t\t\t\t`users`.`uuid`,\n\t\t\t\t\tconcat(`users`.`firstname`,' ',`users`.`lastname`) AS `name`\n\t\t\t\tFROM\n\t\t\t\t\t`users` INNER JOIN `rolestousers` ON `rolestousers`.`userid`=`users`.`uuid`\n\t\t\t\tWHERE\n\t\t\t\t\t`rolestousers`.`roleid`='" . mysql_real_escape_string($uuid) . "'\n\t\t\t";
$assignedquery = $this->db->query($querystatement);
$thelist = array();
if ($type == "available") {
$excludelist = array();
while ($therecord = $this->db->fetchArray($assignedquery)) {
$excludelist[] = $therecord["uuid"];
}
$querystatement = "\n\t\t\t\t\tSELECT\n\t\t\t\t\t\t`uuid`,\n\t\t\t\t\t\tconcat(`users`.`firstname`,' ',`users`.`lastname`) AS `name`\n\t\t\t\t\tFROM\n\t\t\t\t\t\t`users`\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`revoked` = '0'\n\t\t\t\t\t\tAND\n\t\t\t\t\t\t`portalaccess`='0'\n\t\t\t\t\t";
$availablequery = $this->db->query($querystatement);
while ($therecord = $this->db->fetchArray($availablequery)) {
if (!in_array($therecord["uuid"], $excludelist)) {
$thelist[] = $therecord;
}
}
} else {
while ($therecord = $this->db->fetchArray($assignedquery)) {
$thelist[] = $therecord;
}
}
foreach ($thelist as $theoption) {
?>
<option value="<?php
echo $theoption["uuid"];
?>
"><?php
echo htmlQuotes($theoption["name"]);
?>
</option>
<?php
}
}
示例9: showRecords
function showRecords()
{
$rownum = 1;
$this->db->seek($this->queryresult, 0);
//groupings
if ($this->showGroupings) {
for ($i = 0; $i < count($this->thegroupings); $i++) {
$this->thegroupings[$i]["theValue"] = "";
}
}
while ($therecord = $this->db->fetchArray($this->queryresult)) {
// more groupings
if ($this->showGroupings) {
for ($i = 0; $i < count($this->thegroupings); $i++) {
if ($this->thegroupings[$i]["theValue"] != $therecord["_group" . ($i + 1)]) {
$this->thegroupings[$i]["theValue"] = $therecord["_group" . ($i + 1)];
?>
<tr class="queryGroup"><td colspan = "<?php
echo count($this->thecolumns);
?>
" <?php
if ($i) {
echo 'style = "padding-left:' . $i * 15 . 'px"';
}
?>
>
<?php
if ($this->thegroupings[$i]["displayname"]) {
echo htmlQuotes($this->thegroupings[$i]["displayname"] . ": ");
}
echo $therecord["_group" . ($i + 1)];
?>
</td></tr><?php
$rownum = 1;
}
//endif
}
//endfor
}
//endif
?>
<tr id="<?php
echo $this->uniqueName . ":" . $therecord["theid"];
?>
" class="qr<?php
echo $rownum;
?>
"><?php
if ($rownum == 1) {
$rownum++;
} else {
$rownum = 1;
}
foreach ($this->thecolumns as $thecolumn) {
?>
<td align="<?php
echo $thecolumn["align"];
?>
" <?php
if (!$thecolumn["wrap"]) {
echo "nowrap=\"nowrap\"";
}
?>
><?php
echo $therecord[$thecolumn["name"]] !== "" ? formatVariable($therecord[$thecolumn["name"]], $thecolumn["format"]) : " ";
?>
</td><?php
}
//endforeach
?>
</tr><?php
}
//endwhile
}
示例10: htmlQuotes
?>
</td></tr>
<tr><td id="parenShipping">
<?php
if ($therecord["shippingmethodid"]) {
echo "(" . htmlQuotes($shippingMethods[$therecord["shippingmethodid"]]["name"]) . ")";
} else {
echo " ";
}
?>
</td></tr>
<tr><td class="blanks"> </td></tr>
<tr><td id="parenSpacer" class="blanks"> </td></tr>
<tr><td id="parenPayment"><?php
if ($therecord["paymentmethodid"] != "") {
echo "(" . htmlQuotes($paymentMethods[$therecord["paymentmethodid"]]["name"]) . ")";
} else {
echo " ";
}
?>
</td></tr>
</tbody>
</table>
</td>
<td colspan="2" class="invoiceTotalLabels vTabs" id="vTab1"><div>discount<input type="hidden" id="totalBD" name="totalBD" value="<?php
echo $therecord["totaltni"] + $therecord["discountamount"];
?>
" /></div></td>
<td class="totalItems"><input name="discountamount" id="discountamount" type="text" value="<?php
echo numberToCurrency($therecord["discountamount"]);
示例11: htmlQuotes
" />
<p><?php
$theform->showField("name");
?>
</p>
<p><?php
$theform->showField("roleid");
?>
</p>
<p>
<label for="search">search</label> <span class="notes">(SQL WHERE clause)</span><br />
<textarea id="search" name="search" cols="32" rows="2"><?php
echo htmlQuotes($thequicksearch["search"]);
?>
</textarea>
</p>
</fieldset>
<p align="right">
<input name="command" id="save" type="submit" value="<?php
echo $action;
?>
" class="Buttons" />
<?php
if ($action == "edit quick search item") {
?>
<input name="command" id="cancel" type="submit" value="cancel edit" class="Buttons" />
<?php
示例12: htmlQuotes
echo htmlQuotes(CURRENCY_SYM);
?>
";<?php
?>
CURRENCY_ACCURACY=<?php
echo CURRENCY_ACCURACY;
?>
;<?php
?>
DECIMAL_SYMBOL="<?php
echo htmlQuotes(DECIMAL_SYMBOL);
?>
";<?php
?>
THOUSANDS_SEPARATOR="<?php
echo htmlQuotes(THOUSANDS_SEPARATOR);
?>
";<?php
?>
LOGIN_REFRESH=<?php
echo LOGIN_REFRESH;
?>
;<?php
if (defined("TERM1_DAYS")) {
?>
TERM1_DAYS=<?php
echo TERM1_DAYS;
?>
;<?php
}
//end if
示例13: htmlentities
<div class="bodyline">
<form action="<?php
echo htmlentities($_SERVER["PHP_SELF"]);
?>
" method="post" name="record" id="record" onsubmit="return false">
<input type="hidden" id="command" name="command" value=""/>
<h1><span><?php
echo $pageTitle;
?>
</span></h1>
<fieldset>
<legend>Name</legend>
<p id="nameP"><?php
echo htmlQuotes($_SESSION["userinfo"]["firstname"] . " " . $_SESSION["userinfo"]["lastname"]);
?>
</p>
</fieldset>
<fieldset>
<legend>Change Password</legend>
<p>
<label for="curPass">current password</label><br />
<input type="password" id="curPass" name="curPass" maxlength="32"/>
</p>
<p>
<label for="newPass">new password</label><br />
<input type="password" id="newPass" name="newPass" maxlength="32"/>
</p>
示例14: formatVariable
function formatVariable($value, $format = NULL)
{
switch ($format) {
case "real":
$value = number_format($value, 2);
break;
case "currency":
$value = htmlQuotes(numberToCurrency($value));
break;
case "boolean":
$value = booleanFormat($value);
break;
case "date":
$value = formatFromSQLDate($value);
break;
case "time":
$value = formatFromSQLTime($value);
break;
case "datetime":
$value = formatFromSQLDatetime($value);
break;
case "filelink":
$value = "<button class=\"graphicButtons buttonDownload\" type=\"button\" onclick=\"document.location='" . APP_PATH . "servefile.php?i=" . $value . "'\"><span>download</span></button>";
//$value="<a href=\"".APP_PATH."servefile.php?i=".$value."\" style=\"display:block;\"><img src=\"".APP_PATH."common/stylesheet/".STYLESHEET."/image/button-download.png\" align=\"middle\" alt=\"view\" width=\"16\" height=\"16\" border=\"0\" /></a>";
break;
case "invoice":
if ($value > 0 and $value != 9999999) {
$value = "<a href=\"" . APP_PATH . "modules/bms/invoices_addedit.php?id={$value}\">{$value}</a>";
}
break;
case "client":
$value = "<a href=\"" . APP_PATH . "modules/bms/clients_addedit.php?id={$value}\">{$value}</a>";
break;
case "noencoding":
$value = $value;
break;
case "bbcode":
$value = htmlQuotes($value);
// This list needs to be expanded
$bbcodelist["[b]"] = "<strong>";
$bbcodelist["[/b]"] = "</strong>";
$bbcodelist["[br]"] = "<br />";
$bbcodelist["[space]"] = " ";
foreach ($bbcodelist as $bbcode => $translation) {
$value = str_replace($bbcode, $translation, $value);
}
break;
default:
$value = htmlQuotes($value);
}
return $value;
}
示例15: htmlQuotes
<p>
<?php
$theform->showfield("webenabled");
?>
</p>
<div style=" <?php
if (!$therecord["webenabled"]) {
echo "display:none;";
}
?>
" id="webstuff">
<p>
<label for="keywords">keywords <span class="notes">(comma separated key word list)</span></label><br />
<input type="text" id="keywords" name="keywords" value="<?php
echo htmlQuotes($therecord["keywords"]);
?>
" size="40" maxlength="255"/>
</p>
<div class="fauxP">
<label for="webdescription">web description <span class="notes">(HTML acceptable)</span></label><br />
<div style=" <?php
if ($therecord["webdescription"]) {
echo "display:none;";
}
?>
" id="webDescEdit">
<textarea id="webdescription" name="webdescription" cols="60" rows="6"><?php
echo $therecord["webdescription"];
?>