Kamis, 30 Juni 2016

LaRAVEL 5 CRUD GENERATOR WITH BUBBLE GENERATOR

What is BubbleGenerator?

BubbleGenerator is a system that helps us when creating a project, this system is Generator CRUD laravel that will certainly help us in making crud we do not need to create the user again with bubblegenerator we just need to choose the table we generate, not jga only that here there The new system table, where we can directly create tables.

Check out the bubble generator itself like this:

LARAVEL 5 CRUD GENERATOR WITH BUBBLEGENERATOR

Display after successfully create a CRUD

BubbleGenerator supports uses:

  • Datatable
  • Multiple Delete Data
  • Bootstrap
  • Reload Realtime Data
  • Laravel 5.2

How To Use BubbleGenerator

1. Install BubbleGenerator

"bubblegenerator/generator": "dev-master"
2. Add Class Provider in App.php 
BubbleGenerator\Generator\BubbleGeneratorServiceProvider::class,
Yajra\Datatables\DatatablesServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
3. Open the CMD, and then type the command 
php artisan vendor:publish

4. Add this code in composer.json precisely in psr-4 
"files":[
      "app/Helpers/CreateFile.php",
      "app/Helpers/CreateFileNewTable.php"
]
5. Add this code in app.php precisely in class aliases 
'CreateFile' => App\Helpers\CreateFile::class,
'CreateFileNewTable' => App\Helpers\CreateFileNewTable::class,
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
6. Then open cmd re-type the command 
composer dump-autoload

7. Go to the URL to make CRUD ie /bubblegenerator 

LaRAVEL 5 CRUD GENERATOR WITH BUBBLE GENERATOR
8. If at the time of making an error CRUD / not found open CMD and then type the command 
php artisan route:cache
php artisan config:cache
php artisan view:clear

9. Good luck may be a blessing for all of us and helpful to me and you all

Terms and Conditions

For terms and conditions of your project should be installed 3 packages below, if you follow the tutorial above you no longer need to install the package below, because I have installed bubblegenerator. 

1. yajra datatable

Yajra DataTable is working to create a DataTable server side, for that you can visit the site directly. Yajra Datatable

2. laravel collective

This Laravelcollective activating html blade in laravel, for that you can visit his site directly. Laravel Collective

3. Laravel 5.0 up

To use this minimal laravel BubbleGenerator should be used is 5.0 up to 4 laravel my taste can not but I have not tried Laravel

Note :

For those of you who use Ubuntu OS when when using this package there is a problem you try to change the project into a 777 permissions, because this bubblegenerator need access to create a folder / file.

BubbleGenerator still in beta, more needs to be repaired or added features such as relationships, then primaryKey etc., it will hasten to add but not for the time being, @dhamdani666 will update continuously to the generator because the generator is I believe will help us when creating a project.

CaRa MEMBUAT XML SITEMAP DINAMIS DI Framework CODEIGNITER "Free Script Gratis"

Sitemap adalah salah satu langkah yang digunakan oleh webmaster atau pengembang aplikasi berbasis web untuk memberitahu atau menginformasikan mesin pencari seperti Google tentang halaman yang telah dibuat untuk mengeksplorasi atau indeks. Cukup, sitemap memberitahu Anda jika kami harus menulis sesuatu di web atau blog. Sitemap berisi daftar yang ada alamat url pada web dengan metadata tentang artikel ketika itu dibuat, seberapa sering diperbarui artikel, bagaimana menulis penting adalah untuk mengeksplorasi dan lain-lain.

Pertanyaannya adalah, Bagaimana jika kita mengirimkan sitemap pasti dalam pencarian atau merangkak oleh mesin pencari seperti Google? Hmhmhmm Jawaban yang benar menurut saya adalah Ya, tapi harus menunggu dengan sabar ketika kita dijelajahi oleh Google. Dalam pengalaman saya, saya sudah mengirimkan sitemap melalui Google Webmaster Tools, tetapi tidak semua url yang saya kirimkan di index oleh google, namun secara bertahap semua indeks. Intinya harus bersabar. Ini adalah screenshot saya ambil dari Google Webmaster Tools dari beberapa blog saya. Ada semua untuk indeks dan ada bagian baru.

CaRa MEMBUAT XML SITEMAP DINAMIS DI CODEIGNITER "Free Script Gratis"

Contoh Sitemap – Index Google 1

CaRa MEMBUAT XML SITEMAP DINAMIS DI CODEIGNITER "Free Script Gratis"

Contoh Sitemap – Index Google 2

Pentingkah sitemap dibangun? Jawabannya Sangat Penting. Tentunya, jika kita membuat sesuatu pasti ingin diketahui oleh banyak orang karena memang tujuan kita menulis atau mengembangkan aplikasi untuk membantu orang yang ada disekeliling kita. Terus, bagaimana cara membuat sitemap kalau saya tidak menggunakan CMS seperti WordPress, Drupal atau Blogspot? Itu dia pertanyaan yang bagus. Kebetulan web saya ini dibuat menggunakan framework php - Codeigniter, jadi kali ini saya akan share Cara Membuat XML Sitemap Dinamis di Codeigniter.

PERTAMA YANG KITA LAKUKAN IALAH BUAT MODELNYA :

  • Buat file dengan nama url_model.php di folder application/models.
  • Memanggil data dari database
<?php
 
class Url_model extends CI_Model{
 
  public function __construct(){
  $this->load->database();
  }
  public function getURLS(){
 
  $query=$this->db->order_by("id_artikel","DESC")->get("artikel");
  return $query->result_array();
  }
}
?>

MEMBUAT CONTROLLER UNTUK SITEMAP. 

  • Buat file dengan nama sitemap.php di folder application/controllers.
  • Memanggil data dari model dan menampilkannya di view
<?php
 
Class Sitemap extends CI_Controller {
 
  public function __construct(){
  parent::__construct();
  $this->load->model('url_model');
  }
 
  function sitemap()
  {
 
  $data['urlslist'] = $this->url_model->getURLS();
  $this->load->view("sitemap_view",$data);
  }
}
 
?>

MEMBUAT VIEW TO sitemap 

  • Buat file dengan nama sitemap_view.php di folder application/views.
  • Menampilkan data dalam format XML
<?php header('Content-type: application/xml; charset="ISO-8859-1"',true);  ?>
 
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
  <loc><?php echo base_url();?></loc>
  <priority>1.0</priority>
  </url>

  <?php foreach($urlslist as $url) { ?>
  <url>
  <loc><?php echo base_url()."blog/baca/".$url['id_artikel']?></loc>
  <priority>0.5</priority>
  </url>
  <?php } ?>
 
</urlset>

Sekarang anda bisa coba melihat hasilnya di http://website-anda.com/sitemap 

EDIT ROUTES.PHP

  • Buka routes.php di folder application/config.
  • Tambahkan baris brikut ke routes
 

$route['sitemap\.xml'] = "sitemap";

Tujuan dari menambahkan baris tersebut adalah agar kita bisa mengakses sitemapnya menjadi
http://website-anda.com/sitemap.xml (XML)

FREE SourCe CODE DOWNLOAD CONTOH APLIKASI PENJUALAN MOBILDengan PHP & MYSQL

Hari ini saya akan berbagi sebuah aplikasi yang aplikasi situs kredit kendaraan mobil. Aplikasi ini dibuat menggunakan PHP dan MySql cukup banyak dicari orang, terutama smk siswa / mahasiswa. Meskipun zoom masih sederhana tapi sistem yang ada dalam aplikasi website ini akan sangat berguna bagi sobat yang perlu mempelajari bahan-bahan seperti ujian sekolah dll Buddy juga bisa mengembangkannya.

Modul:

1. Log beberapa pengguna
Laporan Laporan / transaksi 2. Cetak atau diekspor ke Excel
3. CRUD mobil, pelanggan, pengguna
4. Proses membeli tunai atau keredit
5. Form mencari merek mobil
6. Pagging
Tabel 7. korslet

Database:


Okay for those who want to see "or try it please

Password  ibacor.com

Source: ibacor.com

Dituduh Cubit Murid, Guru Ini Menangis Diruang Sidang

SIDOARJO ~ Kasus ini benar-benar menyita perhatian masyarakat Indonesia. Bagaimana tidak diruang persidangan duduklah sorang Guru yang mempunyai julukan Pahlawan Tanpa Tanda jasa yang sedang menangis dan menunduk pasi. 

Bukan karena sebab, Muhammad Samhudi sambil menunduk lemas ia hanya bisa pasrah dengan keputusan hakim.

Yang lebih merinding banyak dukungan para guru yang memberi semangat "Semangat Pak. Kami terus mendukung bapak. Bapak tidak sendiri,’’

Dituduh Cubit Murid, Guru Ini Menangis Diruang Sidang
Muhammad Samhudi di Gedung Pengadilan Negeri Sidoarjo menunduk lemas dan mengeluarkan air mata setelah sidang ke 7 (tujuh) mendengarkan keputusan penundaan sidang.
Teriak para guru di ruang sidang utama PN Sidoarjo itu. Aksi solidaritas tersebut membuat Samhudi terharu. Dia menangis.

Samhudi seperti mencoba menahan beban berat di dadanya. Samhudi yang kemarin mengenakan seragam PGRI itu lantas berdiri dari kursi terdakwa.

Dia hanya bernapas panjang saat mendengar keputusan penundaan sidang. Dia kembali meneteskan air mata ketika meninggalkan gedung PN. ’’Insya Allah saya siap,’’ katanya lirih.

Sidang tersebut merupakan kali ketujuh yang harus dijalani Samhudi. Dia dilaporkan ke Polsek Balongbendo oleh orang tua Arif pada 8 Februari.

Ayah Arif yang seorang tentara itu menuding Samhudi telah mencubit anaknya sampai memar. Namun, Samhudi membantah tuduhan tersebut.

’’Saya tidak pernah mencubit anak itu. Apalagi sampai memar,’’ ungkapnya. Samhudi menuturkan bahwa peristiwa tersebut terjadi pada 3 Februari.

Saat itu seluruh murid melaksanakan salat Duha di masjid sekolah. Namun, Arif justru terlihat duduk-duduk di pinggir sungai.

Sebagai seorang guru, dia lantas menegur Arif dan mengajaknya salat berjamaah dengan mengelus pundak. ’’Saya hanya mengelus, tidak mencubit, apalagi memukul. Saya hanya mengingatkan,’’ ujarnya.

Setelah dilaporkan ke polisi, Samhudi mengaku bingung. Sebab, dia merasa tidak melakukan penganiayaan.

Dia juga telah mencoba mendatangi orang tua murid untuk menyelesaikan masalah secara kekeluargaan. Namun, usahanya gagal.

’’Sudah tiga kali saya datangi. Orang tuanya hanya ingin menyerahkan masalah pada proses hukum,’’ ucapnya. Proses hukum pun berjalan. Samhudi harus menjalani sidang di pengadilan.

Hingga akhirnya, kasus tersebut menyebar di kalangan guru Sidoarjo hingga Jatim. Ratusan guru dari berbagai daerah pun melakukan aksi solidaritas untuk memberikan dukungan moral.

Indoneisia... adapakah gerangan dengan negeriku....

Engkau sang pahlawan Tanpa Jasa yang Harus rela mendekam di Bui hanya karena mencubit muridmu.... Dengan tujuan agar muridmu tumbuh menjadi sosok yang disiplin kelak....

Semangat pak Guru.. Kami akan selalu mendukungmu.... !!!

Sumber :  http://forums.merdeka.com

Rabu, 29 Juni 2016

Facts About Education in Indonesia : Social Major Vs Science Major


 

    For many years, high school students in Indonesia are strictly limited to three majors – social, science and language classes. The main purpose of this division is to make the students focus on certain subjects that they are interested in, since high school students are being prepared to continue their study in university after they graduate. This system is proven very effective to produce more competent students in a specific major. However, as time passes by, the number of students that are interested in joining language class is gradually decreasing because most schools only open the two majors. In addition, since the students are now more familiar with the remaining two majors, they start to distinguish between students from science class and those from social class. Students from science class are considered better than those of social class. There are some misunderstandings among students and parents or even teachers who consider social major is the second level major which consists of 'the outcast'. Social class has never become the first choice of the majority of Indonesian high school students based on several reasons such as peer pressure, family's demand, and a matter of prestige.

     Peer pressure among students can influence a student in deciding the major in high school. When students are not confident enough, they are more likely to follow what their friends choose. They don't have the courage to choose social major because they are afraid of being mocked or underestimated by their peers or classmates. Even after they choose to go to social major they are still treated as average students. This fact makes them more thoughtful in joining social major. Peer pressure can also affects students if they don't have clear and solid plans for their future. This will lead to the thought that choosing majors in high school is not very important to consider. They are letting their friends decide which major is the best for them because they haven't figured out what they are capable of doing or which subjects they are good at. These students end up choosing the same major as their friends do because they think following what others are planning can also work for them. This is obviously wrong because when an individual has a clear plan for the future he or she should go on their own path and work hard for it. Unless they do it the other way around, undoubtedly they will be facing many problems of finding ways to survive.  Another thing that may cause a student give in to peer pressure is how well they can adapt in a new environment. If a student is so used to his own comfort zone, he won't even think twice and easily choose the major that his close friends take. A possible scenario that might happen is when a student has problems of getting along well with his new friends, he will be afraid if he chooses friends of opposite majors as his close friends because he doesn’t want to feel being neglected and has no friends.  So, a good preparation for the transition from a teenager's comfort zone to a new and strange surrounding is a very important thing to do. There is no doubt that peer pressure is a very common thing that happens among teenagers in this case. However, in fact it all depends on the  person whether he wants to  give in to the demands of his friends or not.

     Demands from family may also cause a student to choose science class even though he is unwilling to. The reason behind the high demand of parents who want their children to study in science class is when either the father or the mother used to have a dream that have not been fulfilled yet. So, this kinds of parents hope their children make their dream come true and will do whatever it takes to make sure their children fulfill their past dreams.  Such parents set a very high hope for their children to reach the brighter future than they could do. Not wanting to disappoint their parents, the children usually do what their parents have told them. Another scenario that might happen is when the father wants his son to be a doctor so badly even though the child wants to be a lawyer. Being a doctor means that the child has to go to science class but in fact his academic performance is in social class. This can lead to misunderstanding between the parents and the children. Final decision in choosing the major in school can also be easily influenced by the relatives of the family who are successful in a certain job. For example, if many members or relatives of a family are doctors then the child is forced to choose science major in order to be a doctor even though he is unwilling and incapable academically. In this situation, the child is often afraid to speak up because it will be against his family’s wish and hope. Since the child is lack of motivation from the very beginning, when he goes into science major he will get bad scores and frustrated or depressed.

     Parents' lack of information about today's education system is also the causes their high demand on their children. Many parents still have an old-fashioned way of thinking. The parents still rely on rumors and false information that says that science class are better than social class or use their past knowledge about this two majors which are probably not true anymore. They are afraid that when their children choose social class, the children will have a hard time figuring out where to go for college. The parents think that choosing social class will limit the options of the majors to choose in a university entrance test. It is because a high school graduate from social class can only choose social majors too while someone from science class can choose all majors in a university entrance test. This is not completely true because even though it is possible for science students to go to faculties of social studies, they are going to have problems adjusting to the way things work in social faculties because they are used to learning numbers and calculating. A good communication between the parents and the children should be established so that parents and the children can reach an understanding. Parents’ understanding of what their children want is a very important factor to prevent the children from being forced and pressured after joining certain major of class.

     The last but not least about the reason why science class is always the first option among the high school students in Indonesia is simply a matter of prestige. There is a wrong assumption in society who label students from social class are “the outcast” which means that only students with low academic scored will go to social class. This labeling will change the mindset of a student. According to a sociologist Edwin M. Lemeret, or is often called ‘the labeling theory’, an individual's behavior can turn deviant from the process of labeling (giving nicknames or stamps that the society constantly telling him). There must be some explanation or socializing steps from the authority to the community since it is an essential thing to do. These socializing steps can go in two ways: the psychological and sociological. The psychological is done by letting every individual send suggestion for them and feels if they are put up in the same situation they will feel guilty or sinful by doing this.  The second way, the sociological way is done for the educational authority to give routine socializing steps to the wide range of community. Another consideration is the graduates of science class have more job opportunities than those of social class. A survey by Senior High School 1 (SMA 1) in Yogyakarta indicated that a tendency of their students who prefer science class is because this class is considered more prospective in college in job opportunities.  On the other hand, the graduates of social class are considered less prospective for their future. A matter of prospect is not determined by how good or bad a particular major is, but it is measured by the intention, interests, and capability of the students. If a student can optimize his ability in what he is interested in, he is more likely to have a brighter future. A science student is believed to be able to cross the lane and take a social-related jobs, unlike social students who can only choose the job relevant to their study. However, a social class student has a much bigger advantage because he learns the basics in high school. For example, if a science student wants to be an accountant and he has only decides this when he has already been in college, then he might encounter many problems along the way. He might be good at counting, but is he good enough to learn all the formulas for accounting in a short time? Students also prefer science class  because they find the subjects more challenging. They have this idea in mind that social students are left behind because the subjects to study don’t require a lot of challenges and can be learned even without a teacher. In fact, this is totally wrong, social students are able to think critically and analyze a certain case based on social facts that are happening in our society. Our society has always measured an individual’s intelligence on how well he or she is good at mathematics or physics, even though there is much more beyond that. How about their ability to interact with other people? How about some knowledge in business? Social students are challenged in their on way to give their opinions about social life. It might sounds easy to think about, but in reality it is not. In fact the truth is both science and social class are at the same level so they should be treated equally.

     In conclusion, success in education is not determined by whether or not the students choose science or social majors. Both majors are equal and a particular major (class) is not better than the other one. A success is determined by an individual intention, interest and capability. Choosing between major or social class can be tough but don’t let your friends or your family or friends tell you what you should choose. It's your own education, your own choice, and for your own future!





By : Haafizhah Nadia

CARA MEMBUAT PENJUMLAHAN DI FORM INPUT DINAMIS DAN MENYIMPAN DATA MENGGUNAKAN AJAX

berbagi tutorial untuk membuat jumlah data mana inputan.y dinamis dan proses menyimpan data.y menggunakan ajax sehingga harus menggunakan dukungan javascript atau jQuery. Tapi ditutorial ini saya akan mencoba untuk menggunakan jQuery javascript murni karena jika saya lakukan gan tidak kataekan: D.

Langsung Saja Pertama-tama kitd buat formnya dulu such as inviting participation di index.html

<form id="data">
    <div id="box">
        <p> Harga satuan : <input name="satuan[]" type="text" id="satuan-0" class="hitung"> </p>
        <p> Harga jasa : <input name="jasa[]" type="text" id="jasa-0" class="hitung"> </p>
        <p> Total (Tidak di isi) : <input name="total[]" type="text" id="total-0" readonly="readonly"> </p>
    </div>
    <button id="tambah">Tambah</button>
    <button id="simpan">Simpan</button>
</form>
<div id="output"></div>

CARA MEMBUAT PENJUMLAHAN DI FORM INPUT DINAMIS DAN MENYIMPAN DATA MENGGUNAKAN AJAX

Keterangan:

1. id="data" untuk menampung semua data serialize yang ada di form yang nanti akan di kirim menggunakan jQuery POST atau GET.
2. id="box" tempat untuk menampilkan input dinamis yang nanti akan di .append().
3. Semua inputan diberi name berbentuk array karena inputannya dinamis lebih dari satu namun berada di dalam satu form.
4. Semua inputan diberi class="hitung" kecuali input total, gunanya untuk mendapatkan nama id di inputan tersebut.
5. Sedangkan id yang ada di masing2 inputan gunanya untuk menjumlhkan value inputan dan menmpilkan totalnya.
6. id="tambah" selector tombol untuk membuat inputan baru.
7. id="simpan" selector tombol untuk mengirim data inputan/menjalankan jquery POST atau GET.
8. id="output" untuk menampilkan respon server/output yang di kirim server.

sekarang kita ke bagian jQuerynya, pertamatama kita buat fungsi input dinamis ketika id="tambah" di click:

$('#tambah').click(function() {

    var i = $('input').size() + 1,
        input = '<div id="box' + i + '"><a href="#" id="hapus" color="red">hapus</a>';
    input += '<p> Harga satuan : <input name="satuan[]" type="text" id="satuan-' + i + '" class="hitung"> </p>';
    input += '<p> Harga jasa : <input name="jasa[]" type="text" id="jasa-' + i + '" class="hitung"> </p>';
    input += '<p> Total (Tidak di isi) : <input name="total[]" type="text" id="total-' + i + '" readonly="readonly"> </p>';
    input += '</div>';

    $('#box').append(input);

    i++;
    return false;

});

Lanjut membuat fungsi untuk menghapus inputan ketika id="hapus" di click:

$('body').on('click', '#hapus', function() {

    $(this).parent('div').remove();

});

Lalu fungsi untuk menjumlahkan data yang kita input ketika mengetik di class="hitung" lalu menampilkan totalnya.

$('body').on('focus', '.hitung', function() {
    var aydi = $(this).attr('id'),
        berhitung = aydi.split('-');
    $(this).keydown(function() {
        setTimeout(function() {
            var satuan = ($('#satuan-' + berhitung[1]).val() != '' ? $('#satuan-' + berhitung[1]).val() : 0),
                jasa = ($('#jasa-' + berhitung[1]).val() != '' ? $('#jasa-' + berhitung[1]).val() : 0),
                total = parseInt(satuan) + parseInt(jasa);
            if (!isNaN(total)) {
                $('#total-' + berhitung[1]).val(total);
            }
        }, 50);
    });
});

Untuk pembuatan form input dinamis dan penjumlahannya sudah selesai, sekarang kita tinggal membuat proses pengolahan datanya di bagian server side.

Pertama-tama kita buat sebuah file dengan nama proses.php lalu masukan kode di bawah ini:

<?php
    echo '<pre>';
    echo 'Harga satuan:';
    print_r($_POST['satuan']);
    echo 'Harga jasa:';
    print_r($_POST['jasa']);
    echo 'Total:';
    print_r($_POST['total']);
    echo '</pre>';
?>

Kode php di atas fungsinya untuk mengecek apakah data yang di kirim ke server benar2 terkirim.
Lalu bagaimana cara mengirim data yang ada di form ke servernya??

Ok seperti yang sudah saya jelaskan dari awal pengiriman datanya akan menggunakan AJAX atau jQuery POST/GET

Berarti sekarang kita buat proses pengiriman datanya ketika id="simpan" di click tapi saya akan menggunakan jQuery POST karna di proses.php saya menggunakan method POST, brikut kodenya:

$('#simpan').click(function() {
    var url_proses = "proses.php";
    $.post(url_proses, $("#data").serialize(), function(response) {
        $('#output').html(response);
    });
    return false;
});

Untuk demo dan full kodenya sobat bisa melihatnya di bawah: <?php>

<!-- PHP untuk memproses data dalam bentuk array yang dikirim oleh form -->
<?php
if(!empty($_POST['alltotal'])){
echo '<pre>';
echo 'Harga satuan:';
print_r($_POST['satuan']);
echo 'Harga jasa:';
print_r($_POST['jasa']);
echo 'Sub total:';
print_r($_POST['subtotal']);
echo 'All total: '.$_POST['alltotal'];
echo '</pre>';
exit;
}
?>

<a href="http://ibacor.com/blog/membuat-penjumlahan-di-form-input-dinamis-dan-menyimpan-data-menggunakan-ajax" target="_BLANK"><h1>Tutorial</h1></a>

<!-- HTML -->
<form id="data">
<div id="box">
<p> Harga satuan : <input name="satuan[]" type="text" id="satuan-0" class="hitung"> </p>
<p> Harga jasa : <input name="jasa[]" type="text" id="jasa-0" class="hitung"> </p>
<p> Sub total (Tidak di isi) : <input name="subtotal[]" type="text" id="total-0" class="total" readonly="readonly"> </p>
</div>
<p> All total (Tidak di isi) : <input name="alltotal" type="text" id="total" readonly="readonly"> </p>
<button id="tambah">Tambah</button>
<button id="simpan">Simpan</button>
</form>
<div id="output"></div>

<!-- jQuery -->
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
// proses menambah inputan
$('#tambah').click(function() {

    var i = $('input').size() + 1,
        input = '<div id="box' + i + '"><a href="#" id="hapus" color="red">hapus</a>';
    input += '<p> Harga satuan : <input name="satuan[]" type="text" id="satuan-' + i + '" class="hitung"> </p>';
    input += '<p> Harga jasa : <input name="jasa[]" type="text" id="jasa-' + i + '" class="hitung"> </p>';
    input += '<p> Sub total (Tidak di isi) : <input name="subtotal[]" type="text" id="total-' + i + '" class="total" readonly="readonly"> </p>';
    input += '</div>';

    $('#box').append(input);

    i++;
    return false;

});

// proses menghapus inputan
$('body').on('click', '#hapus', function() {

    $(this).parent('div').remove();

});

// proses menghitung total value inputan
$('body').on('focus', '.hitung', function() {
    var aydi = $(this).attr('id'),
berhitung = aydi.split('-');
    $(this).keydown(function() {
        setTimeout(function() {
            var satuan = ($('#satuan-' + berhitung[1]).val() != '' ? $('#satuan-' + berhitung[1]).val() : 0),
                jasa = ($('#jasa-' + berhitung[1]).val() != '' ? $('#jasa-' + berhitung[1]).val() : 0),
                subtotal = parseInt(satuan) + parseInt(jasa);
            if (!isNaN(subtotal)) {
                $('#total-' + berhitung[1]).val(subtotal);
var alltotal = 0;
$('.total').each(function(){
alltotal += parseFloat($(this).val());
});
                $('#total').val(alltotal);
            }
        }, 50);
    });
});

// proses untuk mengirim semua data inputan yang ada di form menggunakan jquery POST atau GET ke server
$('#simpan').click(function() {
    // contoh => var url_proses = proses.php
    var url_proses = "<?php echo 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];?>";
    $.post(url_proses, $("#data").serialize(), function(response) {
        $('#output').html(response);
    });
    return false;
});
</script>
Source : http://ibacor.com/ 
 

Cara MENAMPILKAN DATA Cuaca DARI SITUS BMKG KE WEBSITE KITA DENGAN PHP CURL

JIKA sobat Ingin menambahkan widget Prakiraan Cuaca Indonesia di blog / website sobat, Berarti sobat Harus Mencari situs Yang MENYEDIAKAN widget gratis untuk review dipasang diwebsite sobat, ATAU sobat also can MEMBUAT Sendiri skrip untuk review widget tersebut.

Berikut Adalah contohnya, buat SEBUAH berkas beri nama di beritacuaca.php, naskah Jumlah Harga: Tambahkan dibawah ini:

<?php

function fungsiCurl($url){

  $data = curl_init();

  curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);

  curl_setopt($data, CURLOPT_URL, $url);

  curl_setopt($data, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");

  $hasil = curl_exec($data);

  curl_close($data);

  return $hasil;

}

$url = fungsiCurl('http://www.bmkg.go.id/BMKG_Pusat/Informasi_Cuaca/Prakiraan_Cuaca/Prakiraan_Cuaca_Indonesia.bmkg');

$pecah = explode('<h1>Prakiraan Cuaca Indonesia</h1>',$url);

$pecah2 = explode('<h3>Cuaca Propinsi Lainnya :</h3>',$pecah[1]);

$result = $pecah2[0];

print_r($result);

?>
Buka di Browser anda, tampilannya seperti gambar dibawah ini

MENAMPILKAN DATA Cuaca DARI SITUS BMKG KE WEBSITE KITA DENGAN PHP CURL

Masih kelihatan Data memiliki tag img Yang TIDAK (alias Gambarnya enggak ADA), kitd hapus Saja gambar tersebut DENGAN menambahkan:

$result = preg_replace("/<img[^>]+\>/i", "", $result);

print_r($result);
sehinggal script lengkapnya menjadi:

PHP </>

<style>
  td{
      padding: 10px;
      border: 1px solid #eee
    }
</style>

<h1><a href="http://ibacor.com/blog/menampilkan-data-cuaca-dari-situs-bmkg-ke-website-kita-dengan-php-curl" target="_BLANK">Tutorial</a></h1><hr>

<?php
function fungsiCurl($url){
  $data = curl_init();
  curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($data, CURLOPT_URL, $url);
  curl_setopt($data, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
  $hasil = curl_exec($data);
  curl_close($data);
  return $hasil;
}
$url = fungsiCurl('http://www.bmkg.go.id/BMKG_Pusat/Informasi_Cuaca/Prakiraan_Cuaca/Prakiraan_Cuaca_Indonesia.bmkg');
$pecah = explode('<h1>Prakiraan Cuaca Indonesia</h1>',$url);
$pecah2 = explode('<h3>Cuaca Propinsi Lainnya :</h3>',$pecah[1]);
$result = $pecah2[0];
$result = preg_replace("/<img[^>]+\>/i", "", $result);
print_r($result);
?>
 Source : http://ibacor.com/

Cara Install Admin tools / PhpMyAdmin di Easy Engine

Bagaimana cara install EasyEngine di VPS Ubuntu atau Debian namun ternyata ada yang tertinggal. Jika terbiasa memanajemen database mysql menggunakan phpMyAdmin maka akan dibuat bingung karena tidak adanya phpMyAdmin dalam paket ketika instalasi. Untuk itu akan ditambahkan disini cara install Admin tools di Easy Engine. Dalam paket Admin tools ini terdapat macam-macam tools admin yang bisa digunakan untuk mengelola server nantinya, yaitu Adminer, phpMyAdmin, phpMemcachedAdmin, FastCGI cleanup script, OPcache, Webgrind, Anemometer.

Source : www.kentos.org/cara-install-admin-tools-phpmyadmin-di-easy-engine/

Bagaimana cara install Admin tools?


Ternyata tidak sulit, karena semua memang sudah dibungkus oleh Easy Engine hanya saja dipisahkan seuai keinginan user.

Install Admin tools

Yang berisi Adminer, phpMyAdmin, phpMemcachedAdmin, FastCGI cleanup script, OPcache, Webgrind, Anemometer.

ee stack install --admin
ee stack install --phpmyadmin
JIKA Ingin menginstall phpMyAdmin Saja.

Cara Install Admin tools / PhpMyAdmin di Easy Engine

 
 Jika ada pertanyaan mengenai cara Install Admin tools / PhpMyAdmin di Easy Engine silahkan tanyakan di komentar.


Proses Menuju Sukses Sejati

Proses Menuju Sukses Sejati Cerita Motivasi dan Inspirasi Nomor 1

Ada pendapat yang mengatakan sukses adalah sebuah perjalanan. Ada juga pendapat lain yang mengatakan, bila Anda sukses maka Anda pasti bahagia atau Anda harus bahagia dulu baru Anda akan mendapatkan sukses yang anda inginkan.

Saya tidak ingin menambah daftar panjang tentang definisi kesuksesan bagi kita semua. Bagi saya secara pribadi, sukses ukurannya adalah kemampuan kita mencapai potensi kita secara optimal sesuai dengan kapasitas kita masing-masing. Tentu saja untuk mengembangkan kapasitas dibutuhkan sebuah “proses” yang korelasi dengan pernyataan bahwa sukses adalah sebuah perjalanan, di dalam arti untuk mencapai sebuah sukses besar kita harus mempersiapkan diri kita secara pribadi secara optimal, mampu menjelaskan visi dan misi kita kepada orang lain supaya orang lain tergerak untuk mencapai sasaran bersama sebagai sukses-sukses kecil kita yang nanti akan bertambah besar kapasitasnya menjadi sukses yang besar dalam hal fisik, mental, dan spiritual.

Mari sekarang kita menel
... baca selengkapnya di Proses Menuju Sukses Sejati Cerita Motivasi dan Inspirasi Nomor Satu

Selasa, 28 Juni 2016

Why Do Muslim Women Wear Hijab, Any Advantages?


   What is Hijab? Hijab is a veil that covers the head and chest which is particularly worn by muslim women beyond the age of puberty in presence of adult males outside of their immediate family.
Hijab or headscarf is one of the most noticeable and misunderstood attires of muslim women. It can further refer to any head, face or body covering worn by muslim women that conforms to a certain standard of modesty. Hijab can also be used to refer to the seclusion of women from men in the public sphere. Most legal systems define this modest dressing as everything except covering the face and the hands in public, Most often, it is worn by muslim women as symbol of privacy and morality. Wearing hijab has advantages such as an act of obedience to the Creator, a shield for women self fashion trend nowadays.

      Wearing the hijab is a form of obedience of a muslim woman because it is obligatory for the them. As stated in the Quran, Surah Al-Ahzab: 59 which mentions the obligations for muslim women to wear Hijab, " O Prophet, tell your wives and your daughters and the women of the believers to bring down over themselves [part] of their outer garments. That is more suitable that they will be known and not be abused. And ever is Allah Forgiving and Merciful.” The verse tells that muslim women must wear hijab because it is obligatory and a command from Allah Swt. Allah commands all muslim women to wear hijab because hijab will protect anyone who wears it. No matter what kind of the characters of the muslim women – whether good or bad ones- they must wear hijab. As time goes by, hijab will change the muslim women with bad characters into good people, Good willing. Allah commands the muslim women to wear hijab because hijab is a polite clothing, so with polite clothing the muslim women will have good looking. 

      Hijab is shield, a shield for muslim women who wear it. Hijab becomes a shield because if they wear hijab there will be no bad man who want to do the bad things like doing criminal actions that harm the women. Then, hijab protects the muslim women from arousing male sexual interests. If the women don't wear hijab and wear impolite clothes they will arouse male sexual interests. Hijab also creates self identity. Wearing hijab makes muslim women feel confident because hijab is a polite clothing and they will free to move and are not worried if there are certain parts of their clothes open.

      Hijab becomes a fashion trend because hijab is derived from the Arabic word ‘hijab hajaban’ which means covering. In other words, hijab is to cover the nakedness by wearing a head covering of certain form that follows the Sharia law.  Now, there are various creations of hijab that makes this Islamic clothing  look more stylish and fashionable.  With more muslim women wearing hijab, hijab designers try to combine the trends in fashion with the muslim clothes that suit to Sharia law. There many reasons that make hijab become a fashion trend. The first reason is that there are more and more muslim women begin to understand the necessity of wearing a veil, so that they wear hijab. Muslim women are free to wear the hijab wherever they want. The emergence of various models of hijab styles  and hiiab tutorials in various media, electronic media and social media also promote the hijab among muslim women. Usually, the muslim women who share their hijab tutorial will be trendsetter and most trendsetters always wear cute or unique clothes that make other women who haven’t worn it become interested to wear hijab. In addition, the emergence of a lot of fashion models combined with hijab styles and fashion with the various models and colors also makes the hijab becomes trendier among the public.  So, muslim women can still look fashionable and neat while wearing hijab.

      In conclusion, hijab is obligatory from Allah that every muslim woman must wear it , no matter what. Hijab is a shield for muslim women who wear it and hijab is also a fashion. Today, not only non-hijab women can be fashionable but hijab women can also be fashionable too or even can be more stylish than non-hijab women, They still look gorgeous and beautiful with their appearance.

By : Tirza Nuraini

Script PHP & SQL : Tutorial Menghitung Jumlah Hari di Antara Dua TanggaL

Seperti cerita di artikel sebelumnya mengenai Script SQL Menghitung Jumlah Hari di antara Dua tanggal artikel ini juga tentang mencari jumlah hari, tetapi dengan script PHP. Jadi, ternyata, selain dapat ditemukan dengan manual kecil, PHP juga kelas bernama Datetime () dan memiliki fungsi diff di dalamnya (tanggal-diff). Ada empat (4) contoh script yang saya ditunjukkan dalam makalah ini untuk mendapatkan hasil yang sama. Oke, langsung ke script:

Script PHP & SQL : Tutorial Menghitung Jumlah Hari di Antara Dua TanggaL


Script 1

<?php
$dt1 = new DateTime('2011-05-25');
$dt2 = new DateTime('2011-06-23');
$telat = $dt1->diff($dt2);
?>

Script 2 

<?php
$dt1 = date_create('2011-05-25');
$dt2 = date_create('2011-06-23');
$telat = date_diff($dt1, $dt2);
?>

Script 3 

<?php
$dt1 = strtotime("2011/05/25");
$dt2 = strtotime("2011/06/23");
$diff = abs($dt2-$dt1);
$telat = $diff/86400; // 86400 detik sehari
?>

Script 4 

<?php
$dt1 = mktime(12,0,0,25,5,2011);
$dt2 = mktime(12,0,0,23,6,2011);
$buff = $dt2-$dt1;
$telat = floor($buff/60/60/24);
?>

SCRIPT PERINTAH SYNTAX SQL HITUNG JUMLAH ANTARA DUA TANGGAL


Membuat program untuk persewaan gunting, lalu per-hari dihargai 1 juta rupiah. Kemudian, data yang di simpan dalam database kan berupa tanggal peminjaman dan tanggal pengembalian, nah, berdasarkan tanggal itu, kita bisa menghitung jumlah hari tanpa berpikir pusing ngoding jumpalitan segala macem pake strpos, strcat, substring, dan lain-lain.

Jadi, dengan memanfaatkan fungsi yang ada dalam MySQL (maaf, untuk database yang lain sama apa tidak, saya belum coba), yaitu DATEDIFF. Dengan fungsi tersebut, kita bisa langsung menghitung jumlah hari di antara dua buah tanggal (kenapa tanggal pake buah ya?). Struktur untuk fungsi datediff sendiri seperti ini: 

1 DATEDIFF(date1,date2)
date1 = tanggal akhir, date2 = tanggal awal. Sehingga, paling tidak, perintah SQL yang digunakan yaitu seperti begini: 

SQL : SELECT DATEDIFF('2011-06-23','2011-05-25')
//output: 
+------------------------------------------+
|SELECT DATEDIFF('2011-06-23','2011-05-25')|
+------------------------------------------+
|                                        29|
+------------------------------------------+
 
//atau begini:
SQL : SELECT DATEDIFF('2011-06-23','2011-05-25') AS telat
//output
+-----+
|telat|
+-----+
|   29|
+-----+

Semoga info yang kami Share bermanfaat buat kalian semua.