本文整理汇总了PHP中mswCleanData函数的典型用法代码示例。如果您正苦于以下问题:PHP mswCleanData函数的具体用法?PHP mswCleanData怎么用?PHP mswCleanData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mswCleanData函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bbParser
public function bbParser($text)
{
// Check for square brackets. If not found, no bb code exists..
if (strpos($text, '[') === false && strpos($text, ']') === false) {
return mswNL2BR($text);
}
$tagList = array('[b]' => '<span class="bbBold">', '[u]' => '<span class="bbUnderline">', '[i]' => '<span class="bbItalics">', '[s]' => '<span class="bbStrike">', '[del]' => '<span class="bbDel">', '[ins]' => '<span class="bbIns">', '[em]' => '<span class="bbEm">', '[h1]' => '<span class="bbH1">', '[h2]' => '<span class="bbH2">', '[h3]' => '<span class="bbH3">', '[h4]' => '<span class="bbH4">', '[list]' => '<ul class="bbUl">', '[list=n]' => '<ul class="bbUlNumbered">', '[list=a]' => '<ul class="bbUlAlpha">', '[*]' => '<li class="bbLi">', '[B]' => '<span class="bbBold">', '[U]' => '<span class="bbUnderline">', '[I]' => '<span class="bbItalics">', '[S]' => '<span class="bbStrike">', '[DEL]' => '<span class="bbDel">', '[INS]' => '<span class="bbIns">', '[EM]' => '<span class="bbEm">', '[H1]' => '<span class="bbH1">', '[H2]' => '<span class="bbH2">', '[H3]' => '<span class="bbH3">', '[H4]' => '<span class="bbH4">', '[LIST]' => '<ul class="bbUl">', '[LIST=N]' => '<ul class="bbUlNumbered">', '[LIST=A]' => '<ul class="bbUlAlpha">', '[/b]' => '</span>', '[/u]' => '</span>', '[/i]' => '</span>', '[/s]' => '</span>', '[/del]' => '</span>', '[/ins]' => '</span>', '[/em]' => '</span>', '[/h1]' => '</span>', '[/h2]' => '</span>', '[/h3]' => '</span>', '[/h4]' => '</span>', '[/list]' => '</ul>', '[/list]' => '</ul>', '[/list]' => '</ul>', '[/B]' => '</span>', '[/U]' => '</span>', '[/I]' => '</span>', '[/S]' => '</span>', '[/DEL]' => '</span>', '[/INS]' => '</span>', '[/EM]' => '</span>', '[/H1]' => '</span>', '[/H2]' => '</span>', '[/H3]' => '</span>', '[/H4]' => '</span>', '[/LIST]' => '</ul>', '[/LIST]' => '</ul>', '[/LIST]' => '</ul>', '[/*]' => '</li>');
// Deal with potential slashes..
$text = mswCleanData($text);
// Kill html..
$text = htmlspecialchars($text);
// Parse colors..
$text = bbCode_Parser::colorParser($text);
// Parse urls..
$text = bbCode_Parser::urlParser($text);
// Parse youtube videos..
$text = bbCode_Parser::youTubeParser($text);
// Parse vimeo videos..
$text = bbCode_Parser::vimeoParser($text);
// Parse emails..
$text = bbCode_Parser::emailParser($text);
// Parse images..
$text = bbCode_Parser::imageParser($text);
// Also clean empty tags..
$find = array('[u] [/u]', '[i] [/i]', '[b] [/b]', '[u] [/u]<br>', '[i] [/i]<br>', '[b] [/b]<br>');
$repl = array();
$text = str_replace($find, $repl, $text);
// Deal with other tags..
$text = strtr($text, $tagList);
$text = mswNL2BR(trim($text));
// Clean up <ul> & <li> tags which have invalid linebreaks..
$find = array('<ul><br>', '</ul><br>', '<li><br>', '</li><br>', '<ul class="bbUl"><br>', '<ul class="bbUlNumbered"><br>', '<ul class="bbUlAlpha"><br>', '<ul><br />', '</ul><br />', '<li><br />', '</li><br />', '<ul class="bbUl"><br />', '<ul class="bbUlNumbered"><br />', '<ul class="bbUlAlpha"><br />');
$repl = array('<ul>', '</ul>', '<li>', '</li>', '<ul class="bbUl">', '<ul class="bbUlNumbered">', '<ul class="bbUlAlpha">');
return str_replace($find, $repl, $text);
}
示例2: buildSelect
public function buildSelect($text, $id, $options, $tabIndex, $value = '')
{
$html = '<option value="nothing-selected">- - - - - - -</option>';
$select = explode(mswDefineNewline(), $options);
foreach ($select as $o) {
$html .= '<option value="' . mswSpecialChars($o) . '"' . mswSelectedItem($value, $o) . '>' . mswCleanData($o) . '</option>' . mswDefineNewline();
}
return mswDefineNewline() . '<label class="textHead">' . $text . '</label>' . mswDefineNewline() . '<div class="dataArea"><select name="customField[' . $id . ']" tabindex="' . $tabIndex . '" class="span2">' . $html . '</select></div>' . mswDefineNewline();
}
示例3: questions
public function questions($id = 0, $limit, $s, $search = array(), $orderOverride = '', $queryAdd = '')
{
global $msg_pkbase8;
$data = '';
// Search mode..
if (isset($search[0], $search[1])) {
$q = mysql_query("SELECT SQL_CALC_FOUND_ROWS *,\n\t `" . DB_PREFIX . "faq`.`id` AS `faqID`,\n\t\t `" . DB_PREFIX . "faq`.`question` AS `faqQuestion` \n\t\t FROM `" . DB_PREFIX . "faq`\n " . $search[0] . "\n\t\t AND `enFaq` = 'yes'\n\t\t ORDER BY `orderBy`\n\t\t LIMIT {$limit}," . $s->quePerPage) or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
if ($search[1] == 'yes') {
$c = mysql_fetch_object(mysql_query("SELECT FOUND_ROWS() AS `rows`"));
return isset($c->rows) ? $c->rows : '0';
}
} else {
$q = mysql_query("SELECT *,\n\t `" . DB_PREFIX . "faq`.`id` AS `faqID`,\n\t\t `" . DB_PREFIX . "faq`.`question` AS `faqQuestion` \n\t\t FROM `" . DB_PREFIX . "faq`\n\t LEFT JOIN `" . DB_PREFIX . "faqassign`\n\t\t ON `" . DB_PREFIX . "faq`.`id` = `" . DB_PREFIX . "faqassign`.`question`\n WHERE `enFaq` = 'yes'\n\t\t " . ($id > 0 ? 'AND `' . DB_PREFIX . 'faqassign`.`itemID` = \'' . $id . '\'' : '') . "\n\t\t AND `" . DB_PREFIX . "faqassign`.`desc` = 'category'\n\t\t " . $queryAdd . "\n\t\t ORDER BY " . ($orderOverride ? $orderOverride : '`orderBy`') . "\n\t\t LIMIT {$limit}," . $s->quePerPage) or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
}
while ($LINKS = mysql_fetch_object($q)) {
$data .= str_replace(array('{article}', '{url_params}', '{question}', '{count}'), array($LINKS->faqID, mswQueryParams(array('a', 'p')), mswCleanData($LINKS->faqQuestion), number_format($LINKS->kviews)), file_get_contents(PATH . 'content/' . MS_TEMPLATE_SET . '/html/faq-question-link.htm'));
}
return $data ? trim($data) : str_replace('{text}', $msg_pkbase8, file_get_contents(PATH . 'content/' . MS_TEMPLATE_SET . '/html/nothing-found.htm'));
}
示例4: mswCleanData
?>
<tr class="warning nothing_to_see">
<td colspan="4"><?php
echo $msg_open10;
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<div class="btn-toolbar" style="margin-top:0;padding-top:0">
<button class="btn btn-link" type="button" onclick="ms_windowLoc('?p=accountman')"><i class="icon-remove"></i> <?php
echo mswCleanData($msg_levels11);
?>
</button>
</div>
<?php
if ($countedRows > 0 && $countedRows > $limit) {
?>
<div class="pagination pagination-small pagination-right">
<?php
define('PER_PAGE', $limit);
$PGS = new pagination($countedRows, '?p=' . $cmd . mswQueryParams(array('p', 'next')) . '&next=');
echo $PGS->display();
?>
</div>
<?php
}
示例5: mswCleanData
<div class="header">
<button class="btn search-bar-button" type="button" onclick="mswToggleSearch()"><i class="icon-search" id="search-icon-button"></i></button>
<h1 class="page-title"><?php
echo mswCleanData($this->PARENT['name']);
?>
</h1>
<span class="clearfix"></span>
</div>
<ul class="breadcrumb">
<li class="active"><?php
echo mswCleanData($this->PARENT['summary']);
?>
</li>
</ul>
<div class="container-fluid">
<div class="row-fluid" style="margin-top:15px">
<?php
// Search box..
include PATH . 'content/' . MS_TEMPLATE_SET . '/faq-search-box.tpl.php';
?>
<table class="table table-hover">
<tbody>
示例6: plainWrap
public function plainWrap($tmp)
{
$msg = $this->convertChar($this->convertTags($this->template($tmp['template']), 'plain'));
$parse = explode('<-{separater}->', $msg);
// Check for 3 slots, ie: 2 separators..
if (count($parse) == 3) {
$head = trim(strip_tags($parse[0]));
$cont = trim(strip_tags($parse[1]));
$foot = trim(strip_tags($parse[2]));
} else {
$head = mswCleanData(strip_tags($this->config['website']));
$cont = trim(strip_tags($msg));
$foot = mswCleanData(strip_tags($this->config['scriptpath']));
}
return $head . mswDefineNewline() . $this->plainTxtSep() . mswDefineNewline() . mswDefineNewline() . $cont . mswDefineNewline() . mswDefineNewline() . $this->plainTxtSep() . mswDefineNewline() . $foot . $this->appendFooterToEmails();
}
示例7: mswCleanData
exit;
}
if (isset($_POST['process'])) {
if (trim($_POST['name']) && mswIsValidEmail($_POST['email'])) {
if ($_POST['accpass'] == '') {
$_POST['accpass'] = $MSPORTAL->generate();
}
$MSUSERS->add();
// Send mail..
if (isset($_POST['welcome'])) {
// Message tags..
$MSMAIL->addTag('{NAME}', mswCleanData($_POST['name']));
$MSMAIL->addTag('{EMAIL}', $_POST['email']);
$MSMAIL->addTag('{PASSWORD}', $_POST['accpass']);
// Send..
$MSMAIL->sendMSMail(array('from_email' => $SETTINGS->email, 'from_name' => mswCleanData($SETTINGS->website), 'to_email' => $_POST['email'], 'to_name' => $_POST['name'], 'subject' => str_replace(array('{website}'), array($SETTINGS->website), $emailSubjects['team-account']), 'replyto' => array('name' => $SETTINGS->website, 'email' => $SETTINGS->replyto ? $SETTINGS->replyto : $SETTINGS->email), 'template' => LANG_PATH . 'admin-new-team.txt', 'language' => $SETTINGS->language));
}
$OK1 = true;
}
}
if (isset($_POST['update'])) {
if (trim($_POST['name']) && mswIsValidEmail($_POST['email'])) {
// Check edit for global user..
if ($_GET['edit'] == '1' && $MSTEAM->id != '1') {
$HEADERS->err403(true);
}
$MSUSERS->update($MSTEAM->id);
$OK2 = true;
}
}
$title = isset($_GET['edit']) ? $msg_user14 : $msg_adheader57;
示例8: doDump
public function doDump()
{
global $SETTINGS, $MSDT;
$header = '#--------------------------------------------------------' . mswDefineNewline();
$header .= '# MYSQL DATABASE SCHEMATIC' . mswDefineNewline();
$header .= '# HelpDesk: ' . mswCleanData($this->settings->website) . mswDefineNewline();
$header .= '# ' . SCRIPT_NAME . ' Version: ' . SCRIPT_VERSION . mswDefineNewline();
$header .= '# Date Created: ' . $MSDT->mswDateTimeDisplay(0, $SETTINGS->dateformat) . ' @ ' . $MSDT->mswDateTimeDisplay(0, $SETTINGS->timeformat) . mswDefineNewline();
$header .= '# MySQL Version: ' . dbBackup::getMySQLVersion() . mswDefineNewline();
$header .= '#--------------------------------------------------------' . mswDefineNewline() . mswDefineNewline();
dbBackup::saveToFile($this->file, $header . 'SET FOREIGN_KEY_CHECKS = 0;' . mswDefineNewline() . mswDefineNewline());
dbBackup::getDatabaseStructure();
dbBackup::getDatabaseData($this->hexValue);
dbBackup::saveToFile($this->file, 'SET FOREIGN_KEY_CHECKS = 1;' . mswDefineNewline() . mswDefineNewline());
dbBackup::closeFile($this->file);
return true;
}
示例9: strtoupper
<div class="block" style="margin-top:40px">
<p class="block-heading" id="hisblockhead">(<span id="hiscount"><?php
echo @number_format($historyRows);
?>
</span>) <?php
echo strtoupper($msg_viewticket110) . ' (#' . mswTicketNumber($_GET['id']);
?>
)<?php
echo $historyRows > 0 ? (USER_DEL_PRIV == 'yes' ? ' <a class="toggleFields pull-right" href="#" onclick="confirmMessageExecute(\'' . mswSpecialChars($msg_script_action) . '\',\'history\',\'0##' . $_GET['id'] . '\');return false"><i class="icon-remove"></i> ' . $msg_viewticket118 . '</a> ' : '') . '<a class="toggleFields pull-right" href="index.php?p=view-ticket&exportHistory=' . $_GET['id'] . '"><i class="icon-save"></i> ' . $msg_viewticket112 . '</a>' : '';
?>
</p>
<div class="block-body" style="max-height:300px;overflow:auto" id="historyArea">
<?php
if ($historyRows > 0) {
while ($HIS = mysql_fetch_object($qTH)) {
echo '<span class="historyEntry" id="history_entry_' . $HIS->id . '"><i class="icon-caret-right"></i> <span class="highlighter">' . $MSDT->mswDateTimeDisplay($HIS->ts, $SETTINGS->dateformat) . ' - ' . $MSDT->mswDateTimeDisplay($HIS->ts, $SETTINGS->timeformat) . '</span> - ' . mswCleanData($HIS->action) . (USER_DEL_PRIV == 'yes' ? ' <i class="icon-remove" style="cursor:pointer" onclick="mswRemoveHistory(\'' . $HIS->id . '\',\'0\')" title="' . mswSpecialChars($msg_public_history12) . '"></i>' : '') . '</span>';
}
} else {
?>
<p class="nodata"><?php
echo $msg_viewticket111;
?>
</p>
<?php
}
?>
</div>
</div>
<?php
}
// Footer links..
示例10: mswSpecialChars
?>
<button onclick="ms_confirmButtonAction('form','<?php
echo mswSpecialChars($msg_script_action);
?>
','delete');return false;" class="btn btn-danger" disabled="disabled" type="submit" id="delButton"><i class="icon-trash"></i> <?php
echo mswCleanData($msg_open23);
?>
<span id="mc_countVal">(0)</span></button>
<?php
}
?>
<button onclick="ms_confirmButtonAction('form','<?php
echo mswSpecialChars($msg_script_action);
?>
','re-open');return false;" class="btn btn-info" disabled="disabled" type="submit" id="delButton2"><i class="icon-unlock"></i> <?php
echo mswCleanData($msg_open40);
?>
<span id="mc_countVal2">(0)</span></button>
</div>
<?php
}
if ($countedRows > 0 && $countedRows > $limit) {
?>
<div class="pagination pagination-small pagination-right">
<?php
define('PER_PAGE', $limit);
$PGS = new pagination($countedRows, '?p=' . $cmd . mswQueryParams(array('p', 'next')) . '&next=');
echo $PGS->display();
?>
</div>
<?php
示例11: mysql_query
echo $msg_mailbox6;
?>
</a></li>
<?php
$qF = mysql_query("SELECT `id`,`folder`\n FROM `" . DB_PREFIX . "mailfolders`\n\t\t WHERE `staffID` = '{$MSTEAM->id}'\n ORDER BY `folder`\n\t\t ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
if (mysql_num_rows($qF) > 0) {
$moveToFolders['-'] = '- - - - - - -';
}
while ($FOLDERS = mysql_fetch_object($qF)) {
$moveToFolders[$FOLDERS->id] = mswCleanData($FOLDERS->folder);
?>
<li><a href="?p=mailbox&f=<?php
echo $FOLDERS->id;
?>
"><i class="icon-folder-close-alt"></i> <?php
echo mswCleanData($FOLDERS->folder);
?>
</a></li>
<?php
}
?>
</ul>
</li>
<?php
}
?>
<li<?php
echo isset($_GET['new']) ? ' class="active"' : '';
?>
><a href="?p=mailbox&new=1"><i class="icon-pencil"></i> <?php
echo $msg_mailbox4;
示例12: mswSpecialChars
// Show password error if applicable..
if (isset($P_ERROR)) {
?>
<div class="alert alert-error" style="margin-top:0" id="e_pass">
<a class="close" data-dismiss="alert">×</a> <?php
echo $msg_login4;
?>
</div>
<?php
}
?>
<a href="#" onclick="sysLoginEvent();return false" class="btn btn-primary pull-right" title="<?php
echo mswSpecialChars($msg_login5);
?>
"><?php
echo mswCleanData($msg_login5);
?>
</a>
<?php
// Is cookie set?
if (COOKIE_NAME) {
?>
<label class="remember-me"><input type="checkbox" name="cookie" value="1"> <?php
echo $msg_login3;
?>
</label>
<?php
}
?>
<input type="hidden" name="process" value="1">
<div class="clearfix"></div>
示例13: array_map
if (strpos($SETTINGS->backupEmails, ',') !== false) {
// Multiple addresses..
$emails = array_map('trim', explode(',', $SETTINGS->backupEmails));
// First email is main address..
if (isset($emails[0])) {
$em = $emails[0];
// Now remove it from array..
unset($emails[0]);
}
// Implode additional addresses..
if (!empty($emails)) {
$em_add = implode(',', $emails);
}
} else {
// Just main address..
$em = $SETTINGS->backupEmails;
}
if ($em) {
$MSMAIL->addTag('{HELPDESK}', mswCleanData($SETTINGS->website));
$MSMAIL->addTag('{DATE_TIME}', $MSDT->mswDateTimeDisplay($MSDT->mswTimeStamp(), $SETTINGS->dateformat) . ' @ ' . $MSDT->mswDateTimeDisplay($MSDT->mswTimeStamp(), $SETTINGS->timeformat));
$MSMAIL->addTag('{VERSION}', SCRIPT_VERSION);
$MSMAIL->addTag('{FILE}', basename($filepath));
$MSMAIL->addTag('{SCRIPT}', SCRIPT_NAME);
$MSMAIL->addTag('{SIZE}', mswFileSizeConversion(@filesize($filepath)));
$MSMAIL->attachments[$filepath] = basename($filepath);
$MSMAIL->sendMSMail(array('from_email' => $SETTINGS->email, 'from_name' => $SETTINGS->website, 'to_email' => $em, 'to_name' => $em, 'subject' => str_replace(array('{website}'), array($SETTINGS->website), $emailSubjects['db-backup']), 'replyto' => array('name' => $SETTINGS->website, 'email' => $SETTINGS->replyto ? $SETTINGS->replyto : $SETTINGS->email), 'template' => PATH . 'content/language/' . $SETTINGS->language . '/mail-templates/backup.txt', 'language' => $SETTINGS->language, 'alive' => $em_add ? 'yes' : 'no', 'add-emails' => $em_add));
// Remove file..
@unlink($filepath);
}
}
echo $msg_script32;
示例14: mysql_query
// Custom fields..
$qF = mysql_query("SELECT * FROM `" . DB_PREFIX . "cusfields`\n WHERE FIND_IN_SET('{$area}',`fieldLoc`) > 0\n AND `enField` = 'yes'\n\t\tAND FIND_IN_SET('{$dept}',`departments`) > 0\n ORDER BY `orderBy`\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
if (mysql_num_rows($qF) > 0) {
while ($FIELDS = mysql_fetch_object($qF)) {
switch ($FIELDS->fieldType) {
case 'textarea':
$fields .= $MSFM->buildTextArea(mswCleanData($FIELDS->fieldInstructions), $FIELDS->id, ++$tabIndex);
break;
case 'input':
$fields .= $MSFM->buildInputBox(mswCleanData($FIELDS->fieldInstructions), $FIELDS->id, ++$tabIndex);
break;
case 'select':
$fields .= $MSFM->buildSelect(mswCleanData($FIELDS->fieldInstructions), $FIELDS->id, $FIELDS->fieldOptions, ++$tabIndex);
break;
case 'checkbox':
$fields .= $MSFM->buildCheckBox(mswCleanData($FIELDS->fieldInstructions), $FIELDS->id, $FIELDS->fieldOptions);
break;
}
}
}
$json = array('fields' => $fields);
break;
//=======================
// Delete attachments
//=======================
//=======================
// Delete attachments
//=======================
case 'del-attach':
$json = array('count' => 0, 'ids' => 'err', 'text' => '');
if (isset($_GET['t']) && isset($_GET['r'])) {
示例15: array_map
// Load the skip words array..
include PATH . 'control/skipwords.php';
// Variables..
$limitvalue = $page * $SETTINGS->quePerPage - $SETTINGS->quePerPage;
$pageNumbers = '';
$html = '';
$title = $msg_pkbase;
$dataCount = 0;
// Build search query..
$SQL = '';
if ($_GET['q']) {
$chop = array_map('trim', explode(' ', $_GET['q']));
if (!empty($chop)) {
foreach ($chop as $word) {
if (!in_array($word, $searchSkipWords)) {
$SQL .= (!$SQL ? 'WHERE (' : 'OR (') . "`question` LIKE '%" . mswCleanData(mswSafeImportString($word)) . "%' OR `answer` LIKE '%" . mswCleanData(mswSafeImportString($word)) . "%')";
}
}
}
// Are we searching for anything..
if ($SQL) {
$html = $FAQ->questions(0, $limitvalue, $SETTINGS, array($SQL, 'no'));
$dataCount = $FAQ->questions(0, $limitvalue, $SETTINGS, array($SQL, 'yes'));
}
}
// Pagination..
if ($dataCount > $SETTINGS->quePerPage) {
define('PER_PAGE', $SETTINGS->quePerPage);
$PTION = new pagination($dataCount, '?q=' . urlencode($_GET['q']) . mswQueryParams(array('q', 'p', 'next')) . '&next=');
$pageNumbers = $PTION->display();
}