Silahakn berkunjung ke halaman ini: http://webdesigntutsplus.s3.amazonaws.com/tuts/297_simpleAdmin/demo/login.html
Untuk mendapatkan desain tombol bagus dan fresh silahkan berkunjung ke URL dibawah ini. Gratis. http://dribbble.com/search?q=button
Berikut adalah script php untuk mendeteksi browser yang digunakan oleh client. Letakkan code dibawah ini di paling atas halaman index anda. $useragent=$_SERVER[‘HTTP_USER_AGENT’]; if(preg_match(‘/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm(
Berikut adalah fungsi yang bisa dugunakan untuk mengubah ukuran gambar dengan otomatis menggunakan script PHP. function resize_image($filename, $tmpname, $xmax, $ymax) { $ext = explode(“.”, $filename);
Fungsi dibawah ini bisa dugunakan untuk membuat file zip secara otomatis. /* creates a compressed zip file */ function create_zip($files = array(),$destination = ”,$overwrite = false) { //if the zip file already exists and overwrite is false, return false if(file_exists($destination) && !$overwrite) { return false; } //vars $valid_files = array(); //if files were passed in… if(is_array($files)) { //cycle through each file foreach($files as $file) { //make sure the file exists if(file_exists($file)) { $valid_files[] = $file; }
Berikut ini adalah fungsi untuk menghapus folder dengan menggunakan PHP. Jika di dalam folder tsb ada file maka file itu juga akan terhapus. function destroyDir($dir, $virtual = false) {
function list_files($dir) { if(is_dir($dir)) { if($handle = opendir($dir)) { while(($file = readdir($handle)) !== false) { if($file != “.” && $file != “..” && $file != “Thumbs.db”) { echo ‘<a target=”_blank” href=”‘.$dir.$file.’”>’.$file.'</a><br>’.”\n”; } } closedir($handle); } } }
function readable_random_string($length = 6){ $conso=array(“b”,”c”,”d”,”f”,”g”,”h”,”j”,”k”,”l”, “m”,”n”,”p”,”r”,”s”,”t”,”v”,”w”,”x”,”y”,”z”); $vocal=array(“a”,”e”,”i”,”o”,”u”); $password=””; srand ((double)microtime()*1000000); $max = $length/2; for($i=1; $i<=$max; $i++) { $password.=$conso[rand(0,19)]; $password.=$vocal[rand(0,4)]; } return $password; }