@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux www.thesweb.ru 4.19.0-22-amd64 #1 SMP Debian 4.19.260-1 (2022-09-29) x86_64
Current Path :
/
var
/
www
/
www-root
/
data
/
www
/
new.labinform.ru
/
free_thes
/
Path :
Upload File :
New :
File
Dir
/var/www/www-root/data/www/new.labinform.ru/free_thes/edit_syn_form.php
<? include_once "login.php"; if ($usr_id == -1) { header('HTTP/1.0 401 Unauthorized'); die(); } if ($_SESSION[LoginURI]['usertypeid'] == 30) { header('HTTP/1.0 401 Unauthorized'); die(); } $langid = 10; if (isset($_GET['langid'])) $langid = $_GET['langid']; $te = null; $ss_add = ''; $ss_edit = ''; if (isset($_GET['textentryid'])) { if ($langid == 20) $q = "SELECT textentryid, textentrystr, lementrystr, isarguable, isambig, languageid, sessionident, sessionid FROM e_texent WHERE textentryid=" . $_GET['textentryid']; else $q = "SELECT textentryid, textentrystr, lementrystr, isarguable, isambig, languageid, sessionident, sessionid FROM textentr WHERE textentryid=" . $_GET['textentryid']; $res = pg_query($conn, $q); if ($row = pg_fetch_array($res)) { $te = $row; $ss_add = get_user_ss_info($conn, $row['sessionident']); $ss_edit = get_user_ss_info($conn, $row['sessionid']); } pg_free_result($res); } else { if (isset($_GET['textentrystr'])) { if ($langid == 20) $q = "SELECT textentryid, textentrystr, lementrystr, isarguable, isambig, languageid, sessionident, sessionid FROM e_texent WHERE textentrystr='" . $_GET['textentrystr'] . "'"; else $q = "SELECT textentryid, textentrystr, lementrystr, isarguable, isambig, languageid, sessionident, sessionid FROM textentr WHERE textentrystr='" . $_GET['textentrystr'] . "'"; $res = pg_query($conn, $q); if ($row = pg_fetch_array($res)) { $te = $row; $_GET['textentryid_find'] = $te['textentryid']; } pg_free_result($res); } } ?> <div class="dialogtext"> <table border="0" width="100%"> <tr><td width="50%"> <label for="ntextentryid" class="label-top">Код:</label> <input id="ntextentryid" class="easyui-textbox" data-options="<? echo isset($_GET['textentryid'])?"value: " . $_GET['textentryid'] . ",": (isset($_GET['textentryid_find']) ? "value: " . $_GET['textentryid_find'] . ",": ""); ?>readonly: true" style="width: 100px"> <? if ($ss_add) { ?> </td><td> <label for="te_added" class="label-top">Добавлено:</label> <input id="te_added" class="easyui-textbox" data-options="readonly: true" style="width: 170px" value="<? echo $ss_add; ?>"> </td><td> <label for="te_modified" class="label-top">Изменено:</label> <input id="te_modified" class="easyui-textbox" data-options="readonly: true" style="width: 170px" value="<? echo $ss_edit; ?>"> <? } ?> </td><td align="right"> <? if (!isset($_GET['textentryid'])) { ?> <label for="nisarguable" class="label-left">Спорность синонима:</label> <input id="nisarguable" class="easyui-switchbutton" data-options="onText:'Да',offText:'Нет'"> <? } ?> </td></tr> <tr><td colspan="<? echo ($ss_add) ? 4 : 2; ?>"> <label for="ntextentrystr" class="label-top">Текстовый вход: <? if ($langid != 10) echo '<b class="lang_text_info">!' . mb_ucfirst(get_data_one_val($conn, 'SELECT languagestr FROM languas WHERE languageid=' . $langid), 'utf-8') . ' язык!</b>'; ?></label> <? if (isset($_GET['textentryid'])) { ?> <input id="ntextentrystr" class="easyui-textbox" style="width: 100%" data-options=" required: true, tipPosition: 'top', loader: ThesConcepts.te_loader, mode: 'remote', onChange: function(val) { $('#nlementrystr').textbox('setValue', val); }, missingMessage: 'Это поле необходимо заполнить', <? //echo isset($_GET['textentryid']) ? "value: '" . str_replace('"', '"', $_GET['textentrystr']) . "'," : ""; echo "value: '" . str_replace('"', '"', $_GET['textentrystr']) . "',"; ?> " > <!--onChange: te_set_value, --> <? } else { ?> <input id="ntextentrystr" class="easyui-combobox" style="width: 100%" data-options="groupField: 'group', required: true, tipPosition: 'top', loader: ThesConcepts.te_loader, mode: 'remote', valueField: 'textentryid', textField: 'textentrystr', panelMinHeight: 20, <? echo isset($_GET['textentryid_find'])?"startteid: " . $_GET['textentryid_find'] . ",":""; ?> <? echo isset($_GET['textentrystr'])?"starttestr: '" . str_replace('"', '"', $_GET['textentrystr']) . "',":""; ?> panelMaxHeight: 400, panelHeight: null, missingMessage: 'Это поле необходимо заполнить', onHidePanel: ThesConcepts.te_set_value, onSelect: ThesConcepts.te_change_curr_value, groupFormatter: function(group){ return '<span class=\'dropdown-group-header\'>' + group + '</span>'; }" > <? } ?> </td></tr> </table> <div style="margin-bottom:7px"> </div> <div class="new_te_block <?echo ((!isset($_GET['textentryid'])) || (isset($_GET['textentryid_find'])) ) ? 'new_te_disabled':''; ?>"> <p style="margin: 5px"> <center id="teaction" style="font-weight: bold">Добавление нового текстового входа:</center> </p> <div style="margin-bottom:7px"> <label for="nlementrystr" class="label-top">Лемматический вход:</label> <input id="nlementrystr" class="easyui-textbox" data-options=" required: false, changed: false, onChange: ThesConcepts.te_le_field_change, value: '<?echo (isset($te/*$_GET['textentryid']*/))?str_replace('"', '"', $te['lementrystr']):''; ?>'" style="width: 500px; color: red"> </div> <table border="0" width="100%"><tr><td> <tr><td> <div style="margin-bottom:7px"> <label for="nteisarguable" class="">Спорность:</label> <input id="nteisarguable" class="easyui-switchbutton" data-options="onText:'Да',offText:'Нет', checked: <?echo (isset($_GET['textentryid']))? ($te['isarguable'] ? 'true' : 'false') :'false'; ?>"> </div> </td><td> <div style="margin-bottom:7px"> <label for="nisambig" class="">Омонимия:</label> <input id="nisambig" class="easyui-switchbutton" data-options="onText:'Да',offText:'Нет', checked: <?echo (isset($_GET['textentryid']))?($te['isambig'] ? 'true' : 'false'):'false'; ?>"> </div> </td><td> <div style="margin-bottom:7px"> <label for="nlanguage" class="label-left">Язык:</label> <select id="nlanguage" class="easyui-combobox" data-options="valueField: 'languageid', textField: 'languagestr', value: '<?echo (isset($_GET['textentryid']) && (!($te['languageid'] == 10 && $langid == 20)))?$te['languageid']:$langid ?>', panelHeight: 45, required: true, editable: false, readonly: true, disable: true, url: 'json/getjson.php?type=langlist&without_total=1&langid=<? echo $langid; ?>'" style="width: 100px"> </select> </div> </td></tr></table> <table id="nlemmas" class="easyui-datagrid" data-options=" height: 173, width:500, striped: true, singleSelect: true, pagination: false, fitColumns: true,"> <thead> <tr> <th data-options="field:'lemmapos', width: '50'">Позиция</th> <th data-options="field:'lemmastr', width: '180'">Лемма</th> <th data-options="field:'isbend', width: '50'">IsBend</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> <script type="text/javascript"> $(function () { $('#nlementrystr').textbox('textbox').attr('maxlength', ThesConcepts.max_textentry_length); textbox_set_f9_conv('#nlementrystr'); <? if (isset($_GET['textentryid'])) { ?> $('#ntextentrystr').textbox('textbox').attr('maxlength', ThesConcepts.max_textentry_length); textbox_set_f9_conv('#ntextentrystr'); <? } else { ?> $('#ntextentrystr').combobox('textbox').attr('maxlength', ThesConcepts.max_textentry_length); textbox_set_f9_conv('#ntextentrystr'); <? } ?> $('#nlementrystr').textbox('textbox').bind('keyup', function(e){ if ((e.keyCode === 13) && (e.ctrlKey)){ $('#dd_dialog_ok_btn').focus().focus(); } }); $('#ntextentrystr').textbox('textbox').bind('keyup', function(e){ if ((e.keyCode === 13) && (e.ctrlKey)){ if ($('.new_te_block').hasClass('new_te_disabled')) $('#dd_dialog_ok_btn').focus().focus(); else $('#nlementrystr').textbox('textbox').focus(); } }); $('#dd_dialog_ok_btn').bind('keyup', function(e){ if ((e.keyCode === 37) || (e.keyCode === 39)){ $('#dd_dialog_cancel_btn').focus().focus(); } }); $('#dd_dialog_cancel_btn').bind('keyup', function(e){ if ((e.keyCode === 37) || (e.keyCode === 39)){ $('#dd_dialog_ok_btn').focus().focus(); } }); }); </script>