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


PHP freshports_Start函数代码示例

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


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

示例1: pg_exec

    exit;
    /* Make sure that code below does not get executed when we redirect. */
} else {
    if ($User->id != '') {
        // read the users current watch information from the database
        $sql = "\n   select watch_list_element.element_id \n\t  from watch_list_element, watch_list, ports \n\t where watch_list_element.watch_list_id = watch_list.id  \n\t   and watch_list.user_id               = {$User->id} \n\t   and watch_list.id                    = {$wlid}\n\t   and watch_list_element.element_id    = ports.element_id";
        $result = pg_exec($db, $sql);
        $numrows = pg_numrows($result);
        // read each value and set the variable accordingly
        for ($i = 0; $i < $numrows; $i++) {
            $myrow = pg_fetch_array($result, $i);
            // we use these to see if a particular port is selected
            ${"port_" . $myrow["element_id"]} = 1;
        }
    }
    freshports_Start($category, "freshports - 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("Watch List - " . $category);
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:port-watch.php

示例2: Copyright

<?php

#
# $Id: inthenews.php,v 1.2 2006-12-17 12:06:11 dan Exp $
#
# Copyright (c) 1998-2003 DVL Software Limited
#
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_ConditionalGet(freshports_LastModified());
freshports_Start('In The News', 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
?>
	<?php 
echo freshports_MainTable();
?>
<tr><td valign="top" width="100%">
<table width="100%" border="0">
  <tr>
	<?php 
echo freshports_PageBannerText("In the news");
?>
  </tr>

<TR>
<TD VALIGN="top">
<p>This page is just a place for me to record the <?php 
echo $FreshPortsTitle;
?>
 articles which appear
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:inthenews.php

示例3: Copyright

<?php

#
# $Id: vote.php,v 1.2 2007-04-02 03:34:14 dan Exp $
#
# Copyright (c) 1998-2003 DVL Software Limited
#
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';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/design-voting/voting.php';
$Debug = 0;
$Title = "FreshPorts Design Contest - Voting";
freshports_Start($Title, 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
echo freshports_MainTable();
?>

<tr><td valign="top" width="100%" colspan="2">
<table width="100%" border="0">
<tr>
    <?php 
echo freshports_PageBannerText($Title);
?>
    </tr>
</table>
</td></tr>
<tr><td valign="top" width="100%">
<?php 
if (!$User->id) {
    echo 'You must login to vote.';
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:vote.php

示例4: switch

#
# ensure casesensitivity has an appropriate value
#
switch ($casesensitivity) {
    case 'casesensitive':
        # do nothing
        break;
    default:
        $casesensitivity = 'caseinsensitive';
        # do not break here...
}
#	if ($Debug) phpinfo();
if (!isset($_REQUEST['query'])) {
    $OnLoad = 'setfocus()';
}
freshports_Start('Search', 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
?>

<script language="JavaScript" type="text/javascript">
<!--
function setfocus() { document.search.query.focus(); }
// -->
</script>

<?php 
echo freshports_MainTable();
?>
<tr><td valign="top" width="100%">
<?php 
echo freshports_MainContentTable();
?>
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:search.php

示例5: Copyright

<?php

#
# $Id: release-2003-04-29.php,v 1.3 2012-09-01 16:33:19 dan Exp $
#
# Copyright (c) 1998-2003 DVL Software Limited
#
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_ConditionalGet(freshports_LastModified());
$Title = "New Release - 29 April 2003";
freshports_Start($Title, "freshports - new ports, applications", "FreeBSD, index, applications, ports");
?>
	<?php 
echo freshports_MainTable();
?>

	<tr><td valign="top" width="100%">

	<?php 
echo freshports_MainContentTable(NOBORDER);
?>

<TR>
	<?php 
echo freshports_PageBannerText($Title);
?>
</TR>
开发者ID:brycied00d,项目名称:freshports,代码行数:30,代码来源:release-2003-04-29.php

示例6: Copyright

<?php

#
# $Id: confirmation.php,v 1.2 2006-12-17 12:06:09 dan Exp $
#
# Copyright (c) 1998-2003 DVL Software Limited
#
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('Account confirmation', 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
$Debug = 0;
$ResultConfirm = 999;
$token = $_GET['token'];
if (isset($token)) {
    $token = pg_escape_string($token);
    if ($Debug) {
        echo "I'm confirming with token {$token}\n<BR>";
    }
    $sql = "select ConfirmUserAccount('{$token}')";
    $result = pg_exec($db, $sql);
    if ($result) {
        $row = pg_fetch_array($result, 0);
        $ResultConfirm = $row[0];
    } else {
        echo pg_errormessage() . $sql;
    }
}
?>
开发者ID:brycied00d,项目名称:freshports,代码行数:30,代码来源:confirmation.php

示例7: Copyright

<?php

#
# $Id: about.php,v 1.3 2012-07-21 23:23:57 dan Exp $
#
# Copyright (c) 1998-2006 DVL Software Limited
#
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_ConditionalGet(freshports_LastModified());
freshports_Start("About this site", "freshports - new ports, applications", "FreeBSD, index, applications, ports");
?>
	<?php 
echo freshports_MainTable();
?>

	<tr><td valign="top" width="100%">

	<?php 
echo freshports_MainContentTable(NOBORDER);
?>

<TR>
	<?php 
echo freshports_PageBannerText("About this site");
?>
</TR>

<TR><TD>
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:about.php

示例8: Copyright

<?php

#
# $Id: committer-opt-in.php,v 1.5 2009-01-08 19:47:08 dan Exp $
#
# Copyright (c) 1998-2003 DVL Software Limited
#
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('Committer opt-in', 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
if (!eregi(".*@FreeBSD.org", $User->email)) {
    echo 'Why are you here?';
    exit;
}
if (isset($_POST["subscribe"]) && $_POST["subscribe"] && !empty($visitor)) {
    # if not an email address
    if (strrpos($_POST["email"], '@') === false) {
        $committer = pg_escape_string($_POST["email"]);
        $sql = "insert into committer_notify (user_id, committer, status)\n\t    \t\t\tvalues ({$User->id}, '{$committer}', 'A')";
        if ($Debug) {
            echo "sql={$sql}<br>\n";
        }
        $result = pg_exec($db, $sql) or die("insert query failed " . pg_errormessage());
        if (!$result) {
            die("determine committer subscribe failed " . pg_errormessage());
        }
    } else {
        die("please enter just your login, not your email address");
    }
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:committer-opt-in.php

示例9: pg_errormessage

                exit;
                /* Make sure that code below does not get executed when we redirect. */
            }
        } else {
            $errors .= 'Something went terribly wrong there.<br>';
            $errors .= $sql . "<br>\n";
            $errors .= pg_errormessage();
        }
    }
} else {
    $email = $User->email;
    $numberofdays = $User->number_of_days;
    $page_size = $User->page_size;
}
#	echo '<br>the page size is ' . $page_size . ' : ' . $email;
freshports_Start('Customize User Account', 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
?>

<TABLE WIDTH="<?php 
echo $TableWidth;
?>
" BORDER="0" ALIGN="center">
<TR><TD VALIGN="top" width="100%">
<TABLE width="100%" border="0">
  <TR>
    <TD height="20"><script language="php">


if ($errors) {
echo '<TABLE CELLPADDING="1" BORDER="0" BGCOLOR="' . BACKGROUND_COLOUR . '" width="100%">
<TR>
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:customize.php

示例10: Copyright

<?php

#
# $Id: graphs2.php,v 1.2 2012-07-21 23:23:57 dan Exp $
#
# Copyright (c) 1998-2003 DVL Software Limited
#
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('Statistics - everyone loves a graph', 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
?>
	<script src="jquery-1.2.6.min.js"></script>
	<script src="jquery.flot.pack.js"></script>
	<script src="graphs.js"></script>

	<?php 
echo freshports_MainTable();
?>

	<tr><td valign="top" width="100%">

	<?php 
echo freshports_MainContentTable();
?>

<TR>
	<?php 
echo freshports_PageBannerText("Statistics - everyone loves a graph");
?>
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:graphs2.php

示例11: Copyright

<?php

#
# $Id: privacy.php,v 1.4 2012-07-21 23:23:58 dan Exp $
#
# Copyright (c) 1998-2006 DVL Software Limited
#
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_ConditionalGet(freshports_LastModified());
freshports_Start('Privacy Policy', 'freshports - 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('Privacy statement');
?>
</TR>
<TR><TD>
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:privacy.php

示例12: Copyright

<?php

#
# $Id: authors.php,v 1.4 2012-07-21 23:23:57 dan Exp $
#
# Copyright (c) 1998-2006 DVL Software Limited
#
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_ConditionalGet(freshports_LastModified());
freshports_Start('The Authors', 'freshports - 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("About the authors");
?>
  </tr>
<TR><TD>
<CENTER>
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:authors.php

示例13: Copyright

<?php

#
# $Id: how-big-is-it.php,v 1.7 2012-07-21 23:23:57 dan Exp $
#
# Copyright (c) 1998-2006 DVL Software Limited
#
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_ConditionalGet(freshports_LastModified());
freshports_Start('How big is it?', 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
$Total = 0;
function format_number($Value)
{
    return str_replace(' ', '&nbsp;', sprintf('%6s', $Value));
}
#
# grabbed from http://ca3.php.net/manual/en/function.number-format.php
# was attributed there to: Thanks to "php dot net at alan-smith dot no-ip dot com" and "service at dual-creators dot de".
#
function human_readable($size)
{
    $count = 0;
    $format = array("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB");
    while ($size / 1024 > 1 && $count < 8) {
        $size = $size / 1024;
        $count++;
    }
    if ($size < 10) {
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:how-big-is-it.php

示例14: 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

示例15: unset

require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/watch-lists.php';
$visitor = $_COOKIE['visitor'];
unset($add_name);
unset($rename_name);
$ValidCharacters = 'a-z, A-Z, and 0-9';
$WatchListNameMessage = 'Watch list names must contain only A..Z, a..z, or 0..9.';
// if we don't know who they are, we'll make sure they login first
if (!$visitor) {
    header('Location: /login.php?origin=' . $_SERVER['PHP_SELF']);
    /* Redirect browser to PHP web site */
    exit;
    /* Make sure that code below does not get executed when we redirect. */
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/watch_lists.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/user.php';
freshports_Start('Watch list maintenance', 'freshports - new ports, applications', 'FreeBSD, index, applications, ports');
#phpinfo();
$Debug = 0;
$ConfirmationNeeded['delete'] = 1;
$ConfirmationNeeded['delete_all'] = 1;
$ConfirmationNeeded['empty'] = 1;
$ConfirmationNeeded['empty_all'] = 1;
$UserClickedOn = '';
$ErrorMessage = '';
if ($_POST['delete']) {
    $UserClickedOn = 'delete';
}
if ($_POST['delete_all']) {
    $UserClickedOn = 'delete_all';
}
if ($_POST['empty']) {
开发者ID:brycied00d,项目名称:freshports,代码行数:31,代码来源:watch-list-maintenance.php


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