2012-07-29

THE EXPENDABLES 2

Film yang cukup di tunggu-tunggu, bahkan ada kabar bahwa film ini ngak main-main dalam shootingnya *memfilmkannya*

Alamat anda harus sediakan  popcorn banyak-banyak!!

2012-07-03

SDN48 Galery


SDN di bentuk dan di produseri oleh Yashushi Akimoto. Idol Jepang baru ini dibuat dengan dasar dewasa. Kayo Noro (Member AKB48) ditunjuk sebagai kapten dari grup ini.

SDN48 - Mature side

Kita mengenal AKB48 dan juga JKT48. Tetapi ada juga versi dewasanya yang disebut sebagai SDN48. SDN mengeluarkan PV terbaru mereka "Yaritagariya-san" yang merupakan single mereka "Kudoki Nagara Azabu Juban".

2012-07-01

Permission user table

User level in your program is  substantial !!. Just think if your user able to edit your site setting!! Not only that, some user have other previledges than another!

Not all user in the site only admin and visitor. We have some user that called as moderator. In my program, the program can be used by cashier, lab, nurse and doctor.

But some user have dual authorization like cashier and price moderator. This are the reason why You need user permission table. User permission table created to make dual user status.

The main problem is this table aren't secure! Since the user permission should be using only one not two or more!!

This user_permisson using 2 table that's user and permission. For the user you can see the article contain simple user table. Don't forget to check your setting!! and see the permission value is correct. If you have other idea for permission  table, can you share to us!

My Id plus log

I just could helped when see table id only using that's way.. taken the value then add 1!! I suddenly realise this can be use as log and I can integrated with other table!! in fact the auto id from my table using this and is really help me to found error and log related to the table.

For the start, I'm using mysql, you can change into your DBE(Database Engine) U use right now! the table contain:

  • id. Primary key (Integer)
  • ip. index (char)this is for log purpose
  • time. unique(datetime or timestamp) is better autoupdate then input it
for the ip, we using variable $_SERVER['REMOTE_ADDR']
<?php function newId() { /* view the last value */ $s='select id from my_id order by desc limit 1'; $q=mysql_query($s); $r=mysql_fetch_array($q); $id=$r[0]+1; /* view the last value */ $s="insert into `my_id` values($id,'$_SERVER['REMOTE_ADDR']',now())"; $q=mysql_query($s); return $id; }
for time, I rather using timestamp because it have auto update time. So you don't need to type now() actualy.   The number I have then using with other table like user, then if you want to know when the user created, just peek on this. You will have IP created the user and what time the user created. This log can be used and integrated with log!!