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


PHP ParseFilter::BB_Parse方法代码示例

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


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

示例1: ParseFilter

    $cat_parentid[$row['id']] = $row['parentid'];
}
$db->free($result_cat);
include_once ENGINE_DIR . '/classes/parse.class.php';
$parse = new ParseFilter(array(), array(), 1, 1);
if ($config['allow_site_wysiwyg']) {
    $allow_br = 0;
} else {
    $allow_br = 1;
}
if ($config['allow_site_wysiwyg']) {
    $title = stripslashes($parse->process($_POST['title']));
    $parse->allow_code = false;
    $full_story = $parse->process($_POST['full_story']);
    $short_story = $parse->process($_POST['short_story']);
    $full_story = $parse->BB_Parse($full_story);
    $short_story = $parse->BB_Parse($short_story);
} else {
    $full_story = $parse->process($_POST['full_story']);
    $short_story = $parse->process($_POST['short_story']);
    $title = stripslashes($parse->process($_POST['title']));
    $full_story = $parse->BB_Parse($full_story, false);
    $short_story = $parse->BB_Parse($short_story, false);
}
if (is_array($_REQUEST['catlist'])) {
    $catlist = $_REQUEST['catlist'];
} else {
    $catlist = array();
    $_REQUEST['catlist'] = array();
}
if (!count($catlist)) {
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:preview.php

示例2: msg

     if ($allow_list[0] != "all" and !in_array($selected, $allow_list) and $ifdelete != "yes") {
         msg("error", $lang['addnews_error'], $lang['news_err_41'], "javascript:history.go(-1)");
     }
 }
 $title = $parse->process(trim(strip_tags($_POST['title'])));
 if (!$user_group[$member_id['user_group']]['allow_html']) {
     $_POST['short_story'] = strip_tags($_POST['short_story']);
     $_POST['full_story'] = strip_tags($_POST['full_story']);
 }
 if ($config['allow_admin_wysiwyg']) {
     $parse->allow_code = false;
 }
 $full_story = $parse->process($_POST['full_story']);
 $short_story = $parse->process($_POST['short_story']);
 if ($config['allow_admin_wysiwyg'] or $allow_br != '1') {
     $full_story = $db->safesql($parse->BB_Parse($full_story));
     $short_story = $db->safesql($parse->BB_Parse($short_story));
 } else {
     $full_story = $db->safesql($parse->BB_Parse($full_story, false));
     $short_story = $db->safesql($parse->BB_Parse($short_story, false));
 }
 if ($parse->not_allowed_text) {
     msg("error", $lang['addnews_error'], $lang['news_err_39'], "javascript:history.go(-1)");
 }
 if (trim($title) == "" and $ifdelete != "yes") {
     msg("error", $lang['cat_error'], $lang['addnews_alert'], "javascript:history.go(-1)");
 }
 if (dle_strlen($title, $config['charset']) > 255) {
     msg("error", $lang['cat_error'], $lang['addnews_ermax'], "javascript:history.go(-1)");
 }
 if (trim($_POST['alt_name']) == "" or !$_POST['alt_name']) {
开发者ID:Banych,项目名称:SiteCreate,代码行数:31,代码来源:editnews.php

示例3: array

        $user_group[$row['id']] = array();
        foreach ($row as $key => $value) {
            $user_group[$row['id']][$key] = stripslashes($value);
        }
    }
    set_vars("usergroup", $user_group);
    $db->free();
}
@header("Content-type: text/html; charset=" . $config['charset']);
$parse = new ParseFilter();
$parse->safe_mode = true;
$parse->allow_url = $user_group[$member_id['user_group']]['allow_url'];
$parse->allow_image = $user_group[$member_id['user_group']]['allow_image'];
$id = intval($_POST['id']);
$text = convert_unicode($_POST['text'], $config['charset']);
$text = $parse->BB_Parse($parse->process(trim($text)), false);
if ($config['allow_complaint_mail']) {
    include_once ENGINE_DIR . '/classes/mail.class.php';
    $mail = new dle_mail($config);
    $lang['mail_complaint_1'] = str_replace("{site}", $config['http_home_url'], $lang['mail_complaint_1']);
}
if ($_POST['action'] == "pm") {
    if (!$is_logged) {
        die("error");
    }
    if (!$id or !$text) {
        die("error");
    }
    $row = $db->super_query("SELECT id, text, user, user_from FROM " . USERPREFIX . "_pm WHERE id='{$id}'");
    if ($row['user'] != $member_id['user_id'] or !$row['id']) {
        die("Operation not Allowed");
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:complaint.php

示例4: intval

if ($is_logged and $config['comments_restricted'] and $_TIME - $member_id['reg_date'] < $config['comments_restricted'] * 86400) {
    $stop[] = str_replace('{days}', intval($config['comments_restricted']), $lang['news_info_8']);
    $CN_HALT = TRUE;
}
if ($config['simple_reply'] and $_POST['parent']) {
    $config['allow_comments_wysiwyg'] = "-1";
}
if ($config['allow_comments_wysiwyg'] > 0) {
    $parse->wysiwyg = true;
    if ($user_group[$member_id['user_group']]['allow_url']) {
        $parse->tagsArray[] = 'a';
    }
    if ($user_group[$member_id['user_group']]['allow_image']) {
        $parse->tagsArray[] = 'img';
    }
    $comments = $parse->BB_Parse($parse->process(trim($_POST['comments'])));
} else {
    if ($config['allow_comments_wysiwyg'] == "-1") {
        $parse->allowbbcodes = false;
    }
    $comments = $parse->BB_Parse($parse->process(trim($_POST['comments'])), false);
}
if (intval($config['comments_minlen']) and dle_strlen(str_replace(" ", "", strip_tags(trim($comments))), $config['charset']) < $config['comments_minlen']) {
    $stop[] = $lang['news_err_40'];
    $CN_HALT = TRUE;
}
if ($user_group[$member_id['user_group']]['max_comment_day']) {
    $this_time = $_TIME - 86400;
    $db->query("DELETE FROM " . PREFIX . "_sendlog WHERE date < '{$this_time}' AND flag='3'");
    if (!$is_logged) {
        $check_user = $_IP;
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:addcomments.php

示例5: die

     die("error");
 }
 if ($config['allow_comments_wysiwyg']) {
     $parse->wysiwyg = true;
     $use_html = true;
     $parse->ParseFilter(array('div', 'span', 'p', 'br', 'strong', 'em', 'ul', 'li', 'ol', 'b', 'u', 'i', 's'), array(), 0, 1);
     if ($user_group[$member_id['user_group']]['allow_url']) {
         $parse->tagsArray[] = 'a';
     }
     if ($user_group[$member_id['user_group']]['allow_image']) {
         $parse->tagsArray[] = 'img';
     }
 } else {
     $use_html = false;
 }
 $comm_txt = trim($parse->BB_Parse($parse->process(convert_unicode($_POST['comm_txt'], $config['charset'])), $use_html));
 if ($parse->not_allowed_tags) {
     die("error");
 }
 if ($parse->not_allowed_text) {
     die("error");
 }
 if (dle_strlen($comm_txt, $config['charset']) > $config['comments_maxlen']) {
     die("error");
 }
 if ($comm_txt == "") {
     die("error");
 }
 if (intval($config['comments_minlen']) and dle_strlen($comm_txt, $config['charset']) < $config['comments_minlen']) {
     die("error");
 }
开发者ID:Banych,项目名称:SiteCreate,代码行数:31,代码来源:editcomments.php

示例6:

 if ($allow_br) {
     $use_html = false;
 } else {
     $use_html = true;
 }
 $_POST['title'] = $db->safesql($parse->process(trim(strip_tags(convert_unicode($_POST['title'], $config['charset'])))));
 if ($config['allow_quick_wysiwyg']) {
     $parse->allow_code = false;
 }
 $_POST['news_txt'] = convert_unicode($_POST['news_txt'], $config['charset']);
 $_POST['full_txt'] = convert_unicode($_POST['full_txt'], $config['charset']);
 if (!$user_group[$member_id['user_group']]['allow_html']) {
     $_POST['news_txt'] = strip_tags($_POST['news_txt']);
     $_POST['full_txt'] = strip_tags($_POST['full_txt']);
 }
 $news_txt = $db->safesql($parse->BB_Parse($parse->process($_POST['news_txt']), $use_html));
 $full_txt = $db->safesql($parse->BB_Parse($parse->process($_POST['full_txt']), $use_html));
 if ($config['safe_xfield']) {
     $parse->ParseFilter();
     $parse->safe_mode = true;
 }
 $add_module = "yes";
 $ajax_edit = "yes";
 $stop = "";
 $category = $cat_list;
 $xfieldsaction = "init";
 include ENGINE_DIR . '/inc/xfields.php';
 $editreason = $db->safesql(htmlspecialchars(strip_tags(stripslashes(trim(convert_unicode($_POST['reason'], $config['charset'])))), ENT_QUOTES));
 if ($editreason != "") {
     $view_edit = 1;
 } else {
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:31,代码来源:editnews.php

示例7: array

     $content['category'] = array();
     $content['category'][] = '0';
 }
 $category_list = array();
 foreach ($content['category'] as $value) {
     $category_list[] = intval($value);
 }
 $category_list = $db->safesql(implode(',', $category_list));
 $full_story = $parse->process($content['full']);
 $short_story = $parse->process($content['short']);
 $title = $parse->process(trim(strip_tags($content['title'])));
 $_POST['title'] = $title;
 $alt_name = totranslit(stripslashes($title));
 $title = $db->safesql($title);
 if (!$allow_br) {
     $full_story = $db->safesql($parse->BB_Parse($full_story));
     $short_story = $db->safesql($parse->BB_Parse($short_story));
 } else {
     $full_story = $db->safesql($parse->BB_Parse($full_story, false));
     $short_story = $db->safesql($parse->BB_Parse($short_story, false));
 }
 $metatags = create_metatags($short_story . $full_story);
 $thistime = date("Y-m-d H:i:s", strtotime($content['date']));
 if (trim($title) == "") {
     msg("error", $lang['addnews_error'], $lang['addnews_ertitle'], "javascript:history.go(-1)");
 }
 if (trim($short_story) == "") {
     msg("error", $lang['addnews_error'], $lang['addnews_erstory'], "javascript:history.go(-1)");
 }
 $db->query("INSERT INTO " . PREFIX . "_post (date, autor, short_story, full_story, xfields, title, descr, keywords, category, alt_name, allow_comm, approve, allow_main, allow_br) values ('{$thistime}', '{$member_id['name']}', '{$short_story}', '{$full_story}', '', '{$title}', '{$metatags['description']}', '{$metatags['keywords']}', '{$category_list}', '{$alt_name}', '{$allow_comm}', '{$approve}', '{$allow_main}', '{$allow_br}')");
 $row = $db->insert_id();
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:rss.php

示例8: intval

 $save_con['auth_only_social'] = intval($save_con['auth_only_social']);
 $save_con['allow_comments_rating'] = intval($save_con['allow_comments_rating']);
 $save_con['tree_comments'] = intval($save_con['tree_comments']);
 $save_con['tree_comments_level'] = intval($save_con['tree_comments_level']);
 $save_con['simple_reply'] = intval($save_con['simple_reply']);
 if ($save_con['adminlog_maxdays'] < 30) {
     $save_con['adminlog_maxdays'] = 30;
 }
 if (substr($save_con['http_home_url'], -1, 1) != '/') {
     $save_con['http_home_url'] = $save_con['http_home_url'] . "/";
 }
 include_once ENGINE_DIR . '/classes/parse.class.php';
 $parse = new ParseFilter();
 $parse->safe_mode = true;
 $save_con['offline_reason'] = $parse->process(stripslashes(trim($save_con['offline_reason'])));
 $save_con['offline_reason'] = str_replace('"', '&quot;', $parse->BB_Parse($save_con['offline_reason'], false));
 $save_con['admin_allowed_ip'] = str_replace("\r", "", trim($save_con['admin_allowed_ip']));
 $save_con['admin_allowed_ip'] = str_replace("\n", "|", $save_con['admin_allowed_ip']);
 $temp_array = explode("|", $save_con['admin_allowed_ip']);
 $allowed_ip = array();
 if (count($temp_array)) {
     foreach ($temp_array as $value) {
         $value1 = str_replace("*", "0", trim($value));
         $value1 = explode('/', $value1);
         $value1 = ip2long($value1[0]);
         if ($value1 != -1 and $value1 !== FALSE) {
             $allowed_ip[] = trim($value);
         }
     }
 }
 if (count($allowed_ip)) {
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:options.php

示例9: _create_dle_account

 protected function _create_dle_account()
 {
     $member_id['email'] = $this->user['email'];
     $member_id['icq'] = $this->user['icq'];
     if (VB_CHARSET && VB_CHARSET != DLE_CHARSET) {
         $member_id['email'] = iconv(VB_CHARSET, DLE_CHARSET, $this->user['email']);
         $member_id['icq'] = iconv(VB_CHARSET, DLE_CHARSET, $this->user['icq']);
     }
     $member_id['user_group'] = $GLOBALS['config']['reg_group'];
     $member_id['name'] = $_POST['login_name'];
     $add = array();
     $add['name'] = $this->db->safesql($_POST['login_name']);
     $add['password'] = md5($_POST['login_password']);
     $add['email'] = $this->db->safesql($this->user['email']);
     $add['icq'] = $this->db->safesql($member_id['icq']);
     $add['reg_date'] = TIMENOW + $GLOBALS['config']['date_adjust'] * 60;
     $add['lastdate'] = TIMENOW + $GLOBALS['config']['date_adjust'] * 60;
     $add['logged_ip'] = $this->db->safesql(IPADRESS);
     $update_fields = array();
     $this->_init_parse();
     foreach ($this->config['fields'] as $dle_field => $vb_field_id) {
         if ($vb_field_id) {
             if ($vb_field_id < 0) {
                 $vb_field = array_search($vb_field_id, $this->user_vb_field);
             } else {
                 $vb_field = 'field' . $vb_field_id;
             }
             if (empty($this->user[$vb_field])) {
                 continue;
             } else {
                 $value = $this->user[$vb_field];
             }
             if (VB_CHARSET && VB_CHARSET != DLE_CHARSET) {
                 $value = iconv(VB_CHARSET, DLE_CHARSET, $value);
             }
             if (in_array($dle_field, array('info', 'land', 'fullname'))) {
                 $member_id[$dle_field] = $add[$dle_field] = $this->db->safesql($value);
             } else {
                 $value = $this->_parse->BB_Parse($this->_parse->process($value));
                 $value = str_replace("|", "&#124;", $value);
                 $update_fields[] = $this->db->safesql($dle_field . "|" . $value);
             }
         }
     }
     $add['user_group'] = $GLOBALS['config']['reg_group'];
     $add['favorites'] = '';
     $add['signature'] = '';
     if ($update_fields) {
         $add['xfields'] = implode("||", $update_fields);
     }
     $this->db->query("INSERT INTO " . USERPREFIX . "_users (" . implode(", ", array_keys($add)) . ") VALUES ('" . implode("', '", $add) . "')");
     $member_id['user_id'] = $this->db->insert_id();
     $member_id['logged_ip'] = $_SERVER['REMOTE_ADDR'];
     $member_id['reg_date'] = $member_id['lastdate'] = time() + $GLOBALS['config']['date_adjust'] * 60;
     set_cookie("dle_user_id", $member_id['user_id'], 365);
     set_cookie("dle_password", $_POST['login_password'], 365);
     $_SESSION['dle_user_id'] = $member_id['user_id'];
     $_SESSION['dle_password'] = $_POST['login_password'];
     $_SESSION['member_lasttime'] = $member_id['lastdate'];
     $_SESSION['dle_log'] = 0;
     $GLOBALS['dle_login_hash'] = md5(strtolower($_SERVER['HTTP_HOST'] . $member_id['name'] . $_POST['login_password'] . $GLOBALS['config']['key'] . date("Ymd")));
     if ($GLOBALS['config']['log_hash']) {
         $hash = md5(uniqid(time()) . time());
         $this->db->query("UPDATE " . USERPREFIX . "_users set hash='" . $hash . "' WHERE user_id='{$member_id['user_id']}'");
         set_cookie("dle_hash", $hash, 365);
         $_COOKIE['dle_hash'] = $hash;
         $member_id['hash'] = $hash;
     }
     $GLOBALS['member_id'] = $member_id;
     $GLOBALS['is_logged'] = true;
     if ($this->user['avatarid']) {
         $avatarid = $this->_db_connect()->super_query("SELECT avatarpath FROM " . VB_PREFIX . "avatar WHERE avatarid=" . $this->user['avatarid']);
         if ($avatarid) {
             $this->_db_disconnect();
             $this->UpdateDLEAvatar(array('username' => $this->user['username'], 'avatarurl' => $avatarid['avatarurl']));
         }
     } else {
         if ($this->vb_config['usefileavatar'] && $this->user['avatarrevision']) {
             $this->UpdateDLEAvatar(array('username' => $this->user['username'], 'avatarurl' => $this->vb_config['bburl'] . "/" . $this->vb_config['avatarurl'] . "/avatar" . $this->user['userid'] . "_" . $this->user['avatarrevision'] . ".gif"));
         }
     }
     return $member_id;
 }
开发者ID:dautushenka,项目名称:dle-vb,代码行数:83,代码来源:dle_vs_vb.php

示例10: PreparationValues

 protected function PreparationValues()
 {
     if (!class_exists('ParseFilter')) {
         throw new ExceptionAllError('Не найден класс ParseFilter');
     }
     $parse = new ParseFilter(array(), array(), 1, 1);
     foreach ($this->checkbox_fields as $box_name => $name) {
         if (!empty($this->values[$box_name])) {
             $this->values[$box_name] = 1;
         } else {
             $this->values[$box_name] = 0;
         }
     }
     if (empty($this->values['cost'])) {
         $this->values['cost'] = 0;
     } else {
         $this->values['cost'] = str_replace(",", ".", str_replace(" ", "", $this->values['cost']));
     }
     if (empty($this->values['currency'])) {
         $this->values['currency'] = "USD";
     }
     $this->values['cost_search'] = $this->values['cost'] / $this->config['currency'][$this->values['currency']];
     if (!empty($this->values['auction']) && $this->values['cost']) {
         $this->values['auction'] = 1;
     } else {
         $this->values['auction'] = 0;
     }
     if (!empty($this->values['allow_site'])) {
         $this->values['allow_site'] = 1;
     } else {
         $this->values['allow_site'] = 0;
     }
     if (!empty($this->values['allow_block'])) {
         $this->values['allow_block'] = 1;
         if (!empty($this->values['block_date'])) {
             $this->values['block_date'] = strtotime($this->values['block_date']);
         } else {
             $this->values['block_date'] = 0;
         }
     } else {
         $this->values['block_date'] = 0;
         $this->values['allow_block'] = 0;
     }
     if (!empty($this->values['exp_date'])) {
         $this->values['exp_date'] = strtotime($this->values['exp_date']);
     } else {
         $this->values['exp_date'] = 0;
     }
     $this->values['city_other'] = $parse->process(trim($this->values['city_other']));
     $this->values['model_other'] = $parse->process(trim($this->values['model_other']));
     $this->values['phone'] = $parse->process(trim($this->values['phone']));
     $this->values['contact_person'] = $parse->process(trim($this->values['contact_person']));
     $this->values['description'] = $parse->BB_Parse($this->values['description'], false);
     if ($this->values['model_other']) {
         $this->values['model_id'] = 0;
     }
     if ($this->values['city_other']) {
         $this->values['city_id'] = 0;
     }
 }
开发者ID:dautushenka,项目名称:car-market,代码行数:60,代码来源:CarMarket.php

示例11: switch

 if ($stream_config['cache_allow'] == 'yes') {
     $tpl->result['streams'] = $dle_api->load_from_cache("stream-info-block", $stream_config['cachelife']);
 }
 if (!$tpl->result['streams']) {
     $tpl->load_template('stream-info-main.tpl');
     for ($i = 0; $i < $stream_count; $i++) {
         if ($out != $stream_config['blocklimit']) {
             $info_stream = $stream_list[$i];
             switch ($info_stream['service']) {
                 case 'twitch':
                     $stream_twitch = gettwitch($info_stream['login']);
                     if ($stream_twitch != NULL) {
                         $tpl->set('{title}', $info_stream['title']);
                         $tpl->set('{streamer}', $info_stream['login']);
                         $tpl->set('{streampic}', $info_stream['pic']);
                         $tpl->set('{description}', $parse->BB_Parse($info_stream['description']));
                         $tpl->set('{viewers}', $stream_twitch['viewers']);
                         $tpl->set('{status}', $stream_config['online']);
                         $tpl->set('{games}', $stream_twitch['game']);
                         if ($stream_config['showplayer'] == 'yes') {
                             $tpl->set('{player}', '<object type="application/x-shockwave-flash" height="' . $stream_config['height'] . '" width="' . $stream_config['width'] . '" id="live_embed_player_flash" data="http://www.twitch.tv/widgets/live_embed_player.swf?channel=' . $info_stream['login'] . '" bgcolor="#000000"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="allowNetworking" value="all" /><param name="movie" value="http://www.twitch.tv/widgets/live_embed_player.swf" /><param name="flashvars" value="hostname=www.twitch.tv&channel=' . $info_stream['login'] . '&auto_play=true&start_volume=25" /></object>');
                         } else {
                             $tpl->set('{player}', 'Вывод плеера отключено в настройках!');
                         }
                         if ($config['allow_alt_url']) {
                             $tpl->set('{full_stream}', $config['http_home_url'] . "stream/" . $info_stream['login'] . "/");
                         } else {
                             $tpl->set('{full_stream}', $config['http_home_url'] . "index.php?do=stream-info&stream=" . $info_stream['login']);
                         }
                         $tpl->compile('streams');
                         $out++;
开发者ID:xxados,项目名称:stream-info,代码行数:31,代码来源:stream-info-main.php

示例12: switch

     $tpl->load_template('info.tpl');
     $tpl->set('{error}', 'Такого пользователя сервиса трансляций не найдено! Проверьте провильность ввода логина!');
     $tpl->set('{title}', 'Ошибка');
     $tpl->compile('info');
     $tpl->clear();
     $work = FALSE;
 }
 if ($work) {
     switch ($info_stream['service']) {
         case 'cybergame':
             $stream_cybergame = getcybergame($info_stream['login']);
             if ($stream_cybergame['online'] == 'yes') {
                 $tpl->set('{title}', $info_stream['title']);
                 $tpl->set('{streamer}', $info_stream['login']);
                 $tpl->set('{streampic}', $info_stream['pic']);
                 $tpl->set('{description}', $parse->BB_Parse($info_stream['description']));
                 $tpl->set('{status}', $stream_config['online']);
                 $tpl->set('{viewers}', $stream_cybergame['viewers']);
                 if ($config['allow_alt_url']) {
                     $tpl->set('{full_stream}', $config['http_home_url'] . "stream/" . $info_stream['login'] . "/");
                 } else {
                     $tpl->set('{full_stream}', $config['http_home_url'] . "index.php?do=stream-info&stream=" . $info_stream['login']);
                 }
                 $tpl->set('{player}', '<iframe src="http://api.cybergame.tv/p/embed.php?c=' . $info_stream['login'] . '&w=' . $stream_config['width'] . '&h=' . $stream_config['height'] . '&type=embed" width="' . $stream_config['width'] . '" height="' . $stream_config['height'] . '" frameborder="0"></iframe>');
                 $tpl->compile('content');
                 $tpl->clear();
             } else {
                 $tpl->set('{title}', $info_stream['title']);
                 $tpl->set('{streamer}', $info_stream['login']);
                 $tpl->set('{streampic}', $info_stream['pic']);
                 $tpl->set('{description}', $parse->BB_Parse($info_stream['description']));
开发者ID:xxados,项目名称:stream-info,代码行数:31,代码来源:stream-info.php

示例13: ParseFilter

        <city></city>
</user>
XML;
        }
        $resp .= "</profiles>";
        break;
        // Отправляем ПМ
    // Отправляем ПМ
    case "sendmessage":
        require_once ENGINE_DIR . '/classes/parse.class.php';
        $parse = new ParseFilter();
        $parse->safe_mode = true;
        $uid = intval($_GET['uid']);
        $sender_id = intval($_GET['sender_id']);
        $message = convert_unicode($_GET['message'], $config['charset']);
        $message = $parse->BB_Parse($parse->process($message), false);
        $subj = strip_tags($db->safesql($nextgame['subj_pm'], $config['charset']));
        if ($_GET['type'] == 'user') {
            $user = $db->super_query("SELECT user_id,name from " . USERPREFIX . "_users where user_id='{$sender_id}'");
        } else {
            $user['name'] = "NexGame Aplication";
        }
        $time = time() + $config['date_adjust'] * 60;
        $db->query("INSERT INTO " . USERPREFIX . "_pm (subj, text, user, user_from, date, pm_read, folder) values ('{$subj}', '{$message}', '{$uid}', '{$user['name']}', '{$time}', 'no', 'inbox')");
        $db->query("UPDATE " . USERPREFIX . "_users set pm_all=pm_all+1, pm_unread=pm_unread+1  where user_id='{$uid}'");
        $resp = "<msg><uid>{$uid}</uid><delivered>1</delivered></msg>";
        break;
    case 'sendinvite':
        /// Инвайт отправим.
        if (empty($_GET['uid']) or intval($_GET['sender_id']) == 0 or intval($_GET['app_id']) == 0) {
            die;
开发者ID:skypach,项目名称:skypach.ru,代码行数:31,代码来源:api.xml.php

示例14: Memcache

include ENGINE_DIR . 'system/data/config.memchat.php';
#*** Тип кеширования
if ($memchat_conf['cache'] == "mem") {
    $memcache = new Memcache();
    $memcache->connect($memchat_conf['mem_host'], $memchat_conf['mem_port']);
    $mem_name = $memchat_conf['cache_name'];
} else {
    $mem_name = "system/cache/temp/" . $memchat_conf['cache_name'];
}
#****** Добавление сообщения ******#
if ($_POST['edit'] == 1) {
    if ($is_logged && $member_id['restricted'] == 0) {
        require_once ENGINE_DIR . '/classes/parse.php';
        $parse = new ParseFilter();
        $parse->safe_mode = true;
        $message = addslashes($parse->BB_Parse(iconv("utf-8", "windows-1251", strip_tags($_POST['message'])), false));
        if (iconv_strlen($message) >= $memchat_conf['text_numm']) {
            #****** Смайлы *** start ******#
            $s = $r = array();
            for ($i = 1, $len = 9; $i < $len; $i++) {
                $s[$i] = "/\\[S:{$i}\\]/";
                $r[$i] = "<img src=\"/uploads/smiles/{$i}.gif\" style=\"border:none;\" align=\"absmiddle\" alt=\"{$i}\">";
            }
            #****** Текстовый эквивалент ******#
            $s[] = "/:\\)/";
            $r[] = "<img src=\"/uploads/smiles/1.gif\" style=\"border:none;\" align=\"absmiddle\" alt=\":)\">";
            $s[] = "/=\\)/";
            $r[] = "<img src=\"/uploads/smiles/1.gif\" style=\"border:none;\" align=\"absmiddle\" alt=\":)\">";
            $s[] = "/\\(:/";
            $r[] = "<img src=\"/uploads/smiles/1.gif\" style=\"border:none;\" align=\"absmiddle\" alt=\":)\">";
            $s[] = "/\\(=/";
开发者ID:skypach,项目名称:skypach.ru,代码行数:31,代码来源:mchat.php

示例15: array

 }
 $row = $db->super_query("SELECT * FROM " . USERPREFIX . "_users WHERE user_id = '{$id}'");
 if (!$is_logged or !($member_id['user_id'] == $row['user_id'] or $member_id['user_group'] == 1)) {
     $stop = $lang['news_err_13'];
 } else {
     $parse->allow_url = $user_group[$member_id['user_group']]['allow_url'];
     $parse->allow_image = $user_group[$member_id['user_group']]['allow_image'];
     $password1 = $_POST['password1'];
     $password2 = $_POST['password2'];
     if ($_POST['allow_mail']) {
         $allow_mail = 0;
     } else {
         $allow_mail = 1;
     }
     $altpass = md5($_POST['altpass']);
     $info = $db->safesql($parse->BB_Parse($parse->process($_POST['info']), false));
     $not_allow_symbol = array("\"", "`", "\t", '\\n', '\\r', "\n", "\r", '\\', ",", "/", "¬", "#", ";", ":", "~", "[", "]", "{", "}", ")", "(", "*", "^", "%", "\$", "<", ">", "?", "!", '"', "'", " ");
     $email = $db->safesql(trim(str_replace($not_allow_symbol, '', strip_tags(stripslashes($_POST['email'])))));
     $fullname = $db->safesql($parse->process($_POST['fullname']));
     $land = $db->safesql($parse->process($_POST['land']));
     $icq = intval(str_replace("-", "", $_POST['icq']));
     if (!$icq) {
         $icq = "";
     }
     if ($_POST['allowed_ip']) {
         $_POST['allowed_ip'] = str_replace("\r", "", trim($_POST['allowed_ip']));
         $allowed_ip = str_replace("\n", "|", $_POST['allowed_ip']);
         $temp_array = explode("|", $allowed_ip);
         $allowed_ip = array();
         if (count($temp_array)) {
             foreach ($temp_array as $value) {
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:31,代码来源:profile.php


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