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());}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php namespace Project\Controllers;
|
||||
|
||||
use DB, Import, URL, Cookie, Session, URI, Method;
|
||||
|
||||
class Forum extends Controller{
|
||||
|
||||
function main(){
|
||||
$messages = $this->forum_model->messages();
|
||||
$mymessages = $this->forum_model->mymessages();
|
||||
View::messages($messages)->mymessages($mymessages);
|
||||
}
|
||||
|
||||
function edit() {
|
||||
$id = URI::get('edit');
|
||||
|
||||
if (Method::post()) {$this->forum_model->update(Method::post());}
|
||||
|
||||
$query = DB::where('id', $id)->get('forum')->row();
|
||||
|
||||
if ($query->content_id == '0') {$id1 = $query->id;} else {$id1 = $query->content_id;}
|
||||
|
||||
view::id($id)->id1($id1);
|
||||
}
|
||||
|
||||
function message_edit(){
|
||||
$id = URI::get('message_edit');
|
||||
if (Method::post()) {$this->forum_model->update(Method::post());}
|
||||
$data['edit'] = $this->forum_model->edit($id);
|
||||
import::view('forum/message_edit', $data);
|
||||
}
|
||||
|
||||
function tasi(){
|
||||
if (Method::post()) {
|
||||
$this->forum_model->tasi(Method::post());
|
||||
}
|
||||
$id = URI::get('tasi');
|
||||
$cat_id = DB::where('id',$id)->forumRow();
|
||||
view::id($id)->catid($cat_id->category_id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use Import, Url, Method;
|
||||
|
||||
class Galery extends Controller{
|
||||
function main(){
|
||||
|
||||
Import::view('Galery/main');
|
||||
|
||||
}
|
||||
|
||||
function new(){
|
||||
if(Method::post()){
|
||||
$this->galeryModel->new(Method::post());
|
||||
}
|
||||
Import::view('Galery/new');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php namespace Project\Controllers;
|
||||
|
||||
|
||||
class Home extends Controller{
|
||||
|
||||
function main(){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php namespace Project\Controllers;
|
||||
|
||||
class Initialize extends Controller
|
||||
{
|
||||
/**
|
||||
* The codes to run at startup.
|
||||
* It enters the circuit before all controllers.
|
||||
* You can change this setting in Config/Starting.php file.
|
||||
*/
|
||||
public function main()
|
||||
{
|
||||
# The theme is activated.
|
||||
# Location: Resources/Themes/Default/
|
||||
Theme::active('Default');
|
||||
|
||||
# The current settings are being configured.
|
||||
Masterpage::headPage('assets/head')
|
||||
->bodyPage('assets/body');
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, URI;
|
||||
|
||||
|
||||
class Messages extends Controller
|
||||
{
|
||||
public function main(){
|
||||
//Import::view('messages/index');
|
||||
}
|
||||
|
||||
function content($id){
|
||||
|
||||
DB::where('id',$id)->update('messages',['status'=>'1']);
|
||||
view::id($id);
|
||||
}
|
||||
|
||||
function delete(){
|
||||
DB::where('id',Uri::get('delete'))->delete('messages');
|
||||
redirect('messages');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, Method, ML;
|
||||
/**
|
||||
* Created By: Erkan IŞIK
|
||||
* Created Date: 2017-08-28
|
||||
* Update Date : 2018-01-01
|
||||
*/
|
||||
class User extends Controller{
|
||||
|
||||
function main(){
|
||||
if (method::post()) {$this->login_model->update(method::post());}
|
||||
$profil = DB::where('user_id',Session::select('userid'))->get('user')->row();
|
||||
|
||||
view::profil($profil);
|
||||
}
|
||||
|
||||
function passrename()
|
||||
{
|
||||
if(method::post()){$data['message'] = $this->login_model->passrename(method::post());}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function deleted(){
|
||||
//Import::view('user/deleted');
|
||||
}
|
||||
|
||||
|
||||
function logout(){
|
||||
Session::deleteAll();
|
||||
redirect(URL::base());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, URI, Method;
|
||||
/**
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date: 2017-08-30
|
||||
* Update Date : 2021-01-20
|
||||
*/
|
||||
|
||||
class Wiki extends Controller{
|
||||
|
||||
|
||||
function __construct(){
|
||||
Cookie::insert('page','wiki');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function main(){
|
||||
|
||||
$yazilist = $this->wiki_model->liste();
|
||||
$onay = $this->wiki_model->onay();
|
||||
|
||||
view::yazilist($yazilist)->onay($onay);
|
||||
}
|
||||
|
||||
function edit(){
|
||||
$id = URI::get('edit');
|
||||
if (method::post()){$this->wiki_model->update(method::post());}
|
||||
|
||||
//$content = $this->wiki_model->edit(URI::get('edit'));
|
||||
view::id($id);
|
||||
}
|
||||
|
||||
function delete(){
|
||||
$id = URI::get('delete');
|
||||
if (method::post()) {
|
||||
$title = ' [ Silinme talebi ] '.wikiContentRow($id)->baslik;
|
||||
|
||||
DB::insert('messages',[
|
||||
'admin'=>'1',
|
||||
'userId' => USERID,
|
||||
'title' => $title,
|
||||
'message' => Method::post('message')
|
||||
]);
|
||||
|
||||
DB::where('id',$id)->update('wiki',[
|
||||
'deleted' => '1'
|
||||
]);
|
||||
if (!DB::error()) {
|
||||
telegram('Wiki içeriklerinden birinin sahibi tarafından silinme talebi gönderildi. Lütfen kontrol edin!');
|
||||
redirect('wiki');
|
||||
}
|
||||
|
||||
}
|
||||
//import::view('wiki/delete');
|
||||
|
||||
|
||||
}
|
||||
|
||||
function new(){
|
||||
if (method::post()) {$this->wiki_model->yeni(method::post());}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, Method;
|
||||
|
||||
class Ajax extends Controller{
|
||||
|
||||
function dissolved(){
|
||||
|
||||
$id = Method::post('id');
|
||||
$s = DB::select('dissolved')->where('id',$id)->get('forum')->value();
|
||||
|
||||
|
||||
if ($s == '1') {
|
||||
$dissolved = '0';
|
||||
}else{
|
||||
$dissolved = '1';
|
||||
}
|
||||
DB::where('id',$id)->update('forum',['dissolved' => $dissolved]);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user