<commit_before><?php
    /**
     *
     * (c) Copyright Ascensio System SIA 2021
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *     http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     *
     */

    require_once( dirname(__FILE__) . '/config.php' );
    require_once( dirname(__FILE__) . '/common.php' );
    require_once( dirname(__FILE__) . '/functions.php' );
    require_once( dirname(__FILE__) . '/users.php' );

    $user = $_GET["user"];
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width" />
        <title>ONLYOFFICE Document Editors</title>

        <link rel="icon" href="./favicon.ico" type="image/x-icon" />

        <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&subset=latin,cyrillic-ext,cyrillic,latin-ext" />

        <link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
        <link rel="stylesheet" type="text/css" href="css/media.css">
        <link rel="stylesheet" type="text/css" href="css/jquery-ui.css" />
    </head>
    <body>
        <form id="form1">
            <header>
                <div class="center">
                    <a href="">
                        <img src ="css/images/logo.svg" alt="ONLYOFFICE" />
                    </a>
                </div>
            </header>
            <div class="center main">
                <table class="table-main">
                    <tbody>
                        <tr>
                            <td class="left-panel section">
                                <div class="help-block">
                                    <span>Create new</span>
                                    <div class="clearFix">
                                        <div class="create-panel clearFix">
                                            <ul class="try-editor-list clearFix">
                                                <li>
                                                    <a class="try-editor word reload-page" target="_blank" href="doceditor.php?fileExt=docx&user=<?php echo htmlentities($user); ?>">Document</a>
                                                </li>
                                                <li>
                                                    <a class="try-editor cell reload-page" target="_blank" href="doceditor.php?fileExt=xlsx&user=<?php echo htmlentities($user); ?>">Spreadsheet</a>
                                                </li>
                                                <li>
                                                    <a class="try-editor slide reload-page" target="_blank" href="doceditor.php?fileExt=pptx&user=<?php echo htmlentities($user); ?>">Presentation</a>
                                                </li>
                                                <li>
                                                    <a class="try-editor form reload-page" target="_blank" href="doceditor.php?fileExt=docxf&user=<?php echo htmlentities($user); ?>">Form template</a>
                                                </li>
                                            </ul>
                                            <label class="create-sample">
                                                <input type="checkbox" id="createSample" class="checkbox" />With sample content
                                            </label>
                                        </div>
                                        <div class="upload-panel clearFix">
                                            <a class="file-upload">Upload file
                                                <input type="file" id="fileupload" name="files" data-url="webeditor-ajax.php?type=upload&user=<?php echo htmlentities($user); ?>" />
                                            </a>
                                        </div>

                                        <table class="user-block-table" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td valign="middle">
                                                    <span class="select-user">Username</span>
                                                    <img class="info" src="css/images/info.svg" />
                                                    <select class="select-user" id="user">
                                                        <?php foreach(getAllUsers() as $user_l) {
                                                            $name = $user_l->name ? $user_l->name : "Anonymous";
                                                            echo '<option value="'.$user_l->id.'">'.$name.'</option>';
                                                        } ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="middle">
                                                    <span class="select-user">Language editors interface</span>
                                                    <select class="select-user" id="language">
                                                        <?php foreach ($GLOBALS['LANGUAGES'] as $key => $language) { ?>
                                                            <option value=" <?=$key?> "> <?=$language?> </option>
                                                        <?php } ?>
                                                    </select>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                            </td>
                            <td class="section">
                                <div class="main-panel">
                                    <?php
                                    $storedFiles = getStoredFiles();
                                    if (!empty($storedFiles)): ?>
                                        <div id="portal-info" style="display: none">
                                    <?php else: ?>
                                        <div id="portal-info" style="display: table-cell">
                                    <?php endif; ?>
                                        <span class="portal-name">ONLYOFFICE Document Editors – Welcome!</span>
                                        <span class="portal-descr">
                                            Get started with a demo-sample of ONLYOFFICE Document Editors, the first html5-based editors.
                                            <br /> You may upload your own documents for testing using the "<b>Upload file</b>" button and <b>selecting</b> the necessary files on your PC.
                                        </span><commit_msg>php: bugfix<commit_after><?php
    /**
     *
     * (c) Copyright Ascensio System SIA 2021
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *     http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     *
     */

    require_once( dirname(__FILE__) . '/config.php' );
    require_once( dirname(__FILE__) . '/common.php' );
    require_once( dirname(__FILE__) . '/functions.php' );
    require_once( dirname(__FILE__) . '/users.php' );

    $user = $_GET["user"];
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width" />
        <title>ONLYOFFICE Document Editors</title>

        <link rel="icon" href="./favicon.ico" type="image/x-icon" />

        <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&subset=latin,cyrillic-ext,cyrillic,latin-ext" />

        <link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
        <link rel="stylesheet" type="text/css" href="css/media.css">
        <link rel="stylesheet" type="text/css" href="css/jquery-ui.css" />
    </head>
    <body>
        <form id="form1">
            <header>
                <div class="center">
                    <a href="">
                        <img src ="css/images/logo.svg" alt="ONLYOFFICE" />
                    </a>
                </div>
            </header>
            <div class="center main">
                <table class="table-main">
                    <tbody>
                        <tr>
                            <td class="left-panel section">
                                <div class="help-block">
                                    <span>Create new</span>
                                    <div class="clearFix">
                                        <div class="create-panel clearFix">
                                            <ul class="try-editor-list clearFix">
                                                <li>
                                                    <a class="try-editor word reload-page" target="_blank" href="doceditor.php?fileExt=docx&user=<?php echo htmlentities($user); ?>">Document</a>
                                                </li>
                                                <li>
                                                    <a class="try-editor cell reload-page" target="_blank" href="doceditor.php?fileExt=xlsx&user=<?php echo htmlentities($user); ?>">Spreadsheet</a>
                                                </li>
                                                <li>
                                                    <a class="try-editor slide reload-page" target="_blank" href="doceditor.php?fileExt=pptx&user=<?php echo htmlentities($user); ?>">Presentation</a>
                                                </li>
                                                <li>
                                                    <a class="try-editor form reload-page" target="_blank" href="doceditor.php?fileExt=docxf&user=<?php echo htmlentities($user); ?>">Form template</a>
                                                </li>
                                            </ul>
                                            <label class="create-sample">
                                                <input type="checkbox" id="createSample" class="checkbox" />With sample content
                                            </label>
                                        </div>
                                        <div class="upload-panel clearFix">
                                            <a class="file-upload">Upload file
                                                <input type="file" id="fileupload" name="files" data-url="webeditor-ajax.php?type=upload&user=<?php echo htmlentities($user); ?>" />
                                            </a>
                                        </div>

                                        <table class="user-block-table" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td valign="middle">
                                                    <span class="select-user">Username</span>
                                                    <img class="info" src="css/images/info.svg" />
                                                    <select class="select-user" id="user">
                                                        <?php foreach(getAllUsers() as $user_l) {
                                                            $name = $user_l->name ? $user_l->name : "Anonymous";
                                                            echo '<option value="'.$user_l->id.'">'.$name.'</option>';
                                                        } ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="middle">
                                                    <span class="select-user">Language editors interface</span>
                                                    <select class="select-user" id="language">
                                                        <?php foreach ($GLOBALS['LANGUAGES'] as $key => $language) { ?>
                                                            <option value="<?=$key?>"><?=$language?></option>
                                                        <?php } ?>
                                                    </select>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                            </td>
                            <td class="section">
                                <div class="main-panel">
                                    <?php
                                    $storedFiles = getStoredFiles();
                                    if (!empty($storedFiles)): ?>
                                        <div id="portal-info" style="display: none">
                                    <?php else: ?>
                                        <div id="portal-info" style="display: table-cell">
                                    <?php endif; ?>
                                        <span class="portal-name">ONLYOFFICE Document Editors – Welcome!</span>
                                        <span class="portal-descr">
                                            Get started with a demo-sample of ONLYOFFICE Document Editors, the first html5-based editors.
                                            <br /> You may upload your own documents for testing using the "<b>Upload file</b>" button and <b>selecting</b> the necessary files on your PC.
                                        </span>
{'fraction_non_alphanumeric': 0.1109603205376761, 'fraction_numerical': 0.005169962517771746, 'mean_word_length': 0.8992390770741286, 'pattern_counts': {'":': 0, '<': 227, '<?xml version=': 0, '>': 235, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 224, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2753182', 'n_tokens_mistral': 3178, 'n_tokens_neox': 3048, 'n_words': 743}