<?
//***************************************************
// 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"> Logo Bank ... </h2>
<?
switch($page) {
	default :
	if($act == 1 or $act) {
?>
<div id="notice" align="center"><img src="images/notice-info.png" width="29" height="29" align="absmiddle" /><br />Logo telah berhasil diupdate !<br />Tekan F5 untuk melihat perubahan</div>
	<?
	}
	?>
<form id="form2" name="form2" method="post" action="?m=setbank4&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 Logo Bank</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 />

  <!-- LOGO -->
  <table width="70%" border="0" align="center" cellpadding="4" cellspacing="1">
    <!-- ***************************************************************** -->
    <tr class="tbl_header">
        <td colspan="2" style=""><center>Pengaturan Logo Bank</center></td>
    </tr>
    <tr> 
      <td width="45%" align="right" valign="top">&nbsp;</td>
      <td>&nbsp;<br /></td>
    </tr>

<!-- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
    <tr>
      <? $foto = "rekbank4.jpg";  ?>
      <td width="45%" align="right" valign="top">Logo Bank :</td>
      <td>
                      <label>
                      <?
		  	if($foto <> "") {
                      ?>
                      <img class="img-responsive" src="../member/logo/<?= $foto; ?>" alt="<?= $judul; ?>" width='206' height='62' /><br />
                      <?
                        }
                      ?>
                      <input name="img1" type="file" id="img1" size="20" class="form" />
                      </label>
                      <input name="foto" type="hidden" class="form" id="foto" value="<?= $foto; ?>" size="12" />          
      </td>
      </tr>

      <tr>
        <td valign="top">&nbsp;</td>
        <td align="left"><div align="left" class="style1 style13">Upload
                      gambar logo bank anda<br>
                      Ukuran maksimal 100KB, dimensi lebar maksimal 261 x 85 pixels.
        </div></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- -->

<center><a href="?m=configuration"><input type='button' name='backset' id='backset' value=' Kembali Ke Setting Pengelola Website  ' class='tombol' /></a></center>




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

        // LOGO
	case submit :
            function getFileExtension($filename){
            return substr($filename, strrpos($filename, '.'));
            }

            if(getFileExtension($img1_name) == ".php" or getFileExtension($img1_name) == ".PHP" or getFileExtension($img1_name) == ".php4" or getFileExtension($img1_name) == ".PHP4" or getFileExtension($img1_name) == ".php5" or getFileExtension($img1_name) == ".PHP5" or getFileExtension($img1_name) == ".exe" or getFileExtension($img1_name) == ".EXE "or getFileExtension($img1_name) == ".htm" or getFileExtension($img1_name) == ".HTM" or getFileExtension($img1_name) == ".html" or getFileExtension($img1_name) == ".HTML" or getFileExtension($img1_name) == ".bat" or getFileExtension($img1_name) == ".BAT") {
                echo "<p>&nbsp;</p><p align=center style='color:red'><b>File harus berupa file image (jpg, gif atau png)</b></p>";

	} else {
	//---------upload foto logo
		if($img1 <> "") {
			$img1_name="rekbank4.jpg";
                        $foto = $img1_name;
			$file = "../member/logo/$img1_name";
			@copy("$img1" , $file);
		} else {
                        //$foto = $foto2;
		}

                echo "<meta http-equiv='refresh' content='0;URL=?m=setbank4&act=1'>";
                break;
                }


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