Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f87bee709 | ||
|
|
0bd267e90f | ||
|
|
6103adebcf | ||
|
|
2c7b375a8d | ||
|
|
b9d225e8d2 | ||
|
|
c60edbaa31 | ||
|
|
28d6c45254 | ||
|
|
ae0b64153a | ||
|
|
1d6541b8f9 | ||
|
|
5999bc12fc | ||
|
|
2d6beb64cc | ||
|
|
c81b5a35da |
@@ -531,7 +531,7 @@ function kleurThema(cHandle, kleurProps)
|
||||
|
||||
// FSN#27251: tempfiles opruimen
|
||||
// Merk op dat het heel goed mogelijk is dat het niet je eigen file is die
|
||||
// je opruimt. Het kan zelfs van een andere klant zijn. Allemaal niet erg na 24 uur.
|
||||
// je opruimt. Allemaal niet erg na 1 uur.
|
||||
var cleanup_regexp = /^CAD_.*\.(w2d|dwf)$/;
|
||||
function cleanup_tempfolder ()
|
||||
{
|
||||
@@ -541,7 +541,7 @@ function cleanup_tempfolder ()
|
||||
var f1 = fso.GetFolder(tempFolder);
|
||||
var fc4 = new Enumerator(f1.files);
|
||||
var expire = new Date();
|
||||
expire.setHours(expire.getHours() - 24); // Na 24 uur weg
|
||||
expire.setHours(expire.getHours() - 1); // Na 1 uur weg
|
||||
for (; !fc4.atEnd(); fc4.moveNext())
|
||||
{
|
||||
var vFile = fc4.item();
|
||||
@@ -556,7 +556,6 @@ function cleanup_tempfolder ()
|
||||
}
|
||||
else
|
||||
__Log("Skipping: " + vName + " " + toDateTimeString(vFile.DateLastModified));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +108,25 @@ function DefineSymbol(cHandle, acadSymbol)
|
||||
var symbolFile = Server.MapPath("../shared/" + acadSymbol + ".dwf"); // Fallback naar shared
|
||||
if (fso.FileExists(symbolFile))
|
||||
{
|
||||
if (S("fac_reserved_number1") & 2) // ellipse1.dwf van YKPN gaf overflow bij draggen
|
||||
{
|
||||
var xd = new ActiveXObject("SLNKDWF.DWFFile");
|
||||
xd.Open(symbolFile);
|
||||
var y = new ActiveXObject("SLNKDWF.WhipFile");
|
||||
y.SetLayers("NotExist", "NotExist");
|
||||
|
||||
if (xd.EplotSections.Count == 0)
|
||||
y.Load(fullnameDWF);
|
||||
else
|
||||
{
|
||||
var epl = xd.EplotSections.Item(0);
|
||||
y.LoadStream(epl);
|
||||
}
|
||||
var tmp_dwf = shared.tempFolder() + "/CAD_" + shared.random(16) +".w2d"
|
||||
symbolFile = tmp_dwf; // wordt na 24 in fgii.inc/cleanup_tempfolder wel opgeruimd
|
||||
y.SaveAs(symbolFile);
|
||||
}
|
||||
|
||||
var xs = new ActiveXObject("SLNKDWF.DWFFile")
|
||||
xs.Open(symbolFile);
|
||||
try
|
||||
|
||||
@@ -561,7 +561,7 @@ if (dwfPath)
|
||||
// Door ze hier eerst te herschrijven wordt het vanzelf
|
||||
// een versie rond (0, 0) een hebben we geen overflow meer
|
||||
var tmp_dwf;
|
||||
if (S("fac_reserved_number1"))
|
||||
if (S("fac_reserved_number1") & 1)
|
||||
{
|
||||
var xd = new ActiveXObject("SLNKDWF.DWFFile");
|
||||
xd.Open(dwfPath);
|
||||
|
||||
@@ -229,10 +229,10 @@ function fac_usrrap_list_graph (model, scf_params)
|
||||
};
|
||||
|
||||
graphAxes = { url: null
|
||||
, xas: { naam: model.fields[scf_params.list.columns[0]].label}
|
||||
, yas: []
|
||||
, zas: { naam: ((xxx_params.filter.scf_pivot==1 && xxx_columns && xxx_columns[2]) ? model.fields[xxx_columns[2]].label : null)}
|
||||
};
|
||||
, xas: { naam: model.fields[scf_params.list.columns[0]].label}
|
||||
, yas: []
|
||||
, zas: { naam: ((xxx_params.filter.scf_pivot==1 && xxx_columns && xxx_columns[2]) ? model.fields[xxx_columns[2]].label : null)}
|
||||
};
|
||||
|
||||
for (var c=1; c < scf_params.list.columns.length; c++)
|
||||
{
|
||||
@@ -270,12 +270,24 @@ function fac_usrrap_list_graph (model, scf_params)
|
||||
}
|
||||
}
|
||||
|
||||
rapport.graph_options = rapport.graph_options || "{}";
|
||||
|
||||
try
|
||||
{
|
||||
var x_1 = JSON.parse(rapport.graph_options);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
__DoLog("Ongeldige JSON in graph_options: " + e.description);
|
||||
}
|
||||
|
||||
|
||||
graphInit = { title : model.records_title
|
||||
, graph_type : graph_type
|
||||
, maxrows : 0
|
||||
, limiet : [0,70,90,100] //limiet_arr
|
||||
, report_options : rapport.graph_options || "{}"
|
||||
, default_options : S("udr_graph_default_json") || "{}"
|
||||
, report_options : JSON.parse(rapport.graph_options) || {}
|
||||
, default_options : S("udr_graph_default_json") || {}
|
||||
, sql_orderby : "" //oRs("fac_usrgraph_orderby").Value || ""
|
||||
//, sql : sql_select
|
||||
};
|
||||
@@ -285,8 +297,32 @@ function fac_usrrap_list_graph (model, scf_params)
|
||||
<head>
|
||||
<% FCLTHeader.Generate(); %>
|
||||
<script>
|
||||
function json_reviver(nm, val)
|
||||
{
|
||||
// JSON.parse ondersteund niet het gebruik van functienamen binnen een object.
|
||||
// Door het dan als een string "function(){ te_gebruiken_functie }" te schrijven heb je wel een geldig json-object.
|
||||
// In deze functie wordt tijdens het parsen gezocht op "function()" in de waarde bij een object-key-naam en dan wordt alleen de te_gebruiken_functie terug gegeven
|
||||
// Na het parsen bevat het json-object wel de te_gebruike_functie.
|
||||
if (val && (typeof val == "string"))
|
||||
{
|
||||
switch(val)
|
||||
{
|
||||
case "$.jqplot.Highlighter": val = $.jqplot.Highlighter; break;
|
||||
case "$.jqplot.PieRenderer": val = $.jqplot.PieRenderer; break;
|
||||
case "$.jqplot.BarRenderer": val = $.jqplot.BarRenderer; break;
|
||||
case "$.jqplot.CanvasAxisLabelRenderer": val = $.jqplot.CanvasAxisLabelRenderer; break;
|
||||
case "$.jqplot.CanvasAxisTickRenderer": val = $.jqplot.CanvasAxisTickRenderer; break;
|
||||
case "$.jqplot.CanvasOverlay": val = $.jqplot.CanvasOverlay; break;
|
||||
case "$.jqplot.CanvasTextRenderer": val = $.jqplot.CanvasTextRenderer; break;
|
||||
case "$.jqplot.CategoryAxisRenderer": val = $.jqplot.CategoryAxisRenderer; break;
|
||||
case "$.jqplot.MeterGaugeRenderer": val = $.jqplot.MeterGaugeRenderer; break;
|
||||
case "$.jqplot.PointLabels": val = $.jqplot.PointLabels; break;
|
||||
}
|
||||
}
|
||||
return val;
|
||||
}
|
||||
var JSONdata = '<%=safe.jsstring(JSON.stringify(graphInit))%>';
|
||||
var l_init = JSON.parse(JSONdata);
|
||||
var l_init = JSON.parse(JSONdata, json_reviver);
|
||||
|
||||
var JSONdata = '<%=safe.jsstring(JSON.stringify(graphAxes))%>';
|
||||
var l_axes = JSON.parse(JSONdata);
|
||||
@@ -324,6 +360,8 @@ function fac_usrrap_list_graph (model, scf_params)
|
||||
case 1: // BarChart
|
||||
%>
|
||||
var l_colors = (l_yas_count == 1?<%=S("udr_graph_colors1")%> : <%=S("udr_graph_colors2")%>);
|
||||
if (report_options.seriesColors && report_options.seriesColors.lenght > 0)
|
||||
l_colors = report_options.seriesColors;
|
||||
var effectivedata = l_arr_y;
|
||||
var props = { seriesDefaults:{ renderer: $.jqplot.BarRenderer
|
||||
, rendererOptions: { fillToZero: true }
|
||||
@@ -439,6 +477,8 @@ function fac_usrrap_list_graph (model, scf_params)
|
||||
l_labels.push(l_axes.yas[y].naam);
|
||||
}
|
||||
var l_colors = (l_yas_count == 1? <%=S("udr_graph_colors1")%> : <%=S("udr_graph_colors2")%>);
|
||||
if (report_options.seriesColors && report_options.seriesColors.lenght > 0)
|
||||
l_colors = report_options.seriesColors;
|
||||
var effectivedata = l_arr_y;
|
||||
var props = { seriesDefaults: { pointLabels: { show: true
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Context: Vanuit ELK asp bestand
|
||||
*/
|
||||
|
||||
var FCLTVersion="2020.1g";
|
||||
var FCLTVersion="2020.1h";
|
||||
var FCLTMinDatabaseSchema="38";
|
||||
|
||||
var custpath = rooturl + "/cust/" + customerId; // path to customer files
|
||||
|
||||
@@ -2649,7 +2649,7 @@ function CopyFlexFiles(pmodule, poldniveau, poldkey, pnewniveau, pnewkey, flexsq
|
||||
+ " AND c.fac_bijlagen_module = " + safe.quoted_sql(pmodule);
|
||||
if (filter.length)
|
||||
{
|
||||
sql_c += " AND c.fac_bijlagen_filename IN (" + safe.quoted_sql(filter.join(",")).replace(",","','") + ")";
|
||||
sql_c += " AND c.fac_bijlagen_filename IN (" + safe.quoted_sql(filter.join(",")).replace(/,/g,"','") + ")";
|
||||
}
|
||||
var oRs_c = Oracle.Execute(sql_c);
|
||||
while (!oRs_c.eof)
|
||||
|
||||
@@ -135,58 +135,38 @@ function ConnectorCls()
|
||||
{ // voorbeeld: "ftp://example.com/folder/"
|
||||
this.ConnectionType = CONNECTION_FTP;
|
||||
Log2File(2, "Creating ftp connector");
|
||||
//var about = new ActiveXObject("SLNKDWF.About");
|
||||
//Log2File(2, "Ge<47>nstalleerde SLNKDWF Versie: " + about.VersionString);
|
||||
//Log2File(2, about.All);
|
||||
var about = new ActiveXObject("SLNKDWF.About");
|
||||
Log2File(2, "Ge<47>nstalleerde SLNKDWF Versie: " + about.VersionString);
|
||||
Log2File(2, about.All);
|
||||
//
|
||||
var glob = new ActiveXObject("Chilkat_9_5_0.Global")
|
||||
var success = glob.UnlockBundle("Anything for 30-day trial")
|
||||
if (success != 1)
|
||||
throw { description: glob.LastErrorText };
|
||||
|
||||
this.ftpconnection = new ActiveXObject("Chilkat_9_5_0.Ftp2");
|
||||
this.ftpconnection = new ActiveXObject("SLNKDWF.FTP");
|
||||
this.ftpconnection.Hostname = URLParts.host;
|
||||
if (p_bedrijfadres.username) this.ftpconnection.Username = p_bedrijfadres.username;
|
||||
if (p_bedrijfadres.password) this.ftpconnection.Password = p_bedrijfadres.password;
|
||||
this.ftpconnection.Username = p_bedrijfadres.username;
|
||||
this.ftpconnection.Password = p_bedrijfadres.password;
|
||||
this.ftpconnection.Port = URLParts.port || 21;
|
||||
//this.ftpconnection.Passive = 1; //passive is de default en dat willen ze allemaal?
|
||||
//if (S("puo_useproxy"))
|
||||
{
|
||||
this.ftpconnection.ProxyHostname = "80.250.129.1" //S("puo_proxyserveripaddress");
|
||||
this.ftpconnection.ProxyPort = 21;
|
||||
this.ftpconnection.ProxyUsername = "dummy@example.com";
|
||||
//pMethod = ftp.DetermineProxyMethod(); // altijd -1/ failure
|
||||
//WScript.Echo( pMethod );
|
||||
this.ftpconnection.ProxyMethod = 2; // https://www.chilkatsoft.com/p/p_87.asp
|
||||
}
|
||||
//this.Subfolder = URLParts.directory;
|
||||
//this.ftpconnection.Flags = S("puo_connectionflag")||0;
|
||||
this.ftpconnection.Proxyname = (S("puo_useproxy") ? S("puo_proxyserveripaddress") : "");
|
||||
this.Subfolder = URLParts.directory;
|
||||
this.ftpconnection.Flags = S("puo_connectionflag")||0;
|
||||
//
|
||||
Log2File(2, "protocol: ftp");
|
||||
//Log2File(2, "FTPServer: " + this.ftpconnection.Hostname);
|
||||
//Log2File(2, "FTPPort: " + this.ftpconnection.Port);
|
||||
//Log2File(2, "FTPProxy: " + this.ftpconnection.Proxyname);
|
||||
//Log2File(2, "FTPDir: " + this.Subfolder);
|
||||
//Log2File(2, "Flags: " + this.ftpconnection.Flags);
|
||||
Log2File(2, "FTPServer: " + this.ftpconnection.Hostname);
|
||||
Log2File(2, "FTPPort: " + this.ftpconnection.Port);
|
||||
Log2File(2, "FTPProxy: " + this.ftpconnection.Proxyname);
|
||||
Log2File(2, "FTPDir: " + this.Subfolder);
|
||||
Log2File(2, "Flags: " + this.ftpconnection.Flags);
|
||||
//
|
||||
if (S("puo_lcl_friendly_ftp"))
|
||||
this.friendlyurl = S("puo_lcl_friendly_ftp").format(URLParts.host, URLParts.directory, URLParts.port);
|
||||
try
|
||||
{
|
||||
// Probeer nu de FTP verbinding tot stand te brengen.
|
||||
var success = this.ftpconnection.Connect();
|
||||
if (success != 1)
|
||||
throw { description: this.ftpconnection.LastErrorText };
|
||||
|
||||
this.ftpconnection.Open();
|
||||
// Change FTP dir
|
||||
if (URLParts.directory)
|
||||
{
|
||||
try
|
||||
{
|
||||
var success = this.ftpconnection.ChangeRemoteDir(URLParts.directory);
|
||||
if (success != 1)
|
||||
throw { description: this.ftpconnection.LastErrorText };
|
||||
|
||||
this.ftpconnection.SetCurrentDir(URLParts.directory);
|
||||
this.Connected = true;
|
||||
}
|
||||
catch(err)
|
||||
@@ -198,7 +178,6 @@ function ConnectorCls()
|
||||
{
|
||||
this.Connected = true;
|
||||
}
|
||||
Log2File(0, "Connected to: " + this.ftpconnection.GetCurrentRemoteDir());
|
||||
}
|
||||
catch(err)
|
||||
{
|
||||
@@ -304,7 +283,7 @@ function ConnectorCls()
|
||||
try
|
||||
{
|
||||
Log2File(2, "Disconnect");
|
||||
success = this.ftpconnection.Disconnect(); // Let op: effectief sluit deze alleen de SLNKDWF.FTP verbinding.
|
||||
this.ftpconnection.Close(); // Let op: effectief sluit deze alleen de SLNKDWF.FTP verbinding.
|
||||
this.Connected = false;
|
||||
}
|
||||
catch(err)
|
||||
|
||||
@@ -20,18 +20,14 @@ function sendFTP(p_connect, p_file, p_data, p_path)
|
||||
{
|
||||
objFile = objFso.GetFile(p_path);
|
||||
Log2File(1, "Transfer file: " + p_file + " (size: " + objFile.Size + ")");
|
||||
var success = p_connect.ftpconnection.PutFile(p_path, p_file); // Hiermee kunnen ook binary bestanden gekopieerd worden.
|
||||
if (success != 1)
|
||||
throw { description: p_connect.ftpconnection.LastErrorText };
|
||||
p_connect.ftpconnection.PutFile(p_file, p_path); // Hiermee kunnen ook binary bestanden gekopieerd worden.
|
||||
}
|
||||
else
|
||||
{ // Forceer p_data altijd naar utf-8
|
||||
var tempfile = "../../../temp/puo_" + objFso.GetTempName();
|
||||
p_data.SaveToFile(tempfile);
|
||||
Log2File(1, "Transfer data as file: " + p_file + " (size: " + p_data.Size + ")");
|
||||
var success = p_connect.ftpconnection.PutFile(tempfile, p_file); // Hiermee kunnen ook binary bestanden gekopieerd worden.
|
||||
if (success != 1)
|
||||
throw { description: p_connect.ftpconnection.LastErrorText };
|
||||
p_connect.ftpconnection.PutFile(p_file, tempfile); // Hiermee kunnen ook binary bestanden gekopieerd worden.
|
||||
if (S("puo_loglevel") < 4)
|
||||
objFso.DeleteFile(tempfile);
|
||||
// schrijft geen utf-8
|
||||
|
||||
Reference in New Issue
Block a user