Archive for April, 2010

CMS List based on CodeIgniter

April 29th, 2010   by  aditia rahman

Codeigniter recently is my favorite PHP framework, it’s has really small learning curve to get move on, here list of content management system built on codeigniter, hope this useful whether you want to use it for your simple site or you can learn more about codeigniter by exploring the code. Personally I explore it to knowing how people write code in codeigniter.

Posted in CMS Codeigniter5 Comments
Tags:

Simple and Beautifull Wood Texture Desktop Wallpaper

April 25th, 2010   by  aditia rahman

Clean, simple and natural wood texture sometimes make me comfortable sitting on desktop PC or my laptop, this post is dedicated to every natural or modified wood texture wallpaper that I found. Thanks to deviantart, I found a lot great wood texture that nicely can be used for my desktop wallpaper. I hope it can be added to your collection, to see just click on the image it will redirect to original source.

Windows Carbon Wood from awesomewallpapers.wordpress.com (1440 x 900)

Posted in Wallpaper3 Comments

Creating user session checking with CodeIgniter library

April 17th, 2010   by  aditia rahman

When we build web application with user authentification, the application must have user login/logout or signin/signout or whatever you called it, then the system must have user logged feature to check whether the user is logged in or logged out. Session is the most common way to checking it. In Codeigniter, using Session Class you can use simple function inside controller, it’s something like this:

class User extends Controller {

	// constructor class
	function __construct()
	{
		parent::Controller();
		$this->load->library('session');
	}

	function index()
	{
		$this->load->view('user/index');
	}

	function login()
	{
		// if user already logged in, redirect to user index
		if ($this->_is_logged_in())
		{
			redirect('user/index');
		}
		else
		{
			$this->load->view('user/login');
		}
	}

	function register()
	{
		// if user already logged in, redirect to user index
		if ($this->_is_logged_in())
		{
			redirect('user/index');
		}
		else
		{
			$this->load->view('user/register');
		}
	}

	// checking user logged user by registered session
	function _is_logged_in()
	{
		$logged = $this->session->userdata('user_id');
		if ($logged)
		{
			return TRUE;
		}
		else
		{
			return FALSE;
		}
	}
}

Posted in Codeigniter PHP3 Comments