Zikula_System_Modules
[ class tree: Zikula_System_Modules ] [ index: Zikula_System_Modules ] [ all elements ]

Source for file pnuser.php

Documentation is available at pnuser.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  * @copyright (c) 2001, Zikula Development Team
  5.  * @link http://www.zikula.org
  6.  * @version $Id: pnuser.php 24342 2008-06-06 12:03:14Z markwest $
  7.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  8.  * @package Zikula_System_Modules
  9.  * @subpackage Blocks
  10.  */
  11.  
  12. /**
  13.  * The main blocks user function
  14.  * @author Mark West
  15.  * @return HTML String
  16.  */
  17. function blocks_user_main()
  18. {
  19. }
  20.  
  21.  
  22. /**
  23.  * Change the status of a block
  24.  * Invert the status of a given block id (collapsed/uncollapsed)
  25.  *
  26.  * @author Michael (acm3)
  27.  * @author lophas
  28.  * @return void 
  29.  */
  30. {
  31.     /* Throwing an error under come conditions - commented out temporarily.
  32.     if (!SecurityUtil::confirmAuthKey()) {
  33.         include 'header.php';
  34.         echo _BADAUTHKEY;
  35.         include 'footer.php';
  36.         pnShutDown();
  37.     }
  38.     */
  39.     $bid FormUtil::getPassedValue('bid');
  40.     $uid pnUserGetVar('uid');
  41.  
  42.     $pntable pnDBGetTables();
  43.     $column  $pntable['userblocks_column'];
  44.  
  45.     $where  "WHERE $column[bid]='".DataUtil::formatForStore($bid)."' AND $column[uid]='".DataUtil::formatForStore($uid)."'";
  46.     $active DBUtil::selectField ('userblocks''active'$where);
  47.  
  48.     $obj array();
  49.     $obj['active'($active 1);
  50.     $where "WHERE $column[uid]='".DataUtil::formatForStore($uid)."' AND $column[bid]='".DataUtil::formatForStore($bid)."'";
  51.     $res DBUtil::updateObject ($obj'userblocks'$where);
  52.  
  53.     if (!$res{
  54.         return LogUtil::registerError('Sql error');
  55.     }
  56.  
  57.     // now lets get back to where we came from
  58.     return pnRedirect(pnServerGetVar('HTTP_REFERER'));
  59. }

Documentation generated on Fri, 18 Jul 2008 21:55:17 +0200 by phpDocumentor 1.4.1