Exemple #1
0
 public function set_password()
 {
     $id = $this->acter_id;
     $O_Role = new O_Role();
     if ($id) {
         $O_Sys = O_Sys::readone(O_Sys::SYS_ROLES);
         if (isset($O_Sys->list[$id])) {
             $O_Role = $O_Sys->list[$id];
         } else {
             $this->on_ajax();
         }
         $password = Lib_Req::post('password');
         if ($password) {
             $O_Role->passwd = $password;
             $O_Sys->list[$O_Role->id] = $O_Role;
             $O_Sys->set('list');
             $O_Sys->flush();
             $this->ajax->add_eval_js('cls("add_role");');
             $this->on_msg('成功');
         }
     }
     $this->view->O_Role = $O_Role;
     $this->ajax->popup('role/password');
     $this->on_ajax();
 }
Exemple #2
0
 public function set_department()
 {
     $name = trim(Lib_Req::post('name'));
     if ('' == $name) {
         $this->on_ajax();
     }
     $O_Sys = O_Sys::readone(O_Sys::SYS_DEPARTMENT);
     if (Lib_Req::post('delete')) {
         if ('admin' == $name) {
             $this->on_ajax();
         }
         if (!isset($O_Sys->list[$name])) {
             $this->on_ajax();
         }
         unset($O_Sys->list[$name]);
         $O_Ticket = new O_Ticket();
         $db = $O_Ticket->get_db();
         $sql = 'update ' . $O_Ticket->get_table() . ' set department="admin" where department="' . $name . '"';
         $db->query($sql);
     } else {
         $O_Sys->list[$name] = $name;
     }
     $O_Sys->set('list');
     $O_Sys->flush();
     $this->get_department_list();
 }
Exemple #3
0
 public function install()
 {
     $this->init_db_structure();
     $SYS_ROLES = O_Sys::readone(O_Sys::SYS_ROLES);
     $O_Role = new O_Role();
     $O_Role->id = 'admin';
     $O_Role->passwd = '123456';
     $O_Role->manager = 1;
     if (isset($SYS_ROLES->list[$O_Role->id])) {
         $this->_install_ok();
     }
     $SYS_ROLES->list[$O_Role->id] = $O_Role;
     $SYS_ROLES->set('list');
     $SYS_ROLES->flush();
     $SYS_DEPARTMENT = O_Sys::readone(O_Sys::SYS_DEPARTMENT);
     $SYS_DEPARTMENT->list['admin'] = 'admin';
     $SYS_DEPARTMENT->set('list');
     $SYS_DEPARTMENT->flush();
     $this->_install_ok();
 }
Exemple #4
0
echo $this->ticket->id;
?>
" />
<input type="hidden" id="save_and_next" value="0" />
<p>标题:
<select forme="val" name="caty" class="selectstyle">
<?php 
$caty_list = Config_App::get_caty_list();
echo Lib_Global::format_select_options($caty_list, $this->ticket->caty);
?>
</select>

&nbsp;&nbsp;
<select forme="val" name="department" class="selectstyle">
<?php 
$SYS_DEPARTMENT = O_Sys::readone(O_Sys::SYS_DEPARTMENT);
echo Lib_Global::format_select_options($SYS_DEPARTMENT->list, $this->ticket->department);
?>
</select>

&nbsp;&nbsp;
<input forme="val" name="title" type="text" tabindex="1" class="inputstyle" style="width:450px;" value="<?php 
echo $this->ticket->title;
?>
" />
</p>
<p>
报告人:
<?php 
echo $this->ticket->reporter_id;
?>
Exemple #5
0
<div class="body">

    <div>
<span class="a" onclick="ajax('ctl=Manage&act=show_edit_role');"><span class="icon icon-add"></span>添加成员
    <div class="lineright"></div>
    </div>

<table class="list_content" id="protocol_list">
<tr>
    <th style="width:150px;">操作</th>
    <th style="width:150px;">名字</th>
    <th style="width:150px;">SVN账号</th>
    <th style="width:150px;">管理权</th>
</tr>
<?php 
$O_Sys = O_Sys::readone(O_Sys::SYS_ROLES);
$alt = false;
foreach ($O_Sys->list as $O_Role) {
    if ($O_Role->is_super_admin()) {
        continue;
    }
    ?>
<tr class="row<?php 
    $alt = Lib_Global::get_row_alt($alt);
    ?>
">
    <td>
<span onclick="ajax('ctl=Manage&act=show_edit_role&id=<?php 
    echo $O_Role->id;
    ?>
');" class="a icon icon-edit">编辑</span>
Exemple #6
0
 public function get_acter_list()
 {
     $O_Sys = O_Sys::readone(O_Sys::SYS_ROLES);
     return $O_Sys->list;
 }