new archive

This commit is contained in:
arlemp@selectel.ru
2021-11-21 22:00:02 +03:00
parent 65816f81e7
commit 0d9ff217ad
5 changed files with 82 additions and 17 deletions

View File

@@ -1,6 +1,8 @@
<?php
function number_pdf($title){
function number_info($title){
$res = [];
$items = explode(' ', $title);
$number = substr($items[2], 1, strlen($items[2]) - 2);
@@ -10,10 +12,12 @@ function number_pdf($title){
$findpdf = db_get("SELECT * FROM `wp_posts` WHERE `post_name` = '$name' ORDER BY `post_modified` DESC LIMIT 1");
if (isset($findpdf ['guid']))
return $findpdf ['guid'];
if (isset($findpdf ['guid'])){
$res['guid'] = $findpdf['guid'];
$res['year'] = $items[4];
}
return '';
return $res;
}