Esempio n. 1
0
<?php

if (!ucan('page_edit:' . $_PEFI->route->lang)) {
    redirect_to_login($_PEFI->route->page);
}
include_once "{$_PEFI->libPath}/pefi_fileshelper.php";
include_once "{$_PEFI->libPath}/pefi_Logger.class.php";
$logger = $_PEFI->logger;
$todo = $_PEFI->todo;
if (strpos($todo, 'texts') === 0) {
    include 'texts.php';
} elseif ($todo == 'publishpage') {
    $_PEFI->view->content = publishPage($_REQUEST['page'], isset($_REQUEST['publishimages']));
} elseif (strpos($todo, 'assets') === 0) {
    include 'assets.php';
} elseif (strpos($todo, 'metadata') === 0) {
    include 'metadata.php';
} else {
    $_PEFI->view->content = "No such action:{$_PEFI->action} with todo:{$_PEFI->todo}";
}
Esempio n. 2
0
<?php

if (!ucan('setup') || !file_exists('_SETUPOK')) {
    return;
}
?>

<li>
    <a href="#" id="setup_menu">Setup</a>
    <ul id="admin_menu_setup">
        <li><a href="<?php 
echo createActionURL('setup', 'removefile');
?>
" target="admin_popup_iframe">Remove File</a></li>
        <li><a href="<?php 
echo createActionURL('setup', 'db');
?>
" target="_blank">Setup DB</a></li>
    </ul>
</li>
Esempio n. 3
0
<li><a href="#">Reservations</a>
    <ul id="admin_menu_reservations">
        <li><a href="<?php 
echo createActionURL('reservations', 'index');
?>
" target="_blank">Manage</a></li>
        <li><a href="<?php 
echo createActionURL('reservations', 'reservation');
?>
" target="_blank">Reservations</a></li>
        <li><a href="<?php 
echo createActionURL('reservations', 'reservationsadd');
?>
" target="_blank">Add</a></li>
        <li><a href="<?php 
echo createActionURL('reservations', 'availability');
?>
" target="_blank">Availability</a></li>
        <?php 
if (ucan('ifa', 'LIST')) {
    ?>
        <li><a href="<?php 
    echo createActionURL('reservations', 'ifa');
    ?>
" target="_blank">IFA</a></li>
        <?php 
}
?>
    </ul>
</li>
Esempio n. 4
0
     $_GET[$fp . 'status'] = '1';
     $_GET[$fp . 'dateFrom'] = array($_GET[$fp . 'showday'], '');
     $_GET[$fp . 'dateFrom' . $search_option_suf] = '<=';
     $_GET[$fp . 'dateTo'] = array($_GET[$fp . 'showday'], '');
     $_GET[$fp . 'dateTo' . $search_option_suf] = '>';
 } elseif (isset($_GET['backup'])) {
     header("Content-Disposition:attachment; filename={$action}.txt");
     echo $rsrvtns->backupData();
     die;
 } elseif (!array_key_exists($fp . 'dateFrom', $_GET)) {
     $_GET[$fp . 'status'] = '1';
     // active
     $_GET[$fp . 'dateFrom'] = array(date('Y-m-d'), '');
 }
 $elements = array(new PrimaryKeyElement(array('prop' => 'idReservation', 'label' => 'ID')), new TextElement(array('prop' => 'name', 'label' => 'Name', 'isFilterable' => true, 'isOrderable' => true)), new DateElement(array('prop' => 'dateFrom', 'label' => 'Date From', 'isFilterable' => true, 'isOrderable' => true, 'isDefOrder' => true, 'allowEmpty' => false, 'defSearchOp' => '>=')), new DateElement(array('prop' => 'dateTo', 'label' => 'Date To', 'isFilterable' => true, 'isOrderable' => true, 'defSearchOp' => '<')), new TextElement(array('prop' => 'arrTime', 'label' => 'ArrTime', 'isOrderable' => true, 'isDefOrder' => true, 'defSearchOp' => '=')), new IntegerElement(array('prop' => 'nrOfNights', 'label' => 'Nigths')), new IntegerElement(array('prop' => 'nrOfPersons', 'label' => 'Pers')), new ReferenceElement(array('prop' => 'room', 'label' => 'Room', 'isFilterable' => true, 'items' => $rsrvtns->getRooms(), 'frgnTable' => new OneTableDB($db, "{$db_pref}room", 'idRoom', $db_pref), 'frgnDispCol' => 'code')), new ReferenceElement(array('prop' => 'source', 'label' => 'Source', 'isFilterable' => true, 'items' => $rsrvtns->getSources(), 'frgnTable' => new OneTableDB($db, "{$db_pref}source", 'idSource', $db_pref), 'frgnDispCol' => 'code')), new ReferenceElement(array('prop' => 'status', 'label' => 'Status', 'isFilterable' => true, 'items' => $rsrvtns->getStatuses(), 'frgnTable' => new OneTableDB($db, "{$db_pref}status", 'idStatus', $db_pref), 'frgnDispCol' => 'code')), new TextElement(array('prop' => 'balance', 'label' => 'Balance')), new TextAreaElement(array('prop' => 'message', 'label' => 'Message')));
 if (ucan('ifa')) {
     $elements[] = new ActionElement(array('prop' => 'addIfaAction', 'label' => '+IFA', 'callback' => function ($recid) use($rsrvtns) {
         if ($recid > 0) {
             $answer = $rsrvtns->ifaadd($recid);
             if (!empty($answer)) {
                 return "IFA added for: {$answer}";
             } else {
                 return "IFA NOT added for ID: {$recid}";
             }
         } else {
             return 'Cannot add for id < 1';
         }
     }));
 }
 $form = new TableForm(array('elements' => $elements, 'label' => 'Editing Reservation Table', 'table' => new OneTableDB($db, "{$db_pref}reservation", 'idReservation', $db_pref), 'lock' => $_PEFI->lock, 'credentials' => $_PEFI->crdntls, 'filter' => $_GET, 'filtPref' => $fp, 'step' => 15, 'searchOptionSuf' => $search_option_suf, 'canDelete' => true, 'decorator' => $json ? JsonDecorator::get() : HtmlDecorator::get()));
 $output = $form->handle($_SERVER['REQUEST_METHOD'], $_POST);
Esempio n. 5
0
<?php

if (!ucan('linking_link')) {
    return;
}
?>

<li><a href="#">Links</a>
    <ul id="admin_menu_links">
        <li><a href="<?php 
echo createActionURL('links', 'publish');
?>
" class="confirm" target="admin_popup_iframe">Publish</a></li>
        <li><a href="<?php 
echo createActionURL('links', 'clean');
?>
" target="admin_popup_iframe">Clean</a></li>
        <li><a href="<?php 
echo createActionURL('links', 'generate');
?>
" target="admin_popup_iframe">Generate</a></li>
        <li><a href="<?php 
echo createActionURL('links', 'manage');
?>
" target="_blank">Manage</a></li>
        <li><a href="<?php 
echo createActionURL('links', 'managesections');
?>
" target="_blank">Sections</a></li>
        <li><a href="<?php 
echo createActionURL('links', 'managesubsections');
Esempio n. 6
0
}
?>
            </form>
        </li>
        <li><a href="<?php 
echo createActionURL('page', 'assets-show', "page={$pageuri}");
?>
" target="_blank">Page images</a></li>
        <?php 
if (ucan('assets')) {
    ?>
        <li><a href="<?php 
    echo createActionURL('page', 'assets-generatethumbs', "page={$pageuri}");
    ?>
" target="admin_popup_iframe">Generate thumbs</a></li>
        <?php 
}
?>
        <?php 
if (ucan('editsource')) {
    ?>
        <li><a href="<?php 
    echo createActionURL('site', 'editbfile', "page={$pageuri}");
    ?>
" target="_blank">Edit basefile</a></li>
        <?php 
}
?>
    </ul>
</li>