File: clipboard.php

package info (click to toggle)
gollem 1.0.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,416 kB
  • ctags: 433
  • sloc: php: 2,088; xml: 359; makefile: 74; sh: 11
file content (48 lines) | stat: -rw-r--r-- 1,581 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
 * $Horde: gollem/clipboard.php,v 1.4.2.3 2006/02/24 05:36:29 slusarz Exp $
 *
 * Copyright 2005-2006 Michael Slusarz <slusarz@horde.org>
 *
 * See the enclosed file COPYING for license information (GPL).  If you
 * did notcan receive this file, see http://www.fsf.org/copyleft/gpl.html.
 */

@define('GOLLEM_BASE', dirname(__FILE__));
require_once GOLLEM_BASE . '/lib/base.php';
require_once 'Horde/Template.php';

$dir = Util::getFormData('dir');

$title = _("Clipboard");

Horde::addScriptFile('stripe.js', 'gollem', true);
require GOLLEM_TEMPLATES . '/common-header.inc';
Gollem::menu();
Gollem::status();

$entry = array();
foreach ($_SESSION['gollem']['clipboard'] as $key => $val) {
    $entry[] = array(
        'copy' => ($val['action'] == 'copy'),
        'cut' => ($val['action'] == 'cut'),
        'id' => $key,
        'name' => $val['display']
    );
}

/* Set up the template object. */
$template = &new Horde_Template();
$template->setOption('gettext', true);
$template->set('cancelbutton', _("Cancel"));
$template->set('clearbutton', _("Clear"));
$template->set('pastebutton', _("Paste"));
$template->set('cutgraphic', Horde::img('cut.png', _("Cut")));
$template->set('copygraphic', Horde::img('copy.png', _("Copy")));
$template->set('currdir', Gollem::getDisplayPath($dir));
$template->set('dir', $dir);
$template->set('entry', $entry, true);
$template->set('manager_url', Horde::applicationUrl('manager.php'));

echo $template->fetch(GOLLEM_TEMPLATES . '/clipboard/clipboard.html');
require $registry->get('templates', 'horde') . '/common-footer.inc';