One Hat Cyber Team
Your IP :
216.73.216.115
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
vo
/
mfat
/
Edit File:
getit-art
#!/usr/bin/php <? $m = mysqli_connect('localhost','umzh1','7qqRQQ555','umzh1'); mysqli_query($m, "set character_set_results='utf8'"); mysqli_query($m, "SET NAMES 'utf8'"); mysqli_query($m, "SET CHARACTER SET utf8"); mysqli_query($m, "SET SESSION collation_connection = 'utf8_unicode_ci'"); $paperType = "R"; // N - new, R - in review <----------------------------------------------- $sql = "select * from articles where article_status='$paperType' and article_print='N'"; $sql = $sql . " and article_id > 10900 and article_id < 11121"; //<------------------------------------------------ // echo $sql; $res = mysqli_query($m, $sql); $out = new DOMDocument; $out->formatOutput = true; while ($row = mysqli_fetch_assoc($res)) { // print_r($row); // Create article $article = $out->createElement('article'); $article->setAttribute("locale", "en_US"); $article->setAttribute("section_ref", "1"); $article->setAttribute("stage", "submission"); $out->appendChild($article); // Title is the same for all locales $title_ua = $out->createElement('title'); $title_ua->setAttribute('locale','uk_UA'); $title_ua->nodeValue = $row['article_name_ua']; $article->appendChild($title_ua); $title_en = $out->createElement('title'); $title_en->setAttribute('locale','en_US'); $title_en->nodeValue = $row['article_name_ua']; $article->appendChild($title_en); // Add empty but not null abstract $abstract_ua = $out->createElement('abstract'); $abstract_ua->setAttribute('locale','uk_UA'); $abstract_ua->nodeValue = ''; $article->appendChild($abstract_ua); $abstract_en = $out->createElement('abstract'); $abstract_en->setAttribute('locale','en_US'); $abstract_en->nodeValue = ''; $article->appendChild($abstract_en); // Authors $authors = $out->createElement('authors'); // First author is primary $author = $out->createElement('author'); $author->setAttribute('primary_contact','true'); $firstname = $out->createElement('firstname'); $firstname->setAttribute('locale','uk_UA'); $firstname->nodeValue = ''; //<----------------------------------------- $author->appendChild($firstname); $firstname = $out->createElement('firstname'); $firstname->setAttribute('locale','en_US'); $firstname->nodeValue = ''; //<----------------------------------------- $author->appendChild($firstname); $lastname = $out->createElement('lastname'); $lastname->setAttribute('locale','uk_UA'); $lastname->nodeValue = $row['article_main_author']; //<----------------------------------------- $author->appendChild($lastname); $lastname = $out->createElement('lastname'); $lastname->setAttribute('locale','en_US'); $lastname->nodeValue = $row['article_main_author']; //<----------------------------------------- $author->appendChild($lastname); $authors->appendChild($author); $email = $out->createElement('email'); $email->nodeValue = $row['article_main_author_email']; $author->appendChild($email); // Second author contains all names // $author = $out->createElement('author'); // $author->setAttribute('primary_contact','false'); // $firstname = $out->createElement('firstname'); // $firstname->setAttribute('locale','uk_UA'); // $firstname->nodeValue = ''; //<----------------------------------------- // $author->appendChild($firstname); // $firstname = $out->createElement('firstname'); // $firstname->setAttribute('locale','en_US'); // $firstname->nodeValue = ''; //<----------------------------------------- // $author->appendChild($firstname); // // $lastname = $out->createElement('lastname'); // $lastname->setAttribute('locale','uk_UA'); // $lastname->nodeValue = $row['article_author_ua']; //<----------------------------------------- // $author->appendChild($lastname); // $lastname = $out->createElement('lastname'); // $lastname->setAttribute('locale','en_US'); // $lastname->nodeValue = $row['article_author_ua']; //<----------------------------------------- // $author->appendChild($lastname); // $authors->appendChild($author); // // $email = $out->createElement('email'); // $email->nodeValue = 'nobody@nowhere.net'; // $author->appendChild($email); // $authors->appendChild($author); $article->appendChild($authors); // Article id $id = $out->createElement('id'); $id->nodeValue = $row['article_id']; $article->appendChild($id); // Date $date = $row['article_date']; list($year, $month, $day) = explode('-', $date); // File contents $basepath = '/var/www/vhost/umj/admin-editor/submit-pdf/'; $dirpath = $basepath . $year . '/' . $month . '/'; $files = glob($dirpath . 'aticle' . $row['article_id'] .'*.pdf'); $revision = 1; foreach($files as $path){ $filename = basename($path); $size = filesize($path); $contents = file_get_contents($path); $submission = $out->createElement('submission_file'); $submission->setAttribute('filename', $filename); $submission->setAttribute('date_uploaded', $date); $submission->setAttribute('filesize', $size); $submission->setAttribute('revision', $revision); $name = $out->createElement('name'); $name->setAttribute('locale', 'uk_UA'); $name->nodeValue = 'Імпортовано: ' . $filename; $submission->appendChild($name); $name = $out->createElement('name'); $name->setAttribute('locale', 'en_US'); $name->nodeValue = 'Imported: ' . $filename; $submission->appendChild($name); $embed = $out->createElement('embed'); $embed->setAttribute('encoding', 'base64'); $embed->nodeValue = base64_encode($contents); $submission->appendChild($embed); $article->appendChild($submission); $revision++; } // Assigned editor $editor = $out->createElement('editor'); $editor->nodeValue = $row['article_managing_editor']; if($row['article_managing_editor']){ $article->appendChild($editor); } // Various notes // Id $note = $out->createElement('note'); $note->setAttribute('title', 'Реєстраційний №'); $paperId = $row['article_id']; $link = '<a href="http://umj.imath.kiev.ua/admin-editor/articles/index.php?type=1'; $link .= '&item=' . $paperType . '&id=' . $paperId . '">'; $link .= $date . '-' . $paperId; $link .= '</a>'; //echo $link; die; $note->nodeValue = urlencode($link); $article->appendChild($note); // Selected by author $note = $out->createElement('note'); $note->setAttribute('title', 'Вибраний автором редактор'); $note->nodeValue = $row['article_editor_selected']; if($row['article_editor_selected']){ $article->appendChild($note); } // Author comments $note = $out->createElement('note'); $note->setAttribute('title', 'Коментарі автора'); $note->nodeValue = htmlspecialchars($row['article_comments']); if($row['article_comments']){ $article->appendChild($note); } // Forward to editor $note = $out->createElement('note'); $note->setAttribute('title', 'Порадити іншого редактора'); $note->nodeValue = $row['article_other_editor']; if($row['article_other_editor']){ $article->appendChild($note); } // Editor comments $note = $out->createElement('note'); $note->setAttribute('title', 'Коментарі відповідального редактора'); $note->nodeValue = $row['article_managing_editor_comments']; if($row['article_managing_editor_comments']){ $article->appendChild($note); } // Assign reviewer $note = $out->createElement('note'); $note->setAttribute('title', 'Рекомендовано рецензента'); $note->nodeValue = $row['article_recommend_reviewer']; if($row['article_recommend_reviewer']){ $article->appendChild($note); } // Editor comments $note = $out->createElement('note'); $note->setAttribute('title', 'Коментарі редакції'); $note->nodeValue = $row['article_referee_comments']; if($row['article_referee_comments']){ $article->appendChild($note); } } echo $out->saveXML(); ?>
Simpan