$keys = array('name', 'weight', 'description'); $nodetype = intval($_POST['nodetype']); $par = intval($_POST['parent']); if ($par == 0) { $nodetype = 1; } // only for category $vals = array('nodetype' => $nodetype, 'parent' => $par, 'relay' => $nodetype != 1 ? 0 : intval($_POST['relay'])); foreach ($keys as $k) { $vals[$k] = $xoopsDB->quoteString($myts->stripSlashesGPC($_POST[$k])); } $keyid = intval($_POST['keyid']); redirect_result($keywords->insert($keyid, $vals)); } elseif (isset($_POST['delkey'])) { $keyid = intval($_POST['keyid']); redirect_result($keywords->delete($keyid)); } xoops_cp_header(); include "mymenu.php"; $keyid = isset($_GET['keyid']) ? intval($_GET['keyid']) : 0; switch ($op) { default: echo "<h2>" . _AM_KEYWORDS_ADMIN . "</h2>\n"; echo "<style>\n.level1 li { margin-left: 2em; list-style: disc; }\n.level2 li { margin-left: 3em; list-style: circle; }\n.level3 li { margin-left: 4em; list-style: none; }\n</style>"; keywords_list($keywords->getTree()); echo "<hr/>"; keyword_form(); break; case 'editkey': keyword_form($keyid); break;
include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; // system default fields count (see oninstall.php $fields) define('FIELD_OFFSET', 9); $keywords = new KeyWords(); $field_types = array('varchar' => _AM_TYPE_STRING, 'integer' => _AM_TYPE_INTEGER, 'date' => _AM_TYPE_DATE, 'text' => _AM_TYPE_TEXT); $all_types = $field_types; $all_types['keywords'] = _AM_TYPE_KEYWORD; $all_types['link'] = _AM_TYPE_LINK; $all_types['timestamp'] = _AM_TYPE_TIMESTAMP; $all_types['user'] = _AM_TYPE_UID; $op = isset($_GET['op']) ? $_GET['op'] : ''; if (isset($_POST['field'])) { redirect_result(field_update()); } elseif (isset($_POST['delfield'])) { $fid = intval($_POST['fid']); redirect_result(fields_delete($fid)); exit; } xoops_cp_header(); include "mymenu.php"; switch ($op) { case 'fields': default: $fid = isset($_GET['fid']) ? $_GET['fid'] : 0; $mediaschema = new MediaSchema(); if (!$fid) { fields_list(); echo "<hr/>"; } field_form($fid); break;
$myts =& MyTextSanitizer::getInstance(); $op = isset($_GET['op']) ? $_GET['op'] : ''; $file_state = array('del' => _AM_DEL, 'chg' => _AM_CHG, 'new' => _AM_NEW, 'ok' => _AM_OK, 'extra' => _AM_EXTRA); if (isset($_POST['import'])) { redirect_result(import_file(), 'index.php?op=pkgs', _AM_NODATAINFILE); } elseif (isset($_POST['pkgdel'])) { redirect_result(delete_package(), 'index.php?op=pkgs'); } elseif (isset($_POST['accept'])) { redirect_result(modify_package(), 'index.php'); } elseif (isset($_POST['opts_select'])) { redirect_result(options_setting(), 'index.php'); } elseif (isset($_POST['clear'])) { $pkgid = intval($_POST['pkgid']); redirect_result(clear_package($pkgid), 'index.php?op=detail&pkgid=' . $pkgid); } elseif ($op == 'rollback') { redirect_result(rollback_update(), 'index.php'); } if (!empty($_GET['lib'])) { global $mydirpath; $mydirpath = dirname(dirname(__FILE__)); $mydirname = basename($mydirpath); // common libs (eg. altsys) $lib = preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['lib']); $page = preg_replace('/[^a-zA-Z0-9_-]/', '', @$_GET['page']); if (file_exists(XOOPS_TRUST_PATH . '/libs/' . $lib . '/' . $page . '.php')) { include XOOPS_TRUST_PATH . '/libs/' . $lib . '/' . $page . '.php'; } else { if (file_exists(XOOPS_TRUST_PATH . '/libs/' . $lib . '/index.php')) { include XOOPS_TRUST_PATH . '/libs/' . $lib . '/index.php'; } else { die('wrong request');
<?php # package bind administrator # $Id: pkgadmin.php,v 1.6 2007/07/16 05:18:30 nobu Exp $ include '../../../include/cp_header.php'; include_once '../package.class.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; $myts =& MyTextSanitizer::getInstance(); $op = isset($_GET['op']) ? $_GET['op'] : ''; if (isset($_POST['regpkg'])) { redirect_result(reg_set_packages(), 'index.php'); } elseif (isset($_POST['custom'])) { redirect_result(register_detail($myts->stripSlashesGPC($_POST['pname']), $myts->stripSlashesGPC($_POST['dirname'])), 'pkgadmin.php'); } xoops_cp_header(); echo mystyle(); include 'mymenu.php'; switch ($op) { default: case 'regpkg': // package managiment list_packages(); // checking regsiterd packages break; case 'detail': // set detail package setup_package($myts->stripSlashesGPC($_GET['dir'])); break; } xoops_cp_footer(); function get_active_list()
$keywords = new KeyWords(); $op = isset($_GET['op']) ? $_GET['op'] : ''; if (isset($_POST['dels'])) { redirect_result(contents_delete()); } elseif (!empty($_POST['op'])) { // list operation $res = contents_update_weight(); $op = $_POST['op']; switch ($op) { case 'del': break; case 'conf': case 'hide': $res = contents_update_status($op == 'conf' ? 'N' : 'X'); default: redirect_result($res); } } xoops_cp_header(); include "mymenu.php"; switch ($op) { case 'del': contents_delete_form(); break; default: echo "<h2>" . _AM_CONTENTS_ADMIN . "</h2>\n"; contents_list(); break; } xoops_cp_footer(); function contents_list()