本文整理汇总了PHP中stripSlashes函数的典型用法代码示例。如果您正苦于以下问题:PHP stripSlashes函数的具体用法?PHP stripSlashes怎么用?PHP stripSlashes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了stripSlashes函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: RepSpeRssStr
function RepSpeRssStr($str)
{
$str = stripSlashes($str);
$str = ehtmlspecialchars($str, ENT_QUOTES);
$str = str_replace(array('[!--empirenews.page--]', '[/!--empirenews.page--]', '[', ']'), array('', '', '', ''), $str);
return $str;
}
开发者ID:novnan,项目名称:meiju,代码行数:7,代码来源:index.php
示例2: RepPostVar
function RepPostVar($val)
{
$val = str_replace(" ", "", $val);
$val = str_replace("'", "", $val);
$val = str_replace("\"", "", $val);
$val = addslashes(stripSlashes($val));
return $val;
}
开发者ID:laiello,项目名称:netos-cms,代码行数:8,代码来源:connect.php
示例3: unserializeData
protected function unserializeData()
{
$data = $this->getData();
$result = null;
$dataType = gettype($data);
switch ($dataType) {
case 'object':
$dataType = get_class($data);
case 'TSimpleHttpResponse':
$format = $this->getServiceProtocol();
if ($data->isHeader('X-MCP-API-ResonseServiceProtocol')) {
$format = $data->getHeader('X-MCP-API-ResonseServiceProtocol');
}
if (!in_array($format, array($this->getServiceProtocol(), TServiceProtocol::NONE, TServiceProtocol::UNKNOWN))) {
throw new TDispatchAdapterException('adapter_protocol_not_supported', __CLASS__, $format);
}
$result = TNvpSerializer::unserialize($data->getBody());
break;
case 'boolean':
case 'integer':
case 'boolean':
case 'array':
case 'null':
case 'NULL':
$result = TNvpSerializer::unserialize(TNvpSerializer::serialize($data));
break;
case 'string':
$result = TNvpSerializer::unserialize($data);
break;
case 'resource':
case 'unknown type':
default:
throw new TDispatchAdapterException('adapter_datatype_not_supported', $dataType);
break;
}
do {
if (!isset($result['error'])) {
break;
}
if ($result['error'] == 0) {
break;
}
$code = $result['error'];
$msg = isset($result['errorMessage']) ? stripSlashes($result['errorMessage']) : '';
throw new Exception($msg, $code);
} while (0);
do {
if (!isset($result['result'])) {
break;
}
if (count($result) > 2) {
break;
}
$result = $result['result'];
} while (0);
return $result;
}
开发者ID:grlf,项目名称:eyedock,代码行数:57,代码来源:TNvpDispatchResponseAdapter.php
示例4: stripslashes
/**
* @ stripslashes()
* @param data $data
* @return string $data
* addSlashes adverse function
* */
public static function stripslashes($data)
{
if (is_array($data)) {
foreach ($data as $key => $value) {
$data[$key] = self::stripSlashes($value);
}
} else {
$data = stripSlashes(trim($data));
}
return $data;
}
开发者ID:uwitec,项目名称:mgoa,代码行数:17,代码来源:request.php
示例5: serialize_array
public function serialize_array($name, $arr)
{
$tmp = json_encode($arr);
$tmp = str_replace(":{", " => [", $tmp);
$tmp = str_replace("{", "[", $tmp);
$tmp = str_replace("},", "],\n\t", $tmp);
$tmp = str_replace("}", "]", $tmp);
$tmp = str_replace(":", " => ", $tmp);
$tmp = str_replace('"', "'", $tmp);
$tmp = "\$" . $name . " = " . stripSlashes($tmp) . ";";
return $tmp;
}
开发者ID:orchid,项目名称:orchid,代码行数:12,代码来源:Tools.php
示例6: ShowBuyproduct
function ShowBuyproduct($buycar, $payby)
{
global $empire, $dbtbpre;
$record = "!";
$field = "|";
$r = explode($record, $buycar);
$alltotal = 0;
$alltotalfen = 0;
echo "<table width='100%' border=0 align=center cellpadding=3 cellspacing=1>\r\n <tr class='header'> \r\n <td width='9%' height=23> <div align=center>序号</div></td>\r\n <td width='43%'> <div align=center>商品名称</div></td>\r\n <td width='19%'> <div align=center>单价</div></td>\r\n <td width='10%'> <div align=center>数量</div></td>\r\n <td width='19%'> <div align=center>小计</div></td>\r\n </tr>";
$j = 0;
for ($i = 0; $i < count($r) - 1; $i++) {
$j++;
$pr = explode($field, $r[$i]);
$productid = $pr[1];
$fr = explode(",", $pr[1]);
//ID
$classid = (int) $fr[0];
$id = (int) $fr[1];
//数量
$num = (int) $pr[2];
if (empty($num)) {
$num = 1;
}
//单价
$price = $pr[3];
$thistotal = $price * $num;
$buyfen = $pr[4];
$thistotalfen = $buyfen * $num;
if ($payby == 1) {
$showprice = $buyfen . " 点";
$showthistotal = $thistotalfen . " 点";
} else {
$showprice = $price . " 元";
$showthistotal = $thistotal . " 元";
}
//产品名称
$title = stripSlashes($pr[5]);
//返回链接
$titleurl = "../../public/InfoUrl/?classid={$classid}&id={$id}";
$alltotal += $thistotal;
$alltotalfen += $thistotalfen;
echo "<tr>\r\n\t<td align=center>" . $j . "</td>\r\n\t<td align=center><a href='" . $titleurl . "' target=_blank>" . $title . "</a></td>\r\n\t<td align=right><b>¥" . $showprice . "</b></td>\r\n\t<td align=right>" . $num . "</td>\r\n\t<td align=right>" . $showthistotal . "</td>\r\n\t</tr>";
}
//支付点数付费
if ($payby == 1) {
$a = "<tr> \r\n <td colspan=5><div align=right>合计点数:<strong>" . $alltotalfen . "</strong></div></td>\r\n <td> </td>\r\n </tr>\r\n\t</table>";
} else {
echo "<tr> \r\n <td colspan=5><div align=right>合计:<strong>¥" . $alltotal . "</strong></div></td>\r\n <td> </td>\r\n </tr>\r\n </table>";
}
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:50,代码来源:ShowDd.php
示例7: _stripSlashes
/**
* enleve tout les slashes d'une chaine ou d'un tableau de chaine
* @param string/array $string
* @return string/array l'objet transformé
*/
function _stripSlashes($string)
{
if ($this->magic_quotes) {
if (is_array($string)) {
$toReturn = array();
// c'est un tableau, on traite un à un tout les elements du tableau
foreach ($string as $key => $elem) {
$toReturn[$key] = $this->_stripSlashes($elem);
}
return $toReturn;
} else {
return stripSlashes($string);
}
} else {
return $string;
}
}
开发者ID:BackupTheBerlios,项目名称:phpaie,代码行数:22,代码来源:magicquotes.plugin.php
示例8: encode
function encode($string)
{
$string = trim($string);
$string = stripSlashes("{$string}");
$string = str_replace("&", "&", $string);
$string = str_replace("'", "'", $string);
$string = str_replace("&amp;", "&", $string);
$string = str_replace("&quot;", """, $string);
$string = str_replace("\"", """, $string);
$string = str_replace("&lt;", "<", $string);
$string = str_replace("<", "<", $string);
$string = str_replace("&gt;", ">", $string);
$string = str_replace(">", ">", $string);
$string = str_replace("&nbsp;", " ", $string);
$string = nl2br($string);
return $string;
}
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:17,代码来源:tttof2blog.php
示例9: normalizeArray
private function normalizeArray(&$arr)
{
// The following function strips slashes from
// an HTTP input. Note: parameter is passed by reference
// Scan the array
foreach ($arr as $key => $value) {
if (!is_array($value)) {
// Let's go
$arr[$key] = stripSlashes($value);
} else {
// Recursive call.
$this->normalizeArray($arr[$key]);
}
}
reset($arr);
return $arr;
}
开发者ID:camilorivera,项目名称:INNOVARE,代码行数:17,代码来源:Front.php
示例10: API_Login
function API_Login($user, $pass)
{
global $Block, $setting, $onlineip, $_COOKIE, $_SERVER;
$pwd = md5($pass);
$user = Conn()->record("members", "uid,username,password,safecv", "username='{$user}' and password='{$pwd}'");
if (!$user) {
return false;
}
$winduid = $user[0]['uid'];
$windpwd = md5($_SERVER['HTTP_USER_AGENT'] . $pwd . $GLOBALS['db_hash']);
$safecv = $user[0]['safecv'];
$username = $user[0]['username'];
$winduser = StrCode(stripSlashes("{$winduid}\t{$windpwd}\t{$safecv}"), "ENCODE");
$GLOBALS['cookiepre'] = substr(md5($GLOBALS['db_sitehash']), 0, 5) . '_';
osetcookie('winduser', $winduser, 31536000);
osetcookie('ck_info', $GLOBALS['db_ckpath'] . "\t" . $GLOBALS['db_ckdomain'], 31536000);
osetcookie('lastvisit', '', 0);
$GLOBALS['cookiepre'] = 'onez_';
osetcookie('userid', $winduid, 31536000);
osetcookie('username', $username, 31536000);
return 'Y';
}
开发者ID:shenhua4286,项目名称:gxw,代码行数:22,代码来源:phpwind.php
示例11: parse_template
public function parse_template()
{
// On passe au tpl de la page les 2 variables nécessaires à son bon fonctionnement
$args = $this->args;
$datas = $this->datas;
// On instancie la table des tags par défaut
$transformateur = new odTransform();
// On lit le contenu de module.tpl
$this->read_module();
// S'il y a quelque chose dans module.tpl, il ne doit y avoir que des tag omodule
if (strlen($this->file_content) != 0) {
// On va chercher le tag omodule
$module_tag = $transformateur->get_named_tag("omodule");
// On le transforme par l'instruction d'ajout dans la table des tags de odTransform
$this->file_content = preg_replace($module_tag[0], html_entity_decode($module_tag[1]), $this->file_content);
// même chose pour le tag block
$module_tag = $transformateur->get_named_tag("block");
$this->file_content = preg_replace($module_tag[0], html_entity_decode($module_tag[1]), $this->file_content);
// On supprime cette variable pour ne pas la retrouver dans les variables définies
unset($module_tag);
// Et on exécute l'instruction d'ajout dans la table des tags
eval(stripSlashes("?\\>" . utf8_encode($this->file_content)));
}
// On lit le template de la page
$this->read_template();
// S'il y a quelque chose dans le template
if (strlen($this->file_content) != 0) {
// On transforme tous les tags trouvés par leur valeur définie dans la table des tags
foreach ($transformateur->get_all_tags() as $odtag) {
$this->file_content = preg_replace($odtag[0], html_entity_decode($odtag[1]), $this->file_content);
}
// On supprime les variables que l'on ne doit pas voir
unset($odtag);
unset($transformateur);
file_put_contents("logs/output.php", $this->file_content);
// On évalue le code obtenu de la page
eval(stripSlashes("?\\>" . utf8_encode($this->file_content)));
}
}
开发者ID:orchid,项目名称:orchid,代码行数:39,代码来源:odTemplate.class.php
示例12: ecmsShowInfoTop
function ecmsShowInfoTop($query, $where, $field, $topnum, $day)
{
global $empire, $dbtbpre, $class_r;
if ($day) {
$and = $where ? ' and ' : ' where ';
$query .= $and . "newstime>=" . time() . "-" . $day * 24 * 3600;
}
if ($field == 'plnum') {
$word = '评论数';
} elseif ($field == 'totaldown') {
$word = '下载数';
} elseif ($field == 'onclick') {
$word = '点击数';
}
$query .= " order by " . $field . " desc limit " . $topnum;
echo "<table width='100%' border='0' cellpadding='3' cellspacing='1' class='tableborder'><tr><td width='85%'>标题</td><td width='15%'>{$word}</td></tr>";
$sql = $empire->query($query);
while ($r = $empire->fetch($sql)) {
$classurl = sys_ReturnBqClassname($r, 9);
$titleurl = sys_ReturnBqTitleLink($r);
echo "<tr bgcolor='#ffffff' height='23'><td>[<a href='" . $classurl . "' target='_blank'>" . $class_r[$r[classid]][classname] . "</a>] <a href='{$titleurl}' target='_blank' title='发布时间:" . date("Y-m-d H:i:s", $r[newstime]) . "'>" . stripSlashes($r[title]) . "</a></td><td>" . $r[$field] . "</td></tr>";
}
echo "</table>";
}
开发者ID:novnan,项目名称:meiju,代码行数:24,代码来源:infotop.php
示例13: intval
$modid = intval(empty($_GET["modid"]) ? @$args["modid"] : $_GET["modid"]);
$catid = intval(empty($_GET["catid"]) ? @$args["catid"] : $_GET["catid"]);
$start = intval(empty($_GET["start"]) ? @$args["start"] : $_GET["start"]);
if (empty($modid) && is_object($GLOBALS["xoopsModule"]) && "tag" != $GLOBALS["xoopsModule"]->getVar("dirname")) {
$modid = $GLOBALS["xoopsModule"]->getVar("mid");
}
if (empty($tag_id) && empty($tag_term)) {
redirect_header(XOOPS_URL . "/modules/" . $GLOBALS["xoopsModule"]->getVar("dirname") . "/index.php", 2, TAG_MD_INVALID);
exit;
}
$tag_handler =& xoops_getmodulehandler("tag", "tag");
if (!empty($tag_id)) {
$tag_obj =& $tag_handler->get($tag_id);
$tag_term = $tag_obj->getVar("tag_term", "n");
} else {
if (!($tags_obj = $tag_handler->getObjects(new Criteria("tag_term", addSlashes(stripSlashes($tag_term)))))) {
redirect_header(XOOPS_URL . "/modules/" . $GLOBALS["xoopsModule"]->getVar("dirname") . "/index.php", 2, TAG_MD_INVALID);
exit;
}
$tag_obj =& $tags_obj[0];
$tag_id = $tag_obj->getVar("tag_id");
}
if (!empty($tag_desc)) {
$page_title = $tag_desc;
} else {
$module_name = "tag" == $xoopsModule->getVar("dirname") ? $xoopsConfig["sitename"] : $xoopsModule->getVar("name");
$page_title = sprintf(TAG_MD_TAGVIEW, htmlspecialchars($tag_term), $module_name);
}
$xoopsOption["template_main"] = "tag_view.html";
$xoopsOption["xoops_pagetitle"] = strip_tags($page_title);
include XOOPS_ROOT_PATH . "/header.php";
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:view.tag.php
示例14: isset
$panels[$i - 1]->pict = isset($_GET['panel' . $i . 'pict']) ? stripSlashes($_GET['panel' . $i . 'pict']) : "cfco2014.jpg";
$panels[$i - 1]->slides = isset($_GET['panel' . $i . 'slides']) ? stripSlashes($_GET['panel' . $i . 'slides']) : "";
$panels[$i - 1]->txt = isset($_GET['panel' . $i . 'txt']) ? stripSlashes($_GET['panel' . $i . 'txt']) : "Welcome";
$panels[$i - 1]->txtsize = isset($_GET['panel' . $i . 'txtsize']) ? intval($_GET['panel' . $i . 'txtsize']) : 16;
$panels[$i - 1]->txtcolor = isset($_GET['panel' . $i . 'txtcolor']) ? stripSlashes($_GET['panel' . $i . 'txtcolor']) : "000000";
$panels[$i - 1]->html = isset($_GET['panel' . $i . 'html']) ? stripSlashes($_GET['panel' . $i . 'html']) : "exemple.html";
$panels[$i - 1]->firstline = isset($_GET['panel' . $i . 'firstline']) ? intval($_GET['panel' . $i . 'firstline']) : 1;
$panels[$i - 1]->fixedlines = isset($_GET['panel' . $i . 'fixedlines']) ? intval($_GET['panel' . $i . 'fixedlines']) : 10;
$panels[$i - 1]->scrolledlines = isset($_GET['panel' . $i . 'scrolledlines']) ? intval($_GET['panel' . $i . 'scrolledlines']) : 17;
$panels[$i - 1]->scrolltime = isset($_GET['panel' . $i . 'scrolltime']) ? intval($_GET['panel' . $i . 'scrolltime']) : 10;
$panels[$i - 1]->scrollbeforetime = isset($_GET['panel' . $i . 'scrollbeforetime']) ? intval($_GET['panel' . $i . 'scrollbeforetime']) : 50;
$panels[$i - 1]->scrollaftertime = isset($_GET['panel' . $i . 'scrollaftertime']) ? intval($_GET['panel' . $i . 'scrollaftertime']) : 80;
$panels[$i - 1]->updateduration = isset($_GET['panel' . $i . 'updateduration']) ? intval($_GET['panel' . $i . 'updateduration']) : 3;
$panels[$i - 1]->radioctrl = isset($_GET['panel' . $i . 'radioctrl']) ? intval($_GET['panel' . $i . 'radioctrl']) : 31;
}
$title = isset($_GET['title']) ? stripSlashes($_GET['title']) : "no title";
$chkall = isset($_GET['chkall']) ? $_GET['chkall'] : null;
$res = mysql_query("SELECT rcid FROM resultscreen WHERE rcid={$rcid} AND sid={$sid}");
if (mysql_num_rows($res) > 0) {
$now = time();
$str = "cid='" . $cid . "', ";
$str = $str . "panelscount='" . $panelscount . "', ";
$str = $str . "style='" . addSlashes($style) . "', ";
$str = $str . "title='" . addSlashes($title) . "', ";
$str = $str . "titlesize='" . $titlesize . "', ";
$str = $str . "titlecolor='" . addSlashes($titlecolor) . "', ";
$str = $str . "subtitle='" . addSlashes($subtitle) . "', ";
$str = $str . "subtitlesize='" . $subtitlesize . "', ";
$str = $str . "subtitlecolor='" . addSlashes($subtitlecolor) . "', ";
$str = $str . "titleleftpict='" . addSlashes($titleleftpict) . "', ";
$str = $str . "titlerightpict='" . addSlashes($titlerightpict) . "', ";
开发者ID:jmonclard,项目名称:MopScreens,代码行数:31,代码来源:screen.php
示例15: caGetOption
/**
* Get the hierarchy in list form
*
* @param int $pn_id
* @param array $pa_options
*
* additionalTableToJoin: name of table to join to hierarchical table (and return fields from); only fields related many-to-one are currently supported
* idsOnly = return simple array of primary key values for child records rather than full data array
* returnDeleted = return deleted records in list (def. false)
* maxLevels =
* dontIncludeRoot =
* includeSelf =
*
* @return array
*/
public function &getHierarchyAsList($pn_id = null, $pa_options = null)
{
if (!$this->isHierarchical()) {
return null;
}
$pb_ids_only = caGetOption('idsOnly', $pa_options, false);
$pn_max_levels = caGetOption('maxLevels', $pa_options, null, array('cast' => 'int'));
$ps_additional_table_to_join = caGetOption('additionalTableToJoin', $pa_options, null);
$pb_dont_include_root = caGetOption('dontIncludeRoot', $pa_options, false);
$pb_include_self = caGetOption('includeSelf', $pa_options, false);
if ($pn_id && $pb_include_self) {
$pb_dont_include_root = false;
}
if ($qr_hier = $this->getHierarchy($pn_id, $pa_options)) {
if ($pb_ids_only) {
if (!$pb_include_self || $pb_dont_include_root) {
if (($vn_i = array_search($pn_id, $qr_hier)) !== false) {
unset($qr_hier[$vn_i]);
}
}
return $qr_hier;
}
$vs_hier_right_fld = $this->getProperty("HIERARCHY_RIGHT_INDEX_FLD");
$va_indent_stack = array();
$va_hier = array();
$vn_cur_level = -1;
$va_omit_stack = array();
$vn_root_id = $pn_id;
while ($qr_hier->nextRow()) {
$vn_row_id = $qr_hier->get($this->primaryKey());
if (is_null($vn_root_id)) {
$vn_root_id = $vn_row_id;
}
if ($pb_dont_include_root && $vn_row_id == $vn_root_id) {
continue;
}
// skip root if desired
$vn_r = $qr_hier->get($vs_hier_right_fld);
$vn_c = sizeof($va_indent_stack);
if ($vn_c > 0) {
while ($vn_c && $va_indent_stack[$vn_c - 1] <= $vn_r) {
array_pop($va_indent_stack);
$vn_c = sizeof($va_indent_stack);
}
}
if ($vn_cur_level != sizeof($va_indent_stack)) {
if ($vn_cur_level > sizeof($va_indent_stack)) {
$va_omit_stack = array();
}
$vn_cur_level = intval(sizeof($va_indent_stack));
}
if (is_null($pn_max_levels) || $vn_cur_level < $pn_max_levels) {
$va_field_values = $qr_hier->getRow();
foreach ($va_field_values as $vs_key => $vs_val) {
$va_field_values[$vs_key] = stripSlashes($vs_val);
}
if ($pb_ids_only) {
$va_hier[] = $vn_row_id;
} else {
$va_node = array("NODE" => $va_field_values, "LEVEL" => $vn_cur_level);
$va_hier[] = $va_node;
}
}
$va_indent_stack[] = $vn_r;
}
return $va_hier;
} else {
return null;
}
}
开发者ID:samrahman,项目名称:providence,代码行数:85,代码来源:BaseModel.php
示例16: _filter_gpc
function _filter_gpc($value)
{
return get_magic_quotes_gpc() ? stripSlashes($value) : $value;
}
开发者ID:hiroki-namekawa,项目名称:test-upr,代码行数:4,代码来源:Esform_ActionForm.php
示例17: jzBlocks
$jzUSER->storePlaylist($pl);
if (!defined('NO_AJAX_JUKEBOX')) {
$blocks = new jzBlocks();
$blocks->playlistDisplay();
exit;
}
} else {
if (isset($_POST['jz_path']) && isset($_POST['addPath']) || isset($_POST['addList']) && sizeof($_POST['jz_list']) == 0) {
$exit = false;
$guy =& new jzMediaNode($_POST['jz_path']);
if (isset($_POST['doquery']) && $_POST['query'] != "") {
if ($_POST['how'] == "search") {
$root =& new jzMediaNode();
$list = $root->search(stripSlashes($_POST['query']), "tracks", -1);
} else {
$list = $guy->search(stripSlashes($_POST['query']), "tracks", -1);
}
$pl = $jzUSER->loadPlaylist();
$pl->add($list);
$jzUSER->storePlaylist($pl);
if (!defined('NO_AJAX_JUKEBOX')) {
$blocks = new jzBlocks();
$blocks->playlistDisplay();
exit;
}
} else {
$pl = $jzUSER->loadPlaylist();
$pl->add($guy);
$jzUSER->storePlaylist($pl);
if (!defined('NO_AJAX_JUKEBOX')) {
$blocks = new jzBlocks();
开发者ID:seanfbrown,项目名称:jinzora,代码行数:31,代码来源:index.php
示例18: get
/**
* Get the value of a field in the current row.
* Possible keys in the options array:
* binary, unserialize, convertHTMLBreaks, urlEncode, filterHTMLSpecialCharacters, escapeForXML, stripSlashes
*
* @param string $ps_field field name
* @param array $pa_options associative array of options, keys are names of the options, values are boolean.
* @return mixed
*/
function get($ps_field, $pa_options = null)
{
$va_field = isset(DbResult::$s_field_info_cache[$ps_field]) ? DbResult::$s_field_info_cache[$ps_field] : $this->getFieldInfo($ps_field);
if (!isset($this->opa_current_row[$va_field["field"]])) {
return null;
}
$vs_val = isset($this->opa_current_row[$va_field["field"]]) ? $this->opa_current_row[$va_field["field"]] : null;
if (isset($pa_options["binary"]) && $pa_options["binary"]) {
return $vs_val;
}
if (isset($pa_options["unserialize"]) && $pa_options["unserialize"]) {
if (!isset($this->opa_unserialized_cache[$va_field["field"]]) || !($vm_data = $this->opa_unserialized_cache[$va_field["field"]])) {
$vm_data = caUnserializeForDatabase($vs_val);
$this->opa_unserialized_cache[$va_field["field"]] =& $vm_data;
}
return $vm_data;
}
if (isset($pa_options["convertHTMLBreaks"]) && $pa_options["convertHTMLBreaks"]) {
# check for tags before converting breaks
preg_match_all("/<[A-Za-z0-9]+/", $vs_val, $va_tags);
$va_ok_tags = array("<b", "<i", "<u", "<strong", "<em", "<strike", "<sub", "<sup", "<a", "<img", "<span");
$vb_convert_breaks = true;
foreach ($va_tags[0] as $vs_tag) {
if (!in_array($vs_tag, $va_ok_tags)) {
$vb_convert_breaks = false;
break;
}
}
if ($vb_convert_breaks) {
$vs_val = preg_replace("/(\n|\r\n){2}/", "<p/>", $vs_val);
$vs_val = ereg_replace("\n", "<br/>", $vs_val);
}
}
if (isset($pa_options["urlEncode"]) && $pa_options["urlEncode"]) {
$vs_val = urlEncode($vs_val);
}
if (isset($pa_options["filterHTMLSpecialCharacters"]) && $pa_options["filterHTMLSpecialCharacters"]) {
$vs_val = htmlentities(html_entity_decode($vs_val));
}
if (isset($pa_options["escapeForXML"]) && $pa_options["escapeForXML"]) {
$vs_val = caEscapeForXML($vs_val);
}
if (get_magic_quotes_gpc() || $pa_options["stripSlashes"]) {
$vs_val = stripSlashes($vs_val);
}
return $vs_val;
}
开发者ID:samrahman,项目名称:providence,代码行数:56,代码来源:DbResult.php
示例19: Ebak_SaveSeting
function Ebak_SaveSeting($add)
{
$savename = $add['savename'];
if (strstr($savename, '.') || strstr($savename, '/') || strstr($savename, "\\")) {
printerror("FailSetSavename", "history.go(-1)");
}
$baktype = (int) $add['baktype'];
$filesize = (int) $add['filesize'];
$bakline = (int) $add['bakline'];
$autoauf = (int) $add['autoauf'];
$bakstru = (int) $add['bakstru'];
$bakstrufour = (int) $add['bakstrufour'];
$beover = (int) $add['beover'];
$add['waitbaktime'] = (int) $add['waitbaktime'];
$bakdatatype = (int) $add['bakdatatype'];
//表列表
$tblist = "";
$tablename = $add['tablename'];
$count = count($tablename);
if ($count) {
for ($i = 0; $i < $count; $i++) {
$tblist .= $tablename[$i] . ",";
}
$tblist = "," . $tblist;
}
$str = "<?php\n\$dbaktype=" . $baktype . ";\n\$dfilesize=" . $filesize . ";\n\$dbakline=" . $bakline . ";\n\$dautoauf=" . $autoauf . ";\n\$dbakstru=" . $bakstru . ";\n\$dbakstrufour=" . $bakstrufour . ";\n\$ddbchar='" . addslashes($add['dbchar']) . "';\n\$dmypath='" . addslashes($add['mypath']) . "';\n\$dreadme=\"" . addslashes(stripSlashes($add['readme'])) . "\";\n\$dautofield='" . addslashes($add['autofield']) . "';\n\$dtblist='" . addslashes($tblist) . "';\n\$dbeover=" . $beover . ";\n\$dinsertf='" . addslashes($add['insertf']) . "';\n\$dmydbname='" . addslashes($add['mydbname']) . "';\n\$dkeyboard='" . addslashes($add['keyboard']) . "';\n\$dwaitbaktime='" . $add['waitbaktime'] . "';\n\$dbakdatatype=" . $bakdatatype . ";\n?>";
$file = "setsave/" . $savename;
WriteFiletext_n($file, $str);
printerror("SetSaveSuccess", "history.go(-1)");
}
开发者ID:shiruolin,项目名称:hzzshop,代码行数:30,代码来源:combakfun.php
示例20: ehtmlspecialchars
</table></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF">"上下页导航"式正则设置:</td>
<td bgcolor="#FFFFFF"> <table width="100%%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="50%" height="23"><strong>分页区域正则(<font color="#FF0000">[!--smallpagezz--]</font>)</strong></td>
<td><strong>分页链接正则(<font color="#FF0000">[!--pagezz--]</font>)</strong></td>
</tr>
<tr>
<td><textarea name="add[smallpagezz]" cols="42" rows="12" id="add[smallpagezz]"><?php
echo ehtmlspecialchars(stripSlashes($r[smallpagezz]));
?>
</textarea></td>
<td><textarea name="add[pagezz]" cols="42" rows="12" id="add[pagezz]"><?php
echo ehtmlspecialchars(stripSlashes($r[pagezz]));
?>
</textarea></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> <input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"> </td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td><strong>注意事项:<font color="#FF0000"><br>
</font></strong>1.*:表示不限制内容。行与行之间的间隔最好用*格开<br>
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:AddInfoClass.php
注:本文中的stripSlashes函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论