Documentation is available at core.php
- <?php
- ob_start();
- session_start();
- $GLOBALS['errorArray'] = array();
- // Include site header for access to all site script files
- require_once "Core_Resources/core_header.php";
- //verify the database and initialize if not set up yet
- if(!verify_core()){initialize_core();}
- if( !function_exists( 'allowed' ) ) { function allowed(){return true;} }
- if( !allowed( "view core" ) ) {
- $unAuthorized = true;
- header( "Location: http://".$_SERVER['HTTP_HOST']."/pi/Modules/people/login.php?error=unauthorized" );
- } else {
- core_start();
- }
- ob_end_flush();
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>pi Core Access</title>
- <style type="text/css" media="screen">
- @import url( Core_Resources/core-styles.css);
- .style1 {font-size: 15%}
- </style>
- <script language="JavaScript" type="text/JavaScript">
- <!--
- function MM_goToURL() { //v3.0
- var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
- for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
- }
- function MM_findObj(n, d) { //v4.01
- var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
- d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
- if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
- for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
- if(!x && d.getElementById) x=d.getElementById(n); return x;
- }
- function MM_changeProp(objName,x,theProp,theValue) { //v6.0
- var obj = MM_findObj(objName);
- if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
- if (theValue == true || theValue == false)
- eval("obj."+theProp+"="+theValue);
- else eval("obj."+theProp+"='"+theValue+"'");
- }
- }
- //-->
- </script>
- </head>
- <body <?php
- if($action){echo ' onload="MM_goToURL(\'parent\',\'core.php\');return document.MM_returnValue"';}?>>
- <div id="centering" class="container">
- <div id="rap">
- <?php echo insert_corners(); ?>
- <div id="header">
- <div id="title_navigation">
- <?php
- if( !$unAuthorized ) {
- ?>
- <form method="post">
- <a href="#" <?php echo mouseover(); ?>>core<<</a> <br>
- <a href="Modules/system_beta_1/system_management.php" <?php echo mouseover(); ?>>modules</a> <br>
- <?php
- if( isset( $GLOBALS['user'] ) ) {
- echo '
- <input type="hidden" name="action" value="logout">
- <input style="text-align:right;padding:0px;" type="button" class="submitLink" value="log out" '.mouseover().' onclick="this.form.submit();">
- ';
- } else {
- echo '<a href="../people/login.php"'.mouseover().'>login</a>';
- }
- }
- ?>
- </form>
- </div>
- <div id="title_text">
- core management
- </div><!-- End title_text -->
- </div><!-- End header -->
- <div id="content">
- <?php
- if( $unAuthorized ) {
- echo '
- you are not authorized to view this page.
- <p>please <a href="Modules/people/login.php" '.mouseover().'>log in </a> to view this page
- ';
- } else {
- if( $_GET['p'] == "modules" || !$_GET['p'] ) {
- echo core_get_modules_table();
- } else if( $_GET['p'] == "objects" ) {
- if( $_GET['object_type'] ) {
- core_get_object_type_table();
- } else {
- core_get_object_types_table();
- }
- } else if( $_GET['p'] == "constraints" ) {
- if( $_GET['constraint'] && $_GET['action'] != "delete_constraint" ) {
- core_get_constraint_table();
- } else {
- core_get_constraints_table();
- }
- } else if( $_GET['p'] == "relationships" ) {
- if( $_GET['relationship_type'] && $_GET['action'] != "delete_relationship_type" ) {
- core_get_relationship_type_table();
- } else {
- core_get_relationship_types_table();
- }
- } else if( $_GET['p'] == "type_sets" ) {
- if( $_GET['type_set'] && $_GET['action'] != "delete_type_set" ) {
- core_get_type_set_table();
- } else {
- core_get_type_sets_table();
- }
- } else if( $_GET['p'] == "security" ) {
- if( function_exists( people_get_permissions_content ) ) {
- if( !$_GET['object'] ) { people_get_permissions_content(); }
- else { people_get_permission_content(); }
- } else { echo 'no security at this time - install people for security'; }
- } else if( $_GET['p'] == "settings" ) {
- echo core_get_settings();
- }
- }
- ?>
- </div><!-- End content -->
- <div id="footer"><a href="#" onclick="MM_changeProp('centering','','style.display','none','DIV')">hide</a> |
- <?php
- $user =& $GLOBALS['user'];
- if( $user ) {
- echo get_object_index($user['id']).' logged in ';
- }
- if( !$unAuthorized ){
- echo '
- <a href="core.php?p=modules" '.mouseover().'>manage modules</a> | <a href="core.php?p=objects" '.mouseover().'>manage database structure</a> | <a href="core.php?p=security" '.mouseover().'>security settings</a> | <a href="core.php?p=settings" '.mouseover().'>core settings</a>
- ';
- }
- ?>
- </div>
- </div><!-- End modules -->
- </div><!-- End centering -->
- </body>
- </html>
Documentation generated on Tue, 24 May 2005 03:57:43 -0400 by phpDocumentor 1.3.0RC3