<?
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/directoriya.modulcreator/include.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/directoriya.modulcreator/prolog.php");
IncludeModuleLangFile(__FILE__);
$type = "";
if(isset($_REQUEST['type'])){
    $type = htmlspecialcharsbx($_REQUEST['type']);
}
$POST_RIGHT = $APPLICATION->GetGroupRight("directoriya.modulcreator");
if ($POST_RIGHT == "D") {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
$msg0 = Array(
        "err1"=>GetMessage("MODULCREATOR_ERR_JS_V_PAPKE")
);
$jsSetWarn = json_encode($msg0, JSON_HEX_QUOT | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS);
$msg0 = Array(
    "err1"=>GetMessage("MODULCREATOR_JS_VNIMANIE"),
    "err2"=>GetMessage("MODULCREATOR_JS_BUDET_PEZAPISAN"),

);
$messMkDirStrukt = json_encode($msg0, JSON_HEX_QUOT | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS);
$ms_value = Array();
$aTabs = array(
    array("DIV" => "edit1", "TAB" => GetMessage("MODULCREATOR_OSNOVNIE_PARAM"), "TITLE" => GetMessage("MODULCREATOR_OSNOVNIE_PARAM")),
    array("DIV" => "edit2", "TAB" => GetMessage("MODULCREATOR_IZGOTOVLENIE_MODULA"), "TITLE" => GetMessage("MODULCREATOR_IZGOTOVLENIE_MODULA")),
    array("DIV" => "edit3", "TAB" => GetMessage("MODULCREATOR_DEYSTVIYA_S_GOTOVIM_MODULEM"), "TITLE" => GetMessage("MODULCREATOR_DEYSTVIYA_S_GOTOVIM_MODULEM")),
    array("DIV" => "edit4", "TAB" => GetMessage("MODULCREATOR_SOZDAT_POLNIY_ARHIV_ILI_OBNOVLENIE"), "TITLE" => GetMessage("MODULCREATOR_SOZDAT_POLNIY_ARHIV_ILI_OBNOVLENIE")),
);
$tabControl = new CAdminTabControl("tabControl", $aTabs);
$ID = intval($ID);
$message = null;
$bCanDelete = ($USER->IsAdmin() || $POST_RIGHT == "W");
$fl_save=0;
if(ToUpper($REQUEST_METHOD) == "POST" &&  ($save != "" || $apply != "") && $POST_RIGHT == "W" && check_bitrix_sessid()){
    $fl_save=1;
    $dbKey_0 = new CAllModulcreator();
    $dbKey = new CAllModulcreatorInner();
    $error = $dbKey_0->CheckFields($_REQUEST);
    if(isset($_REQUEST['in28'])) {
        $_REQUEST['in28'] = urlencode($_REQUEST['in28']);
    }
    $arFields = Array("NAME" => $NAME_PRJ,"SORT" => $SORT_PRJ,"ALL_DATA" => serialize($_REQUEST));
    if(strlen($error)>0) {
        $message = new CAdminMessage(array("TYPE" => "ERROR", "MESSAGE" => GetMessage("MODULCREATOR_REQ_POLE_TIT").":<br>".$error));
    }else {
        if ($ID > 0) {
            $res = $dbKey->Update($ID, $arFields);
        } else {
            $ID = $dbKey->Add($arFields);
            $res = ($ID > 0);
        }
        if ($res) {
            if ($apply != "") {
                if($ID > 0) {
                    LocalRedirect("/bitrix/admin/modulcreator_project_edit.php?ID=" . $ID . "&mess=ok&lang=" . LANG . "&type=apply&" . $tabControl->ActiveTabParam());
                }else {
                    LocalRedirect("/bitrix/admin/modulcreator_project_edit.php?ID=" . $ID . "&mess=ok&lang=" . LANG . "&type=" . $type . "&" . $tabControl->ActiveTabParam());
                }
            } else {
                LocalRedirect("/bitrix/admin/modulcreator_index.php?lang=" . LANG . "&" . $tabControl->ActiveTabParam());
            }
        } else {
            $message = new CAdminMessage(array("TYPE" => "ERROR", "MESSAGE" => GetMessage("MODULCREATOR_OSHIBKA_ZAPISI") . ": " . $dbKey->LAST_ERROR));
        }
    }

}
if ($ID>0 && $_REQUEST["action"] == "delete" && check_bitrix_sessid() && $bCanDelete){
    $dbKey = new CAllModulcreatorInner();
    $dbKey->Delete($ID);
    LocalRedirect("/bitrix/admin/modulcreator_index.php?lang=".LANG);
}
if($fl_save === 0) {
    if ($ID > 0) {
        $dbKey = CAllModulcreatorInner::GetPrj(array(), array("ID" => $ID), array("*"));
        $dbKey->ExtractFields("str_", false);
    }
}else {
    $str_NAME = $_REQUEST['NAME_PRJ'];
    $str_SORT = $_REQUEST['SORT_PRJ'];
    $str_ALL_DATA = $_REQUEST;
}
if ($ID > 0) {
    $APPLICATION->SetTitle(GetMessage("MODULCREATOR_REDAKTIROVAT_PROJEKT")." ".$str_NAME);
}else {
    $APPLICATION->SetTitle(GetMessage("MODULCREATOR_NEW_PROJEKT"));
}
if(isset($type)) {
    if($type == "new") {
        $ms_value = Array();
        $str_NAME = COption::GetOptionString('directoriya.modulcreator',"admin_opt_prj_new_def");
        $str_SORT = COption::GetOptionString('directoriya.modulcreator',"admin_opt_component_msg_modul_sort_def");
        $ms_value = Array(
            "in1"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_part_def"),
            "in2"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_modul_def"),
            "in19"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_chel_name_modul_def"),
            "in4"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_namespase_component_def"),
            "in5"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_sys_name_component_def"),
            "in14"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_grupp_name_component_def"),
            "in10"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_name_component_def"),
            "in11"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_ds_component_def"),
            "in9"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_id_component_lat_def"),
            "in8"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_file_icon_component_def"),
            "in18"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_ajax_component_def"),
            "in15"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_mysql_def"),
            "in6"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_d7_def"),
            "in7"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_work_page_modul_title_def"),
            "in12"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_part_url_def"),
            "in20"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_chel_name_part_def"),
            "in13"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_version_def"),
            "in16"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_puth_install_mysql_def"),
            "in17"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_puth_uninstall_mysql_def"),
            "in36"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_id_menu_parent_def"),
            "in21"=>COption::GetOptionString('directoriya.modulcreator',"admin_opt_short_ds_modul_def"),
            "in37"=>COption::GetOptionString('directoriya.modulcreator',"admin_page_mnu_title"),


        );
        if(COption::GetOptionString('directoriya.modulcreator',"admin_opt_component_ch_def") == "Y") {
            $ms_value['in3'] = 3;
        }
        if(COption::GetOptionString('directoriya.modulcreator',"admin_opt_d7_def") == "Y") {
            $ms_value['in6'] = 6;
        }
        if(COption::GetOptionString('directoriya.modulcreator',"admin_opt_work_page_modul_ch_def") == "Y") {
            $ms_value['in35'] = 35;
        }
        if(COption::GetOptionString('directoriya.modulcreator',"admin_opt_mysql_def") == "Y") {
            $ms_value['in15'] = 15;
        }
        if(COption::GetOptionString('directoriya.modulcreator',"admin_opt_ajax_component_def") == "Y") {
            $ms_value['in18'] = 18;
        }

        $str_ALL_DATA="";
    }
}
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php");

$aContext = array();
$aContext[] = array(
    "TEXT"  => GetMessage("MODULCREATOR_PRJ_LIST"),
    "TITLE" => GetMessage("MODULCREATOR_NEW_PRJ"),
    "LINK"  => "modulcreator_index.php?lang=".LANG,
    "ICON"  => "btn_list",
);

if($ID>0)
    $aContext[] = array(
        "TEXT"  => GetMessage("MODULCREATOR_PRJ_add"),
        "TITLE" => GetMessage("MODULCREATOR_PRJ_add"),
        "LINK"  => "modulcreator_project_edit.php?lang=".LANG."&type=new",
        "ICON"  => "btn_new",
    );
if ($ID>0 && $bCanDelete) {
    $aContext[] = array(
        "TEXT" => GetMessage("MODULCREATOR_PRJ_DELL"),
        "TITLE" =>GetMessage("MODULCREATOR_PRJ_DELL"),
        "LINK" => "javascript:if(confirm('" . GetMessage("MODULCREATOR_CONFIRM_DEL_MESSAGE2")." ". GetMessage("MODULCREATOR_CONFIRM_DEL_MESSAGE") . "'))window.location='modulcreator_project_edit.php?ID=" . $ID . "&action=delete&" . bitrix_sessid_get() . "&lang=" . LANG . "&type=" . $type . "';",
        "ICON" => "btn_delete",
    );
}

$context = new CAdminContextMenu($aContext);
$context->Show();
if($_REQUEST["mess"] == "ok" && $ID>0) {
    CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("MODULCREATOR_PRJ_saved"), "TYPE" => "OK"));
}

if($message) {
    echo $message->Show();
}elseif ($dbKey->LAST_ERROR != "") {
    CAdminMessage::ShowMessage($dbKey->LAST_ERROR);
}
CJSCore::Init(array("jquery"));
$APPLICATION->SetAdditionalCSS("/bitrix/panel/directoriya.modulcreator/adm.css");
$APPLICATION->AddHeadScript("/bitrix/panel/directoriya.modulcreator/adm.js");

$global_make_puth = 'bitrix/modules/directoriya.modulcreator/allpr';
$fullP =$_SERVER['DOCUMENT_ROOT']."/".$global_make_puth;
$ff = CAllModulcreator::chdir($fullP);

?><form method="POST" action="<?echo $APPLICATION->GetCurPage()?>" ENCTYPE="multipart/form-data" name="modulcreator_project_edit" id="modulcreator_project_edit"><?
echo bitrix_sessid_post();
$tabControl->Begin();
$tabControl->BeginNextTab();
?>
    <tr>
        <td><span class="required">*</span><?= GetMessage("MODULCREATOR_ADMIN_NAME_PRJ")?>:
            <input id="sessid-m" name="sessid-m" type="hidden" value="<?=bitrix_sessid();?>"/>
            <input id="global_make_puth" name="global_make_puth" type="hidden" value="<?=$global_make_puth;?>"/>
        </td>
        <td>
            <input type="text" name="NAME_PRJ" id="NAME_PRJ" size="50" value="<?= $str_NAME;?>" style="float: left;" />
        </td>
    </tr>
    <tr>
        <td><span class="required">*</span><?= GetMessage("MODULCREATOR_SORT_PRJ")?>:</td>
        <td>
            <input type="text" name="SORT_PRJ" id="SORT_PRJ" size="50" value="<?
            $sortP = COption::GetOptionString('directoriya.modulcreator',"admin_opt_component_msg_modul_sort_def");
            if(isset($str_SORT)) {
                $str_SORT = preg_replace("/\D/","",$str_SORT);
                if(strlen($str_SORT)>0) {
                    $sortP = (int)$str_SORT;
                }
            }
            echo $sortP;
            ?>" style="float: left;" />
        </td>
    </tr>
    <tr class="heading">
        <td colspan="2"><?=GetMessage("MODULCREATOR_USTANOVKA_PARAMETROV_BUD_MODULA");?></td>
    </tr>
    <?

    if($type=="new") {

    }else {
        $str_value = $str_ALL_DATA;
        if (strlen((string)$str_value) > 0 && $fl_save === 0) {
            $ms_value = unserialize($str_value);
        } else {
            $ms_value = $str_value;
        }
    }
    ?>
    <tr>
        <td><span class="required">*</span><?=GetMessage("MODULCREATOR_IMA_PART_LATIN");?>: <sup class="cl-red">2</sup></td>
        <td>
            <input class="form-control part" id="in1" name="in1" type="text" placeholder="<?=GetMessage("MODULCREATOR_IMA_PART_LATIN");?>"
                   value="<?if(isset($ms_value['in1'])){echo $ms_value['in1'];}?>" onchange='return set_warn_mess(<?=$jsSetWarn;?>);' />
        </td>
    </tr>
    <?$ip=2;?>
    <tr>
        <td><span class="required">*</span><?=GetMessage("MODULCREATOR_IMA_MODUL_LATIN");?>: <sup class="cl-red">3</sup></td>
        <td>
            <input class="form-control modul" id="in<?=$ip?>" name="in<?=$ip?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_IMA_MODUL_LATIN");?>"
                   value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" onchange='return set_warn_mess(<?=$jsSetWarn;?>);' />
        </td>
    </tr>
    <?$ip=19;?>
    <tr class="td-top">
        <td><span class="required">*</span><?=GetMessage("MODULCREATOR_IMA_MODUL_RUS");?>:</td>
        <td>
            <input class="form-control modul" id="in<?=$ip?>" name="in<?=$ip?>" type="text" placeholder=""
                   value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" onchange='return set_warn_mess(<?=$jsSetWarn;?>);' /><br /><br />
            <?
            $img = '/bitrix/panel/directoriya.modulcreator/img/m23.png';
            echo CFile::Show2Images($img, $img, 100, 100, "hspace='0' vspace='0' border='0' title='".GetMessage("MODULCREATOR_GDE_RASPOLOJENO")."'", GetMessage("MODULCREATOR_GDE_RASPOLOJENO"));?>
        </td>
    </tr>

    <tr>
        <td colspan="2">
            <div class="border">
                <div class="form-group">
                    <div class="form-check">
                        <input onchange="return show_hid_comp_block();" class="form-check-input comp" type="checkbox" id="in3" name="in3" value="3"
                            <?
                            $cls_block_comp = " hidd";
                            if(isset($ms_value['in3'])) {
                                if($ms_value['in3'] == "on" || $ms_value['in3'] == "3") {
                                    echo ' checked="checked"';
                                    $cls_block_comp = "";
                                }
                            }
                            $colonki_1 = "4";
                            $colonki_2 = "8";
                            ?>
                        />
                        <label class="form-check-label" for="in3"><?=GetMessage("MODULCREATOR_EST_COMPONENT");?></label>
                    </div>
                </div>
                <div class="component-block<?=$cls_block_comp;?>">
                    <table class="tbl2">
                        <tr>
                            <td class="tbl2-td1"><span class="required">*</span><?=GetMessage("MODULCREATOR_NAME_SPASE_COMPONENT");?></td>
                            <td class="tbl2-td2">
                                <input onchange='return set_warn_mess(<?=$jsSetWarn;?>);' class="form-control" id="in4" name="in4" type="text" placeholder="<?=GetMessage("MODULCREATOR_NAME_SPASE_COMPONENT");?>" value="<?if(isset($ms_value['in4'])){echo $ms_value['in4'];}?>" />
                            </td>
                        </tr>
                        <tr>
                            <td class="tbl2-td1"><span class="required">*</span><?=GetMessage("MODULCREATOR_SYSTEM_NAME_COMPONENT");?></td>
                            <td class="tbl2-td2">
                                <input onchange='return set_warn_mess(<?=$jsSetWarn;?>);' class="form-control" id="in5" name="in5" type="text" placeholder="<?=GetMessage("MODULCREATOR_SYSTEM_NAME_COMPONENT2");?>" value="<?if(isset($ms_value['in5'])){echo $ms_value['in5'];}?>" />
                            </td>
                        </tr>
                        <tr>
                            <?$ip = 14;?>
                            <td class="tbl2-td1"><span class="required">*</span><?=GetMessage("MODULCREATOR_CHEL_NAME_GRUPP_COMPONENT");?></td>
                            <td class="tbl2-td2">
                                <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_CHEL_NAME_GRUPP_COMPONENT");?>"
                                       value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
                                <?echo CFile::Show2Images("/bitrix/panel/directoriya.modulcreator/img/m1.png", "/bitrix/panel/directoriya.modulcreator/img/m1.png", 150, 150, "hspace='0' vspace='0' border='0' title='".GetMessage("MODULCREATOR_CHEL_NAME_GRUPP_COMPONENT")."'", true);?>

                            </td>
                        </tr>
                        <tr>
                            <?$ip = 10;?>
                            <?$pic = "/bitrix/panel/directoriya.modulcreator/img/m2.png";?>
                            <?$nname = GetMessage("MODULCREATOR_CHEL_NAME_COMPONENTA");?>
                            <td class="tbl2-td1"><span class="required">*</span><?=$nname;?>:</td>
                            <td class="tbl2-td2">
                                <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=$nname;?>" value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
                                <?echo CFile::Show2Images($pic, $pic, 150, 150, "hspace='0' vspace='0' border='0' title='".$nname."'", true);?>

                            </td>
                        </tr>
                        <tr>
                            <?$ip = 11;?>
                            <?$pic = "/bitrix/panel/directoriya.modulcreator/img/m3.png";?>
                            <?$nname = GetMessage("MODULCREATOR_CHEL_DESC_COMPONENTA");?>
                            <td class="tbl2-td1"><span class="required">*</span><?=$nname;?>:</td>
                            <td class="tbl2-td2">
                                <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_COMP_DLYA");?>" value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
                                <?echo CFile::Show2Images($pic, $pic, 150, 150, "hspace='0' vspace='0' border='0' title='".$nname."'", true);?>

                            </td>
                        </tr>
                        <tr>
                            <?$ip = 9;?>
                            <?$pic = "/bitrix/panel/directoriya.modulcreator/img/m4.png";?>
                            <?$nname = GetMessage("MODULCREATOR_ID_COMP_IN_DESC");?>
                            <td class="tbl2-td1"><span class="required">*</span><?=$nname;?>:</td>
                            <td class="tbl2-td2">
                                <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=$nname;?>" value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
                                <?echo CFile::Show2Images($pic, $pic, 150, 150, "hspace='0' vspace='0' border='0' title='".$nname."'", true);?>
                            </td>
                        </tr>
                        <tr>
                            <?$ip = 8;?>
                            <?$pic = "/bitrix/panel/directoriya.modulcreator/img/m5.png";?>
                            <?$nname = GetMessage("MODULCREATOR_PUT_ICON_CMP");?>
                            <td class="tbl2-td1"><?=$nname;?>:</td>
                            <td class="tbl2-td2">
                                <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="/bitrix/tmp...." value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
                                <input type="button" value="<?echo GetMessage("MODULCREATOR_VIBRAT_ICONKU");?>" OnClick="BtnClickOpen8()" />
                                <p><?echo CFile::Show2Images($pic, $pic, 150, 150, "hspace='0' vspace='0' border='0' title='".$nname."'", true);?></p>
                            </td>
                        </tr>
                        <tr>
                            <?$ip = 18;?>
                            <?$nname = GetMessage("MODULCREATOR_PLUS_AJAX_CODE");?>
                            <td class="tbl2-td1"><?=$nname;?>:</td>
                            <td class="tbl2-td2">
                                <input class="form-check-input comp" type="checkbox" id="in<?=$ip;?>" name="in<?=$ip;?>" value="<?=$ip;?>"
                                    <?
                                    if(isset($ms_value['in'.$ip])) {
                                        if($ms_value['in'.$ip] == "on" || $ms_value['in'.$ip] == $ip) {
                                            echo ' checked="checked"';
                                        }
                                    }
                                    ?>
                                />
                            </td>
                        </tr>
                    </table>


                </div>
            </div>

        </td>

    </tr>
    <tr>
        <?$ip = 15;?>
        <td class="sql-td1"><?=GetMessage("MODULCREATOR_EXIST_MYSQL");?></td>
        <td class="sql-td2">
            <input onchange="return show_hid_sql_block();" class="form-check-input comp" type="checkbox" id="in<?=$ip;?>" name="in<?=$ip;?>" value="<?=$ip;?>"
                <?
                $cls_block_comp = " hidd";
                if(isset($ms_value['in'.$ip])) {
                    if($ms_value['in'.$ip] == "on" || $ms_value['in'.$ip] == $ip) {
                        echo ' checked="checked"';
                        $cls_block_comp = "";
                    }
                }
                ?>
            />
            <?$ip = 16;?>
            <div class="form-group row sql_put<?=$cls_block_comp;?>"><br />
                <span class="required">*</span><?=GetMessage("MODULCREATOR_FILE_INSTALL_MYSQL");?>:<br />
                <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_FILE_INSTALL_MYSQL2");?>"
                           value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
                           <input type="button" value="<?echo GetMessage("MODULCREATOR_VIBRAT_FAIL_ZAGRUZKI_TABLIC_V_BD")?>" OnClick="BtnClickOpen1()" />

                <hr />
            </div>
            <?$ip = 17;?>
            <div class="form-group row sql_put<?=$cls_block_comp;?>">
                <span class="required">*</span><?=GetMessage("MODULCREATOR_FILE_DELL_MYSQL");?>:<br />
                    <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_FILE_DELL_MYSQL2");?>"
                           value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
                         <input type="button" value="<?echo GetMessage("MODULCREATOR_VIBRAT_FAIL_DELL_TABLIC_V_BD")?>" OnClick="BtnClickOpen2()" />
            </div>
        </td>
    </tr>
    <tr>
        <td><?=GetMessage("MODULCREATOR_YES_D7");?></td>
        <td>
            <input class="form-check-input d7" type="checkbox" id="in6" name="in6" value="6"
                <?
                if(isset($ms_value['in6'])) {
                    if($ms_value['in6'] == "on" || $ms_value['in6'] == "6") {
                        echo ' checked="checked"';
                    }
                }
                ?>
            />
        </td>
    </tr>
    <tr class="trbg-gray">
        <?$ip=35;?>
        <?
        $clsWorkPage=" hidd";
        ?>
        <td class="pp-1"><?=GetMessage("MODULCREATOR_YES_WORK_PAGE_MODUL");?></td>
        <td class="pp-1">
            <input onchange="return show_hid_work_page();" class="form-check-input" type="checkbox" id="in<?=$ip;?>" name="in<?=$ip;?>" value="<?=$ip;?>"
                <?
                if(isset($ms_value['in'.$ip])) {
                    if($ms_value['in'.$ip] == "on" || $ms_value['in'.$ip] == $ip) {
                        echo ' checked="checked"';
                        $clsWorkPage="";
                    }
                }
                ?>
            />
        </td>
    </tr>
    <tr class="td-top trbg-gray work_page<?=$clsWorkPage?>">
        <?$ip = 7;?>
        <td><?=GetMessage("MODULCREATOR_PAGE_MODUL_IN_ADMIN");?></td>
        <td>
            <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_NAME_MANU_IN_ADMIN");?>"
                   value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
            <?
            $nname = GetMessage("MODULCREATOR_PAGE_MODUL_IN_ADMIN");
            $pic = "/bitrix/panel/directoriya.modulcreator/img/m21.png";?>
            <p><?echo CFile::Show2Images($pic, $pic, 150, 150, "hspace='0' vspace='0' border='0' title='".$nname."'", true);?></p>

        </td>
    </tr>
    <tr class="td-top trbg-gray work_page<?=$clsWorkPage?>">
        <?$ip=37;?>
        <td><?=GetMessage("MODULCREATOR_PAGE_MODUL_ZAGOLOVOK_NA_STRANICE");?></td>
        <td>
            <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_PAGE_MODUL_ZAGOLOVOK_NA_STRANICE");?>"
                   value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
            <?
            $nname = GetMessage("MODULCREATOR_PAGE_MODUL_ZAGOLOVOK_NA_STRANICE");
            $pic = "/bitrix/panel/directoriya.modulcreator/img/m18.png";?>
            <p><?echo CFile::Show2Images($pic, $pic, 150, 150, "hspace='0' vspace='0' border='0' title='".$nname."'", true);?></p>

        </td>
    </tr>
    <tr class="td-top trbg-gray work_page<?=$clsWorkPage?>">
        <?$ip=36;?>
        <td class="pp-bottom"><?=GetMessage("MODULCREATOR_PAGE_PARENT_MNU");?></td>
        <td class="pp-bottom">
            <select id="in<?=$ip;?>" name="in<?=$ip;?>" value="" size="7">
            <?
            $arSelectMnu = CAllModulcreator::parentMnu();
            foreach ($arSelectMnu as $keyMnu=>$vvMnu) {
                $selected = '';
                if(isset($ms_value['in'.$ip])){
                    if($ms_value['in'.$ip]==$keyMnu){
                        $selected = ' selected="selected"';
                    }
                }
                ?>
                <option value="<?=$keyMnu;?>"<?=$selected;?>><?=$vvMnu;?></option>

            <?}
            ?>
            </select>

        </td>
    </tr>
    <tr>
        <?$ip = 12;?>
        <td class="pp-2"><span class="required">*</span><?=GetMessage("MODULCREATOR_PART_URL");?></td>
        <td class="pp-2">
            <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_PART_URL");?>"
                   value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
        </td>
    </tr>

    <tr class="td-top">
        <?$ip = 20;?>
        <td><span class="required">*</span><?=GetMessage("MODULCREATOR_CHEL_FIO_DEV_PART");?></td>
        <td>
            <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_CHEL_FIO_DEV_PART");?>"
                   value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
            <?
            $nname = GetMessage("MODULCREATOR_CHEL_FIO_DEV_PART");
            $pic = "/bitrix/panel/directoriya.modulcreator/img/m6.jpg";?>
            <p><?echo CFile::Show2Images($pic, $pic, 150, 150, "hspace='0' vspace='0' border='0' title='".$nname."'", true);?></p>

        </td>
    </tr>

    <tr class="td-top">
        <?$ip = 21;?>
        <?$nname = GetMessage("MODULCREATOR_SHORT_DESC_MODUL_FOR_ADMIN");?>
        <td><?=$nname;?></td>
        <td>
            <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=$nname;?>"
                   value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
            <?
            $pic = "/bitrix/panel/directoriya.modulcreator/img/m8.jpg";?>
            <p><?echo CFile::Show2Images($pic, $pic, 150, 150, "hspace='0' vspace='0' border='0' title='".$nname."'", true);?></p>

        </td>
    </tr>

    <tr>
        <?$ip = 13;?>
        <td><span class="required">*</span><?=GetMessage("MODULCREATOR_MODUL_VERS");?>:</td>
        <td>
            <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_MODUL_VERS");?>(1.1.5)"
                   value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
        </td>
    </tr>
    <?$tabControl->BeginNextTab();?>
    <tr>
        <td class="td-make1"><input class="warning" type="button" value="<?=GetMessage("MODULCREATOR_START_CREATE_MODUL");?>" onclick='mk_dir_strukture(<?=$messMkDirStrukt;?>);return false;' /> <sup class="cl-red">1</sup></td>
        <td>
            <div class="col-8 itog-papka"><?=GetMessage("MODULCREATOR_REZULTANALIZ_LANG_FILE");?></div>
        </td>
    </tr>

    <?$tabControl->BeginNextTab();
    $fl = CAllModulcreator::GetPuthComponent($ms_value);
    $cls="";
    if($fl === 0) {
        $cls=" hidd";
    }
    ?>
    <tr class="copy-component<?=$cls;?>">
        <td class="td-make3"><input class="warning" type="button" value="<?=GetMessage("MODULCREATOR_PEZAPIS_COMP_IN_MODUL");?>" onclick="sinc_component(this);return false;" /></td>
        <td>
            <div class="col-8 itog-papka3"><?=GetMessage("MODULCREATOR_COMP_FROM_PAPKA");?>:<br />/bitrix/components<?
                $str = '/'.GetMessage("MODULCREATOR_PAPKA_NAME_SPASE").'/'.GetMessage("MODULCREATOR_PAPKA_COMP").'/';
                if(isset($ms_value['in4'])){
                    if(strlen($ms_value['in4'])>0) {
                        if(isset($ms_value['in5'])){
                            if(strlen($ms_value['in5'])>0) {
                                $str = '/'.$ms_value['in4'].'/'.$ms_value['in2'].".".$ms_value['in5'].'/';
                            }
                        }
                    }
                }
                echo $str;
                ?><br><?=GetMessage("MODULCREATOR_BUDET_PERAZAPISAN");?>:<br />/bitrix/modules<?
                $str = '/'.GetMessage("MODULCREATOR_PAPKA_MODULA").'/install/components/'.GetMessage("MODULCREATOR_PAPKA_NAME_SPASE").'/'.GetMessage("MODULCREATOR_PAPKA_COMP").'/';
                if(isset($ms_value['in4'])){
                    if(strlen($ms_value['in4'])>0) {
                        if(isset($ms_value['in5'])){
                            if(strlen($ms_value['in5'])>0) {
                                $str = '/'.$ms_value['in1'].'/install/components/'.$ms_value['in4'].'/'.$ms_value['in2'].".".$ms_value['in5'].'/';
                            }
                        }
                    }
                }
                echo $str;
                ?><br /><?=GetMessage("MODULCREATOR_ESLI_DORABOTAN");?>

                </div>
        </td>
    </tr>
    <tr class="heading">
        <td colspan="2"><?=GetMessage("MODULCREATOR_BLOK_ZAP_NO");?></td>
    </tr>
    <tr class="mk-lang">
        <td class="td-make4"><input class="neytral" type="button" value="<?=GetMessage("MODULCREATOR_BLOK_ZAP_NO2");?>" onclick="mk_lang_mess();return false;" /></td>
        <td>
            <div class="col-8 itog-papka_lang-00"><?=GetMessage("MODULCREATOR_NIJE_PROP_LANG");?><br />
                <?$ip=33;?>
                <input class="form-check-input d7" type="checkbox" id="in<?=$ip;?>" name="in<?=$ip;?>" value="<?=$ip;?>"
                    <?
                    if(isset($ms_value['in'.$ip])) {
                        if($ms_value['in'.$ip] == "on" || $ms_value['in'.$ip] == $ip) {
                            echo ' checked="checked"';
                        }
                    }
                    ?>
                />
                <?=GetMessage("MODULCREATOR_ANALIZ_FROM_MODUL");?><br />
                <?
                if(isset($ms_value['in2'])) {
                    if(strlen($ms_value['in2'])>0) {?>
                    (<?=GetMessage("MODULCREATOR_PRIMER");?>: <?=toUpper($ms_value['in2']);?>_LALA)
                    <?}
                }
                ?><br />
                <?$ip=34;?>
                    <div>
                        <input class="form-check-input d7" type="checkbox" id="in<?=$ip;?>" name="in<?=$ip;?>" value="<?=$ip;?>"
                        <?
                        if(isset($ms_value['in'.$ip])) {
                            if($ms_value['in'.$ip] == "on" || $ms_value['in'.$ip] == $ip) {
                                echo ' checked="checked"';
                            }
                        }
                        ?>
                        />
                        <?=GetMessage("MODULCREATOR_TOKA_EMPTY");?>
                    </div>


            </div>
        </td>
    </tr>
    <tr class="mk-lang">
        <td class="td-make5" colspan="2"><div class="itog-papka_lang-0"></div></td>
    </tr>

    <tr class="heading">
        <td colspan="2"><?=GetMessage("MODULCREATOR_BLOK_GRAMATIK");?> <sup class="cl-red">5</sup></td>
    </tr>

    <tr class="mk-lang">
        <td class="td-make6"><input class="neytral" type="button" value="<?=GetMessage("MODULCREATOR_GET_ALL_LANG");?>" onclick="get_gramatik();return false;" /></td>
        <td>
            <div class="col-8 itog-papka_gramatika"><?=GetMessage("MODULCREATOR_REZ_ALL_WORD");?></div>
        </td>
    </tr>

    <tr class="mk-lang">
        <td class="td-make5" colspan="2"><div class="itog-papka_lang"></div></td>
    </tr>

    <tr class="heading">
        <td colspan="2"><?=GetMessage("MODULCREATOR_CREATE_COPY_MODUL_CHANGE_PART_MODUL");?></td>
    </tr>

    <tr>
        <?$ip = 22;?>
        <?$nname = GetMessage("MODULCREATOR_NEW_NAME_PART");?>
        <td><?=$nname;?></td>
        <td>
            <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=$nname;?>" value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
        </td>
    </tr>
    <tr>
        <?$ip = 23;?>
        <?$nname = GetMessage("MODULCREATOR_NEW_NAME_MODUL");?>
        <td><?=$nname;?></td>
        <td>
            <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=$nname;?>" value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
        </td>
    </tr>
    <tr>
        <?$ip = 24;?>
        <?$nname = GetMessage("MODULCREATOR_NEW_NAME_PRJ_FOR_ADMIN");?>
        <td><?=$nname;?></td>
        <td>
            <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=$nname;?>" value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
        </td>
    </tr>

    <tr class="mk-lang">
        <td class="td-make4"><input class="neytral" type="button" value="<?=GetMessage("MODULCREATOR_BATON_IZMENIT");?>" onclick='zamena_parner_modul(this,<?
            $msg = Array("err1"=>GetMessage("MODULCREATOR_ERR_JS_NO_NEW_NAZVANIE_PROEKTA"));
            $msg = json_encode($msg);
            $msgMs = json_encode($msg, JSON_HEX_QUOT | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS);
            echo $msgMs;
            ?>);return false;' /></td>
        <td>
            <div class="col-8 zamens-rezult"><?=GetMessage("MODULCREATOR_DS_CHANGE");?>
            </div>
        </td>
    </tr>
    <?$tabControl->BeginNextTab();?>
    <tr>
        <td colspan="2"><?
            echo BeginNote();
            echo GetMessage("MODULCREATOR_TAB_ARCHIV_TOP_HELP");
            echo EndNote();
            ?></td>
    </tr>
    <tr class="heading">
        <td colspan="2"><?=GetMessage("MODULCREATOR_VIBOR_MODULA");?></td>
    </tr>
        <tr>
            <?$ip = 25;?>
            <?$nname = GetMessage("MODULCREATOR_SELECT_MODUL");?>
            <td><?=$nname;?></td>
            <td>
                <select onchange="return set_version_input();" name="in<?=$ip;?>" id="in<?=$ip;?>" value="<?
                $module_id="";
                if(isset($ms_value['in'.$ip])){
                    echo $ms_value['in'.$ip];
                    $module_id=$ms_value['in'.$ip];
                }
                ?>">
                    <option></option>
                    <?
                    $arModules = array();
                    $folder = $_SERVER['DOCUMENT_ROOT'].'/bitrix/modules';
                    $files = scandir($folder);
                    foreach($files as $file){
                        if ($file == '.' || $file == '..'){
                            continue;
                        }
                        $fullfilename = $folder . '/' . $file;
                        if(is_file($fullfilename)){
                            continue;
                        }

                        if (is_dir($fullfilename)){
                            if(strpos($file, '.') === false) {
                                continue;
                            }
                           $sel = "";
                           if($file == $module_id) {
                               $sel = ' selected="selected"';
                           }
                           echo '<option value="'.$file.'"'.$sel.'>'.$file.'</option>';
                        }
                    }
                    ?>
                </select>
                <div class="to-version"></div>
            </td>
    </tr>
    <tr class="heading">
        <td colspan="2"><?=GetMessage("MODULCREATOR_CREATE_FULL_ARHIV");?></td>
    </tr>

    <tr class="td-top">
        <?$fl_full_after_phph = 0;?>
        <?$ip = 38;?>
        <td><?=GetMessage("MODULCREATOR_PHP_AFTER_FULL_ARCHIV");?> <sup class="cl-red">4</sup>:</td>
        <td>
            <input onchange="return show_file_run_full_php();" class="form-check-input d7" type="checkbox" id="in<?=$ip;?>" name="in<?=$ip;?>" value="<?=$ip;?>"
                <?
                if(isset($ms_value['in'.$ip])) {
                    if($ms_value['in'.$ip] == "on" || $ms_value['in'.$ip] == $ip) {
                        echo ' checked="checked"';
                        $fl_full_after_phph = 1;
                    }
                }
                ?>
            />
        </td>
    </tr>
    <?
    $cls_full_after = ' hidd';
    if($fl_full_after_phph === 1) {
        $cls_full_after = '';

    }
    ?>
    <tr class="td-top fullarchiv-file<?=$cls_full_after;?>">
        <?$ip = 39;?>
        <td><?=GetMessage("MODULCREATOR_PHP_AFTER_FULL_FILE_PHP");?>:</td>
        <td>
            <div class="form-group row">
                <input class="form-control2" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_PUT_KOREN");?>" value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
                <input type="button" value="<?=GetMessage("MODULCREATOR_VIBRAT_FILE");?>" OnClick="BtnClickOpen10();" />

            </div>
        </td>
    </tr>
    <tr class="mk-zip td-top">
        <td class="td-make7"><input class="neytral" type="button" value="<?=GetMessage("MODULCREATOR_FILL_ZIP_TAR");?>" onclick="fill_zip_tar();return false;" /></td>
        <td>
            <div class="col-8 full-zip" id="full_zip"><?=GetMessage("MODULCREATOR_FULL_ZIP_TAR_DS");?></div>
        </td>
    </tr>
    <tr class="heading">
        <td colspan="2"><?=GetMessage("MODULCREATOR_UPDATE_ZIP_TAR");?></td>
    </tr>
    <tr class="td-top">
        <?$ip = 26;?>
        <?$nname = GetMessage("MODULCREATOR_VERS_UPDATE");?>
        <td><?=$nname;?>:</td>
        <td>
            <?
            $vers_from_file="";
            $vers_from_file_nomeric="";
            $fl_file=0;
            if(isset($ms_value['in25'])) {
                if(strlen($ms_value['in25'])>0) {
                    $put = $_SERVER['DOCUMENT_ROOT']."/bitrix/modules/".$ms_value['in25']."/install/version.php";
                    if(file_exists($put)) {
                        if(is_writable($put)) {
                            include ($put);
                            if(isset($arModuleVersion['VERSION'])) {
                                if(strlen($arModuleVersion['VERSION'])>0) {
                                    $vers_from_file='<span class="s-ver1 js-version-0">'.GetMessage("MODULCREATOR_CURREN_VERS_FROM_FILE").': <span class="js-version f-bold">'.$arModuleVersion['VERSION'].'</span></span><br />';
                                    $fl_file=1;
                                }
                            }
                        }
                    }
                }
            }

            ?>
            <?=$vers_from_file;?>
            <span class=""s-ver2><?=GetMessage("MODULCREATOR_PESOBRAT");?>:</span><br />
            <input class="form-control" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=$nname;?>" value="<?
            $fl_p = 0;
            if(isset($ms_value['in'.$ip])){
                if(strlen($ms_value['in'.$ip])>0) {
                    $fl_p = 1;
                }
                if($fl_p === 1) {
                    echo $ms_value['in'.$ip];
                }else {
                    if($fl_file ===1) {
                        echo $arModuleVersion['VERSION'];
                    }
                }

            }
            ?>" />
        </td>
    </tr>
    <tr class="td-top">
        <?$ip = 27;?>
        <td><?=GetMessage("MODULCREATOR_NEW_DATA");?>:</td>
        <td>
            <span class=""s-ver2><?=GetMessage("MODULCREATOR_FIX_DATA");?>:</span><br />
            <input class="form-check-input d7" type="checkbox" id="in<?=$ip;?>" name="in<?=$ip;?>" value="<?=$ip;?>"
                <?
                if(isset($ms_value['in'.$ip])) {
                    if($ms_value['in'.$ip] == "on" || $ms_value['in'.$ip] == $ip) {
                        echo ' checked="checked"';
                    }
                }
                ?>
            />
        </td>
    </tr>
    <tr class="td-top">
        <?
        $fl_updater=0;
        $cls_updater = '';
        $cls_updater_file = ' hidd';
        ?>
        <?$ip = 30;?>
        <td><?=GetMessage("MODULCREATOR_TEXT_UPDATER");?>:</td>
        <td>
            <input onchange='return set_warn_mess(<?=$jsSetWarn;?>);' class="form-check-input d7" type="checkbox" id="in<?=$ip;?>" name="in<?=$ip;?>" value="<?=$ip;?>"
                <?
                if(isset($ms_value['in'.$ip])) {
                    if($ms_value['in'.$ip] == "on" || $ms_value['in'.$ip] == $ip) {
                        echo ' checked="checked"';
                        $fl_updater=1;
                    }
                }
                ?>
            />
        </td>
    </tr>
    <?
    if($fl_updater === 1) {
        $cls_updater = ' hidd';
        $cls_updater_file = '';
    }
    ?>
    <tr class="td-top updater-file<?=$cls_updater_file;?>">
        <?$ip = 31;?>
        <td><?=GetMessage("MODULCREATOR_TEXT_UPDATER_FILE");?>:</td>
        <td>
            <div class="form-group row">
                <input class="form-control2" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_PUT_KOREN");?>" value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
                <input type="button" value="<?=GetMessage("MODULCREATOR_VIBRAT_FILE");?>" OnClick="BtnClickOpen9();" />

            </div>
        </td>
    </tr>
    <tr class="td-top updater-text<?=$cls_updater?>">
        <?$ip = 28;?>
        <?$nname = GetMessage("MODULCREATOR_COD_SCR_UPDATE");?>
        <td><?=$nname;?>:</td>
        <td>
            <?
            $text = '
<?
if (IsModuleInstalled("#MODULE_ID#")) {
    if (is_dir(dirname(__FILE__) . "/install/components")) {
        $updater->CopyFiles("install/components", "components/");
    }
}
?>
';
            if(isset($ms_value['in'.$ip])){
                $text = urldecode($ms_value['in'.$ip]);
            }
            ?>
            <span class=""s-ver2><?=GetMessage("MODULCREATOR_MACROS_UPDATER")?>:</span><br />
            <textarea class="tx-area w-90" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=$nname;?>" value=""><?=$text;?></textarea>
            <div class="font-small"><span class="cl-red">*</span> <?=GetMessage("MODULCREATOR_WARN_UPDATER");?></div>
        </td>
    </tr>
    <tr class="td-top">
        <?$ip = 29;?>
        <?$nname = GetMessage("MODULCREATOR_DS_NEW_VERS");?>
        <td><?=$nname;?>:</td>
        <td>
            <?
            $text = '';
            if(isset($ms_value['in'.$ip])){
                $text = $ms_value['in'.$ip];
            }
            ?>
            <textarea class="tx-area w-90" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=$nname;?>" value=""><?=$text;?></textarea>
        </td>
    </tr>


    <tr class="td-top">
        <?$fl_full_after_phph = 0;?>
        <?$ip = 40;?>
        <td><?=GetMessage("MODULCREATOR_PHP_AFTER_UPDATE_ARCHIV");?> <sup class="cl-red">4</sup>:</td>
        <td>
            <input onchange="return show_file_run_update_php();" class="form-check-input" type="checkbox" id="in<?=$ip;?>" name="in<?=$ip;?>" value="<?=$ip;?>"
                <?
                if(isset($ms_value['in'.$ip])) {
                    if($ms_value['in'.$ip] == "on" || $ms_value['in'.$ip] == $ip) {
                        echo ' checked="checked"';
                        $fl_full_after_phph = 1;
                    }
                }
                ?>
            />
        </td>
    </tr>
    <?
    $cls_full_after = ' hidd';
    if($fl_full_after_phph === 1) {
        $cls_full_after = '';

    }
    ?>
    <tr class="td-top updatearchiv-file<?=$cls_full_after;?>">
        <?$ip = 41;?>
        <td><?=GetMessage("MODULCREATOR_PHP_AFTER_UPDATE_FILE_PHP");?>:</td>
        <td>
            <div class="form-group row">
                <input class="form-control2" id="in<?=$ip;?>" name="in<?=$ip;?>" type="text" placeholder="<?=GetMessage("MODULCREATOR_PUT_KOREN");?>" value="<?if(isset($ms_value['in'.$ip])){echo $ms_value['in'.$ip];}?>" />
                <input type="button" value="<?=GetMessage("MODULCREATOR_VIBRAT_FILE");?>" OnClick="BtnClickOpen11();" />

            </div>
        </td>
    </tr>


    <tr class="td-top">
        <?$ip = 32;?>
        <td><input class="neytral" type="button" value="<?=GetMessage("MODULCREATOR_BATON_CREATE_ZIP_TAR");?>" onclick="updater_zip_tar();return false;" /></td>
        <td>
            <div class="form-group row updater-zip-tar" id="updater_zip"><?=GetMessage("MODULCREATOR_REZ_SBORKA");?></div>
        </td>
    </tr>
   <?
$tabControl->Buttons(
    array(
        "disabled" => ($POST_RIGHT<"W"),
        "back_url" => "modulcreator_index.php?lang=".LANG,
    )
);
$tabControl->End();
?>
    <input type="hidden" name="lang" value="<?=LANG?>" />
    <input class="h-iddden" type="hidden" name="type" value="<?=$type?>" />
<?if ($ID>0):?>
    <input type="hidden" name="ID" value="<?=$ID?>" />
<?endif;?>
    </form>
<?
CAdminFileDialog::ShowScript
(
    Array(
        "event" => "BtnClickOpen1",
        "arResultDest" => array("FORM_NAME" => "modulcreator_project_edit", "FORM_ELEMENT_NAME" => "in16"),
        "arPath" => array("PATH" =>"/"),
        "select" => 'F',
        "operation" => 'O',
        "showUploadTab" => true,
        "showAddToMenuTab" => false,
        "fileFilter" => 'sql',
        "allowAllFiles" => true,
        "SaveConfig" => true,
    )
);?>
<?
CAdminFileDialog::ShowScript
(
    Array(
        "event" => "BtnClickOpen2",
        "arResultDest" => array("FORM_NAME" => "modulcreator_project_edit", "FORM_ELEMENT_NAME" => "in17"),
        "arPath" => array("PATH" =>"/"),
        "select" => 'F',
        "operation" => 'O',
        "showUploadTab" => true,
        "showAddToMenuTab" => false,
        "fileFilter" => 'sql',
        "allowAllFiles" => true,
        "SaveConfig" => true,
    )
);
CAdminFileDialog::ShowScript
(
    Array(
        "event" => "BtnClickOpen8",
        "arResultDest" => array("FORM_NAME" => "modulcreator_project_edit", "FORM_ELEMENT_NAME" => "in8"),
        "arPath" => array("PATH" =>"/"),
        "select" => 'F',
        "operation" => 'O',
        "showUploadTab" => true,
        "showAddToMenuTab" => false,
        "fileFilter" => 'sql',
        "allowAllFiles" => true,
        "SaveConfig" => true,
    )
);
CAdminFileDialog::ShowScript
(
    Array(
        "event" => "BtnClickOpen9",
        "arResultDest" => array("FORM_NAME" => "modulcreator_project_edit", "FORM_ELEMENT_NAME" => "in31"),
        "arPath" => array("PATH" =>"/"),
        "select" => 'F',
        "operation" => 'O',
        "showUploadTab" => true,
        "showAddToMenuTab" => false,
        "fileFilter" => 'php',
        "allowAllFiles" => true,
        "SaveConfig" => true,
    )
);
CAdminFileDialog::ShowScript
(
    Array(
        "event" => "BtnClickOpen10",
        "arResultDest" => array("FORM_NAME" => "modulcreator_project_edit", "FORM_ELEMENT_NAME" => "in39"),
        "arPath" => array("PATH" =>"/"),
        "select" => 'F',
        "operation" => 'O',
        "showUploadTab" => true,
        "showAddToMenuTab" => false,
        "fileFilter" => 'php',
        "allowAllFiles" => true,
        "SaveConfig" => true,
    )
);
CAdminFileDialog::ShowScript
(
    Array(
        "event" => "BtnClickOpen11",
        "arResultDest" => array("FORM_NAME" => "modulcreator_project_edit", "FORM_ELEMENT_NAME" => "in41"),
        "arPath" => array("PATH" =>"/"),
        "select" => 'F',
        "operation" => 'O',
        "showUploadTab" => true,
        "showAddToMenuTab" => false,
        "fileFilter" => 'php',
        "allowAllFiles" => true,
        "SaveConfig" => true,
    )
);
echo BeginNote();
?>
    <sup class="cl-red">1</sup> <?=GetMessage("MODULCREATOR_WARN_PEREZAPIS");?><span class="p-modul-warning"><?
    $part = "";
    $part2 = "partnerlatinica";
    $mod = "";
    $mod2 = "modullatinica";
    if(isset($ms_value['in1'])) {
        if(strlen($ms_value['in1'])>0) {
            $part = $ms_value['in1'];
            $part2 = $part;
        }
    }
    if(isset($ms_value['in2'])) {
        if(strlen($ms_value['in2'])>0) {
            $mod = $ms_value['in2'];
            $mod2= $mod;
        }
    }
    if(strlen($part)>0 || strlen($mod)>0) {
        echo " (".GetMessage("MODULCREATOR_V_PAPKE")." /bitrix/modules/<b>" . $part . "." . $mod . "</b>/)";
    }

    ?></span><br />
    <sup class="cl-red">2</sup> <?=GetMessage("MODULCREATOR_SUP2");?>: /bitrix/modules/<b class="b-put"><span class="s-part"><?=$part2;?></span></b>.<span class="s-mod"><?=$mod2;?></span>/<br />
    <sup class="cl-red">3</sup> <?=GetMessage("MODULCREATOR_SUP3");?>: /bitrix/modules/<span class="s-part"><?=$part2;?></span>.<br class="b-put"><span class="s-mod"><?=$mod2;?></span><br />
    <sup class="cl-red">4</sup> <?=GetMessage("MODULCREATOR_SUP4");?></span><br />
    <sup class="cl-red">5</sup> <?=GetMessage("MODULCREATOR_SUP5");?></span>
<?
echo EndNote();
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_admin.php");
?>