30 lines
630 B
PHP
30 lines
630 B
PHP
<?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());}
|
|
}
|
|
|
|
|
|
} |