top.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <div id="smad-header-section" class="container-fluid">
  2. <div class="row">
  3. <div class="col-xs-12 col-sm-2 col-md-2 col-lg-1 brand-logo">
  4. <a href="./" title=""><img src="<?= $this->asset("assets/images/logo-bocian.png"); ?>" alt="Bocian" /></a>
  5. </div>
  6. <div class="col-xs-12 col-sm-10 col-md-10 col-lg-11">
  7. <div class="smad-top-first">
  8. <ul>
  9. <li><div class="smad-header-title">zalogowany jako:</div></li>
  10. <li><div class="smad-desc">
  11. <div class="btn-group">
  12. <button id="ProcesMenuLoginDropdownLink" type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><?php echo User::getFullName(); ?> <span class="caret"></span></button>
  13. <ul class="dropdown-menu pull-right smad-top-drop-down-menu" role="menu">
  14. <li><a href="/webcal" target="_blank"><i class="glyphicon glyphicon-calendar"></i> Kalendarz</a></li>
  15. <li>
  16. <a href="/webmail">
  17. <form action="https://<?= V::get('HTTP_HOST', '', $_SERVER); ?>/webmail/loginFromSE.php" method="post" target="_blank">
  18. <input type="hidden" name="_timezone" value="Europe/Berlin">
  19. <input type="hidden" name="_token" value="">
  20. <input type="hidden" name="_action" value="login">
  21. <input type="hidden" name="_task" value="login">
  22. <input type="hidden" name="_url" value="">
  23. <input type="hidden" name="_user" value="diradmin">
  24. <input type="hidden" name="_pass" value="CP6uSYikF/GWFeRPKFHYsA==">
  25. <input type="hidden" name="EMAIL_IMAP_IMPORT_USERNAME" value="">
  26. <input type="hidden" name="EMAIL_IMAP_IMPORT_HOST" value="">
  27. <input type="hidden" name="EMAIL_IMAP_IMPORT_PASSWD_HASH" value="">
  28. <input type="hidden" name="loginFromSE" value="1">
  29. <!-- <input type="submit" class="btn" value="P"> -->
  30. <button type="submit" class="btn btn-link" style="width:100%;padding:0;text-align:left;color:#333;"><i class="glyphicon glyphicon-envelope"></i> Poczta</button>
  31. </form>
  32. </a>
  33. </li>
  34. <li><a href="/changepassword" target="_blank"><i class="glyphicon glyphicon-lock"></i> Zmień hasło</a></li>
  35. <li><a href="/profilemanager" target="_blank"><i class="glyphicon glyphicon-user"></i> Apple Profile Manager</a></li>
  36. <li class="divider"></li>
  37. <li><a href="procesy5.php?task=USER" title="diradmin"><i class="glyphicon glyphicon-user"></i> Profil</a></li>
  38. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=UrlAction_Calendar"><i class="glyphicon glyphicon-calendar"></i> Grafik pracy</a></li>
  39. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=UserMsgs" title="Wiadomości systemowe"><i class="glyphicon glyphicon-envelope"></i> Wiadomości</a></li>
  40. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=Notify" title="Powiadomienia"><i class="glyphicon glyphicon-bell"></i> Powiadomienia</a></li>
  41. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=Users&amp;_task=reloadPerms" title="Przeładuj uprawnienia"><i class="glyphicon glyphicon-refresh"></i> Przeładuj uprawnienia</a></li>
  42. <!--
  43. <?php if(0) : ?>
  44. <li class="divider"></li>
  45. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=Status" title="Status systemu"><i class="glyphicon glyphicon-cog"></i> Status systemu</a></li>
  46. <li><p class="text-muted" style="padding:3px 20px;"><nobr>Pokaż testy pracownika:</nobr></p>
  47. <form action="<?php echo Request::getPathUri(); ?>index.php" method="POST">
  48. <input type="hidden" name="FUNCTION_INIT" value="MENU_SELECT_PROCES">
  49. <input type="hidden" name="_action" value="showMyTests">
  50. <div class="typepsecial"><select id="ts-_user_id" placeholder="Szukaj..." name="_user_id" tabindex="-1" class="selectized" style="display: none;"><option value="" selected="selected"></option></select><div class="selectize-control single"><div class="selectize-input items not-full"><input type="text" autocomplete="off" tabindex="" placeholder="Szukaj..." style="width: 67px; opacity: 1; position: relative; left: 0px;"></div><div class="selectize-dropdown single" style="display: none;"><div class="selectize-dropdown-content"></div></div></div></div><script>
  51. jQuery(document).ready(function(){
  52. var fldNode=jQuery('#_user_id'), tsNode=jQuery('#ts-_user_id');
  53. if (!fldNode && !tsNode) {
  54. return;
  55. }
  56. fldNode.attr('name', '');
  57. fldNode.hide();
  58. if (fldNode.parent().hasClass('show-last-value')) {
  59. fldNode.parent().hide();
  60. }
  61. tsNode.attr('name', '_user_id');
  62. tsNode.attr('tabindex', fldNode.attr('tabindex'));
  63. tsNode.selectize({
  64. theme: 'typespecial',
  65. valueField: 'id',
  66. labelField: 'id',
  67. searchField: 'name',
  68. sortField: 'name',
  69. create: false,
  70. delimiter: ';',
  71. dataAttr: 'typespecial',
  72. preload: false,
  73. options: null,
  74. render: {
  75. item: function(item, escape) {
  76. //console.log('item', item);
  77. //var name = formatName(item);
  78. return '<div>' +
  79. '<span class="name">' + escape(item.name || item.id) + '</span>' +
  80. '</div>';
  81. },
  82. option: function(item, escape) {
  83. //console.log('--- render.option item(',item,') this:',this);
  84. return '<div>' +
  85. '<span class="title">' +
  86. escape(item.name || item.id) +
  87. '</span>' +
  88. '</div>';
  89. }
  90. },
  91. onItemAdd: function(value, item) {// Invoked when an item is selected.
  92. var curSel = this.options[value] || null, fieldExport;
  93. //console.log('--- onItemAdd val(',value,'/',item.data('name'),'/',item,') this:curSel:',curSel);
  94. if (curSel && curSel.exports) {
  95. for (var i in curSel.exports) {
  96. fieldExport = jQuery('#ts-f' + i);
  97. if (fieldExport.length) {
  98. //console.log('--- onItemAdd fieldExport.selectize(',fieldExport.selectize,')', fieldExport);
  99. if (fieldExport.get(0).selectize) {
  100. fieldExport.get(0).selectize.addOption({id:curSel.exports[i], name:curSel.exports[i]});
  101. fieldExport.get(0).selectize.setValue(curSel.exports[i]);
  102. } else {
  103. //jQuery('#f' + i).val(curSel.exports[i]);
  104. }
  105. } else {
  106. //console.log('--- onItemAdd jQuery(#f' + i + ').val(', curSel.exports[i], '): fieldExport.is(input:',fieldExport.is('input'),'/select:',fieldExport.is('select'),')', fieldExport);
  107. fieldExport = jQuery('#f' + i);
  108. if (fieldExport.is('input')) {
  109. jQuery('#f' + i).val(curSel.exports[i]);
  110. } else if (fieldExport.is('select')) {
  111. //TODO: add option and select //jQuery('#f' + i).val(curSel.exports[i]);
  112. }
  113. }
  114. }
  115. }
  116. },
  117. score: function(search) {
  118. var score = this.getScoreFunction(search);
  119. return function(item) {
  120. //console.log('score:item:', item, ', score:', score(item));
  121. if (search && search == item.id) {
  122. return 1;
  123. } else {
  124. return score(item);// score(item) * (1 + Math.min(item.watchers / 100, 1));
  125. }
  126. };
  127. },
  128. load: function(query, callback) {
  129. if (!query.length) return callback();
  130. $.ajax({
  131. url: 'index.php?FUNCTION_INIT=PROCES_MENU&HEADER_NOT_INIT=YES&_task=TYPESPECIAL&fld=_user_id',
  132. data: 'q=' + encodeURIComponent(query),
  133. type: 'POST',
  134. error: function() {
  135. callback();
  136. },
  137. success: function(res) {
  138. for (var i in res) {
  139. if (!res[i].name || res[i].id != res[i].name) {
  140. res[i].name = res[i].id + ': ' + res[i].name;
  141. }
  142. }
  143. callback(res);
  144. }
  145. });
  146. }
  147. });
  148. });
  149. </script><input class="btn btn-xs btn-warning" type="submit" value="Wybierz">
  150. <?php endif; ?>
  151. -->
  152. <script>
  153. jQuery(document).ready(function() {
  154. jQuery('#ProcesMenuLoginDropdownLink')
  155. .next('.dropdown-menu')
  156. .find('.selectize-input')
  157. .on('click', function(e) {
  158. return false;
  159. });
  160. jQuery('#ProcesMenuLoginDropdownLink').on('click', function(e) {
  161. setTimeout(function(){
  162. jQuery('#ts-_user_id')
  163. .next('.selectize-control')
  164. .find('input:first')
  165. .focus();
  166. }, 200);
  167. });
  168. });
  169. </script>
  170. </form>
  171. </li>
  172. <li class="divider"></li>
  173. <li><a href="<?php echo Request::getPathUri(); ?>index.php?LOGIN=LOGOUT"><i class="glyphicon glyphicon-off"></i> Wyloguj</a></li>
  174. </ul>
  175. </div>
  176. </div></li>
  177. <li> <span class="smad-line-grey">|</span> <a href="<?php echo Request::getPathUri(); ?>index.php?LOGIN=LOGOUT" title="Wyloguj" class="smad-logout"><img src="<?= $this->asset("assets/images/logout.png"); ?>" alt="Wyloguj" /> Wyloguj</a></li>
  178. </ul>
  179. </div>
  180. <div class="smad-top-second">
  181. <ul>
  182. <li><div class="smad-header-title">koniec sesji za:</div></li>
  183. <li><div class="smad-desc"><code id="session-timer" style="padding:2px 5px;font-weight:normal;color:#000;" title="Czas sesji">52:40</code></div></li>
  184. </ul>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. <!-- end:top -->
  190. <!-- start:menu -->
  191. <div id="smad-menu-main" class="container-fluid">
  192. <div>
  193. <div>
  194. <div id="smad-menu-section">
  195. <div class="col-md-6 padding-lr-0">
  196. <div class="menu-items">
  197. <div class="smad-heder-title menu-item"><span class="smad-line-red">|</span> RAPORTY</div>
  198. <div class="menu-item">
  199. <ul>
  200. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA" title="zobacz raporty" class="btn btn-success btn-xs">zobacz raporty</a></li>
  201. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_operational_raport_note/BI_audit_operational_raport_note" title="Baza zgłoszeń operacyjnych i notatek" class="btn btn-success btn-xs">Operac. Baza zgł.</a></li>
  202. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=Menu" title="Menu silnika procesy5" class="btn btn-success btn-xs">Menu</a></li>
  203. </ul>
  204. </div>
  205. <br><div class="smad-heder-title menu-item" style="vertical-align:top"><span class="smad-line-red">|</span> OSTATNI RAPORT:</div>
  206. <div class="menu-item" id="last-raport-state"></div>
  207. </div>
  208. </div>
  209. <div class="col-md-6 padding-lr-0">
  210. <div class="menu-items">
  211. <div class="menu-item smad-heder-title"><span class="smad-line-red">|</span> BAZY DANYCH</div>
  212. <div class="menu-item">
  213. <ul style="padding:0">
  214. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_KRS/BI_audit_KRS" title="KRS - Firmy" class="btn btn-success btn-xs">KRS</a></li>
  215. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_KRS_person/BI_audit_KRS_person" title="KRS - Osoby" class="btn btn-success btn-xs">KRS/p</a></li>
  216. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_MSIG/BI_audit_MSIG" title="MSIG - Firmy" class="btn btn-success btn-xs">MSIG</a></li>
  217. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_MSIG_person/BI_audit_MSIG_person" title="KRS - Osoby" class="btn btn-success btn-xs">MSIG/p</a></li>
  218. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_taxpayer/BI_audit_taxpayer" title="VAT - Aktywni płatnicy" class="btn btn-success btn-xs">VATp</a></li>
  219. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_CEIDG/BI_audit_CEIDG" title="CIDG" class="btn btn-success btn-xs">CEIDG</a></li>
  220. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_ENERGA_RUM_UMOWY/BI_audit_ENERGA_RUM_UMOWY" title="RUM Umowy" class="btn btn-success btn-xs">RUM/u</a></li>
  221. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_ENERGA_RUM_KONTRAHENCI/BI_audit_ENERGA_RUM_KONTRAHENCI" title="RUM Kontrahenci" class="btn btn-success btn-xs">RUM/k</a></li>
  222. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_ENERGA_FAKTURY/BI_audit_ENERGA_FAKTURY" title="Faktury - do imoportowania" class="btn btn-success btn-xs">Faktury</a></li>
  223. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=UrlAction_Bocian#PRACOWNICY" title="Pracownicy" class="btn btn-success btn-xs">Pracownicy</a></li>
  224. <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=UrlAction_Bocian#KONTRAHENCI" title="Kontrahenci" class="btn btn-success btn-xs">Kontrahenci</a></li>
  225. <!--<li><a href="#" title="KSIĘGOWOŚĆ" class="btn btn-success">KSIĘGOWOŚĆ</a></li> -->
  226. </ul>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. <!-- end:menu -->