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


PHP Document::begin方法代码示例

本文整理汇总了PHP中Document::begin方法的典型用法代码示例。如果您正苦于以下问题:PHP Document::begin方法的具体用法?PHP Document::begin怎么用?PHP Document::begin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Document的用法示例。


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

示例1: invoke

 public function invoke($action, $args)
 {
     if (defined('IS_PROFILING')) {
         \App::profiler()->log('Invoking controller');
     }
     // Begin the document, and assign it as the response document
     $this->document = Document::begin(Document::DT_HTML5, 'en-us', 'UTF-8');
     $this->response->setDocument($this->document);
     $this->setup();
     $handler = [$this, $action . 'Action'];
     if (is_callable($handler)) {
         call_user_func_array($handler, $args);
         $this->response->output();
     } else {
         $this->show_404();
     }
     //$this->indexAction($doc);
     // Output the document
 }
开发者ID:noccy80,项目名称:cherryphp,代码行数:19,代码来源:controller.php

示例2: Document

<?php

include "../document.php";
$doc = new Document();
$doc->begin("delete user", 1);
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '{$substr['1']}' AND username = '{$substr['0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 3) {
        if (!isset($delete)) {
            $result = mysql_query("SELECT * FROM passwd");
            while ($currow = mysql_fetch_array($result)) {
                printf("<a href=\"deleteuser.php?delete=2&user=%s\">%s</a><br>\n", $currow["username"], $currow["username"]);
            }
        } else {
            if ($delete == 2) {
                print <<<end
Are you sure you want to delete {$user}?<br><br>
<a href="deleteuser.php?delete=3&user={$user}">Confirm deletion</a>
end;
            } else {
                if ($delete == 3) {
                    mysql_query("DELETE FROM passwd WHERE username = '{$user}'");
                    print <<<end
User deleted.
end;
                }
            }
        }
    } else {
        print <<<end
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:31,代码来源:deleteuser.php

示例3: Document

<?php

include "../document.php";
$doc = new Document();
$doc->begin("installation");
print <<<end
<b>windows</b><br><br>
The windows installer is a self-extracting executable. Click on link to
download the installer. Either open it from its current location or save
to disk and double click on the saved file in the explorer. Then follow
the installer wizard's steps to complete the installation. You can double
click the installed desktop icon to start BZFlag.<br><br>

To remove BZFlag, start the Add/Remove programs control panel, select
`BZFlag' and press the `Uninstall' button. An uninstaller dialog appears
and finishes it's job very quickly. Click the `OK' button. At this point,
all the files have been removed except two: the uninstaller itself
(bzfuinst.exe) and a file named bzflag.bzc. You can safely delete the
former. If you're going to install a new version of BZFlag, you probably
want to keep the latter file, which stores your configuration settings.
Otherwise, remove it and the directory it was in.<br><br>

<b>linux</b><br><br>
The Linux install can use either RPM or DEB formats. To install, use
rpm or apt, repectively. Its possible that the following symbolic links
may need to be made to get BZFlag to install properly over Mesa:<br>
\$ ln -s libMesaGL.so.3 /usr/lib/libGL.so.1<br>
\$ ln -s libMesaGLU.so.3 /usr/lib/libGLU.so.1<br>
Also, rpm may require the --nodeps option for some systems (to get
around broken dependencies). However, Mesa is absolutely required for DRI
systems.<br><br>
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:31,代码来源:installation.php

示例4: Document

<?php

include "../document.php";
$doc = new Document();
$doc->begin("download");
print <<<end
The newest downloads are available on the SourceForge
<a href="http://www.sourceforge.net/projects/bzflag">download page</a>
or from the
<a href="http://download.sourceforge.net/bzflag/">downloads directory</a>.<br><br>

For those of you who like to be on the bleeding edge, you can download
the <a href="http://sourceforge.net/cvs/?group_id=3248">CVS sources</a>
and compile it yourself. There are also
<a href="/developers/compiling.php">compiling instructions</a>
available for various platforms.<br><br>

<b>BZFlag system requirements:</b><br><br>
BZFlag supports the following operating systems:<br>
<ul>
<li>Windows 95 or newer</li>
<li>Linux 2.1 or newer</li>
<li>Mac OS X</li>
<li>Solaris (all versions)</li>
<li>Irix 5.3 or newer</li>
<li>FreeBSD (in ports)</li>
</ul>
BZFlag requires at least 4MB of disk space and 16MB of RAM. A working internet
connection is also required to play.<br><br>
These are also highly recommended:<br>
<ul>
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:31,代码来源:index.php

示例5: Document

<?php

include "../document.php";
$doc = new Document();
$doc->begin("frequently asked questions");
print <<<end
These are some questions that just don't fit anywhere else.<br><br>
<b>What is OpenGL?</b><br>
OpenGL is a portable graphics library. Its an open standard, which means that
no single company controls it and improvements are agreed upon by all. Its one
of the reasons BZFlag works on so many different platforms.<br><br>

<b>What does "Oscillation Overthruster" mean?</b><br>
The term comes from the movie "The Adventures of Buckaroo Banzai: Across the Eighth
Dimension." In it our hero B.B. and his team of scientists invent the "oscillation
overthruster," a device which allows matter to move effortlessly through other matter.
B.B. demonstrates by driving his rocket car through a mountain. (The special effects
used for the inside of the mountain are a lot cooler than the floating triangles
inside buildings in BZFlag).<br><br>

<b>What's with the latitude and longitude command line options?</b><br>
You can tell BZFlag the latitude and longitude of the host you're using and it'll
calculate the sun position based on them. For example, if you used a latitude of 90
and any longitude, you'd be at the north pole; the sun would never come up in the winter
and never set in the summer. The sun, moon, and star positions are based on the latitude,
longitude, time of day, and time of year and should be fairly accurate. The phase of the
moon is also accurately computed. This feature is more of a curiosity than something useful.<br><br>

<b>How come i hear distant explosions well after i see the explosion?</b><br>
BZFlag's audio attempts to mimic reality. While a jumping tank might not be realistic
sound does in fact travel slower than light. This is the same effect as when watching fireworks.
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:31,代码来源:faq.php

示例6: Document

<?php

include "../document.php";
$doc = new Document();
$doc->begin("troubleshooting");
print <<<end
This is a list of common problems and their solutions. If your
problem isn't listed here, check the
<a href="http://sourceforge.net/bugs/?group_id=3248">bugs list</a> and
write to the <a href="http://sourceforge.net/mail/?group_id=3248">mailing lists</a>.
<br><br>
<b>BZFlag runs slowly</b><br>
There are two possible causes for this. If your system has an old graphics card,
this can usually be solved by turning off some rendering options through the
options menu. Some options can also trip up certain graphics cards. If your card
is relatively new, you can try turning off shadows or smoothing and seeing if there
is any improvement.<br><br>

<b>Can't connect to servers</b><br>
If you can't connect to a server, the problem is often that your internet connection
is just too slow. There isn't a good fix for this problem, and the best choice is just
to try a different server, preferably one geographically closer to you.<br><br>

<b>All players are not responding</b><br>
A symptom of this problem is that shots seem to come from nowhere and none of the tanks
move around. There are a couple causes for this. The first is that you have a firewall
that filters out UDP. The solution for such a problem is either to adjust the firewall
or turn off UDP networking. The other cause is that BZFlag has incorrectly decided that
it can use multicasting. To fix this, try running bzflag from the command line with the
option "-ttl 0".<br><br>
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:30,代码来源:troubleshooting.php

示例7: Document

<?php

include "../document.php";
$doc = new Document();
$doc->begin("edit news", 1);
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '{$substr['1']}' AND username = '{$substr['0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 2) {
        if (!isset($edit)) {
            $result = mysql_query("SELECT * FROM news ORDER BY date DESC");
            while ($currow = mysql_fetch_array($result)) {
                printf("<a href=\"editnews.php?edit=2&entry=%s\">%s</a><br>\n", $currow[date], $currow["headline"]);
            }
        } else {
            if ($edit == 2) {
                $result = mysql_query("SELECT * FROM news WHERE date = {$entry}");
                $currow = mysql_fetch_array($result);
                $headline = $currow["headline"];
                $body = $currow["body"];
                print <<<end
<form method="GET" action="editnews.php">
<input type="hidden" name="edit" value="3">
<input type="hidden" name="entry" value="{$entry}">
<b>Headline:</b><br>
<input type="text" name="headline" value="{$headline}"><br>
<b>Body:</b><br>
<textarea rows="8" cols="45" name="body">
{$body}
</textarea><br>
<input type="submit" value="Modify">
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:31,代码来源:editnews.php

示例8: Document

<?php

include "../document.php";
$doc = new Document();
if (isset($ID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '{$substr['1']}' AND username = '{$substr['0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 3) {
        if (!isset($edit)) {
            $doc->begin("edit user", 1);
            $result = mysql_query("SELECT * FROM passwd");
            while ($currow = mysql_fetch_array($result)) {
                printf("<a href=\"edituser.php?edit=2&user=%s\">%s</a><br>\n", $currow["username"], $currow["username"]);
            }
        } else {
            if ($edit == 2) {
                $doc->begin("edit user", 1);
                $result = mysql_query("SELECT * FROM passwd WHERE username = '{$user}'");
                $row = mysql_fetch_array($result);
                $user = $row["username"];
                $access = $row["access"];
                print <<<end
<form method="GET" action="edituser.php">
<input type="hidden" name="edit" value="3">
<input type="hidden" name="user" value="{$user}">
<table border="0">
  <tr>
    <td>Username:</td>
    <td><input type="text" maxlength="32" name="username" value="{$user}">
  </tr>
  <tr>
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:31,代码来源:edituser.php

示例9: explode

<?php

include '../document.php';
require_once 'TableEditor.php';
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '{$substr['1']}' AND username = '{$substr['0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 1) {
        $editor = new TableEditor($db, 'motd');
        $editor->setDefaultOrderby('title');
        $editor->setConfig('allowCopy', false);
        $editor->setConfig('allowCSV', false);
        $editor->noDisplay('id');
        $editor->display();
    } else {
        $doc = new Document();
        $doc->begin("Edit MOTD", 1);
        print "Unable to find any any MOTD results";
        $doc->end();
    }
} else {
    $doc = new Document();
    $doc->accessDenied();
}
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:24,代码来源:editMOTD.php

示例10: Document

<?php

include "document.php";
$doc = new Document();
$doc->begin("reviews");
print <<<end
<a href="http://happypenguin.org/">The Game Tome</a> allows visitors to rate the
games. <a href="http://happypenguin.org/show?bzflag">BZFlag</a> has a rating of 5 (of 5) stars.<br><br>

<a href="http://www.tucows.com/">TUCOWS</a> gives
<a href="http://www.tucows.com/perl/tucowsSearch?platform=%&word=bzflag">BZFlag</a> a rating of 5 (of 5) cows.<br><br>
<hr size="1">
<i>These are unsolicited quotes from BZFlag players.</i><br><br>
I want to say thank you for the game... we've been having a blast with it!!!! ... Thanks again for providing us with stress relief at the end of a work day. --V.S.<br><br>

First of all, I`d like to thank you for writing BZFlag. Without a doubt, its the best (and most entertaining!) software we have on these machines. ... Once again, on behalf of all the SGI users here at [company], many many thanks for writing probably the best game we have.... --S.L.<br><br>

Very nice game! Thank you very much! Addictive to the extreme! --E.D.<br><br>

It is an amazing game.... It may ruin my life. Is there a BZFlag anonymous help club? --S.Y.<br><br>

Great game, killer, love it. --B.K.<br><br>

We have been using 1.5 and *LOVE* it! --J.P.A.<br><br>

There's a group of us in [a company's support division] who find this game a great way to relieve the stress built up after a hard day being polite to idiot customers! --D.B.<br><br>

This game is totally awsome!!! I would love to play this at home or over the Net. --J.M.<br><br>

Here, in Hungary BZFlag means many crazy nights sitting in front of an SGI machine. ... I've seen many games before I worked for SGI, but in this game there's something special.... --P.S.<br><br>
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:30,代码来源:reviews.php

示例11: Document

<?php

include "../document.php";
$doc = new Document();
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '{$substr['1']}' AND username = '{$substr['0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1) {
        if (!(isset($pass) || isset($passconf))) {
            $doc->begin("change password", 1);
            print <<<end
<br>
<form action="chpass.php" method="POST">
  <table border="0">
    <tr>
      <td>Password:</td>
      <td><input type="password" name="pass"></td>
    </tr>
    <tr>
      <td>Confirm password:</td>
      <td><input type="password" name="passconf"></td>
    </tr>
    <tr>
      <td colspan="2" align="center"><input type="submit" value="Change password"></td>
    </tr>
  </table>
</form>
end;
        } else {
            if ($pass != $passconf) {
                $doc->begin("change password", 1);
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:31,代码来源:chpass.php

示例12: KeyStore

<?
    Document::begin(Document::DT_HTML401_TRANS);
    $currentbook = 1; // TODO: initialize from session
    $currentbookdata = array(
        'id' => 1,
        'slug' => 'default',
        'title' => 'Demonstration Boki'
    );
    if ($currentbook) {
        $booktitle = $currentbookdata['title'];
    } else {
        $booktitle = "No book open";
    }
    KeyStore::register('api:google','ABQIAAAAX0duTJDNnIGr0q-PMsNgPBQGZChJCJZDmT1j5LVvleoaQrnX6hSGrc-x9nyNu0-Z5W4PyN81K-Oa4w');
?>
<html lang="en-us">
<head>
    <title>BOKi: <?php 
echo $booktitle;
?>
</title>
    <script type="text/javascript" src="http://www.google.com/jsapi?key=<?php 
echo KeyStore('api:google');
?>
"></script>
    <script type="text/javascript">
        google.load("prototype", "1.6.1.0");
        google.load("scriptaculous", "1.8.3");
    </script>
    <link rel="stylesheet" type="text/css" href="/res/boki/boki.css">
    <script type="text/javascript" src="/res/boki/boki.js"></script>
开发者ID:noccy80,项目名称:lepton-ng,代码行数:31,代码来源:header.php

示例13: Document

<?php

include "../document.php";
$doc = new Document();
$doc->begin("add news", 1);
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '{$substr['1']}' AND username = '{$substr['0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 1) {
        if (!isset($add)) {
            print <<<end
<form method="post" action="addnews.php">
<input type="hidden" name="add" value="1">
<b>Headline:</b><br>
<input name="headline" type="text"><br>
<b>Body:</b><br>
<textarea rows="8" cols="45" name="body"></textarea><br>
<input type="submit" value="Add news"><br>
</form>
end;
        } else {
            print <<<end
<div align="center"><b>News Added</b></div><br><br>
end;
            $substr = explode("|", $bzID);
            $user = $substr[0];
            $query = "INSERT INTO news (headline, body, date, username) values ('{$headline}', '{$body}', '" . time() . "', '{$user}')";
            $result = mysql_query($query);
            $result = mysql_query("SELECT * FROM news ORDER BY date DESC");
            $currow = mysql_fetch_array($result);
            printf("<b>%s</b> - %s by %s<br>%s<br><br>\n", $currow["headline"], date("F j Y, g:i A", $currow["date"]), $currow["username"], $currow["body"]);
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:31,代码来源:addnews.php

示例14: Document

<?php

include "../document.php";
include "useradmin.php";
$doc = new Document();
$doc->begin("user list", 1);
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '{$substr['1']}' AND username = '{$substr['0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 3) {
        $result = mysql_query("SELECT * FROM passwd");
        print <<<end
Access levels:<br>
end;
        print_accesslevel(1);
        print "<br>\n";
        print_accesslevel(2);
        print "<br>\n";
        print_accesslevel(3);
        print "<br>\n";
        print <<<end
<br><br>
<table border="1">
  <tr><td>Username:</td><td>Access level:</td></tr>
end;
        while ($currow = mysql_fetch_array($result)) {
            printf("  <tr><td>%s</td><td>%s</td></tr>\n", $currow["username"], $currow["access"]);
        }
        print <<<end
</table>
end;
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:31,代码来源:userlist.php

示例15: Document

<?php

include "document.php";
$doc = new Document();
$doc->begin("title");
// add page content here:
print <<<end
end;
$doc->end();
开发者ID:szakats,项目名称:bzflag_mirror,代码行数:9,代码来源:template.php


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