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


PHP html_format函数代码示例

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


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

示例1: pcmain_hot_topics

function pcmain_hot_topics($link, $period, $color)
{
    $topics = getHotTopicsByPeriod($link, $period, 50);
    for ($i = 0; $i < count($topics); $i++) {
        echo "<font color=\"" . $color . "\">" . ($i + 1) . "</font>&nbsp;<a href=\"/pc/pcdoc.php?userid=" . $topics[$i]["username"] . "&tid=" . $topics[$i][1] . "&tag=0\" title=\"" . htmlspecialchars($topics[$i]["topicname"]) . "\">" . html_format(html_format_fix_length($topics[$i]["topicname"], 32)) . "</a>" . "\n<a href=\"/pc/index.php?id=" . $topics[$i]["username"] . "\"><font class=low2>" . $topics[$i]["username"] . "</font></a><br />";
    }
}
开发者ID:bianle,项目名称:www2,代码行数:7,代码来源:pclist.php

示例2: display_recommend_topic

function display_recommend_topic($link, $topic)
{
    global $pcconfig, $users, $colors;
    $nodes = array();
    if (!getRecommendNodesByTopic($link, $topic, $nodes)) {
        return;
    }
    ?>
<tbody>
	<tr>
	    <td bgcolor="#999999" height="3"> </td>
	</tr>
	<tr>
	    <td>
	        <table class="table2" width="100%" cellspacing="0" cellpadding="3" >
				<tr>
					<td class="td3" bgcolor="<?php 
    echo $colors[rand(0, sizeof($colors) - 1)];
    ?>
" align="left"><b><a href="pcsec.php?sec=<?php 
    echo $topic;
    ?>
"><font color="white"><?php 
    echo $pcconfig["SECTION"][$topic];
    ?>
</font></a></b></td>			
				</tr>
				<tr>
					<td align="left" class="td3">
					<table width="100%">
<?php 
    foreach ($nodes as $node) {
        if (!$users[$node[uid]]) {
            $users[$node[uid]] = pc_load_infor($link, '', $node[uid]);
        }
        echo '<tr><td align="left">[<a href="index.php?id=' . $users[$node['uid']]['USER'] . '"><font class="low2">' . $users[$node[uid]]['NAME'] . '</font></a>]&nbsp;' . '<a href="pccon.php?id=' . $node[uid] . '&nid=' . $node[nid] . '&s=all">' . html_format($node[subject]) . '</a>&nbsp;(<a href="/bbsqry.php?userid=' . $users[$node[uid]]['USER'] . '">' . $users[$node[uid]]['USER'] . '</a>)</td>' . '<td align="right"><a href="/bbsqry.php?userid=' . $node[recuser] . '"><font class="low">' . $node[recuser] . '</a> 推荐</font></td></tr>';
    }
    ?>
					
					</table>
					<table width="100%"><tr><td align="right"><a href="pcreclist.php?topic=<?php 
    echo $topic;
    ?>
">更多推荐文章</a></td></tr></table>
					</td>			
				</tr>
			</table>
			    	</td>
	</tr>
</tbody>	
<?php 
}
开发者ID:bianle,项目名称:www2,代码行数:52,代码来源:pcreco.php

示例3: display_section_list

function display_section_list()
{
    global $pcconfig;
    ?>
<center>
<table cellspacing=0 cellpadding=5 border=0 class=t1>
<tr>
	<td class=t2>分类名</td>
	<td class=t2>分类主题</td>
</tr>
<?php 
    $keys = array_keys($pcconfig["SECTION"]);
    for ($i = 0; $i < count($keys); $i++) {
        echo "<tr><td class=t4><a href=\"" . $_SERVER["PHP_SELF"] . "?sec=" . $keys[$i] . "\">" . html_format($pcconfig["SECTION"][$keys[$i]]) . "</a></td>" . "<td class=t8>" . $keys[$i] . "</td></tr>";
    }
    ?>
</table></center>
<?php 
}
开发者ID:bianle,项目名称:www2,代码行数:19,代码来源:pcsec.php

示例4: pc_save_posts

function pc_save_posts($subject, $body, $htmltag)
{
    ?>
<center>
<table cellspacing="0" cellpadding="5" border="0" class="t1" width="90%">
<tr><td class="t2">请重新登录后再发表</td></tr>
<tr><td class="t3">主题</td></tr>
<tr><td class="t5"><?php 
    echo html_format($subject);
    ?>
</td></tr>
<tr><td class="t3">内容</td></tr>
<tr><td class="t5"><?php 
    echo html_format($body, 1, $htmltag);
    ?>
</td></tr>
</table>
</center>	    
<?php 
}
开发者ID:bianle,项目名称:www2,代码行数:20,代码来源:pcmanage.php

示例5: getRecommendBlogs

function getRecommendBlogs($link, $pno = 1, $etemnum = 0)
{
    global $pcconfig;
    if ($pno < 1) {
        $pno = 1;
    }
    $etemnum = intval($etemnum);
    if ($etemnum <= 0) {
        $etemnum = $pcconfig["NEWS"];
    }
    $start = ($pno - 1) * $etemnum;
    $query = "SELECT recommend.uid  , subject , body , htmltag , emote , hostname , created , recuser , nid , username , corpusname , description  " . "FROM recommend , users " . "WHERE recommend.uid = users.uid " . "ORDER BY state DESC , rid DESC " . "LIMIT " . $start . " , " . $etemnum . " ;";
    $result = mysql_query($query, $link);
    $num_rows = mysql_num_rows($result);
    $recommendBlogs = array();
    $recommendBlogs["channel"] = array("siteaddr" => "http://" . $pcconfig["SITE"], "title" => $pcconfig["BBSNAME"] . "推荐Blog日志", "pcaddr" => "http://" . $pcconfig["SITE"], "desc" => $pcconfig["BBSNAME"] . "最新" . $etemnum . "个推荐日志", "email" => $pcconfig["BBSNAME"], "publisher" => $pcconfig["BBSNAME"], "creator" => $pcconfig["BBSNAME"], "rights" => $pcconfig["BBSNAME"], "date" => date("Y-m-d"), "updatePeriod" => "10分钟更新一次", "updateFrequency" => "最新的" . $etemnum . "个推荐日志", "updateBase" => date("Y-m-d H:i:s"));
    for ($i = 0; $i < $num_rows; $i++) {
        $rows = mysql_fetch_array($result);
        $body = "<br>\n" . "来自: " . $rows["corpusname"] . "<br>\n" . "作者: " . $rows["username"] . "<br>\n" . "发信站: " . $pcconfig["BBSNAME"] . "<br>\n" . "时间: " . time_format($rows["created"]) . "<br>\n" . "<hr size=1>\n" . html_format($rows["body"], TRUE, $rows["htmltag"]) . "<hr size=1>\n" . "(<a href=\"http://" . $pcconfig["SITE"] . "/pc/pccon.php?id=" . $rows[0] . "&nid=" . $rows["nid"] . "&s=all\">浏览全文</a>\n" . "<a href=\"http://" . $pcconfig["SITE"] . "/pc/pccom.php?act=pst&nid=" . $rows["nid"] . "\">发表评论</a>)<br>\n" . "<a href=\"http://" . $pcconfig["SITE"] . "/pc/rss.php?userid=" . $rows["username"] . "\"><img src=\"http://" . $pcconfig["SITE"] . "/pc/images/xml.gif\" border=\"0\" align=\"absmiddle\" alt=\"XML\">Blog地址:http://" . $pcconfig["SITE"] . "/pc/rss.php?userid=" . $rows["user"] . "</a>";
        $recommendBlogs["useretems"][$i] = array("addr" => "http://" . $pcconfig["SITE"] . "/pc/pccon.php?id=" . $rows[0] . "&amp;nid=" . $rows[nid], "subject" => htmlspecialchars($rows["subject"]), "desc" => $body, "tid" => 0, "nid" => $rows["nid"], "publisher" => $pcconfig["BBSNAME"], "creator" => $rows["username"], "pc" => $rows[0], "created" => time_format($rows["created"]), "rights" => $rows["username"] . ".bbs@" . $pcconfig["SITE"]);
    }
    mysql_free_result($result);
    return $recommendBlogs;
}
开发者ID:bianle,项目名称:www2,代码行数:24,代码来源:pcstat.php

示例6: substr

 if (isset($GLOBALS[org_code]) && $GLOBALS[org_code] > 0) {
     echo "<td class=sml nowrap>{$timesheet->abbreviation}</td>\n";
 }
 echo "<td class=sml align=center nowrap><a href=\"{$base_url}/wr.php?request_id={$timesheet->request_id}\">{$timesheet->request_id}</a></td>\n";
 echo "<td class=sml>" . substr(nice_date($timesheet->work_on), 7) . "</td>\n";
 echo "<td class=sml>{$timesheet->work_quantity} {$timesheet->work_units}</td>\n";
 echo "<td class=sml align=right>{$timesheet->work_rate}&nbsp;</td>\n";
 echo "<td class=sml>{$timesheet->worker_name}</td>\n";
 if ("{$timesheet->work_charged}" == "") {
     if ("{$uncharged}" == "") {
         echo "<td class=sml>uncharged</td>";
     }
 } else {
     echo "<td class=sml>" . substr(nice_date($timesheet->work_charged), 7) . "</td>";
 }
 echo "<td class=sml>" . html_format($timesheet->work_description) . "</td>";
 if ("{$uncharged}" != "") {
     echo "<td class=\"sml\"><a href=\"{$base_url}/wr.php?request_id={$timesheet->request_id}\">{$timesheet->brief}</a></td>\n";
     printf("<td class=\"sml\">%s</td>\n", $timesheet->review_needed == 't' ? '<span style="color:red;">Review</span>' : '&nbsp;');
     echo "<td class=sml align=right>";
     printf("<input type=\"checkbox\" value=\"1\" id=\"{$timesheet->timesheet_id}\" name=\"chg_ok[{$timesheet->timesheet_id}]\"%s>", "{$timesheet->ok_to_charge}" == "t" ? " checked" : "");
     printf("<input type=hidden name=\"chg_worker[{$timesheet->timesheet_id}]\" value=\"%s\">", htmlspecialchars($timesheet->worker_name));
     printf("<input type=hidden name=\"chg_desc[{$timesheet->timesheet_id}]\" value=\"%s\">", htmlspecialchars($timesheet->work_description));
     printf("<input type=hidden name=\"chg_request[{$timesheet->timesheet_id}]\" value=\"%s\">", htmlspecialchars($timesheet->request_id));
     printf("<input type=hidden name=\"chg_requester[{$timesheet->timesheet_id}]\" value=\"%s\">", htmlspecialchars($timesheet->requester_name));
     echo "</td>\n";
     echo "<td class=sml><font size=2><input type=text size=6 name=\"chg_inv[{$timesheet->timesheet_id}]\" value=\"\"></font>&nbsp;</td>\n";
     echo "<td class=sml><font size=2><input type=text size=8 name=\"chg_amt[{$timesheet->timesheet_id}]\" value=\"\"></font>&nbsp;</td>\n";
     echo "<td class=sml><font size=2><input type=text size=10 name=\"chg_on[{$timesheet->timesheet_id}]\" value=\"" . date("d/m/Y") . "\"></font>&nbsp;</td>\n";
 }
 echo "</tr>\n";
开发者ID:Br3nda,项目名称:wrms,代码行数:31,代码来源:timelist-form.php

示例7: to_char

         echo "</tr>\n";
     }
 }
 if ($show_notes) {
     $subquery = "SELECT *, to_char( note_on, 'DD/MM/YYYY') AS nice_date ";
     $subquery .= "FROM request_note, usr ";
     $subquery .= "WHERE request_id = {$thisrequest->request_id} ";
     $subquery .= "AND usr.user_no = request_note.note_by_id ";
     $subquery .= "ORDER BY request_id, note_on ";
     $subres = awm_pgexec($dbconn, $subquery, "requestlist");
     for ($j = 0; $subres && $j < pg_NumRows($subres); $j++) {
         $thisnote = pg_Fetch_Object($subres, $j);
         printf("<tr class=\"row%1d\" valign=\"top\">\n", $i % 2);
         echo "<td>{$thisnote->nice_date}</td>\n";
         echo "<td>{$thisnote->fullname}</td>\n";
         echo "<td colspan=\"5\">" . html_format($thisnote->note_detail) . "</td>\n";
         echo "</tr>\n";
     }
 }
 if ($show_work) {
     $subquery = "SELECT *, to_char( work_on, 'DD/MM/YYYY') AS nice_date ";
     $subquery .= "FROM request_timesheet, usr ";
     $subquery .= "WHERE request_id = {$thisrequest->request_id} ";
     $subquery .= "AND usr.user_no = request_timesheet.work_by_id ";
     $subquery .= "ORDER BY request_id, work_on ";
     $total = 0.0;
     $qty_total = 0.0;
     $subres = awm_pgexec($dbconn, $subquery, "requestlist");
     for ($j = 0; $subres && $j < pg_NumRows($subres); $j++) {
         $thiswork = pg_Fetch_Object($subres, $j);
         printf("<tr class=row%1d valign=top>\n", $i % 2);
开发者ID:Br3nda,项目名称:wrms,代码行数:31,代码来源:requestlist.php

示例8: UNIX_TIMESTAMP

 if ($categories == false) {
     $result = @mysql_query("SELECT id, pid, " . $db_settings['forum_table'] . ".user_id, UNIX_TIMESTAMP(time + INTERVAL " . $time_difference . " MINUTE) AS timestamp, name, user_name, subject, text \r\n                            FROM " . $db_settings['forum_table'] . " \r\n                            LEFT JOIN " . $db_settings['userdata_table'] . " ON " . $db_settings['userdata_table'] . ".user_id=" . $db_settings['forum_table'] . ".user_id\r\n                            WHERE spam=0" . $query_addition . " \r\n                            ORDER BY time DESC LIMIT " . $settings['rss_feed_max_items'], $connid) or raise_error('database_error', mysql_error());
     if (!$result) {
         raise_error('database_error', mysql_error());
     }
 } else {
     $result = @mysql_query("SELECT id, pid, " . $db_settings['forum_table'] . ".user_id, UNIX_TIMESTAMP(time + INTERVAL " . $time_difference . " MINUTE) AS timestamp, name, user_name, category, subject, text \r\n    FROM " . $db_settings['forum_table'] . " \r\n    LEFT JOIN " . $db_settings['userdata_table'] . " ON " . $db_settings['userdata_table'] . ".user_id=" . $db_settings['forum_table'] . ".user_id\r\n    WHERE category IN (" . $category_ids_query . ") AND spam=0" . $query_addition . " \r\n    ORDER BY time DESC LIMIT " . $settings['rss_feed_max_items'], $connid) or raise_error('database_error', mysql_error());
 }
 $result_count = mysql_num_rows($result);
 if ($result_count > 0) {
     $i = 0;
     while ($row = mysql_fetch_array($result)) {
         if ($row['pid'] != 0) {
             $rss_items[$i]['reply'] = true;
         }
         $text = html_format(stripslashes($row['text']));
         $rss_items[$i]['text'] = $text;
         $rss_items[$i]['title'] = htmlspecialchars(stripslashes($row['subject']));
         if ($categories != false && isset($categories[$row['category']]) && $categories[$row['category']] != '') {
             $rss_items[$i]['category'] = $categories[$row['category']];
         }
         if ($row['user_id'] > 0) {
             if (!$row['user_name']) {
                 $rss_items[$i]['name'] = $lang['unknown_user'];
             } else {
                 $rss_items[$i]['name'] = htmlspecialchars(stripslashes($row['user_name']));
             }
         } else {
             $rss_items[$i]['name'] = htmlspecialchars(stripslashes($row['name']));
         }
         $rss_items[$i]['link'] = $settings['forum_address'] . "index.php?id=" . $row['id'];
开发者ID:aunderwo,项目名称:sobc,代码行数:31,代码来源:rss.inc.php

示例9: time_format

    ?>
&amp;nid=<?php 
    echo $nodes[$i][nid];
    ?>
&amp;s=all</link>
	<dc:creator><?php 
    echo $pc["USER"];
    ?>
</dc:creator>
	<dc:date><?php 
    echo time_format($nodes[$i][created]);
    ?>
</dc:date>
	<description><![CDATA[
		<?php 
    echo html_format($nodes[$i][body], TRUE, $nodes[$i][htmltag]);
    ?>
		]]></description>
	<smthBlog:node>
		<smthBlog:id><?php 
    echo $nodes[$i][nid];
    ?>
</smthBlog:id>
		<smthBlog:emote><?php 
    echo $nodes[$i][emote];
    ?>
</smthBlog:emote>
		<smthBlog:address><?php 
    echo pc_hide_ip($nodes[$i][hostname]);
    ?>
</smthBlog:address>
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:indexxml.php

示例10: foreach

<font color=red>新</font>表示是否进行新日志(含评论,RSS)统计<br /><br />
<table cellspacing="0" cellpadding="3" class="t1">
<tr>
<td class="t2">用户名</td>
<td class="t2">BLOG名</td>
<td class="t2">访问数</td>
<td class="t2">日志数</td>
<td class="t2">公</td>
<td class="t2">人</td>
<td class="t2">文</td>
<td class="t2">新</td>
<td class="t2">操作</td>
</tr>
<?php 
    foreach ($pcs as $pc) {
        echo "<tr><td class=t4><a href=\"/bbsqry.php?userid=" . $pc[username] . "\">" . $pc[username] . "</a></td>" . "<td class=t5><a href=\"index.php?id=" . $pc[username] . "\" title=\"" . html_format($pc[description]) . "\">" . html_format($pc[corpusname]) . "</a></td>" . "<td class=t4>" . $pc[visitcount] . "</td>" . "<td class=t3>" . $pc[nodescount] . "</td><td class=t4>";
        echo pc_is_groupwork(array("TYPE" => $pc[pctype])) ? "<font color=red><b>Y</b></font>" : "n";
        echo "</td><td class=t4>";
        echo $pc[pctype] < 2 ? "y" : "<font color=red><b>N</b></font>";
        echo "</td><td class=t4>";
        echo $pc[pctype] < 4 ? "y" : "<font color=red><b>N</b></font>";
        echo "</td><td class=t4>";
        echo $pc[pctype] < 6 ? "y" : "<font color=red><b>N</b></font>";
        echo "</td><td class=t3><a href=\"" . $_SERVER["PHP_SELF"] . "?userid=" . $pc[username] . "\">操作</a></td></tr>";
    }
    ?>
</table>
<br />
<form action="<?php 
    echo $_SERVER["PHP_SELF"];
    ?>
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:pcadmin_grp.php

示例11: display_blog_settings

function display_blog_settings($link, $pc, $tag)
{
    global $sec;
    $blog = pc_blog_menu($link, $pc);
    ?>
<table cellspacing="0" cellpadding="5" border="0" width="99%" class="t1">
<tr>
	<td class="t2" width="50">序号</td>
	<td class="t2">Blog</td>
	<td class="t2" width="200">分区</td>
	<td class="t2" width="50">修改</td>
	<td class="t2" width="50">删除</td>
</tr>
<?php 
    for ($i = 0; $i < count($blog); $i++) {
        echo "<tr>\n<td class='t3'>" . ($i + 1) . "</td>\n" . "<td class='t5'>&nbsp;<a href=\"pcdoc.php?userid=" . $pc["USER"] . "&tag=" . $blog[$i]["TAG"] . "&tid=" . $blog[$i]["TID"] . "\">《" . html_format($blog[$i]["NAME"]) . "》</a></td>\n" . "<td class='t3'><a href=\"pcdoc.php?userid=" . $pc["USER"] . "&tag=" . $blog[$i]["TAG"] . "\">" . $sec[$blog[$i]["TAG"]] . "</a></td>\n" . "<td class='t4'><a href=\"pcmanage.php?userid=" . $pc["USER"] . "&act=tedit&tid=" . $blog[$i]["TID"] . "\">修改</a></td>\n" . "<td class='t3'><a href=\"pcmanage.php?userid=" . $pc["USER"] . "&act=tdel&tid=" . $blog[$i]["TID"] . "\">" . "删除</a></td>\n" . "</tr>\n";
    }
    ?>
</table>
<form action="pcmanage.php?userid=<?php 
    echo $pc["USER"];
    ?>
&act=tadd" method="post" onsubmit="if(this.topicname.value==''){alert('请输入Blog名称!');return false;}">
<input type="hidden" name="tag" value="<?php 
    echo $tag;
    ?>
">
<p align="center" class="b2">
新建Blog:
分区
<select name="access" class="b2">
	<option value="0">公开区</option>
	<option value="1">好友区</option>
	<option value="2">私人区</option>
</select>
Blog名
<input type="text" name="topicname" maxlength="200" size="30" class="b2">
<input type="submit" value="新建Blog" class="b1">
</p>
</form>
<?php 
}
开发者ID:bianle,项目名称:www2,代码行数:42,代码来源:pcdoc.php

示例12: html_format

	<td class="t5"><?php 
    echo html_format($newApp[appself], TRUE);
    ?>
</td>
</tr>
<tr>
	<td class="t3">规划</td>
	<td class="t5"><?php 
    echo html_format($newApp[appdirect], TRUE);
    ?>
</td>
</tr>
<tr>
	<td class="t3" colspan="2">
	FROM: <?php 
    echo html_format($newApp[hostname]);
    ?>
 
	@ <?php 
    echo time_format($newApp[apptime]);
    ?>
	&nbsp;
<?php 
    if ($type == 1) {
        ?>
	
	[<a href="#" onclick="bbsconfirm('<?php 
        echo $_SERVER["PHP_SELF"] . "?pno=" . $pno . "&type=" . $type . "&act=y&userid=" . rawurlencode($newApp[username]) . "&pcname=" . rawurlencode($newApp[appname]);
        ?>
' , '通过<?php 
        echo $newApp[username];
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:pcadmin_app.php

示例13: html_error_quit

            break;
        case -21:
            html_error_quit("您的积分不符合当前讨论区的设定, 暂时无法在当前讨论区发表文章...");
            break;
    }
    ?>
<br /><br /><br />
<p align=center>转载成功!</p>
<p align=center>返回<a href="pccon.php?id=<?php 
    echo $node[uid];
    ?>
&nid=<?php 
    echo $node[nid];
    ?>
&s=all"><?php 
    echo html_format($node[subject]);
    ?>
</a></p>
<p align=center>进入<a href="/bbsdoc.php?board=<?php 
    echo $brdarr["NAME"];
    ?>
"><?php 
    echo $brdarr["DESC"];
    ?>
讨论区</a></p>
<p align=center><a href="javascript:history.go(-1)">快速返回</a></p>
<?php 
} else {
    ?>
<br /><br /><center>
<form action="pcfwd.php?nid=<?php 
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:pcfwd.php

示例14: mysql_fetch_array

<table cellpadding=5 cellspacing=0 class=t1 width=98% border=0>
	<tbody><tr>
		<td class=t2 width=20> </td>
		<td class=t2>文章主题</td>
		<td class=t2 width=160>Blog名称</td>
		<td class=t2 width=80>作者</td>
		<td class=t2 width=80>类别</td>
		<td class=t2 width=80>推荐人</td>
	</tr></tbody>
<?php 
for ($i = 0; $i < $num; $i++) {
    $rows = mysql_fetch_array($result);
    if (!$pcuser[$rows[uid]]) {
        $pcuser[$rows[uid]] = pc_load_infor($link, "", $rows[uid]);
    }
    echo "<tbody><tr>\n" . "<td class=t3>" . ($i + $start + 1) . "</td>" . "<td class=t5><a href=\"pccon.php?id=" . $rows[uid] . "&nid=" . $rows[nid] . "&s=all\">" . html_format($rows[subject]) . "</a></td>" . "<td class=t3><span title=\"" . $pcuser[$rows[uid]]["DESC"] . "\"><a href=\"index.php?id=" . $pcuser[$rows[uid]]["USER"] . "\">" . $pcuser[$rows[uid]]["NAME"] . "</a></span></td>" . "<td class=t4><a href=\"/bbsqry.php?userid=" . $pcuser[$rows[uid]]["USER"] . "\">" . $pcuser[$rows[uid]]["USER"] . "</a></td>" . "<td class=t3><span title=\"点击查看该分类的其它Blog信息\"><a href=\"pcreclist.php?topic=" . $rows[topic] . "\">" . html_format($pcconfig["SECTION"][$rows[topic]]) . "</a></span></td>" . "<td class=t4><a href=\"/bbsqry.php?userid=" . $rows[recuser] . "\">" . $rows[recuser] . "</a></td>" . "</tr></tbody>\n";
}
?>
</table>
<p align="center">
<?php 
if ($pno > 1) {
    echo "[<a href=\"pcreclist.php?pno=" . ($pno - 1) . "\">上一页</a>]\n";
}
if ($num == $pcconfig["LIST"]) {
    echo "[<a href=\"pcreclist.php?pno=" . ($pno + 1) . "\">下一页</a>]\n";
}
?>
</p>
<hr size=1>
<p align="center"><?php 
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:pcreclist.php

示例15: get_table_content_old

 /**
  * php < 4.0.5 only: get the content of $table as a series of INSERT
  * statements.
  * After every row, a custom callback function $handler gets called.
  *
  * Last revision 13 July 2001: Patch for limiting dump size from
  * vinay@sanisoft.com & girish@sanisoft.com
  *
  * @param   string   the current database name
  * @param   string   the current table name
  * @param   string   the 'limit' clause to use with the sql query
  * @param   string   the name of the handler (function) to use at the end
  *                   of every row. This handler must accept one parameter
  *                   ($sql_insert)
  *
  * @return  boolean  always true
  *
  * @global  boolean  whether to use backquotes to allow the use of special
  *                   characters in database, table and fields names or not
  *
  * @see     get_table_content()
  */
 function get_table_content_old($db, $table, $add_query = '', $handler)
 {
     global $use_backquotes;
     $local_query = 'SELECT * FROM ' . backquote($db) . '.' . backquote($table) . $add_query;
     $result = mysql_query($local_query) or mysql_die('', $local_query);
     $i = 0;
     $isFirstRow = TRUE;
     while ($row = mysql_fetch_row($result)) {
         @set_time_limit(60);
         // HaRa
         $table_list = '(';
         for ($j = 0; $j < mysql_num_fields($result); $j++) {
             $table_list .= backquote(mysql_field_name($result, $j), $use_backquotes) . ', ';
         }
         $table_list = substr($table_list, 0, -2);
         $table_list .= ')';
         if (isset($GLOBALS['extended_ins']) && !$isFirstRow) {
             $schema_insert = '(';
         } else {
             if (isset($GLOBALS['showcolumns'])) {
                 $schema_insert = 'INSERT INTO ' . backquote(html_format($table), $use_backquotes) . ' ' . html_format($table_list) . ' VALUES (';
             } else {
                 $schema_insert = 'INSERT INTO ' . backquote(html_format($table), $use_backquotes) . ' VALUES (';
             }
             $isFirstRow = FALSE;
         }
         for ($j = 0; $j < mysql_num_fields($result); $j++) {
             if (!isset($row[$j])) {
                 $schema_insert .= ' NULL,';
             } else {
                 if ($row[$j] != '') {
                     $dummy = '';
                     $srcstr = $row[$j];
                     for ($xx = 0; $xx < strlen($srcstr); $xx++) {
                         $yy = strlen($dummy);
                         if ($srcstr[$xx] == "\\") {
                             $dummy .= "\\\\";
                         }
                         if ($srcstr[$xx] == "'") {
                             $dummy .= "\\'";
                         }
                         if ($srcstr[$xx] == "\"") {
                             $dummy .= "\\\"";
                         }
                         if ($srcstr[$xx] == "") {
                             $dummy .= "\\0";
                         }
                         if ($srcstr[$xx] == "\n") {
                             $dummy .= "\\n";
                         }
                         if ($srcstr[$xx] == "\r") {
                             $dummy .= "\\r";
                         }
                         if ($srcstr[$xx] == "") {
                             $dummy .= "\\b";
                         }
                         if ($srcstr[$xx] == "\t") {
                             $dummy .= "\\t";
                         }
                         if ($srcstr[$xx] == "") {
                             $dummy .= "\\Z";
                         }
                         if (strlen($dummy) == $yy) {
                             $dummy .= $srcstr[$xx];
                         }
                     }
                     $schema_insert .= " '" . $dummy . "',";
                 } else {
                     $schema_insert .= " '',";
                 }
             }
             // end if
         }
         // end for
         $schema_insert = ereg_replace(',$', '', $schema_insert);
         $schema_insert .= ')';
         $handler(trim($schema_insert));
         ++$i;
//.........这里部分代码省略.........
开发者ID:CMMCO,项目名称:Intranet,代码行数:101,代码来源:lib.inc.php


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