mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-30 11:19:22 +02:00
36 lines
537 B
PHP
36 lines
537 B
PHP
<?php
|
|
|
|
function getItemNameById($id) {
|
|
|
|
$item_list = explode(PHP_EOL, file_get_contents('item_list.txt'));
|
|
|
|
foreach ($item_list as $items) {
|
|
|
|
$item_array = explode('@', $items);
|
|
|
|
if ($item_array[0] == $id) {
|
|
|
|
echo ucfirst($item_array[1]);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
function getItemIdByName($name) {
|
|
|
|
$item_list = explode(PHP_EOL, file_get_contents('item_list.txt'));
|
|
|
|
foreach ($item_list as $items) {
|
|
|
|
$item_array = explode('@', $items);
|
|
|
|
if ($item_array[1] == $name) {
|
|
|
|
echo ucfirst($item_array[0]);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
|