Update of /cvsroot/phpslash/phpslash-dev/public_html/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13201/phpslash-dev/public_html/admin
Modified Files:
variableAdmin.php
Log Message:
removed classes that already had been moved to module directories. moved Infolog and slashAuth to module directories.
Index: variableAdmin.php
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/admin/variableAdmin.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** variableAdmin.php 12 Mar 2003 16:12:57 -0000 1.1.1.1
--- variableAdmin.php 15 Sep 2004 23:31:47 -0000 1.2
***************
*** 1,155 ****
<?php
! // $Id$
!
! require("config.php");
!
! # header title
! $pagetitle = pslgetText("Administration");
!
! #Defines The META TAG Page Type
! $xsiteobject = pslgetText("Administration");
!
! if (!is_object($sess)) {
! page_open($_PSL['page_features']);
! }
! /*****************************
! START OF PAGE
! *****************************/
!
! $auth->login_if(!$perm->have_perm('variableList'));
!
! /* DEBUG */
!
! // debug( "HTTP_POST_VARS" , $HTTP_POST_VARS);
! // debug( "HTTP_GET_VARS" , $HTTP_GET_VARS);
! // debug( "variable_name", $variable_name );
!
! /* DEBUG */
!
! $variable = pslNew("Variable");
!
! $content = '';
!
! if(!empty($HTTP_POST_VARS['submit'])) {
! $submit = clean($HTTP_POST_VARS['submit']);
! $variable_ary = clean($HTTP_POST_VARS['variable_ary']);
! $variable_name = clean($HTTP_POST_VARS['variable_name']);
! $variable_id = clean($HTTP_POST_VARS['variable_id']);
! $description = clean($HTTP_POST_VARS['description']);
! $variable_value = clean($HTTP_POST_VARS['variable_value']);
! $variable_group = clean($HTTP_POST_VARS['variable_group']);
! } elseif (!empty($HTTP_GET_VARS['submit'])) {
! $submit = clean($HTTP_GET_VARS['submit']);
! } else {
! $submit = '';
! }
!
! if ($perm->have_perm("variableList")) {
! switch ($submit) {
! case "delete":
! if($perm->have_perm("variableDelete")) {
! while ( list( $key, $val ) = each( $variable_ary ) ) {
! $success = $variable->deleteVariable($variable_ary[$key]);
! }
! }
! break;
! case "new":
! if($perm->have_perm("variableSave")) {
! $success = $variable->saveVariable(clean($HTTP_POST_VARS));
! }
! break;
! case "update":
! if($perm->have_perm("variableEdit")) {
! reset ($variable_id);
! while ( list( $key, $val ) = each( $variable_id ) ) {
! $ary["variable_id"] = $variable_id[$key];
! $ary["variable_name"] = $variable_name[$key];
! $ary["description"] = $description[$key];
! $ary["value"] = $variable_value[$key];
! $ary["variable_group"] = $variable_group[$key];
!
! if ($variable->saveVariable($ary)) {
! $content .= "<em>$variable_name[$key]</em> has been updated<BR>\n";
! } else {
! $content .= "<em>$variable_name[$key]</em> has <strong>not</strong> been updated<BR>\n";
! }
! }
! }
! break;
! default:
! break;
! }
! if($perm->have_perm("variableNew")) {
! $content .= $variable->newVariable();
! }
! if($perm->have_perm("variableList")) {
! $content .= $variable->listVariable();
! }
!
! } else {
! $content = getTitlebar("100%","Error! Invalid Privileges");
! $content .= "Sorry. You do not have the necessary privilege to view this page.";
}
- $ary = '';
-
- $block = pslNew("Block_i");
- $ary['section'] = "Admin";
-
- // $breadcrumb = breadcrumb($ary);
-
$_PSL['metatags']['object'] = $xsiteobject;
! slashhead($pagetitle,$_PSL['metatags']);
!
! $leftblocks = $block->getBlocks($ary, "left");
! $centerblocks = $block->getBlocks($ary, "center");
! $rightblocks = $block->getBlocks($ary, "right");
! if (empty($leftblocks)) {
! if (empty($rightblocks)) {
! // $centerblocks = $block->getBlocks($ary);
! $tplfile = "index1col.tpl";
! } else {
! $tplfile = 'index2colright.tpl';
! }
! } elseif (empty($rightblocks)) {
! $tplfile = 'index2colleft.tpl';
! } else {
! $tplfile = 'index3col.tpl';
! }
! $template = pslNew("slashTemplate",$_PSL['templatedir']);
! $template->debug = 0;
! $template->set_file(array(
! 'index' => $tplfile //"index3col.tpl"
! ));
! if( !empty($GLOBALS['QUERY_STRING'])) {
! $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING'];
! } else {
! $QUERY_STRING = '';
! }
!
! $template->set_var(array(
! 'QUERYSTRING' => $QUERY_STRING,
! 'ROOTDIR' => $_PSL['rooturl'],
! 'IMAGEDIR' => $_PSL['imageurl'],
! 'BREADCRUMB' => $breadcrumb,
! 'STORY_COLUMN' => $content,
! 'LEFT_BLOCK_COLUMN' => $leftblocks,
! 'CENTER_BLOCK_COLUMN' => $centerblocks,
! 'RIGHT_BLOCK_COLUMN' => $rightblocks
! ));
! $template->parse('OUT','index');
! $template->p('OUT');
- slashfoot();
page_close();
-
-
?>
--- 1,31 ----
<?php
+ // $Id$
! require('config.php');
! $pagetitle = pslgetText('Variable') .' '. pslgetText('Administration'); // The name to be displayed in the header
! $xsiteobject = pslgetText('Variable') .' '. pslgetText('Administration Page'); // This Defines The META Tag Object Type
! if(!empty($HTTP_GET_VARS['login'])) {
! $auth->login_if($HTTP_GET_VARS['login']);
}
$_PSL['metatags']['object'] = $xsiteobject;
! // Objects
! $ary['module'] = 'Variable';
! $ary['section'] = 'Admin';
! $ary['page'] = 'admin';
! // setup the block module
! $_PSL['module']['module.current'] = $_PSL['module']['Block'];
! $content = include($_PSL['moduledir'] ."/". $_PSL['module']['module.current'] ."/index.php");
! $block = pslNew("Block_i");
! //show Page
! echo $content;
page_close();
?>
|