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


PHP Document::SetTitle方法代码示例

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


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

示例1: header

<?php

require_once "admin-mode.php";
require_once "mysqlconnect.php";
require_once "document.php";
if (!is_admin_mode()) {
    header("Location: /");
    exit;
}
$document = new Document();
$document->SetTitle("Admin: Lisamise tulemus");
$document->AddMainMenu();
$document->AddSubMenu();
$hash = sha1($_POST['pass']);
$query = "INSERT INTO `archive` \n( `id` , \n`name` , \n`address` , \n`date` , \n`next` , \n`previous` , \n`groupid` , \n`order` , \n`type` , \n`category` , \n`comments` ) \nVALUES (\n'', \n'{$_POST['name']}', \n'{$_POST['address']}', \nCURDATE( ) , \n'0', \n'0', \n'0', \n'0', \n'{$_POST['type']}', \n'{$_POST['category']}', \n'{$_POST['comments']}'\n);";
mysql_query($query);
$chapter = <<<EOHTML
<h1>Admin: Lisamine õnnestus</h1>

<dl>
<dt>Nimi</dt><dd>{$_POST['nimi']}</dd>
<dt>Aadress</dt><dd>{$_POST['address']}</dd>
<dt>Tüüp</dt><dd>{$_POST['type']}</dd>
<dt>Kategooria</dt>{$_POST['category']}<dd></dd>
<dt>Kommentaarid</dt><dd>{$_POST['comments']}</dd>
</dl>

EOHTML;
$document->AddBasicChapter($chapter, "Admin:_Lisamise_tulemus");
$document->Out();
开发者ID:nene,项目名称:triin.net,代码行数:30,代码来源:add-article.php

示例2: commentToHtml

<?php

require_once "admin-mode.php";
require_once "document.php";
if (!is_admin_mode()) {
    header("Location: /");
    exit;
}
$document = new Document();
$document->SetTitle("Admin: Viimased kommentaarid");
$document->AddMainMenu();
$document->AddSubMenu();
function commentToHtml($comment)
{
    $date = datetime_to_est($comment['datetime'], true);
    if (strlen($comment['homepage']) > 0) {
        $name = "<a href=\"{$comment['homepage']}\" title=\"kommenteerija koduleht\">{$comment['name']}</a>";
    } else {
        $name = $comment['name'];
    }
    return <<<EOHTML
<div id="kommentaar_{$comment['id']}">
{$comment['text']}
  <p class="autor">
  Teema: {$comment['article']}<br />
  {$date} {$name} ({$comment['email']}).<br />
  <b><a href="?delete={$comment['id']}">Kustuta</a></b>
  </p>
</div>
EOHTML;
}
开发者ID:nene,项目名称:triin.net,代码行数:31,代码来源:latest-comments.php

示例3: Document

<?php

require_once "mysqlconnect.php";
require_once "document.php";
require_once "urlvars.php";
$document = new Document();
$document->SetTitle("Arhiiv");
$document->AddMainMenu("Arhiiv");
$document->AddSubMenu();
$chapter = "<h1>Arhiiv</h1>\n";
$query = "SELECT * FROM archive WHERE category<>'Luuletused' AND category<>'Laulud' AND `order`=0 ORDER BY category, date DESC, name";
$result = mysql_query($query);
while ($doc = mysql_fetch_array($result)) {
    if ($doc['category'] != $old_category) {
        if (strlen($old_category) != 0) {
            $chapter .= "</ul>\n";
        }
        $chapter .= "<h2>{$doc['category']}</h2>\n";
        $chapter .= "<ul>\n";
        $old_category = $doc['category'];
    }
    $address = '/' . str_replace('-', '/', $doc['date']) . '/' . UrlVars::real2url($doc['name']);
    if ($doc['type'] == 'normal') {
        $class = '';
    } elseif ($doc['type'] == 'standalone') {
        $class = ' class="standalone"';
    } elseif ($doc['type'] == 'text/css') {
        $class = ' class="css"';
    } else {
        $class = ' class="file"';
    }
开发者ID:nene,项目名称:triin.net,代码行数:31,代码来源:arhiiv.php

示例4: stripslashes

<?php

require_once 'commentator.php';
require_once 'document.php';
require_once 'urlvars.php';
foreach ($_POST as $key => $value) {
    $_POST[$key] = stripslashes($value);
}
$document = new Document();
$id = (int) $_POST['id'];
if ($_POST['submit'] == 'Eelvaade') {
    $document->SetTitle("Kommentaari eelvaade");
    $send = false;
} else {
    $send = true;
}
$commentator = new Commentator($_POST);
if ($commentator->Parse()) {
    $document->AddComments($id, 'after', $_POST, $commentator->mFormattedComment);
} else {
    $document->SetTitle("Vigane kommentaar!");
    $document->AddComments($id, 'after', $_POST, '', $commentator->mError);
    $send = false;
}
if (!$send) {
    $document->AddMainMenu();
    $document->AddSubMenu();
    $query = "SELECT address FROM archive WHERE id='{$id}'";
    $result = mysql_query($query);
    if (mysql_num_rows($result) > 0) {
        $doc = mysql_fetch_array($result);
开发者ID:nene,项目名称:triin.net,代码行数:31,代码来源:comment.php

示例5: Document

<?php

require_once "mysqlconnect.php";
require_once "document.php";
$document = new Document();
$document->SetTitle("Looming");
$document->AddMainMenu("Looming");
$document->AddSubMenu();
$chapter = "<h1>Looming</h1>\n";
$query = "SELECT * FROM archive WHERE category='Luuletused' OR category='Laulud' AND `order`=0 ORDER BY category, date DESC, name";
$result = mysql_query($query);
while ($doc = mysql_fetch_array($result)) {
    if ($doc['category'] != $old_category) {
        if (strlen($old_category) != 0) {
            $chapter .= "</ul>\n";
        }
        $chapter .= "<h2>{$doc['category']}</h2>\n";
        $chapter .= "<ul>\n";
        $old_category = $doc['category'];
    }
    $address = '/' . str_replace('-', '/', $doc['date']) . '/' . UrlVars::real2url($doc['name']);
    if ($doc['type'] == 'normal') {
        $class = '';
    } elseif ($doc['type'] == 'standalone') {
        $class = ' class="standalone"';
    } elseif ($doc['type'] == 'text/css') {
        $class = ' class="css"';
    } else {
        $class = ' class="file"';
    }
    $chapter .= "<li{$class}><a href=\"{$address}\">{$doc['name']}</a></li>\n";
开发者ID:nene,项目名称:triin.net,代码行数:31,代码来源:looming.php

示例6: header

<?php

require_once "admin-mode.php";
require_once "mysqlconnect.php";
require_once "document.php";
if (!is_admin_mode()) {
    header("Location: /");
    exit;
}
$document = new Document();
$document->SetTitle("Admin: Uue artikli lisamine");
$document->AddMainMenu();
$document->AddSubMenu();
$chapter = <<<EOHTML
<h1>Admin: Uue artikli lisamine</h1>

<form action="add-article.php" method="post">
<fieldset>
<legend>Nimed</legend>
<p><label for="af_name">Pealkiri</label>
<input type="text" name="name" id="af_name" /></p>

<p><label for="af_address">Aadress</label>
<input type="text" name="address" id="af_address" value="archive/" /></p>
</fieldset>


<fieldset>
<legend>Tüüp</legend>
<select name="type">
<option value="normal">normal</option>
开发者ID:nene,项目名称:triin.net,代码行数:31,代码来源:add-article-form.php

示例7: Document

<?php

require_once "mysqlconnect.php";
require_once "document.php";
$document = new Document();
$document->SetTitle("Kontakt");
$document->AddMainMenu("Kontakt");
$document->AddSubMenu();
$chapter = <<<EOHTML
<h1>Kontakt</h1>

<div class="pilt">
<img src="/archive/mina.jpg" alt="Minu pilt" />
<p>Mina, oma eduka sportlaskarjääri tipphetkel?</p>
</div>


<p>No põhimõtteliselt, kui keegi väga soovib, siis võib ta ju 
mulle kirjutada ja joonistada. Aadress on igatahes nüüd
välja jagatud ja saab näha, kas sünnib sellest halba/head.
Ega must mingit head kirjasõpra vast ei tule, nii et parem
ärge selles suunas kohe proovima hakakegi.</p>

<p>Aga kui on midagi seoses sellesama Trinoloogialehega või
triinudega, siis see on kõik päris kindlasti alati teretulnud.</p>

<p>Seda pilti siin tuleb ühtlasi võtta kui hoiatust, et te
ei kipuks kuidagi pimesi minuga kohtuma, ja et te päris selgesti
näeksite, et mina ei kuulu triinude hulka.</p>

<p>Olge tublid!</p>
开发者ID:nene,项目名称:triin.net,代码行数:31,代码来源:kontakt.php

示例8: Document

<?php

require_once "mysqlconnect.php";
require_once "document.php";
$document = new Document();
$document->SetTitle("Trinoloogialeht");
$document->AddMainMenu("Hiljutine");
$document->AddSubMenu();
$query = "SELECT * FROM archive WHERE type='normal' ORDER BY date DESC LIMIT 3";
$result = mysql_query($query);
while ($doc = mysql_fetch_array($result)) {
    $query = "SELECT COUNT(*) FROM comments WHERE articleid='{$doc['id']}'";
    $result2 = mysql_query($query);
    $com = mysql_fetch_array($result2);
    $url = '/' . str_replace('-', '/', $doc['date']) . '/' . UrlVars::real2url($doc['name']);
    if ($doc['comments'] == 'Y') {
        $url .= '#kommentaarid';
    }
    $document->AddArchive($doc['address'], $com[0], $url, $doc['comments']);
}
$document->Out();
开发者ID:nene,项目名称:triin.net,代码行数:21,代码来源:index.php

示例9: Document

<?php

require_once "admin-mode.php";
require_once "document.php";
// When user enters correct information, log in
if (isset($_POST["user"]) && isset($_POST["pass"])) {
    if ($_POST["user"] == ADMIN_USER && md5($_POST["pass"]) == ADMIN_PASS) {
        $_SESSION["user"] = $_POST["user"];
        $_SESSION["admin"] = true;
    }
}
$document = new Document();
$document->SetTitle("Admin: Login");
$document->AddMainMenu();
$document->AddSubMenu();
$login_page = <<<EOHTML
<h1>Admin: Login</h1>

<form action="login.php" method="post">
<fieldset>
<legend>Autentimine</legend>
<p><label for="af_pass">Kasutaja</label>
<input type="text" name="user" id="af_user" /></p>

<p><label for="af_pass">Parool</label>
<input type="password" name="pass" id="af_pass" /></p>
</fieldset>

<input type="submit" value="Sisene" />
</form>
开发者ID:nene,项目名称:triin.net,代码行数:30,代码来源:login.php


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