CMS  Version 3.9
snippet_panel.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::using("html_editor");
3 
4 $snippet_id = checkNumeric($_GET["snippet_id"]);
5 
6 if ($snippet_id)
7 {
9 ?>
10  <p><?echo $snippet->description?></p>
11  <div class='snippet_preview'>
12  <?echo $snippet->snippet?>
13  </div>
14  <?
16  ?>
17  <a class='button' href='#' onclick='new SnippetManager().insertSnippet(<?echo $snippet_id?>); return false;'>Insert Snippet</a>&nbsp;&nbsp;
18  <a class='button' href='#' onclick='new SnippetManager().showSnippetDialog(<?echo $snippet_id?>); return false;'>Edit Snippet</a>&nbsp;&nbsp;
19  <a class='button' href='#' onclick='new SnippetManager().showSnippetDialog(); return false;'>Create a New Snippet</a>&nbsp;&nbsp;
20  <a class='button' href='#' onclick='new SnippetManager().hide(); return false;'>Cancel</a>
21 <?
22 }
23 else
24 {
25 ?>
26 <p>Create or select a snippet to continue</p>
27 <div class='snippet_preview'></div>
28 <a class='button' href='#' onclick='new SnippetManager().showSnippetDialog(); return false;'>Create a New Snippet</a>&nbsp;&nbsp;
29 <a class='button' href='#' onclick='new SnippetManager().hide(); return false;'>Cancel</a>
30 <?
31 }
& nbsp
Definition: index.inc:49
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
static formatSnippetParameters($snippet)
$forumRequest to
$snippet
Definition: snippet.inc:7
$snippet_id