This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>sFTP</h1> | |
{# Using RSA key, or stop after 22 (port number) and enter password before port number argument #} | |
{% set sftp = api.IO_sftpClient('10.100.92.34', 'sftp_user_account', '', 22, '-----BEGIN RSA PRIVATE KEY----- | |
MIICWgIBAAKBgQCeYa9kXyHDER1ZOsdlDdcTTXH8H00g1ajIHsS++LfWUyTyFQod | |
IBJQKBmSoNrEc8aDsZ4G2TwKAM7riJj4uRdHsMJwPkHlqgQkEhODwlXpmslQ1Cfw | |
... | |
... | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>ZIP, check static map</h1> | |
{% set zip = api.IO_staticFile('sample.zip').get() %} | |
{% for file in api.IO_readZip(zip, true) %} | |
{% do api.IO_staticFile('unpack/' ~ file.name).set(file.data) %} | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>{{ 'Form Validation Sample'|t }}</h1> | |
{% set v = validate | |
.requireToken | |
.setRetention(3) | |
.preventDuplicate() | |
.setId('TESTFRM') | |
.setType('post') | |
.field('Tx', [ 'minlength(10)','isempty' ], 'Geef een toelichting op van minimaal 10 karakters of laat leeg.'|t ) | |
.field('captcha', 'captcha', 'Valideer de reCAPTCHA'|t ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Captcha</h1> | |
{{ param.post|pre }} | |
{{ validate.checkCaptcha|pre }} | |
<form method="post" action="{{ index }}"> | |
{{ validate.getCaptcha()|raw }} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Doc 2 HTML</h1> | |
{#{% set file = api.IO_staticFile('test/Projectplan_iPublications_Cron.pdf').get() %}#} | |
{% set url = 'http://vinkhuiswerk.nl/wp-content/uploads/2012/02/AlgemeneVoorwaarden-2014-2015.docx' %} | |
{{ url|pre }} | |
{% set file = api.HttpReader_Get(url) %} | |
{{file|pre}} | |
{% set dummy = api.Document_toHtml(file, false, false, true, baselocation~'static') %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Dom</h1> | |
{% set data = api.HttpReader_Get('https://www.simplicate.nl/') %} | |
{{ (data|dom_body).find('div.home-links')[0]|raw }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Simplicate API</h1> | |
{% set data = api.Simplicate_V2.crm('organization', { | |
fields : 'name', | |
q : '*ipub*', | |
offset : 0, | |
limit : 10, | |
sort : '-name' | |
}).get %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>FTP ISM</h1> | |
{% set ftp = api.IO_ftpClient('test.nl', 'User123', 'Passw5=Y', 21, false, 4).utf8(true).pasv(true) %} | |
{{ ftp.dir('/Handleidingen/')|pre }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>PDF Tests</h1> | |
{% set pdf1 = api.PDF_generate('test', 'generated.pdf', 'landscape', { naam: "Wietse" }) %} | |
{% set pdf2 = api.PDF_generate('<b>Hoi!</b> Werkt het?', 'generated-inline.pdf') %} | |
Filename: <b>{{ pdf1.name }}</b><br /> | |
Filelength: <b>{{ pdf1.data|length }}</b><br /> | |
{% do api.IO_staticFile( pdf1.name ).set( pdf1.data ) %} | |
{% do api.IO_staticFile( pdf2.name ).set( pdf2.data ) %} |