* * Open eClass is an open platform distributed in the hope that it will * be useful (without any warranty), under the terms of the GNU (General * Public License) as published by the Free Software Foundation. * The full license can be read in "/info/license/license_gpl.txt". * * Contact address: GUnet Asynchronous eLearning Group, * Network Operations Center, University of Athens, * Panepistimiopolis Ilissia, 15784, Athens, Greece * e-mail: info@openeclass.org * ======================================================================== */ session_start(); require_once '../clouddrive.php'; $drive = CloudDriveManager::getSessionDrive(); $url = trim(addslashes(array_key_exists('url', $_POST) ? $_POST['url'] : $drive->getDefaultURL())); $username = trim(addslashes(array_key_exists('username', $_POST) ? $_POST['username'] : "")); $password = array_key_exists('password', $_POST) ? $_POST['password'] : ""; $username_value = ($username == "")? "value='' placeholder='Username'" : "value='" . q($username) . "'"; if ($drive->checkCredentials($url, $username, $password)) { header('Location: ' . '../popup.php?' . $drive->getDriveDefaultParameter() . "&" . $drive->getCallbackName() . '=' . $drive->encodeCredentials($url, $username, $password)); die(); } echo '<head>'; echo '<title>User Login</title>'; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'; echo '<meta name="viewport" content="width=device-width, initial-scale=1.0">';
public function drive() { return CloudDriveManager::getDrive($this->drivename); }
$pageName = $langExternalFile; $fileinput = " <div class='form-group'> <label for='fileURL' class='col-sm-2 control-label'>$langExternalFileInfo:</label> <div class='col-sm-10'> <input type='text' class='form-control' id='fileURL' name='fileURL'> </div> </div>"; } else { $pageName = $langDownloadFile; $fileinput = " <div class='form-group'> <label for='userFile' class='col-sm-2 control-label'>$langPathUploadFile:</label> <div class='col-sm-10'>" . fileSizeHidenInput() . CloudDriveManager::renderAsButtons() . "<input type='file' id='userFile' name='userFile'></span> </div> </div>"; } $tool_content .= action_bar(array( array('title' => $langBack, 'url' => $backUrl, 'icon' => 'fa-reply', 'level' => 'primary-label'))); $tool_content .= " <div class='row'> <div class='col-md-12'> <div class='form-wrapper'> <form class='form-horizontal' role='form' action='$upload_target_url' method='post' enctype='multipart/form-data'> <input type='hidden' name='uploadPath' value='$uploadPath' />
$tool_content .= " <div class='form-group'> <label for='fileCloudName' class='col-sm-2 control-label'>$langCloudFile</label> <div class='col-sm-10'> <input type='hidden' class='form-control' id='fileCloudInfo' name='fileCloudInfo' value='".q($pendingCloudUpload)."'> <input type='text' class='form-control' name='fileCloudName' value='" . q(CloudFile::fromJSON($pendingCloudUpload)->name()) . "' readonly> </div> </div>"; } else if ($_GET['form_input'] === 'file') { enableCheckFileSize(); $tool_content .= "<div class='form-group'> <label for='FileName' class='col-sm-2 control-label'>$langWorkFile:</label> <input type='hidden' name='id' value=''> <div class='col-sm-10'>" . fileSizeHidenInput() . CloudDriveManager::renderAsButtons() . " <input type='file' name='userFile'></div> </div>"; } else if ($_GET['form_input'] === 'url') { $tool_content .= "<div class='form-group'> <label for='Url' class='col-sm-2 control-label'>$langURL:</label> <input type='hidden' name='id' value=''> <div class='col-sm-10'><input class='form-control' type='text' name='URL'></div> </div>"; } // Other fields $tool_content .= "<div class='form-group'> <label for='Title' class='col-sm-2 control-label'>$langTitle:</label> <div class='col-sm-10'><input class='form-control' type='text' name='title' size='55'></div> </div>