+++ /dev/null
-<?php
-require_once('../config.php');
-require_once('lib.php');
-if(!empty($_GET['create'])) {
- $result = true;
- $entry = new stdclass;
- $entry->repositoryname = 'Box.net';
- $entry->repositorytype = 'boxnet';
- $entry->contextid = SITEID;
- $entry->userid = $USER->id;
- $entry->timecreated = time();
- $entry->timemodified = time();
- $result = $result && $DB->insert_record('repository', $entry);
- $entry->repositoryname = 'Flickr!';
- $entry->repositorytype = 'flickr';
- $entry->contextid = SITEID;
- $entry->userid = $USER->id;
- $entry->timecreated = time();
- $entry->timemodified = time();
- $result = $result && $DB->insert_record('repository', $entry);
- if($result){
- die('200');
- } else {
- die('403');
- }
-}
-?>
-<html>
-<head>
-<title> Ajax picker demo page </title>
-<?php
-/*******************************************************\
-
- This file is a demo page for ajax repository file
- picker.
-
-\*******************************************************/
-$ret = repository_get_client();
-?>
-</head>
-<body class=" yui-skin-sam">
-<div id='control'>
- <h1>Open the picker</h1>
- <input type="button" id="con1" onclick='openpicker({"env":"form"})' value="Open File Picker" style="font-size: 24px;padding: 1em" /> <br/>
- <input type='hidden' id="result">
-</div>
-<div>
- <div id="file-picker"></div>
-</div>
-<hr />
-
-<div>
- <h1>Create Repository Instance</h1>
- <input type='button' id="create-repo" value="Create!" style="font-size: 24px;padding: 1em" />
-<script type="text/javascript">
-btn = document.getElementById('create-repo');
-var create_cb = {
- success: function(o) {
- try{
- var ret = o.responseText;
- } catch(e) {
- alert(e);
- }
- if(ret == 200) {
- alert('Create Repository Instances successfully!');
- location.reload();
- btn.value='Done';
- } else {
- alert('Failed to create repository instances.');
- btn.value='Created';
- btn.disabled = false;
- }
- }
-}
-if(btn){
- btn.onclick = function(){
- btn.value = 'waiting...';
- btn.disabled = true;
- var trans = YAHOO.util.Connect.asyncRequest('GET', 'ajax.php?create=true', create_cb);
- }
-}
-</script>
-</div>
-<?php
-echo $ret['js'];
-?>
-</body>
-</html>
+++ /dev/null
-<?php
-/*******************************************************\
-
- This is page is deprecated, we are developing ajax
- File Picker in the future. This page won't work.
-
-\*******************************************************/
-require_once('../config.php');
-require_once('lib.php');
-$id = required_param('id', PARAM_INT);
-$action = optional_param('action', '', PARAM_RAW);
-if(!$repository = $DB->get_record('repository', array('id'=>$id))) {
- print_error('invalidrepostoryid');
-}
-
-if(is_file($CFG->dirroot.'/repository/'.$repository->repositorytype.'/repository.class.php')) {
- require_once($CFG->dirroot.'/repository/'.$repository->repositorytype.'/repository.class.php');
- $classname = 'repository_' . $repository->repositorytype;
- $repo = new $classname($id, SITEID);
-} else {
- print_error('invalidplugin', 'repository');
-}
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
- <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
- <title>File Picker</title>
- <link href="style.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<h1>This page is deprecated, please access ajax.php.</h1>
- <table border="0" cellspacing="10" cellpadding="10">
- <tbody>
- <tr>
- <td>
- <h3>Repository</h3>
- <ul id='repolist'>
- <li><a href="###" class="link">Local Server</a></li>
- <li><a href="###">Remote Moodle</a></li>
- <li class='line'>------------------------------</li>
- <li><a href="?id=1">Box.net</a></li>
- <li><a href="?id=2">Flickr</a></li>
- <li><a href="###"><strike>Briefcase</strike></a></li>
- <li><a href="###"><strike>Door</strike></a></li>
- <li><a href="###"><strike>Google Docs</strike></a></li>
- <li><a href="###"><strike>Mahara</strike></a></li>
- <li><a href="###"><strike>Merlot</strike></a></li>
- <li><a href="###"><strike>Myspace</strike></a></li>
- <li><a href="###"><strike>Oki</strike></a></li>
- <li><a href="###"><strike>Skydrive</strike></a></li>
- <li><a href="###"><strike>Youtube</strike></a></li>
- <li class='line'>------------------------------</li>
- </ul>
- </td>
- <td>
- <table>
- <tr>
- <td class="header">
- <img src="<?php echo $CFG->pixpath.'/moodlelogo.gif';?>" alt="Manage Google Docs" />
- </td>
- <td class="header">
- <?php
- $repo->print_search();
- ?>
- </td>
- </tr>
- </table>
- <div>
- <?php
- if($action == 'list') {
- $repo->print_listing();
- } else {
- $repo->print_login();
- }
- ?>
- </div>
- <!--
- <iframe src="ibrowse.php" width="100%" height='250px' class="frame"></iframe>
- <div class="right">
- <input type="submit" value="Select" name="select" />
-
- <input type="submit" value="Cancel" name="cancel"/>
- </div>
- -->
- </td>
- </tr>
- </tbody>
- </table>
-</body>
-</html>
+++ /dev/null
-body {
- font: normal 16px auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
- color: #4f6b72;
- background: #E6EAE9;
-}
-
-body.frame {
- background: #FFFFFF;
-}
-iframe{border:0}
-
-a {
- color: #c75f3e;
- text-decoration: none
-}
-
-img {
- border: 0;
-}
-
-td.header {
- border-right: 0px ;
- border-bottom: 0px ;
- border-top: 0px ;
- border-left: 0px ;
- vertical-align: top;
-}
-
-caption {
- padding: 0 0 5px 0;
- width: 700px;
- font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
- text-align: right;
-}
-
-
-td {
- border-right: 1px solid #C1DAD7;
- border-bottom: 1px solid #C1DAD7;
- border-top: 1px solid #C1DAD7;
- border-left: 1px solid #C1DAD7;
- background: #fff;
- padding: 6px 6px 6px 12px;
- color: #4f6b72;
- vertical-align: top;
- text-align: left;
-}
-
-td.content {
- vertical-align: middle;
- border-right: 0px ;
- border-bottom: 0px ;
- border-top: 0px ;
- border-left: 0px ;
-}
-
-tr {
- vertical-align: top;
-}
-
-div.right {
- text-align:right;
-}
-
-input.right {
- text-align:right;
-}
-
-div.left {
- text-align:left;
-}
-
-div.center {
- text-align:center;
-}
-
-td.second {
- background: #F5FAFA;
- color: #797268;
- white-space: nowrap;
-}
-
-#repolist{
- list-style:none;
- padding:0;
- line-height: 1.5em;
-}
-#repolist li{
- background: url(images/arrow.png) no-repeat 0 6px;
- padding:0 0 0 16px;
-}
-#repolist .line{
- background-image: none;
- padding:0;
-}
-#nav{
- margin-top: 2em;
- padding-left: 1em;
-}