Files

653 lines
23 KiB
PHP
Executable File

<?php
include_once 'path.php';
if(!isset($_SESSION['validUser']) || $_SESSION['validUser'] !== true)
exit(header("Location:../index.php"));
$pageSubmitted = false;
if($_SESSION['validUser'] === true) {
# If NAS user is not having enough permission on web directory, it will throw 403 Forbidden
# So no need to validate web directory permission
# check here for synology older versions which includes PHP 5.4.0 > VERSION
if(hasPHPSafeModeEnabled()) {
#<Deepak>
//$_SESSION['validUser'] = TRUE;
$servDirErrorMessage = PHP_SAFEMOD_WARNING_MESSAGE;
if(isAJAX()) {
echo json_encode(array(FALSE, PHP_SAFEMOD_WARNING_HEADER));
} else {
echo getDirPermissionHTML(PHP_SAFEMOD_WARNING_HEADER, $servDirErrorMessage);
}
return;
}
# Validate for open_basedir -> /etc:
if($machine == SYNOLOGY_LOCAL && !isOpenBaseDirValid()) {
#<Deepak>
//$_SESSION['validUser'] = TRUE;
if(isAJAX()) {
echo json_encode(array(FALSE, PHP_OPENBASE_DIR_WARNING_HEADER));
} else {
echo getDirPermissionHTML(PHP_OPENBASE_DIR_WARNING_HEADER, PHP_OPENBASE_DIR_MESSAGE);
}
return;
}
/* Checking the directory "idrive" */
if(!is_dir("$webDir/".SERVICE)) {
$IDrivePath = "$webDir/".SERVICE;
/* Creating the directory "idrive" if not exist */
if(!mkdir($IDrivePath, $permissionVal)) {
file_put_contents($temp_file, CMDEXECUTE);
file_put_contents($temp_file,"\nmkdir $IDrivePath\n",FILE_APPEND);
file_put_contents($temp_file,"chmod $permissionVal $IDrivePath\n",FILE_APPEND);
@chmod($temp_file, $permissionVal);
$res = phpScriptExecution(OPERATIONSFILE);
if("" != $res) {
#<Deepak>
//$_SESSION['validUser'] = true;
$resp[] = false;
$resp[] = FAILED_TO_CREATE_DIR."$webDir/".SERVICE.": ".customErrorMsg();
echo json_encode($resp);
return;
}
}
@chmod($IDrivePath, $permissionVal);
}
if(!clearAppUpdateLock()) {
$resp[] = false;
$resp[] = FAILED_TO_CREATE_DIR . $userProfile . ": " . customErrorMsg();
echo json_encode(array(FALSE, APP_UPDATE_IN_PROGRESS));
return;
}
# Check if directory is created and writable
#need to check and update link if not exist.
$servDirPerms = isDirectoryWritable($webDir . '/' . SERVICE);
/*if(!$servDirPerms['is_exists'] || !$servDirPerms['is_writable']) {
$servDirErrorHeader = INSUFFICIENT_PERMISSION_MESSAGE . $_SESSION['nasUserName'];
$resp[] = FALSE;
$resp[] = $servDirErrorHeader;
if(isAJAX()) {
echo json_encode($resp);
} else {
echo getDirPermissionHTML($servDirErrorHeader, '');
}
return;
}*/
/* Checking the directory "cache" */
$cache = "$webDir/".SERVICE."/".CACHE."/";
if(!is_dir($cache)) {
$error= error_get_last();
/* Creating the directory "cache" under "idrive" if not exist */
if(!mkdir($cache, $permissionVal)) {
#<Deepak>
//$_SESSION['validUser'] = true;
$servDirErrorHeader = INSUFFICIENT_PERMISSION_MESSAGE . $_SESSION['nasUserName'];
$resp[] = FALSE;
$resp[] = $servDirErrorHeader;
if(isAJAX()) {
echo json_encode($resp);
} else {
echo getDirPermissionHTML($servDirErrorHeader, '');
}
return;
} else {
@chmod($cache, $permissionVal);
}
}
/* Checking the directory "user profiles" */
$userProfile = "$webDir/" . SERVICE . "/" . USER_PROFILE;
if(!is_dir($userProfile)) {
/* Creating the directory "user profiles" under "idrive" if not exist */
if(!mkdir($userProfile, $permissionVal)) {
#<Deepak>
//$_SESSION['validUser'] = true;
$servDirErrorHeader = INSUFFICIENT_PERMISSION_MESSAGE . $_SESSION['nasUserName'];
$resp[] = FALSE;
$resp[] = $servDirErrorHeader;
if(isAJAX()) {
echo json_encode($resp);
} else {
echo getDirPermissionHTML($servDirErrorHeader, '');
}
return;
} else {
@chmod($userProfile, $permissionVal);
}
}
# Check if directory is created and writable
$servDirPerms = isDirectoryWritable($userProfile);
if(!$servDirPerms['is_exists'] || !$servDirPerms['is_writable']) {
$servDirErrorHeader = INSUFFICIENT_PERMISSION_MESSAGE . $_SESSION['nasUserName'];
$resp[] = FALSE;
$resp[] = $servDirErrorHeader;
if(isAJAX()) {
echo json_encode($resp);
} else {
echo getDirPermissionHTML($servDirErrorHeader, '');
}
@chmod($userProfile, $permissionVal);
return;
}
/* Checking the NAS user directory */
$nasUserDirectory = Scheduler::$nasUser_dir;
if(!is_dir($nasUserDirectory)) {
# Creating the directory "nas" under user profile if not exist
if(!mkdir($nasUserDirectory, $permissionVal)) {
$_SESSION['validUser'] = true;
$resp[] = false;
$resp[] = FAILED_TO_CREATE_DIR . $nasUserDirectory . ": " . $php_errormsg;
echo json_encode($resp);
return;
}
@chmod($nasUserDirectory, $permissionVal);
}
if($_POST) {
$pageSubmitted = true;
$resp = array();
$userName = phpRealEscapeString(strtolower(rawurldecode($_POST["userName"])));
if (strpos($userName, '@') !== false){
$idriveUserArray = getIDriveUsernameList($userName);
if(count($idriveUserArray) == 1){
$userName = $idriveUserArray[0];
$_SESSION['userName'] = $userName;
}
else if(count($idriveUserArray)>1){
$resp[] = false;
$resp[] = "MULTIPLE_ACCOUNT";
$resp[] = $idriveUserArray;
restartSession(); //Restart session
echo json_encode($resp);
exit;
}
}
$accountSettingsFilePath = "$nasUserDirectory/$userName/ACCOUNT_SETTINGS_FILE";
$password = rawurldecode($_POST["passwordHidden"]);
$usrDir = "$nasUserDirectory/$userName";
$temp_file = "$nasUserDirectory/$userName/temp_operationsfile.txt";
if(is_dir($usrDir)) {
file_put_contents($temp_file,DIRREMOVE);
@chmod($temp_file, $permissionVal);
phpScriptExecution(OPERATIONSFILE, "$nasUserDirectory/$userName/");
}
$invalidIDriveUser = false;
$_SESSION['proxyUser'] = '';
$_SESSION['proxyPwd'] = '';
$_SESSION['proxyIP'] = '';
$_SESSION['proxyPort'] = '';
Scheduler::SetSchedulerPath($webDir, $userName, $_SESSION['nasUserName'], $machine);
$out = validateIDriveLoginCGI($password);
if(strpos($out, "SUCCESS") !== FALSE) {
if(isset($_SESSION['multiUser'])) unset($_SESSION['multiUser']);
$_SESSION['userName'] = $userName;
$idriveUser = "$nasUserDirectory/$userName";
updateBackupAndRestoreSetFiles();
if(!is_dir($idriveUser)) {
if(!mkdir($idriveUser, $permissionVal))
{
$resp[] = false;
$resp[] = FAILED_TO_CREATE_DIR."$idriveUser : ".customErrorMsg();
echo json_encode($resp);
exit;
}
@chmod($idriveUser, $permissionVal);
}
//Create .serverAddr.txt
$file = Scheduler::$user_dir.SERVER_ADDR_PATH;
file_put_contents($file, $_SESSION['serverAddr']);
@chmod($file,$permissionVal);
updateServerAddress();
# verify write permission to IDrive directory and su
$phpPath = $appPath . '/' . CONFIG;
/*$appDirPerms = isDirectoryWritable($phpPath);
if(!$appDirPerms['is_writable']) {
$resp[] = FALSE;
$resp[] = str_replace("{:APP_PATH:}", $phpPath, APP_DIR_WRITE_PERM_MISSING);
echo json_encode($resp);
exit;
}*/
// creating default restore location directory
$restoreLocation = Scheduler::$user_dir."RESTORE_DATA";
if(!is_dir($restoreLocation)) {
if(!mkdir($restoreLocation, $permissionVal)){
$resp[] = false;
$resp[] = FAILED_TO_CREATE_DIR.$restoreLocation." : ".customErrorMsg();
echo json_encode($resp);
exit;
}
@chmod($restoreLocation, $permissionVal);
}
// creating backup directory
if(!is_dir(Scheduler::$backup_dir)) {
if(!mkdir(Scheduler::$backup_dir, $permissionVal)){
$resp[] = false;
$resp[] = FAILED_TO_CREATE_DIR.Scheduler::$backup_dir." : ".customErrorMsg();
echo json_encode($resp);
exit;
}
@chmod(Scheduler::$backup_dir, $permissionVal);
$defaultBackupPath = Scheduler::$backup_dir.DEFAULT_BACKUPSET;
if(mkdir($defaultBackupPath, $permissionVal)){
@chmod($defaultBackupPath, $permissionVal);
/* Basavaraj: Removed from createDefaultBackupSet() and pasted here */
$popUpPathFrom = "$webDir/".APPDIR."/".POP_UP_LIST_FILE;
$popUpPathTo = "$nasUserDirectory/$userName/".POP_UP_LIST_FILE;
copy($popUpPathFrom,$popUpPathTo);
}
@chmod($popUpPathTo, $permissionVal);
}
// creating backup search directory added for search
if(!is_dir(Scheduler::$backup_search_dir)) {
if(!mkdir(Scheduler::$backup_search_dir, $permissionVal)){
$resp[] = false;
$resp[] = FAILED_TO_CREATE_DIR.Scheduler::$backup_search_dir." : ".customErrorMsg();
echo json_encode($resp);
exit;
}
@chmod(Scheduler::$backup_search_dir, $permissionVal);
}
// creating restore directory
if(!is_dir(Scheduler::$restore_dir)) {
if(!mkdir(Scheduler::$restore_dir, $permissionVal)){
$resp[] = false;
$resp[] = FAILED_TO_CREATE_DIR.Scheduler::$restore_dir." : ".customErrorMsg();
echo json_encode($resp);
exit;
}
@chmod(Scheduler::$restore_dir, $permissionVal);
}
// creating restore search directory added for search
if(!is_dir(Scheduler::$restore_search_dir)) {
if(!mkdir(Scheduler::$restore_search_dir, $permissionVal)){
$resp[] = false;
$resp[] = FAILED_TO_CREATE_DIR.Scheduler::$restore_search_dir." : ".customErrorMsg();
echo json_encode($resp);
exit;
}
@chmod(Scheduler::$restore_search_dir, $permissionVal);
}
// creating delete directory
if(!is_dir(Scheduler::$delete_dir)) {
if(!mkdir(Scheduler::$delete_dir, $permissionVal)){
$resp[] = false;
$resp[] = FAILED_TO_CREATE_DIR.Scheduler::$delete_dir." : ".customErrorMsg();
echo json_encode($resp);
exit;
}
@chmod(Scheduler::$delete_dir, $permissionVal);
}
// creating delete log directory
if(!is_dir(Scheduler::$delete_log_dir)) {
if(!mkdir(Scheduler::$delete_log_dir, $permissionVal)){
$resp[] = false;
$resp[] = FAILED_TO_CREATE_DIR.Scheduler::$delete_log_dir." : ".customErrorMsg();
echo json_encode($resp);
exit;
}
@chmod(Scheduler::$delete_log_dir, $permissionVal);
}
# create trace directory here at the time of first login
$traceDir = Scheduler::$user_dir.".trace/";
if(!is_dir($traceDir)) {
mkdir($traceDir);
}
@chmod($traceDir, 0777);
// creating full path exclude file with working folder
$excludeFullFile = "$nasUserDirectory/$userName/".FULL_PATH_EXCLUDE_FILE;
excludeworkingfolder();
updateExcludeFiles();
$_SESSION['validUser'] = true;
$_SESSION['userName'] = $userName;
$passwordEscapeString = phpRealEscapeString(urldecode($_POST["passwordHidden"]));
$_SESSION['password'] = base64_encode($passwordEscapeString);
$exp = explode("#",$out);
$exp1 = explode("_",$exp[0]);
// getEVSServerAddr(); //Getting & Assigning EVS server address to session variable
$_SESSION['evswebsrvr'] = $exp1[3];
if($exp1[1]=="SET"){
percentQuotaUsed($exp[1],$exp[2]);
$_SESSION['totalQuota'] = humanReadableSize($exp[2]);
$_SESSION['usedQuota'] = humanReadableSize($exp[1]);
$_SESSION['usedQuotaOrg'] = $exp[1];
if(strpos($exp1[2], "DEFAULT") !== false){
$_SESSION['configVerified'] = true;
$_SESSION['encType'] = "Default";
updateEncType();
$pass = $passwordEscapeString;
encodePathWrapper($pass, "DEFAULT", "");
// getEVSServerAddr(); //Getting & Assigning EVS server address to session variable
if(file_exists($mpc)){
$dir = file_get_contents($mpc);
} else {
$dir = getNAShostname();
}
if(!$_SESSION['dedup'])
$dirOutput = createDir($dir, "", "Default");
$resp[] = true;
$resp[] = "Default";
$resp[] = $userName;
echo json_encode($resp);
exit();
} else{
$resp[] = true;
$resp[] = "Private";
$resp[] = $userName;
$_SESSION['configVerified'] = false;
$_SESSION['encType'] = "Private";
updateEncType();
echo json_encode($resp);
exit();
}
} else {
$resp[] = true;
$resp[] = "NotSet";
$resp[] = $userName;
echo json_encode($resp);
//added by anil on 3jan2019
$_SESSION['totalQuota'] = humanReadableSize($exp[2]);
$_SESSION['usedQuota'] = humanReadableSize($exp[1]);
$_SESSION['usedQuotaOrg'] = $exp[1];
$mpcFilePath = "$nasUserDirectory/$userName/mpc.txt";
@unlink($mpcFilePath);
// new code end's here.
$_SESSION['configVerified'] = false;
@unlink($accountSettingsFilePath); //Added by Senthil for account configuration UI issue
// header("Location:$destinationURL");
exit();
}
} else if(strpos($out, "INVALID_PLAN_TYPE") !== FALSE) {
$invalidIDriveUser = true;
Scheduler::Log('User login failed: '.INVALID_PLAN_TYPE);
$resp[] = false;
$resp[] = INVALID_PLAN_TYPE;
echo json_encode($resp);
restartSession(); //Restart session
exit;
}
else if(strpos($out, "CANCELED_ACC") !== FALSE) {
$invalidIDriveUser = true;
Scheduler::Log('User login failed: '.CANCELED_ACC);
$resp[] = false;
$resp[] = CANCELED_ACC;
echo json_encode($resp);
updateAccountStatus("account has been cancelled");
restartSession(); //Restart session
exit;
}else if(strpos($out, "ACC_UNDER_MAINTENANCE") !== FALSE) {
$invalidIDriveUser = true;
Scheduler::Log('User login failed: '.ACC_UNDER_MAINTENANCE);
$resp[] = false;
$resp[] = ACC_UNDER_MAINTENANCE;
echo json_encode($resp);
updateAccountStatus("account is under maintenance");
restartSession(); //Restart session
exit;
}else if(strpos($out, "BLOCKED_ACC") !== FALSE) {
$invalidIDriveUser = true;
Scheduler::Log('User login failed: '.BLOCKED_ACC);
$resp[] = false;
$resp[] = BLOCKED_ACC;
echo json_encode($resp);
updateAccountStatus("account has been blocked");
restartSession(); //Restart session
exit;
}else if(strpos($out, "windows_user") !== FALSE) {
$invalidIDriveUser = true;
Scheduler::Log('User login failed: '.WINDOWS_USER);
$resp[] = false;
$resp[] = WINDOWS_USER;
echo json_encode($resp);
restartSession(); //Restart session
exit;
}
else if(strpos($out, "nointernet") !== FALSE || strpos($out, "invalidproxy") !== FALSE) {
$invalidIDriveUser = true;
Scheduler::Log('User login failed: ' . NO_INTERNET);
echo json_encode(array(FALSE, NO_INTERNET));
restartSession(); # Restart session
exit;
}
else {
$invalidIDriveUser = true;
Scheduler::Log('User login failed: '.INVALID_CREDENTIAL);
$resp[] = false;
$resp[] = INVALID_CREDENTIAL;
echo json_encode($resp);
restartSession(); //Restart session
exit;
}
} //end of $_POST
else
$_SESSION['multiUser'] = false;
}
$userNameSession = isset($_SESSION['userName'])?$_SESSION['userName']:'';
$passwordSession = isset($passwordEscapeString)?$passwordEscapeString:'';
$encTypeSession = isset($_SESSION['encType'])?$_SESSION['encType']:'';
if($pageSubmitted == false && !isset($_SESSION['configVerified'])){
$displySetting = '';
$displyConfigure = 'none';
$displyGetPrivate = 'none';
} else if(!isset($_SESSION['encType']) && $_SESSION['configVerified'] == false) {
$displySetting = 'none';
$displyConfigure = '';
$displyGetPrivate = 'none';
} else if($_SESSION['encType'] == "Private" && $_SESSION['configVerified'] === FALSE) {
$displySetting = 'none';
$displyConfigure = 'none';
$displyGetPrivate = '';
} else if($_SESSION['encType'] == "Private" && $_SESSION['configVerified'] === true) {
$displySetting = '';
$displyConfigure = 'none';
$displyGetPrivate = 'none';
$encTypeSession = '';
}
//Redirection path to redirect back after IDrive Signup
$signupRedirectPort = ":".$_SERVER['SERVER_PORT'];
$signupRedirectURL = urlencode('http'.(empty($_SERVER['HTTPS'])?'':'s').'://'.$_SERVER['HTTP_HOST'].$signupRedirectPort.dirname($_SERVER['PHP_SELF']));
machineBasedContent($machine);
isRootLevelDisplayEnabled();
$nasUserShellPerm = hasNASUserShellPermission();
$binaryChk = binaryChk();
?>
<div class="container body_wrap account_wrap account_page" <?php print "style='display:$displySetting'"; ?>>
<div class="login-section">
<div class="login-wrap ">
<p class="account-desc"><?php print $appIDriveDesc; ?></p>
<form class="form-horizontal" id="accountSettingsForm" name="accountSettingsForm" method="POST" action="account.php" onSubmit="return validateForm1()">
<table cellspacing="0" cellpadding="6" border="0" width="380" align="center" class="folderBackup login-table">
<tbody>
<tr>
<td width="20%"> Username/Email </td>
<td width="5%">:</td>
<td width="70%" class="userNameField"><input type="textbox" id="userName" name="userName" class="acc_txtbox" autocomplete="off" value="<?php print $userNameSession; ?>"></td>
</tr>
<tr class="paddingBtmNone">
<td> Password </td>
<td>:</td>
<td><input type="password" id="password" name="password" class="acc_txtbox" autocomplete="off" value="<?php print $passwordSession; ?>"><input type="hidden" id="passwordHidden" name="passwordHidden" class="acc_txtbox" value="<?php print $passwordSession; ?>"></td>
</tr>
<tr class="paddingNone">
<td> </td>
<td></td>
<td align="left"><span class="forgotSpan" style="display:<?php print $encTypeSession==''?'block;':'none;'?>">
<a class="forgotPWD" target="_blank" href="https://www.idrive.com/idrive/forgotPassword/redirectPassword">Forgot Password?</a>
</span></td>
</tr>
<tr>
<td class="table_footer" colspan="3">
<div class="login-wrapper">
<?php if($encTypeSession=='' || $_SESSION['configVerified']==false){?>
<input type="submit" class="scheduleBtn" name="save" value="Login" style="display:block;">
<span class="disable_save" style="display:none;">Login</span>
<input type="button" class="addButton" id="logoff" name="logoff" value="Logoff" style="display:none;">
<?php } else {?>
<input type="submit" class="scheduleBtn" name="save" value="Login" style="display:none;">
<span class="disable_save" style="display:block;">Login</span>
<input type="button" class="addButton" id="logoff" name="logoff" value="Logoff" style="display:block;">
<?php }?>
</div>
</td>
</tr>
</tbody>
</table>
</form>
</div>
<div class="account_rgt login-bgliner" style="display:<?php print $encTypeSession==''?'block;':'none;'?>">
<h2 class="createAccount">Create an account</h2>
<p>A single IDrive account can backup data from all of your devices with native apps for Linux, PC, Mac, iOS, Android, and Windows Phone</p>
<a class="signup-btn" href="https://www.idrive.com/idrive/signup?rd=<?php print $signupRedirectURL; ?>">SIGN UP NOW!</a>
</div>
</div>
</div>
<div id="configEncryption" class="config-container" <?php print "style='display:$displyConfigure'"; ?>>
<div class="config-wrap">
<div class="sub_h1">Configure your IDrive account with encryption!</div>
<section class="encry-content">
<form method="post" onsubmit="return validatePvtKey();" action="" class="container" id="enc_conf">
<div class="row-wrap">
<div class="radio-btn">
<input type="radio" checked="" id="default" value="default" name="encryptionKey">
<label><b>Default encryption key</b></label>
</div>
<div class="default-key">IDrive will set an encryption key to encrypt all your data.</div>
</div>
<div class="key_area">
<div class="radio-btn">
<input type="radio" value="private" id="encryption" name="encryptionKey">
<label><b>Private encryption key</b></label>
</div>
<div class="private-key">Set your own private encryption key to encrypt all your data. On setting this option, you will not be able to share files / folders.</div>
<div class="key_details">
<div style="display: none;" class="key_password">
<p><label>Set your encryption key:</label><input type="password" value="" autocomplete="off" id="pvtKey" name="pvtKey" class="input"></p>
<p><label>Confirm your encryption key:</label><input type="password" value="" id="confmPvtKey" name="confmPvtKey" autocomplete="off" class="input"></p>
</div>
</div>
</div>
<div class="encrypt-warning">
<span class="red">WARNING:</span> IDrive does not store your private encryption key on its servers. It uses a special technique to encrypt your private encryption key that can only be used to verify, but not retrieve it. It is recommended that you archive it safely. Without your private encryption key, you will NOT be able to retrieve your data. We will not be able to provide the private encryption key information.
</div>
<div class="encrypt-submit"><input type="submit" class="encrypt-btn" value="Continue"></div>
</form>
</section>
</div>
</div>
<div id="getEncryptionKey" class="config-container" <?php print "style='display:$displyGetPrivate'"; ?>>
<div class="config-wrap">
<div style="" class="encryptionkey_cont">
<div class="encrypt-img">
<img alt="" src="include/images/encryption-lockman.png">
</div>
<div class="encrpt-wrap-box">
<h2>Encryption Key</h2>
<label>Enter the encryption key to access data.</label>
<div>
<form method="post" onsubmit="return verifyPrivateKey();" action="" class="container" id="validatePrivateKey">
<input type="password" autocomplete="off" class="encryption_key" name="encryptKey" id="encrypt_key">
<input type="submit" value="Continue" class="encrypt-pwdbtn">
</form>
</div>
<p>Provide the same encryption key set by you during your first login. <br>Do not share the encryption key to ensure your data security.</p>
</div>
</div>
</div>
</div>
<div class="noshell_msg" style="display: none;">
<div class="popup_container">
<section class="popup_header">
<h4>NAS User Does Not Have Enough Permission</h4>
<span class="popup_close_btn hide_popup"></span>
</section>
<span class="nas_warning">Access <b>/etc/passwd</b> file, change <b>/sbin/nologin</b> to <b>/bin/sh</b> for <b><?php echo $_SESSION['nasUserName'];?></b> user and try again.</span>
</div>
</div>
<div class="noaccess_msg" style="display: none;">
<div class="popup_container">
<section class="popup_header">
<h4>Unsupported App</h4>
<span class="popup_close_btn hide_popup"></span>
</section>
<span class="nas_warning">Installed IDrive App is <b>not supported for your NAS </b> device. Please contact <b><a href="<?php echo IDRIVE_SUPPORT; ?>" target="_blank" alt="Support" style="text-decoration:none;color: #6196B9;">support</a></b> for more details.</span>
</div>
</div>
<?php
if($nasUserShellPerm === FALSE) { ?>
<script>
(function($) {
$(document).ready(function() {
$.popContainer();
jQuery('.sec_pos_container').append(jQuery('.noshell_msg').show());
});
})(jQuery);
</script>
<?php } else { ?>
<script>
//$.get("action.php?action=getSharedList");
jQuery('#userName').focus();
delete(IDrive.Jobs);
</script>
<?php } ?>
<?php if($binaryChk === FALSE) { ?>
<script>
(function($) {
$(document).ready(function() {
$.popContainer();
jQuery('.sec_pos_container').append(jQuery('.noaccess_msg').show());
});
})(jQuery);
</script>
<?php } ?>