* List tables managed by dbEdit * * @package dbEdit Table Editor * @version 1.0 * @author Jelle Jager * @copyright 2008 Jelle Jager * @license GPL * */ if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the MODx Content Manager instead of accessing this file directly."); $theme = $manager_theme ? "$manager_theme":""; $base_path = $modx->config['base_path']; // context menu include $base_path."manager/includes/controls/contextmenu.php"; $cm = new ContextMenu("cntxm", 150); $cm->addItem("Browse","js:menuAction(1)","media/style/{$theme}images/icons/save.png",(!$modx->hasPermission('exec_module') ? 1:0)); $cm->addSeparator(); $cm->addItem($_lang["edit"],"js:menuAction(2)","media/style/{$theme}images/icons/logging.gif",(!$modx->hasPermission('edit_module') ? 1:0)); $cm->addItem("Import Data","js:menuAction(3)","media/style/{$theme}images/icons/newdoc.gif",(!$modx->hasPermission('new_module') ? 1:0)); $cm->addItem("Remove", "js:menuAction(4)","media/style/{$theme}images/icons/delete.gif",(!$modx->hasPermission('delete_module') ? 1:0)); echo $cm->render(); ?> <script> function getCntxMenu(id) { return $(id); } function hideCntxMenu(id){ var cm = getCntxMenu(id); cm.style.visibility = 'hidden'; }
if ($_REQUEST['op'] == 'reset') { $search = $query = ''; $_PAGE['vs']['search'] = ''; } else { $search = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; if (!is_numeric($search)) { $search = $modx->db->escape($query); } $_PAGE['vs']['search'] = $query; } // get & save listmode $listmode = isset($_REQUEST['listmode']) ? $_REQUEST['listmode'] : $_PAGE['vs']['lm']; $_PAGE['vs']['lm'] = $listmode; // context menu include_once $base_path . "manager/includes/controls/contextmenu.php"; $cm = new ContextMenu("cntxm", 150); $cm->addItem($_lang['view_log'], "js:menuAction(1)", $_style['icons_save']); $cm->addSeparator(); $cm->addItem($_lang['delete'], "js:menuAction(2)", $_style['icons_delete'], !$modx->hasPermission('delete_eventlog') ? 1 : 0); echo $cm->render(); ?> <script type="text/javascript"> function searchResource(){ document.resource.op.value="srch"; document.resource.submit(); }; function resetSearch(){ document.resource.search.value = '' document.resource.op.value="reset"; document.resource.submit();
$modx->manager->initPageViewState(); // get and save search string if ($_REQUEST['op'] == 'reset') { $query = ''; $_PAGE['vs']['search'] = ''; } else { $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; $sqlQuery = $modx->db->escape($query); $_PAGE['vs']['search'] = $query; } // get & save listmode $listmode = isset($_REQUEST['listmode']) ? $_REQUEST['listmode'] : $_PAGE['vs']['lm']; $_PAGE['vs']['lm'] = $listmode; // context menu include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; $cm = new ContextMenu("cntxm", 150); $cm->addItem($_lang["edit"], "js:menuAction(1)", false, !$modx->hasPermission('edit_user') ? 1 : 0); $cm->addItem($_lang["delete"], "js:menuAction(2)", false, !$modx->hasPermission('delete_user') ? 1 : 0); echo $cm->render(); ?> <script language="JavaScript" type="text/javascript"> function searchResource(){ document.resource.op.value="srch"; document.resource.submit(); }; function resetSearch(){ document.resource.search.value = '' document.resource.op.value="reset"; document.resource.submit(); };
if ($_REQUEST['op'] == 'reset') { $sqlQuery = $query = ''; $_PAGE['vs']['search'] = ''; } else { $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; if (!is_numeric($sqlQuery)) { $sqlQuery = $modx->db->escape($query); } $_PAGE['vs']['search'] = $query; } // get & save listmode $listmode = isset($_REQUEST['listmode']) ? $_REQUEST['listmode'] : $_PAGE['vs']['lm']; $_PAGE['vs']['lm'] = $listmode; // context menu include_once $base_path . "manager/includes/controls/contextmenu.php"; $cm = new ContextMenu("cntxm", 150); $cm->addItem($_lang['view_log'], "js:menuAction(1)", "media/style/" . $manager_theme . "images/icons/save.png"); $cm->addSeparator(); $cm->addItem($_lang['delete'], "js:menuAction(2)", "media/style/" . $manager_theme . "images/icons/delete.png", !$modx->hasPermission('delete_eventlog') ? 1 : 0); echo $cm->render(); ?> <script type="text/javascript"> function searchResource(){ document.resource.op.value="srch"; document.resource.submit(); }; function resetSearch(){ document.resource.search.value = '' document.resource.op.value="reset"; document.resource.submit();
$modx->manager->initPageViewState(); // get and save search string if ($_REQUEST['op'] == 'reset') { $query = ''; $_PAGE['vs']['search'] = ''; } else { $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; $sqlQuery = $modx->db->escape($query); $_PAGE['vs']['search'] = $query; } // get & save listmode $listmode = isset($_REQUEST['listmode']) ? $_REQUEST['listmode'] : $_PAGE['vs']['lm']; $_PAGE['vs']['lm'] = $listmode; // context menu include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; $cm = new ContextMenu("cntxm", 150); $cm->addItem($_lang["edit"], "js:menuAction(1)", $_style["icons_edit_document"], !$modx->hasPermission('edit_user') ? 1 : 0); $cm->addItem($_lang["delete"], "js:menuAction(2)", $_style["icons_delete"], !$modx->hasPermission('delete_user') ? 1 : 0); echo $cm->render(); ?> <script language="JavaScript" type="text/javascript"> function searchResource(){ document.resource.op.value="srch"; document.resource.submit(); }; function resetSearch(){ document.resource.search.value = '' document.resource.op.value="reset"; document.resource.submit(); };
$modx->manager->initPageViewState(); // get and save search string if ($_REQUEST['op'] == 'reset') { $query = ''; $_PAGE['vs']['search'] = ''; } else { $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; $sqlQuery = $modx->db->escape($query); $_PAGE['vs']['search'] = $query; } // get & save listmode $listmode = isset($_REQUEST['listmode']) ? $_REQUEST['listmode'] : $_PAGE['vs']['lm']; $_PAGE['vs']['lm'] = $listmode; // context menu include_once $base_path . "manager/includes/controls/contextmenu.php"; $cm = new ContextMenu("cntxm", 150); $cm->addItem($_lang["run_module"], "js:menuAction(1)", $_style['icons_save'], !$modx->hasPermission('exec_module') ? 1 : 0); $cm->addSeparator(); $cm->addItem($_lang["edit"], "js:menuAction(2)", $_style['icons_edit_document'], !$modx->hasPermission('edit_module') ? 1 : 0); $cm->addItem($_lang["duplicate"], "js:menuAction(3)", $_style['icons_duplicate_document'], !$modx->hasPermission('new_module') ? 1 : 0); $cm->addItem($_lang["delete"], "js:menuAction(4)", $_style['icons_delete'], !$modx->hasPermission('delete_module') ? 1 : 0); echo $cm->render(); ?> <script language="JavaScript" type="text/javascript"> function searchResource(){ document.resource.op.value="srch"; document.resource.submit(); }; function resetSearch(){ document.resource.search.value = ''
$modx->manager->initPageViewState(); // get and save search string if ($_REQUEST['op'] == 'reset') { $query = ''; $_PAGE['vs']['search'] = ''; } else { $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; $sqlQuery = $modx->db->escape($query); $_PAGE['vs']['search'] = $query; } // get & save listmode $listmode = isset($_REQUEST['listmode']) ? $_REQUEST['listmode'] : $_PAGE['vs']['lm']; $_PAGE['vs']['lm'] = $listmode; // context menu include_once $base_path . "manager/includes/controls/contextmenu.php"; $cm = new ContextMenu("cntxm", 150); $cm->addItem($_lang["edit"], "js:menuAction(1)", "media/style/{$manager_theme}/images/icons/logging.gif", !$modx->hasPermission('edit_user') ? 1 : 0); $cm->addItem($_lang["delete"], "js:menuAction(2)", "media/style/{$manager_theme}/images/icons/delete.gif", !$modx->hasPermission('delete_user') ? 1 : 0); echo $cm->render(); ?> <script language="JavaScript" type="text/javascript"> function searchResource(){ document.resource.op.value="srch"; document.resource.submit(); }; function resetSearch(){ document.resource.search.value = '' document.resource.op.value="reset"; document.resource.submit(); };
$modx->manager->initPageViewState(); // get and save search string if ($_REQUEST['op'] == 'reset') { $query = ''; $_PAGE['vs']['search'] = ''; } else { $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; $keyword = $modx->db->escape($query); $_PAGE['vs']['search'] = $query; } // get & save listmode $listmode = isset($_REQUEST['listmode']) ? $_REQUEST['listmode'] : $_PAGE['vs']['lm']; $_PAGE['vs']['lm'] = $listmode; // context menu include_once MODX_BASE_PATH . 'manager/includes/controls/contextmenu.php'; $cm = new ContextMenu('cntxm', 150); $cm->addItem($_lang['edit'], 'js:menuAction(1)', $_style['icons_edit_document'], !$modx->hasPermission('edit_user') ? 1 : 0); $cm->addItem($_lang['delete'], 'js:menuAction(2)', $_style['icons_delete'], !$modx->hasPermission('delete_user') ? 1 : 0); echo $cm->render(); ?> <script language="JavaScript" type="text/javascript"> function searchResource(){ document.resource.op.value="srch"; document.resource.submit(); } function resetSearch() { document.resource.search.value = '' document.resource.op.value="reset"; document.resource.submit(); }
$limit = $offset * MAX_DISPLAY_RECORDS_NUM . ', ' . MAX_DISPLAY_RECORDS_NUM; $rs = $modx->db->select('DISTINCT sc.*', $from, $where, $orderby, $limit); if (!$rs) { $e->setError(1); // sql error $e->dumpError(); include $modx->config['base_path'] . 'manager/includes/footer.inc.php'; exit; } else { $resource = array(); while ($row = $modx->db->getRow($rs)) { $resource[] = $row; } // context menu include_once MODX_MANAGER_PATH . 'includes/controls/contextmenu.php'; $cm = new ContextMenu("cntxm", 180); // $cm->addSeparator(); $cm->addItem($_lang["edit_resource"], "js:menuAction(27)", $_style['icons_edit_document'], $modx->hasPermission('edit_document') ? 0 : 1); $cm->addItem($_lang["create_resource_here"], "js:menuAction(4)", $_style['icons_new_document'], $modx->hasPermission('new_document') ? 0 : 1); $cm->addItem($_lang["move_resource"], "js:menuAction(51)", $_style['icons_move_document'], $modx->hasPermission('save_document') ? 0 : 1); $cm->addItem($_lang["resource_duplicate"], "js:menuAction(94)", $_style['icons_resource_duplicate'], $modx->hasPermission('new_document') ? 0 : 1); $cm->addSeparator(); $cm->addItem($_lang["publish_resource"], "js:menuAction(61)", $_style['icons_publish_document'], $modx->hasPermission('publish_document') ? 0 : 1); $cm->addItem($_lang["unpublish_resource"], "js:menuAction(62)", $_style['icons_unpublish_resource'], $modx->hasPermission('publish_document') ? 0 : 1); $cm->addItem($_lang["delete_resource"], "js:menuAction(6)", $_style['icons_delete'], $modx->hasPermission('delete_document') ? 0 : 1); $cm->addItem($_lang["undelete_resource"], "js:menuAction(63)", $_style['icons_undelete_resource'], $modx->hasPermission('delete_document') ? 0 : 1); $cm->addSeparator(); $cm->addItem($_lang["create_weblink_here"], "js:menuAction(72)", $_style['icons_weblink'], $modx->hasPermission('new_document') ? 0 : 1); $cm->addSeparator(); $cm->addItem($_lang["resource_overview"], "js:menuAction(3)", $_style['icons_resource_overview'], $modx->hasPermission('view_document') ? 0 : 1); //$cm->addItem($_lang["preview_resource"], "js:menuAction(999)",$_style['icons_preview_resource'],0);