Script :
require( '/wp-load.php' );
wp_create_user('otto', 'password', 'otto@ottodestruct.com');
wp_create_user('fake', 'fakepass', 'fake@example.com');
...
Source : http://wordpress.org/support/topic/mass-user-creation-in-wordpress-30
require( '/wp-load.php' );
wp_create_user('otto', 'password', 'otto@ottodestruct.com');
wp_create_user('fake', 'fakepass', 'fake@example.com');
...
this.imagePreview = function(){
/* CONFIG */
xOffset = 10;
yOffset = 30;
// these 2 variable determine popup's distance from the cursor
// you might want to adjust to get the right result
/* END CONFIG */
$("a.preview").hover(function(e){
this.t = this.title;
this.title = "";
var c = (this.t != "") ? "
" + this.t : "";
$("body").append("
"+ c +"
");
$("#preview")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");
},
function(){
this.title = this.t;
$("#preview").remove();
});
$("a.preview").mousemove(function(e){
$("#preview")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");
});
};
// starting the script on page load
$(document).ready(function(){
imagePreview();
});
if ($_SESSION[username_administrasi] != "" && $_POST[submit] == "Simpan") {
$cek = cek("select * from ktp where no_ktp = '$no_ktp' and npwp = '$npwp' ");
if ($cek > 0) {
alert("Data sudah ada !");
loncat("../index.php");
} else {
$tmp_filename = $_FILES[file1][tmp_name];
$filename = $_FILES[file1][name];
$file = explode(".",$filename);
$nama_file = $file[0];
echo $nama_file;
list($old_width, $old_height, $type, $attr) = getimagesize($tmp_filename);
if ($type == 1 || $type == 2 || $type == 3) {
if (($_FILES["file1"]["size"]/1024) > 250) {
if ($type == 1) {
$new_image = imagecreatefromgif($tmp_filename);
} else if ($type == 2) {
$new_image = imagecreatefromjpeg($tmp_filename);
} else if ($type == 3) {
$new_image = imagecreatefrompng($tmp_filename);
}
echo "
width asli = ".$old_width;
echo "
height asli = ".$old_height;
$new_width = 800;
if ($old_width > $old_height) {
$percentage = ($new_width / $old_width);
} else {
$percentage = ($new_width / $old_height);
}
$new_width = round($old_width * $percentage);
$new_height = round($old_height * $percentage);
echo "
width resize = ".$new_width;
echo "
height resize = ".$new_height;
echo "
".$_FILES[file1][type];
echo "
".$_FILES[file1][size];
if (function_exists(imagecreatetruecolor)){
$resized_img = imagecreatetruecolor($new_width,$new_height);
}else{
die("Error: Please make sure you have GD library ver 2+");
}
imagecopyresampled($resized_img, $new_image, 0, 0, 0, 0, $new_width, $new_height, $old_width, $old_height);
if ($type == 1) {
imagegif($resized_img,"../images/uploaded/tumb_".$nama_file.".gif");
} else if ($type == 2) {
imagejpeg($resized_img,"../images/uploaded/tumb_".$nama_file.".jpg");
} else if ($type == 3) {
imagepng($resized_img,"../images/uploaded/tumb_".$new_image.".png");
}
$move = move_uploaded_file($_FILES['file1']['tmp_name'], '../images/uploaded/real_'.$filename);
ImageDestroy ($resized_img);
ImageDestroy ($new_image);
loncat("../index.php");
} else {
$move = move_uploaded_file($_FILES['file1']['tmp_name'], '../images/uploaded/real_'.$filename);
if ($move) {
alert("Upload sukses.");
} else {
alert("Upload gagal.");
}
loncat("../index.php");
}
} else {
alert(" Tipe file yang diijinkan : GIF, JPG, JPEG, PNG");
//loncat("../index.php");
}
}
}
#gb{
position:fixed;
top:50px;
z-index:+1000;
}
* html #gb{position:relative;}
.gbtab{
height:200px;
width:30px;
float:left;
cursor:pointer;
background:url("http://purwomartono.googlepages.com/slider_shoutmix.gif") no-repeat;
}
.gbcontent{
float:left;
border:5px solid #000000;
background:#FFFFFF;
padding:5px;
}
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-4639370-4']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
window.google_analytics_uacct = "UA-4639370-4";
function showHideGB(){
var gb = document.getElementById("gb");
var w = gb.offsetWidth;
gb.opened ? moveGB(0, 30-w) : moveGB(20-w, 0);
gb.opened = !gb.opened;
}
function moveGB(x0, xf){
var gb = document.getElementById("gb");
var dx = Math.abs(x0-xf) > 10 ? 5 : 1;
var dir = xf>x0 ? 1 : -1;
var x = x0 + dx * dir;
gb.style.right = x.toString() + "px";
if(x0!=xf){setTimeout("moveGB("+x+", "+xf+")", 10);}
}
var gb = document.getElementById("gb");
gb.style.right = (30-gb.offsetWidth).toString() + "px";