<!--

Script of the home page when using a mobile device

-->

<!-- Custom styling for mobile phone -->
<style>
.main {
	width: 100%;
	height: 100%;
}
.MainContent {
	width: 100%;
	position: relative;
}
.FormContent {
	height: 300px;
	width: 95%;
}
/*.progressround {
	padding-top: 200px;
}
.progresssuccess {
	padding-top: 220px;
}*/
#downloadError {
	height: 300px;
	text-align: center;
}
#downloadSuccess {
	height: 250px;
}
.buttonSection {
	position: relative;
}
</style>

<nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a href="../../../index.php"><img src="<?php echo $logo_path; ?>" alt="Logo" style="max-height: 40px; margin-top: 10px; margin-left: 5px;"></a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li><a href="#" data-toggle="modal" data-target="#modalLang"><?php echo $text['change_language']; ?></a></li>
        <li><a href="#" data-toggle="modal" data-target="#modalTerms"><?php echo $text['terms_service']; ?></a></li>
        <li><a href="#" data-toggle="modal" data-target="#modalAbout"><?php echo $text['about_us']; ?></a></li>
        <?php
        // Output the sidebar tabs from the plugins
        echo $plugin_sidebar_tabs;
        ?>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

<body id="body">
	<div class="social" id="uploadingDivSocial" style="display: none;"></div>
	<div class="social" id="uploadDivSocial" style="display: none;"></div>
	<?php
	if($ad_2_enabled == 'true'):
	?>
		<div id="ad_2_div" style="margin-left: auto; margin-right: auto; width: 234px; height: 60px;">
			<?php echo $ad_2_code; ?>
		</div>
		<hr>
	<?php
	endif;
	?>
	<div class="MainContent">
		<?php
		$check_id = $get_info->num_rows;
		if(isset($_GET['download'])) :
			$rows = $get_info->fetch_assoc();
			if($check_id == 1 && $rows['status'] == 'ready') :
				if($get_email->num_rows > 0 && $get_downloads->num_rows == 0 && $rows['destruct'] == 'YES' || $check_receiver->num_rows == 0 && $rows['share'] == 'link' || $get_email > 0 && $rows['share'] == 'mail' && $rows['destruct'] == 'NO' || $get_uploader->num_rows > 0 && $rows['share'] == 'mail') :
					?>
                    <div class="modal fade" id="flagModal" tabindex="-1" role="dialog" aria-labelledby="flagModalLabel" aria-hidden="true">
                        <form method="POST" action="src/action.php">
                            <input type="hidden" name="action" value="report">
                            <input type="hidden" name="id" value="<?php echo $_GET['download']; ?>">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                        <h4 class="modal-title" id="flagModalLabel"><?php echo $text['report_file']; ?></h4>
                                    </div>
                                    <div class="modal-body" style="text-align: center;">
                                        <i class="fa fa-exclamation-triangle fa-5x"></i><br>
                                        <?php echo $text['report_file_text']; ?>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $text['close']; ?></button>
                                        <input type="submit" class="btn btn-danger" value="<?php echo $text['report']; ?>">
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <?php
                    if($rows['password'] != 'EMPTY') :
					?>	
						<div class="main" id="downloadDiv">
							<div style="width: 160px; margin-left: auto; margin-right: auto; text-align:center;" id="downloadForm">
								<div id="downloadLogo"><i class="fa fa-lock fa-5x" style="padding-top: 35px;"></i></div>
								<p id="statusDownload" style="padding-top: 30px;"><?php echo $text['fill_password']; ?>:</p>
								<form id="downloadPassword" action="src/action.php" method="post">
									<div class="form-group">
										<input type="hidden" name="action" id="action" value="download">
										<input type="hidden" name="secret_code" id="secret_code" value="<?php echo $rows['secret_code']; ?>">
										<input type="hidden" name="download_id" id="download_id" value="<?php echo $download_id; ?>">
										<input type="hidden" name="private_id" id="private_id" value="<?php echo $_GET['p']; ?>">
										<input type="password" class="form-control input-sm" id="password" name="password" placeholder="<?php echo $text['password']; ?>" autocomplete="off" required>
									</div>
									<?php
									if($rows['destruct'] == 'YES') :
									?>
									<input type="submit" class="btn btn-default btn-block btn-sm" id="submitpass" value="<?php echo $text['download']; ?> & <?php echo $text['destruct']; ?>">
									<?php
									else :
									?>
									<input type="submit" class="btn btn-default btn-block btn-sm" id="submitpass" value="<?php echo $text['download']; ?>">
									<?php
									endif;
									?>
								</form>
							</div>
							<div id="downloadSuccess">
								<div style="text-align:center; padding-top: 25px;"><i class="fa fa-check-circle-o fa-5x"></i></div>
								<div style="padding-top: 15px;">
									<p><?php echo $text['download_started']; ?></p>
								</div>
								<div class="buttonSection" style="width: 70%;">
									<a class="btn btn-default btn-block btn-sm" href="<?php echo $site_url; ?>"><?php echo $text['ok']; ?></a>
								</div>
							</div>										
						</div>
					<?php
					else:
					?>
						<div class="main" id="downloadDiv">
							<div style="width: 70%; margin-left: auto; margin-right: auto; font-size: 13px;" id="downloadForm">
								<form id="downloadItems" action="src/action.php" method="post">
									<input type="hidden" name="action" id="action" value="download">
									<input type="hidden" name="secret_code" id="secret_code" value="<?php echo $rows['secret_code']; ?>">
									<input type="hidden" name="download_id" id="download_id" value="<?php echo $download_id; ?>">
									<input type="hidden" name="private_id" id="private_id" value="<?php echo $_GET['p']; ?>">
									<div style="text-align:center;"><i class="fa fa-cloud-download fa-3x"></i></div>
									<div style="padding-top: 5px;">
										<table>
											<tr>
												<td><b><?php echo $text['total_size']; ?>:</b></td>
												<td class="td_2"><?php echo (($rows['size'] < 1048576)? round($rows['size'] / 1024, 2) . ' KB' : round($rows['size'] / 1048576, 2) . ' MB'); ?></td>
											</tr>
											<tr>
												<td><b><?php echo $text['total_files']; ?>:</b></td>
												<td class="td_2"><?php echo $rows['count']; ?></td>
											</tr>
											<tr>
												<td><b><?php echo $text['destructed_on']; ?>:</b></td>
												<td class="td_2"><?php echo date("Y-m-d", $rows['time_expire']); ?></td>
											</tr>
											<tr>
												<td><b><?php echo $text['download_id']; ?>:</b></td>
												<td class="td_2"><?php echo $download_id; ?></td>
											</tr>
										</table>
										<b><?php echo $text['files']; ?>:</b>
										<div style="height: 50px; overflow-x: hidden;">
										<ul>
										<?php
										$get_files = $mysqli->query("SELECT * FROM $table_files WHERE upload_id='$download_id'");
										while($row = $get_files->fetch_assoc()) {
											echo '<li>' . $row['file'] . '</li>';
										}
										?>
										</ul>
										</div>
										<?php
										if(!empty($rows['message'])) :
										?>
										<b><?php echo $text['message']; ?>:</b>
										<div style="height: 50px; overflow: auto;">
										<?php echo $rows['message']; ?>
										</div>
										<?php else: ?>
										<div style="height: 70px; display: invisible;"></div>
										<?php
										endif;
										?>	
									</div>
									<div class="buttonSection" style="width: 100%;">
										<div style="float: left; width: 70%;">
											<?php
											if($rows['destruct'] == 'YES') :
											?>
											<input type="submit" class="btn btn-default btn-block btn-sm" id="submitdownload" value="<?php echo $text['download']; ?> & <?php echo $text['destruct']; ?>">
											<?php
											else :
											?>
											<input type="submit" class="btn btn-default btn-block btn-sm" id="submitdownload" value="<?php echo $text['download']; ?>">
											<?php
											endif;
											?>
										</div>
										<div style="float: left; width: 30%; padding-left: 10px;">
											<a class="btn btn-danger btn-block btn-sm" data-toggle="modal" data-target="#flagModal"><i class="fa fa-flag"></i></a> 
										</div>
									</div>
								</form>
							</div>
							<div id="downloadSuccess" style="width: 300px; margin-left: auto; margin-right: auto; display: none;">
								<div style="text-align:center; padding-top: 20px;"><i class="fa fa-check-circle-o fa-3x"></i></div>
								<div style="padding-top: 10px;">
									<p><?php echo $text['download_started']; ?></p>
								</div>
								<div class="buttonSection" style="width: 100%; padding-top: 10px;">
									<a class="btn btn-default btn-block btn-sm" href="<?php echo $site_url; ?>"><?php echo $text['ok']; ?></a>
								</div>
							</div>
						</div>
					<?php
					endif;
				else:
				?>
				<!-- End social buttons div -->
				<div class="main" id="downloadDiv">
					<div id="downloadError" style="width: 70%; margin-left: auto; margin-right: auto;">
						<div style="text-align:center; padding-top: 110px;"><i class="fa fa-exclamation-triangle fa-4x"></i></div>
						<div style="padding-top: 15px;">
							<p><?php echo $text['not_allowed']; ?></p>
						</div>
						<div class="buttonSection" style="width: 70%;">
							<a class="btn btn-default btn-block btn-sm" href="<?php echo $site_url; ?>"><?php echo $text['ok']; ?></a>
						</div>
					</div>
				</div>
			    <?php
			    endif;
			elseif($check_id == 1 && $rows['status'] == 'processing') :
			?>
			<div class="main" id="downloadDiv">
				<div id="downloadError">
					<div class="progressImage"><i class="fa fa-clock-o fa-5x"></i></div>
					<div class="progressMessage">
						<p><?php echo $text['upload_processing']; ?></p>
					</div>
					<div class="buttonSection" style="width: 70%;">
						<a class="btn btn-default btn-block btn-sm" href="<?php echo $site_url; ?>"><?php echo $text['ok']; ?></a>
					</div>
				</div>
			</div>
			<?php
			elseif($check_id == 0 || $rows['status'] == 'destroyed'):
			?>
			<div class="main" id="downloadDiv">
				<div id="downloadError" style="width: 70%; margin-left: auto; margin-right: auto;">
					<div style="text-align:center; padding-top: 110px;"><i class="fa fa-question-circle fa-5x"></i></div>
					<div style="padding-top: 15px; font-size: 14px;">
						<p><?php echo $text['upload_not_found']; ?></p>
					</div>
					<div class="buttonSection" style="width: 70%;">
						<a class="btn btn-default btn-block btn-sm" href="<?php echo $site_url; ?>"><?php echo $text['ok']; ?></a>
					</div>
				</div>
			</div>
			<?php
			endif;
		//Normal home page
		else :
			if($_COOKIE['droppy_terms'] != '1' && $accept_terms_enabled == 'yes') :
			?>
				<div class="main" id="cookieDiv">
					<div id="downloadError" style="width: 70%; margin-left: auto; margin-right: auto; font-size: 14px;">
						<div class="progressImage"><i class="fa fa-globe fa-5x"></i></div>
						<div class="progressMessage">
							<p><?php echo $text['accept_terms']; ?></p>

							<div style="text-align: center;">
								<p><a href="#" data-toggle="modal" data-target="#modalTerms"><?php echo $text['view_terms']; ?></a></p>
							</div>
						</div>
						<div class="buttonSection" style="width: 100%; margin-top: 40px;">
							<a class="btn btn-default btn-block btn-sm" href="src/action.php?action=acceptterms"><i class="fa fa-check"></i> <?php echo $text['accept']; ?></a>
						</div>
					</div>
				</div>
			<?php
			else:
			?>
			<form enctype="multipart/form-data" id="uploadForm">
			<div id="customValues"></div>
				<div id="modalSettings" class="modal fade" role="dialog">
				  <div class="modal-dialog">
				    <!-- Modal content-->
				    <div class="modal-content">
				      <div class="modal-header">
				        <button type="button" class="close" data-dismiss="modal">&times;</button>
				        <h4 class="modal-title"><?php echo $text['upload_settings']; ?></h4>
				      </div>
				      <div class="modal-body">
				        <p><b><?php echo $text['share_type']; ?>: <i class="fa fa-question-circle" data-toggle="tooltip" title="<?php echo $text['share_type_text']; ?>"></i></b></p>
						<div class="btn-group" data-toggle="buttons">
						  <label class="btn btn-default btn-sm <?php if($default_sharetype == 'mail') { echo 'active'; } ?>">
						    <input type="radio" name="options" id="option1" onchange="shareEmail();" <?php if($default_sharetype == 'mail') { echo 'checked=""'; } ?> > <?php echo $text['email']; ?>									  </label>
						  <label class="btn btn-default btn-sm <?php if($default_sharetype == 'link') { echo 'active'; } ?>">
						    <input type="radio" name="options" id="option2" onchange="shareLink();" <?php if($default_sharetype == 'link') { echo 'checked=""'; } ?> > <?php echo $text['link']; ?>									  </label>
						  <input type="hidden" name="share" id="share" value="mail">
						</div>
						<p style="padding-top: 15px;"><b><?php echo $text['destruct_file']; ?>:</b> <i class="fa fa-question-circle" data-toggle="tooltip" title="<?php echo $text['destruct_text']; ?>"></i></p>
						<div class="btn-group" data-toggle="buttons">
						<?php
						if($default_destruct == 'no') :
						?>
						  <label class="btn btn-default btn-sm active">
						    <input type="radio" name="options" id="option3" onchange="destructFalse();" checked=""><?php echo $text['no']; ?></label>
						  <label class="btn btn-default btn-sm">
						    <input type="radio" name="options" id="option4" onchange="destructTrue();"><?php echo $text['yes']; ?>									  </label>
						  <input type="hidden" name="destruct" id="destruct" value="no">
						<?php
						else:
						?>
						  <label class="btn btn-default btn-sm active">
						    <input type="radio" name="options" id="option3" onchange="destructTrue();" checked=""><?php echo $text['yes']; ?></label>
						  <label class="btn btn-default btn-sm">
						    <input type="radio" name="options" id="option4" onchange="destructFalse();"><?php echo $text['no']; ?>									  </label>
						  <input type="hidden" name="destruct" id="destruct" value="yes">
						<?php
						endif;
						?>
						</div>
						<?php
						if($pm_pass_enabled == 'false' || $password_enabled == 'false') :
						?>
						<p style="padding-top: 15px;"><b><?php echo $text['protect_with_pass']; ?>: <i class="fa fa-question-circle" data-toggle="tooltip" title="<?php echo $text['password_text']; ?>"></i></b></p>
						<div class="input-group">
							<input type="password" class="form-control input-sm" name="password" id="password" placeholder="<?php echo $text['not_available_pass']; ?>" readonly>
						</div>
						<i style="font-size: 12px;">(<?php echo $text['leave_empty_password']; ?>)</i>
						<?php
						else:
						?>
						<p style="padding-top: 15px;"><b><?php echo $text['protect_with_pass']; ?>: <i class="fa fa-question-circle" data-toggle="tooltip" title="<?php echo $text['password_text']; ?>"></i></b></p>
						<div class="input-group">
							<input type="password" class="form-control input-sm" name="password" id="password" placeholder="<?php echo $text['password']; ?>">
						</div>
						<i style="font-size: 12px;">(<?php echo $text['leave_empty_password']; ?>)</i>
						<?php
						endif;
						?>
						<div style="padding-top: 10px;">
							<button type="button" class="btn btn-default btn-block btn-sm" class="close" data-dismiss="modal"><?php echo $text['save']; ?></button>
						</div>
				      </div>
				    </div>

				  </div>
				</div>

				<!-- Normal view div -->
				<div class="main" id="uploadDiv" style="position: relative;">		
					<div class="FormContent">
						<div id="errorDiv">
							<?php
							if(isset($_GET['e']) == 'wrong') {
								echo '<div class="alert alert-danger" role="alert">' . $text['invalid_pass'] . '</div>';
							}
							?>
						</div>
						<div class="upload_section" id="upload_section">
							<div id="upload-form-list">
								<table id="uploaded-file">
									<tr>
										<td><span data-dz-remove class="file-remove-btn"><i class="fa fa-times-circle"></i></span></td>
										<td><span data-dz-name class="file-title"></span></td>
									</tr>
								</table>
							</div>
							<button id="files" class="btn btn-default btn-xs" onclick="return false;"><i class="fa fa-plus"></i> <?php echo $text['select_files']; ?> <span id="total_upload_size">(<?php if($max_size < 1024) { echo $text['max'] . ' ' . $max_size . ' MB'; } else { echo $text['max'] . ' ' . round($max_size / 1024, 2) . ' GB'; } ?>)</span></button>
						</div>
						<br>
						<?php
						if(empty($default_email_to)) :
						?>
						<div class="EmailToSection" id="EmailToSection">
							<div class="form-group" id="receivers" class="receivers" style="display: none;">
								<div id="receiverHiddenList"></div>
								<div id="receiverList" class="receiverList" style="display: none; font-size: 12px;"></div>
							</div>				
							<input type="email" class="form-control input-sm" id="emailTo" name="email_to[]" placeholder="<?php echo $text['enter_email']; ?>" required="required">
							<div style="padding-top: 5px;"><a onclick="addReceiver()" class="btn btn-default btn-xs" style="width: 100%;" id="addReceiver"><?php echo $text['add_more']; ?></a></div>
						</div>
						<?php
						else:
						?>
						<div class="EmailToSection" id="EmailToSection">			
							<input type="email" class="form-control input-sm" id="emailTo" name="email_to[]" value="<?php echo $default_email_to; ?>" required="required" readonly>
						</div>
						<?php
						endif;
						?>
						<div class="EmailFromSection" id="EmailFromSection">
							<div class="form-group">
								<?php 
								if(isset($_SESSION['droppy_user'])) :
								?>
								<input type="email" class="form-control input-sm" id="emailFrom" name="email_from" value="<?php echo $_SESSION['droppy_user']; ?>" required="required">
								<?php
								else:
								?>
								<input type="email" class="form-control input-sm" id="emailFrom" name="email_from" placeholder="<?php echo $text['enter_own_email']; ?>" required="required">
								<?php
								endif;
								?>
							</div>
						</div>
						<div class="MessageSection">
							<div class="form-group">
								<textarea class="form-control input-sm" style="resize: none; height: 75px;" name="message" id="message" placeholder="<?php echo $text['message_receiver']; ?>" maxlength="1000"></textarea>
							</div>
						</div>
						<div class="buttonSection">
							<div style="width: 100%;">
								<button type="button" class="btn btn-success btn-sm btn-block" id="settingsButton" data-toggle="modal" data-target="#modalSettings"><i class="fa fa-cog"></i> <?php echo $text['upload_settings'] ?></button>
							</div>
							<div style="width: 100%; padding-top: 10px;">
								<button type="button" class="btn btn-info btn-block btn-sm" id="submit_upload"><?php echo $text['share_files']; ?></button>
							</div>
						</div>
					</div>
				</div>		
			</form>
			<?php
			endif;
		endif;
		?>
	</div>
	<!-- Progress and succes div -->
	<div class="main" id="uploadingDiv" style="display: none; text-align: center;">
		<div id="uploadProcess" class="progressround">			
			<input type="text" value="" class="progressCircle" id="progresscircle">
			<div id="progressMb" style="padding-top: 20px; text-align: center; font-size: 13px;"></div>
            <a class="btn btn-default btn-xs" id="cancelUpload" style="width: 200px; margin-top: 10px;">Cancel</a>
		</div>
		<div id="uploadSuccess" class="progresssuccess" style="display: none;">
			<img src="<?php echo $theme_path; ?>images/loader.gif" alt="Upload success" width="180" height="180">
			<h2 style="text-align: center;"><?php echo $text['success']; ?></h2>
			<div id="linkMessage" style="display: none; font-size: 14px;">
				<p><?php echo $text['success_link']; ?></p>
				<div id="downloadLink"></div>
			</div>
			<div id="emailMessage" style="display: none; font-size: 14px; margin-left: 15px;">
				<p><?php echo $text['success_email']; ?></p>
			</div>
			<div class="buttonSection" style="bottom: -40px;">
				<div id="copyButton" style="display: none;"></div>
				<div id="okButton">
					<a href="<?php echo $site_url; ?>" class="btn btn-success btn-block btn-sm"><?php echo $text['ok']; ?></a>
				</div>
			</div>
		</div>
	</div>

    <div id="modalTerms" class="modal fade" role="dialog">
        <div class="modal-dialog">
            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal-header" style="min-height: 50px;">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                </div>
                <div class="modal-body">
                    <?php
                    echo $terms_text;
                    ?>
                </div>
            </div>
        </div>
    </div>

    <div id="modalAbout" class="modal fade" role="dialog">
        <div class="modal-dialog">
            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal-header" style="min-height: 50px;">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                </div>
                <div class="modal-body">
                    <?php
                    echo $about_text;
                    ?>
                </div>
            </div>
        </div>
    </div>

    <div id="modalLang" class="modal fade" role="dialog">
        <div class="modal-dialog">
            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal-header" style="min-height: 50px;">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                </div>
                <div class="modal-body">
                    <p><?php echo $text['select_pref_lang']; ?>:</p>
                    <select class="form-control" onchange="changeLanguage()" id="languagePicker">
                        <option disabled selected> -- <?php echo $text['select_language']; ?> -- </option>
                        <?php
                        $get_language = $mysqli->query("SELECT * FROM $table_language");
                        while($lang = $get_language->fetch_assoc())
                        {
                            echo '<option value="' . $lang['name'] . '">' . $lang['name'] . '</option>';
                        }
                        ?>
                    </select>
                </div>
            </div>
        </div>
    </div>

    <?php
    // Get the plugin pages.
    if(is_array($plugin_pages)) {
        foreach ($plugin_pages as $page) {
            foreach ($page as $p) {
                if ($p['type'] == 'tab_page') {
                    echo '<div id="customTab_' . $p['id'] . '_body" class="modal fade" role="dialog">
                          <div class="modal-dialog">
                            <!-- Modal content-->
                            <div class="modal-content" style="min-height: 390px;">
                                <div class="modal-header" style="min-height: 50px;">
                                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                                </div>
                                <div class="modal-body" style="overflow-x: auto;">
                                    <div style="position: relative;">';
                    require_once $p['path'];
                    echo '				</div>
                                </div>
                            </div>
                        </div>
                    </div>';
                }
            }
        }
    }
 	?>

<!-- Loading Bootstrap -->
<script src="<?php echo $theme_path; ?>js/bootstrap.min.js"></script>

<!-- Loading tools -->
<script src="<?php echo $theme_path; ?>js/jquery.knob.min.js"></script>
<script src="src/plugins/clipboard/ZeroClipboard.js"></script>
<script src="<?php echo $theme_path; ?>js/dropzone.js"></script>

<!-- Loading the droppy javascript -->
<script src="<?php echo $theme_path; ?>js/droppy.js"></script>

<!-- Translating some variables from php to javascript -->
<script type="text/javascript">
var mobileVersion = 'yes';

function activateCopy() {
	console.log('Not available on mobile');
}

$(document).ready(function(){
    $('[data-toggle="tooltip"]').tooltip(); 
});

var maxSize = <?php echo $max_size; ?>;
var maxFiles = <?php echo $max_upload_files; ?>;
var maxSizeBytes = maxSize * 1024 * 1024;
var total_size_left = maxSizeBytes;
var disallowedFiles = "<?php echo $disallowed_types; ?>";
var process_activate = false;
var siteUrl = "<?php echo $site_url; ?>";
var msg_download_started = "<?php echo $text['download_started']; ?>";
var msg_fill_fields = "<?php echo $text['fill_fields']; ?>";
var msg_upload_error = "<?php echo $text['upload_error']; ?>";
var msg_file_to_large = "<?php echo $text['file_to_large']; ?>";
var msg_wrong_pass = "<?php echo $text['wrong_pass']; ?>";
var msg_file_blocked = "<?php echo $text['file_blocked']; ?>";
var msg_max_files = "<?php echo $text['max_files']; ?>";
var msg_copy_url = "<?php echo $text['copy_url']; ?>";
var msg_seconds = "<?php echo $text['msg_seconds']; ?>";
var msg_minutes = "<?php echo $text['msg_minutes']; ?>";
var msg_hours = "<?php echo $text['msg_hours']; ?>";
var msg_remaining = "<?php echo $text['msg_remaining']; ?>";
var msg_uploaded_of = "<?php echo $text['uploaded_of']; ?>";

function ReplaceContentInContainer(matchClass,content)
{
var elems = document.getElementsByTagName('*'),i;
for (i in elems)
    {
    if((" "+elems[i].className+" ").indexOf(" "+matchClass+" ") > -1)
        {
        elems[i].style.height = content;
        }
    }
}

$('#modalSettings').on('shown.bs.modal', function (e) {
  $('#body').removeClass('modal-open');
  document.getElementById('modalSettings').style.visibility = null;
  document.getElementById('modalSettings').style.position = null;
  $('#modalSettings').addClass('modal-open');
  ReplaceContentInContainer('modal-backdrop','100%');
});
$('#modalSettings').on('hidden.bs.modal', function (e) {
   $('#modalSettings').removeClass('modal-open');
   document.getElementById('modalSettings').style.visibility = 'hidden';
   document.getElementById('modalSettings').style.position = 'absolute';
   document.getElementById("modalSettings").style.display = null;
});
</script>
</body>