<?php
include_once("clsUmUser.php");
class 
umuserr extends umuser {
    
function 
GetRecord(){
    
$ret parent::GetRecord();
    
$this->StID $this->result['StID'];
    
$this->StNameT $this->result['StNameT'];
    
$this->GpID $this->result['GpID'];
    
$this->GpNameT $this->result['GpNameT'];
    return 
$ret;
}

function 
RSUserByLogin_Name($srch){
    
$sql="select * 
            from umuser 
            where UsLogin like  '%$srch%' or UsName Like '%$srch%' 
            order by UsLogin "
;
    if (
$this->SetQuery($sql)) { 
        return 
1;
    }else {
        return 
0;
    }
}

function 
RSWorkOnSystemName($UsID){
    
$sql "select distinct StID, StNameT 
            from umuser inner join umusergroup on UsID=UgUsID
                            inner join umgroup on UgGpID=GpID 
                            inner join umsystem on GpStID=StID 
            where UsID=$UsID 
            order by StNameT "
;
    if (
$this->SetQuery($sql)) { 
        return 
1;
    }else {
        return 
0;
    }
}

function 
RSGroupName($UsID$StID){
    
$sql "select GpID, GpNameT 
            from umuser inner join umusergroup on UsID=UgUsID
                            inner join umgroup on UgGpID=GpID 
                            inner join umsystem on GpStID=StID 
            where UsID=$UsID and GpStID=$StID 
            order by GpNameT "
;
    if (
$this->SetQuery($sql)) { 
        return 
1;
    }else {
        return 
0;
    }
}
    
}
?>