eval("\$url=\"{$webdb['bencandy_filename2']}\";"); header("location:{$webdb['www_url']}/{$url}"); exit; } elseif ($webdb[NewsMakeHtml] == 1) { //真静态 $detail = get_html_url(); if (is_file(ROOT_PATH . $detail[_showurl])) { header("location:{$detail['showurl']}"); exit; } } } /** *文章检查 **/ check_article($rsdb); //统计点击次数 $db->query("UPDATE {$pre}article{$erp} SET hits=hits+1,lastview='{$timestamp}' WHERE aid='{$aid}'"); //SEO $titleDB[title] = filtrate(strip_tags("{$rsdb['title']} - {$fidDB['name']} - {$webdb['webname']}")); $titleDB[keywords] = filtrate($rsdb[keywords]); $rsdb[description] || ($rsdb[description] = get_word(preg_replace("/(<([^<]+)>|\t| |\n)/is", "", $rsdb[content]), 250)); $titleDB[description] = filtrate($rsdb[description]); //文章风格 $STYLE = $rsdb[style] ? $rsdb[style] : ($fidDB[style] ? $fidDB[style] : $STYLE); //相关栏目名称模板 if (is_file(html("{$webdb['SideSortStyle']}"))) { $sortnameTPL = html("{$webdb['SideSortStyle']}"); } else { $sortnameTPL = html("side_sort/0"); }
<?php include_once 'header.inc.php'; if (isset($_COOKIE['Username'])) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { require_once 'ReviewArticleEditFunctions.inc.php'; require_once 'Connection.php'; list($check, $data) = check_article($dbc, $_POST['Title'], $_POST['SelectGameName'], $_POST['Score'], $_FILES['CoverUpload'], $_FILES['BackgroundUpload'], $_POST['ReleaseDateEU'], $_POST['ReleaseDateUS'], $_POST['Consoles'], $_POST['SelectDevelopers'], $_POST['SelectPublishers'], $_POST['Genre'], $_POST['Body'], $_POST['COVloc'], $_POST['BGRloc']); if ($check) { if (isset($_POST['save'])) { header('Location: ReviewArticle.save.php'); } else { if (isset($_POST['publish'])) { header('Location: ReviewArticleAccept.php'); } else { if (isset($_POST['cancel'])) { header('Location: ReviewArticle.cancel.php'); } else { header('Location: index.php'); } } } } else { $errors = $data; } } include 'ReviewArticleEditPage.inc.php'; } else { echo '<html> <head> <title></title>
<?php error_reporting(0); include_once 'header.inc.php'; if (isset($_COOKIE['Username'])) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { require_once 'WriteArticleFunctions.inc.php'; require_once 'Connection.php'; list($check, $data) = check_article($dbc, $_POST['Title'], $_POST['Score'], $_FILES['CoverUpload'], $_FILES['BackgroundUpload'], $_POST['ReleaseDateEU'], $_POST['ReleaseDateUS'], $_POST['Consoles'], $_POST['Genre'], $_POST['Body']); if ($check) { header('Location: ArticleWritten.php'); } else { $errors = $data; } } include 'WriteArticlePage.inc.php'; } else { echo '<html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="CSS-JS/Main.css" /> </head> <body>'; require_once 'Connection.php'; $i = 0; $q = "SELECT * FROM articles ORDER BY CreationDate DESC LIMIT 1"; $r = mysqli_query($dbc, $q); $row = mysqli_fetch_array($r, MYSQLI_NUM); echo '<img id="Background" src="' . $row[4] . '"/> <div id="WriteArticle">
<?php require_once 'common.php'; require_once 'models/edit_news_translation.model.php'; $article_id = $_GET['article']; $lang_id = $_GET['lang']; $article = get_article($article_id, $lang_id); $article = $article[0]; if ($article_id && $lang_id && $_POST) { $title = $_POST['title']; $addedby = $_POST['name']; $full_text = $_POST['article']; $lang = get_lang_by_name($lang_id); $data = array('title' => $title, 'addedby' => $addedby, 'full_text' => $full_text, 'article_id' => $article_id, 'lang_id' => $lang); $present = check_article($data); if ($present) { update_article($data); } else { set_article($data); } header('Location: edit_news_translation.php?article=' . $article_id . '&lang=' . $lang_id); } require_once 'templates/edit_news_translation.php';
/** *fomction qui va nous permettre d'affiche les articles */ function print_article() { $articles = check_article(); foreach ($articles as $article) { echo '<option value="' . $article['reference'] . '">' . $article['description'] . '</option>'; } }