本文整理汇总了PHP中freshports_MainContentTable函数的典型用法代码示例。如果您正苦于以下问题:PHP freshports_MainContentTable函数的具体用法?PHP freshports_MainContentTable怎么用?PHP freshports_MainContentTable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了freshports_MainContentTable函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: toHTML
function toHTML()
{
$HTML = '';
if ($this->_ShowLogo) {
$HTML .= freshports_Logo();
}
if ($this->_ShowAnnouncements) {
$Announcement = new Announcement($this->{$_db});
$NumRows = $Announcement->FetchAllActive();
if ($NumRows > 0) {
$HTML .= DisplayAnnouncements($Announcement);
}
}
$HTML .= freshports_MainTable() . "\n<tr><td width='100%' valign='top'>\n" . freshports_MainContentTable() . "\n<tr>\n" . freshports_PageBannerText($this->_title);
$this->prependBodyContent($HTML);
$this->addBodyContent("\n</table><td valign=\"top\">" . freshports_SideBar() . "</td></tr></table>\n" . freshports_ShowFooter());
return parent::toHTML();
}
开发者ID:brycied00d,项目名称:freshports,代码行数:18,代码来源:freshports_page.php
示例2: freshports_Start
#
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/common.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/freshports.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/databaselogin.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/getvalues.php';
freshports_Start('New User', 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
$origin = $_GET["origin"];
?>
<?php
echo freshports_MainTable();
?>
<tr><td valign="top" width="100%">
<?php
echo freshports_MainContentTable();
?>
<TR>
<?php
echo freshports_PageBannerText("Account created");
?>
</TR>
<TR>
<TD>
<P>
Your account has been created.
</P>
<P>
You should soon receive an email at the mail address you supplied.
It will contain instructions to enable your account.
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:welcome.php
示例3: freshports_ConditionalGet
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/databaselogin.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/getvalues.php';
freshports_ConditionalGet(freshports_LastModified());
freshports_Start('FAQ', 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
$ServerName = str_replace('freshports', 'FreshPorts', $_SERVER['SERVER_NAME']);
global $FreshPortsName;
global $FreshPortsSlogan;
?>
<?php
echo freshports_MainTable();
?>
<tr><td valign="top" width="100%">
<?php
echo freshports_MainContentTable(NOBORDER);
?>
<tr>
<?php
echo freshports_PageBannerText("FAQ");
?>
</tr>
<TR><TD>
<CENTER>
<?php
if ($ShowAds) {
echo Ad_728x90();
}
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:faq.php
示例4: freshports_PortDisplay
//.........这里部分代码省略.........
if ($ElementID == 0) {
syslog(LOG_ERR, "Extract of ElementID from cache failed. Is cache corrupt/deprecated? port was {$category}/{$port}");
die('sorry, I encountered a problem with the cache. Please send the URL and this message to the webmaster.');
}
if ($User->id) {
$OnWatchList = freshports_OnWatchList($db, $User->id, $ElementID);
} else {
$OnWatchList = 0;
}
$HTML = substr($HTML, $EndOfFirstLine + 1);
} else {
if ($Debug) {
echo "found NOTHING in cache for '{$category}/{$port}'<br>\n";
}
$HTML = '';
$port_id = freshports_GetPortID($db, $category, $port);
if (!isset($port_id)) {
if ($Debug) {
echo "{$category}/{$port} is not a port according to freshports_GetPortID<br>\n";
}
return -1;
}
if ($Debug) {
echo "{$category}/{$port} found by freshports_GetPortID<br>";
}
$MyPort = new Port($db);
$MyPort->FetchByID($port_id, $User->id);
$port_display->port = $MyPort;
$HTML .= $port_display->Display();
$HTML .= "</TD></TR>\n</TABLE>\n\n";
$HTML .= DisplayPortCommits($MyPort, $PageNumber);
# If we are not reading
if (!$BypassCache || $RefreshCache) {
$Cache->CacheDataSet($MyPort->{'element_id'} . "\n" . $HTML);
$Cache->AddPort($MyPort->category, $MyPort->port, CACHE_PORT_DETAIL, $PageNumber);
}
$ElementID = $MyPort->{'element_id'};
$OnWatchList = $MyPort->{'onwatchlist'};
}
# At this point, we have the port detail HTML
$HTML = $port_display->ReplaceWatchListToken($OnWatchList, $HTML, $ElementID);
global $ShowAds, $BannerAd;
global $ShowAds;
global $BannerAd;
if ($ShowAds && $BannerAd) {
$HTML_For_Ad = "<hr><center>\n" . Ad_728x90PortDescription() . "\n</center>\n<hr>\n";
} else {
$HTML_For_Ad = '';
}
$HTML = $port_display->ReplaceAdvertismentToken($HTML, $HTML_For_Ad);
freshports_ConditionalGetUnix($Cache->LastModifiedGet());
header("HTTP/1.1 200 OK");
$Title = $category . "/" . $port;
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/getvalues.php';
freshports_Start($Title, "{$FreshPortsTitle} - new ports, applications", "FreeBSD, index, applications, ports");
?>
<?php
echo freshports_MainTable();
?>
<tr><TD VALIGN="top" width="100%">
<?php
echo freshports_MainContentTable();
?>
<TR>
<?php
echo freshports_PageBannerText("Port details");
?>
</TR>
<tr><td valign="top" width="100%">
<?php
echo $HTML;
?>
</TD>
<TD VALIGN="top" WIDTH="*" ALIGN="center">
<?php
echo freshports_SideBar();
?>
</td>
</TR>
</TABLE>
<?php
echo freshports_ShowFooter();
?>
</body>
</html>
<?php
return 0;
}
开发者ID:brycied00d,项目名称:freshports,代码行数:101,代码来源:missing-port.php
示例5: freshports_NonPortDescription
function freshports_NonPortDescription($db, $element_record)
{
global $TableWidth;
global $FreshPortsTitle;
$Debug = 1;
freshports_ConditionalGet(freshports_LastModified());
header("HTTP/1.1 200 OK");
$Title = preg_replace('|^/?ports/|', '', $element_record->element_pathname);
$FileName = preg_replace('|^/?ports/|', '', $element_record->element_pathname);
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/getvalues.php';
freshports_Start($Title, "{$FreshPortsTitle} - new ports, applications", "FreeBSD, index, applications, ports");
?>
<?php
echo freshports_MainTable();
?>
<tr><td valign="top" width="100%">
<?php
echo freshports_MainContentTable();
?>
<TR>
<?php
echo freshports_PageBannerText('non port: ' . $Title);
?>
</TR>
<tr><td>
<a HREF="<?php
echo FRESHPORTS_FREEBSD_SVN_URL . $element_record->element_pathname;
?>
?view=log">SVNWeb</a>
</td></tr>
<?php
global $User;
# these two options must be the last on the line. And as such are mutually exclusive
define('BYPASSCACHE', 'bypasscache=1');
# do not read the cache for display
define('REFRESHCACHE', 'refreshcache=1');
# refresh the cache
$BypassCache = substr($_SERVER["REQUEST_URI"], strlen($_SERVER["REQUEST_URI"]) - strlen(BYPASSCACHE)) == BYPASSCACHE;
$RefreshCache = substr($_SERVER["REQUEST_URI"], strlen($_SERVER["REQUEST_URI"]) - strlen(REFRESHCACHE)) == REFRESHCACHE;
$PageNumber = 1;
if (isset($_SERVER['REDIRECT_QUERY_STRING'])) {
parse_str($_SERVER['REDIRECT_QUERY_STRING'], $query_parts);
if (isset($query_parts['page']) && Is_Numeric($query_parts['page'])) {
$PageNumber = intval($query_parts['page']);
if ($PageNumber != $query_parts['page'] || $PageNumber < 1) {
$PageNumber = 1;
}
}
}
$NumCommitsPerPage = $User->page_size;
$Cache = new CacheFile();
$Cache->PageSize = $User->page_size;
$result = $Cache->Retrieve($FileName, $PageNumber);
if (!$result && !$BypassCache && !$RefreshCache) {
if ($Debug) {
echo "found something from the cache<br>\n";
}
$HTML = $Cache->CacheDataGet();
#
# we need to know the element_id of this port
# and the whether or not it is on the person's watch list
# let's create a special function for that!
#
$EndOfFirstLine = strpos($HTML, "\n");
if ($EndOfFirstLine == false) {
die('Internal error: I was expecting an ElementID and found nothing');
}
# extract the ElementID from the cache
$ElementID = intval(substr($HTML, 0, $EndOfFirstLine));
if ($ElementID == 0) {
syslog(LOG_ERR, "Extract of ElementID from cache failed. Is cache corrupt/deprecated? port was {$category}/{$port}");
die('sorry, I encountered a problem with the cache. Please send the URL and this message to the webmaster.');
}
if ($User->id) {
$OnWatchList = freshports_OnWatchList($db, $User->id, $ElementID);
} else {
$OnWatchList = 0;
}
$HTML = substr($HTML, $EndOfFirstLine + 1);
} else {
if ($Debug) {
echo "found NOTHING in cache<br>\n";
}
$HTML = '';
$Commits = new CommitsByTreeLocation($db);
$Commits->SetLimit($Cache->PageSize);
$Commits->Debug = $Debug;
$Commits->UserIDSet($User->id);
$Commits->TreePathConditionSet("= '" . $element_record->element_pathname . "'");
#
# get the count without excuting the whole query
# we don't want to pull back all the data.
#
$NumCommits = $Commits->GetCountCommits();
$params = array('mode' => 'Sliding', 'perPage' => $NumCommitsPerPage, 'delta' => 5, 'totalItems' => $NumCommits, 'urlVar' => 'page', 'currentPage' => $PageNumber, 'spacesBeforeSeparator' => 1, 'spacesAfterSeparator' => 1, 'append' => false, 'path' => '/' . preg_replace('|^/?ports/|', '', $element_record->element_pathname), 'fileName' => '?page=%d', 'altFirst' => 'First Page', 'firstPageText' => 'First Page', 'altLast' => 'Last Page', 'lastPageText' => 'Last Page');
$Pager =& Pager::factory($params);
//.........这里部分代码省略.........
开发者ID:brycied00d,项目名称:freshports,代码行数:101,代码来源:missing-non-port.php
示例6: freshports_CategoryDisplay
function freshports_CategoryDisplay($db, $category, $PageNo = 1, $PageSize = DEFAULT_PAGE_SIZE)
{
global $TableWidth;
global $User;
header('HTTP/1.1 200 OK');
$Debug = 0;
if (isset($_SERVER['REDIRECT_QUERY_STRING'])) {
if (isset($_SERVER["REDIRECT_QUERY_STRING"])) {
parse_str($_SERVER['REDIRECT_QUERY_STRING'], $query_parts);
if (isset($query_parts['page'])) {
$PageNo = $query_parts['page'];
}
if (isset($query_parts['page_size'])) {
$PageSize = $query_parts['page_size'];
}
}
}
if (!isset($page) || $page == '') {
$page = 1;
}
if (!isset($page_size) || $page_size == '') {
$page_size = $User->page_size;
}
if ($Debug) {
echo "\$page = '{$page}'<br>\n";
echo "\$page_size = '{$page_size}'<br>\n";
}
SetType($PageNo, "integer");
SetType($PageSize, "integer");
if (!isset($PageNo) || !str_is_int("{$PageNo}") || $PageNo < 1) {
$PageNo = 1;
}
if (!isset($PageSize) || !str_is_int("{$PageSize}") || $PageSize < 1 || $PageSize > MAX_PAGE_SIZE) {
$PageSize = DEFAULT_PAGE_SIZE;
}
if ($Debug) {
echo "\$PageNo = '{$PageNo}'<br>\n";
echo "\$PageSize = '{$PageSize}'<br>\n";
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/categories.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/watch_lists.php';
if ($category->IsPrimary()) {
$WatchLists = new WatchLists($db);
$WatchListCount = $WatchLists->IsOnWatchList($User->id, $category->element_id);
}
$title = $category->{'name'};
# find out how many ports are in this category
$PortCount = $category->PortCount($category->name);
global $User;
if ($Debug) {
echo "\$User->id='{$User->id}'";
}
freshports_Start($title, 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
$port = new Port($db);
$numrows = $port->FetchByCategoryInitialise($category->name, $User->id, $PageSize, $PageNo);
?>
<?php
echo freshports_MainTable();
?>
<tr><td valign="top" width="100%">
<?php
echo freshports_MainContentTable();
?>
<tr>
<?php
echo freshports_PageBannerText('Category listing - ' . $category->{'name'});
?>
</tr>
<tr><td>
<?php
if ($category->IsPrimary()) {
if ($WatchListCount) {
echo freshports_Watch_Link_Remove('', 0, $category->{'element_id'});
} else {
echo freshports_Watch_Link_Add('', 0, $category->{'element_id'});
}
}
?>
<BIG><BIG><B><?php
echo $category->{'description'};
?>
</B></BIG></BIG>- Number of ports in this category: <?php
echo $PortCount;
?>
<p>
Ports marked with a <sup>*</sup> actually reside within another category but
have <b><?php
echo $category->{'name'};
?>
</b> listed as a secondary category.
<?php
global $ShowAds, $BannerAd;
if ($ShowAds && $BannerAd) {
//.........这里部分代码省略.........
开发者ID:brycied00d,项目名称:freshports,代码行数:101,代码来源:missing-category.php
示例7: freshports_MainTable
$CategoriesWatched[$CategoryListing->category_id] = $CategoryListing->category_id;
}
}
?>
<?php
echo freshports_MainTable();
?>
<tr><td colspan="<?php
echo $ColSpan;
?>
" valign="top" width="100%">
<?php
echo freshports_MainContentTable(BORDER, 6);
?>
<tr>
<?php
echo freshports_PageBannerText("{$FreshPortsTitle} - list of categories", $ColSpan);
?>
</tr>
<tr><td COLSPAN="<?php
echo $ColSpan;
?>
" valign="top">
<P>
This page lists the categories and can be sorted by various criteria. Virtual
categories are indicated by <?php
echo VIRTUAL;
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:categories.php
注:本文中的freshports_MainContentTable函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论