diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/apitest/index.php | 79 | ||||
-rw-r--r-- | mod/apitest/start.php | 251 | ||||
-rw-r--r-- | mod/apitest/views/default/apitest/configform.php | 18 | ||||
-rw-r--r-- | mod/apitest/views/default/apitest/main.php | 34 | ||||
-rw-r--r-- | mod/exporttest/index.php | 40 | ||||
-rw-r--r-- | mod/exporttest/start.php | 24 | ||||
-rw-r--r-- | mod/exporttest/views/default/exporttest/main.php | 22 | ||||
-rw-r--r-- | mod/exporttest/views/default/exporttest/outputxml.php | 15 | ||||
-rw-r--r-- | mod/guidbrowser/index.php | 54 | ||||
-rw-r--r-- | mod/guidbrowser/languages/en.php | 24 | ||||
-rw-r--r-- | mod/guidbrowser/start.php | 60 | ||||
-rw-r--r-- | mod/guidbrowser/views/default/guidbrowser/browser.php | 35 | ||||
-rw-r--r-- | mod/guidbrowser/views/default/guidbrowser/entity.php | 32 | ||||
-rw-r--r-- | mod/guidbrowser/views/default/guidbrowser/entity_full.php | 125 | ||||
-rw-r--r-- | mod/guidbrowser/views/default/guidbrowser/newentity.php | 11 | ||||
-rw-r--r-- | mod/guidbrowser/views/default/guidbrowser/prevnext.php | 30 |
16 files changed, 0 insertions, 854 deletions
diff --git a/mod/apitest/index.php b/mod/apitest/index.php deleted file mode 100644 index 105c44409..000000000 --- a/mod/apitest/index.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php - /** - * Elgg API Tester - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - require_once("../../engine/start.php"); - - global $CONFIG, $API_CLIENT; - - - // Get some variables - $apikey = get_input("apikey"); - $secret = get_input("secret"); - $endpoint = get_input("endpoint"); - - - if ($_REQUEST['action'] == "configure") - apitest_configure($apikey, $secret, $endpoint); - - // Get a list of commands - if ($API_CLIENT->configured == true) - { - $commands = apitest_call( - array ( - 'method' => 'system.api.list' - ) - ); - $commands = $commands->result; - } - - /* See if we are executing a method - This is a quick demo, obviously use functions as they are much easier!*/ - if (isset($_REQUEST['method'])) - { - - $command_details = $commands[$_REQUEST['method']]; - $auth_req = $command_details['require_auth'] == 1 ? true : false; - - $params = array(); - $params['method'] = $_REQUEST['method']; - if ($auth_req) - $params['auth_token'] = $_REQUEST['auth_token']; - - foreach ($command_details['parameters'] as $k => $v) - { - $params[$k] = $_REQUEST[$k]; - } - - $result = apitest_call($params, $_REQUEST['post_data']); - - - if ($result->status == 0) - system_message("<div id=\"result\"><pre>".print_r($result->result, true)."</pre></div>"); - else - register_error($result->message); - - if (!is_object($result)) echo $LAST_CALL_RAW; - - - - } - - // Draw command form - $list = ""; - foreach ($commands as $command => $details) - $list .= apitest_draw_command_form($command, $details); - - $body = elgg_view_layout("one_column", elgg_view("apitest/main", array( - "config" => apitest_draw_config_panel(), - "commandlist" => $list - ))); - - page_draw("API Commands",$body); -?>
\ No newline at end of file diff --git a/mod/apitest/start.php b/mod/apitest/start.php deleted file mode 100644 index d03c7925a..000000000 --- a/mod/apitest/start.php +++ /dev/null @@ -1,251 +0,0 @@ -<?php - /** - * Elgg API Tester - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $API_CLIENT = new stdClass; - - // Status variables we can query later - $LAST_CALL = null; - $LAST_CALL_RAW = ""; - $LAST_ERROR = null; - - - function apitest_init($event, $object_type, $object = null) { - - global $CONFIG; - - add_menu("API Test",$CONFIG->wwwroot . "mod/apitest/",array( - menu_item("The API Tester plugin",$CONFIG->wwwroot."mod/apitest/"), - )); - } - - /** - * Generate our HMAC. - */ - function apitest_calculate_hmac($algo, $time, $api_key, $secret_key, $get_variables, $post_hash = "") - { - $ctx = hash_init($algo, HASH_HMAC, $secret_key); - - hash_update($ctx, trim($time)); - hash_update($ctx, trim($api_key)); - hash_update($ctx, trim($get_variables)); - if (trim($post_hash)!="") hash_update($ctx, trim($post_hash)); - - return hash_final($ctx); - } - - /** - * Generate our POST hash. - */ - function apitest_calculate_posthash($postdata, $algo) - { - $ctx = hash_init($algo); - - hash_update($ctx, $postdata); - - return hash_final($ctx); - } - - /** - * Serialise HTTP headers. - */ - function apitest_serialise_headers(array $headers) - { - $headers_str = ""; - - foreach ($headers as $k => $v) - $headers_str .= trim($k) . ": " . trim($v) . "\r\n"; - - return trim($headers_str); - } - - /** - * Make a raw call. - * @param array $method Method call parameters. - * @param string $postdata Optional POST data. - * @param string $content_type The content type. - * @return stdClass - */ - function apitest_call(array $method, $postdata = "", $content_type = 'application/octet-stream') - { - // Get the config - global $API_CLIENT, $LAST_CALL, $LAST_CALL_RAW, $LAST_ERROR; - - $headers = array(); - $encoded_params = array(); - - $time = microtime(true); // Get the current time in microseconds - $request = ($postdata!="" ? "POST" : "GET"); // Get the request method, either post or get - - // Hard code the format - we're using PHP, so lets use PHP serialisation. - $method['format'] = "php"; - - // URL encode all the parameters - foreach ($method as $k => $v){ - if (is_array($v)) - { - foreach ($v as $v2) - { - $encoded_params[] = urlencode($k).'[]='.urlencode($v2); - } - } - else - $encoded_params[] = urlencode($k).'='.urlencode($v); - } - - $params = implode('&', $encoded_params); - - // Put together the query string - $url = $API_CLIENT->api_endpoint."?". $params; - - // Construct headers - $posthash = ""; - if ($request=='POST') - { - $posthash = apitest_calculate_posthash($postdata, $API_CLIENT->postdata_hash_algo); - - $headers['X-Elgg-posthash'] = $posthash; - $headers['X-Elgg-posthash-algo'] = $API_CLIENT->postdata_hash_algo; - $headers['Content-type'] = $content_type; - $headers['Content-Length'] = strlen($postdata); - } - - $headers['X-Elgg-apikey'] = $API_CLIENT->api_key; - $headers['X-Elgg-time'] = $time; - $headers['X-Elgg-hmac-algo'] = $API_CLIENT->hmac_algo; - $headers['X-Elgg-hmac'] = apitest_calculate_hmac($API_CLIENT->hmac_algo, - $time, - $API_CLIENT->api_key, - $API_CLIENT->secret, - $params, - $posthash - ); - - // Configure stream options - $opts = array( - 'http'=>array( - 'method'=> $request, - 'header'=> apitest_serialise_headers($headers) - ) - ); - - // If this is a post request then set the content - if ($request=='POST') - $opts['http']['content'] = $postdata; - - // Set stream options - $context = stream_context_create($opts); - - // Send the query and get the result and decode. - $LAST_CALL_RAW = file_get_contents($url, false, $context); - $LAST_CALL = unserialize($LAST_CALL_RAW); - - if (($LAST_CALL) && ($LAST_CALL->status!=0)) // Check to see if this was an error - $LAST_ERROR = $LAST_CALL; - - return $LAST_CALL; // Return a stdClass containing the API result - } - - function apitest_configure($apikey, $secret, $endpoint = "") - { - global $CONFIG; - global $API_CLIENT; - - $apikey = sanitise_string($apikey); - $secret = sanitise_string($secret); - $endpoint = sanitise_string($endpoint); - - if ($endpoint=="") - $endpoint = $CONFIG->wwwroot . "services/api/rest.php"; - - $API_CLIENT->api_key = $apikey; - $API_CLIENT->secret = $secret; - $API_CLIENT->api_endpoint = $endpoint; - $API_CLIENT->hmac_algo = 'sha1'; - $API_CLIENT->postdata_hash_algo = 'md5'; - $API_CLIENT->configured = true; - } - - function apitest_draw_command_form($command, $details) - { - global $API_CLIENT; - - $params = array(); - - // If authentication is required then ensure this is prompted for - if ($details->require_auth == true) - $params['auth_token'] = $_REQUEST['auth_token']; - - - // Compile a list of parameters - foreach ($details['parameters'] as $k => $v) - { - $params[$k] = $_REQUEST[$k]; - } - - // Construct list of variables - $variables = ""; - foreach ($params as $k => $v) - { - $variables .= $k; - $variables .= "<input type='text' name='$k' value='$v' />"; - - if (isset($details['parameters'][$k]['required']) && ($details['parameters'][$k]['required']!=0)) - $variables .= " (optional)"; - - $variables .= ", "; - } - - // Do we need to provide post data? - $postdata = ""; - if ($details->call_method == 'POST') - $postdata = "<span onClick=\"showhide('$command')\"><a href=\"#\">add post data...</a></span>"; - - $body = <<< END - <form method='post'> - <p> - <input type="hidden" name="action" value="configure" /> - <input type="hidden" name="apikey" value="{$API_CLIENT->api_key}" /></p> - <input type="hidden" name="secret" value="{$API_CLIENT->secret}" /></p> - <input type="hidden" name="endpoint" value="{$API_CLIENT->api_endpoint}" /></p> - - <input type='hidden' name='method' value='$command' /> - <b>$command (<span onClick="showhide('{$command}_desc')"><a href="#">desc</a></span>):</b> - - $variables - - $postdata - - <input type='submit' name='>>' value='>>' /> - <div id="{$command}_desc" style="display:none">{$details['description']}</div> - <div id="$command" style="display:none"><textarea name="post_data" cols="50" rows="10"></textarea></div> - - </p> - </form> -END; - - return $body; - } - - - function apitest_draw_config_panel() - { - global $API_CLIENT; - - return elgg_view("apitest/configform", array( - "apikey" => $API_CLIENT->api_key, - "secret" => $API_CLIENT->secret, - "endpoint" => $API_CLIENT->api_endpoint - )); - } - - // Make sure test_init is called on initialisation - register_elgg_event_handler('init','system','apitest_init'); -?>
\ No newline at end of file diff --git a/mod/apitest/views/default/apitest/configform.php b/mod/apitest/views/default/apitest/configform.php deleted file mode 100644 index ccada5940..000000000 --- a/mod/apitest/views/default/apitest/configform.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - /** - * Elgg API Tester - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ -?> -<form method="post"> - <input type="hidden" name="action" value="configure" /> - <p>API Key: <input type="text" name="apikey" value="<?php echo $vars['apikey'];?>" /></p> - <p>Secret Key: <input type="password" name="secret" value="<?php echo $vars['secret'];?>" /></p> - <p>Endpoint: <input type="text" name="endpoint" value="<?php echo $vars['endpoint'];?>" /></p> - <input type="submit" name="submit" value="Set.." /> -</form>
\ No newline at end of file diff --git a/mod/apitest/views/default/apitest/main.php b/mod/apitest/views/default/apitest/main.php deleted file mode 100644 index bca518cc0..000000000 --- a/mod/apitest/views/default/apitest/main.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - /** - * Elgg API Tester - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ -?> -<script type="text/javascript" language="javascript"> -<!-- -function showhide(oid) -{ - var e = document.getElementById(oid); - if(e.style.display == 'none') { - e.style.display = 'block'; - } else { - e.style.display = 'none'; - } -} -// --> -</script> - -<div id="config"> - <?php echo $vars['config']; ?> -</div> - -<hr /> - -<div id="list"> - <?php echo $vars['commandlist']; ?> -</div>
\ No newline at end of file diff --git a/mod/exporttest/index.php b/mod/exporttest/index.php deleted file mode 100644 index f3010d971..000000000 --- a/mod/exporttest/index.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - /** - * Elgg export test - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - require_once("../../engine/start.php"); - - global $CONFIG; - - $guid = get_input("guid"); - $action = get_input("action"); - - // Get the user - $owner_id = page_owner(); - - if ($guid) - { - echo elgg_view_layout("one_column", elgg_view("exporttest/outputxml", array("xml" => export($guid)))); - } - else if ($action=='import') - { - $area1 = print_r(import(get_input('xml')), true); - $area1 .= elgg_view("exporttest/main", array("owner_id" => $owner_id)); - - $body = elgg_view_layout("one_column", $area1); - - page_draw("Import results",$body); - } - else - { - $body = elgg_view_layout("one_column", elgg_view("exporttest/main", array("owner_id" => $owner_id))); - page_draw("Export a GUID",$body); - } -?>
\ No newline at end of file diff --git a/mod/exporttest/start.php b/mod/exporttest/start.php deleted file mode 100644 index 3e1817878..000000000 --- a/mod/exporttest/start.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - /** - * Elgg export test - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - function exporttest_init($event, $object_type, $object = null) { - - global $CONFIG; - - add_menu("Export GUID",$CONFIG->wwwroot . "mod/exporttest/",array( - menu_item("The GUID Exporter",$CONFIG->wwwroot."mod/exporttest/"), - )); - } - - - // Make sure test_init is called on initialisation - register_elgg_event_handler('init','system','exporttest_init'); -?>
\ No newline at end of file diff --git a/mod/exporttest/views/default/exporttest/main.php b/mod/exporttest/views/default/exporttest/main.php deleted file mode 100644 index ea338052b..000000000 --- a/mod/exporttest/views/default/exporttest/main.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - /** - * Elgg export test - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ -?> - -<form> - <input type="hidden" name="owner_id" value="<?php echo $vars['owner_id']; ?>" /> - GUID : <input type="text" value="" name="guid" /> <input type="submit" name="export" value="export" /> -</form> - -<form method="post" action="<?php echo $vars['url']; ?>action/import/odd"> - IMPORT : - <textarea name="data" cols="50" rows="10"></textarea> - <input type="submit" name="import" value="import" /> -</form>
\ No newline at end of file diff --git a/mod/exporttest/views/default/exporttest/outputxml.php b/mod/exporttest/views/default/exporttest/outputxml.php deleted file mode 100644 index 92c971ccd..000000000 --- a/mod/exporttest/views/default/exporttest/outputxml.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - /** - * Elgg export test - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - header("Content-type: text/xml"); - - echo $vars['xml']; -?>
\ No newline at end of file diff --git a/mod/guidbrowser/index.php b/mod/guidbrowser/index.php deleted file mode 100644 index cbb3986d2..000000000 --- a/mod/guidbrowser/index.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - require_once("../../engine/start.php"); - - $eguid = get_input('eguid'); - $limit = get_input('limit', 10); - $offset = get_input('offset'); - $type = get_input('type'); - $subtype = get_input('subtype'); - - $action = get_input('subtype'); - $key = get_input('key'); - $value = get_input('value'); - - $relationship = get_input('relationship'); - $guid2 = get_input('guid2'); - - - switch ($callaction) - { - case 'metadata' : - if (!create_metadata($eguid, $key, $value)) - echo "Could not create metadata with $eguid:$key:$value"; - break; - - case 'annotations' : - if (!create_annotation($eguid, $key, $value)) - echo "Could not create metadata with $eguid:$key:$value"; - break; - - case 'relationship' : - if (!add_entity_relationship($eguid, $relationship, $guid2)) - echo "Could not create relationship between $eguid:$relationship:$guid2"; - break; - } - - // Get the current page's owner - $page_owner = page_owner_entity(); - - // Display - $body = elgg_view_layout("one_column", guidbrowser_display($offset, $limit, $type, $subtype)); - - // Display page - page_draw(elgg_echo("guidbrowser"), $body); -?>
\ No newline at end of file diff --git a/mod/guidbrowser/languages/en.php b/mod/guidbrowser/languages/en.php deleted file mode 100644 index 0eee183eb..000000000 --- a/mod/guidbrowser/languages/en.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $english = array( - - /** - * Menu items and titles - */ - - 'guidbrowser' => "GUID Browser" - - - ); - - add_translation("en", $english); -?>
\ No newline at end of file diff --git a/mod/guidbrowser/start.php b/mod/guidbrowser/start.php deleted file mode 100644 index a75711c1d..000000000 --- a/mod/guidbrowser/start.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - function guidbrowser_init($event, $object_type, $object = null) { - - global $CONFIG; - // register_translations($CONFIG->pluginspath . "guidbrowser/languages/"); - add_menu("GUID Browser",$CONFIG->wwwroot . "mod/tasklist/",array( - menu_item("The GUID browser",$CONFIG->wwwroot."mod/guidbrowser/"), - )); - } - - function guidbrowser_displayentity($entity) - { - return elgg_view("guidbrowser/entity", - array( - 'entity_guid' => $entity->guid, - 'type' => $entity->type, - 'subtype' => $entity->getSubtype(), - 'full' => elgg_view( - "guidbrowser/entity_full", - array( - 'entity' => $entity, - 'metadata' => get_metadata_for_entity($entity->guid), - 'annotations' => get_annotations($entity->guid), - 'relationships' => get_entity_relationships($entity->guid) - ) - ) - ) - ); - } - - function guidbrowser_display($offset = 0, $limit = 10, $type = "", $subtype = "") - { - $entities = get_entities($type, $subtype, page_owner(), "time_created desc", $limit, $offset); - $display = ""; - - foreach ($entities as $e) - $display .= guidbrowser_displayentity($e); - - return elgg_view("guidbrowser/browser", - array( - 'entities' => $display, - 'prevnext' => elgg_view("guidbrowser/prevnext", array("limit" => $limit, "offset" => $offset)) - ) - ); - } - - - // Make sure test_init is called on initialisation - register_elgg_event_handler('init','system','guidbrowser_init'); -?>
\ No newline at end of file diff --git a/mod/guidbrowser/views/default/guidbrowser/browser.php b/mod/guidbrowser/views/default/guidbrowser/browser.php deleted file mode 100644 index c1f5bb792..000000000 --- a/mod/guidbrowser/views/default/guidbrowser/browser.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $navbar = $vars['prevnext']; - $entities = $vars['entities']; -?> -<script type="text/javascript" language="javascript"> -<!-- -function showhide(oid) -{ - var e = document.getElementById(oid); - if(e.style.display == 'none') { - e.style.display = 'block'; - } else { - e.style.display = 'none'; - } -} -// --> -</script> - -<div id="browser"> - <div id="entities"> - <?php echo $entities; ?> - </div> - - <?php echo $navbar; ?> -</div>
\ No newline at end of file diff --git a/mod/guidbrowser/views/default/guidbrowser/entity.php b/mod/guidbrowser/views/default/guidbrowser/entity.php deleted file mode 100644 index 94fd4e92c..000000000 --- a/mod/guidbrowser/views/default/guidbrowser/entity.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $guid = $vars['entity_guid']; - $type = $vars['type']; - $subtype = $vars['subtype']; - $full = $vars['full']; - -?> - -<div id="guid-<?php echo $guid; ?>"> - <span onClick="showhide('guid-<?php echo $guid; ?>-full')"> - <table width="100%"> - <tr> - <td width="50"><b><?php echo $guid; ?></b></td> - <td><?php echo "$type / $subtype"; ?></td> - - </tr> - </table> - </span> - <div id="guid-<?php echo $guid; ?>-full" style="display:none"> - <?php echo $full; ?> - </div> -</div>
\ No newline at end of file diff --git a/mod/guidbrowser/views/default/guidbrowser/entity_full.php b/mod/guidbrowser/views/default/guidbrowser/entity_full.php deleted file mode 100644 index 62dd78264..000000000 --- a/mod/guidbrowser/views/default/guidbrowser/entity_full.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $entity = $vars['entity']; - $metadata = $vars['metadata']; - $annotations = $vars['annotations']; - $relationships = $vars['relationships']; - -?> -<div> - <?php - foreach ($entity as $k => $v) - { -?> - <div> - <table> - <tr> - <td><b><?php echo $k; ?></b></td> - <td><?php echo $v; ?></td> - </tr> - </table> - </div> -<?php - } - ?> -</div> -<div id="metadata"> -<h2>Metadata</h2> - <?php - if ($metadata) foreach ($metadata as $m) - { -?> - <div> - <table> - <tr> - <td><b><?php echo $m->name; ?></b></td> - <td><?php echo $m->value; ?></td> - </tr> - </table> - </div> -<?php - } - ?> - - <div> - <form method="post"> - <input name="eguid" type="hidden" value="<?php echo $entity->guid; ?>" /> - <input name="owner_id" type="hidden" value="<?php echo page_owner(); ?>" /> - <input name="callaction" type="hidden" value="metadata" /> - Key : <input name="key" type="text" /> - Value : <input name="value" type="text" /> - <input name="submit" type="submit" value="submit" /> - </form> - </div> - -</div> - -<div id="annotations"> -<h2>Annotations</h2> - <?php - if ($annotations) foreach ($annotations as $a) - { -?> - <div> - <table> - <tr> - <td><b><?php echo $a->name; ?></b></td> - <td><?php echo $a->value; ?></td> - </tr> - </table> - </div> -<?php - } - ?> - - <div> - <form method="post"> - <input name="eguid" type="hidden" value="<?php echo $entity->guid; ?>" /> - <input name="owner_id" type="hidden" value="<?php echo page_owner(); ?>" /> - <input name="callaction" type="hidden" value="annotations" /> - Key : <input name="key" type="text" /> - Value : <input name="value" type="text" /> - <input name="submit" type="submit" value="submit" /> - </form> - </div> -</div> - -<div id="relationship"> -<h2>Relationships</h2> - <?php - if ($relationships) foreach ($relationships as $r) - { -?> - <div> - <table> - <tr> - <td><?php echo $r->guid_one; ?></td> - <td><b><?php echo $r->relationship; ?></b></td> - <td><?php echo $r->guid_two; ?></td> - </tr> - </table> - </div> -<?php - } - ?> - - <div> - <form method="post"> - <input name="eguid" type="hidden" value="<?php echo $entity->guid; ?>" /> - <input name="owner_id" type="hidden" value="<?php echo page_owner(); ?>" /> - <input name="callaction" type="hidden" value="relationship" /> - Relationship : <input name="relationship" type="text" /> - Guid : <input name="guid2" type="text" /> - <input name="submit" type="submit" value="submit" /> - </form> - </div> -</div>
\ No newline at end of file diff --git a/mod/guidbrowser/views/default/guidbrowser/newentity.php b/mod/guidbrowser/views/default/guidbrowser/newentity.php deleted file mode 100644 index f46524e94..000000000 --- a/mod/guidbrowser/views/default/guidbrowser/newentity.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ -?>
\ No newline at end of file diff --git a/mod/guidbrowser/views/default/guidbrowser/prevnext.php b/mod/guidbrowser/views/default/guidbrowser/prevnext.php deleted file mode 100644 index 0624173cf..000000000 --- a/mod/guidbrowser/views/default/guidbrowser/prevnext.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - /** - * Elgg GUID browser - * - * @package ElggDevTools - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey <marcus@marcus-povey.co.uk> - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - global $CONFIG; - - $limit = $vars['limit']; - $offset = $vars['offset']; - $type = $vars['type']; - $subtype = $vars['subtype']; - - - $common = "&type=$type&subtype=$subtype"; -?> - -<div id="guidbrowser_navbar"> - <table width="100%"> - <tr> - <td align="left"><?php if ($offset>0){?><a href="<?php echo $CONFIG->wwwroot . "mod/guidbrowser/?offset=" . ($offset-$limit) . $common ?>">Previous</a><?php } ?></td> - <td align="right"><a href="<?php echo $CONFIG->wwwroot . "mod/guidbrowser/?offset=" . ($offset+$limit) . $common ?>">Next</a></td> - </tr> - </table> -</div>
\ No newline at end of file |