new pisilinux web sites
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB,Import,URL,Cookie,Session,ML,Method,URI;
|
||||
/**
|
||||
* Created By: Erkan IŞIK
|
||||
* Created Date: 2017-08-30
|
||||
* Upcdate Date: 2022-03-02
|
||||
*/
|
||||
class Content extends Controller{
|
||||
|
||||
function __construct(){Cookie::insert('page','content');}
|
||||
|
||||
function main(){}
|
||||
|
||||
function edit(){
|
||||
$id = URI::get('edit');
|
||||
if (method::post()){$this->content_model->update(method::post());}
|
||||
view::id($id);
|
||||
}
|
||||
|
||||
function delete($id){
|
||||
DB::where('id', $id)->delete('content');
|
||||
redirect('content');
|
||||
}
|
||||
|
||||
function new(){
|
||||
if (method::post()) {$this->content_model->save(method::post());}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user