本文整理汇总了PHP中articles_all函数的典型用法代码示例。如果您正苦于以下问题:PHP articles_all函数的具体用法?PHP articles_all怎么用?PHP articles_all使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了articles_all函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_list
public function action_list()
{
//Подготовка данных
$articles_all = articles_all();
$this->title .= '::Просмотр статей';
$this->content = $this->Template('v/v_editor.php', array('articles_all' => $articles_all));
}
示例2: articles_new
$action = "";
}
if ($action == "add") {
if (!empty($_POST)) {
articles_new($link, $_POST['title'], $_POST['date'], $_POST['content']);
header("Location: index.php");
}
include "../views/article_admin.php";
} else {
if ($action == "edit") {
if (!isset($_GET['id'])) {
header("Location: index.php");
}
$id = (int) $_GET['id'];
if (!empty($_POST) && $id > 0) {
articles_edit($link, $id, $_POST['title'], $_POST['date'], $_POST['content']);
header("Location: index.php");
}
$article = articles_get($link, $id);
include "../views/article_admin.php";
} else {
if ($action == 'delete') {
$id = $_GET['id'];
$article = articles_delete($link, $id);
header("Location: index.php");
} else {
$articles = articles_all($link);
include "../views/articles_admin.php";
}
}
}
示例3: action_list
function action_list()
{
global $link;
$articles = articles_all($link);
require "../views/articles_admin.php";
}
示例4: header
<?php
require_once 'startup.php';
require_once 'model.php';
// кодировку
header('Content-type: text/html; charset=utf-8');
//получаем все статьи
$articles = articles_all();
include 'theme/index.php';
示例5: connect
<?php
include 'model.php';
$connect = connect();
include 'header.php';
$articles = articles_all($connect);
include 'footer.php';
示例6: articles_all
<?php
/* HEADER */
include $_SERVER["DOCUMENT_ROOT"] . "/header.php";
/* MENU */
include $_SERVER["DOCUMENT_ROOT"] . "/menu.php";
?>
<?php
require_once "models/articles.php";
$articles = articles_all($dbcnx);
$articles_img = articles_img($dbcnx);
$date = date("Y-m-d");
$monthes = array(1 => 'янв', 2 => 'фев', 3 => 'мар', 4 => 'апр', 5 => 'мая', 6 => 'июн', 7 => 'июл', 8 => 'авг', 9 => 'сен', 10 => 'окт', 11 => 'ноя', 12 => 'дек');
echo "<br><br><br>";
// echo "<table WIDTH='50%' class='lenta_news'>";
echo "<table WIDTH='50%'>";
echo "<tr><center><img width='400px' style='padding-top:11px' src='img/razrabotka.png' title='Сайт в разработке'></center></tr>";
/*
foreach ($articles as $str):
{
$newdate=date('j '. $monthes[(date('n'))] .' Y', strtotime($str['date']));
//$date_in=date("d.m.Y", strtotime($str['date_in']));
//$date_out=date("d.m.Y", strtotime($str['date_out']));
echo "<tr><td align=left><div class='lenta_title_news'>".$str['title']." | ";
if ($date < $str['date_in'])
{
echo "Акция не началась";
}
示例7: article_delete
<?php
/**
* User: Khupchenko Oleksander
*/
require_once "../content/controllers/models/connect/connect.php";
require_once "models/select_articles.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = "";
}
if ($action == "delete_article") {
$id = $_GET['id'];
$article = article_delete($conn, $id);
header("Location: views/articles_admin.php");
} else {
$articles = articles_all($conn);
include "views/articles_admin.php";
}