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
/
admin
/
View File Name :
manage_institutions_action.php~
<?php //$page_title=enruua("Institutions table: action","Таблица организаций: действие","Таблиця організацій: дія"); //$related_page="manage_institutions.php"; require_once("header.php"); //require("../auth/auth.php"); require("defs_institutions.php"); function setinst_gendata($entry) { global $lang,$_db; //echo "<h2>".enruua("Other data about the institution","Прочие данные об организации","Інші відомості про організацію")."</h2>\n"; echo "<div class=admin_entry>\n"; $res_cou = mysql_db_query($_db,"select TLD,Country_$lang from _countries order by Country_$lang"); echo "<table>\n"; echo "<tr><td>".address_field("country"); echo "<TD STYLE=\"WIDTH: 100%;\">\n"; echo "<SELECT name=\"country\" STYLE=\"WIDTH: 100%;\">\n"; while($entry_cou = mysql_fetch_array($res_cou)) { echo "<option "; if ($entry["country"]==$entry_cou["TLD"]) echo "selected "; echo "value=".$entry_cou["TLD"].">".$entry_cou["Country_$lang"]."</option>\n"; }//list of countries echo "</select>\n"; echo "</td>\n"; echo "<tr><td>".address_field("state"); echo "<td><input type=\"text\" name=\"state\" value=\"".$entry["state"]."\" size=30>\n"; echo "<tr><td>".address_field("postal_code"); echo "<td><input type=\"text\" name=\"postal_code\" value=\"".$entry["postal_code"]."\" size=30>\n"; echo "<tr><td STYLE=\"WIDTH: 100%;\">".address_field("webpage"); echo "<td><input STYLE=\"WIDTH: 100%;\" type=\"text\" name=\"webpage\" value=\"".$entry["webpage"]."\" size=30>\n"; echo "</table>\n"; ?> </div> <? } //gendata function setinstq($entry,$lang_code) { global $lang; if(!$entry) $entry=array(); if($lang!=$lang_code) echo "<div class=admin_entry>"; else echo "<div class=admin_entry_selected>"; echo "\n<table>\n"; echo "<colgroup> <col width=30%*> <col width=70%*> </colgroup>\n"; if ($entry['all_latin']!=="on") { echo "<h2>"; switch ($lang_code) {case "en": echo enruua("Fields in English","Англоязычные поля","Англомовні поля"); break; case "ru": echo enruua("Fields in Russian","Русскоязычные поля","Російськомовні поля"); break; case "ua": echo enruua("Fields in Ukrainian","Украиноязычные поля","Україномовні поля"); break; default: echo "Invalid lang_code=".$langcode."!"; break; } echo "</h2>\n"; } echo "<tr><td>".address_field("name_$lang_code"); echo "<TD><input style=\"width: 100%;\" type=\"text\" name=\"name_$lang_code\" value=\"".$entry["name_$lang_code"]."\" size=60%>\n"; echo "<tr><td>".address_field("name_gen_$lang_code"); echo "<TD><input style=\"width: 100%;\" type=\"text\" name=\"name_gen_$lang_code\" value=\"".$entry["name_gen_$lang_code"]."\"size=60%>\n"; echo "<tr><td>".address_field("street_$lang_code"); echo "<TD><input style=\"width: 100%;\" type=\"text\" name=\"street_$lang_code\" value=\"".$entry["street_$lang_code"]."\" size=60%>\n"; echo "<tr><td>".address_field("city_$lang_code"); echo "<tD><input style=\"width: 100%;\" type=\"text\" name=\"city_$lang_code\" value=\"".$entry["city_$lang_code"]."\" size=60%>\n"; echo "</table>\n"; if($lang==$lang_code) { $a = remaining_languages(); $w=""; while (list($key,$val) = each($a) ) { //echo "a($key)=".$a[$key]; if ($w) $w=$w." ".enruua("and","и","та")." "; $w= $w.enruua_var($a[$key],enruua("English-language","англоязычной","англомовної"), enruua("Russian-language","русскоязычной","російськомовної"), enruua("Ukrainian-language","украиноязычной","україномовної")); }//while echo admin_note(enruua("The contents of this form will fill the corresponding entries of the remaining two forms ($w) if they will be left empty","Если оставить поля двух оставшихся форм ($w) пустыми, они заполнятся данными из этой формы", "Якщо лишити порожніми поля інших двох форм ($w), вони заповнятся даними, що введені в цю форму")."."); } // echo "</div>\n"; } // setinstq function setinstq_new($entry,$lang_code) { global $lang; global $Columns; echo "<h2>"; switch ($lang_code) {case "en": echo enruua("Fields in English","Англоязычные поля","Англомовні поля"); break; case "ru": echo enruua("Fields in Russian","Русскоязычные поля","Російськомовні поля"); break; case "ua": echo enruua("Fields in Ukrainian","Украиноязычные поля","Україномовні поля"); break; default: echo "Invalid lang_code=".$langcode."!"; break; } echo "</h2>"; echo "<div class=admin_entry><table>"; echo "<tr><td>".address_field("name_$lang_code"); echo "<tD><input type=\"text\" name=\"name_$lang_code\" value=\"\" size=20>\n"; echo "</table>"; //echo "</DL>"; echo "</div>"; } // authorq_new function person_checked($code) { $res[0]=$res[1]=$res[2]=$res[3]=$res[4]=""; if ($code<=4 && $code>=0 ) $res[$code] = "CHECKED"; return $res; }//checked echo "<body>"; if(!$db_handle) $db_handle = mysql_connect($_db_host, $_db_user, $_db_password); mysql_db_query($_db,"SET NAMES $_charset"); //$NB_mandatory="<p align=right>N.  B. Символ \"<code>*</code>\" означает обязательное поле.</p>"; //$mandatory_colour="blue"; $todo = take_variable("todo"); switch ($todo) { case "add": echo "<h1>".enruua("New record in the institutions table", "Новая запись в таблице организаций","Новий запис в таблиці організацій")."</h1>\n"; print("<form method=\"post\" action=\"update_institutions.php\" onsubmit=\"return confirm('" . enruua("Are you sure","Вы уверены","Ви впевнені")."?"."');\">"); // setinst_gendata(NULL); echo "<div class=admin_main>\n"; echo "<input type=checkbox name=all_latin onclick=\"this.form.submit();\""; if ($entry['all_latin']=="on") echo " checked"; echo "> ".enruua("All the data are in the Latin letters", "Все данные в латинице","Всі дані латинкою")."</input>\n"; echo "</p>\n"; if ($entry['all_latin']!=="on") { echo "<h2>".enruua("Data to be given in three languages","Данные, вводимые на трех языках", "Дані, що вводяться трьома мовами")."</h2>\n"; setinstq(NULL,"ru"); setinstq(NULL,"ua"); } setinstq(NULL,"en"); echo final_question("todo_selected", array("add" => enruua("Insert this record","Вставить эту запись","Вставити цей запис"), "cancel"=>enruua("Add a new empty recored","Не делать ничего","Не робити нічого") ), "add","manage_institutions.php"); /* echo "<div class=control> <p align=center>"; echo "<input type=hidden name=todo_selected value=add>"; print("<input type=\"submit\" value=\"".enruua("Insert the record","Вставить запись","Вставити запис")."\">\n"); */ echo pass("lang",$lang); print("</form>\n"); //add break; case "addcopy": echo "<h1>".enruua("New record in the author table","Новая запись в таблице авторов", "Новий запис в таблиці авторів")."</h1>\n"; echo"<p><i>(".enruua("the fields are filled in according to the template", "поля заполнены согласно выделенному шаблону", "поля заповнено за виділеним шаблоном").")</i></p>\n"; $id_selected = take_variable("id_selected"); //$lang = take_variable("lang"); $res = mysql_db_query($_db,"select * from Institutions where id='".$id_selected."' order by name_$lang,city_$lang"); if(!$res) die(mysql_error()); mysql_free_result; while($entry = mysql_fetch_array($res)) { print("<form action=\"update_institutions.php\" method=\"POST\">\n"); setinst_gendata($entry); echo "<div class=admin_main>\n"; echo "<input type=checkbox name=all_latin onclick=\"this.form.submit();\""; if ($entry['all_latin']=="on") echo " checked"; echo "> ".enruua("All the data are in the Latin letters", "Все данные в латинице","Всі дані латинкою")."</input>\n"; echo "</p>\n"; if ($entry['all_latin']!=="on") { setinstq($entry,"ru"); setinstq($entry,"ua"); } setinstq($entry,"en"); echo final_question("todo_selected", array("add" => enruua("Insert this record","Вставить эту запись","Вставити цей запис"), "cancel"=>enruua("Add a new empty recored","Не делать ничего","Не робити нічого") ), "add","manage_institutions.php"); echo pass("lang",$lang); print("</form>\n"); } //addcopy break; case "modify": $id_selected = take_variable("id_selected"); $res = mysql_db_query($_db,"select * from Institutions where id='".$id_selected."' order by name_$lang, city_$lang"); if(!$res) die(mysql_error()); //mysql_free_result; while($entry = mysql_fetch_array($res)) { echo " <h1>".enruua("Institutions table: Record","Таблица организаций: запись", "Таблиця організацій: запис")." ".number()." ".$entry["id"]."</h1>\n"; echo "<p>".card_created_updated($entry,$db_handle); echo "</p>\n"; echo "<form method=\"POST\" action=\"update_institutions.php\" onsubmit=\"return confirm('" . enruua("Are you sure","Вы уверены","Ви впевнені")."?"."');\">\n"; setinst_gendata($entry); echo "<div class=admin_main>\n"; echo "<input type=checkbox name=all_latin onclick=\"this.form.submit();\""; if ($entry['all_latin']=="on") echo " checked"; echo "> ".enruua("All the data are in the Latin letters", "Все данные в латинице","Всі дані латинкою")."</input>\n"; echo "</p>\n"; if ($entry['all_latin']!=="on") { echo "<h2>".enruua("Data to be given in three languages","Данные, вводимые на трех языках", "Дані, що вводяться трьома мовами")."</h2>\n"; setinstq($entry,"ru"); setinstq($entry,"ua"); } setinstq($entry,"en"); //next($entry); echo "</div>\n"; echo final_question("todo_selected", array("update" => enruua("Update this record","Сохранить сделанные изменения","Зберегти зроблені зміни"), "erase"=>enruua("Erase this record","Стереть эту запись","Стерти цей запис")), "update",manage_institutions()); echo pass("lang",$lang); echo pass("id_selected",$id_selected); echo "</form>\n"; } //end modify switch break; default: tell(enruua("Nothing to do","Нечего делать","Нема чого робити")."!"); go(manage_institutions()); } require("footer.php"); ?>