importldap.html.php 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <style>
  3. .main-table tbody>tr {background-color: #fff !important;}
  4. #ldap-search .btn-save-form{display:none;}
  5. #linkBox {line-height: unset; overflow: visible;}
  6. .c-visions {width: 130px;}
  7. </style>
  8. <?php if(!empty($ldapError)):?>
  9. <div class="alert alert-warning"><?php echo $ldapError;?></div>
  10. <?php endif;?>
  11. <div id='mainContent'>
  12. <div class='main-header'>
  13. <h2><?php echo $lang->user->importLDAP?></h2>
  14. <?php echo html::a($this->createLink('user', 'importLDAP'), "<span class='text'>{$lang->user->allLDAP}</span>", '', "class='btn btn-link" . ($type == 'all' ? ' btn-active-text' : '') . "'");?>
  15. <a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->user->search;?></a>
  16. </div>
  17. <div id='queryBox' class='cell <?php if($type =='bysearch') echo 'show';?>' data-module='ldap'></div>
  18. <form class='main-table' id='ldapForm' target='hiddenwin' method='post' data-ride='table'>
  19. <table id='ldapList' class='table table-fixed active-disabled table-datatable table-form'>
  20. <thead>
  21. <tr class='text-center'>
  22. <th class='w-130px text-left'>
  23. <div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
  24. <label></label>
  25. </div>
  26. <?php echo $lang->user->id?>
  27. </th>
  28. <th class='w-200px text-left'><?php echo $lang->user->account?></th>
  29. <th class='w-100px text-left'><?php echo $lang->user->realname?></th>
  30. <th class='c-visions required'><?php echo $lang->user->visions;?></th>
  31. <th><?php echo $lang->user->link?></th>
  32. <th><?php echo $lang->user->dept?></th>
  33. <th class='required'><?php echo $lang->user->role?></th>
  34. <th><?php echo $lang->user->group?></th>
  35. <th class='w-90px'><?php echo $lang->user->gender?></th>
  36. <th class='w-150px'><?php echo $lang->user->qq?></th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. <?php $inputVars = 0;?>
  41. <?php $visionList = $this->user->getVisionList() + array('ditto' => $lang->user->ditto);?>
  42. <?php foreach($users as $i => $user):?>
  43. <tr>
  44. <td class='c-id'>
  45. <div class='checkbox-primary'>
  46. <input type='checkbox' name='add[<?php echo $i?>]' value='<?php echo $i?>'>
  47. <label></label>
  48. </div>
  49. <?php printf("%03d", $i + 1)?>
  50. </td>
  51. <td><?php echo $user['account'] . html::hidden("account[$i]", $user['account'])?></td>
  52. <td><?php echo $user['realname'];?></td>
  53. <td class='text-left' style='overflow:visible'>
  54. <?php echo html::select("visions[$i][]", $visionList, $i > 0 ? 'ditto' : (isset($visionList[$this->config->vision]) ? $this->config->vision : key($visionList)), "class='form-control chosen' multiple");?>
  55. </td>
  56. <td id='linkBox'><?php echo html::select("link[$i]", $localUsers, '', 'class="form-control picker-select"');?></td>
  57. <td class='text-left' style='overflow:visible'><?php echo html::select("dept[$i]", $depts, $i == 0 ? '' : 'ditto', 'class="form-control chosen"')?></td>
  58. <td><?php echo html::select("role[$i]", $roles, $i == 0 ? '' : 'ditto', 'class="form-control"')?></td>
  59. <td><?php echo html::select("group[$i]", $groups, $i == 0 ? $defaultGroup : 'ditto', 'class="form-control"')?></td>
  60. <td><?php echo html::select("gender[$i]", $genders, $i == 0 ? '' : 'ditto', 'class="form-control"')?></td>
  61. <td><?php echo html::input("qq[$i]", '', 'class="form-control"')?></td>
  62. </tr>
  63. <?php $inputVars += 6;?>
  64. <?php endforeach;?>
  65. </tbody>
  66. </table>
  67. <?php if($users):?>
  68. <div class='table-footer'>
  69. <div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
  70. <div class='table-actions btn-toolbar'><?php echo html::submitButton($lang->save, '', 'btn btn-primary');?></div>
  71. <div class='text'><?php echo html::a($this->session->ldapBackLink ? $this->session->ldapBackLink : $this->createLink('company', 'browse'), $lang->goback, '', "class='btn'") . '&nbsp;&nbsp;' . $lang->user->notice->checkbox?></div>
  72. <?php $pager->show('right', 'pagerjs');?>
  73. </div>
  74. <?php endif;?>
  75. </form>
  76. </div>
  77. <script>
  78. <?php if(common::judgeSuhosinSetting($inputVars)):?>
  79. $(function()
  80. {
  81. $('.table-footer').before("<div class='alert alert-info'><?php echo extension_loaded('suhosin') ? trim(sprintf($lang->suhosinInfo, $inputVars)) : trim(sprintf($lang->maxVarsInfo, $inputVars));?></div>")
  82. })
  83. <?php endif;?>
  84. </script>
  85. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>