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
/
Edit File:
update_institutions.php
<? $page_title="Manage institutions table: action performed"; $related_page="manage_institutions.php"; require("../login/include/session.php"); require_once("header.php"); require_once("../auth/auth.php"); require_once("functions_admin.php"); require("defs_institutions.php"); $lang = $_POST['lang']; $_updcols = fields_to_update("institution");/* array ("name_ua","name_ru","name_en", "name_gen_ua","name_gen_ru","name_gen_en", "street_ua","street_ru","street_en", "city_ua","city_ru","city_en", "country","state","postal_code","webpage", "updated","updated_by");*/ if (!$db_handle) {$db_handle = mysql_connect($_db_host, $_db_user, $_db_password); } mysql_db_query($_db,"SET NAMES $_charset"); $todo_selected = take_variable("todo_selected"); $id_selected = take_variable("id_selected"); switch ($todo_selected) { case "add": case "addcopy": foreach ($_updcols as $val) { ${$val}=htmlspecialchars(take_variable($val,"POST"),ENT_QUOTES); //${$val}=mysql_real_escape_string(${$val}); /*if (isset(${$val})) { if ($command) { $command=$command.","; } $command=$command."$val='${$val}'"; }*/ } fill_var_enruua("name"); fill_var_enruua("name_gen"); fill_var_enruua("street"); fill_var_enruua("city"); fill_var_enruua("country"); $state=trim($_POST["state"]); $postal_code=trim($_POST["postal_code"]); $webpage=trim($_POST["webpage"]); /*$w = koi2transl(${"name_".$lang}.${"name_gen_".$lang}); $soundex=soundex($w); */ $res = mysql_db_query($_db,"insert into Institutions (name_en,name_ru,name_ua, name_gen_en,name_gen_ru,name_gen_ua, street_en,street_ru,street_ua, city_en,city_ru,city_ua, state, postal_code, country, webpage,created,created_by) values ('$name_en', '$name_ru','$name_ua', '$name_gen_en', '$name_gen_ru','$name_gen_ua', '$street_en','$street_ru','$street_ua', '$city_en','$city_ru','$city_ua', '$state', '$postal_code', '$country', '$webpage',now(),'".$session->author_id."' )"); if ($res) { $id=mysql_insert_id(); tell(enruua("By your request, I have created in the institutions table a new card with number", "По Вашему запросу в таблице организаций создана новая карточка с номером", "За Вашим бажанням в таблиці організацій створено нову картку з номером")." ".$id ."".enruua("","","").". " .enruua("You will now be redirected to that card's modification page", "Сейчас будет открыта страница редактирования этой карточки", "Зараз буде відкрито сторінку редагування цієї картки")); go(institution_edit_page($id)); } else { tell(enruua("Errors have happened when inserting a new record", "При создании новой карточки в таблице статей возникли ошибки", "При створенні нової картки в таблиці статей виникли помилки")."!"); go(manage_institutions()); } // header("Location: ".institution_edit_page(mysql_insert_id())); break; case "update": $inst = institution($id_selected); foreach ($_updcols as $val) { ${$val}=htmlspecialchars(take_variable($val,"POST"),ENT_QUOTES); //${$val}=mysql_real_escape_string(${$val}); /*if (isset(${$val})) { if ($command) { $command=$command.","; } $command=$command."$val='${$val}'"; }*/ } if ($inst['all_latin']) { fill_var_enruua("name","trim","en"); fill_var_enruua("name_gen","trim","en"); fill_var_enruua("street","trim","en"); fill_var_enruua("city","trim","en"); } else { fill_var_enruua("name"); fill_var_enruua("name_gen"); fill_var_enruua("street"); fill_var_enruua("city"); } //echo "session->author_id=".$session->author_id.", id_selected=$_POST['id_selected']"; $state=trim($state); $postal_code=trim($postal_code); $webpage=trim($webpage); $res = mysql_db_query($_db, "update Institutions set " . _set_by_name("institution","",$session->author_id) . " where id='".$_POST['id_selected']."'"); if (mysql_affected_rows()) { tell(enruua("The record corresponding to Institution","Карточка организации","Картка організації") ."" ." ".$_POST['id_selected']." ".enruua("has been successfully updated","успешно обновлена","успішно оновлено")."."); } else { tell(enruua("The record corresponding to Institution","Карточку организации","Картка організації") ."" ." ".$_POST['id_selected']." ".enruua("could not be updated","обновить не удалось","оновити не вдалося")."!"); } go("manage_institutions_action.php",array("id_selected","todo"),array($_POST['id_selected'],"modify")); // post_redirect("manage_institutions_action.php","id_selected=".$_POST['id_selected']); break; case "erase": $resa = mysql_db_query($_db, "update Authors set institution='0' where institution='".$_POST['id_selected']."'"); $resi = mysql_db_query($_db, "delete from Institutions where id='".$_POST['id_selected']."'"); if ($resi) { tell(enruua("The record corresponding to Institution","Карточка организации","Картка організації") ."" ." ".$_POST['id_selected']." ".enruua("has been successfully deleted","успешно удалена","успішно видалено")."."); } else { tell(enruua("Errors have happened when deleting the record for Institution", "При удалении карточки организации","При видаленні картки організації") ."" ." ".$_POST['id_selected']." ".enruua("","возникли ошибки","виникли помилки")."!"); } go(manage_institutions()); break; default: tell(enruua("Nothing to do", "Нечего делать","Нема чого робити") ."" ." ".$_POST['id_selected']." ".enruua("","возникли ошибки","виникли помилки")."!"); go(manage_institutions()); }//switch require("footer.php"); ?>
Simpan