本文整理汇总了PHP中stripslashes_array函数的典型用法代码示例。如果您正苦于以下问题:PHP stripslashes_array函数的具体用法?PHP stripslashes_array怎么用?PHP stripslashes_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了stripslashes_array函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strip_request_slashes
function strip_request_slashes()
{
$_COOKIE = stripslashes_array($_COOKIE);
$_GET = stripslashes_array($_GET);
$_POST = stripslashes_array($_POST);
$_REQUEST = stripslashes_array($_REQUEST);
}
示例2: fetch_data
function fetch_data()
{
global $dbh;
$this->p_perso = new parametres_perso("empr");
$this->circ_tpl = array();
$this->piedpage = "";
$requete = "select * from serialcirc where id_serialcirc=" . $this->id;
$resultat = pmb_mysql_query($requete);
if (pmb_mysql_num_rows($resultat)) {
$r = pmb_mysql_fetch_object($resultat);
if ($r->serialcirc_tpl) {
//On va récupérer le template prédéfini
if ($r->serialcirc_tpl + 0 > 0) {
$query = "select * from serialcirc_tpl where serialcirctpl_id=" . $r->serialcirc_tpl;
$res = pmb_mysql_query($query, $dbh);
if ($res) {
$row = pmb_mysql_fetch_object($res);
if ($row->serialcirctpl_tpl) {
$this->circ_tpl = stripslashes_array(unserialize($row->serialcirctpl_tpl));
$this->piedpage = $row->serialcirctpl_piedpage;
}
}
} else {
$this->circ_tpl = stripslashes_array(unserialize($r->serialcirc_tpl));
$this->piedpage = $r->serialcirc_piedpage;
}
}
}
}
示例3: search_product_by_bn
/**
* 获取循单操作
*
* @param array $data
*
* @return 循单操作
*/
function search_product_by_bn($data)
{
$data = stripslashes_array($data);
$member = array();
$result['alert_num'] = $this->system->getConf('system.product.alert.num');
$products = array();
$product_list = json_decode($data['bns']);
$dealer_id = $data['dealer_id'];
$arr_goods_list = array();
$obj_member = $this->load_api_instance('verify_member_valid', '2.0');
$obj_member->verify_member_valid($dealer_id, $member);
//根据经销商ID验证会员记录有效性
$obj_payments = $this->load_api_instance('search_payments_by_order', '2.0');
foreach ($product_list as $bn) {
//$bn = str_replace('\\','',$bn);
$status = 'normal';
if ($product = $this->db->selectrow('select goods_id,product_id,price,store,freez,name,pdt_desc,weight from sdb_products where bn="' . $bn . '"')) {
if (!isset($arr_goods_list[$product['goods_id']])) {
$goods = $this->db->selectrow('select goods_id,cat_id,brand_id,marketable,disabled from sdb_goods where goods_id=' . $product['goods_id']);
if ($goods) {
$arr_goods_list[] = $goods;
}
} else {
$goods = $arr_goods_list[$product['goods_id']];
}
if (!$goods || $goods['disabled'] == 'true') {
$status = 'deleted';
}
if ($goods['marketable'] == 'false') {
$status = 'shelves';
}
if (is_null($product['store'])) {
$product['store'] = $product['store'];
} else {
$product['store'] = $product['store'] - $product['freez'];
}
$product['link'] = $this->system->base_url() . "index.php?ctl=product&p[0]=" . $product['goods_id'];
unset($product['freez']);
} else {
$status = 'deleted';
}
$product['price'] = $obj_payments->changer($this->get_product_lv_price($member['member_lv_id'], $product['product_id'], $product['price']));
//获取该会员下的等级价格
$product['bn'] = $bn;
$product['status'] = $status;
$goods = $this->db->selectrow("SELECT thumbnail_pic FROM sdb_goods WHERE goods_id=" . $product['goods_id']);
$thumbnail_pic = explode("|", $goods['thumbnail_pic']);
$product['thumbnail_pic'] = empty($goods['thumbnail_pic']) ? "" : (count($thumbnail_pic) == 3 ? $this->system->base_url() . $thumbnail_pic[0] : $thumbnail_pic[0]);
unset($product['goods_id']);
unset($product['product_id']);
$products[] = $product;
}
$obj_product_line = $this->load_api_instance('search_product_line', '2.0');
$obj_product_line->checkDealerPurview($member, $arr_goods_list);
//检查会员的代销权限
$result['data_info'] = $products;
$this->api_response('true', false, $result);
}
示例4: strip_all_slashes
function strip_all_slashes()
{
if (get_magic_quotes_gpc()) {
stripslashes_array($_GET, true);
stripslashes_array($_POST, true);
stripslashes_array($_COOKIE, true);
stripslashes_array($_REQUEST, true);
}
}
示例5: stripslashes_array
function stripslashes_array(&$arr)
{
foreach ($arr as &$val) {
if (is_array($val)) {
$val = stripslashes_array($val);
} else {
$val = stripslashes($val);
}
}
}
示例6: undoMagic
function undoMagic($data)
{
if (!get_magic_quotes_gpc()) {
return $data;
}
if (ini_get('magic_quotes_sybase') != 1) {
return stripslashes_array($data);
} else {
return undoSybaseQuotes_array($data);
}
}
示例7: stripslashes_array
function stripslashes_array($data)
{
if (is_array($data)) {
foreach ($data as $key => $value) {
$data[$key] = stripslashes_array($value);
}
return $data;
} else {
return stripslashes($data);
}
}
示例8: stripslashes_array
function stripslashes_array(&$array, $iterations = 0)
{
if ($iterations < 3) {
foreach ($array as $key => $value) {
if (is_array($value)) {
stripslashes_array($array[$key], $iterations + 1);
} else {
$array[$key] = stripslashes($array[$key]);
}
}
}
}
示例9: stripslashes_array
function stripslashes_array($array)
{
$rs = array();
while (list($key, $val) = @each($array)) {
if (is_array($val)) {
$rs[$key] = stripslashes_array($val);
} else {
$rs[$key] = stripslashes($val);
}
}
return $rs;
}
示例10: fetch_data
function fetch_data()
{
$this->p_perso = new parametres_perso("empr");
$this->circ_tpl = array();
$requete = "select * from serialcirc where id_serialcirc=" . $this->id;
$resultat = mysql_query($requete);
if (mysql_num_rows($resultat)) {
$r = mysql_fetch_object($resultat);
if ($r->serialcirc_tpl) {
$this->circ_tpl = stripslashes_array(unserialize($r->serialcirc_tpl));
}
}
}
示例11: stripslashes_array
function stripslashes_array(&$array)
{
if (is_array($array)) {
foreach ($array as $k => $v) {
$array[$k] = stripslashes_array($v);
}
} else {
if (is_string($array)) {
$array = stripslashes($array);
}
}
return $array;
}
示例12: stripslashes_array
function stripslashes_array(&$array)
{
if (is_array($array)) {
$keys = array_keys($array);
foreach ($keys as $key) {
if (is_array($array[$key])) {
stripslashes_array($array[$key]);
} else {
$array[$key] = stripslashes($array[$key]);
}
}
}
}
示例13: array_stripslashes
function array_stripslashes(&$array)
{
if (!is_array($array)) {
return false;
}
while (list($key) = each($array)) {
if (is_array($array[$key])) {
stripslashes_array($array[$key]);
} else {
$array[$key] = stripslashes($array[$key]);
}
}
}
示例14: stripslashes_array
/**
* stripslashes 取消转义 数组
*
* 1 参数 输入数组
*
* 返回值 处理后的数组
**/
function stripslashes_array($value)
{
if (is_array($value)) {
$value = array_map(__FUNCTION__, $value);
} elseif (is_object($value)) {
$vars = get_object_vars($value);
foreach ($vars as $key => $data) {
$value->{$key} = stripslashes_array($data);
}
} else {
$value = stripslashes($value);
}
return $value;
}
示例15: fetch_data
function fetch_data()
{
global $dbh;
$this->p_perso = new parametres_perso("empr");
$this->circ_tpl = array();
$requete = "select * from serialcirc_tpl where serialcirctpl_id=" . $this->id;
$resultat = pmb_mysql_query($requete, $dbh);
if (pmb_mysql_num_rows($resultat)) {
$r = pmb_mysql_fetch_object($resultat);
if ($r->serialcirctpl_tpl) {
$this->circ_tpl = stripslashes_array(unserialize($r->serialcirctpl_tpl));
}
}
}