示例#1
0
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
// Author: XOOPS Foundation                                                  //
// URL: http://www.xoops.org/                                                //
// Project: The XOOPS Project                                                //
// ------------------------------------------------------------------------- //
include_once dirname(__FILE__) . '/admin_header.php';
xoops_cp_header();
$indexAdmin = new ModuleAdmin();
$indexAdmin->addItemButton(_ADD . ' ' . _PROFILE_AM_CATEGORY, 'category.php?op=new', 'add', '');
echo $indexAdmin->addNavigation('category.php');
echo $indexAdmin->renderButton('right', '');
$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['id']) ? "edit" : 'list');
$handler =& xoops_getmodulehandler('category');
switch ($op) {
    default:
    case "list":
        $criteria = new CriteriaCompo();
        $criteria->setSort('cat_weight');
        $criteria->setOrder('ASC');
        $GLOBALS['xoopsTpl']->assign('categories', $handler->getObjects($criteria, true, false));
        $template_main = "profile_admin_categorylist.tpl";
        break;
    case "new":
        include_once '../include/forms.php';
        $obj =& $handler->create();
        $form = $obj->getForm();
示例#2
0
    case 'createconfig':
        xlanguage_createConfig();
        redirect_header('main.php', 1, _AM_XLANG_CREATED);
        exit;
        break;
    case "default":
    default:
        xoops_cp_header();
        $mainAdmin = new ModuleAdmin();
        echo $mainAdmin->addNavigation('main.php');
        // if (TDMDownloads_checkModuleAdmin()){
        // $mainAdmin = new ModuleAdmin();
        // echo $mainAdmin->addNavigation('downloads.php');
        $mainAdmin->addItemButton(_MI_XLANGUAGE_ADMENU1, 'main.php?op=add&type=base', 'add');
        $mainAdmin->addItemButton(_MI_XLANGUAGE_ADMENU2, 'main.php?op=add&type=ext', 'insert_table_row');
        echo $mainAdmin->renderButton();
        //        }
        //        echo "<h4>" . XLANG_CONFIG_LINK . "</h4>";
        languageList();
        $configfile_status = @is_readable(XLANGUAGE_CONFIG_FILE) ? _AM_XLANG_CONFIGOK : _AM_XLANG_CONFIGNOTOK;
        echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\"><br />";
        //        echo " - <b><a href='index.php?op=add&amp;type=base'>" . _AM_XLANG_ADDBASE . "</a></b><br /><br />\n";
        //        echo " - <b><a href='index.php?op=add&amp;type=ext'>" . _AM_XLANG_ADDEXT . "</a></b><br /><br />\n";
        echo "<b>" . $configfile_status . "</b>: " . XLANGUAGE_CONFIG_FILE . " (<a href='main.php?op=createconfig' title='" . _AM_XLANG_CREATECONFIG . "'>" . _AM_XLANG_CREATECONFIG . "</a>)<br /><br />\n";
        //        echo " - <b><a href='about.php'>" . _AM_XLANG_ABOUT . "</a></b>";
        echo "</td></tr></table>";
        break;
}
xoops_cp_footer();
function languageList()
{