One Hat Cyber Team
Your IP :
216.73.216.24
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
/
nosc
/
public_html
/
View File Name :
defs.php
<? $and="and"; $language_labels_meaning = array ("In English" => "en", "По-русски" => "ru", "Українською" => "ua"); $main_topics = array("general_info" => enruua("General", "Главная", "Головна"), "editorial_board" => enruua("Editors","Редколлегия", "Редколегія"), "contents" => enruua("Contents","Содержание", "Зміст"), "rules" => enruua("Rules","Правила","Правила"), "scope" => enruua("Scope", "Тематика", "Тематика"), "contacts" => enruua("Contacts","Контакты","Контакти"), "forthcoming" => enruua("Forthcoming", "Ожидается", "Очікується"), "portfeuille" => enruua("Portfolio", "Портфель", "Портфель"), "search" => enruua("Search", "Поиск", "Пошук"), "subscription" => enruua("Subscription","Подписка","Передплата"), "publisher" => enruua("Translation","Перевод", "Переклад"), // "news" => enruua("News","Новости", "Новини"), //"about" => enruua("About","О странице","Про цю сторінку") ); //----------- function sc_word_big($word) { $first=substr($word,0,1); $first="<BIG>".$first."</BIG>"; if (strlen($word) >=2 ) $last = substr($word,1,strlen($word)); else $last=""; return $first.strtoupper($last); } function sc($word) { return trim("<SPAN CLASS=SC>".$word."</SPAN>"); } function sc_manual($word) { $first=strtoupper(substr($word,0,1)); if (ucfirst($word) != $word) $first="<SMALL>".$first."</SMALL>"; if (strlen($word) >=2 ) $last = substr($word,1,strlen($word)); else $last=""; return $first."<SMALL>".strtoupper($last)."</SMALL>"; } //sc_word function sc_string($string) { $delimiters[]=","; $delimiters[]=" "; $delimiters[]=";"; $result = $string; $no_delims=1; while ($delim = current($delimiters)) { if ($pieces = split($delim, $result,255) ) { //pieces // echo "[$delim=empty]"; $no_delims=0; while ( list($key, $piece) = each($pieces) ) { $peices[$key] = "[".sc_word($piece)."]"; }//`sc'-ize words $result = implode($pieces, $delim); }//pieces next($delimiters); } //while delim if ($no_delims) $result=sc_word($result); // considering as a single word return $result; } //sc function em($string) {return "<EM>".$string."</EM>";} function it($string) {return "<I>".$string."</I>";} function bf($string) {return "<B>".$string."</B>";} function big($string) {return "<BIG>".$string."</BIG>";} //admin //authors function get_authors($article_id) { global $database,$lang; $fetch_these_authors = mysql_db_query($database, "SELECT Authors.id, Authors.last_name, Authors.first_name, Authors.middle_name FROM AA LEFT JOIN Authors ON AA.author_id=Authors.id WHERE AA.article_id='$article_id' ORDER BY AA.author_ambition"); $authors=""; //$how_many_authors=0; while($these_authors = mysql_fetch_array($fetch_these_authors)) { // $how_many_authors++; $authors=$authors."<a href=author_card.php?lanf=$lang&author_id=$these_authors[id]>".sc($these_authors[first_name]); if ($these_authors[middle_name]) $authors=$authors." ".sc($these_authors[middle_name]); if ($these_authors[last_name]) $authors=$authors." ".sc($these_authors[last_name]); $authors = $authors."</a>, "; } //these_authors //echo "[Total $how_many_authors authors]<br>"; return $authors = substr($authors,0,-2); // remove ", " at the end }//function get_authors function paper_reference($article_id,$newname="") { global $database, $lang; $reference=""; $fetch_paper_data = mysql_db_query($database,"select id, title_$lang,status, published_volume, published_number, published_page_start, published_page_end from Articles where id='$article_id' "); if ($paper = mysql_fetch_array($fetch_paper_data)) //should be the only entry { //$reference = $reference."<span class=author_name>".get_short_authors($article_id)."</span>, <I>"; $reference = $reference."".get_short_authors($article_id)."".", <I>"; if ($newname) $reference=$reference.$newname; else $reference = $reference.$paper["title_$lang"]; $reference = $reference."</i>, "; switch ($paper["status"]) { case "published": $reference=$reference." ".publ_link($lang)." <B><a href=contents.php?volume=$paper[published_volume]&lang=$lang#volume>$paper[published_volume]</a></B>"; $reference=$reference." (".year_of_publication($paper[published_volume])."),"; $reference=$reference." No. <a href=contents.php?volume=$paper[published_volume]&number=$paper[published_number]&lang=$lang#number>$paper[published_number]</a>, $paper[published_page_start]-$paper[published_page_end]."; break; case "accepted": $reference=$reference." ".enruua("to appear","в печати","в друці")."."; break; } //switch } // entry if (check_admin()) $reference=$reference." ".article_edit_button($paper[id]); return $reference; }//paper_reference function article_edit_button($id) {global $lang; $reference="<a class=button_edit "; $reference=$reference."href=admin/manage_articles_action.php?id_selected=".$id."&todo=modify&lang=$lang>".enruua("Edit", "Редактировать","Редагувати")."</a>"; return $reference; }//article_edit_button function paper_partial_reference($article_id) { global $database, $lang; $reference=""; $fetch_paper_data = mysql_db_query($database,"select id, title_$lang, published_volume, published_number, published_page_start, published_page_end from Articles where id='$article_id' "); if ($paper = mysql_fetch_array($fetch_paper_data)) //should be the only entry { $reference = $reference."".get_short_authors($article_id).":"; $reference = $reference."<p style=\"margin-left: 2em; margin-top: 10px;\">".$paper["title_$lang"]; } // entry return $reference; }//paper_partial_reference function long_name($author_id) //untested! { global $database,$lang; $fetch_author = mysql_db_query($database, "SELECT id, first_name_$lang, middle_name_$lang, last_name_$lang, short_name_$lang from Authors where id='$author_id'"); while ($entry=mysql_fetch_array($fetch_author)) { $name = "<a href=index.php?menu_item=author_card&author_id=$entry[id]>"; $name = $name.$entry["first_name_$lang"]." "; if ($entry["middle_name_$lang"]) $name = $name.substr($entry["middle_name_$lang"],0,1).". "; if ($entry["last_name_$lang"]) $name = $name.$entry["last_name_$lang"]; $name=$name."</a>"; }//while return trim($name); } //long_name function short_name($author_id) { global $database; $fetch_author = mysql_db_query($database, "SELECT id, first_name_$lang, middle_name_$lang, last_name_$lang, short_name_$lang from Authors where id='$author_id'"); while ($entry=mysql_fetch_array($fetch_author)) { if ($entry["short_name_$lang"]) $name=$entry["short_name_$lang"]; else { // no explicit short_name $name = utf8_substr($entry["first_name_$lang"],0,1).". "; if ($entry["middle_name_$lang"]) $name = $name.utf8_substr($entry["middle_name_$lang"],0,1).". "; if ($entry["last_name_$lang"]) $name = $name.$entry["last_name_$lang"]; } }//while return trim($name); } //short_name function short_name_link($author_id) { global $database, $lang; $fetch_author = mysql_db_query($database, "SELECT id, first_name_$lang, middle_name_$lang, last_name_$lang, short_name_$lang from Authors where id='$author_id'"); while ($entry=mysql_fetch_array($fetch_author)) { $name = "<a href=author_card.php?author_id=".$entry[id]."&where=main&lang=".$lang."#main>"; if ($entry["short_name_$lang"]) $name=$name.str_replace(" "," ",$entry["short_name_$lang"]); else { // no explicit short_name $name = $name.utf8_substr($entry["first_name_$lang"],0,1).". "; // if ($entry["middle_name_$lang"]) $name = $name.utf8_substr($entry["middle_name_$lang"],0,1).". "; // if ($entry["last_name_$lang"]) $name = $name.$entry["last_name_$lang"]; } }//while $name=$name."</a>"; // $t = "short_name_$lang"; //$name= $t.":".$entry["$t"]; return trim($name); } //short_name_link function get_short_authors($article_id) { global $database, $lang; $fetch_these_authors = mysql_db_query($database, "SELECT Authors.id, Authors.last_name_$lang, Authors.first_name_$lang, Authors.middle_name_$lang, Authors.short_name_$lang FROM AA LEFT JOIN Authors ON AA.author_id=Authors.id WHERE AA.article_id='$article_id' ORDER BY AA.author_ambition"); $authors=""; //$how_many_authors=0; while($these_authors = mysql_fetch_array($fetch_these_authors)) { // $how_many_authors++; $authors=$authors.short_name_link($these_authors[id]).", "; } //these_authors //echo "[Total $how_many_authors authors]<br>"; return $authors = substr($authors,0,-2); // remove ", " at the end }//function get_short_authors /* function tex_decode_accented($string) { $string = ereg_replace( "\'A", "Á", $string ); $string = ereg_replace( "\'{A}", "Á", $string ); $string = ereg_replace( "\`A", "Á", $string ); $string = ereg_replace( "\`{A}", "Á", $string ); $string = ereg_replace( "\^{A}", "Â", $string ); $string = ereg_replace( "\^A", "Â", $string ); $string = ereg_replace( "\"A", "Ä", $string ); $string = ereg_replace( "\"{A}", "Ä", $string ); $string = ereg_replace( "\o{A}", "Å", $string ); }//function tex_decode_accented($string) */ ?>