$wo->db->query('update ' . $table->getTableName() . ' set ' . $ordering . '=\'' . $targetRow[$ordering] . '\' where id=\'' . $before['id'] . '\'');
         $wo->db->query('update ' . $table->getTableName() . ' set ' . $ordering . '=\'' . $before[$ordering] . '\' where id=\'' . $targetRow['id'] . '\'');
     }
     if ($header != '') {
         header($header);
     } else {
         header('Location: administration.php?action=read&__address=1_' . $table->getTableId() . $extraURLBit);
     }
     doTheExit();
 } else {
     if ($action == 'moveDown' && count($addressItems) == 3) {
         $targetRow = $wo->db->getRow($table->getTableName(), $addressItems[2]);
         $ordering = $table->getOrderingColumnForListings();
         if ($table->getGroupedByTable() != '') {
             $table2 = new WOOOF_dataBaseTable($wo->db, $table->getGroupedByTable());
             if ($table2->getAdminPresentation() == WOOOF_tablePresentationTypes::CompositeTree) {
                 if ($targetRow[$table->getLocalGroupColumn()] != '-1') {
                     $header = 'Location: administration.php?action=edit&__address=1_' . $table2->getTableId() . '_' . $targetRow[$table->getLocalGroupColumn()] . '&parentNode=' . $targetRow[$table->getLocalGroupColumn()];
                 } else {
                     $header = 'Location: improvedTree.php?action=read&__address=1_' . $table2->getTableId() . '&parentNode=' . $targetRow[$table->getLocalGroupColumn()];
                 }
             } else {
                 if (stripos($table2->getTablesGroupedByThis(), $table->getTableName()) !== null && $_GET['from'] == 'edit') {
                     $header = 'Location: administration.php?action=edit&__address=1_' . $table2->getTableId() . '_' . $targetRow[$table->getLocalGroupColumn()];
                 } else {
                     $header = '';
                 }
             }
             $extraURLBit = '&wooofParent=' . $targetRow[$table->getLocalGroupColumn()] . '&' . $table->getLocalGroupColumn() . '=' . $targetRow[$table->getLocalGroupColumn()];
             $extraQueryBit = ' and ' . $table->getLocalGroupColumn() . '=\'' . $targetRow[$table->getLocalGroupColumn()] . '\' ';
         } else {
Exemple #2
0
    $columnForMultipleTemplates = '';
    $showIdInAdminLists = '';
    $showIdInAdminForms = '';
    $dbEngine = '';
} else {
    if (isset($_GET['table'])) {
        $table = new WOOOF_dataBaseTable($wo->db, $wo->db->escape(trim($_GET['table'])));
        $action = 'edit';
        $description = $table->getTableDescription();
        $subtableDescription = $table->getSubTableDescription();
        $presentationDefault[1] = '';
        $presentationDefault[2] = '';
        $presentationDefault[3] = '';
        $presentationDefault[4] = '';
        $presentationDefault[5] = '';
        $presentationDefault[$table->getAdminPresentation()] = ' selected';
        $tableName = $table->getTableName();
        $orderingColumnForListings = $table->getOrderingColumnForListings();
        $appearsInAdminMenu = $table->getAppearsInAdminMenu();
        if ($appearsInAdminMenu == '1') {
            $appearsInAdminMenu = ' checked';
        } else {
            $appearsInAdminMenu = '';
        }
        $adminItemsPerPage = $table->getAdminItemsPerPage();
        $adminListMarkingCondition = $table->getAdminListMarkingCondition();
        $adminListMarkedStyle = $table->getAdminListMarkedStyle();
        $groupedByTable = $table->getGroupedByTable();
        $remoteGroupColumn = $table->getRemoteGroupColumn();
        $localGroupColumn = $table->getLocalGroupColumn();
        $tablesGroupedByThis = $table->getTablesGroupedByThis();