function imageEditor()
 {
     JS::loadjQuery();
     JS::lib('jquery/jquery.imgareaselect-*');
     JS::lib('imgTools');
     $size = getimagesize($this->that->path);
     return Form::quick(false, __('Save'), new Input(__('Filename'), 'filename', $_POST['filename'] ? $_POST['filename'] : $this->that->basename), new Hidden('cropimgx', $_POST['cropimgx']), new Hidden('cropimgy', $_POST['cropimgy']), new Hidden('cropimgw', $_POST['cropimgw']), new Hidden('cropimgh', $_POST['cropimgh']), new Tabber('img', new Tab(__('Cropping'), '<div id="imgcropper"><img style="float: left" id="originalImage" src="?id=' . $this->that->ID . '&amp;w=400" /><div style="clear: both;"></div></div>'), new Tab(__('Resize'), '<div id="imgresize"><div id="resval" style="clear: right;"><input name="resimgx" id="resimgx" size="4" value="' . $size[0] . '" />x<input name="resimgy" id="resimgy" size="4" value="' . $size[1] . '" /></div></div>'), new Tab(__('Rotate'), new Select(__('Specify rotation (CCW)'), 'imgrot', array('0' => __('None'), '90' => '90 &deg;', '180' => '180 &deg;', '270' => '270 &deg;'), $_REQUEST['imgrot']))));
 }
 /**
  * (non-PHPdoc)
  * @see lib/Page#run()
  */
 function run()
 {
     if ($this->saveChanges()) {
         redirect(-1);
     }
     $this->setContent('main', Form::quick(false, __('Save'), $this->medit()));
     global $Templates;
     $Templates->render();
 }
 function run()
 {
     global $Templates;
     if ($this->saveChanges()) {
     }
     // redirect($_REQUEST['edit']);
     $this->setContent('main', Form::quick(false, __('Save'), $this->edit()));
     $Templates->render();
 }
 /**
  * Contains actions and pageview-logic
  * @return void
  */
 function run()
 {
     global $Templates, $USER, $CONFIG, $Controller, $DB;
     if ($this->saveChanges()) {
         redirect(array('id' => $this->that->ID, 'saved' => 1));
     }
     global $Templates;
     $this->setContent('main', Form::quick(false, null, $this->editTab()));
     $Templates->render();
 }
 function run()
 {
     __autoload('Form');
     if ($this->saveChanges()) {
         redirect(array('id' => $this->that->ID));
     }
     global $Templates;
     $this->setContent('main', Form::quick(false, null, $this->editTab()));
     $Templates->render();
 }
 function run()
 {
     global $Templates, $CONFIG;
     if ($this->saveChanges()) {
         Flash::queue(__('Your changes were saved'), 'confirmation');
         redirect($this->that);
     }
     $this->setContent('main', Form::quick(false, __('Save'), new Input(__('Page name'), 'name', $this->Name), new Select(__('Group'), 'interesting_groups', $this->that->groups(), $CONFIG->matrikel->interesting_groups, true)));
     $Templates->render();
 }
 function run()
 {
     __autoload('Form');
     if ($this->saveChanges()) {
         redirect(array('id' => $this->that->ID));
     }
     global $Templates;
     $this->setContent('header', __('Edit calendar-viewer settings'));
     $this->setContent('main', Form::quick(false, null, $this->editTab()));
     $Templates->admin->render();
 }
Example #8
0
    function run()
    {
        global $Templates, $CONFIG, $DB, $Controller;
        $_REQUEST->setType('flash', 'any');
        if ($_REQUEST->valid('flash')) {
            Flash::create($_REQUEST['flash'] . '_flash_1', $_REQUEST['flash']);
        }
        $_REQUEST->setType('addToConfig', 'any');
        if ($_REQUEST->valid('addToConfig')) {
            $CONFIG->Frontpage->setType('NewsItems', 'text');
            $CONFIG->Frontpage->setDescription('NewsItems', 'Number of news items displayed');
            $CONFIG->Frontpage->NewsItems = 5;
        }
        $content = '';
        $newsNum = $CONFIG->Frontpage->NewsItems;
        if (!is_numeric($newsNum) || $newsNum < 1 || $newsNum > 30) {
            $newsNum = 5;
        }
        $newsNum = 3;
        /* Retrive news objects */
        if ($newsNum > 0) {
            $newsObj = Flow::retrieve('News', $newsNum, false, false, false, 0, true);
        }
        /* <<< New flowing design >>> */
        foreach ($newsObj as $news) {
            $content .= $news->display('new');
        }
        $mlForm = new Form('mailListForm');
        $ml = $mlForm->quick(null, __('Send'), new Input('Email', 'mlmail'));
        $r = '<div id="intro">
        	<div class="lcol"><img src="' . $Templates->current->webdir . 'images/intro/IMG_0817.jpg" width="400" alt="Lihkoren" /></div>
	        <div class="rcol"><p>Link&ouml;pings Students&aring;ngarf&ouml;rening Lihk&ouml;ren &auml;r en mansk&ouml;r som verkar vid Link&ouml;pings universitet, under ledning av director musices Hans Lundgren. K&ouml;ren bildades 1972 av studenter vid d&aring;varande Link&ouml;pings H&ouml;gskola.
Lihk&ouml;ren uttalas som det smakar. K&ouml;ren framf&ouml;r fr&auml;mst nordisk och europeisk musik, delvis fr&aring;n den traditionella mansk&ouml;rsrepertoaren men &auml;ven nyskriven musik. Glimten i &ouml;gat och den goda kontakten med publiken pr&auml;glar konserterna.<br>V&auml;l m&ouml;tt.</p></div>
			<img src="' . $Templates->current->webdir . 'images/rand_top.png" alt="pagesplit" class="pagesplit" />
		</div>
		<div id="fbottom">
			<div class="lcol">
				<div class="lbox coming"><h1 class="icn-hdr"><span class="icn icn-coming"></span>' . __('Kommande h&auml;ndelser') . '</h1>
					<p>Kommande h&auml;ndelser i kalendern.</p>
				</div>
				<div class="lbox maillist"><h1 class="icn-hdr"><span class="icn icn-mail"></span>' . __('Nyhetsbrev') . '</h1>
					<p class="pre">Vill du f&aring; information om kommande konserter och andra arrangemang med Lihk&ouml;ren?</p>
					' . $ml . '
					<p>Du kommer d&aring; att f&aring; ett e-brev som du m&aring;ste svara p&aring; f&ouml;r att bekr&auml;fta att du vill att informationen ska skickas till dig</p>
				</div>
			</div>
        	<div class="rbox news"><h1 class="icn-hdr"><span class="icn icn-news"></span>' . __('Nyheter') . '</h1>' . $content . '<a href="/flowView?q=News">' . __('View all news') . '</a></div>
        </div>';
        /*         dump($Templates->current->webdir); */
        $this->setContent('main', $r);
        $Templates->render();
    }
Example #9
0
 function schematicEditor()
 {
     global $DB, $CONFIG, $USER, $Controller;
     $bookItems = $DB->booking_items->asArray(false, 'id,parent,place', false, false, 'place ASC');
     $Controller->get(arrayExtract($bookItems, 'id'));
     foreach ($bookItems as &$bi) {
         $bi['item'] = $Controller->{$bi['id']};
     }
     $inflatedBookItems = inflate($bookItems);
     $content = self::renderItems($inflatedBookItems);
     if ($this->mayI(EDIT)) {
         $content .= Form::quick(null, null, new Input(__('Object name'), 'oname'), new Select(__('Parent'), 'oparent', $inflatedBookItems, false, false, __('None')));
     }
     $this->setContent('main', $content);
 }
Example #10
0
 function selectLanguage()
 {
     global $CONFIG;
     JS::loadjQuery(false);
     JS::raw("\$(function(){\$('#" . idfy('user_settings::language') . "').change(function(e){\$(e.target).closest('form').submit();})});");
     echo Form::quick(url(null, true), false, new Select(false, 'user_settings::language', google::languages($CONFIG->Site->languages), @$_COOKIE['user_settings::language'], false, __('Choose language')));
 }
 function calendarForm()
 {
     return Form::quick(null, null, new Input(__('Calendar name'), 'calendarname'));
 }
Example #12
0
 function attendanceForm()
 {
     global $USER;
     $att = $this->getAttendance();
     return Form::quick(false, null, new RadioSet(__('Attending'), 'attending', array('yes' => __('Yes'), 'no' => __('No')), @$att[$USER->ID]['attending']), new Input(__('Comment'), 'comment', @$att[$USER->ID]['comment']));
 }
Example #13
0
 /**
  * Displays the page form member administration of a group
  * @param integer $group The group which to edit
  * @return string
  */
 private function memberTab()
 {
     global $DB, $Controller, $USER;
     $r = '';
     $volpre = $this->that->GroupType == 'volpre';
     if (!$this->that) {
         return;
     }
     $_REQUEST->setType('nGM', 'anything');
     $_REQUEST->setType('keyword', 'string');
     $_REQUEST->setType('group_action', '#(copy|reset)_members#');
     $_REQUEST->setType('gid', 'numeric');
     $_REQUEST->setType('copy_to_group', 'numeric');
     $gform = new Form('nGM', url(null, array('edit', 'with', 'adm')), false);
     $groups = $DB->{'spine,metadata'}->asList(array('spine.class' => 'Group', 'metadata.field' => 'Name', 'metadata.metameta' => $USER->settings['language'], 'spine.id!' => array_merge(array($this->that->ID), $this->that->groups(false, 1))), 'spine.id,metadata.value', false, true, 'metadata.value');
     $uform = new Form('findUser', url(null, array('edit', 'with', 'adm')), false);
     $i = 0;
     $mem = array('', '');
     $count = array(0, 0);
     $res = $DB->group_members->get(array('group' => $this->that->ID));
     while ($row = $DB->fetchAssoc($res)) {
         $o = $Controller->{$row['user']};
         ++$count[is_a($o, 'Group')];
         $mem[is_a($o, 'Group')] .= '<li class="' . ($i % 2 ? 'odd' : 'even') . '"><span class="fixed-width">' . $o . '</span><div class="tools">' . ($volpre ? icon('small/add', __('Add user to group'), url(array('add' => $row['user']), array('edit', 'with'))) : icon('small/delete', __('Remove user from group'), url(array('rem' => $row['user']), array('edit', 'with')))) . '</div></li>';
         $i++;
     }
     if ($volpre) {
         $r .= '<h1>' . __('Note!') . '</h1>' . __('Non-members are displayed for preselected groups!');
     }
     if (!empty($mem[0])) {
         $r .= '<h2>' . ($volpre ? __('Non-member users') : __('Member users')) . ' (' . $count[0] . ')' . '</h2><ul class="list">' . $mem[0] . '</ul>';
     }
     if (!empty($mem[1])) {
         $r .= '<h2>' . __('Subgroups') . ' (' . $count[1] . ')' . '</h2><ul class="list">' . $mem[1] . '</ul>';
     }
     $gp = $this->that->groups(true);
     if (!empty($gp)) {
         $r .= '<p><h3>' . __('Additionally, this group is a subgroup to the following groups: ') . '</h3>' . join(', ', $gp) . '</p>';
     }
     $group_actions = '';
     if (!empty($mem[0]) || !empty($mem[1])) {
         $available_groups = $Controller->getClass('Group');
         propsort($available_groups, 'Name');
         $group_actions = new Formsection(__('Group actions'), Form::quick(url(false, array('edit', 'with')), __('Copy members'), new Hidden('group_action', 'copy_members'), new Li(new Select(__('Copy to group'), 'copy_to_group', $available_groups, false, false, __('Choose group')))), Form::quick(url(false, array('edit', 'with')), __('Reset all memberships'), '<h3>Reset membership</h3>', new Hidden('group_action', 'reset_members')));
     }
     return array($r, new Accordion(__('Users'), $uform->collection(new Set(new Li(new Input(__('Find user'), 'keyword', $_REQUEST['keyword']), new Submit(__('Search'))))) . $this->userSearchResults($volpre), __('Groups'), $gform->collection(new Set(new Li(new Select(__('Choose group'), 'add', $groups, false, false, __('Choose group')), new Submit($volpre ? __('Remove') : __('Add')))))), $group_actions);
 }
Example #14
0
 function moveForm()
 {
     $menu = $this->getMenu(false, false, false);
     return Form::quick(false, null, '<h2>' . __('Move page') . '</h2><span id="whichpagetomove">' . new Select(false, 'page', $menu, false, false, true) . '</span>', new RadioSet('.. ' . __('as '), 'where', array('child' => __('Child'), 'below' => __('Below'))), new Select('.. ' . __('to'), 'to', $menu, false, false, true));
 }
Example #15
0
 function run()
 {
     global $Templates;
     $this->setContent('main', Form::quick(false, __('Search'), $this->searchForm()) . $this->result());
     $Templates->render();
 }
Example #16
0
 /**
  * Display the page for creation of a new subfolder
  * @return void
  */
 function newFolder()
 {
     return Form::quick(false, __('Create'), new Formsection(__('New folder'), new Input(__('Folder name'), 'fname')));
 }
Example #17
0
 function confirmationForm()
 {
     return Form::quick(null, __('Confirm'), new Hidden('confirm', '1'));
 }
 function edit()
 {
     return Form::quick(false, false, new Select(__('Flows'), 'flows', Flow::flows(), $this->that->flows, true), new Input(__('Items per page', 'items', $this->that->flows_per_page, 'numeric')));
 }