Example #1
0
			<td><select name="language"><?php 
echo pdf24Plugin_getLangOptions();
?>
</select></td>
		</tr>
		<tr>
			<td class="tr1">Availability:</td>
			<td><select name="availability">
				<option value="public">For all visitors</option>
				<option value="private">Only for logged in users</option>
			</select></td>
		</tr>
		<tr>
			<td class="tr1">Debug outputs:</td>
			<td><input type="checkbox" name="debug" <?php 
echo pdf24Plugin_isDebug() ? 'checked' : '';
?>
</td>
		</tr>
		</table>
	</div>
	<div>
		<h3>Document Options</h3>
		<div class="descr">Options for created PDF documents.</div>
		<table>
		<tr>
			<td class="tr1">Customize options</td>
			<td><input type="checkbox" name="docOptionsInUse" <?php 
echo pdf24Plugin_isDocOptionsInUse() ? 'checked' : '';
?>
 onclick="pdf24_showHideCheck('docOptions', this);" /></td>
Example #2
0
function pdf24Plugin_parseTplContent($postsArr, $tpl, $styleId, $searchReplace = null)
{
    global $pdf24Plugin;
    if (count($postsArr) == 0) {
        return '';
    }
    $blInfo = pdf24Plugin_getBLInfo();
    list($blText, $blUrl) = $blInfo;
    $hiddenFilds = pdf24Plugin_getBlogHiddenFields(count($postsArr));
    foreach ($postsArr as $key => $val) {
        $hiddenFilds .= pdf24Plugin_getFormHiddenFields($val, '', '_' . $key);
    }
    $tpl = file_get_contents(pdf24Plugin_getFile('tpl', $tpl));
    $search = array('{styleId}', '{formId}', '{actionUrl}', '{hiddenFields}', '{blText}', '{blUrl}', '{pluginUrl}', '{targetName}', '{openTargetCode}');
    $replace = array($styleId, pdf24Plugin_nextFormId(), $pdf24Plugin['serviceUrl'], $hiddenFilds, $blText, $blUrl, $pdf24Plugin['url'], $pdf24Plugin['targetName'], $pdf24Plugin['jsOpenTargetWin']);
    $content = str_replace($search, $replace, $tpl);
    $content = pdf24Plugin_replaceLang($content, count($postsArr), $searchReplace);
    if ($searchReplace != null && is_array($searchReplace)) {
        $content = str_replace(array_keys($searchReplace), array_values($searchReplace), $content);
    }
    if (!pdf24Plugin_isDebug()) {
        $content = str_replace(array("\r\n", "\n"), ' ', $content);
    }
    return $content;
}