PSPad

January 6th, 2009

Program editor gratis dan sangat canggih. My favorite. Di bawah ini adalah beberapa file definition untuk code igniter khususnya. Buat programming jadi jauh lebih enak dan cepat. Nanti seiring dengan banyak nya code yang di tulis, mungkin file ini bakal bertambah ^^

php.def

Code ini diletakkan paling atas dari php.def, di bagian macro definition

%namatable%[email protected] Nama Table=,,,,

Yang ini dibagian bawah nya

[CI_Insert_Validation | CI Mysql Insert]
$this->db->
	set('|', $this->validation->)->
	set('', $this->validation->)->
	set('', $this->validation->)->
	insert('%namatable%');
[CI_Get | CI Mysql Get]
$res = $this->db->
	from('%namatable%')->
	join('namatable b' , 'ON b.asd = a.asd' , 'left')->
	where('|' , $id)->
	where('status' , 'Active')->
	orderby('name' , 'asc')->
	get();
foreach ($res->result() as $val) {
 
} 	
[CI_Insert_Post | CI Mysql Insert]
$this->db->
	set('|', $this->input->post(''))->
	set('', $this->input->post(''))->
	set('', $this->input->post(''))->
	insert('%namatable%');
[CI_Insert_Empty | CI Mysql Insert]
$this->db->
	set('|', )->
	set('', )->
	set('', )->
	insert('%namatable%');
[CI_Update | CI Mysql Update]
$this->db->
	set('|', $this->input->post(''))->
	set('', $this->input->post(''))->
	set('', $this->input->post(''))->
	where('id' , $id)->
	update('%namatable%');
[CI_Delete_status | CI Delete status]
$this->db->
	set('status' , 'deleted')->
	where('id', |)->
	update('%namatable%');
[CI_Delete_real | CI Real Delete]
$this->db->
	where('id', |)->
	delete('%namatable%');
[CI_validation | CI Validation]
// Validation class
$this->load->library('validation');
 
$rules['m_code'] = "trim|required|alpha_numeric";
$rules['m_name'] = "trim|required|strip_tags";
$rules['m_address'] = "trim|strip_tags";
$this->validation->set_rules($rules);
 
$fields['m_code']	= 'Member code';
$fields['m_name']	= 'Member Name';
$fields['m_address']	= 'Address';
$this->validation->set_fields($fields);
[Smarty_options | Smarty load options]
// Load %namatable%
$this->db->orderby('%orderby%')->where('status' , 'Active');
$res = $this->db->get('%namatable%');
$nt = array();
foreach ($res->result() as $row) {
	$nt[$row->mt_id] = $row->mt_name;
}
$this->sci->assign('%namatable%' , $nt);
[Smarty_assign | Smarty assign]
$this->sci->assign('|' , $);
 
[Smarty_display | Smarty display]
$this->sci->da('|.htm');

html.def

[CI_variable | PHP Variable]
<?= $| ?>
[CI_validation | Validation variable]
<?= $this->validation->| ?>
[CI_post | Post variable]
<?= $this->input->post('|') ?>
[CI_foreach | Foreach ]
<? foreach($| as $row): ?>
  ?
<? endforeach; ?>
[CI_if | If ]
<? if(|): ?>
  ?
<? endif; ?>
[CI_ifelse | ifelse ]
<? if(|): ?>
  ?
<? else: ?>  
  %else%
<? endif; ?>
[CI_url | CI Site url ]
<?= site_url('?'); ?>
[CI_url_link | CI Site url ]
<a href="<?= site_url('|'); ?>">?</a>
[CI_link | CI Site url ]
<a href="<?= site_url('|'); ?>">?</a>
Share
  1. No comments yet.
  1. No trackbacks yet.

Switch to our mobile site