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

PHP formatText函数代码示例

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

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



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

示例1: showPollOptions

function showPollOptions($options, $alreadyVoted, $totalVoted, $polid)
{
    if ($alreadyVoted) {
        $maxVoted = $totalVoted;
        foreach ($options as $optData) {
            $maxVoted = $optData["polOVotes"];
            break;
        }
        foreach ($options as $optData) {
            ?>
			<table cellspacing="0" cellpadding="0" border="0"><tr>
				<td class="wide">
					<?php 
            echo formatText($optData["polOOption"]);
            ?>
				</td>
				<td class="smalltext disable_wrapping" style="vertical-align: bottom">
					(<?php 
            echo fuzzy_number($optData["polOVotes"]);
            ?>
)
				</td>
			</tr></table>
			<?php 
            showPollBar($optData["polOVotes"], $maxVoted, $totalVoted);
        }
    } else {
        $options = array();
        $result2 = sql_query("SELECT * FROM `pollOptions` " . "WHERE `polOPoll` = '" . $polid . "' ORDER BY `polOid` LIMIT 20");
        while ($optData = mysql_fetch_assoc($result2)) {
            $options[$optData["polOid"]] = $optData;
        }
        foreach ($options as $optData) {
            ?>
			<div>
				<input class="checkbox" type="checkbox" id="<?php 
            echo $chkid = generateId();
            ?>
" name="option<?php 
            echo $optData["polOid"];
            ?>
" />
				<label for="<?php 
            echo $chkid;
            ?>
">
					<?php 
            echo formatText($optData["polOOption"]);
            ?>
				</label>
			</div>
			<?php 
        }
    }
}
开发者ID:brocococonut,项目名称:yGallery,代码行数:55,代码来源:polling.php


示例2: updateJSStrings

function updateJSStrings($lang)
{
    include INCLUDES . "emoticons.inc";
    // local $_emoticons
    include_once INCLUDES . "files.php";
    forceFolders("scripts/strings");
    $neededStrings = array("_ARE_YOU_SURE" => "_ARE_YOU_SURE", "_BB_ALIGN_CENTER" => "_BB_ALIGN_CENTER", "_BB_ALIGN_JUSTIFY" => "_BB_ALIGN_JUSTIFY", "_BB_ALIGN_LEFT" => "_BB_ALIGN_LEFT", "_BB_ALIGN_RIGHT" => "_BB_ALIGN_RIGHT", "_BB_BOLD" => "_BB_BOLD", "_BB_CLUBICON" => "_BB_CLUBICON", "_BB_EMOTICON" => "_BB_EMOTICON", "_BB_ITALIC" => "_BB_ITALIC", "_BB_STRIKED" => "_BB_STRIKED", "_BB_UNDERLINE" => "_BB_UNDERLINE", "_BB_SUBSCRIPT" => "_BB_SUBSCRIPT", "_BB_SUPERSCRIPT" => "_BB_SUPERSCRIPT", "_BB_THUMB" => "_BB_THUMB", "_BB_URL" => "_BB_URL", "_BB_USERICON" => "_BB_USERICON", "_BLANK_COMMENT" => "_BLANK_COMMENT", "_EMOTICONS" => "_EMOTICONS", "_EMOTICON_EXPLAIN" => "_EMOTICON_EXPLAIN", "_ENTER_CLUBNAME" => "_ENTER_CLUBNAME", "_ENTER_LINK_TEXT" => "_ENTER_LINK_TEXT", "_ENTER_LINK_URL" => "_ENTER_LINK_URL", "_ENTER_THUMBID" => "_ENTER_THUMBID", "_ENTER_USERNAME" => "_ENTER_USERNAME", "_FUZZY_0" => "_FUZZY_0", "_FUZZY_1" => "_FUZZY_1", "_FUZZY_2" => "_FUZZY_2", "_FUZZY_3" => "_FUZZY_3", "_FUZZY_7" => "_FUZZY_7", "_FUZZY_11" => "_FUZZY_11", "_FUZZY_24" => "_FUZZY_24", "_FUZZY_48" => "_FUZZY_48", "_FUZZY_99" => "_FUZZY_99", "_FUZZY_234" => "_FUZZY_234", "_FUZZY_456" => "_FUZZY_456", "_FUZZY_987" => "_FUZZY_987", "_HIDE" => "_HIDE", "_INVALID_FILE_TYPE" => "_JS_INVALID_FILE_TYPE", "_MORE" => "_MORE", "_NO_BBCODE" => "_NO_BBCODE", "_NO_EMOTICONS" => "_NO_EMOTICONS", "_NO_SIG" => "_NO_SIG", "_OEKAKI_NO_EDITOR" => "_JS_OEKAKI_NO_EDITOR", "_PLEASE_WAIT" => "_JS_PLEASE_WAIT", "_PREVIEW" => "_PREVIEW", "_PREV_FLASH_MOVIE" => "_JS_PREV_FLASH_MOVIE", "_PREV_TEXT_FILE" => "_JS_PREV_TEXT_FILE", "_READONLY" => "_READONLY", "_REQUIRE_LOGIN" => "_REQUIRE_LOGIN", "_SEND_COMMENT" => "_SEND_COMMENT", "_UPDATES" => "_UPDATES", "_MESSAGES" => "_MESSAGES", "_FAVOURITES" => "_FAVOURITES", "_COMMENTS" => "_COMMENTS", "_JOURNALS" => "_JOURNALS", "_SUBMISSIONS" => "_SUBMISSIONS", "_SUBMIT_TYPE_EXTRA" => "_SUBMIT_TYPE_EXTRA");
    $filename = "scripts/strings/" . $lang . ".js";
    $fp = fopen($filename . "_tmp", "w");
    foreach ($neededStrings as $key => $value) {
        $result = sql_query("SELECT `strText` FROM `strings` " . "WHERE `strLanguage` = '{$lang}' AND `strName` = '" . $value . "' LIMIT 1");
        if ($data = mysql_fetch_assoc($result)) {
            $text = formatText($data["strText"], true);
        } else {
            $result = sql_query("SELECT `strText` FROM `strings` " . "WHERE `strLanguage` = 'en' AND `strName` = '" . $value . "' LIMIT 1");
            if ($data = mysql_fetch_assoc($result)) {
                $text = formatText($data["strText"], true);
            } else {
                $text = "???";
            }
        }
        fwrite($fp, "var {$key} = '" . str_replace("\n", "", addslashes($text)) . "';\n");
    }
    fwrite($fp, "var Emoticons = new Array( ");
    $emots = array();
    foreach ($_emoticons as $emo1) {
        if (!$emo1["emoExtra"]) {
            $emots[$emo1["emoExpr"]] = $emo1;
        }
    }
    ksort($emots);
    $first = true;
    foreach ($emots as $emo1) {
        if ($first) {
            $first = false;
        } else {
            fwrite($fp, ",");
        }
        fwrite($fp, "{ expr: '" . $emo1["emoExpr"] . "', icon: '" . $emo1["emoFilename"] . "' }");
    }
    unset($emots);
    fwrite($fp, " );\n");
    fclose($fp);
    if (file_exists($filename)) {
        unlink($filename);
    }
    rename($filename . "_tmp", $filename);
}
开发者ID:brocococonut,项目名称:yGallery,代码行数:48,代码来源:p_updatestrings.php


示例3: array

$tabs = array("requirements" => "Requirements", "subprojects" => "Bugs/Subprojects", "sponsors" => "Sponsors", "news" => "Activity", "submissions" => "Submissions", "start" => "Get Started");
list($rc, $disputes) = ff_getprojectdisputes($id);
if (!$rc && sizeof($disputes)) {
    $tabs["disputes"] = "Disputes";
}
tab_header($tabs, projurl($id), $tab, "requirements");
include_once "forum.php";
if ($tab == 'requirements') {
    print '<div style="font-size:small;color:#9c9d9d;text-align:center;padding-bottom:0.2em;font-style:italic">';
    print "Note: You can propose changes " . "using the forum below.</div>\n";
    print '<div class="spec">';
    //check if post has attachments
    if ($projinfo['numattachments'] > 0) {
        list($rc, $body) = ff_attachtoproject($projinfo['id'], formatText($projinfo["reqmts"]));
    } else {
        $body = formatText($projinfo["reqmts"]);
    }
    print $body;
    print '</div>';
    if ($projinfo['numattachments'] > 0) {
        print "<br>\n";
        print "<b>attachments:</b><br>\n";
        list($rc, $err) = ff_listprojectattachments($projinfo['id']);
    }
    //display the list of history changes
    list($rc, $history) = ff_getreqmtshistory($id);
    if (!$rc && sizeof($history) > 0) {
        print "<br><b>Change History:</b><br>\n";
        print "<ul>\n";
        $historysize = sizeof($history);
        for ($i = $historysize - 1; $i >= 0; $i--) {
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:project.php


示例4: sql_query

$modResult = sql_query("SELECT * FROM `adminChat` ORDER BY `adcSubmitdate` DESC {$modLimit}");
while ($modData = mysql_fetch_assoc($modResult)) {
    ?>
				<div class="sep mar_left mar_right">
					#<?php 
    echo $modData["adcId"];
    ?>
 - <?php 
    echo gmdate($_auth["useDateFormat"], applyTimezone(strtotime($modData["adcSubmitDate"])));
    ?>
					- <?php 
    echo getUserLink($modData["adcCreator"]);
    ?>
:
					<?php 
    echo formatText($modData["adcText"]);
    ?>
				</div>
				<?php 
}
mysql_free_result($modResult);
?>
			<div class="sep a_center">
				<?php 
iefixStart();
$commentName = "modMessage";
$commentNoOptions = true;
$commentRows = 8;
include INCLUDES . "mod_comment.php";
iefixEnd();
?>
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_adminchat.php


示例5: redirect

                redirect(url("view/" . $objid));
            }
        }
        ?>
		<form action="<?php 
        echo url(".", array("edit" => "keywords"));
        ?>
" method="post">
		<div class="header">
			<div class="header_title">
				<?php 
        echo _EDIT_SUBMISSION;
        ?>
				<div class="subheader">
					<?php 
        echo formatText($objData["objTitle"]);
        ?>
				</div>
			</div>
			<?php 
        if (isset($_POST["keywordList"])) {
            $defaultKeywords = $_POST["keywordList"];
        } else {
            $sql = "SELECT * FROM `objKeywords`" . dbWhere(array("objKobject" => $objid));
            $result = sql_query($sql);
            $idList = array();
            while ($rowData = mysql_fetch_assoc($result)) {
                $idList[] = $rowData["objKkeyword"];
            }
            $defaultKeywords = implode(" ", $idList);
        }
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_edit.php


示例6: makeFloatingThumb

function makeFloatingThumb($title, $src, $width, $height, $isMature, $isThumb, &$onmouseover, &$onmouseout)
{
    global $_addToFooter;
    $floaterId = generateId("thumbFloat");
    $title = strip_tags(formatText($title));
    $_addToFooter .= '<div id="' . $floaterId . '" class="floating_thumb" ' . 'style="width: ' . ($width + ($isThumb ? 6 : 0)) . 'px; height: ' . ($height + ($isThumb ? 6 : 0)) . 'px">' . getIMG($src, 'alt="' . $title . '" class="' . ($isThumb ? "thumb " : "") . ($isMature ? " mature" : "") . '" title="' . $title . '"') . '</div>' . "\n";
    $onmouseover = "current_floater = get_by_id('{$floaterId}'); this.onmousemove = move_to_element;";
    $onmouseout = "el=get_by_id('{$floaterId}'); if(el) { make_invisible('{$floaterId}'); current_floater = 0; }";
}
开发者ID:brocococonut,项目名称:yGallery,代码行数:9,代码来源:formatting.php


示例7: formatText

					<div class="container2 notsowide" style="margin-bottom : 12px; padding : 0; overflow : hidden;">
						<div class="f_right a_center normaltext" style="margin : 8px;">
							<?php 
    echo $avatar;
    ?>
						</div>
						<div class="largetext" style="padding : 8px;">
							<b><?php 
    echo formatText($title, false, true);
    ?>
</b>
						</div>
						<div style="padding : 0 8px; min-height : 9em; max-height : 11em; position : relative;">
							<div>
								<?php 
    echo formatText($body);
    ?>
							</div>
							<div class="container" style="padding : 4px 8px; position : absolute; <?php 
    ?>
left : 0; bottom : 0; right : 0;">
								<a style="float : right;" href="<?php 
    echo $url;
    ?>
">
									<span class="button smalltext">
										<?php 
    echo _REPLY;
    ?>
									</span>
								</a>
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_updates.php


示例8: formatText

            $body = formatText($submission["reqmts"]);
            if ($projectinfo["numattachments"] > 0) {
                list($rc, $body) = ff_attachtoproject($projectinfo['id'], $body);
            }
            ?>
<div class=spec><?php 
            echo $body;
            ?>
</div>
<br>
<?php 
        }
        ?>
<b>Submission notes:</b><br>
<?php 
        echo formatText($submission['comments']);
        ?>
<table cellpadding=0 cellspacing=0>
<?php 
        foreach ($submission['files'] as $filekey => $file) {
            ?>
        <tr>
            <td><?php 
            echo htmlentities($file['filename']);
            ?>
</td>
            <td align=right>&nbsp;&nbsp;&nbsp;(<?php 
            echo htmlentities($file['filesize']);
            ?>
 bytes)</td>
            <td>&nbsp;&nbsp;&nbsp;<nobr><a href="displaysubmission.php/<?php 
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:submissions.php


示例9: formatText

:</div>
							<?php 
    $script = "make_invisible('signature_current'); " . "make_invisible('signature_edit'); " . "make_visible('signature_change'); " . "return false;";
    $signatureEdit = '<div id="signature_edit">' . '(<a href="" onclick="' . $script . '">' . _EDIT . '</a>)</div>';
    if (trim($useData["useSignature"]) != "") {
        echo $signatureEdit;
    }
    ?>
						</td>
						<td>
							<div id="signature_current">
								<?php 
    if (trim($useData["useSignature"]) != "") {
        ?>
									<div class="container2"><?php 
        echo formatText($useData["useSignature"]);
        ?>
</div>
									<?php 
    } else {
        echo $signatureEdit;
    }
    ?>
							</div>
							<div id="signature_change" style="display: none">
								<div>
									<?php 
    iefixStart();
    $commentName = "useSignature";
    $commentDefault = $useData["useSignature"];
    $commentNoOptions = true;
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_moderate.php


示例10: showKeywordSubcat

function showKeywordSubcat($keywords, $parentId = 0, $parentKeyName = "", $parentLastKeyName = "")
{
    global $requiredTabs, $firstKeywordId, $isInHeader, $previousFullname;
    $noSubcats = true;
    foreach ($keywords as $keyData) {
        if (isset($keyData["subcats"])) {
            $noSubcats = false;
            break;
        }
    }
    if ($parentLastKeyName != "") {
        writeKeywordData(KWD_APP_HEADER, array("caption" => getKeywordCaption($parentLastKeyName)));
    }
    foreach ($keywords as $keyData) {
        $tabid = generateId("");
        $nonSelectable = preg_match('/\\@$/', $keyData["keyWord"]);
        $keyData["keyWord"] = preg_replace('/\\@$/', "", $keyData["keyWord"]);
        $keyWord = htmlspecialchars($keyData["keyWord"]);
        if (!$firstKeywordId && $isInHeader) {
            $firstKeywordId = "kwcache_tab" . $tabid;
        }
        $nameArr = preg_split('/\\"/', $parentKeyName . $keyWord, -1, PREG_SPLIT_NO_EMPTY);
        $fullname = "'";
        $first = true;
        foreach ($nameArr as $name1) {
            if ($name1 == $keyWord) {
                continue;
            }
            $fullname .= ($first ? "" : ",") . getKeywordCaption($name1);
            $first = false;
        }
        $fullname .= "'";
        /*
        if($fullname == $previousFullname)
        	$fullname = "";
        else
        	$previousFullname = $fullname;
        */
        $keywordSpace = $parentId != 0 && !$noSubcats ? 1 : 0;
        // If it contains sub-keywords, display as tab.
        if (isset($keyData["subcats"])) {
            $params = array("keyword_space" => $keywordSpace, "id" => $tabid, "group" => $parentId, "target" => $keyData["keyid"], "caption" => getKeywordCaption($keyWord, formatText($keyData["keyDesc"])));
            if (!($parentId != 0 && !$nonSelectable)) {
                // If it's a root keyword or it's set as non-selectable, display as
                // simple tab.
                writeKeywordData(KWD_APP_TAB, $params);
            } else {
                // Otherwise, display as tab with a selectable keyword inside.
                writeKeywordData(KWD_APP_KEYWORD_TAB, array_merge($params, array("fullname" => $fullname)));
            }
        } else {
            // Otherwise, display as simple selectable keyword.
            writeKeywordData(KWD_APP_KEYWORD, array("keyword_space" => $keywordSpace, "id" => $keyData["keyid"], "caption" => getKeywordCaption($keyWord, formatText($keyData["keyDesc"])), "fullname" => $fullname));
        }
    }
    writeKeywordData(KWD_APP_CLEAR);
    if ($isInHeader) {
        writeKeywordData(KWD_APP_SWITCH);
        $isInHeader = false;
    }
    foreach ($keywords as $keyData) {
        $keyData["keyWord"] = preg_replace('/\\@$/', "", $keyData["keyWord"]);
        unset($requiredTabs[$keyData["keyid"]]);
        if (isset($keyData["subcats"])) {
            writeKeywordData(KWD_APP_OPEN, array("id" => $keyData["keyid"]));
            if ($keyData["keySubcat"] != 0) {
                writeKeywordData(KWD_APP_HLINE);
            }
            showKeywordSubcat($keyData["subcats"], $keyData["keyid"], $parentKeyName . htmlspecialchars($keyData["keyWord"]) . '"', $parentId != 0 ? htmlspecialchars($keyData["keyWord"]) : "");
            writeKeywordData(KWD_APP_CLOSE);
        }
    }
}
开发者ID:brocococonut,项目名称:yGallery,代码行数:73,代码来源:mod_keywords_build.php


示例11: url

" method="post">
                <input type="hidden" name="deleteSentMessage" value="1" />
				<div class="f_left mar_bottom">
                	<input type="checkbox" name="pmsid_<?php 
    echo $rowData["pmsid"];
    ?>
" />
					<a href="<?php 
    echo url("pm/read/" . $rowData["pmsid"]);
    ?>
">
						<?php 
    echo getIMG(url() . "images/emoticons/pmout.png");
    ?>
						<?php 
    echo formatText($rowData["pmsTitle"], false, true);
    ?>
					</a>
					<?php 
    echo _PM_FOR;
    ?>
					<?php 
    echo getUserLink($rowData["pmsPmUser"]);
    ?>
				</div>
				<div class="f_right mar_bottom a_right">
					<?php 
    echo date($_auth['useDateFormat'], applyTimezone(strtotime($rowData["pmsSubmitDate"])));
    ?>
				</div>
				<div class="clear">&nbsp;</div>
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_pm.php


示例12: formatText

:</div>
				<?php 
$script = "make_invisible('profile_current'); " . "make_invisible('profile_edit'); " . "make_visible('profile_change'); " . "return false;";
$profileEdit = '<div id="profile_edit">' . '(<a href="" onclick="' . $script . '">' . _EDIT . '</a>)</div>';
if (trim($_auth["useProfile"]) != "") {
    echo $profileEdit;
}
?>
			</td>
			<td>
				<div id="profile_current">
					<?php 
if (trim($_auth["useProfile"]) != "") {
    ?>
						<div class="container2"><?php 
    echo formatText($_auth["useProfile"]);
    ?>
</div>
						<?php 
} else {
    echo $profileEdit;
}
?>
				</div>
				<div id="profile_change" style="display: none">
					<div>
						<?php 
iefixStart();
$commentName = "useProfile";
$commentDefault = $_auth["useProfile"];
$commentNoOptions = true;
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_profile.php


示例13: fopen

 //normally we could use a write-only lock 'c', but on Windows you can't read the file when write-locked!
 $f = fopen("{$FILE}.rss", 'r+');
 flock($f, LOCK_EX);
 //we have to read the XML using the file handle that's locked because in Windows, functions like
 //`get_file_contents`, or even `simplexml_load_file`, won't work due to the lock
 $xml = simplexml_load_string(fread($f, filesize("{$FILE}.rss"))) or (require FORUM_LIB . 'error_xml.php');
 if (!(NAME == $xml->channel->item[0]->author && formatText(TEXT, $xml) == $xml->channel->item[0]->description && !$xml->channel->xpath('category[.="locked"]'))) {
     //where to?
     $page = (count($thread) + 1) % FORUM_POSTS == 1 ? floor((count($thread) + 1) / FORUM_POSTS) : ceil((count($thread) + 1) / FORUM_POSTS);
     $url = FORUM_URL . url('thread', PATH_URL, $FILE, $page) . '#' . base_convert(microtime(), 10, 36);
     //re-template the whole thread:
     $rss = new DOMTemplate(file_get_contents(FORUM_LIB . 'rss-template.xml'));
     $rss->set(array('/rss/channel/title' => $xml->channel->title, '/rss/channel/link' => FORUM_URL . url('thread', PATH_URL, $FILE)))->remove(array('/rss/channel/category' => !$xml->channel->xpath('category[.="locked"]')));
     //template the new reply first
     $items = $rss->repeat('/rss/channel/item');
     $items->set(array('./title' => sprintf(THEME_RE, count($xml->channel->item), $xml->channel->title), './link' => $url, './author' => NAME, './pubDate' => gmdate('r'), './description' => formatText(TEXT, $xml)))->remove('./category')->next();
     //copy the remaining replies across
     foreach ($xml->channel->item as $item) {
         $items->set(array('./title' => $item->title, './link' => $item->link, './author' => $item->author, './pubDate' => $item->pubDate, './description' => $item->description))->remove(array('./category' => !$item->xpath('./category')))->next();
     }
     //write the file: first move the write-head to 0, remove the file's contents, and then write new one
     rewind($f);
     ftruncate($f, 0);
     fwrite($f, $rss->html());
 } else {
     //if a double-post, link back to the previous post
     $url = $xml->channel->item[0]->link;
 }
 //close the lock / file
 flock($f, LOCK_UN);
 fclose($f);
开发者ID:nowaym,项目名称:NoNonsenseForum,代码行数:31,代码来源:thread.php


示例14: set_time_limit

<?php

set_time_limit(0);
error_reporting(E_ALL);
define('NO_SESSION', true);
require_once '../../global.php';
// French
$data_fr = loadDescription('D:/Games/data/french/idnum2itemdesctable.txt');
// English (not yet done by fRO? Oo)
//$data_en = loadDescription('D:/Games/data/english/idnum2itemdesctable.txt');
// Import French
foreach ($data_fr as $ID => $lines) {
    echo '[FR] update #' . $ID . '<br />';
    $text = formatText($lines);
    Framework::getDb()->query("UPDATE item_db SET description_fr = '" . esc($text) . "' WHERE id = '" . esc($ID) . "'");
}
// Import english
/*
foreach ($data_en as $ID => $lines) {
	echo '[EN] update #' . $ID . '<br />';
	$text = implode("\n", $lines);
	Framework::getDb()->query("UPDATE item_db SET description_en = '" . esc($text) . "' WHERE id = '" . esc($ID) . "'");
}
*/
exit('done');
function loadDescription($filepath)
{
    $data = array();
    $lines = file($filepath);
    $currentID = null;
    foreach ($lines as $line) {
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:31,代码来源:import_desc.php


示例15: foreach

        $entries[] = $jouData;
    }
    $togo = 8;
    foreach ($entries as $entry) {
        iefixStart();
        ?>
				<div class="f_left mar_bottom">
					<a href="<?php 
        echo url("announcement/" . $cluid . "/" . $entry["jouid"]);
        ?>
">
					<?php 
        echo getIMG(url() . "images/emoticons/journal.png");
        ?>
					<?php 
        echo formatText($entry["jouTitle"]);
        ?>
					</a>
				</div>
				<div class="f_right mar_bottom">
					<?php 
        echo gmdate($_auth["useDateFormat"], applyTimezone(strtotime($entry["jouSubmitDate"])));
        ?>
				</div>
				<div class="clear">&nbsp;</div>
				<?php 
        iefixEnd();
        $togo--;
        if ($togo == 0) {
            break;
        }
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_club.php


示例16: builtMessage

function builtMessage($allData, $sent = false)
{
    $output = '';
    foreach ($allData as $message) {
        $name = $message->sender_screen_name;
        $imgurl = $message->sender->profile_image_url;
        $date = formatDate($message->created_at);
        $text = formatText($message->text);
        $output .= '<li><span class="st_author">';
        $output .= '<a href="javascript:void(0)"><img src="' . $imgurl . '" title="' . $name . '" /></a></span>';
        $output .= '<span class="st_body"><span class="status_id">' . $message->id . '</span>';
        $output .= '<span class="status_word"><a class="user_name" href="javascript:void(0)">' . $name . '</a>' . $text . '</span><span class="status_info">';
        if (!$sent) {
            $output .= '<a class="msg_replie_btn" href="javascript:void(0)">回复</a>';
        } else {
            $output .= '<a class="delete_btn" href="javascript:void(0)">删除</a>';
        }
        $output .= '<span class="date">' . $date . '</span></span></span></li>';
    }
    return $output;
}
开发者ID:BGCX261,项目名称:zlbnc-svn-to-git,代码行数:21,代码来源:output.php


示例17: header

    header('location: error.php');
}
$empty = count($messages) == 0 ? true : false;
$error = $messages->errors;
if ($error) {
    echo "<div id=\"error\">应用权限不够,请访问<a href=\"https://dev.twitter.com/apps\">https://dev.twitter.com/apps</a>,将应用的权限设置为\"Read, Write and Direct Messages\"。</div>";
} else {
    if ($empty) {
        echo "<div id=\"empty\">此页无消息</div>";
    } else {
        $output = '<ol class="timeline" id="allTimeline">';
        foreach ($messages as $message) {
            $name = $message->sender_screen_name;
            $imgurl = $message->sender->profile_image_url;
            $date = formatDate($message->created_at);
            $text = formatText($message->text);
            $output .= "\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<span class=\"status_author\">\n\t\t\t\t\t\t\t<a href=\"user.php?id={$name}\" target=\"_blank\"><img src=\"{$imgurl}\" title=\"{$name}\" /></a>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class=\"status_body\">\n\t\t\t\t\t\t\t<span class=\"status_id\">{$message->id} </span>\n\t\t\t\t\t\t\t<span class=\"status_word\"><a class=\"user_name\" href=\"user.php?id={$name}\">{$name} </a> {$text} </span>\n\t\t\t\t\t\t\t<span class=\"status_info\">\n\t\t\t\t";
            if (!$isSentPage) {
                $output .= "<a class=\"msg_replie_btn\" href=\"message.php?id={$name}\">回复</a>";
            } else {
                $output .= "<a class=\"delete_btn\" href=\"a_del.php?id={$message->id}&t=m\">删除</a>";
            }
            $output .= "\t\t<span class=\"date\">{$date}</span>\n\t\t\t\t\t\t    </span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t";
        }
        $output .= "</ol><div id=\"pagination\">";
        if ($isSentPage) {
            if ($p > 1) {
                $output .= "<a href=\"message.php?t=sent&p=" . ($p - 1) . "\">上一页</a>";
            }
            if (!$empty) {
                $output .= "<a href=\"message.php?t=sent&p=" . ($p + 1) . "\">下一页</a>";
开发者ID:hackerzhou,项目名称:MyTwitese,代码行数:31,代码来源:message.php


示例18: htmlentities

                <nobr><b onClick="folder('browse-<?php 
        echo $project["id"];
        ?>
')"><?php 
        echo htmlentities($project['name']);
        ?>
</b> <a href="<?php 
        echo projurl($project["id"]);
        ?>
">[go]</a></nobr>
                <div id="browse-<?php 
        echo $project["id"];
        ?>
-div" class=folded>
                    <?php 
        echo formatText(ereg_replace("\n.*", "", $project["reqmts"]));
        ?>
                    <p>
                    <b>Bounty:</b> <nobr><?php 
        echo htmlentities(format_money($project["bounty"]));
        ?>
</nobr>
                    <?php 
        if (ereg("[1-9]", $project["bounty"]) && !ereg("^[0-9]*{$GLOBALS['pref_currency']}\$", $project["bounty"])) {
            ?>
<nobr>(Approx. <?php 
            echo htmlentities(convert_money($project["bounty"]));
            ?>
)</nobr><?php 
        }
        ?>
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:browse.php


示例19: formatText

								<td class="a_right"><b><?php 
        echo _ABUSE_RULE;
        ?>
</b>:</td>
								<td><?php 
        echo formatText($abuData["abuRule"]);
        ?>
</td>
							</tr>
							<tr class="v_top">
								<td class="a_right"><b><?php 
        echo _ABUSE_REASON;
        ?>
</b>:</td>
								<td><?php 
        echo formatText($abuData["abuReason"]);
        ?>
</td>
							</tr>
							<?php 
    }
    ?>
					</table>
					<div class="a_right">
						<a href="<?php 
    echo url("abuse/" . $abuData["abuid"]);
    ?>
">
							<?php 
    echo _ABUSE_STATUS;
    ?>
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_abusecases.php


示例20: mysql_free_result

    $ignoreList .= "[u=" . $twtData["useUsername"] . "] ";
    $first = false;
}
mysql_free_result($twtResult);
if ($ignoreList != "") {
    echo $ignoreEdit;
}
?>
			</td>
			<td width="100%">
				<div id="ignore_current">
					<?php 
if ($ignoreList != "") {
    ?>
						<div class="container2"><?php 
    echo formatText($ignoreList);
    ?>
</div>
						<?php 
} else {
    echo $ignoreEdit;
}
?>
					<div class="sep">
						<?php 
echo _SET_TWIT_EXPLAIN;
?>
					</div>
				</div>
				<div id="ignore_change" style="display: none">
					<div>
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:p_interaction.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP formatTime函数代码示例发布时间:2022-05-15
下一篇:
PHP formatString函数代码示例发布时间: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