Пример #1
0
<!DOCTYPE html>
<?php 
require_once "database.php";
require_once "models/functions.php";
$link = db_connect();
$participants = part_all($link);
?>
<html>
	<head>
		<meta charset="utf-8">
		<title>IntellArt - Городской конкурс мультимедиа проектов - Участники</title>
		<!--[if lt IE 9]>
		<script>
			var e = ("article,aside,figcaption,figure,footer,header,hgroup,nav,section,time").split(',');
			for (var i = 0; i < e.length; i++) 
			{
			document.createElement(e[i]);
			}
		</script>
		<![endif]-->
		<link rel="icon" type="image/png" href="image/favicon.png">
		<link rel="stylesheet" href="style.css">
		<link rel="stylesheet" href="about.css">
	</head>
	<body class='background'>
		<header>
		<a href='index.php'><img class='icon' src='image/logo.png'></a>
        </header>
		<nav>
			<ul class='dropdown'>
				<li class='dropdown-top'>
<!DOCTYPE html>
<?php 
require_once "../database.php";
require_once "../models/functions.php";
$link = db_connect();
$part = part_all($link);
if (isset($_GET['action'])) {
    $action = $_GET['action'];
} else {
    $action = "";
}
if ($action == "add") {
    if (!empty($_POST)) {
        news_add($link, $_POST['title'], $_POST['content'], $_FILES['icon']);
        header("Location: admin_news.php");
    }
} else {
    if ($action == "delete") {
        $id = $_GET['id'];
        $article = news_delete($link, $id);
        header("Location: admin_news.php");
    }
}
?>
<html>
<head>
	<title>Административная консоль - Участники</title>
	<meta charset="utf-8">
	<link rel="shortcut icon" href="favicon.png" type="image/png">
	<link rel='stylesheet' href='style.css'>
</head>