Content-type (WBIK)

Formßt bloku:

Content-type: v²raz_typu_string

P°φkaz umo₧nφ zm∞nit MIME type sestavovanΘho dokumentu ze standardnφho "text/html" na jin² (nap°. "text/plain" apod.). èablona nßle₧ejφcφ ke konektoru, kter² m∞nφ typ dokumentu, musφ b²t vytvo°ena ve struktu°e zvolenΘho typu.

P°φkaz se pou₧ije nap°φklad v t∞chto situacφch:

Chovßnφ browser∙ v p°φpad∞ jinΘho typu ne₧ "text/html" je velmi individußlnφ a znaΦn∞ se liÜφ i mezi verzemi tΘ₧e znaΦky.

P°φklad:

Export v²sledku statistiky e-Shopu v CSV, pro formßtovßnφ v²stupu je zapot°ebφ nastavit typ a p°esn∞ pracovat s konci °ßdk∙:

<%WBC%>
// export v²sledku statistiky Obraty v Φase v CSV
RequiredValues: interval ord ds typ obch pocet

Content-type: "text/plain; charset=windows-1250"
IgnoreBlanks: all

DeclareVariable: podmstr:String[250]=""

SQLStatement: 
+ CALL Podminka_cas(%interval%,%pocet%,%ds%,%typ%,%obch%,:>podmstr)

SQLStatement: PoSkupinach
#if interval=1
+SELECT Date2str(OH.datum,1) AS dat,
+ SUM(OH.sum_obj) AS bezdph, COUNT(OH.id_dobj) AS pocet_obj, SUM(OH.k_uhrade) AS sdph, OH.datum
+ FROM Obj_header AS OH, Obchodni_partneri AS OP
+ WHERE %podmstr%
+ GROUP BY OH.datum
#endif
#if interval=2
+ SELECT Int2str(Month(OH.datum))||"_"||Int2str(Year(OH.datum)) AS dat,
+ SUM(OH.sum_obj) AS bezdph, COUNT(OH.id_dobj) AS pocet_obj, SUM(OH.k_uhrade) AS sdph, OH.datum
+ FROM Obj_header AS OH, Obchodni_partneri AS OP
+ WHERE %podmstr%
+ GROUP BY Month(OH.datum)
#endif
#if ord=1
+ ORDER BY datum 
#endif
#if ord=2
+ ORDER BY sdph DESC
#endif
<%/WBC%>

<%if parametry.exp_firstline%>
<%if interval="1"%>Dny<%elseif interval="2"%>Mesice<%endif%>,Pocet_obj,Objem_bez_dane,Objem_s_dani<%#13#10%>
<%endif%>

<%begindetail PoSkupinach%>
<%dat%>,<%pocet_obj%>,<%bezdph;-101%>,<%sdph;-101%><%#13#10%>
<%enddetail%>