126 lines
5.7 KiB
PHP
Executable File
126 lines
5.7 KiB
PHP
Executable File
<?php
|
|
include_once 'constants.php';
|
|
session_start();
|
|
$dedupHostname = shell_exec("hostname");
|
|
$dedupHostname = trim($dedupHostname);
|
|
?>
|
|
<!----------Dedup popup - Start ---------->
|
|
<div id="selectPathPopup" class="popup_container archive_deleteing_folder_cleanup_popup select-path-popup popLeft" style="display: none;">
|
|
<section class="popup_header">
|
|
<h4>Select location / computer for backup</h4>
|
|
<!-- <span class="popup_close_btn hide_popup"></span> -->
|
|
</section>
|
|
<section class="popup_body">
|
|
<p class="desc-txt"><?php print SELECT_LOCATION_DESC; ?></p>
|
|
<div id="createNewLocation" class="proced-btn">Proceed to create new location with this computer name </div>
|
|
<p class="or-txt">OR</p>
|
|
<div id="linkExistingLocation" class="link-btn">Adopt / Link to an existing location / computer</div>
|
|
<div class="questmark-icon" id="questionmark1"><img src="include/images/Icon-tble.png"></div>
|
|
<div class="clear"></div>
|
|
</section>
|
|
<div class="question-popup">
|
|
<div class="arrow-icon"> </div>
|
|
<p><?php print SELECT_LOCATION_QUEST_DESC; ?></p>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="locationNamePopup" class="popup_container archive_deleteing_folder_cleanup_popup location-name-popup popLeft" style="display: none;">
|
|
<section class="popup_header">
|
|
<h4>Location Name</h4>
|
|
<!-- <span class="popup_close_btn hide_popup"></span> </section> -->
|
|
<section class="popup_body">
|
|
<div class="dedupLocationName common_msg error_msg" style="display: none;">
|
|
<p id="errorMsg">You can use letters, numbers and characters(-_).</p>
|
|
<a class="close_info" href="javascript:void(0)"><img width="16" height="16" src="include/images/close.png" alt="close" title="Close"></a>
|
|
</div>
|
|
<p class="desc-txt-blk">Your computer / location name<input type="text" name="hostName" id="hostName" value="<?php print $dedupHostname; ?>" class="pc-name" maxlength="64" alt="<?php print $dedupHostname; ?>" onblur="validateNewBackupLocation()" onpaste="return false;"></p>
|
|
<div id="createBucket" class="prd-btn">Proceed</div>
|
|
<input type="submit" id="backToSelectLocation" class="scheduleBtn popup_cancelBtn" value="Back">
|
|
<div class="clear"></div>
|
|
</section>
|
|
</div>
|
|
|
|
<div id="locationTablePopup" class="popup_container popContent serach_popup popLeft table-popup" style="display: none;">
|
|
<section class="popup_header">
|
|
<h4>Select location / computer for backup </h4>
|
|
<!-- <span class="popup_close_btn hide_popup"></span> -->
|
|
</section>
|
|
<section class="popup_body">
|
|
<div class="dedupLocationName1 common_msg error_msg" style="display: none;">
|
|
<p id="errorMsg">You can use letters, numbers and characters(-_).</p>
|
|
<a class="close_info" href="javascript:void(0)"><img width="16" height="16" src="include/images/close.png" alt="close" title="Close"></a>
|
|
</div>
|
|
<p><?php print LOCATION_LIST_DESC; ?></p>
|
|
<!-- files table -->
|
|
<div class="exclude popup_set_exclude">
|
|
<div class="excludeContainer">
|
|
<div class="selected_bdr">
|
|
<div class="folderBackupContent selectedFiles_tab">
|
|
<div class="excludeheader header_part ">
|
|
<div class="name-list">Computer Name</div>
|
|
<!-- <div class="link-list">link</div> -->
|
|
<div class="id-list">Device ID</div>
|
|
<div class="os-list">OS</div>
|
|
<div class="time-list">Time</div>
|
|
<div class="ip-list list-width">IP</div>
|
|
</div>
|
|
</div>
|
|
<div class="ajax_loader"></div>
|
|
<div class="nfiles" style="display:none">No Devices</div>
|
|
<div class="excludefiles" style="overflow: hidden;">
|
|
<div class="scrolable-row">
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="folderBackupContent select-loc-tbl">
|
|
<tbody name = "<?php print $dedupHostname; ?>" >
|
|
<?php
|
|
if(isset($_SESSION['deDupDevicesDetail'])){
|
|
foreach($_SESSION['deDupDevicesDetail'] as $device){
|
|
if($device['bucket_type'] == 'D')
|
|
print '<tr class="linkDevice" id="'.$device['device_id'].'"><td class="cont_heading"><span class="truncate-txt" title="'.$device['nick_name'].'">'.$device['nick_name'].'</span></td><td class="truncate-txt" title="'.$device['device_id'].'">'.$device['device_id'].'</td><td>'.$device['os'].'</td><td>'.$device['bucket_ctime'].'</td><td>'.$device['ip'].'</td></tr>';
|
|
}
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- selected_bdr -->
|
|
</div>
|
|
</div>
|
|
<!-- End file table -->
|
|
<div class="clear"></div>
|
|
</section>
|
|
<section class="popup_footer">
|
|
<div class="pop-footer-txt"><!-- <a href="#">What happens when i adopt another computer?</a> --></div>
|
|
<div class="btncontainer">
|
|
<div class="questmark-icon" id="questionmark2"><img src="include/images/Icon-tble.png"></div>
|
|
<input type="submit" id="adoptSelectedLocation" class="scheduleBtn" value="Adopt / link Selected Location">
|
|
<input type="submit" id="backToSelectLocation" class="scheduleBtn popup_cancelBtn" value="Back">
|
|
</div>
|
|
<div class="question-popup2">
|
|
<div class="arrow-icon"> </div>
|
|
<p><?php print SELECT_LOCATION_QUEST_DESC; ?></p>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
<!----------Dedup popup - End ---------->
|
|
<script>
|
|
$( "#questionmark1" ).mouseenter(function() {
|
|
$('.question-popup').show();
|
|
}).mouseleave(function() {
|
|
$('.question-popup').hide();
|
|
});
|
|
|
|
$( "#questionmark2" ).mouseenter(function() {
|
|
$('.question-popup2').show();
|
|
}).mouseleave(function() {
|
|
$('.question-popup2').hide();
|
|
});
|
|
function validateNewBackupLocation(){
|
|
var hostName = jQuery("#hostName").val();
|
|
hostName = hostName.trim();
|
|
if(hostName==''){
|
|
hostName = jQuery("#hostName").attr('alt');
|
|
jQuery("#hostName").val(hostName);
|
|
}
|
|
}
|
|
</script>
|