phpBMS

Show
Ignore:
Timestamp:
05/05/09 12:26:06 (3 years ago)
Author:
nate
Message:
  • removed widget's default import
  • For new tabledefs, the import command is disabled by default
  • Products should now use the general import page.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/base/include/roles.php

    r485 r515  
    3939if(class_exists("phpbmsTable")){ 
    4040        class roles extends phpbmsTable{ 
    41                  
    42                 function updateRecord($variables, $modifiedby = NULL){   
     41 
     42                function updateRecord($variables, $modifiedby = NULL){ 
    4343                        parent::updateRecord($variables, $modifiedby); 
    4444 
     
    4646                                $this->assignUsers($variables["id"],$variables["newusers"]); 
    4747                } 
    48          
    49          
    50                 function insertRecord($variables, $createdby = NULL){    
    51                         $theid = parent::insertRecord($variables, $createdby); 
    52                          
     48 
     49 
     50                function insertRecord($variables, $createdby = NULL, $overrideID = false, $replace = false){ 
     51                        $theid = parent::insertRecord($variables, $createdby, $overrideID, $replace); 
     52 
    5353                        if(isset($variables["userschanged"])) 
    5454                                if($variables["userschanged"]==1) 
    5555                                        $this->assignUsers($theid,$variables["newusers"]); 
    56                                  
     56 
    5757                        return $theid; 
    5858                } 
    59          
    60          
     59 
     60 
    6161                function assignUsers($id,$users){ 
    6262                        $querystatement="DELETE FROM rolestousers WHERE roleid=".$id; 
    6363                        $queryresult=$this->db->query($querystatement); 
    64          
     64 
    6565                        $newusers=explode(",",$users); 
    66          
     66 
    6767                        foreach($newusers as $theuser) 
    6868                                if($theuser!=""){ 
     
    7171                                } 
    7272                } 
    73          
    74          
     73 
     74 
    7575                function displayUsers($id,$type){ 
    7676                        $querystatement="SELECT users.id,concat(users.firstname,' ',users.lastname) as name 
    77                                                         FROM users INNER JOIN rolestousers ON rolestousers.userid=users.id  
     77                                                        FROM users INNER JOIN rolestousers ON rolestousers.userid=users.id 
    7878                                                        WHERE rolestousers.roleid=".((int) $id); 
    7979                        $assignedquery=$this->db->query($querystatement); 
    80          
     80 
    8181                        $thelist=array(); 
    82                          
     82 
    8383                        if($type=="available"){ 
    8484                                $excludelist=array(); 
    8585                                while($therecord=$this->db->fetchArray($assignedquery)) 
    8686                                        $excludelist[]=$therecord["id"]; 
    87                                          
     87 
    8888                                $querystatement="SELECT id,concat(users.firstname,' ',users.lastname) as name FROM users WHERE revoked=0 AND portalaccess=0"; 
    8989                                $availablequery=$this->db->query($querystatement); 
    90          
     90 
    9191                                while($therecord=$this->db->fetchArray($availablequery)) 
    9292                                        if(!in_array($therecord["id"],$excludelist)) 
    93                                                 $thelist[]=$therecord;           
    94                         } else  
     93                                                $thelist[]=$therecord; 
     94                        } else 
    9595                                while($therecord=$this->db->fetchArray($assignedquery)) 
    9696                                        $thelist[]=$therecord; 
    97                                          
     97 
    9898                        foreach($thelist as $theoption){ 
    9999                                ?>      <option value="<?php echo $theoption["id"]?>"><?php echo htmlQuotes($theoption["name"])?></option> 
    100                 <?php  
     100                <?php 
    101101                        } 
    102102                }//end function 
    103          
     103 
    104104        }//end class 
    105105}//end if 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.