function showshortcuts($id, $parent)
{
    $q = dbAll('select id,name from pages where parent="' . $parent . '" order by ord desc,name');
    if (count($q)) {
        echo '<ul>';
        foreach ($q as $r) {
            echo '<li>';
            echo wInput('shortcuts[' . $r['id'] . ']', 'checkbox');
            $r2 = dbRow('select id,name from pagelinks where fromid="' . $id . '" and toid="' . $r['id'] . '"');
            if (count($r2)) {
                echo ' checked="checked"';
                $r['name'] = $r2['name'];
            }
            echo ' />';
            echo wInput('shortcutsName[' . $r['id'] . ']', 'text', htmlspecialchars($r['name']));
            showshortcuts($id, $r['id']);
            echo '</li>';
        }
        echo '</ul>';
    }
}
示例#2
0
echo '<option value="1"';
if (isset($page_vars['order_of_sub_pages_dir']) && $page_vars['order_of_sub_pages_dir'] == '1') {
    echo ' selected="selected"';
}
echo '>descending (z-a, 9-0)</option></select></td></tr>';
// }
echo '<tr><th>' . __('Recursively update page templates') . '</th><td><input type="checkbox" name="recursively_update_page_templates" /></td></tr>';
echo '</table>';
// }
echo '</td></tr></table></div>';
// }
// { tabs added by plugins
foreach ($PLUGINS as $n => $p) {
    if (isset($p['admin']['page_panel'])) {
        echo '<div id="' . $p['admin']['page_panel']['name'] . '">';
        $p['admin']['page_panel']['function']($page, $page_vars);
        echo '</div>';
    }
}
// }
echo '</div>';
echo wInput('action', 'submit', $edit ? __('Update Page Details') : __('Insert Page Details'));
if (isset($_REQUEST['frontend-admin'])) {
    echo '<input type="hidden" name="frontend-admin" value="1" />';
}
echo '</form>';
echo WW_getScripts();
echo WW_getCss();
echo '<script>//<![CDATA[
window.page_menu_currentpage=' . $id . '
//]]></script></body></html>';
function wFormRow($title, $input)
{
    echo '<tr><th>';
    if (is_array($title)) {
        echo htmlspecialchars($title[0]);
    } else {
        echo htmlspecialchars($title);
    }
    echo '</th><td>';
    if (is_array($input)) {
        for ($i = 0; $i < 4; ++$i) {
            if (!isset($input[$i])) {
                $input[$i] = null;
            }
        }
        echo wInput($input[0], $input[1], $input[2], $input[3]);
    } else {
        echo $input;
    }
    echo '</td></tr>';
}