<?
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
//***************************************************
// http://www.scriptindonesia.com
// Solusi Hemat Script Bisnis Online Anda
// Menerima Jasa Pembuatan Website & Template Website
//***************************************************
?>

<!-- TESTIMONI AWAL -->
<!-- Info WebPro -->
<? include "infowebpro.php"; ?>

<h6><font color="#549423">Home / Testimoni Anda</font><br />
Anda telah login sebanyak : <font color="#0000FF"><?= $a[counter];?></font> kali</h6>
<hr />
<h3><font color="#FF0000">Testimoni Anda</font></h3>
<h5><strong><?= $panggil ?> <font color="#0000FF"><?= $a[nama];?></font></strong> Yth,<br>
    Halaman ini untuk memberikan testimoni Anda di <font color="#0000FF"><?= $_SESSION[user_domain] ?></font></h5>
<hr />

                    <div class="progress">
                        <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;">
                            <span><?= $a[nama];?> - <?= $a[kota];?> - <?= $a[propinsi];?></span>
                        </div>
                    </div>

<!-- /. ROW  -->
<?php
function anti_injection($data){
  $filter = mysql_real_escape_string(stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES))));
  return $filter;
}

$sql  = mysql_query("SELECT * FROM member WHERE email='$_SESSION[user_email]' LIMIT 1");
$r    = mysql_fetch_array($sql);
?>

<? //AW1
switch ($page) {
	default :
?>

<script language='javascript'>

//angka saja
function validAngka(a)
{
//	if(!/^[0-9.]+$/.test(a.value))
        if(!/^[0-9.+/-]+$/.test(a.value))
	{
	a.value = a.value.substring(0,a.value.length-1000);
	}
}

</script>

               <div class="row">
                <div class="col-md-12">
                    <!-- Form Elements -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Testimoni Anda :
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-md-6">
                                    <form role="form" method="post" action="?m=testimoni&page=update">

                                        <div class="form-group">
                                            <label>Tulis Testimoni : <font color="#FF0000">*</font></label>
                                            <textarea class="form-control" placeholder="Masukkan testimoni anda" rows="3" name="hubungan" id="hubungan" maxlength="200"><?= $r[hubungan];?></textarea>
                                        </div>

                                        <input name="submit" type="submit" class="btn btn-danger" value="Update Sekarang">
                                    </form>

        <? // AW2
	break;
	case update :

        $hubungan  = anti_injection($_POST['hubungan']);
/*
        if($hubungan ==''){
           echo "Testimoni tidak boleh kosong!. <br><a href=javascript:history.go(-1)>klik disini</a> untuk kembali";
           break;
        }
*/
        mysql_query("UPDATE member SET hubungan=trim('$hubungan') WHERE email='$_SESSION[user_email]' ");

?>

                        <h3>Edit Testimoni Berhasil</h3>
                        Data testimoni Anda telah berhasil diupdate !<br><br>
                        <a href="?m=testimoni" class="btn btn-danger">Lihat Testimoni Kembali</a>

<? // AW3
	break;
}
?>

                                </div>
                            </div>

                            <hr>
                            Terima Kasih<br />

                            <div class="bingkai-foto-8lg">
                                 <center>
                                     <img src="../images/logo.png" alt="<?= $_SESSION[user_domain] ?>" title="<?= $_SESSION[user_domain] ?> - <?= $_SESSION[user_caption] ?>">
                                 </center>
                            </div>

                            <!--<img src="../images/logo.png" border="1"><br />-->
                            <a href="http://<?= $_SESSION[user_domain] ?>/<?= $_SESSION[user_session] ?>" target="_blank"><font color="#0000FF"><?= $_SESSION[user_domain] ?></font></a><br>
                            Email : <a href="mailto:<?= $_SESSION[admin_email] ?>"><font color="#0000FF"><?= $_SESSION[admin_email] ?></font></a><br><br>
                            Web Support Bisnis Team <font color=#0000ff><?= $_SESSION[user_title1] ?> <?= $_SESSION[user_title2] ?></font><br />
                            <?= $_SESSION[user_caption] ?><br />
                            design website by <a href="http://www.<?= $set_develop ?>/" target="_blank"><font color="#ff6700">www.<?= $set_develop ?></font></a><br /><br />

                        </div>
                    </div>
                     <!-- End Form Elements -->
                </div>
            </div>