本文整理汇总了PHP中process_line_output函数的典型用法代码示例。如果您正苦于以下问题:PHP process_line_output函数的具体用法?PHP process_line_output怎么用?PHP process_line_output使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了process_line_output函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLatestNews
function getLatestNews()
{
$iNewsOnHome = $this->oTemplConfig->iMaxNewsOnIndex;
$query = "\r\n\t\t\tSELECT\r\n\t\t\t\t`ID`,\r\n\t\t\t\t`Text`,\r\n\t\t\t\t`Header`,\r\n\t\t\t\t`Date`\r\n\t\t\tFROM\r\n\t\t\t\t`News`\r\n\t\t\tORDER BY `Date` DESC\r\n\r\n\t\t\tLIMIT {$iNewsOnHome}\r\n\t\t;";
$rNews = $this->oDb->getAll($query);
if (!is_array($rNews['0'])) {
return _t_action('_No news available');
}
$ret = '';
foreach ($rNews as $aNews) {
$ret .= '
<div class="indexNewsBlock">
<div class="indexNewsHeader">
<a href="' . $this->aSite['url'] . 'news_view.php?ID=' . process_line_output($aNews['ID']) . '">
' . strmaxtextlen(process_line_output($aNews['Header']), $this->oTemplConfig->iNewsHeader) . '
</a>
</div>
<div class="indexNewsText">
' . strmaxtextlen(process_html_output($aNews['Text']), $this->oTemplConfig->iNewsPreview) . '
</div>
<div class="indexNewsDate">
' . process_line_output($aNews['Date']) . '
</div>
</div>
';
}
$ret .= '<div class="indexNewsArchive"><a href="' . $this->aSite['url'] . 'news.php">' . _t("_Read news in archive") . '</a></div>';
return $ret;
}
示例2: getPageMainCode
function getPageMainCode()
{
global $oTemplConfig;
$ret = '';
$aPhotoConf = array();
$aPhotoConf['profileID'] = (int) $_REQUEST['ID'];
$aPhotoConf['visitorID'] = (int) $_COOKIE['memberID'];
$aPhotoConf['isOwner'] = $aPhotoConf['profileID'] == $aPhotoConf['visitorID'] ? true : false;
$check_res = checkAction($aPhotoConf['visitorID'], ACTION_ID_USE_GALLERY);
if ($check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) {
$ret = '
<table width="100%" cellpadding="4" cellspacing="4" border="0">
<tr>
<td align="center">' . $check_res[CHECK_ACTION_MESSAGE] . '</td>
</tr>
</table>';
return $ret;
}
$oMedia = new BxDolMedia();
$oMedia->iProfileID = $aPhotoConf['profileID'];
$oMedia->sMediaType = isset($_REQUEST['show']) ? $_REQUEST['show'] : 'video';
$oMedia->BxDolMedia();
$oMedia->getActiveMediaArray();
$ret .= ProfileDetails($oMedia->iProfileID);
$ret .= '<div class="clear_both"></div>';
if ($oTemplConfig->customize['media_gallery']['showMediaTabs']) {
$ret .= '<div class="choiseBlock">';
$ret .= getMediaTabs($oMedia->sMediaType, $oMedia->aMediaConfig);
$ret .= '</div>';
}
//print_r( $oMedia -> aMedia);
$i = 1;
foreach ($oMedia->aMedia as $aValue) {
$ret .= '<div class="mediaBlock">';
$ret .= '<div class="mediaTitleVA">';
$ret .= process_line_output($aValue['med_title']);
$ret .= '</div>' . "\n";
$ret .= '<div class="mediaActions">';
$ret .= '<span>';
$ret .= '<a href="' . $oMedia->getMediaLink($aValue) . '">';
$ret .= _t('_download');
$ret .= '</a>';
$ret .= '</span>';
/*
$ret .= '<span>';
$ret .= '<a href="' . $_SERVER['PHP_SELF'] . '?show=' . $oMedia -> sMediaType . '&action=delete&mediaID=' . $aValue['med_id'] . '">';
$ret .= _t('_delete');
$ret .= '</a>';
$ret .= '</span>';
*/
$ret .= '</div>' . "\n";
$ret .= '</div>' . "\n";
if ($i >= $oMedia->aMediaConfig['max'][$oMedia->sMediaType]) {
break;
}
$i++;
}
$ret .= '';
return $ret;
}
示例3: getMediaPage
function getMediaPage()
{
global $dir;
global $tmpl;
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
$this->getMediaArray();
$ret = '<div class="clear_both"></div>';
$tmplBlock = file_get_contents("{$dir['root']}templates/tmpl_{$tmpl}/media_page_block.html");
$i = 1;
foreach ($this->aMedia as $aValue) {
$block = $tmplBlock;
$aReplace['media_title'] = process_line_output($aValue['med_title']);
$aReplace['media_icon'] = '<img src="' . getTemplateIcon($this->sMediaType . '.jpg') . '" />';
$aReplace['nickname'] = '';
$aReplace['download'] = '<a href="' . $this->getMediaLink($aValue) . '">' . _t('_download') . '</a>';
$aReplace['delete'] = '<a href="' . $_SERVER['PHP_SELF'] . '?show=' . $this->sMediaType . '&action=delete&mediaID=' . $aValue['med_id'] . '" onclick="return confirm(\'' . _t('_are you sure?') . '\');">' . _t('_delete') . '</a>';
foreach ($aReplace as $key => $val) {
$block = str_replace("__{$key}__", $val, $block);
}
$ret .= $block;
if ($i++ >= $this->aMediaConfig['max'][$this->sMediaType]) {
break;
}
}
$ret .= '<div class="clear_both"></div>';
return $ret;
}
示例4: getStatusField
/**
* Function will generate field for input memeber's status text;
*
* @param : $iMemberID (integer) - logged member's Id;
* @return : Html presentation data;
*/
function getStatusField($iMemberId)
{
global $oSysTemplate;
$aMemberInfo = getProfileInfo($iMemberId);
$sStatusMessage = process_line_output($aMemberInfo['UserStatusMessage']);
$aTemplateKeys = array('status_message' => $sStatusMessage);
return $oSysTemplate->parseHtmlByName('member_menu_status_text_field.html', $aTemplateKeys);
}
示例5: quote_get
/**
* get a quote from the database
* returns HTML text that represents quote - text and author
*/
function quote_get()
{
global $quote_table;
global $quote_html;
$arr = db_arr("SELECT `Text`, `Author` FROM {$quote_table} ORDER BY RAND() LIMIT 1");
$ret = $quote_html;
$ret = str_replace('%Text%', process_text_output($arr['Text']), $ret);
$ret = str_replace('%Author%', process_line_output($arr['Author']), $ret);
return $ret;
}
示例6: MemberPrintNewsList
/**
* Print news
*/
function MemberPrintNewsList()
{
global $news_limit_chars;
global $short_date_format;
global $tmpl;
$query = "\n\t\tSELECT\n\t\t\t`ID`,\n\t\t\t`Header`,\n\t\t\t`Snippet`,\n\t\t\tDATE_FORMAT(`Date`, '{$short_date_format}' ) AS 'Date'\n\t\tFROM `News`\n\t\tORDER BY `Date` DESC\n\t\t";
$res = db_res($query);
ob_start();
if (!mysql_num_rows($res)) {
?>
<div class="no_news">
<?php
echo _t("_No news available");
?>
</div>
<?php
} else {
while ($news_arr = mysql_fetch_array($res)) {
?>
<div class="news_cont">
<div class="clear_both"></div>
<div class="news_header">
<a href="<?php
echo "{$site['url']}news_view.php?ID={$news_arr['ID']}";
?>
">
<?php
echo process_line_output($news_arr['Header']);
?>
</a>
</div>
<div class="news_date"><?php
echo $news_arr['Date'];
?>
</div>
<div class="news_snippet">
<?php
echo process_text_output($news_arr['Snippet']);
?>
</div>
<div class="clear_both"></div>
</div>
<?php
}
}
return ob_get_clean();
}
示例7: MemberPrintNews
function MemberPrintNews()
{
global $site;
global $short_date_format;
$res = db_res("SELECT `ID`, DATE_FORMAT(`Date`, '{$short_date_format}' ) AS 'Date', `Header`, `Text` FROM `News` ORDER BY `Date` DESC");
if (!$res) {
return;
}
echo "<table cellspacing=1 cellpadding=2 class=small width='100%'>\n";
if (!mysql_num_rows($res)) {
echo "<tr class=panel><td align=center>No news available.</td></tr>\n";
}
while ($news_arr = mysql_fetch_array($res)) {
$news_header = process_line_output($news_arr['Header']);
echo "\n\t\t\t<tr >\n\t\t\t\t<td align=center width=15%>\n\t\t\t\t\t<a href=\"news.php?edit_id={$news_arr['ID']}\">Edit</a> |\n\t\t\t\t\t<a href=\"news.php?action=delete&delete_id={$news_arr['ID']}\">Delete</a>\n\t\t\t\t</td>\n\t\t\t\t<td align=center width=15%>{$news_arr['Date']}</td>\n\t\t\t\t<td aling=left> <a target='_blank' href='{$site['url']}news_view.php?ID={$news_arr['ID']}'>{$news_header}</a></td>\n\t\t\t</tr>\n";
}
echo "</table>\n";
}
示例8: getMediaPage
function getMediaPage($iMediaID = 0)
{
global $votes_pic;
$ret = '';
//$ret .= $this -> getJSCode();
if (0 < $this->iMediaCount) {
$iMediaID = 0 < $iMediaID ? $iMediaID : $this->aMedia['0']['PrimPhoto'];
$aCurPhoto = $this->getElementArrayByID($iMediaID);
if (empty($aCurPhoto)) {
$sPhotoUrl = getTemplateIcon($this->sSexPic);
} else {
$ret .= '<div class="mediaTitle" id="sTitleDiv">';
$ret .= stripcslashes(process_line_output($aCurPhoto['med_title']));
$ret .= '</div>';
$iPhotoID = $aCurPhoto['med_id'];
$sPhotoUrl = $this->sMediaUrl . 'photo_' . $aCurPhoto['med_file'];
$iPhotoRating = $this->getRating($aCurPhoto['med_rating_sum'], $aCurPhoto['med_rating_count']);
}
} else {
$sPhotoUrl = getTemplateIcon($this->sSexPic);
}
$ret .= $this->getJSCode($aCurPhoto);
$ret .= '<div class="photoBlock" id="photoKeeper">';
$style = '
width:' . $this->aMediaConfig['size']['photoWidth'] . 'px;' . 'height:' . $this->aMediaConfig['size']['photoHeight'] . 'px;' . 'background-image:url(' . $sPhotoUrl . ');';
$ret .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="' . $style . '" class="photo" alt="" id="temPhotoID" />';
//$ret .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="' . $style . '" class="photo" alt="" onload="return setImage();" id="temPhotoID" />';
$ret .= '</div>';
$sJsArray = '';
$iPhotosCount = 0;
$sIconsList = $this->_getIconsList($sJsArray, $iPhotosCount);
$oVotingView = new BxTemplVotingView('media', (int) $aCurPhoto['med_id']);
//if( $iPhotosCount && getParam('votes_pic') == 'on' && $oVotingView->isEnabled())
if ($iPhotosCount && $votes_pic && $oVotingView->isEnabled()) {
$ret .= '<div class="votingBlock">' . $oVotingView->getBigVoting() . '</div>';
}
$ret .= '<div class="iconBlock">';
$ret .= $sIconsList;
$ret .= '</div>';
$ret .= '<script type="text/javascript">' . $sJsArray . '</script>';
return $ret;
}
示例9: MemberPrintNews
function MemberPrintNews()
{
global $site;
global $short_date_format;
$bNewsFriendly = getParam('permalinks_news') == 'on' ? true : false;
$res = getNewsList();
if (!$res) {
return;
}
echo "<table cellspacing=1 cellpadding=2 class=small width='100%'>\n";
if (!mysql_num_rows($res)) {
echo "<tr class=panel><td align=center>No news available.</td></tr>\n";
}
while ($news_arr = mysql_fetch_array($res)) {
$news_header = process_line_output($news_arr['Header']);
$sNewsUrl = getNewsUrl($news_arr['newsID'], $news_arr['NewsUri'], $bNewsFriendly);
echo "\r\n\t\t\t<tr >\r\n\t\t\t\t<td align=center width=15%>\r\n\t\t\t\t\t<a href=\"news.php?edit_id={$news_arr['newsID']}\">Edit</a> |\r\n\t\t\t\t\t<a href=\"news.php?action=delete&delete_id={$news_arr['newsID']}\">Delete</a>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td align=center width=15%>" . date(str_replace('%', '', $short_date_format), $news_arr['Date']) . "</td>\r\n\t\t\t\t<td aling=left> <a target='_blank' href='{$sNewsUrl}'>{$news_header}</a></td>\r\n\t\t\t</tr>\n";
}
echo "</table>\n";
}
示例10: PageCompPageMainCode
/**
* page code function
*/
function PageCompPageMainCode()
{
global $tmpl;
$links_res = db_res("SELECT * FROM `Links`");
if (!mysql_num_rows($links_res)) {
$out .= "<div class=\"no_links\">" . _t("_NO_LINKS") . "</div>\n";
} else {
while ($link_arr = mysql_fetch_array($links_res)) {
$link_url = process_line_output($link_arr['URL'], 1000);
$link_title = process_line_output($link_arr['Title']);
$link_desc = process_text_output($link_arr['Description']);
$out .= "<div class=\"links_cont\">\n";
$out .= "<div class=\"clear_both\"></div>\n";
$out .= "<div class=\"links_header\">";
$out .= "<a href=\"{$link_url}\">{$link_title}</a></div>\n";
$out .= "<div class=\"links_snippet\">{$link_desc}</div>\n";
$out .= "<div class=\"clear_both\"></div></div>\n";
}
}
return $out;
}
示例11: MemberPrintPolls
function MemberPrintPolls()
{
global $site;
$res = db_res("SELECT `ID`, `Question`, `Active` FROM `polls_q` ORDER BY `Active`, `Question` DESC");
if (!$res) {
return;
}
echo "<table cellspacing=1 cellpadding=2 class=small width='100%'>\n";
if (!mysql_num_rows($res)) {
echo "<tr class=panel><td align=center>No polls available.</td></tr>\n";
}
while ($poll_arr = mysql_fetch_array($res)) {
if ($poll_arr['Active'] == 'on') {
$active = "<td width=15 bgcolor=green> </td>";
} else {
$active = "<td width=15 bgcolor=red> </td>";
}
$poll_question = process_line_output($poll_arr['Question']);
echo "\n\t\t\t<tr class=panel>\n\t\t\t\t{$active}\n\t\t\t\t<td align=center width=15%>\n\t\t\t\t\t<a href=\"polls.php?edit_id={$poll_arr['ID']}\">Edit</a> |\n\t\t\t\t\t<a href=\"polls.php?action=delete&delete_id={$poll_arr['ID']}\">Delete</a>\n\t\t\t\t</td>\n\t\t\t\t<td aling=left> <a target='_blank' href='{$site['url']}poll.php?ID={$poll_arr['ID']}'>{$poll_question}</a></td>\n\t\t\t</tr>\n";
}
echo "</table>\n";
}
示例12: printNewsPanel
function printNewsPanel($iLimit = 0, $iPreview = 128)
{
global $site;
$php_date_format = getParam('php_date_format');
// news
$news_limit_chars = getParam("max_news_preview");
$bNewsFriendly = getParam('permalinks_news') == 'on' ? true : false;
$news_res = getNewsList($iLimit);
$news_count = db_arr("SELECT COUNT(*) FROM `News`");
$news_counter = $news_count['0'];
$ret = '';
if ($news_counter > 0) {
while ($news_arr = mysql_fetch_assoc($news_res)) {
$ret .= '<div class="newsWrap">';
$ret .= '<div class="newsHead">';
$ret .= '<a href="' . getNewsUrl($news_arr['newsID'], $news_arr['NewsUri'], $bNewsFriendly) . '">';
$ret .= process_line_output($news_arr['Header']);
$ret .= '</a>';
$ret .= '</div>';
//$ret .= '<div class="newsInfo"><img src="' . getTemplateIcon( 'clock.gif' ) . '" />' . date( $php_date_format, $news_arr['Date'] ) . '</div>';
$ret .= '<div class="newsInfo"><img src="' . getTemplateIcon('clock.gif') . '" />' . LocaledDataTime($news_arr['Date']) . '</div>';
$ret .= '<div class="newsText">';
//$ret .= process_text_withlinks_output( $news_arr['Snippet'] );
$ret .= process_html_output($news_arr['Snippet']);
$ret .= '</div>';
$ret .= '</div>';
}
if ($news_counter > $max_news_on_home) {
$sNewsLink = $bNewsFriendly ? $site['url'] . 'news/' : $site['url'] . 'news.php';
$ret .= '<div class="newsReadMore">';
$ret .= '<a href="' . $sNewsLink . '">' . _t("_Read news in archive") . '</a>';
$ret .= '</div>';
}
} else {
$ret .= '<div class="no_result"><div>' . _t("_No news available") . '</div></div>';
}
return $ret;
}
示例13: PageCompPageMainCode
/**
* page code function
*/
function PageCompPageMainCode()
{
global $site;
global $short_date_format;
$out = "";
$query = "SELECT `Stories`.`ID`, `Profiles`.`ID` as `MembID`, DATE_FORMAT(`Stories`.`Date`, '{$short_date_format}' ) AS 'Date', `Stories`.`Header`, `Stories`.`Text`, `Profiles`.`ID` as `prID`, `Profiles`.`NickName` FROM `Stories` INNER JOIN `Profiles` ON (`Stories`.`Sender` = `Profiles`.`ID`) WHERE `Stories`.`active` = 'on' ORDER BY `Stories`.`Date` DESC";
$res = db_res($query);
if (!$res) {
return 0;
}
$out .= "\n\t\t<br />\n\t\t<div align=left> <a href=\"" . $site['url'] . "story.php\">" . _t("_post my feedback") . "</a></div>\n\t\t<br />\n\t\t<table width=\"100%\" cellspacing=1 cellpadding=2 class=small width=100%>";
$num = mysql_num_rows($res);
if (!$num) {
$out .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td><center>" . _t("_NO_STORIES") . "</center></td>\n\t\t\t\t</tr>";
} else {
while ($arr = mysql_fetch_array($res)) {
$story_header = process_line_output($arr['Header']);
$out .= "\n\t\t\t\t<tr class=panel>\n\t\t\t\t\t<td align=center width=15%>{$arr['Date']}</td>\n\t\t\t\t\t<td align=center width=15%><a href=\"" . getProfileLink($arr['prID']) . "\">{$arr['NickName']}</a></td>\n\t\t\t\t\t<td aling=left> <a href='story_view.php?ID={$arr['ID']}'>{$story_header}</a></td>\n\t\t\t\t</tr>";
}
}
$out .= "\n\t\t</table>\n";
return $out;
}
示例14: getExistedBannersBlock
function getExistedBannersBlock()
{
$sClicksC = _t('_adm_bann_clicks');
$sImpressionsC = _t('_adm_bann_impressions');
$sPreviewC = _t('_Preview');
$sEditC = _t('_Edit');
$sDeleteC = _t('_Delete');
// Get banner info from database.
$banners_res = db_res("SELECT * FROM `sys_banners` ORDER BY `ID` DESC");
$sExistedBanners = MsgBox(_t('_Empty'));
if (mysql_num_rows($banners_res)) {
$sExistedBanners = "<table cellspacing=1 cellpadding=2 border=0 class=small1 width=100%>";
while ($banns_arr = mysql_fetch_array($banners_res)) {
$imp = db_arr("SELECT COUNT(*) FROM `sys_banners_shows` WHERE `ID` = '{$banns_arr['ID']}'");
$clicks = db_arr("SELECT COUNT(*) FROM `sys_banners_clicks` WHERE `ID` = '{$banns_arr['ID']}'");
$class = !$banns_arr['Active'] ? 'table_err' : 'panel';
$sBannerTitle = process_line_output($banns_arr['Title']);
$sExistedBanners .= <<<EOF
<tr class={$class}>
\t<td>
\t\t(<a href="banners.php?action=preview&banner_id={$banns_arr['ID']}">{$sPreviewC}</a> |
\t\t\t<a href="banners.php?banner_id={$banns_arr['ID']}">{$sEditC}</a> |
\t\t\t<a href="banners.php?banner_id={$banns_arr['ID']}&action=delete">{$sDeleteC}</a>)
\t\t\t{$sBannerTitle}
\t\t</a>
\t</td>
\t<td><b>{$clicks[0]}</b> {$sClicksC} </td>
\t<td><b>{$imp[0]}</b> {$sImpressionsC} </td>
</tr>
EOF;
}
$sExistedBanners .= "</table>";
}
$sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $sExistedBanners));
return DesignBoxContent(_t('_adm_mmi_banners'), $sResult, 1);
}
示例15: getRatingPhoto
function getRatingPhoto($aPhoto)
{
global $max_photo_width, $max_photo_height, $dir, $site;
$sFileSrc = $dir['profileImage'] . $aPhoto['med_prof_id'] . '/photo_' . $aPhoto['med_file'];
if (extFileExists($sFileSrc)) {
$sPhotoUrl = $site['profileImage'] . $aPhoto['med_prof_id'] . '/photo_' . $aPhoto['med_file'];
} else {
header('Location:' . $_SERVER['PHP_SELF']);
}
$ret = '';
$ret .= '<div class="mediaTitle">';
$ret .= process_line_output($aPhoto['med_title']);
$ret .= '</div>';
$ret .= '<div class="photoBlock" style="text-align:center;">';
$ret .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="width:' . $max_photo_width . 'px; height:' . $max_photo_height . 'px; background-image:url(' . $sPhotoUrl . ');" class="photo" />';
$ret .= '</div>';
return $ret;
}