new pisilinux web sites
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
|
||||
class Duyuru_model extends Model
|
||||
{
|
||||
|
||||
function new($post)
|
||||
{
|
||||
DB::insert('duyuru',[
|
||||
'title' => $post['title'],
|
||||
'text' => $post['duyuru'],
|
||||
'lang' => $post['lang']
|
||||
]);
|
||||
|
||||
if (!DB::error()) {
|
||||
redirect('duyuru');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function update($post)
|
||||
{
|
||||
DB::where('id',$post['id'])->update('duyuru',[
|
||||
'title' => $post['title'],
|
||||
'text' => $post['duyuru'],
|
||||
'lang' => $post['lang'],
|
||||
'status' => $post['status']
|
||||
]);
|
||||
|
||||
if (!DB::error()) {
|
||||
redirect('duyuru');
|
||||
}
|
||||
}
|
||||
|
||||
function contentList(){
|
||||
return DB::duyuruResult();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user