• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP html_entity_decode_utf8函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中html_entity_decode_utf8函数的典型用法代码示例。如果您正苦于以下问题:PHP html_entity_decode_utf8函数的具体用法?PHP html_entity_decode_utf8怎么用?PHP html_entity_decode_utf8使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: display

 function display()
 {
     $tour = new Tour();
     global $sugar_config;
     // $ss = new Sugar_Smarty();
     $db = DBManagerFactory::getInstance();
     // ONLY LOAD A RECORD IF A RECORD ID IS GIVEN;
     // A RECORD ID IS NOT GIVEN WHEN VIEWING IN LAYOUT EDITOR
     $record = isset($_GET["record"]) ? htmlspecialchars($_GET["record"]) : '';
     $tour->retrieve($record);
     $template = file_get_contents('modules/Tours/tpls/exports/template-dos.htm');
     $template = str_replace('${SITE_URL}', $sugar_config['site_url'], $template);
     $template = str_replace('${TOUR_NOTE}', html_entity_decode_utf8($tour->description), $template);
     $template = str_replace('${CODE}', $tour->tour_code, $template);
     $template = str_replace('${NAME}', $tour->name, $template);
     $template = str_replace('${TRANSPORT}', $tour->transport2, $template);
     $template = str_replace('${START_DATE}', $tour->start_date, $template);
     $template = str_replace('${DURATION}', $tour->duration, $template);
     // Hieu fix issue 1438
     if ($tour->picture) {
         $main_picture = '
                 <!--[if gte vml 1]>
                 <o:wrapblock>
                     <v:shape id="Picture_x0020_11"
                              o:spid="_x0000_s1028" type="#_x0000_t75"
                              alt=""
                              style=\'position:absolute;margin-left:0;margin-top:0;width:470.55pt;height:234pt;
               z-index:251657216;visibility:visible;mso-wrap-style:square;
               mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
               mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
               mso-wrap-distance-bottom:0;mso-position-horizontal:center;
               mso-position-horizontal-relative:margin;mso-position-vertical:absolute;
               mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
               mso-width-relative:page;mso-height-relative:page\'>
                         <v:imagedata src="' . $sugar_config['site_url'] . "/modules/images/" . $tour->picture . '"
                                      o:title="phan%20thiet%20beach"/>
                         <o:lock v:ext="edit" aspectratio="f"/>
                         <w:wrap type="topAndBottom" anchorx="margin"/>
                     </v:shape><![endif]--><![if !vml]><img width=627 height=312
                                                            src="' . $sugar_config['site_url'] . "/modules/images/" . $tour->picture . '"
                                                            alt=""
                                                            v:shapes="Picture_x0020_11"><![endif]><!--[if gte vml 1]></o:wrapblock>
                 <![endif]-->
             ';
     } else {
         $main_picture = '';
     }
     $template = str_replace('${PICTURE}', $main_picture, $template);
     // End issue 1438
     $template = str_replace('${TOUR_PROGRAM_LINES}', html_entity_decode_utf8($tour->get_data_to_expor2word()), $template);
     $size = strlen($template);
     $filename = "TOUR_PROGRAM_" . $tour->name . ".doc";
     ob_end_clean();
     header("Cache-Control: private");
     header("Content-Type: application/force-download;");
     header("Content-Disposition:attachment; filename=\"{$filename}\"");
     header("Content-length:{$size}");
     echo $template;
     ob_flush();
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:60,代码来源:view.export2word.php


示例2: get_table_flash_bbcode_pkids

function get_table_flash_bbcode_pkids($table_name, $id_field, $content_field, $uid_field, $bitfield_field)
{
	global $db;

	$ids = array();

	$sql = "SELECT $id_field, $content_field, $uid_field, $bitfield_field
		FROM $table_name
		WHERE $content_field LIKE '%[/flash:%'
			AND $bitfield_field <> ''";

	$result = $db->sql_query($sql);
	while ($row = $db->sql_fetchrow($result))
	{
		$uid = $row[$uid_field];

		// thanks support toolkit
		$content = html_entity_decode_utf8($row[$content_field]);
		set_var($content, $content, 'string', true);
		$content = utf8_normalize_nfc($content);

		$bitfield_data = $row[$bitfield_field];

		if (!is_valid_flash_bbcode($content, $uid) && has_flash_enabled($bitfield_data))
		{
			$ids[] = (int) $row[$id_field];
		}
	}
	$db->sql_freeresult($result);

	return $ids;
}
开发者ID:naderman,项目名称:phpbb-orchestra,代码行数:32,代码来源:check_flash_bbcodes.php


示例3: WF_filter_math

function WF_filter_math($text, $editor)
{
    global $TAGS;
    $output = '';
    $n0 = 0;
    // Search for '«math'. If it is not found, the
    // content is returned without any modification
    $n1 = strpos($text, $TAGS->in_mathopen);
    if ($n1 === FALSE) {
        return $text;
        // directly return the content
    }
    // filtering
    while ($n1 !== FALSE) {
        $output .= substr($text, $n0, $n1 - $n0);
        $n0 = $n1;
        $n1 = strpos($text, $TAGS->in_mathclose, $n0);
        if (!$n1) {
            break;
        }
        $n1 = $n1 + strlen($TAGS->in_mathclose);
        // Getting the substring «math ... «/math»
        $sub = substr($text, $n0, $n1 - $n0);
        // remove html entities (such as &quot;)
        //Solves BUG 25670 of php 4.3, solved at version 5
        if (version_compare(phpversion(), "5.0.0", ">=")) {
            $sub = html_entity_decode($sub, ENT_COMPAT, $TAGS->ucharset);
            // needs php 4.3 to work, php 5.0 if charset is utf (bug 25670)
        } else {
            if (strtolower($TAGS->ucharset) == "utf-8") {
                $sub = html_entity_decode_utf8($sub);
            } else {
                $sub = html_entity_decode($sub, ENT_COMPAT, $TAGS->ucharset);
            }
        }
        // replacing '«' by '<'
        $sub = str_replace($TAGS->in_open, $TAGS->out_open, $sub);
        // replacing '»' by '>'
        $sub = str_replace($TAGS->in_close, $TAGS->out_close, $sub);
        // replacing '§' by '&amp;'
        $sub = str_replace($TAGS->in_entity, $TAGS->out_entity, $sub);
        // generate the image code
        $sub = WF_math_image($sub, $editor);
        // appending the modified substring
        $output .= $sub;
        $n0 = $n1;
        // searching next '«math'
        $n1 = strpos($text, $TAGS->in_mathopen, $n0);
    }
    $output .= substr($text, $n0);
    return $output;
}
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:52,代码来源:math_filter.php


示例4: __construct

 function __construct()
 {
     parent::SugarView();
     global $current_user;
     if (!$current_user->isDeveloperForModule("Leads")) {
         die("Unauthorized Access to Administration");
     }
     $this->jsonHelper = getJSONobj();
     $this->parser = new ConvertLayoutMetadataParser("Contacts");
     if (isset($_REQUEST['updateConvertDef']) && $_REQUEST['updateConvertDef'] && !empty($_REQUEST['data'])) {
         $this->parser->updateConvertDef(object_to_array_recursive($this->jsonHelper->decode(html_entity_decode_utf8($_REQUEST['data']))));
         // clear the cache for this module only
         MetaDataManager::refreshModulesCache(array('Leads'));
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:15,代码来源:view.editconvert.php


示例5: preDisplay

 function preDisplay()
 {
     parent::preDisplay();
     $tour = new Tour();
     $html = file_get_contents("custom/modules/Tours/tpls/basic_pdf.tpl");
     $html = str_replace("{NAME}", $this->bean->name, $html);
     $desc = html_entity_decode_utf8($this->bean->description);
     $desc = $tour->removeHtmlTags($desc);
     $html = str_replace("{TOUR_NOTE}", $desc, $html);
     $picture = '<img width="627" height="312" src="modules/images/' . $this->bean->picture . '">';
     $html = str_replace("{PICTURE}", $picture, $html);
     $html = str_replace("{CODE}", $this->bean->tour_code, $html);
     $html = str_replace("{DURATION}", $this->bean->duration, $html);
     $html = str_replace("{TRANSPORT}", $this->bean->transport2, $html);
     $html = str_replace("{START_DATE}", $this->bean->start_date, $html);
     $program = html_entity_decode_utf8($tour->get_data_to_export2pdf($_GET['record']));
     $html = str_replace("{TOUR_PROGRAM_LINES}", $program, $html);
     // Xuat ra pdf
     $mpdf = new mPDF("vi");
     $mpdf->SetFooter('{PAGENO}');
     $mpdf->WriteHTML($html);
     $mpdf->Output("Tour.pdf", "D");
     exit;
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:24,代码来源:sugarpdf.basic.php


示例6: output

	function output() {
		global $user;

		$umode = strtoupper($this->mode);

		$items = '';
		foreach ($this->xml as $item)
		{
			$items .= "\t" . '<item>
		' . (isset($item['author']) ? '<author>' . $item['author'] . '</author>' : '') . '
		<title><![CDATA[' . html_entity_decode_utf8($item['title']) . ']]></title>
		<link>' . $item['link'] . '</link>
		<guid>' . $item['link'] . '</guid>
		<description><![CDATA[' . html_entity_decode_utf8($item['description']) . ']]></description>
		<pubDate>' . date('D, d M Y H:i:s \G\M\T', $item['pubdate']) . '</pubDate>
	</item>' . nr();
		}

		header('Content-type: text/xml');
		echo '<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
	<title>' . html_entity_decode_utf8(lang('rss_' . $umode)) . '</title>
	<link>http://www.rockrepublik.net/</link>
	<description><![CDATA[' . html_entity_decode_utf8(lang('rss_desc_' . $umode)) . ']]></description>
	<lastBuildDate>' . date('D, d M Y H:i:s \G\M\T', $this->xml[0]['pubdate']) . '</lastBuildDate>
	<webMaster>[email protected]</webMaster>
' . $items . '</channel>
</rss>';

		sql_close();
		exit;
	}
开发者ID:nopticon,项目名称:rockr,代码行数:33,代码来源:rss.php


示例7: convert_color

    }
}
$FLIR['color'] = convert_color($FStyle['cColor']);
if ($FLIR['bkg_transparent']) {
    $FLIR['bkgcolor'] = array('red' => abs($FLIR['color']['red'] - 100), 'green' => abs($FLIR['color']['green'] - 100), 'blue' => abs($FLIR['color']['blue'] - 100));
} else {
    $FLIR['bkgcolor'] = convert_color($FStyle['cBackground'], false, 'FFFFFF');
}
$FLIR['opacity'] = is_number($FStyle['cOpacity'], true) ? $FStyle['cOpacity'] * 100 : 100;
if ($FLIR['opacity'] > 100 || $FLIR['opacity'] < 0) {
    $FLIR['opacity'] = 100;
}
$FLIR['text'] = $_GET['text'] != '' ? str_replace(array('{amp}nbsp;', '{amp}', '{plus}'), array(' ', '&', '+'), trim($_GET['text'], "\t\n\r")) : 'null';
$FLIR['cache'] = get_cache_fn(md5(($FLIR['mode'] == 'wrap' ? $FLIR['maxwidth'] : '') . $FLIR['font'] . (print_r($FStyle, true) . $FLIR['text'])), $FLIR['output']);
$FLIR['text_encoded'] = $FLIR['text'];
$FLIR['text'] = $FLIR['original_text'] = strip_tags(html_entity_decode_utf8($FLIR['text']));
$SPACE_BOUNDS = false;
if (is_number($FStyle['cSpacing'], true, false, true)) {
    $SPACE_BOUNDS = bounding_box(' ');
    $spaces = ceil($FStyle['cSpacing'] / $SPACE_BOUNDS['width']);
    if ($spaces > 0) {
        $FLIR['text'] = space_out($FLIR['text'], $spaces);
        define('SPACING_GAP', $spaces);
    }
    if ($FLIR['postscript']) {
        $FLIR['ps']['kerning'] = $FStyle['cSpacing'] / $FLIR['size'] * 1000;
    }
}
if ($FLIR['postscript'] && isset($FStyle['space_width'])) {
    $FLIR['ps']['space'] = $FStyle['space_width'] / $FLIR['size'] * 1000;
}
开发者ID:palmic,项目名称:lbox,代码行数:31,代码来源:generate.php


示例8: unset

                        $numPending = (int) $numPending;
                        //    get latest post info
                        unset($thisThread);
                        $kunena_db->setQuery("SELECT m.thread, COUNT(*) AS totalmessages\n                                FROM #__fb_messages AS m\n                                LEFT JOIN #__fb_messages AS mm ON m.thread=mm.thread\n                                WHERE m.id='{$singlerow->id_last_msg}'\n                                GROUP BY m.thread");
                        $thisThread = $kunena_db->loadObject();
                        if (!is_object($thisThread)) {
                            $thisThread = new stdClass();
                            $thisThread->totalmessages = 0;
                            $thisThread->thread = 0;
                        }
                        $latestthreadpages = ceil($thisThread->totalmessages / $fbConfig->messages_per_page);
                        $latestthread = $thisThread->thread;
                        $latestname = $singlerow->mname;
                        $latestcatid = stripslashes($singlerow->catid);
                        $latestid = $singlerow->id_last_msg;
                        $latestsubject = html_entity_decode_utf8(stripslashes($singlerow->subject));
                        $latestuserid = $singlerow->userid;
                        ?>

                                <tr class = "<?php 
                        echo '' . $boardclass . '' . $tabclass[$k] . '';
                        ?>
" id="fb_cat<?php 
                        echo $singlerow->id;
                        ?>
">
                                    <td class = "td-1" align="center">
                                        <?php 
                        $tmpIcon = '';
                        $cxThereisNewInForum = 0;
                        if ($fbConfig->shownew && $kunena_my->id != 0) {
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:listcat.php


示例9: html_entity_decode_utf8

?>
:
                            <label for="exactname"><input type="checkbox" name="exactname" value="1" <?php 
if ($exactname) {
    echo $checked;
}
?>
 />
                            <?php 
echo _KUNENA_SEARCH_EXACT;
?>
</label>
                        </div>
                        <div id="userfield" style="line-height: 28px">
                            <input class="fbs input" type="text" name="searchuser" value="<?php 
echo html_entity_decode_utf8($searchuser);
?>
" style="width:250px"/>

                            <select class="fbs" name="starteronly">
                                <option value="0"<?php 
if ($starteronly == 0) {
    echo $selected;
}
?>
><?php 
echo _KUNENA_SEARCH_USER_POSTED;
?>
</option>
                                <!--<option value="1"<?php 
if ($starteronly == 1) {
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:advsearch.php


示例10: forums

 /**
  * Get the forum index
  * @since Version 3.2
  * @version 3.2
  * @return array
  * @todo Include newest post username, user id, post id, thread name, thread id
  */
 public function forums()
 {
     $query = "SELECT * FROM nuke_bbforums";
     if ($this->db instanceof \sql_db) {
         if ($rs = $this->db->query($query)) {
             while ($row = $rs->fetch_assoc()) {
                 $row['forum_name'] = html_entity_decode_utf8($row['forum_name']);
                 $this->forums[$row['forum_id']] = $row;
             }
             return $this->forums;
         } else {
             trigger_error("phpBB Index : Could not retrieve forums");
             return false;
         }
     } else {
         foreach ($this->db->fetchAll($query) as $row) {
             $row['forum_name'] = html_entity_decode_utf8($row['forum_name']);
             $this->forums[$row['forum_id']] = $row;
         }
         return $this->forums;
     }
 }
开发者ID:doctorjbeam,项目名称:railpagecore,代码行数:29,代码来源:Index.php


示例11: FormatTitle

 /**
  * Format a title
  * @since Version 3.9.1
  * @param string $text
  * @return $text
  */
 public static function FormatTitle($text = NULL)
 {
     if (is_null($text)) {
         return $text;
     }
     $timer = Debug::getTimer();
     Debug::RecordInstance();
     $text = htmlentities($text, ENT_COMPAT, "UTF-8");
     $text = str_replace("&trade;&trade;", "&trade;", $text);
     if (function_exists("html_entity_decode_utf8")) {
         $text = html_entity_decode_utf8($text);
     }
     $text = stripslashes($text);
     if (substr($text, 0, 4) == "Re: ") {
         $text = substr($text, 4, strlen($text));
     }
     if (substr($text, -1) == ".") {
         $text = substr($text, 0, -1);
     }
     Debug::logEvent(__METHOD__, $timer);
     return $text;
 }
开发者ID:railpage,项目名称:railpagecore,代码行数:28,代码来源:ContentUtility.php


示例12: load

 /**
  * Load the forum
  * @since Version 3.9.1
  * @return \Railpage\Forums\Forum
  * @param int|string $id
  * @param boolean $getParent
  */
 public function load($id = false, $getParent = false)
 {
     if ($id === false) {
         throw new InvalidArgumentException("No valid forum ID or shortname was provided");
     }
     $this->url = new Url(sprintf("/f-f%d.htm", $id));
     if (filter_var($id, FILTER_VALIDATE_INT)) {
         #$query = "SELECT * FROM nuke_bbforums f LEFT JOIN (nuke_bbtopics t, nuke_bbposts p, nuke_bbposts_text pt) ON (f.forum_last_post_id = p.post_id AND p.topic_id = t.topic_id AND pt.post_id = p.post_id) WHERE f.forum_id = ? LIMIT 1";
         $query = "SELECT f.*, p.post_time, p.poster_id, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid,\r\n                            t.topic_id, t.topic_title, t.topic_time,\r\n                            f.forum_name, f.forum_desc\r\n                        FROM nuke_bbforums AS f\r\n                            LEFT JOIN nuke_bbposts AS p ON f.forum_last_post_id = p.post_id\r\n                            LEFT JOIN nuke_bbtopics AS t ON p.topic_id = t.topic_id\r\n                            LEFT JOIN nuke_bbposts_text AS pt ON pt.post_id = p.post_id\r\n                        WHERE f.forum_id = ?";
         $row = $this->db->fetchRow($query, $id);
     }
     if (isset($row) && is_array($row)) {
         $this->id = $row['forum_id'];
         $this->catid = $row["cat_id"];
         $this->name = function_exists("html_entity_decode_utf8") ? html_entity_decode_utf8($row["forum_name"]) : $row['forum_name'];
         $this->description = function_exists("html_entity_decode_utf8") ? html_entity_decode_utf8($row["forum_desc"]) : $row['forum_desc'];
         $this->status = $row["forum_status"];
         $this->order = $row["forum_order"];
         $this->posts = $row["forum_posts"];
         $this->topics = $row["forum_topics"];
         $this->last_post = $row["forum_last_post_id"];
         $this->last_post_id = $this->last_post;
         $this->last_post_time = $row['post_time'];
         $this->last_post_user_id = $row['poster_id'];
         $this->last_post_username = $row['post_username'];
         $this->last_post_subject = $row['post_subject'];
         $this->last_post_text = $row['post_text'];
         $this->last_post_bbcodeuid = $row['bbcode_uid'];
         $this->last_post_topic_id = $row['topic_id'];
         $this->last_post_topic_title = $row['topic_title'];
         $this->last_post_topic_time = $row['topic_time'];
         $this->acl_resource = sprintf("railpage.forums.forum:%d", $this->id);
         if ($getParent) {
             $this->category = ForumsFactory::CreateCategory($this->catid);
         }
         if (filter_var($row['forum_parent'], FILTER_VALIDATE_INT) && $row['forum_parent'] > 0) {
             $this->Parent = new Forum($row['forum_parent']);
         }
     }
 }
开发者ID:railpage,项目名称:railpagecore,代码行数:47,代码来源:Forum.php


示例13: translate

}
$xtpl->assign("VALUE", $focus->contract_value);
if (!empty($focus->currency)) {
    $xtpl->assign("CURRENCY", translate('currency_dom', '', $focus->currency));
} else {
    $xtpl->assign("CURRENCY", '');
}
if (!empty($focus->deparment)) {
    $xtpl->assign("DEPARMENT", translate('deparment_dom', '', $focus->deparment));
} else {
    $xtpl->assign("DEPARMENT", '');
}
if (!empty($focus->type)) {
    $xtpl->assign('TYPE', translate('tourprogram_type_dom', '', $focus->type));
} else {
    $xtpl->assign('TYPE', '');
}
$xtpl->assign("DESCRIPTION", nl2br(html_entity_decode_utf8($focus->description)));
$xtpl->assign("TOUR_PROGRAM_LINE_DETAIL", $focus->getDetailViewHTMLTourProgramDetail($focus->id));
// $xtpl->assign("TOUR_PROGRAM_LINE_DETAIL", '');
$xtpl->parse("main");
$xtpl->out("main");
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($focus, 'Tours');
//    ob_end_clean();
echo $subpanel->display();
/* $str = "<script>
    YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
    </script>";

    echo $str;*/
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:31,代码来源:DetailView.php


示例14: str_replace

    $template = str_replace("{START_DATE}", $row['start_date'],$template); 
    $template = str_replace("{END_DATE}", $row['end_date'],$template); 
    $template = str_replace("{VALUE}", $row['contract_value'],$template);  
    $template = str_replace("{CURRENCY}",   translate('currency_dom','',$row['currency']),$template);  
    $template = str_replace("{DIVISION}",   translate('division_dom','',$row['division']),$template);  
    $template = str_replace("{ASSIGNED_TO}", $row['first_name'].' '.$row['last_name'],$template);  
    $template = str_replace("{OPERATOR}", $row['operator'],$template);  
    $template = str_replace("{DESCRIPTION}", html_entity_decode(nl2br( $row['description'])),$template);  
    $template = str_replace("{TOUR_PROGRAM_LINE_DETAIL}", $tour->get_data_to_expor2word($record),$template);*/
$template = str_replace('${CODE}', $tour->tour_code, $template);
$template = str_replace('${NAME}', $tour->name, $template);
$template = str_replace('${TRANSPORT}', $tour->transport2, $template);
$template = str_replace('${START_DATE}', $tour->start_date, $template);
$template = str_replace('${DURATION}', $tour->duration, $template);
$template = str_replace('${PICTURE}', $sugar_config['site_url'] . "/modules/images/" . $tour->picture, $template);
$template = str_replace('${TOUR_PROGRAM_LINES}', html_entity_decode_utf8($tour->get_data_to_expor2word()), $template);
$size = strlen($template);
/*$filename = "TOUR_PROGRAM_".$tour->name.".doc";
  ob_end_clean();
  header("Cache-Control: private");
  header("Content-Type: application/force-download;");
  header("Content-Disposition:attachment; filename=\"$filename\"");
  header("Content-length:$size");
  echo $template;
  ob_flush();*/
//added 09-06-2012
$filename = "TOUR_PROGRAM_" . $tour->name;
/*$mpdf=new mPDF(); 

    $mpdf->WriteHTML($template);
    $mpdf->Output($filename, "D");//D=Download; I-Internal - xem trực tiếp file*/
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:31,代码来源:export2pdf.php


示例15: GenerateChiTietTruongTrinh

 function GenerateChiTietTruongTrinh()
 {
     global $sugar_config;
     $result = $this->get_tour_program_lines($this->id);
     $html = "";
     $i = 1;
     while ($row = $this->db->fetchByAssoc($result)) {
         $notes = $row['notes'] ? "(" . $row['notes'] . ")" : "";
         $html .= "<div>";
         $html .= "<strong style='text-decoration:underline'>Ngày {$i}: " . $row['name'] . "</strong>&nbsp;" . $notes . "<br/>";
         $html .= "<div style='min-height: 154px'>";
         $html .= html_entity_decode_utf8($row['description']);
         $html .= "<img width='196' style='float:right' src='" . $sugar_config['site_url'] . "/modules/images/" . $row['picture'] . "' alt='Image'/>";
         $html .= "</div>";
         $html .= "</div>";
         $i++;
     }
     //echo $html;
     return $html;
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:20,代码来源:Tour.php


示例16: __construct

 /**
  * Constructor
  * @since Version 3.0.1
  * @version 3.0.1
  * @param int $forumid
  * @param object $database
  */
 function __construct($forumid, $getParent = true)
 {
     parent::__construct();
     if (RP_DEBUG) {
         global $site_debug;
         $debug_timer_start = microtime(true);
     }
     $this->Module = new Module("forums");
     $this->url = new Url(sprintf("/f-f%d.htm", $forumid));
     if ($this->db instanceof \sql_db) {
         $query = "SELECT * FROM nuke_bbforums f LEFT JOIN (nuke_bbtopics t, nuke_bbposts p, nuke_bbposts_text pt) ON (f.forum_last_post_id = p.post_id AND p.topic_id = t.topic_id AND pt.post_id = p.post_id) WHERE f.forum_id = '" . $this->db->real_escape_string($forumid) . "' LIMIT 1";
         $result = $this->db->query($query);
         if ($result->num_rows == 1) {
             $row = $result->fetch_assoc();
             foreach ($row as $key => $val) {
                 //$row[$key] = iconv('windows-1256', 'UTF-8', $val);
             }
         }
         $result->close();
     } else {
         $query = "SELECT * FROM nuke_bbforums f LEFT JOIN (nuke_bbtopics t, nuke_bbposts p, nuke_bbposts_text pt) ON (f.forum_last_post_id = p.post_id AND p.topic_id = t.topic_id AND pt.post_id = p.post_id) WHERE f.forum_id = ? LIMIT 1";
         $row = $this->db->fetchRow($query, $forumid);
     }
     if (isset($row) && is_array($row)) {
         $this->id = $forumid;
         $this->catid = $row["cat_id"];
         $this->name = html_entity_decode_utf8($row["forum_name"]);
         $this->description = html_entity_decode_utf8($row["forum_desc"]);
         $this->status = $row["forum_status"];
         $this->order = $row["forum_order"];
         $this->posts = $row["forum_posts"];
         $this->topics = $row["forum_topics"];
         $this->last_post = $row["forum_last_post_id"];
         $this->last_post_id = $this->last_post;
         $this->last_post_time = $row['post_time'];
         $this->last_post_user_id = $row['poster_id'];
         $this->last_post_username = $row['post_username'];
         $this->last_post_subject = $row['post_subject'];
         $this->last_post_text = $row['post_text'];
         $this->last_post_bbcodeuid = $row['bbcode_uid'];
         $this->last_post_topic_id = $row['topic_id'];
         $this->last_post_topic_title = $row['topic_title'];
         $this->last_post_topic_time = $row['topic_time'];
         $this->acl_resource = sprintf("railpage.forums.forum:%d", $this->id);
         if ($getParent) {
             $this->category = new Category($this->catid);
         }
     }
     if (RP_DEBUG) {
         $site_debug[] = __CLASS__ . "::" . __METHOD__ . " completed in " . round(microtime(true) - $debug_timer_start, 5) . "s";
     }
 }
开发者ID:doctorjbeam,项目名称:railpagecore,代码行数:59,代码来源:Forum.php


示例17: _clean_message

 /**
  * This method will return the given message into its state as it would have
  * been just *after* request_var.
  * It expects the parse_message object related to this post but the object
  * should only be filled, no changes should be made before this call
  * @param Object &$parser the parser object
  */
 function _clean_message(&$parser)
 {
     // Format the content as if it where *INSIDE* the posting field.
     $parser->decode_message($this->data['bbcode_uid']);
     $message =& $parser->message;
     // tmp copy
     if (defined('RUN_HTMLSPECIALCHARS_DECODE') && RUN_HTMLSPECIALCHARS_DECODE == true) {
         $message = htmlspecialchars_decode($message);
     }
     $message = html_entity_decode_utf8($message);
     // Now we'll *request_var* the post
     set_var($message, $message, 'string', true);
     $message = utf8_normalize_nfc($message);
     // Update the parser
     $parser->message =& $message;
     unset($message);
 }
开发者ID:napus,项目名称:support-toolkit,代码行数:24,代码来源:reparse_bbcode.php


示例18: changeModuleDashletStrings

 private function changeModuleDashletStrings($moduleName, $replacementLabels, $dashletsFiles)
 {
     $GLOBALS['log']->debug("Beginning to change module dashlet labels for: {$moduleName} ");
     $replacementStrings = array();
     foreach ($dashletsFiles as $dashletName => $dashletData) {
         if (isset($dashletData['module']) && $dashletData['module'] == $moduleName && file_exists($dashletData['meta'])) {
             require $dashletData['meta'];
             $dashletTitle = $dashletMeta[$dashletName]['title'];
             $currentModuleStrings = return_module_language($this->selectedLanguage, $moduleName);
             $modStringKey = array_search($dashletTitle, $currentModuleStrings);
             if ($modStringKey !== FALSE) {
                 $replacedString = str_replace(html_entity_decode_utf8($replacementLabels['prev_plural'], ENT_QUOTES), $replacementLabels['plural'], $dashletTitle);
                 if ($replacedString == $dashletTitle) {
                     $replacedString = str_replace(html_entity_decode_utf8($replacementLabels['prev_singular'], ENT_QUOTES), $replacementLabels['singular'], $replacedString);
                 }
                 $replacementStrings[$modStringKey] = $replacedString;
             }
         }
     }
     //Now we can write out the replaced language strings for each module
     if (count($replacementStrings) > 0) {
         $GLOBALS['log']->debug("Writing out labels for dashlet changes for module {$moduleName}, labels: " . var_export($replacementStrings, true));
         ParserLabel::addLabels($this->selectedLanguage, $replacementStrings, $moduleName);
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:25,代码来源:RenameModules.php


示例19: parse_message

	WHERE post_id = ' . $post_id;
$result = $db->sql_query($sql);
$f_id = (int) $db->sql_fetchfield('forum_id');
$db->sql_freeresult($result);
$sql = 'SELECT f.*, t.*, p.*, u.username, u.username_clean, u.user_sig, u.user_sig_bbcode_uid, u.user_sig_bbcode_bitfield
	FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f, ' . USERS_TABLE . " u\n\tWHERE p.post_id = {$post_id}\n\t\tAND t.topic_id = p.topic_id\n\t\tAND u.user_id = p.poster_id\n\t\tAND (f.forum_id = t.forum_id\n\t\t\tOR f.forum_id = {$f_id})";
$result = $db->sql_query($sql);
$post_data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// Load parser
$message_parser = new parse_message($post_data['post_text']);
unset($post_data['post_text']);
// Format the content as if it where *INSIDE* the posting field.
$message_parser->decode_message($post_data['bbcode_uid']);
$message =& $message_parser->message;
$message = html_entity_decode_utf8($message);
//var_dump($message);echo"\n\n\n\n";
// Here we "request_var" the post
set_var($message, $message, 'string', true);
$message = utf8_normalize_nfc($message);
//var_dump($message);echo"\n\n\n\n";
// Restore the var
$message_parser->message =& $message;
//var_dump($message_parser->message);echo"\n\n\n\n";
/*
*Now we can handle the post as in the submit action
*/
// Define flags
$post_flags = array('enable_bbcode' => $config['allow_bbcode'] ? $post_data['enable_bbcode'] : false, 'enable_magic_url' => $config['allow_post_links'] ? $post_data['enable_magic_url'] : false, 'enable_smilies' => $post_data['enable_smilies'], 'img_status' => $config['allow_bbcode'] ? true : false, 'flash_status' => $config['allow_bbcode'] && $config['allow_post_flash'] ? true : false, 'enable_urls' => $config['allow_post_links']);
// Parse the post
$message_parser->parse($post_flags['enable_bbcode'], $post_flags['enable_magic_url'], $post_flags['enable_smilies'], $post_flags['img_status'], $post_flags['flash_status'], true, $post_flags['enable_urls']);
开发者ID:napus,项目名称:support-toolkit,代码行数:31,代码来源:bbcode_reclean.php


示例20: get_select_options_with_id

        $status = get_select_options_with_id($app_list_strings['tour_status_dom'], $row['status']);
        /*$tour = array(
          "id" => $row['id'],
          "name" => $row['name'],
          "description" => $row['description'],
          "from_place" => $row['from_place'],
          "to_place" => $row['to_place'],
          "start_date" => $row[''],
          "end_date" => $row[''],
          "transport" => $transport,
          "transport_dom" => $transport_dom,
          "picture" => $row['picture']
          );*/
        foreach ($row as $key => $value) {
            if ($key == "description") {
                $tour[$key] = html_entity_decode_utf8($value);
            } else {
                $tour[$key] = $value;
            }
        }
        $tour['transport'] = $transport;
        $tour['transport_dom'] = $transport_dom;
        $tour['destination_dom'] = $destiantion_dom;
        $tour['currency'] = $currency;
        $tour['status'] = $status;
        $tours[$row['id']] = $tour;
    }
    $response = json_encode($tours);
} else {
    if (isset($_POST['tour_id']) && isset($_POST['department'])) {
        //tour id
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:31,代码来源:Ajax.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP html_entity_to_alpha函数代码示例发布时间:2022-05-15
下一篇:
PHP html_entity_decode函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap