<?php
/*
*
* (c) Copyright Ascensio System Limited 2010-2017
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
?>
<?php
require_once( dirname(__FILE__) . '/config.php' );
require_once( dirname(__FILE__) . '/common.php' );
require_once( dirname(__FILE__) . '/functions.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" />
<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/jquery-ui.css" />
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery.blockUI.js"></script>
<script type="text/javascript" src="js/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="js/jquery.fileupload.js"></script>
<script type="text/javascript" src="js/jquery.dropdownToggle.js"></script>
<script type="text/javascript">
var ConverExtList = '<?php echo implode(",", $GLOBALS["DOC_SERV_CONVERT"]) ?>';
var EditedExtList = '<?php echo implode(",", $GLOBALS["DOC_SERV_EDITED"]) ?>';
</script>
</head>
<body>
<form id="form1">
<header>
<a href="/">
<img src ="css/images/logo.png" alt="ONLYOFFICE" />
</a>
</header>
<div class="main-panel">
<span class="portal-name">ONLYOFFICE Document Editors – Welcome!</span>
<br />
<br />
<span class="portal-descr">Get started with a demo-sample of ONLYOFFICE Document Editors, the first html5-based editors. You may upload your own documents for testing using the "Upload file" button and selecting the necessary files on your PC.</span>
<table class="user-block-table" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" width="30%">
<span class="select-user">Username:</span>
<select class="select-user" id="user">
<option value="0">Jonn Smith</option>
<option value="1">Mark Pottato</option>
<option value="2">Hamish Mitchell</option>
</select>
</td>
<td valign="middle" width="70%">Select user name before opening the document; you can open the same document using different users in different Web browser sessions, so you can check out multi-user editing functions.</td>
</tr>
<!--<tr>
<td valign="middle" width="30%">
<select class="select-user" id="language">
<option value="en" selected>English</option>
<option value="de">Deutsch</option>
<option value="es">Espanol</option>
<option value="fr">Francais</option>
<option value="it">Italiano</option>
<option value="pt">Portuguese</option>
<option value="ru">Русский</option>
<option value="sl">Slovenian</option>
</select>
</td>
<td valign="middle" width="70%">Choose the language for ONLYOFFICE™ editors interface.</td>
</tr>-->
</table>
<br />
<br />
<div class="help-block">
<span>Upload your file or create new file</span>
<br />
<br />
<div class="clearFix">
<div class="upload-panel clearFix">
<a class="file-upload">Upload
<br />
File
<input type="file" id="fileupload" name="files" data-url="webeditor-ajax.php?type=upload" />
</a>
<br />
<label class="save-original">
<input type="checkbox" id="checkOriginalFormat" class="checkbox" />Keep file format
</label>
</div>
<div class="create-panel clearFix">
<ul class="try-editor-list clearFix">
<li>
<a class="try-editor document reload-page" target="_blank" href="doceditor.php?fileExt=docx&user=<?php echo $user; ?>">Create
<br />
Document</a>
</li>
<li>
<a class="try-editor spreadsheet reload-page" target="_blank" href="doceditor.php?fileExt=xlsx&user=<?php echo $user; ?>">Create
<br />
Spreadsheet</a>
</li>
<li>
<a class="try-editor presentation reload-page" target="_blank" href="doceditor.php?fileExt=pptx&user=<?php echo $user; ?>">Create
<br />
Presentation</a>
</li>
</ul>
<label class="create-sample">
<input type="checkbox" id="createSample" class="checkbox" />Create a file filled with sample content
</label>
</div>
</div>
</div>
<br />
<br />
<div class="help-block">
<span>Your documents</span>
<br />
<br />
<div class="stored-list">
<div id="UserFiles">
<table cellspacing="0" cellpadding="0" width="100%">
<thead>
<tr class="tableHeader">
<td class="tableHeaderCell tableHeaderCellFileName">Fi