Advertisement
ubk77

Untitled

Feb 21st, 2017
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 6.70 KB | None | 0 0
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
  2. <!--#include virtual="/OptimusSFA/connector/ConnessioneDBpt2.asp"-->
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  7. <title>File Eurospin</title>
  8. <link href="http://212.66.106.94/OptimusSFA/video.css" rel="stylesheet" type="text/css">
  9. <script language="javascript" type="text/javascript" src="http://212.66.106.94/OptimusSFA/common/scripts.js"></script>
  10.  
  11. <script language="javascript" type="text/javascript" src="http://212.66.106.94/OptimusSFA/common/cpaint/cpaint2.inc.compressed.js"></script>
  12. <script language="javascript" type="text/javascript" src="http://212.66.106.94/OptimusSFA/common/prototype.js"></script>
  13. <script language="javascript" type="text/javascript" src="http://212.66.106.94/OptimusSFA/common/fat.js"></script>
  14. <script language="javascript" type="text/javascript" src="http://212.66.106.94/OptimusSFA/common/sorttable.js"></script>
  15.  
  16. <script language="javascript" type="text/javascript">
  17. <!--
  18. var cal1 = new CalendarPopup();
  19. var cal = new CalendarPopup("div_calendario");
  20. cal.showYearNavigation();
  21. // CPAINT vars
  22. var response_box = '';
  23. var cp = new cpaint();
  24. //cp.set_debug(1);
  25. cp.set_response_type('text');
  26.  
  27. function check_admin_form() {
  28.     this_form = document.admin_form;
  29.     error_msg = '';
  30.    
  31.     if (this_form.admin_agente.value == '') {
  32.         error_msg = '- Codice agente mancante\n';
  33.     }
  34.     if (this_form.admin_data_inizio.value == '') {
  35.         error_msg += '- Data di inizio mancante\n';
  36.     }
  37.     if (this_form.admin_data_fine.value == '') {
  38.         error_msg += '- Data di fine mancante\n';
  39.     }
  40.    
  41.     if (error_msg == '') { wait_image(); $('admin_filtra_btn').disabled = true; return true; } else { alert ('Si sono verificati queste errori:\n\n' + error_msg); return false; }
  42. }
  43.  
  44.  
  45. function check_search_form() {
  46.     if ($('cerca_testo').value == '' || $('data_inizio').value == '' || $('data_fine').value == '') {
  47.         alert ('Devi inserire il testo da cercare e l\'intervallo delle date!');
  48.         return false;
  49.     } else {
  50.         Element.show('boxAttendere');
  51.         Element.hide('cerca_btn');
  52.         return true;
  53.     }
  54. }
  55.  
  56.  
  57. function forza_ricerca() {
  58.     $('data_inizio').value = '%';
  59.     $('data_fine').value = '%';
  60.     Element.show('boxAttendere');
  61.     //Element.hide('cerca_btn');
  62.     document.getElementById('cerca_form').submit();
  63.    
  64. }
  65.  
  66.  
  67. function wait_image() {
  68.     Element.show('boxAttendere');
  69.     Element.hide('cerca_btn');
  70. }
  71.  
  72.  
  73. function ajax_admin_filter() {
  74.     cp.call('lista-ajax.asp', 'mostra_filtro_admin', 'ajax_response', user_name);
  75. }
  76.  
  77.  
  78. function ajax_response(result) {
  79.     document.getElementById(response_box).innerHTML = result;
  80. }
  81.  
  82. // Popup menu
  83. var pos_left = 0;
  84. var pos_top = 0;
  85.  
  86. function show_menu(menu_name) {
  87.     //alert ('Left: ' + pos_left + '\nTop: ' + pos_top);
  88.     $(menu_name).style.left = pos_left + 'px';
  89.     $(menu_name).style.top = pos_top + 'px';
  90.     Element.toggle(menu_name);
  91. }
  92.  
  93. function showPosition(e) {
  94.     pos_left = Event.pointerX(e);
  95.     pos_top = Event.pointerY(e);
  96. }
  97.  
  98. Event.observe(document, "mousedown", showPosition, false);
  99.  
  100.  
  101. // Funzioni AJAX di prototype
  102. function ajax_request(action_name, params) {
  103.     Element.show('boxAttendere');
  104.     var myAjax = new Ajax.Request(
  105.     'ajax.asp?act=' + action_name + '&codiceagente=<%=session("dea_agente")%>',
  106.         {method: 'post', postBody: params, onComplete: ajax_response2}
  107.     );
  108. }
  109.  
  110.  
  111. function ajax_response2(originalRequest) {
  112.     Element.hide('boxAttendere');
  113.     document.getElementById('box_ajax_response').innerHTML = '<a href="javascript:Element.hide(\'box_ajax_response\');" style="float: right;"><img src="images/btn_close_box.gif" border="0" alt="Chiudi" title="Chiudi"></a>' + originalRequest.responseText;
  114.     Element.show('box_ajax_response');
  115.     Fat.fade_element('box_ajax_response', '', 1000, '#FF0000', '#FFFFCC');
  116. }
  117.  
  118.  
  119. function scegli_stato(stato) {
  120.     if (stato == 'AND (stato = [valore]) ') {
  121.         Element.show('valori_stati');
  122.     } else {
  123.         Element.hide('valori_stati');
  124.     }
  125.    
  126.     if (stato == 'AND (NumeroBolla LIKE \'%[valore]%\') ') {
  127.         $('data_inizio').value = '%';
  128.         $('data_fine').value = '%';
  129.     }
  130.    
  131.     if (stato == 'AND (DataBolla = \'[valore]\') ') {
  132.         if ($('data_inizio').value == '%' || $('data_fine').value == '%') {
  133.             $('data_inizio').value = '';
  134.             $('data_fine').value = '';
  135.         }
  136.         $('cerca_testo').value = '%';
  137.     }
  138.    
  139.     if (stato == 'AND (LEN(nlistaprel) < 1 OR nlistaprel IS NULL) ') {
  140.         $('cerca_testo').value = '%';
  141.     }
  142.    
  143.     if (stato == 'AND (LEN(NumeroBolla) < 1 OR NumeroBolla IS NULL) ') {
  144.         $('cerca_testo').value = '%';
  145.     }
  146. }
  147. -->
  148. </script>
  149.  
  150.  
  151.  
  152. <style>
  153. td {
  154.     padding: 4px;
  155. }
  156. tr:hover {
  157.     background-color: #FFFF80;
  158. }
  159. </style>
  160. </head>
  161.  
  162. <body>
  163.  
  164. <%
  165. if request("rica")="si" and request("file")<>"" then
  166.     Dim fs
  167.     ' Creo l'oggetto FileSystemObject
  168.     Set fs = Server.CreateObject("Scripting.FileSystemObject")
  169.    
  170.     ' Copio il file pagina.html in una ipotetica cartella di backup
  171.     fs.CopyFile "C:\Inetpub\wwwroot\OptimusSFA\common\OrdiniEuroSpin\" & request("file"), "C:\Inetpub\wwwroot\OptimusSFA\common\OrdiniEuroSpin\ricarica\" & request("file")
  172.    
  173.     ' faccio pulizia
  174.     Set fs = nothing
  175.     response.Write("FILE "&(request("file"))&" MESSO IN RICARICA"):response.End()
  176. end if
  177. %>
  178.  
  179. <h2>File Eurospin</h2>
  180. <table class="sortable" id="table_lista_ordini" >
  181.     <tr>
  182.         <th></th>
  183.         <th>Scarica</th>
  184.         <th>Nome del file</th>
  185.         <th>Dimensione</th>
  186.         <th>Ultima modifica</th>
  187.     </tr>
  188. <%
  189. conta=1
  190. 'Dim filesys, demofolder, fil, filecoll, filist
  191. Set filesys = CreateObject("Scripting.FileSystemObject")
  192. Set demofolder = filesys.GetFolder("C:\Inetpub\wwwroot\OptimusSFA\common\OrdiniEuroSpin")
  193. Set filecoll = demofolder.Files
  194. For Each fil in filecoll
  195.    
  196.     if ( alternate = "alternate3" ) then
  197.         alternate = "alternate4"
  198.     else
  199.         alternate = "alternate3"
  200.     end if
  201.    
  202.    
  203.     'sqlord="SELECT TOP 1 NoteOrdine FROM OrdiniTerminali WHERE NoteOrdine  LIKE '%"&(fil.name)&"%' AND codiceSD='3333' "
  204.     'set rk_note = dbconn.execute (sqlord)
  205.     'if rk_note.eof<>true then
  206.         'alternate="alternate7"
  207.     'end if
  208.    
  209.    
  210.     %>
  211.     <tr class="<%=alternate%>">
  212.         <td><%=conta%></td>
  213.         <td><a href="http://212.66.104.93/OrdiniEuroSpin/<%=fil.name%>" title="Scarica <%=fil.name%>" target="_blank">Scarica</a></td>
  214.         <td><%=fil.name%></td>
  215.         <td style="text-align: right;"><%=round( fil.size / 1024 , 2 )%> KB</td>
  216.         <td><%=fil.DateLastModified%></td>
  217.         <td><a href="file_eurospin.asp?file=<%=fil.name%>&rica=si" title="RICARICA <%=fil.name%>" >RICARICA</a></td>
  218.        
  219.     </tr>
  220.     <%
  221.    
  222.     conta=conta+1
  223. Next
  224. Response.Write filist
  225. %>
  226. </table>
  227.  
  228. <script>
  229. window.document.getElementById( 'fileZipSize' ).innerHTML = '<%=fileZipSize%>';
  230. </script>
  231.  
  232. </body>
  233. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement