altyapiModul.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <html xml:lang="tr" lang="tr" xmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <title>ALTYAPI</title>
  4. <meta http-equiv="content-type" contentType="text/html; charset=UTF-8">
  5. <link rel="stylesheet" href="./static/css/reset.css" />
  6. <script src="../static/jquery.js"></script>
  7. <script src="../static/js/jquery-ui.js"></script>
  8. <script src="./static/js/datetimepicker.js"></script>
  9. <script type="text/javascript"
  10. src="./static/js/jquery.maskedinput.min.js"></script>
  11. <script src="../static/js/jquery.form.min.js"></script>
  12. <script src="../static/js/jquery.handsontable.full.js"></script>
  13. <script src="./static/js/jquery.blockUI.js"></script>
  14. <script src="./static/js/jquery.cookie.js"></script>
  15. <link rel="stylesheet"
  16. href="./static/js/themes/smoothness/jquery-ui.css" />
  17. <link rel="stylesheet"
  18. href="./static/css/jquery.handsontable.full.css" />
  19. <script src="{{url_for('static', filename='js/jquery.tablesorter.min.js')}}"></script>
  20. <link rel="stylesheet"
  21. href="{{url_for('static', filename='css/table2.css')}}" type="text/css"
  22. id="" media="print, projection, screen">
  23. <style type="text/css">
  24. body {
  25. margin: 0px auto;
  26. padding: 0px 0px;
  27. font-family: calibri;
  28. }
  29. .anasablon {
  30. width: auto;
  31. height: auto;
  32. }
  33. .mheader {
  34. font-family: Arial, Verdana;
  35. text-shadow: 2px 2px 2px #ccc;
  36. display: block;
  37. float: left;
  38. font-weight: bold;
  39. padding-left: 10px;
  40. text-align: left;
  41. font-size: 15px;
  42. width: 1300px;
  43. height: 20px;
  44. }
  45. .formalan{
  46. float:left;
  47. width:600px;
  48. height:500px;
  49. border:#CCC solid 1px;
  50. background-color:#996600 ;
  51. margin-right: 10px;
  52. margin-left: 4px;
  53. font-family:monospace;
  54. font-weight: bold;
  55. }
  56. .raporalan{
  57. width:850px;
  58. height:500px;
  59. overflow: scroll;
  60. }
  61. .genelalan {
  62. float: right;
  63. width: 899px;
  64. height: 670;
  65. }
  66. .operbutonlar{
  67. width:auto;
  68. margin: 5 ;
  69. font-family:monospace;
  70. font-weight: bold;
  71. }
  72. .element{
  73. width:360px;
  74. margin: 10 ;
  75. float:center;
  76. font-family:monospace;
  77. font-weight: bold;
  78. }
  79. p{
  80. margin:5px 0;
  81. }
  82. hr {
  83. top:5px;
  84. width: 100%;
  85. clear: both;
  86. margin: auto;
  87. }
  88. .mheader,.formalan,.raporalan{
  89. margin: 3px;
  90. padding: 15px;
  91. background:#669999;
  92. border: 1px solid #cccccc;
  93. -moz-border-radius: 6px;
  94. -webkit-border-radius: 6px;
  95. border-radius: 6px;
  96. -moz-box-shadow: 2px 2px 2px #cccccc;
  97. -webkit-box-shadow: 2px 2px 2px #cccccc;
  98. box-shadow: 2px 2px 2px #cccccc;
  99. }
  100. </style>
  101. <script>
  102. $(document).ready(function() {
  103. $('#calistir').on('click', function(event){
  104. event.preventDefault();
  105. var formOption = {
  106. url : "/sqlCalistir",
  107. type : "POST",
  108. target :"#raporalan",
  109. success : raporGetir
  110. //beforeSubmit : kontrolStkHarListSil
  111. };
  112. $('#raporForm').ajaxSubmit(formOption);
  113. });
  114. $('#sqllist').change(function(){
  115. $.ajax({
  116. url : "/sqlAl?mod="+$('#mod').val() +"&dosya="+$('#sqllist').val(),
  117. }).done(function(data) {
  118. $("#sqlkod").val(data);
  119. });
  120. });
  121. $('#yeniKaydet').on('click', function(event){
  122. event.preventDefault();
  123. $('#kayitmodu').val('w');
  124. var formOption = {
  125. url : "/sqlKaydet",
  126. type : "POST",
  127. success: function (data) {
  128. if(data=='tamam'){
  129. islemTamam("Yeni Sql Kaydı Yapıldı.");
  130. }else{
  131. hataGoster(data);
  132. }
  133. }
  134. };
  135. $('#raporForm').ajaxSubmit(formOption);
  136. });
  137. $('#guncelle').on('click', function(event){
  138. event.preventDefault();
  139. $('#kayitmodu').val('a');
  140. var formOption = {
  141. url : "/sqlKaydet",
  142. type : "POST",
  143. success: function (data) {
  144. if(data=='tamam'){
  145. islemTamam("Sql Kaydı Güncellendi.");
  146. }else{
  147. hataGoster(data);
  148. }
  149. }
  150. };
  151. $('#raporForm').ajaxSubmit(formOption);
  152. });
  153. });
  154. function raporGetir(res, statusText, xhr, $form) {
  155. //console.log(res);
  156. if(res!='None'){
  157. $("#raporalan").html(res);
  158. $("#hareketrapor").tablesorter();
  159. }
  160. }
  161. function islemTamam(message) {
  162. // TODO: hata mesajı dön
  163. $.blockUI({
  164. message: message,
  165. fadeIn: 500,
  166. fadeOut: 500,
  167. timeout: 2000,
  168. showOverlay: false,
  169. centerY: false,
  170. css: {
  171. width: '550px',
  172. top: '6px',
  173. left: '',
  174. right: '100px',
  175. border: 'none',
  176. padding: '10px',
  177. backgroundColor: '#080',
  178. '-webkit-border-radius': '6px',
  179. '-moz-border-radius': '6px',
  180. 'border-radius': '6px',
  181. opacity: .6,
  182. 'font-style': 'italic',
  183. 'font-weight': 'normal',
  184. 'font-family': 'Georgia, "Times New Roman", Times, serif',
  185. 'font-size': '16px',
  186. color: '#fff'
  187. }
  188. });
  189. }
  190. function hataGoster(message) {
  191. console.log("HATA:" + message);
  192. $.blockUI({
  193. message: message,
  194. fadeIn: 500,
  195. fadeOut: 500,
  196. timeout: 2000,
  197. showOverlay: false,
  198. centerY: false,
  199. css: {
  200. width: '550px',
  201. top: '6px',
  202. left: '',
  203. right: '100px',
  204. border: 'none',
  205. padding: '10px',
  206. backgroundColor: '#900',
  207. '-webkit-border-radius': '6px',
  208. '-moz-border-radius': '6px',
  209. 'border-radius': '6px',
  210. opacity: .6,
  211. 'font-style': 'italic',
  212. 'font-weight': 'normal',
  213. 'font-family': 'Georgia, "Times New Roman", Times, serif',
  214. 'font-size': '16px',
  215. color: '#fff',
  216. }
  217. });
  218. }
  219. </script>
  220. </head>
  221. <body bgcolor='silver' >
  222. <div class=anasablon>
  223. <div class="mheader" tabindex="-1">
  224. <a href="/altyapiModul"><img src="altyapi.png" class="hover" hinttext="Altyapı" style="margin-right:120px;"></a>
  225. <a href="/raporModul"><img src="rapor.png" class="hover" hinttext="Rapor" style="margin-right:20px;"></a>
  226. <a href="/stokModul"><img src="stok.png" class="hover" hinttext="Stok" style="margin-right:20px;"></a>
  227. <a href="/faturaModul"><img src="fatura.png" class="hover" hinttext="Fatura" style="margin-right:20px;"></a>
  228. <a href="/cariModul"><img src="cari.png" class="hover" hinttext="Cari" style="margin-right:20px;"></a>
  229. <a href="/siparisModul"><img src="spr.png" class="hover" hinttext="Sipariş" style="margin-right:20px;"></a>
  230. <a href="/sayimModul"><img src="pencil.png" class="hover" hinttext="Sayım" style="margin-right:20px;"></a>
  231. <a href="/veriModul"><img src="veri.png" class="hover" hinttext="Veri" style="margin-right:20px;"></a>
  232. <a href="/yetkiliModul"><img src="config.png" class="hover" hinttext="Yetkili" style="margin-right:20px;"></a>
  233. <a href="/logModul"><img src="log.png" class="hover" hinttext="Log" style="margin-right:20px;"></a>
  234. <a href="/exit"><img src="cikis.png" class="hover" hinttext="ÇIKIŞ" style="margin-left:40px;"></a>
  235. <div class="kulblok">{{kullanici}}</div>
  236. </div><br>
  237. <div class=formalan>
  238. <form id=raporForm name=raporForm action="{{ url_for('altyapiModul') }}" method=post>
  239. <div class=element>
  240. <textarea id=sqlkod name=sqlkod value="" ondblclick=this.value='' style="font-size: 18px;;margin-top: 3px;width:500px;height: 200px;"></textarea>
  241. </div>
  242. <div class=element>
  243. <input type="submit" name="calistir" id="calistir" value="Çalıştır" tabindex="-1"/>
  244. </div>
  245. <div class=element>
  246. <select name="sqllist" id="sqllist" class="txt" style="width: 150px;" >
  247. {% for sql in sqller %}<option>{{sql}}</option>{% endfor %}
  248. </select><label>SQL LİSTESİ</label>
  249. </div>
  250. <div class=element>
  251. <input type=text id=yeniSql name=yeniSql value=yeni.sql tabindex="-1" style="width: 150px;"/>
  252. </div>
  253. <div class=element>
  254. <input type="submit" name="yeniKaydet" id="yeniKaydet" value="Yeni Kaydet" tabindex="-1"/>
  255. </div>
  256. <div class=element>
  257. <input type="submit" name="guncelle" id="guncelle" value="Güncelle" tabindex="-1"/>
  258. </div>
  259. <input id="mod" name="mod" hidden value="{{mod}}" />
  260. <input id="kayitmodu" name="kayitmodu" hidden value="{{kayitmodu}}" />
  261. <hr noshade size=2>
  262. </form>
  263. </div>
  264. <div id='genelalan' class="genelalan" tabindex="-1">
  265. <div class=raporalan id=raporalan>
  266. ilgili rapor alani
  267. </div>
  268. <hr noshade size=1>
  269. <div id="fsb"></div>
  270. </div>
  271. </div>
  272. </body>
  273. </HTML>