示例#1
0
文件: role.php 项目: TonyWoo/cmlerp
                    sort($sourceStr);
                    $sourceStr = implode('#', $sourceStr);
                    if ($sourceStr != $currentStr) {
                        $this->dbObj->Execute('INSERT INTO ' . WEB_ADMIN_TABPOX . 'attachrule(userorgrouporrole,userorgrouporroleid,addordel,ruleid,otherruleid,configvalue,importer)' . "values(3,{$id},1,{$k},{$ink},'{$currentStr}'," . $this->getUid() . ')');
                    }
                }
            }
        }
        //所在组
        if (isset($_POST['groups'])) {
            foreach ($_POST['groups'] as $v) {
                $this->dbObj->Execute('INSERT INTO ' . WEB_ADMIN_TABPOX . "grouprole(groupid,roleid,importer)VALUES({$v},{$id}," . $this->getUid() . ')');
            }
        }
        if ($this->isModify) {
            $this->dbObj->Execute("update " . WEB_ADMIN_TABPOX . "login set updatestate = 1 where userid in(\r\n\t\t\t\tselect ug.userid from " . WEB_ADMIN_TABPOX . "usergroup ug \r\n\t\t\t\tinner join " . WEB_ADMIN_TABPOX . "grouprole gr on ug.groupid = gr.groupid where gr.roleid = {$id})");
        }
        $this->quit($info . '完成!');
    }
    function goModify()
    {
        $this->goAppend();
    }
    function quit($info)
    {
        exit("<script>alert('{$info}');location.href='role.php';</script>");
    }
}
$main = new PageRole();
$main->Main();