<?
//***************************************************
// 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 Sosial Media ... </h2>
<?
switch($page) {
	default :
	$db->select("bisnis, facebook, twitter, linkedin, googleplus, instagram, skype", "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=setsosmed&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 Sosial Media 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 />

  <!-- SOSIAL MEDIA -->
  <table width="70%" border="0" align="center" cellpadding="4" cellspacing="1">
    <!-- ***************************************************************** -->
    <tr class="tbl_header">
        <td colspan="2" style=""><center>Pengaturan Sosial Media</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">Facebook :</td>
      <td><input name="facebook" type="text" id="facebook" value="<?= $db->result(0, "facebook"); ?>" size="75" maxlength="150" /></td>
    </tr>
    <tr>
      <td align="right" valign="top">Twitter :</td>
      <td><input name="twitter" type="text" id="twitter" value="<?= $db->result(0, "twitter"); ?>" size="75" maxlength="150" /></td>
    </tr>
    <tr>
      <td align="right" valign="top">Linkedin :</td>
      <td><input name="linkedin" type="text" id="linkedin" value="<?= $db->result(0, "linkedin"); ?>" size="75" maxlength="150" /></td>
    </tr>
    <tr>
      <td align="right" valign="top">Google Plus :</td>
      <td><input name="googleplus" type="text" id="googleplus" value="<?= $db->result(0, "googleplus"); ?>" size="75" maxlength="150" /></td>
    </tr>
    <tr>
      <td align="right" valign="top">Instagram :</td>
      <td><input name="instagram" type="text" id="instagram" value="<?= $db->result(0, "instagram"); ?>" size="75" maxlength="150" /></td>
    </tr>
    <tr>
      <td align="right" valign="top">Skype :</td>
      <td><input name="skype" type="text" id="skype" value="<?= $db->result(0, "skype"); ?>" size="75" maxlength="150" /><br /><br />

          <font color="#0000ff"><strong>Keterangan : </strong><br />isi url sosial media dengan url yang lengkap (gunakan http://).<br />
              sosial media nantinya akan muncul di bagian atas halaman website.
          </font>

      </td>
    </tr>


    <tr>
      <td align="right" valign="top"></td>
      <td><u>Tampil disini :</u> <br /><br /><a href="../images/ketadminsosmed.jpg" target="_blank"><img class="img-responsive" src="../images/ketadminsosmed.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;

        // SOSIAL MEDIA
	case submit :
            

                $db->update("setting", "facebook='$facebook', twitter='$twitter', linkedin='$linkedin', googleplus='$googleplus', instagram='$instagram', skype='$skype'", "id='$no'");
                echo "<meta http-equiv='refresh' content='0;URL=?m=setsosmed&act=1'>";
                break;
                


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