/** * Saves a code snippet to the config. * * @author Johannes Klose <*****@*****.**> * @param string $snippetName Name of the code snippet * @return void **/ function saveCodeSnippet($snippetName) { $tpl =& singleton('template'); $snippetCode = isset($this->post['snippet_code']) ? $this->post['snippet_code'] : html_entities_decode($this->cfgSnippets[$snippetName]['code']); $this->setConfigItem('code_snippets', $snippetName, $snippetCode); $this->rewriteConfig(); $tpl->assign('isMessage', true); $tpl->assign('message', $this->lang['admin_snippet_updated']); }
function html_entities_decode($str) { if (is_array($str)) { foreach ($str as $key => $val) { $str[$key] = html_entities_decode($val); } } else { $str = html_entity_decode($str, ENT_QUOTES | ENT_IGNORE, "UTF-8"); } return $str; }
<img src="<?php echo $r['gambar']; ?> " alt=""> </span> <div class="right"> <a href="?p=newsdetail&id=<?php echo $r['id']; ?> "><?php echo $r['judul']; ?> </a> <span class="summary"> <?php echo getExcerpt(html_entities_decode($r['content']), 50); ?> </span> <small><?php echo showDateTime($r['createdate']); ?> </small> </div> <div class="clr"></div> </div> <?php } } ?>
} $ids = $_GET['id']; if ($ids != '') { $resQry = "SELECT * FROM artikel\n\t\tWHERE id='" . $ids . "'"; $results = mysql_query($resQry); $countResults = mysql_num_rows($results); if ($countResults > 0) { $r = mysql_fetch_array($results); ?> <h2><?php echo $r['judul']; ?> </h2><hr> <p> <div class="boxNewsDetail clr"> <?php echo html_entities_decode($r['content']); ?> </span> <small><?php echo showDateTime($r['createdate']); ?> </small> <div class="clr"></div> </div> </p><br> <a href="?p=news" class="button">Kembali ke Artikel</a> <?php } }
</tr> <tr> <td valign="middle">Gambar Produk</td> <td valign="middle">:</td> <td valign="middle"><span style="float:left; margin-right:20px;"><img src="../<?php echo $r['gambar']; ?> " alt=""></span> <input type="file" name="upload" id="upload" /> <small>Ukuran 1000x600 px</small></td> </tr> <tr> <td valign="top">Keterangan Lengkap</td> <td valign="top">:</td> <td><textarea name="keterangan_lengkap" class="input required" id="keterangan_lengkap"><?php echo html_entities_decode($r['keterangan_lengkap']); ?> </textarea></td> </tr> <tr> <td>Status</td> <td>:</td> <td><input name="status" type="radio" id="radio" value="1" <?php echo $r['status'] == '1' ? 'checked="checked"' : ''; ?> /> Publish <input type="radio" name="status" id="radio2" value="0" <?php echo $r['status'] == '0' ? 'checked="checked"' : ''; ?> />