61 lines
1.5 KiB
PHP
61 lines
1.5 KiB
PHP
<?php namespace Project\Controllers;
|
|
use DB, Import, URL, Cookie, Session, URI, Method;
|
|
|
|
/**
|
|
* Created By : Erkan IŞIK
|
|
* Created Date: 2017-12-27
|
|
* Update Date : 2022-09-07
|
|
*/
|
|
class Wiki extends Controller{
|
|
|
|
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
|
|
|
function main(){
|
|
$sql = $this->wiki_model->content_list();
|
|
View::yazilist($sql)->get('main');
|
|
}
|
|
|
|
function edit(){
|
|
if (method::post()) {$this->wiki_model->wiki_update(method::post());}
|
|
View::id(URI::get('edit'));
|
|
|
|
}
|
|
|
|
function update(){View::id(URI::get('update'));}
|
|
|
|
function delete(){
|
|
$id = URI::get('delete');
|
|
DB::where('id', $id)->update('wiki',['durum'=>'0']);
|
|
redirect('wiki');
|
|
}
|
|
|
|
function adminDelete(){
|
|
DB::where('id',URI::get('adminDelete'))->delete('wiki');
|
|
redirect('wiki');
|
|
}
|
|
|
|
function adminUpdateDelete(){
|
|
$id = URI::get('adminUpdateDelete');
|
|
DB::where('id',$id)->delete('wiki_update');
|
|
redirect('wiki');
|
|
}
|
|
|
|
function new_content(){if (method::post()) {$this->wiki_model->new_content_save(method::post());}}
|
|
|
|
|
|
function category(){
|
|
$data = DB::where('kat_ustid','30')->get('wiki_kat')->result();
|
|
view::katList($data);
|
|
}
|
|
|
|
function new_category(){if (method::post()) {$this->wiki_model->new_category_save(method::post());}}
|
|
|
|
function catEdit(){
|
|
if (method::post()) {$this->wiki_model->edit_category_save(method::post());}
|
|
$data = DB::where('id',URI::get('catEdit'))->wiki_katRow();
|
|
view::edit($data);
|
|
}
|
|
|
|
|
|
|
|
} |