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


PHP apply_template函数代码示例

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


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

示例1: delmember_header

function delmember_header()
{
    apply_template("Bookkeeping", array(array("name" => "Administration", "href" => "admin.php"), array("name" => "Delete Member", "href" => "deletemember.php")));
    ?>
<h1>Delete Member</h1>
<?php 
}
开发者ID:lobolabs,项目名称:fossfactory,代码行数:7,代码来源:deletemember.php

示例2: list

        exit;
    }
    list($rc, $err) = ff_requestwithdrawal($username, $email, $amount);
    if ($rc == 9) {
        header("Location: {$GLOBALS['SITE_URL']}" . "account.php?tab=reserve&err=toomuch");
        exit;
    } else {
        if ($rc) {
            header("Location: {$GLOBALS['SITE_URL']}" . "account.php?tab=reserve&err=syserr");
            exit;
        }
    }
    header("Location: {$GLOBALS['SITE_URL']}" . "account.php?tab=reserve&err=success&amount={$amount}");
    exit;
}
apply_template("My Factory", array(array("name" => "My Factory", "href" => "account.php")), '', false, true);
include_once "tabs.php";
$tabs = array("duties" => "My Duties", "projects" => "My Projects", "prefs" => "Settings", "subscription" => "Monthly Sponsorship", "reserve" => "My Reserve", "drafts" => "Drafts");
tab_header($tabs, "account.php", $tab, "duties");
include_once "myprojectsfunc.php";
if ($tab == 'projects') {
    include_once "myprojects.php";
} else {
    if ($tab == 'duties') {
        include_once "myduties.php";
    } else {
        if ($tab == 'prefs') {
            include_once "prefs.php";
        } else {
            if ($tab == 'subscription') {
                include_once "subscription.php";
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:account.php

示例3: apply_template

(at your option) any later version.

Fossfactory-src is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with Fossfactory-src.  If not, see <http://www.gnu.org/licenses/>.
*/
// A quick sanity check
if (!isset($GLOBALS["SITE_URL"])) {
    print "<b>You forgot to configure the autoprepend setting.</b>\n";
    exit;
}
apply_template("About Us", array(array("name" => "About Us", "href" => "")), $onload, false, true);
?>

<h1>About FOSS Factory</h1>

<p>
FOSS Factory's mission is to accelerate the advancement of free/open
source software by helping people collaborate on the design, funding, and
development of innovative software ideas.  All software solutions produced
using our system are released under free/open source licenses.  Our unique
model brings the best of innovators from both the entrepreneurial and
FOSS worlds together to solve real world problems using the mass resources
of the FOSS community.
</p>

<p>Learn more about our <a href="team.php">team</a></p>
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:aboutus.php

示例4: apply_template

This file is part of Fossfactory-src.

Fossfactory-src is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Fossfactory-src is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with Fossfactory-src.  If not, see <http://www.gnu.org/licenses/>.
*/
apply_template("System Overview", array(array("name" => "System Overview", "href" => "overview.php")));
$n = 1;
function n()
{
    global $n;
    print "{$n}. ";
    $n++;
}
list($rc, $currencies) = ff_currencies();
$currency = $currencies[$GLOBALS["pref_currency"]];
?>
<h1>System Overview</h1>

<p>
FOSS Factory depends on a complex system of checks and balances.
We recommend reading over this document carefully, as it describes some
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:overview.php

示例5: header

            exit;
        }
        $draftid = $err;
        header("Location: account.php?tab=drafts");
        exit;
    }
    list($rc, $id) = ff_createproject($username, $name, $reqmts, '', false, empty($draftid) ? false : $draftid);
    if (!$rc) {
        ff_setfundinggoal($username, $id, $fundgoal2 . $GLOBALS['pref_currency']);
        header("Location: " . projurl($id));
        exit;
    }
    header("Location: newproject.php?draft={$draftid}&name=" . urlencode($name) . "&reqmts=" . urlencode($reqmts) . "&fundgoal=" . urlencode($fundgoal) . "&err=1");
    exit;
}
apply_template("New Project", array(array("name" => "New Project", "href" => "newproject.php")));
if ($err) {
    print "<div class=error>" . htmlentities($err) . "</div>\n";
}
?>
<h1>Create a New Project</h1>
<script>
function newProjectSubmitCheck() {
    f = document.form;
    if (!f.elements['name'].value.match(/[^ \n\r\t]/) ||
        !f.elements['reqmts'].value.match(/[^ \n\r\t]/)) {
        alert('Please fill out all the fields before submitting.');
        return false;
    }

    return confirm('Are you sure you want to create the new project?  Please read everything over carefully before submitting.');
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:newproject.php

示例6: Character

$character = new Character($id);
if (!$character->IsValid()) {
    __printFatalErr("Failed to retrieve character data.", __LINE__, __FILE__);
}
// Perform any simple actions that are requested.
if (isset($_POST['public'])) {
    $public_updated = apply_public($sid, $character, $_POST['public'] == 'true') ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['inactive'])) {
    $inactive_updated = apply_inactive($sid, $character, $_POST['inactive'] == 'true') ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['add_profile'])) {
    $profiles_updated = apply_add_profile($character, $_POST['add_profile']) ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['tid'])) {
    $template_updated = apply_template($sid, $character, (int) $_POST['tid']) ? 'Updated!' : 'Update Failed!';
}
if (isset($_GET['remove_profile'])) {
    $profiles_updated = apply_remove_profile($character, $_GET['remove_profile']) ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['join_campaign'])) {
    $campaign_updated = apply_join_campaign($character, (int) $_POST['join_campaign']);
}
if (isset($_POST['cancel_join_campaign'])) {
    $campaign_updated = apply_cancel_join_campaign($character) ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['accept_join_campaign'])) {
    $campaign_updated = apply_accept_join_campaign($character) ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['leave_campaign'])) {
    $campaign_updated = apply_leave_campaign($character) ? 'Updated!' : 'Update Failed';
开发者ID:ediosyncratic,项目名称:rpg-profile,代码行数:31,代码来源:char.php

示例7: implode

        $items[$i]['image_title'] = $items[$i]['name'] . ' by ' . $items[$i]['by'];
        $desc = $xpath->getNode($item['xpath'] . '/description[1]');
        $items[$i]['description'] = implode(' ', $desc['childNodes']);
        //$xpath->wholeText($item['xpath'].'/description[1]');
        $items[$i]['location'] = $xpath->wholeText($item['xpath'] . '/location[1]');
        $li = 1;
        $link = $xpath->getNode($item['xpath'] . "/link[{$li}]");
        while ($link !== false) {
            $items[$i]['links'] .= "<a href=\"{$link[attributes][href]}\">{$link[textParts][0]}</a><br />";
            $li++;
            $link = $xpath->getNode($item['xpath'] . "/link[{$li}]");
        }
        if (count($items[$i]['links']) > 0) {
            $items[$i]['links_title'] = 'Links:<br />';
        }
        $html .= apply_template($items[$i], BASEDIR . '/templates/template.curated.item.html');
        $i++;
    }
}
$template = BASEDIR . '/templates/template.html';
$templatepiece = BASEDIR . '/templates/template.test.html';
$page = new xhtml_page($template);
$page->set('title', 'Testing');
$piece = new xhtml_piece($templatepiece);
$page->set('content', $piece->out());
$page->set('replaceme', $html);
$fp = fopen(BASEDIR . '/testout.php', 'w');
fwrite($fp, $page->out());
fclose($fp);
echo $page->out();
echo '<pre>';
开发者ID:GABBAR1947,项目名称:processing-web-archive,代码行数:31,代码来源:test.xpath.php

示例8: list

        include_once "loginlogic.php";
        list($rc, $err) = log_in($memberinfo["username"], $sid, $remember);
        if ($rc) {
            print "Internal system error: {$rc} {$err}";
            exit;
        }
        if ($url === '') {
            $url = "account.php";
        }
        header("Location: {$GLOBALS['SITE_URL']}{$url}");
        exit;
    }
    header("Location: {$GLOBALS['SITE_URL']}login.php?url=" . urlencode($url) . "&u=" . urlencode($userid) . "&remember=" . urlencode($remember) . "&err=" . urlencode($err));
    exit;
}
apply_template("Member Login", array(array("name" => "Login", "href" => "login.php")));
if (isset($msg) && !$err) {
    $err = $msg;
}
if ($err) {
    print "<div class=error>" . htmlentities($err) . "</div>\n";
}
?>
<form class=loginform method="post" action="<?php 
echo $GLOBALS["SECURE_URL"];
?>
login.php" id=loginform>
<?php 
if ($url !== '') {
    ?>
<input type=hidden name=url value="<?php 
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:login.php

示例9: apply_template

This file is part of Fossfactory-src.

Fossfactory-src is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Fossfactory-src is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with Fossfactory-src.  If not, see <http://www.gnu.org/licenses/>.
*/
apply_template("Charities and Non-Profits", array(array("name" => "Charities and Non-Profits", "href" => "charities.php")), '', false, true);
?>
<h1>Charities and Non-Profits</h1>
<?php 
list($rc, $charities) = ff_getcharities();
if ($rc) {
    print "<div class=error>System error.  Please try again later.</div>\n";
    softexit();
}
?>
<p>
FOSS Factory collects money for the following organizations via our
<a href="overview.php#communitydeduction">community deduction</a> system.
Please use our <a href="feedback.php">feedback</a> page to recommend
other charitable groups.
</p>
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:charities.php

示例10: apply_template

This file is part of Fossfactory-src.

Fossfactory-src is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Fossfactory-src is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with Fossfactory-src.  If not, see <http://www.gnu.org/licenses/>.
*/
apply_template("Why we need FOSS Factory", array(array("name" => "Why we need FOSS Factory", "href" => "why.php")), '', false, true);
?>
<h1>Why we need FOSS Factory</h1>

<p>
The free software movement doesn't need a bounty model.  On the contrary,
the movement has proven to be an incredibly powerful force, turning
whole segments of the software industry on their heads, forcing countless
major corporations to rethink their business models.
</p>

<div class=sidenote1>
With FOSS Factory, a project can get its start from just an itch and a
preliminary plan.
</div>
开发者ID:lobolabs,项目名称:fossfactory,代码行数:30,代码来源:why.php

示例11: list

            $ferror[] = $_FILES['thefile']['error'][$key];
        }
    }
    if (!$iserror) {
        //we only process the submission if no errors at all were encountered
        list($rc, $subid) = ff_submitcode($GLOBALS['username'], $files, $_REQUEST['comments'], $id);
        if (!$rc) {
            header("Location: subsuccess.php?id={$id}");
            exit;
        }
        $msg = "There was a problem receiving your file: {$rc} {$subid}";
    } else {
        $msg = "There was a problem in submitting your file(s)";
    }
}
apply_template($projinfo["name"], array(array("name" => "Projects", "href" => "browse.php"), array("name" => $projinfo["name"], "href" => projurl($id)), array("name" => "submit code", "href" => "submission.php?id={$id}")));
?>
<h1>Make a Submission</h1>
<?php 
if ($msg) {
    ?>
<div class=error><?php 
    echo htmlentities($msg);
    ?>
</div>
<?php 
}
?>
<script>
formats = new Array();
<?php 
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:submission.php

示例12: log_in

            break;
        }
        // Log the person in.
        include_once "loginlogic.php";
        log_in($uname, $sid);
        if ($url !== '') {
            header("Location: {$GLOBALS['SITE_URL']}{$url}");
            exit;
        }
        header("Location: {$GLOBALS['SITE_URL']}account.php");
        exit;
    }
    header("Location: {$GLOBALS['SITE_URL']}signup.php?" . "name=" . urlencode($name) . "&email=" . urlencode($email) . "&email2=" . urlencode($email2) . "&uname=" . urlencode($uname) . "&url=" . urlencode($url) . "&err=" . urlencode($err));
    exit;
}
apply_template("Member Sign Up", array(array("name" => "Sign Up", "href" => "signup.php")));
if ($err) {
    print "<div class=error>" . htmlentities($err) . "</div>\n";
}
?>
<form id=signup_form method="post" action="<?php 
echo $GLOBALS["SECURE_URL"];
?>
signup.php">
<?php 
if ($url !== '') {
    ?>
<input type=hidden name=url value="<?php 
    echo htmlentities($url);
    ?>
">
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:signup.php

示例13: realpath

*/
$srcdir = realpath(realpath(".") . "/..");
if (getenv("PATH_INFO")) {
    header("Content-type: application/octet-stream");
    if (getenv("PATH_INFO") === '/fossfactory-src-LIVE.tar.gz') {
        passthru("cd " . escapeshellarg($srcdir) . "; tar cz LICENSE contributors README source/ schema/ contrib/ " . "--transform 's,^,fossfactory-src/,' " . "--exclude .svn --exclude .git --owner root --group root");
    } else {
        if (ereg("^/[-._a-zA-Z0-9]+\$", getenv("PATH_INFO")) && is_file("{$srcdir}/releases" . getenv("PATH_INFO"))) {
            readfile("{$srcdir}/releases" . getenv("PATH_INFO"));
        } else {
            print "You're cool.";
        }
    }
    exit;
}
apply_template("FOSS Factory Source", array(array("name" => "FOSS Factory Source", "href" => "get-source.php")));
?>
<h1>FOSS Factory Source</h1>
<p>
The source code for this website is distributed under
the <a href="http://www.gnu.org/licenses/agpl.html">GNU
Affero General Public License</a>.
</p>

<?php 
// Get a list of the files in the releases directory
$releases = array();
if (is_dir("{$srcdir}/releases")) {
    $dir = opendir("{$srcdir}/releases");
    if ($dir !== false) {
        while (($file = readdir($dir)) !== false) {
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:get-source.php

示例14: apply_template

(at your option) any later version.

Fossfactory-src is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with Fossfactory-src.  If not, see <http://www.gnu.org/licenses/>.
*/
// A quick sanity check
if (!isset($GLOBALS["SITE_URL"])) {
    print "<b>You forgot to configure the autoprepend setting.</b>\n";
    exit;
}
apply_template("The Team", array(array("name" => "The Team", "href" => "")), $onload, false, true);
?>
<h1>Introduction</h1>

<p>
The founding team of FOSS Factory has a history of successful business
start-ups in the IT industry.  Steve Sutherland, the lead investor,
met and hired John-Paul, the current president, back in 1994 to help
build TrueSpectra, an internet imaging and dynamic composition software
company.  TrueSpectra was rebranded as Scene7 and later bought out by
Adobe in 2007.
</p>

<p>
Steve and John-Paul left TrueSpectra in 1999 and immediately co-founded
OpenGraphics, a start-up that provides solutions for internet photo
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:team.php

示例15: scrub

the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Fossfactory-src is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with Fossfactory-src.  If not, see <http://www.gnu.org/licenses/>.
*/
$tab = scrub($_REQUEST["tab"]);
if (!$tab) {
    $tab = 'general';
}
apply_template("Feedback", array(array("name" => "Feedback", "href" => "feedback.php")));
?>
<h1>FOSS Factory Feedback</h1>
<p>
Please use these forums to discuss anything about the site.
You can also <a href="contact.php">contact us</a> by email or snail mail.
</p>
<?php 
include_once "tabs.php";
$tabs = array("general" => "General", "bugs" => "Bugs", "features" => "Feature Requests");
tab_header($tabs, "feedback.php", $tab, "general");
include_once "forum.php";
$forum = "feedback";
if ($tab != "general") {
    $forum .= "{$tab}";
}
开发者ID:lobolabs,项目名称:fossfactory,代码行数:31,代码来源:feedback.php


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