Modificare il file:
\Buoni-spesa-OLD\transizioni_search.asp
<!--#include file="include/dbcommon.asp"--> <!--#include file="include/transizioni_variables.asp"--> <!--#include file="libs/smarty.asp"--> <% '// check if logged in if SESSION("UserID")="" or not CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Search") then SESSION("MyURL")=request.ServerVariables("SCRIPT_NAME")&"?"&request.ServerVariables("QUERY_STRING") response.Redirect "login.asp?message=expired" response.End end if '//connect database dbConnection="" db_connect() DoEvent "BeforeProcessSearch dbConnection" Set rs = server.CreateObject("ADODB.Recordset") includes="<STYLE>" & vbcrlf includes=includes & " vis1{ visibility:""visible"" }" & vbcrlf includes=includes & " vis2{ visibility:""hidden"" }" & vbcrlf includes=includes & "</STYLE>" & vbcrlf if useAJAX then includes=includes & "<script language=""JavaScript"" type=""text/javascript"" src=""include/jquery.js""></script>" & vbcrlf includes=includes & "<script language=""JavaScript"" type=""text/javascript"" src=""include/ajaxsuggest.js""></script>" & vbcrlf end if includes=includes & "<script language=""JavaScript"" src=""include/calendar.js""></script>" & vbcrlf includes=includes & "<script language=""JavaScript"" src=""include/jsfunctions.js""></script>" & vbcrlf includes=includes & "<script language=""JavaScript"">" & vbcrlf includes=includes & "var locale_dateformat = " & locale_info.Item("LOCALE_IDATE") & vbcrlf includes=includes & "var locale_datedelimiter = """ & locale_info.Item("LOCALE_SDATE") & """" & vbcrlf includes=includes & "var bLoading=false" & vbcrlf includes=includes & "var TEXT_PLEASE_SELECT='" & addslashes("Prego seleziona") & "'" & vbcrlf if useAJAX then includes=includes & "var SUGGEST_TABLE = ""transizioni_searchsuggest.asp""" & vbcrlf includes=includes & "var SUGGEST_LOOKUP_TABLE=""transizioni_lookupsuggest.asp""" & vbcrlf includes=includes & "var AUTOCOMPLETE_TABLE=""transizioni_autocomplete.asp""" & vbcrlf end if includes=includes & "var detect = navigator.userAgent.toLowerCase();" & vbcrlf includes=includes & "function checkIt(sstring)" & vbcrlf includes=includes & "{" & vbcrlf includes=includes & " place = detect.indexOf(sstring) + 1;" & vbcrlf includes=includes & " thestring = sstring;" & vbcrlf includes=includes & " return place;" & vbcrlf includes=includes & "}" & vbcrlf includes=includes & "function ShowHideControls()" & vbcrlf includes=includes & "{" & vbcrlf includes=includes & " document.getElementById('second_N_Buono').style.display = " includes=includes & " document.forms.editform.elements['asearchopt_N_Buono'].value=='Between' ? '' : 'none';" & vbcrlf includes=includes & " document.getElementById('second_importo').style.display = " includes=includes & " document.forms.editform.elements['asearchopt_importo'].value=='Between' ? '' : 'none';" & vbcrlf includes=includes & " document.getElementById('second_data_emissione').style.display = " includes=includes & " document.forms.editform.elements['asearchopt_data_emissione'].value=='Between' ? '' : 'none';" & vbcrlf includes=includes & " return false;" & vbcrlf includes=includes & "}" & vbcrlf includes=includes & "function ResetControls()" & vbcrlf includes=includes & "{" & vbcrlf includes=includes & " var i;" & vbcrlf includes=includes & " e = document.forms[0].elements; " & vbcrlf includes=includes & " for (i=0;i<e.length;i++) " & vbcrlf includes=includes & " {" & vbcrlf includes=includes & " if (e[i].name!='type' && e[i].className!='button' && e[i].type!='hidden')" & vbcrlf includes=includes & " {" & vbcrlf includes=includes & " if(e[i].type=='select-one')" & vbcrlf includes=includes & " e[i].selectedIndex=0;" & vbcrlf includes=includes & " else if(e[i].type=='select-multiple')" & vbcrlf includes=includes & " {" & vbcrlf includes=includes & " var j;" & vbcrlf includes=includes & " for(j=0;j<e[i].options.length;j++)" & vbcrlf includes=includes & " e[i].options[j].selected=false;" & vbcrlf includes=includes & " }" & vbcrlf includes=includes & " else if(e[i].type=='checkbox' || e[i].type=='radio')" & vbcrlf includes=includes & " e[i].checked=false;" & vbcrlf includes=includes & " else " & vbcrlf includes=includes & " e[i].value = ''; " & vbcrlf includes=includes & " }" & vbcrlf includes=includes & " else if(e[i].name.substr(0,6)=='value_' && e[i].type=='hidden')"& vbcrlf includes=includes & " e[i].value = ''; "& vbcrlf includes=includes & " }" & vbcrlf includes=includes & " ShowHideControls(); " & vbcrlf includes=includes & " return false;" & vbcrlf includes=includes & "}" & vbcrlf if useAJAX then includes=includes & "$(document).ready(function()" & vbcrlf includes=includes & "{" & vbcrlf includes=includes & "document.forms.editform.value_importo.onkeyup=function(event) {searchSuggest(event,document.forms.editform.value_importo,'advanced')};" & vbcrlf includes=includes & "document.forms.editform.value1_importo.onkeyup=function(event) {searchSuggest(event,document.forms.editform.value1_importo,'advanced1')};" & vbcrlf includes=includes & "document.forms.editform.value_importo.onkeydown=function(event) {return listenEvent(event,document.forms.editform.value_importo,'advanced')};" & vbcrlf includes=includes & "document.forms.editform.value1_importo.onkeydown=function(event) {return listenEvent(event,document.forms.editform.value1_importo,'advanced1')};" & vbcrlf includes=includes & "});" & vbcrlf includes=includes & "</script>" & vbcrlf includes=includes & "<div id=""search_suggest""></div>" & vbcrlf else includes=includes & "function OnKeyDown(e)" & vbcrlf includes=includes & "{ if(!e) e = window.event; " & vbcrlf includes=includes & "if (e.keyCode == 13){ e.cancel = true; document.forms[0].submit();} }" & vbcrlf includes=includes & "</script>" & vbcrlf end if smarty.Add "includes",includes smarty.Add "noAJAX",(not useAJAX) onload="onLoad=""javascript: ShowHideControls();""" smarty.Add "onload",onload if SESSION(strTableName & "_asearchtype")="or" then smarty.Add "any_checked"," checked" smarty.Add "all_checked","" else smarty.Add "any_checked","" smarty.Add "all_checked"," checked" end if set editformats = CreateObject("Scripting.Dictionary") if isobject(Session(strTableName & "_asearchnot")) then set strTableName_asearchnot = session(strTableName & "_asearchnot") set strTableName_asearchopt = session(strTableName & "_asearchopt") set strTableName_asearchfor = session(strTableName & "_asearchfor") set strTableName_asearchfor2 = session(strTableName & "_asearchfor2") else set strTableName_asearchnot = CreateObject("Scripting.Dictionary") set strTableName_asearchopt = CreateObject("Scripting.Dictionary") set strTableName_asearchfor = CreateObject("Scripting.Dictionary") set strTableName_asearchfor2 = CreateObject("Scripting.Dictionary") end if '// N_Buono nnot="" opt="" if SESSION(strTableName & "_search")=2 then opt=strTableName_asearchopt.Item("N_Buono") nnot=strTableName_asearchnot.Item("N_Buono") smarty.Add "value_N_Buono",strTableName_asearchfor.Item("N_Buono") smarty.Add "value1_N_Buono",strTableName_asearchfor2.Item("N_Buono") end if if nnot<>"" then smarty.Add "not_N_Buono"," checked" '// write search options options="" s="" if opt="Equals" then s="selected" options=options & "<OPTION VALUE=""Equals"" " & s & ">" & "Uguale" & "</option>" searchtype = "<SELECT ID=""SearchOption"" NAME=""asearchopt_N_Buono"" SIZE=1 onChange=""return ShowHideControls();"">" searchtype = searchtype & options searchtype = searchtype & "</SELECT>" smarty.Add "searchtype_N_Buono",searchtype '// edit format editformats.Add "N_Buono","Lookup wizard" '// importo nnot="" opt="" if SESSION(strTableName & "_search")=2 then opt=strTableName_asearchopt.Item("importo") nnot=strTableName_asearchnot.Item("importo") smarty.Add "value_importo",strTableName_asearchfor.Item("importo") smarty.Add "value1_importo",strTableName_asearchfor2.Item("importo") end if if nnot<>"" then smarty.Add "not_importo"," checked" '// write search options options="" s="" if opt="Contains" then s="selected" options=options & "<OPTION VALUE=""Contains"" " & s & ">" & "Contiene" & "</option>" s="" if opt="Equals" then s="selected" options=options & "<OPTION VALUE=""Equals"" " & s & ">" & "Uguale" & "</option>" s="" if opt="Starts with ..." then s="selected" options=options & "<OPTION VALUE=""Starts with ..."" " & s & ">" & "Incomincia per" & "</option>" s="" if opt="More than ..." then s= "selected" options=options & "<OPTION VALUE=""More than ..."" " & s & ">" & "Piu di" & "</option>" s="" if opt="Less than ..." then s="selected" options=options & "<OPTION VALUE=""Less than ..."" " & s & ">" & "Meno di" & "</option>" s="" if opt="Equal or more than ..." then s="selected" options=options & "<OPTION VALUE=""Equal or more than ..."" " & s & ">" & "Maggiore o uguale di" & "</option>" s="" if opt="Equal or less than ..." then s="selected" options=options & "<OPTION VALUE=""Equal or less than ..."" " & s & ">" & "Minore o uguale di" & "</option>" s="" if opt="Between" then s="selected" options=options & "<OPTION VALUE=""Between"" " & s & ">" & "Tra" & "</option>" s="" if opt="Empty" then s="selected" options=options & "<OPTION VALUE=""Empty"" " & s & ">" & "Vuoto" & "</option>" searchtype = "<SELECT ID=""SearchOption"" NAME=""asearchopt_importo"" SIZE=1 onChange=""return ShowHideControls();"">" searchtype = searchtype & options searchtype = searchtype & "</SELECT>" smarty.Add "searchtype_importo",searchtype '// edit format editformats.Add "importo","Text field" '// data_emissione nnot="" opt="" if SESSION(strTableName & "_search")=2 then opt=strTableName_asearchopt.Item("data_emissione") nnot=strTableName_asearchnot.Item("data_emissione") smarty.Add "value_data_emissione",strTableName_asearchfor.Item("data_emissione") smarty.Add "value1_data_emissione",strTableName_asearchfor2.Item("data_emissione") end if if nnot<>"" then smarty.Add "not_data_emissione"," checked" '// write search options options="" s="" if opt="Equals" then s="selected" options=options & "<OPTION VALUE=""Equals"" " & s & ">" & "Uguale" & "</option>" s="" if opt="More than ..." then s= "selected" options=options & "<OPTION VALUE=""More than ..."" " & s & ">" & "Piu di" & "</option>" s="" if opt="Less than ..." then s="selected" options=options & "<OPTION VALUE=""Less than ..."" " & s & ">" & "Meno di" & "</option>" s="" if opt="Equal or more than ..." then s="selected" options=options & "<OPTION VALUE=""Equal or more than ..."" " & s & ">" & "Maggiore o uguale di" & "</option>" s="" if opt="Equal or less than ..." then s="selected" options=options & "<OPTION VALUE=""Equal or less than ..."" " & s & ">" & "Minore o uguale di" & "</option>" s="" if opt="Between" then s="selected" options=options & "<OPTION VALUE=""Between"" " & s & ">" & "Tra" & "</option>" s="" if opt="Empty" then s="selected" options=options & "<OPTION VALUE=""Empty"" " & s & ">" & "Vuoto" & "</option>" searchtype = "<SELECT ID=""SearchOption"" NAME=""asearchopt_data_emissione"" SIZE=1 onChange=""return ShowHideControls();"">" searchtype = searchtype & options searchtype = searchtype & "</SELECT>" smarty.Add "searchtype_data_emissione",searchtype '// edit format editformats.Add "data_emissione","Date" linkdata="" linkdata=linkdata & "<script language=""Javascript"">" if useAJAX then else end if linkdata=linkdata & "</script>" smarty.Add "linkdata",linkdata templatefile = "transizioni_search.htm" DoEvent "BeforeShowSearch smarty,templatefile" smarty_display(templatefile) %>
[
Íàçàä
]