<?
//***************************************************
// http://www.scriptindonesia.com
// Solusi Hemat Script Bisnis Online Anda
// Menerima Jasa Pembuatan Website & Template Website
//***************************************************
?>
<?
//Edit Script AW 20160221
//if (session_is_registered("valid_admin")) {
  if (isset($_SESSION['valid_admin'])) {
?>
<h2><img src="images/icon-48-article.png" width="48" height="48" align="absmiddle"> Setting Pengunjung ... </h2>
<?
switch($page) {
	default :
	$db->select("bisnis, histat", "setting", "id=1");
	if($act == 1 or $act) {
?>
<div id="notice" align="center"><img src="images/notice-info.png" width="29" height="29" align="absmiddle" /><br />Data telah berhasil diupdate !</div>
	<?
	}
	?>
<form id="form2" name="form2" method="post" action="?m=setvisitor&amp;page=submit" enctype="multipart/form-data">

<table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#bfd6ed">
  <tr>
    <td width="100%" height="2" bgcolor="#cccccc">
    </td>
  </tr>
</table>

<table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#bfd6ed">
  <tr>
    <td width="100%" height="2" bgcolor="#cccccc">
        <!-- ------------------------------------- -->
        <div id="menu_button2" align="center">
            <strong><?= $db->config("bank2") ?></strong>
        </div>
        <!-- ------------------------------------- -->
    </td>
  </tr>
</table>

<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
  <tr>
    <td height="30" bgcolor="#8c759a"><div align="center"><span class="title">&nbsp;&nbsp;<strong><u>Setting Pengunjung Website</u></strong><u></u></span></div></td>
  </tr>
  <tr>
    <td width="956" bgcolor="#EF9400"><img src="../images/px1.gif" width="1" height="1" alt="" border="0"></td>
  </tr>
</table>

  <br />

  <!-- PENGUNJUNG -->
  <table width="70%" border="0" align="center" cellpadding="4" cellspacing="1">
    <!-- ***************************************************************** -->
    <tr class="tbl_header">
        <td colspan="2" style=""><center>Pengaturan Pengunjung</center></td>
    </tr>
    <tr>
      <td width="45%" align="right" valign="top">Bisnis :</td>
      <td><?= $db->result(0, "bisnis"); ?><br />
      <input name="no" type="hidden" id="no" value="1" size="10" /></td>
    </tr>
    <tr>
      <td align="right" valign="top">Kode Pengunjung :</td>
      <td><textarea name="histat" cols="60" rows="15" id="histat"><?= $db->result(0, "histat"); ?></textarea><br /><br />

          <font color="#0000ff"><strong>Keterangan : </strong><br />kode pengunjung menggunakan kode histat, kunjungi <a href="http://www.histats.com" target="_blank">www.histats.com</a> untuk mendapatkan kode/scriptnya.<br /><br />
              kode pengunjung atau visitor nantinya akan muncul di bagian footer halaman website.
          </font>

      </td>
    </tr>

    <tr>
      <td align="right" valign="top"></td>
      <td><u>Tampil disini :</u> <br /><br /><a href="../images/ketadminvisitor.jpg" target="_blank"><img class="img-responsive" src="../images/ketadminvisitor.jpg" width='442' height='139' title='klik untuk memperbesar' /></a><br /><br /></td>
    </tr>

<!-- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->

      <tr>
        <td valign="top">&nbsp;</td>
        <td align="left">&nbsp;</td>
      </tr>

      <tr>
        <td valign="top">&nbsp;</td>
        <td align="left">&nbsp;-------------------------------------------------------</td>
      </tr>

      <tr>
        <td valign="top">&nbsp;</td>
        <td align="left" class="bingkai-ket">
           <br />
           <label>
           <input name="Submit" type="submit" class="button"  value="SAVE" />
           </label>
           <label>
           <input type="button" name="cancel" id="cancel" value="CANCEL" onclick="javascript:history.go(-1)" class="cancelbutton" />
           </label>
           <br /><br />
        </td>
      </tr>

      <tr>
        <td valign="top">&nbsp;</td>
        <td align="left">&nbsp;-------------------------------------------------------</td>
      </tr>

    <!-- ***************************************************************** -->

  <tr><td colspan="2"><hr /></td></tr>
    
  </table>
</form>
<!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx- -->







<p>&nbsp;</p>
<?
	break;

        // PENGUNJUNG
	case submit :
            
                $histat = trim($histat);
                $db->update("setting", "histat='".mysql_real_escape_string($histat)."'", "id='$no'");
              //$db->update("setting", "histat='$histat'", "id='$no'");
                echo "<meta http-equiv='refresh' content='0;URL=?m=setvisitor&act=1'>";
                break;
                


}
?>	
<?
} else {
echo "<meta http-equiv=\"refresh\" content=\"1; url=illegal.html\">";
}
?>