Xaraya / Postnuke CVS Notices - Message

Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites

View Statistics - Next Notice - Previous Notice

Directory filter : [ all ] / postnuke_modules / New_pnadmin / html / modules / admin [ view in CVS ]

Date Directory [filter] File(s) [view] Author [filter]
09 Aug 2002 23:25:49postnuke_modules/New_pnadmin/html/modules/adminadmin.php,1.1.1.1,1.2Richard Cave
 ADODB conversion

Update of /home/cvsroot/postnuke_modules/New_pnadmin/html/modules/admin
In directory ns7.hostnuke.net:/tmp/cvs-serv26274/New_pnadmin/html/modules/admin

Modified Files:
	admin.php 
Log Message:
ADODB conversion


Index: admin.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/New_pnadmin/html/modules/admin/admin.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** admin.php	3 Aug 2002 10:01:13 -0000	1.1.1.1
--- admin.php	9 Aug 2002 23:25:47 -0000	1.2
***************
*** 1,3 ****
! <?
  // File: $Id$ $Name$
  // ----------------------------------------------------------------------
--- 1,3 ----
! <?php
  // File: $Id$ $Name$
  // ----------------------------------------------------------------------
***************
*** 29,33 ****
  
  if (!eregi("admin.php", $PHP_SELF)) {
! 	die ("Access Denied");
  }
  $index = 0;
--- 29,33 ----
  
  if (!eregi("admin.php", $PHP_SELF)) {
!     die ("Access Denied");
  }
  $index = 0;
***************
*** 45,263 ****
  function adminlite_show($gID,$show_in_a_row) {
  $ModName = basename(dirname(__FILE__));
! 	// -------------------------------------------------------------
! 	// Do some database stuff...
! 	list($dbconn)	= pnDBGetConn();
! 	$pntable		= admin_pntables();
!     $table			= $pntable['member_table'];
!     $column			= &$pntable['members'];
! 	$modTable = pnConfigGetVar('prefix')."_modules";
! 	// -------------------------------------------------------------
! 	// Number of modules shown in a row
! 	// $show_in_a_row		= 4;	// Number of files to show in a row
! 	// -------------------------------------------------------------
! 	// Calculate some stuff like rowspan...
! 	$colspan			= $show_in_a_row * 2;
! 	$show_in_a_row 		= $show_in_a_row - 1;
! 	$shown				= 0;
! 	// -------------------------------------------------------------
! 	// Get the name of this module
! 	$gName = getAdminLiteName($gID);
! 	// -------------------------------------------------------------
! 	// Start with the printout of all the modules in this group
! 	echo "
! 	
! 	<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
! 
! 	<tr>
! 	<td colspan=\"".$colspan."\" align=\"center\" nowrap height=\"15\"><img src=\"modules/$ModName/pnimages/spacer.gif\" alt=\"An Empty Spacer\" width=\"1\" height=\"10\"></td>
! 	</tr>";
  
! 	// -------------------------------------------------------------
! 	//
! 	// Select all modules in this group and display them.
! 	// Also check and see if there is an admin-image and if it is
! 	// using admin.php och index.php.
  
! 	$query			= "SELECT ".$column['mid']." FROM ".$table." INNER JOIN ".$modTable." AS mod ON ".$column['mid']." = mod.pn_id WHERE ".$column['gid']."='".$gID."' ORDER BY mod.pn_displayname";
  
  
! 	$result = mysql_query($query);
! 	$num = mysql_numrows($result);
! 	if($num > 0){
! 		for ($i = 0 ;$i < $num; $i++){
! 			$mID	= mysql_result($result, $i, $column['mid']);
! 			// -------------------------------------------------------------
! 			// Get information about the module
! 			// 
! 			list($admin,$image,$name,$status)	= getModInfo($mID);
! 			if (pnSecAuthAction(0, "admin::", ":".$name.":", ACCESS_EDIT)){
! 				// -------------------------------------------------------------
! 				//
! 				// Check and see if there is an image that we can use, else just
! 				// display the name.
! 				// 
! 				if($status == 3 || $status == 5){
! 					if(checkShowModule($name)){
! 						if($image){
! 							if(substr($image,-4,4) != ".png"){
! 								if(file_exists($image) && substr($image,-4,4) == ".png" || substr($image,-4,4) ==".jpg" ||  substr($image,-4,4) ==".gif"){
! 									$imInfo			= getimagesize($image);
! 									$imHight		= $imInfo[1];
! 									$imWidth		= $imInfo[0];
! 									$image = "<img src=\"".$image."\" alt=\"".$name."\" width=\"".$imWidth."\" height=\"".$imHight."\" border=\"0\">";
! 								}
! 							}else{
! 								$image = "<img src=\"".$image."\" alt=\"".$name."\" border=\"0\">";
! 							}
! 						}else{
! 							if(file_exists("modules/".$ModName."/pnimages/default.gif")){
! 								$image = "<img src=\"modules/".$ModName."/pnimages/default.gif\" alt=\"".$name."\" border=\"0\">";
! 							}else{
! 								$image = _ADMIN_LITE_NO_IMAGE_FOUND_;
! 							}
! 						}
! 				
! 						// Now we start and check how many outputs in a row we have
! 						// If none, then start with a new row.
! 						if($shown == 0){
! 							echo "<tr>\n";
! 						}
! 			
! 						// Print the module
! 						echo "<td align=\"center\" nowrap valign=\"bottom\" height=\"45\" width=\"10\"><img src=\"modules/$ModName/pnimages/spacer.gif\" alt=\"Spacer\" width=\"10\" height=\"1\"></td>\n";
! 						echo "<td align=\"center\" nowrap valign=\"bottom\" height=\"45\" width=\"110\"><a href=\"".$admin."\">".$image."<br>$name</a></td>\n";
! 			
! 						// If we have reached the maximum number of modules in a row then make a new row and a spacer
! 						// else just add a new number to the count.
! 						if($shown == $show_in_a_row){
! 							$shown = 0;
! 							echo "</tr><tr><td colspan=\"".$colspan."\" align=\"center\" valign=\"middle\" nowrap><img src=\"modules/$ModName/pnimages/spacer.gif\" alt=\"An Empty Spacer\" width=\"10\" height=\"25\"></td></tr>\n";
! 						}else{
! 							$shown = $shown + 1;
! 						}
! 					}
! 				}
! 			}
! 		}
! 		// When the loop of all modules in group is done we have some cleaning up to do
! 		// some rows ma be incomplete and then we have to finish them and in the end type a stop row tag.
! 		// 
! 		if($shown != 0){
! 			for($i = $shown; $i < ($show_in_a_row+1);$i++){
! 				echo "<td align=\"center\" nowrap></td>\n";
! 				echo "<td align=\"center\" nowrap></td>\n";
! 			}
! 			echo "</tr>\n";
! 		}
! 	}else{
! 	
! 	echo "<tr><td colspan=\"".$colspan."\" align=\"left\">";
! 	echo '<b>'._ADMIN_LITE_EMPTY_TAB_.'</b>
! 	<p>'._ADMIN_LITE_HOW_TO_ADD_MODULES_TO_TAB_.'</p>';
! 	echo "</td></tr>";
! 	
! 	}
! 	// Display a logout-link at the bottom.
! 	echo "</table>";
! 	
  }
  
  function adminlite_edit($gID){
! 	$ModName 		= basename(dirname(__FILE__));
! 	$allSkins 		= getAllSkins();
! 	$current_skin 	= pnModGetVar('AdminLite','use_skin');
! 	echo "
! 	<form action=\"admin.php?op=main&module=$ModName&admin_func=edit\" method=\"post\">
! 	<table>
! 	<tr>
! 	<td><select name=\"gID\" size=\"1\">";
! 	listAllGroups($gID);
! 	echo "</select></td>
! 	<td>&nbsp;&nbsp;&nbsp;</td>
! 	<td><input type=\"submit\" value=\""._ADMIN_LITE_EDIT_TAB_."\"></td>
! 	</form><form action=\"admin.php?op=main&module=$ModName&admin_func=edit_groups\" method=\"post\">
! 	<input type=\"hidden\" name=\"gID\" value=\"".$gID."\">
! 	<td><input type=\"submit\" value=\""._ADMIN_LITE_EDIT_ALL_TABS_."\"></td>
! 	</tr>
! 	<tr>
! 	<td><input type=\"text\" name=\"new_group\" size=\"30\" maxlength=\"200\"></td>
! 	<td>&nbsp;&nbsp;&nbsp;</td>
! 	<td colspan=\"2\"><input type=\"submit\" value=\""._ADMIN_LITE_ADD_NEW_TAB_."\"></td>
! 	</tr>
! 	</form>
! 	<form action=\"admin.php?op=main&module=$ModName&admin_func=edit\" method=\"post\">
! 	<input type=\"hidden\" name=\"gID\" value=\"".$gID."\">	
! 	<tr>
! 	<td><select name=\"new_skin\" size=\"1\">";
! 	for($i = 0;$i < count($allSkins);$i++){
! 		$skinInfo = $allSkins[$i];
! 		// ........................
! 		// Information available:
! 		// 
! 		// dir
! 		// name
! 		// version
! 		// description
! 		// author
! 		// contact
! 		// ........................
! 		echo "<option value=\"".$skinInfo['dir']."\"";
! 		if($skinInfo['dir'] == $current_skin){
! 		echo " selected";
! 		}
! 		echo ">".$skinInfo['name']."</option>\n";
! 	}
! 	echo "</select></td>
! 	<td>&nbsp;&nbsp;&nbsp;</td>
! 	<td colspan=\"2\"><input type=\"submit\" value=\""._ADMIN_LITE_CHANGE_SKIN_."\"></td>
! 	</tr>
! 	
! 	</table>
! 	</form>
! 	<br>";
! 	
! 	// ---------------------------------------------
! 	// If there is any changes in the modules table
! 	// let's display a page with an alert or make it
! 	// automatic.
! 	$returnValue = checkSync($gID);
! 	if($returnValue){
! 		// -------------------------------------------------------------------
! 		// Sync with all the new modules
! 		// 
! 		if($returnValue['regen']){
! 			regenerateModules($GLOBALS['regen']);
! 			$gID = $GLOBALS['regen'];
! 			echo "<p><b>"._ADMIN_LITE_INSTALLED_NEW_MODULES_."</b></p>";
! 		}
! 		// -------------------------------------------------------------------
! 		// Remove all old modules not in use
! 		// 
!  		if($returnValue['remove']){
! 			removeOldModules();
! 			echo "<p><b>"._ADMIN_LITE_REMOVED_OLD_MODULES_."</b></p>";
! 		}
! 		// -------------------------------------------------------------------
! 		// This function displays a new window with information about new modules
! 		// and modules that has been removed.
! 		// 
! 		// $page = "admin.php?DnMC=1&gID=".$gID."&op=main&module=$ModName&admin_func=0";
! 		// printNewStatusModules($page,'400','250');
! 		// 
! 		// -------------------------------------------------------------------
! 	}
! 	// 
! 	// ---------------------------------------------
! 	
! 	echo "<br>";
! 	if($gID > 0){
! 		displaySingleEditTable($gID);
! 	}
! 	if(countMembersInGroup($gID) > 0){
! 		displayModuleList($gID);
! 	}else{
! 		echo "<b>"._ADMIN_LITE_EMPTY_TAB_."</b>";
! 		echo "<p>"._ADMIN_LITE_HOW_TO_ADD_MODULES_TO_TAB_IN_ADMIN_."</p>";
! 	}
  }
  
--- 45,262 ----
  function adminlite_show($gID,$show_in_a_row) {
  $ModName = basename(dirname(__FILE__));
!     // -------------------------------------------------------------
!     // Do some database stuff...
!     list($dbconn)   = pnDBGetConn();
!     $pntable        = admin_pntables();
!     $table          = $pntable['member_table'];
!     $column         = &$pntable['members'];
!     $modTable = pnConfigGetVar('prefix')."_modules";
!     // -------------------------------------------------------------
!     // Number of modules shown in a row
!     // $show_in_a_row       = 4;    // Number of files to show in a row
!     // -------------------------------------------------------------
!     // Calculate some stuff like rowspan...
!     $colspan            = $show_in_a_row * 2;
!     $show_in_a_row      = $show_in_a_row - 1;
!     $shown              = 0;
!     // -------------------------------------------------------------
!     // Get the name of this module
!     $gName = getAdminLiteName($gID);
!     // -------------------------------------------------------------
!     // Start with the printout of all the modules in this group
!     echo "
!     
!     <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
  
!     <tr>
!     <td colspan=\"".$colspan."\" align=\"center\" nowrap height=\"15\"><img src=\"modules/$ModName/pnimages/spacer.gif\" alt=\"An Empty Spacer\" width=\"1\" height=\"10\"></td>
!     </tr>";
  
!     // -------------------------------------------------------------
!     //
!     // Select all modules in this group and display them.
!     // Also check and see if there is an admin-image and if it is
!     // using admin.php och index.php.
  
+     $query  = "SELECT ".$column['mid']." FROM ".$table." INNER JOIN ".$modTable." AS mod ON ".$column['mid']." = mod.pn_id WHERE ".$column['gid']."='".$gID."' ORDER BY mod.pn_displayname";
+     $result = $dbconn->Execute( $query );
+     if ( $result == false ) {
+         PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" );
+     }
+     if( !$result->EOF ) {
+         for (; !$result->EOF; $result->MoveNext() ) {
+             $mID                   = $result->fields[0];
+             // -------------------------------------------------------------
+             // Get information about the module
+             // 
+             list($admin,$image,$name,$status)   = getModInfo($mID);
+             if (pnSecAuthAction(0, "admin::", ":".$name.":", ACCESS_EDIT)){
+                 // -------------------------------------------------------------
+                 //
+                 // Check and see if there is an image that we can use, else just
+                 // display the name.
+                 // 
+                 if($status == 3 || $status == 5){
+                     if(checkShowModule($name)){
+                         if($image){
+                             if(substr($image,-4,4) != ".png"){
+                                 if(file_exists($image) && substr($image,-4,4) == ".png" || substr($image,-4,4) ==".jpg" ||  substr($image,-4,4) ==".gif"){
+                                     $imInfo         = getimagesize($image);
+                                     $imHight        = $imInfo[1];
+                                     $imWidth        = $imInfo[0];
+                                     $image = "<img src=\"".$image."\" alt=\"".$name."\" width=\"".$imWidth."\" height=\"".$imHight."\" border=\"0\">";
+                                 }
+                             }else{
+                                 $image = "<img src=\"".$image."\" alt=\"".$name."\" border=\"0\">";
+                             }
+                         }else{
+                             if(file_exists("modules/".$ModName."/pnimages/default.gif")){
+                                 $image = "<img src=\"modules/".$ModName."/pnimages/default.gif\" alt=\"".$name."\" border=\"0\">";
+                             }else{
+                                 $image = _ADMIN_LITE_NO_IMAGE_FOUND_;
+                             }
+                         }
+                 
+                         // Now we start and check how many outputs in a row we have
+                         // If none, then start with a new row.
+                         if($shown == 0){
+                             echo "<tr>\n";
+                         }
+             
+                         // Print the module
+                         echo "<td align=\"center\" nowrap valign=\"bottom\" height=\"45\" width=\"10\"><img src=\"modules/$ModName/pnimages/spacer.gif\" alt=\"Spacer\" width=\"10\" height=\"1\"></td>\n";
+                         echo "<td align=\"center\" nowrap valign=\"bottom\" height=\"45\" width=\"110\"><a href=\"".$admin."\">".$image."<br>$name</a></td>\n";
+             
+                         // If we have reached the maximum number of modules in a row then make a new row and a spacer
+                         // else just add a new number to the count.
+                         if($shown == $show_in_a_row){
+                             $shown = 0;
+                             echo "</tr><tr><td colspan=\"".$colspan."\" align=\"center\" valign=\"middle\" nowrap><img src=\"modules/$ModName/pnimages/spacer.gif\" alt=\"An Empty Spacer\" width=\"10\" height=\"25\"></td></tr>\n";
+                         }else{
+                             $shown = $shown + 1;
+                         }
+                     }
+                 }
+             }
+         } // for (; !$result->EOF; $result->MoveNext() )
  
!         // When the loop of all modules in group is done we have some cleaning up to do
!         // some rows ma be incomplete and then we have to finish them and in the end type a stop row tag.
!         // 
!         if($shown != 0){
!             for($i = $shown; $i < ($show_in_a_row+1);$i++){
!                 echo "<td align=\"center\" nowrap></td>\n";
!                 echo "<td align=\"center\" nowrap></td>\n";
!             }
!             echo "</tr>\n";
!         }
!     }else{    
!         echo "<tr><td colspan=\"".$colspan."\" align=\"left\">";
!         echo '<b>'._ADMIN_LITE_EMPTY_TAB_.'</b>
!         <p>'._ADMIN_LITE_HOW_TO_ADD_MODULES_TO_TAB_.'</p>';
!         echo "</td></tr>";
!     }
!     // Display a logout-link at the bottom.
!     echo "</table>";
!     
  }
  
  function adminlite_edit($gID){
!     $ModName        = basename(dirname(__FILE__));
!     $allSkins       = getAllSkins();
!     $current_skin   = pnModGetVar('AdminLite','use_skin');
!     echo "
!     <form action=\"admin.php?op=main&module=$ModName&admin_func=edit\" method=\"post\">
!     <table>
!     <tr>
!     <td><select name=\"gID\" size=\"1\">";
!     listAllGroups($gID);
!     echo "</select></td>
!     <td>&nbsp;&nbsp;&nbsp;</td>
!     <td><input type=\"submit\" value=\""._ADMIN_LITE_EDIT_TAB_."\"></td>
!     </form><form action=\"admin.php?op=main&module=$ModName&admin_func=edit_groups\" method=\"post\">
!     <input type=\"hidden\" name=\"gID\" value=\"".$gID."\">
!     <td><input type=\"submit\" value=\""._ADMIN_LITE_EDIT_ALL_TABS_."\"></td>
!     </tr>
!     <tr>
!     <td><input type=\"text\" name=\"new_group\" size=\"30\" maxlength=\"200\"></td>
!     <td>&nbsp;&nbsp;&nbsp;</td>
!     <td colspan=\"2\"><input type=\"submit\" value=\""._ADMIN_LITE_ADD_NEW_TAB_."\"></td>
!     </tr>
!     </form>
!     <form action=\"admin.php?op=main&module=$ModName&admin_func=edit\" method=\"post\">
!     <input type=\"hidden\" name=\"gID\" value=\"".$gID."\"> 
!     <tr>
!     <td><select name=\"new_skin\" size=\"1\">";
!     for($i = 0;$i < count($allSkins);$i++){
!         $skinInfo = $allSkins[$i];
!         // ........................
!         // Information available:
!         // 
!         // dir
!         // name
!         // version
!         // description
!         // author
!         // contact
!         // ........................
!         echo "<option value=\"".$skinInfo['dir']."\"";
!         if($skinInfo['dir'] == $current_skin){
!         echo " selected";
!         }
!         echo ">".$skinInfo['name']."</option>\n";
!     }
!     echo "</select></td>
!     <td>&nbsp;&nbsp;&nbsp;</td>
!     <td colspan=\"2\"><input type=\"submit\" value=\""._ADMIN_LITE_CHANGE_SKIN_."\"></td>
!     </tr>
!     
!     </table>
!     </form>
!     <br>";
!     
!     // ---------------------------------------------
!     // If there is any changes in the modules table
!     // let's display a page with an alert or make it
!     // automatic.
!     $returnValue = checkSync($gID);
!     if($returnValue){
!         // -------------------------------------------------------------------
!         // Sync with all the new modules
!         // 
!         if($returnValue['regen']){
!             regenerateModules($GLOBALS['regen']);
!             $gID = $GLOBALS['regen'];
!             echo "<p><b>"._ADMIN_LITE_INSTALLED_NEW_MODULES_."</b></p>";
!         }
!         // -------------------------------------------------------------------
!         // Remove all old modules not in use
!         // 
!         if($returnValue['remove']){
!             removeOldModules();
!             echo "<p><b>"._ADMIN_LITE_REMOVED_OLD_MODULES_."</b></p>";
!         }
!         // -------------------------------------------------------------------
!         // This function displays a new window with information about new modules
!         // and modules that has been removed.
!         // 
!         // $page = "admin.php?DnMC=1&gID=".$gID."&op=main&module=$ModName&admin_func=0";
!         // printNewStatusModules($page,'400','250');
!         // 
!         // -------------------------------------------------------------------
!     }
!     // 
!     // ---------------------------------------------
!     
!     echo "<br>";
!     if($gID > 0){
!         displaySingleEditTable($gID);
!     }
!     if(countMembersInGroup($gID) > 0){
!         displayModuleList($gID);
!     }else{
!         echo "<b>"._ADMIN_LITE_EMPTY_TAB_."</b>";
!         echo "<p>"._ADMIN_LITE_HOW_TO_ADD_MODULES_TO_TAB_IN_ADMIN_."</p>";
!     }
  }
  
***************
*** 436,567 ****
  function admin_admin_main(){
  /************************************************************************/
! 	$ModName 		= basename(dirname(__FILE__));
! 	
! 	
! 	$useNewAdmin	= pnConfigGetVar('use_new_admin');
! 	if($GLOBALS['new_skin'] != ""){
! 		$newSkin = $GLOBALS['new_skin'];
! 		if(!pnModSetVar('AdminLite', 'use_skin', $newSkin)){
! 			echo "No skin was set!";
! 		}
! 	}
! 	
! 	$useThisSkin = pnModGetVar('AdminLite','use_skin');
! 	
! 	if($useThisSkin == ""){
! 		if(!pnModSetVar('AdminLite', 'use_skin', 'default')){
! 			echo "No skin was set!";
! 		}
! 	}
! 	
! 	
! 	if($useThisSkin == ""){
! 		$useThisSkin = 'default';
! 	}
! 	$use_skin = "modules/".$ModName."/skins/".$useThisSkin."/pnfunctions.php";
! 	
! 	
! 	$func 	= $GLOBALS['admin_func'];
! 	$gID	= $GLOBALS['gID'];
! 	include("modules/".$ModName."/pntables.php");
! 	// include("modules/".$ModName."/pnfunctions.php");
! 	include("modules/".$ModName."/pninit.php"); // Only to use the restore function
! 	if(file_exists($use_skin)){
! 		include($use_skin);
! 	}else{
! 		include("modules/".$ModName."/skins/default/pnfunctions.php");
! 	}
  
! 	Admin_Lite_initiation($gID);
  
! 	if(!$func){
! 		$func = getAdminLiteName(0,1);
! 	}
  
  
! 	// This will sync the modules table with the new admin
! 	// so the new modules will be displayed and any removed modules
! 	// will be removed.
! 	if($GLOBALS['DnMC'] == 1){
! 		include("modules/".$ModName."/moduleChanges.php");
! 		die;
! 	}elseif($GLOBALS['DnMC'] == 2){
! 		include("modules/".$ModName."/moduleChanges.php");
! 		die;
! 	}
  
! 	
! 	// Get the id so we know what tab to be selected when the
! 	// user access the admin without any selected tab or with a tabID
! 	// that is removed.
! 	if(allow_editable_tabs == 0){
! 		if($func == "edit"){
! 			$func = $gID;
! 		}
! 		$func = checkIfGroupNumberExists($func);
! 	}else{
! 		if($func != "edit"){
! 			if($func != "edit_groups"){
! 				$func = checkIfGroupNumberExists($func);
! 			}
! 		}
! 	}
! 	// ----------------------------------------------------------------
! 	// Check if there is anything we should do before anything else
! 	//
! 	// ----------------------------------------------------------------
! 	include("header.php");        // Output PN Default header
  
! 	// What do we want to use, the new or the old?
! 	if($useNewAdmin){
! 		// Ok, let's use the new one then...
! 		adminlite_header($func,$numberOfTabsToShow,$tabImages);      // Output our AdminLite Header
! 		// ----------------------------------------------------------------
! 		// If no group was selected then choose the default group.
! 		if(allow_editable_tabs == 1){
! 			if($func == "edit"){
! 				// Edit tab
! 				adminlite_edit($gID);
! 			}elseif($func == "edit_groups"){
! 				// Edit all tabs
! 				displayAllEditTable();
! 			}else{
! 				// Show the tab if the tabnumber exists.
! 				// else display the default.
! 				$func = checkIfGroupNumberExists($func);
! 				adminlite_show($func,$displayNumberOfModules);
! 			}
! 		}else{
! 			// If the function allow_editable_tabs is false, then we will not show any
! 			// function to edit the tab.
! 			if($func == "edit"){
! 				$func = $gID;
! 			}elseif($func == "edit_groups"){
! 				$func = $gID;
! 			}
! 			// Show the tab if the tabnumber exists.
! 			// else display the default.
! 			$func = checkIfGroupNumberExists($func);
! 			adminlite_show($func,$displayNumberOfModules);
! 		}
! 		// ----------------------------------------------------------------
! 		echo "<hr>";
! 	}else{
! 		// Ok, let's use the OLD one then...
! 		menu_draw();
! 	}
! 	
! 	// Do some old stuff
! 	if(($func != "edit") AND ($func != "edit_groups")){
! 		admin_main_automated();
! 		admin_main_article();
! 		admin_main_poll();
! 	}
! 	
! 	if($useNewAdmin){
! 		adminlite_footer($func,$tabImages,$ModName);       // Output the AdminLite Footer
! 	}
  
! 	include("footer.php");        // Output PN Default Footer
  /************************************************************************/
  }
--- 435,566 ----
  function admin_admin_main(){
  /************************************************************************/
!     $ModName        = basename(dirname(__FILE__));
!     
!     
!     $useNewAdmin    = pnConfigGetVar('use_new_admin');
!     if($GLOBALS['new_skin'] != ""){
!         $newSkin = $GLOBALS['new_skin'];
!         if(!pnModSetVar('AdminLite', 'use_skin', $newSkin)){
!             echo "No skin was set!";
!         }
!     }
!     
!     $useThisSkin = pnModGetVar('AdminLite','use_skin');
!     
!     if($useThisSkin == ""){
!         if(!pnModSetVar('AdminLite', 'use_skin', 'default')){
!             echo "No skin was set!";
!         }
!     }
!     
!     
!     if($useThisSkin == ""){
!         $useThisSkin = 'default';
!     }
!     $use_skin = "modules/".$ModName."/skins/".$useThisSkin."/pnfunctions.php";
!     
!     
!     $func   = $GLOBALS['admin_func'];
!     $gID    = $GLOBALS['gID'];
!     include("modules/".$ModName."/pntables.php");
!     //include("modules/".$ModName."/pnfunctions.php");
!     include("modules/".$ModName."/pninit.php"); // Only to use the restore function
!     if(file_exists($use_skin)){
!         include($use_skin);
!     }else{
!         include("modules/".$ModName."/skins/default/pnfunctions.php");
!     }
  
!     Admin_Lite_initiation($gID);
  
!     if(!$func){
!         $func = getAdminLiteName(0,1);
!     }
  
  
!     // This will sync the modules table with the new admin
!     // so the new modules will be displayed and any removed modules
!     // will be removed.
!     if($GLOBALS['DnMC'] == 1){
!         include("modules/".$ModName."/moduleChanges.php");
!         die;
!     }elseif($GLOBALS['DnMC'] == 2){
!         include("modules/".$ModName."/moduleChanges.php");
!         die;
!     }
  
!     
!     // Get the id so we know what tab to be selected when the
!     // user access the admin without any selected tab or with a tabID
!     // that is removed.
!     if(allow_editable_tabs == 0){
!         if($func == "edit"){
!             $func = $gID;
!         }
!         $func = checkIfGroupNumberExists($func);
!     }else{
!         if($func != "edit"){
!             if($func != "edit_groups"){
!                 $func = checkIfGroupNumberExists($func);
!             }
!         }
!     }
!     // ----------------------------------------------------------------
!     // Check if there is anything we should do before anything else
!     //
!     // ----------------------------------------------------------------
!     include("header.php");        // Output PN Default header
  
!     // What do we want to use, the new or the old?
!     if($useNewAdmin){
!         // Ok, let's use the new one then...
!         adminlite_header($func,$numberOfTabsToShow,$tabImages);      // Output our AdminLite Header
!         // ----------------------------------------------------------------
!         // If no group was selected then choose the default group.
!         if(allow_editable_tabs == 1){
!             if($func == "edit"){
!                 // Edit tab
!                 adminlite_edit($gID);
!             }elseif($func == "edit_groups"){
!                 // Edit all tabs
!                 displayAllEditTable();
!             }else{
!                 // Show the tab if the tabnumber exists.
!                 // else display the default.
!                 $func = checkIfGroupNumberExists($func);
!                 adminlite_show($func,$displayNumberOfModules);
!             }
!         }else{
!             // If the function allow_editable_tabs is false, then we will not show any
!             // function to edit the tab.
!             if($func == "edit"){
!                 $func = $gID;
!             }elseif($func == "edit_groups"){
!                 $func = $gID;
!             }
!             // Show the tab if the tabnumber exists.
!             // else display the default.
!             $func = checkIfGroupNumberExists($func);
!             adminlite_show($func,$displayNumberOfModules);
!         }
!         // ----------------------------------------------------------------
!         echo "<hr>";
!     }else{
!         // Ok, let's use the OLD one then...
!         menu_draw();
!     }
!     
!     // Do some old stuff
!     if(($func != "edit") AND ($func != "edit_groups")){
!         admin_main_automated();
!         admin_main_article();
!         admin_main_poll();
!     }
!     
!     if($useNewAdmin){
!         adminlite_footer($func,$tabImages,$ModName);       // Output the AdminLite Footer
!     }
  
!     include("footer.php");        // Output PN Default Footer
  /************************************************************************/
  }


Directory filter : [ all ] / postnuke_modules / New_pnadmin / html / modules / admin [ view in CVS ]

View Statistics - Next Notice - Previous Notice


Visit Developer Site - Browse CVS Repository Syndicate via backend.rss
(max. once per hour please)
Powered by CVSNotice 0.1.3