new pisilinux web sites
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use URI,DB,Cookie,URL,Method;
|
||||
/*
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date: 2017-12-05
|
||||
* Update Date : 2021-11-17
|
||||
*/
|
||||
|
||||
class Blog extends Controller{
|
||||
|
||||
function main(){
|
||||
|
||||
Cookie::insert('returnlink', '');
|
||||
if (Method::post('lang')) {
|
||||
|
||||
$bloglist = contentListAdmin(Method::post('lang'));
|
||||
}else{
|
||||
$bloglist = contentListAdmin('tr');
|
||||
}
|
||||
view::bloglist($bloglist);
|
||||
}
|
||||
|
||||
function category(){
|
||||
$id = explode('-',URI::get('category'));
|
||||
$id = $id['0'];
|
||||
//$data['catlist'] = DB::where('icerik_katid',$id['0'])->get('content')->result();
|
||||
// define('TITLE', ' '.$seo['0']);
|
||||
//import::view(THEMA_NAME.'blog/category_view',$id);
|
||||
|
||||
view::id($id);
|
||||
}
|
||||
|
||||
function content(){
|
||||
|
||||
$id = explode('-',URI::get('content'));
|
||||
$id = $id['0'];
|
||||
|
||||
$row = contentRow($id);
|
||||
if (!$row) {
|
||||
return Masterpage::error404();
|
||||
}
|
||||
|
||||
if (Cookie::select('contentid') != $id) {
|
||||
$hits = $row->hits + 1;
|
||||
DB::where('id', $id)->update('content',['hits' => $hits]);
|
||||
Cookie::time(60 * 60 * 24)->insert('contentid',$id);
|
||||
}
|
||||
|
||||
Masterpage::title($row->title);
|
||||
Masterpage::meta
|
||||
([
|
||||
'name:description' => $row->keywords,
|
||||
'name:keywords' => $row->label
|
||||
]);
|
||||
|
||||
define('TITLE',$row->title);
|
||||
define('LINK','https://blog.pisilinux.og/content/'.$id.'-'.$row->title_seo.'.html');
|
||||
define('DESC',$row->keywords);
|
||||
define('IMG',content_image($row->content));
|
||||
|
||||
view::id($id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use Method, URI, DB, Session, Cookie;
|
||||
|
||||
class Bugs extends Controller{
|
||||
|
||||
function main(){
|
||||
/*
|
||||
Masterpage::meta([
|
||||
'name:title' => settings('title'),
|
||||
'name:description' => contentRow($id)->keywords,
|
||||
'name:keywords' => contentRow($id)->label,
|
||||
]);
|
||||
*/
|
||||
Cookie::insert('returnlink', 'bugs');
|
||||
Masterpage::meta([
|
||||
'name:description' => "Pisilinux istek ve hata kayıtlarının toplandığı alandır",
|
||||
'name:keywords' => "Bugs, hata, istek",
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
function new(){
|
||||
if (Session::select('userid') =='') {
|
||||
redirect('bugs');
|
||||
}
|
||||
if (Method::post()) {$this->bugs_model->new(Method::post());}
|
||||
}
|
||||
|
||||
function edit(){
|
||||
$id = Uri::get('edit');
|
||||
$userid = Session::select('userid');
|
||||
|
||||
if (bugsRow($id)->userid == $userid OR session::select('yetki')=='1') {
|
||||
|
||||
if (Method::post()) {$this->bugs_model->edit(Method::post());}
|
||||
View::id($id)->control('1');
|
||||
}else{
|
||||
view::control('0');
|
||||
//echo "<h1>bu içeriği düzenlemeye yetkili değilsiniz.</h1>";
|
||||
}
|
||||
}
|
||||
|
||||
function search(){
|
||||
}
|
||||
|
||||
function detail(){
|
||||
$id = Uri::get('detail');
|
||||
if (Method::post()) {$this->bugs_model->insert(Method::post());}
|
||||
View::id($id);
|
||||
}
|
||||
|
||||
|
||||
function help(){
|
||||
import::view(THEMA_NAME.'bugs/help');
|
||||
}
|
||||
|
||||
function bugsClose(){
|
||||
$id = Method::post('id');
|
||||
$status = Method::post('status');
|
||||
|
||||
DB::where('id',$id)->update('bugs',[
|
||||
'status' => $status
|
||||
]);
|
||||
|
||||
echo 1;
|
||||
}
|
||||
|
||||
|
||||
function delete($id){
|
||||
$id = Uri::get('delete');
|
||||
$par = explode('&', $id);
|
||||
$id = $par[0];
|
||||
$parentId = $par[1];
|
||||
DB::where('id', $id)->delete('bugs');
|
||||
redirect('bugs/detail/' . $parentId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB,Import,URL,Cookie,Session,ML;
|
||||
class Category extends Controller{
|
||||
|
||||
function main($id){
|
||||
Cookie::insert('returnlink', 'category');
|
||||
$id = explode('-', $id);
|
||||
$id1 = $id['0'];
|
||||
view::id($id1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use Method,Captcha,Session,View;
|
||||
|
||||
class Contact extends Controller{
|
||||
|
||||
function main(){
|
||||
}
|
||||
|
||||
function send(){
|
||||
$name = Method::post('name');
|
||||
$email = Method::post('email');
|
||||
$message = Method::post('message');
|
||||
$token = Method::post('token');
|
||||
|
||||
if ($token !== Captcha::getCode()) {
|
||||
echo '0&'.lang('contact','message4');
|
||||
return;
|
||||
}
|
||||
|
||||
if (empty($name) || strlen($name) < 2) {
|
||||
echo '0&'.lang('contact','nameAlert');
|
||||
return;
|
||||
}
|
||||
|
||||
if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
echo '0&'.lang('contact','mailFaultAlert');
|
||||
return;
|
||||
}
|
||||
|
||||
if (empty($message) || strlen($message) < 10) {
|
||||
echo '0&'.lang('contact','messageAlert');
|
||||
return;
|
||||
}
|
||||
|
||||
$lastTime = Session::select('contact_last_time');
|
||||
|
||||
if ($lastTime !== false && (time() - $lastTime) < 30) {
|
||||
echo '0&'.lang('contact','message1');
|
||||
return;
|
||||
}
|
||||
|
||||
Session::insert('contact_last_time', time());
|
||||
|
||||
$email = strtolower(trim($email));
|
||||
$message2 = '
|
||||
Gönderildiği Yer: Pisilinux İletişim Formu
|
||||
Mesajı Gönderen: '.$name.'
|
||||
Mail Adresi: '.$email.'
|
||||
Mesaj: '.$message;
|
||||
|
||||
telegram($message2);
|
||||
|
||||
echo '1&'.lang('contact','message1');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB;
|
||||
/**
|
||||
* Created By: Erkan IŞIK
|
||||
* Created Date: 2017-05-09
|
||||
*
|
||||
*/
|
||||
class Content extends Controller{
|
||||
|
||||
function main($p = ''){
|
||||
$p = explode('-', $p);
|
||||
|
||||
|
||||
$content = DB::where('id',$p[0])->get('content')->row();
|
||||
|
||||
view::content($content);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php namespace Project\Controllers;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Discord extends Controller
|
||||
{
|
||||
|
||||
function main()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB,Import,URL,Cookie,Session,ML,Method;
|
||||
|
||||
/*
|
||||
* Created By: Erkan IŞIK
|
||||
* Created Date: 2017-12-07
|
||||
* Update Date: 2017-12-07
|
||||
*/
|
||||
class Download extends Controller{
|
||||
|
||||
function main(){
|
||||
//$data = DB::orderBy('id','desc')->get('download')->result();
|
||||
//View::data($data)->get('main');
|
||||
define('TITLE', 'Download');
|
||||
}
|
||||
function counter(){
|
||||
$id = method::post('id');
|
||||
|
||||
$count = DB::whereId($id)->downlinkRowCount();
|
||||
|
||||
DB::where('id',$id)->update('downlink', [
|
||||
'count' => $count+1,
|
||||
]);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB;
|
||||
use Import;
|
||||
use URL;
|
||||
use Cookie;
|
||||
use Session;
|
||||
use ML;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Etiketler extends Controller
|
||||
{
|
||||
|
||||
function main($label){
|
||||
$label = explode('.',$label);
|
||||
|
||||
$data['list'] = $this->blog_model->label_list($label['0']);
|
||||
import::view(THEMA_NAME.'blog/label_view',$data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, ML, Method,URI;
|
||||
/*
|
||||
* Created By: Erkan IŞIK
|
||||
* Created Date: 2017-12-05
|
||||
* Update Date: 2018-01-22
|
||||
*/
|
||||
|
||||
class Forum extends Controller{
|
||||
|
||||
|
||||
function main(){
|
||||
Cookie::insert('returnlink', 'forum');
|
||||
}
|
||||
|
||||
|
||||
function category(){
|
||||
$id = URI::get('category');
|
||||
$id_ext = explode('-', $id);
|
||||
$konular = DB::orderBy('id', 'desc')->where('category_id', $id_ext['0'], 'and')->where('content_id', '0')->get('forum')->result();
|
||||
$kategori = $id;
|
||||
|
||||
define('TITLE', ' ' . forum_kategori_adi($id_ext[0])->adi);
|
||||
View::seokat($id)->konular($konular)->kategori($id);
|
||||
}
|
||||
|
||||
function newsubject(){
|
||||
if (USERID) {
|
||||
if (method::post()) {
|
||||
$this->forum_model->konu_kaydet(method::post());
|
||||
rssForumSonKonular();
|
||||
}
|
||||
}else{
|
||||
redirect('member');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* forum yeni konu girişi*/
|
||||
function newthread(){
|
||||
$id = URI::get('newthread');
|
||||
if (Session::select('userid')) {
|
||||
$id_ext = explode('-', $id);
|
||||
if (method::post()) {$this->forum_model->konu_kaydet1(method::post());}
|
||||
View::id($id);
|
||||
}else{
|
||||
redirect('member');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function subject(){
|
||||
$id = URI::get('subject');
|
||||
$id1 = explode('-',$id);
|
||||
$id2 = $id1['0'];
|
||||
|
||||
if (method::post()) {$this->forum_model->cevap(method::post()); }
|
||||
|
||||
$fk = $this->forum_model->forumkonu($id2);
|
||||
|
||||
if (isset($fk->title_seo)) {
|
||||
|
||||
define('TITLE', ' ' . $fk->title_seo);
|
||||
session::insert('return', 'forum/subject/' . $fk->id . '-' . $fk->title_seo);
|
||||
if (!Cookie::select('count')) {
|
||||
$hits = DB::select('view')->where('id', $id2)->get('forum')->value();
|
||||
$hit = $hits + 1;
|
||||
DB::where('id', $id2)->update('forum', ['view' => $hit]);
|
||||
}
|
||||
Cookie::time(60 * 60 * 24)->insert('count',$id2);
|
||||
|
||||
view::fk($fk);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function konu_duzenle($id){
|
||||
if (method::post()) {$this->forum_model->Update(method::post());}
|
||||
$data['dzn'] = $this->forum_model->edit($id);
|
||||
import::view(THEMA_NAME . 'forum/konu_duzenle', $data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function delete($id){
|
||||
$forum = DB::where('id', $id)->get('forum')->row();
|
||||
if ($forum->content_id > 0) {
|
||||
$link = '/forum/subject/' . $forum->content_id . '-' . seo(forum_title($forum->content_id)->title);
|
||||
} else {
|
||||
$link = '/forum';
|
||||
}
|
||||
DB::where('id', $id)->delete('forum');
|
||||
redirect($link);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import,URL;
|
||||
|
||||
class Galery extends Controller{
|
||||
|
||||
function main(){
|
||||
Import::view(THEMA_NAME.'Galery/main');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php namespace Project\Controllers;
|
||||
USE Cookie,URL;
|
||||
class Home extends Controller{
|
||||
|
||||
public function main(){
|
||||
Cookie::insert('returnlink', '/');
|
||||
|
||||
Masterpage::meta
|
||||
([
|
||||
'name:description' => setting('description'),
|
||||
'name:keywords' => setting('keywords')
|
||||
]);
|
||||
|
||||
Masterpage::title('Pisi GNU/Linux - Özgürlük Şimdi Başladı...');
|
||||
Masterpage::description(setting('description'));
|
||||
Masterpage::keywords(setting('keywords'));
|
||||
|
||||
define('TITLE','Pisi GNU/Linux - Özgürlük Şimdi Başladı...');
|
||||
define('LINK',URL::base());
|
||||
define('DESC','Pisi GNU/Linux - Özgürlük Şimdi Başladı...');
|
||||
define('IMG','http://pisilinux.og/upload/pisilinux_pisi.png');
|
||||
|
||||
// Son 3 blog yazısını ana sayfaya aktar
|
||||
$allBlogs = contentListAdmin(LANG);
|
||||
view::blogList(array_slice((array)$allBlogs, 0, 3));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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('pisiV4/');
|
||||
|
||||
# The current settings are being configured.
|
||||
Masterpage::headPage('Assets/head')
|
||||
->bodyPage('Assets/body');
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, URL, Cookie, Session, ML, Method, Email, URI, Captcha, Validator, Import, Post, Guard;
|
||||
|
||||
/**
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date: 2017-12-06
|
||||
* Update Date : 2018-11-24
|
||||
*/
|
||||
|
||||
|
||||
class Member extends Controller{
|
||||
|
||||
function main(){
|
||||
if(Method::post()) {$this->user_model->logincheck(Method::post());}
|
||||
}
|
||||
|
||||
function register(){
|
||||
$token = Guard::csrftokenkey('register_token');
|
||||
View::token($token);
|
||||
}
|
||||
|
||||
function new_user(){
|
||||
if (!Guard::validcsrftokenkey('register_token')) {
|
||||
echo 'csrf';
|
||||
return;
|
||||
}
|
||||
|
||||
$post = Method::post();
|
||||
|
||||
if (Method::post('captcha') !== Captcha::getCode()) {
|
||||
echo 'captcha';
|
||||
return;
|
||||
}
|
||||
|
||||
if ($post['password'] !== $post['password2']) {
|
||||
echo 'match';
|
||||
return;
|
||||
}
|
||||
|
||||
if (strlen($post['password']) < 6) {
|
||||
echo 'length';
|
||||
return;
|
||||
}
|
||||
|
||||
$data = $this->user_model->yeniuye($post);
|
||||
|
||||
if ($data) {
|
||||
echo '1';
|
||||
}
|
||||
}
|
||||
|
||||
function emailcontrol(){
|
||||
$this->user_model->emailcontrol(Method::post());
|
||||
}
|
||||
|
||||
|
||||
function aktivizasyon(){
|
||||
$act = Uri::get('aktivizasyon');
|
||||
DB::where('aktivizasyon',$act)->update('user',[
|
||||
'aktivizasyon' => '',
|
||||
'status' => '1',
|
||||
]);
|
||||
|
||||
if (DB::affectedRows()) {view::control('1');}else{redirect('/');}
|
||||
}
|
||||
|
||||
function password_forgot(){
|
||||
if (method::post()) {$this->user_model->sifremiunuttum_model(method::post());}
|
||||
|
||||
}
|
||||
|
||||
function ref($data){
|
||||
$exp = explode('-', $data);
|
||||
$ref = $exp['0'].'/'.$exp['1'].'/'.$exp['2'].'-'.seo($exp['3']);
|
||||
Session::insert('ref', $ref);
|
||||
if(method::post()) {$this->user_model->logincheck(method::post());}
|
||||
}
|
||||
|
||||
function yenisifre(){
|
||||
$act = Uri::get('yenisifre');
|
||||
if (method::post()) {$this->user_model->yenisifre(method::post());}
|
||||
|
||||
$id = DB::select('user_id')->where('aktivizasyon',$act)->get('user')->value();
|
||||
$act = $act;
|
||||
View::id($id)->act($act);
|
||||
}
|
||||
|
||||
function logout(){
|
||||
Session::deleteAll();
|
||||
redirect(URL::base());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB,Cookie,Session,URI,URL;
|
||||
/**
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date: 2017-12-24
|
||||
* Update Date : 2020-07-26
|
||||
*
|
||||
*/
|
||||
|
||||
class Page extends Controller{
|
||||
|
||||
function main(){
|
||||
Cookie::insert('returnlink', 'page');
|
||||
$id = URI::get('page');
|
||||
|
||||
|
||||
$url = URL::base()."sayfa/".$id."-".contentRow($id)->title_seo;
|
||||
Masterpage::title(contentRow($id)->title);
|
||||
Masterpage::meta([
|
||||
'name:keywords' => contentRow($id)->label,
|
||||
'name:description' => contentRow($id)->keywords,
|
||||
|
||||
]);
|
||||
|
||||
|
||||
define('TITLE',contentRow($id)->title);
|
||||
define('LINK',$url);
|
||||
define('DESC',contentRow($id)->keywords);
|
||||
define('IMG',content_image(contentRow($id)->content));
|
||||
|
||||
View::id($id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, ML, Method,URI;
|
||||
/*
|
||||
* Created By: Erkan IŞIK
|
||||
* Created Date: 2020-04-23
|
||||
*/
|
||||
|
||||
class question_answer extends Controller{
|
||||
/*
|
||||
function __construct() {
|
||||
|
||||
if (Cookie::select('forum')) {
|
||||
|
||||
if (Cookie::select('forum') == 'sorucevap') {
|
||||
redirect('forum/sorucevap');
|
||||
} else {
|
||||
redirect('forum/forum1');
|
||||
}
|
||||
} else {
|
||||
redirect('forum/sorucevap');
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
function main(){
|
||||
define('TITLE', ' Soru Cevap');
|
||||
define('desc', 'Soru Cevap');
|
||||
import::view(THEMA_NAME . 'question_answer/index');
|
||||
}
|
||||
|
||||
|
||||
function subject($id){
|
||||
|
||||
$par = explode('-', $id);
|
||||
if (method::post()) {$this->forum_model->cevap(method::post());}
|
||||
$data['fk'] = $this->forum_model->forumkonu($par['0']);
|
||||
if (isset($data['fk']->title_seo)) {
|
||||
define('TITLE', ' ' . $data['fk']->title_seo);
|
||||
session::insert('return', 'question_answer/subject/' . $data['fk']->id . '-' . $data['fk']->title_seo);
|
||||
$hits = DB::select('view')->where('id', $par[0])->get('forum')->value();
|
||||
$hit = $hits + 1;
|
||||
DB::where('id', $par[0])->update('forum', ['view' => $hit]);
|
||||
import::view(THEMA_NAME . 'question_answer/subject', $data);
|
||||
} else {
|
||||
import::view(THEMA_NAME . 'question_answer/noSubject');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function category(){
|
||||
$par = URI::category();
|
||||
$par = explode('-', $par);
|
||||
define('TITLE', 'Soru cevap / category');
|
||||
$data['id'] = $par['0'];
|
||||
import::view(THEMA_NAME . 'question_answer/category', $data);
|
||||
}
|
||||
|
||||
function newsubject(){
|
||||
$par = URI::newsubject();
|
||||
$par = explode('-', $par);
|
||||
if (method::post()) {$this->questionanswer_model->newsubject(method::post());}
|
||||
$data['id'] = $par['0'];
|
||||
import::view(THEMA_NAME . 'question_answer/newsubject',$data);
|
||||
}
|
||||
|
||||
function nocatnewsubject(){
|
||||
if (method::post()) {
|
||||
output(method::post());
|
||||
$this->questionanswer_model->newsubject1(method::post());
|
||||
}
|
||||
import::view(THEMA_NAME . 'question_answer/noCategoryNewSubject');
|
||||
}
|
||||
|
||||
function delete($id){
|
||||
$par = explode('-', $id);
|
||||
$id = $par['0'];
|
||||
$link = 'question_answer/category/'.$par['1'].'-'.forum_kategori_row($par['1'])->adi_seo;
|
||||
|
||||
DB::where('id', $id)->delete('forum');
|
||||
redirect($link);
|
||||
}
|
||||
|
||||
|
||||
function edit($id){
|
||||
|
||||
if (Method::post()) {$this->questionanswer_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;}
|
||||
$data['id'] = $id;
|
||||
$data['id1'] = $id1;
|
||||
import::view(THEMA_NAME.'question_answer/edit', $data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use Import, URI, DB, Method;
|
||||
|
||||
class Search extends Controller{
|
||||
|
||||
function main(){
|
||||
$search = Method::post('search');
|
||||
|
||||
Masterpage::title('Search | Pisi GNU/Linux');
|
||||
|
||||
|
||||
$blogsearch =blogSearch($search);
|
||||
|
||||
$forumsearch = forumSearch($search);
|
||||
$wikisearch = wikiSearch($search);
|
||||
|
||||
View::wikisearch($wikisearch)->blogsearch(blogsearch($search))->forumsearch(forumSearch($search))->search($search);
|
||||
|
||||
//Import::view(THEMA_NAME.'Search/index',$data);
|
||||
}
|
||||
|
||||
function mesaj(){
|
||||
Masterpage::title('Forum Search | Pisi GNU/Linux');
|
||||
$id = Uri::mesaj();
|
||||
$acilankonu = DB::where('content_id','0','and')->where('user_id',$id)->forum()->result();
|
||||
view::konulistesi($acilankonu);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use Import, URL;
|
||||
class Show404 extends Controller{
|
||||
|
||||
function main(){
|
||||
import::view(THEMA_NAME.'show404');
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php namespace Project\Controllers;
|
||||
|
||||
class Sss extends Controller{
|
||||
|
||||
function main(){
|
||||
$liste = $this->sss_model->listele();
|
||||
View::liste($liste);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB,URI,Cookie, Method;
|
||||
/*
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date: 2017-12-24
|
||||
* Update Date : 2018-02-15
|
||||
*/
|
||||
class Wiki extends Controller{
|
||||
|
||||
|
||||
function main(){
|
||||
Cookie::insert('returnlink', 'wiki');
|
||||
$catlist = $this->wiki_model->catlist();
|
||||
View::catlist($catlist);
|
||||
}
|
||||
|
||||
|
||||
function category(){
|
||||
$id = explode('-',URI::get('category'));
|
||||
$id = $id['0'];
|
||||
|
||||
//$wikikat = $this->wiki_model->wikikat($kat_id);
|
||||
|
||||
//$kategori_name = $id['0'];
|
||||
View::id($id);
|
||||
}
|
||||
|
||||
function content(){
|
||||
$id = explode('-',URI::get('content'));
|
||||
$id = $id['0'];
|
||||
|
||||
View::id($id);
|
||||
if (!Cookie::select('hit')) {
|
||||
$data['content'] = $this->wiki_model->content($id);
|
||||
DB::where('id',$data['content']->id)->update('wiki',['hits' => $data['content']->hits+1,]);
|
||||
Cookie::time(60 * 60 * 24)->insert('hit','1');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//define('title', ' '.$data['content']->baslik);
|
||||
//define('keywords', $data['content']->keywords);
|
||||
//define('desc', kelimebol($data['content']->detay,200) );
|
||||
//define('img', content_image($data['content']->detay));
|
||||
|
||||
//import::view(THEMA_NAME.'wiki/content_view',$data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function preview(){
|
||||
view::id(URI::get('preview'));
|
||||
}
|
||||
|
||||
function search(){
|
||||
$q = Method::get('q');
|
||||
$results = [];
|
||||
if (strlen(trim($q ?? '')) >= 2) {
|
||||
$results = wikiSearch($q);
|
||||
}
|
||||
View::q($q)->results($results);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB;
|
||||
use Import;
|
||||
use URL;
|
||||
use Cookie;
|
||||
use Session;
|
||||
use ML;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Ajax extends Controller{
|
||||
|
||||
function downup(){
|
||||
$id = method::post('count');
|
||||
$d = DB::select('count')->where('id',$id)->get('download')->value();
|
||||
DB::where('id',$id)->update('download',[
|
||||
'count' => $d+1,
|
||||
]);
|
||||
|
||||
$sayi = DB::select('count')->where('id',$id)->get('download')->value();
|
||||
|
||||
echo $sayi.'-'.$id;
|
||||
}
|
||||
|
||||
function forumcevapsil(){
|
||||
$id = method::post('id');
|
||||
DB::where('id',$id)->delete('forum');
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB,Import,DBTool,URL,File,Email;
|
||||
|
||||
class Back extends Controller{
|
||||
|
||||
function main(){
|
||||
|
||||
$dbname = 'pisilinuxorg_pisi20';
|
||||
|
||||
$path = REAL_BASE_DIR.'DbBackups/';
|
||||
|
||||
$backup_file = $path.$dbname.'_'.date("Y-m-d_H-i-s").'.bzip2';
|
||||
|
||||
$fileName = $dbname .'_'.date("Y-m-d_H-i-s").'.sql';
|
||||
$message = $fileName.' veritabanı yedeklemesi yapıldı.';
|
||||
$ff = $path.'pisilinuxorg_pisi20_2022-02-18_01-06-02.bzip2';
|
||||
$dbtool = DBTool::backup('*', $fileName, $path);
|
||||
|
||||
file_put_contents("compress.bzip2://$backup_file", file_get_contents($path.$fileName));
|
||||
File::delete($path.$fileName);
|
||||
|
||||
Email::from('info@pisilinux.org', 'Pisi Linux','info@pisilinux.org')
|
||||
->receiver('admins@pisilinux.org')
|
||||
->subject('DB Backup')
|
||||
->message($message)
|
||||
->attachment($backup_file)
|
||||
->send();
|
||||
telegram($message);
|
||||
|
||||
}
|
||||
|
||||
function dizin(){
|
||||
$list = ftp::files('/2.0-Beta.1/');
|
||||
|
||||
foreach ($list as $key) {
|
||||
$par = explode('/', $key);
|
||||
echo '<a href="/back/dizin/'.$par['2'].'">'.$par['2'].'</a><br>';
|
||||
|
||||
|
||||
//echo $par['2'].'<br>';
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user