b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: admin ] [ index: admin ] [ all elements ]

Source for file _users_groupform.php

Documentation is available at _users_groupform.php

  1. <?php
  2. /**
  3.  * Displays group properties form
  4.  *
  5.  * Called by {@link b2users.php}
  6.  *
  7.  * b2evolution - {@link http://b2evolution.net/}
  8.  * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  9.  * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  10.  *
  11.  * @package admin
  12.  */
  13. if!defined('DB_USER') ) die'Please, do not access this page directly.' );
  14. ?>
  15. <div class="panelblock">
  16.     <div style="float:right;">
  17.     <?php
  18.         if$group )
  19.         {    // Links to next/previous group
  20.  
  21.             $prevgroupid 0;
  22.             $nextgroupid 0;
  23.  
  24.             $query "SELECT MAX(grp_ID), MIN(grp_ID) FROM $tablegroups";
  25.             $gminmax $DB->get_row$queryARRAY_A );
  26.  
  27.             foreach$GroupCache->cache as $fgroup )
  28.             // find prev/next id
  29.                 #pre_dump( $fgroup->ID );
  30.                 if$fgroup->ID $group )
  31.                 {
  32.                     if$fgroup->ID $prevgroupid )
  33.                     {
  34.                         $prevgroupid $fgroup->ID;
  35.                         $prevgroupname $fgroup->name;
  36.                     }
  37.                 }
  38.                 elseif$fgroup->ID $group )
  39.                 {
  40.                     if$fgroup->ID $nextgroupid || $nextgroupid == )
  41.                     {
  42.                         $nextgroupid $fgroup->ID;
  43.                         $nextgroupname $fgroup->name;
  44.                     }
  45.                 }
  46.             }
  47.  
  48.             echo $group != $gminmax['MIN(grp_ID)''<a title="'.T_('first group').'" href="b2users.php?group='.$gminmax['MIN(grp_ID)'].'">[&lt;&lt;]</a>' '[&lt;&lt;]';
  49.             echo $prevgroupid '<a title="'.T_('previous group').' ('.$prevgroupname.')" href="b2users.php?group='.$prevgroupid.'">[&lt;]</a>' '[&lt;]';
  50.             echo $nextgroupid '<a title="'.T_('next group').' ('.$nextgroupname.')" href="b2users.php?group='.$nextgroupid.'">[&gt;]</a>' '[&gt;]';
  51.             echo $group != $gminmax['MAX(grp_ID)''<a title="'.T_('last group').'" href="b2users.php?group='.$gminmax['MAX(grp_ID)'].'">[&gt;&gt;]</a>' '[&gt;&gt;]';
  52.         }
  53.         ?>
  54.  
  55.     <a title="<?php echo T_('Close group profile')?>" href="b2users.php"><img src="img/close.gif" alt="X" width="14" height="14" title="<?php echo T_('Close group profile')?>" class="middle" /></a></div>
  56.     <h2><?php
  57.     if$edited_Group->get('ID'== )
  58.     {
  59.         echo T_('Creating new group');
  60.     }
  61.     else
  62.     {
  63.         echo ($current_User->check_perm'users''edit' )) T_('Editing group:'T_('Viewing group:');
  64.         echo ' '.isset($edited_grp_oldname$edited_grp_oldname $edited_Group->get('name') ).' ('.T_('ID').' '.$edited_Group->get('ID').')';
  65.     }
  66.     ?></h2>
  67.  
  68.     <form class="fform" method="post" action="b2users.php">
  69.         <input type="hidden" name="action" value="groupupdate" />
  70.         <input type="hidden" name="edited_grp_ID" value="<?php $edited_Group->disp('ID','formvalue'?>" />
  71.  
  72.         <fieldset>
  73.             <legend><?php echo T_('General'?></legend>
  74.             <input type="hidden" name="edited_grp_oldname" value="<?php echo isset($edited_grp_oldname$edited_grp_oldname $edited_Group->get('name') ) ?>" />
  75.             <?php
  76.                 form_text'edited_grp_name'$edited_Group->get('name')50T_('Name')''50'large' );
  77.             ?>
  78.         </fieldset>
  79.  
  80.         <fieldset>
  81.             <legend><?php echo T_('Permissons for members of this group'?></legend>
  82.             <?php
  83.                 form_radio'edited_grp_perm_blogs'$edited_Group->get('perm_blogs'),
  84.                         array(  array'user'T_('User permissions') ),
  85.                                         array'viewall'T_('View all') ),
  86.                                         array'editall'T_('Full Access') )
  87.                                     )T_('Blogs') );
  88.                 form_radio'edited_grp_perm_stats'$edited_Group->get('perm_stats'),
  89.                         array(  array'none'T_('No Access') ),
  90.                                         array'view'T_('View only') ),
  91.                                         array'edit'T_('Full Access') )
  92.                                     )T_('Statistics') );
  93.                 form_radio'edited_grp_perm_spamblacklist'$edited_Group->get('perm_spamblacklist'),
  94.                         array(  array'none'T_('No Access') ),
  95.                                         array'view'T_('View only') ),
  96.                                         array'edit'T_('Full Access') )
  97.                                     )T_('Antispam') );
  98.                 form_radio'edited_grp_perm_options'$edited_Group->get('perm_options'),
  99.                         array(  array'none'T_('No Access') ),
  100.                                         array'view'T_('View only') ),
  101.                                         array'edit'T_('Full Access') )
  102.                                     )T_('Global options') );
  103.                 form_checkbox'edited_grp_perm_templates'$edited_Group->get('perm_templates')T_('Templates')T_('Check to allow template editing.') );
  104.  
  105.                 if$edited_Group->get('ID'!= )
  106.                 {    // Groups others than #1 can be prevented from editing users
  107.                     form_radio'edited_grp_perm_users'$edited_Group->get('perm_users'),
  108.                             array(  array'none'T_('No Access') ),
  109.                                             array'view'T_('View only') ),
  110.                                             array'edit'T_('Full Access') )
  111.                                         )T_('User/Group Management') );
  112.                 }
  113.                 else
  114.                 {
  115.                     form_infoT_('User/Group Management')T_('Full Access') );
  116.                 }
  117.             ?>
  118.         </fieldset>
  119.  
  120.         <?php
  121.         if$current_User->check_perm'users''edit' ) )
  122.         {
  123.             form_submit();
  124.         ?>
  125.  
  126.         <div class="clear"></div>
  127.     </form>
  128.  
  129. </div>

Documentation generated on Tue, 20 May 2008 01:55:56 +0200 by phpDocumentor 1.4.2