new pisilinux web sites

This commit is contained in:
Erkan IŞIK
2026-07-01 16:44:17 +03:00
commit b58488b586
21740 changed files with 2066209 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
class Duyuru_model extends Model
{
function new($post)
{
DB::insert('duyuru',[
'title' => $post['title'],
'text' => $post['duyuru'],
'lang' => $post['lang']
]);
if (!DB::error()) {
redirect('duyuru');
}
}
function update($post)
{
DB::where('id',$post['id'])->update('duyuru',[
'title' => $post['title'],
'text' => $post['duyuru'],
'lang' => $post['lang'],
'status' => $post['status']
]);
if (!DB::error()) {
redirect('duyuru');
}
}
function contentList(){
return DB::duyuruResult();
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
class Language_model extends Model{
function new($post){
DB::insert('language',[
'language' => $post['language'],
'slug' => $post['slug'],
'seo' => seo($post['language']),
'flag' => $post['flag'],
]);
if (!DB::error()){redirect('language');}
}
function update($post){
DB::where('id',$post['id'])->update('language',[
'language' => $post['language'],
'slug' => $post['slug'],
'seo' => seo($post['language']),
'flag' => $post['flag'],
]);
if (!DB::error()){redirect('language');}
}
}
+19
View File
@@ -0,0 +1,19 @@
<?php
class Bugs_model extends Model{
function bugs_update($post){
DB::where('id',$post['id'])->update('bugs', [
'title' => $post['title'],
'titleSeo' => seo($post['title']),
'tasktype' => $post['tasktype'],
'status' => $post['status'],
'system' => $post['system'],
'details' => $post['details'],
]);
if (!DB::error()) {
redirect('bugs');
}
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
/**
* Created By : Erkan IŞIK
* Created Date : 2018-02-13
* Update Date : 2019-02-27
*/
class Category_model extends Model{
function new($post){
DB::insert('content_category',[
'name' => $post['name'],
'name_seo' => seo($post['name']),
'description' => $post['description'],
'parentId' => $post['parentId'],
'lang' => $post['lang']
]);
if (!DB::error()){redirect('blog/category');}
}
function update($post){
DB::where('id',$post['id'])->update('content_category',[
'name' => $post['name'],
'name_seo' => seo($post['name']),
'description' => $post['description'],
'parentId' => $post['parentId'],
'lang' => $post['lang']
]);
if (!DB::error()){redirect('blog/category');}
}
}
+68
View File
@@ -0,0 +1,68 @@
<?php
/*
* Created By: Erkan IŞIK
* Created Date: 2018-09-04
* Update Date: 2020-09-04
*/
class Content_model extends Model{
function new($post){
DB::insert('content',[
'title' => $post['title'] ,
'title_seo' => seo($post['title']),
'content' => $post['content'],
'keywords' => $post['keywords'],
'status' => $post['status'],
'label' => $post['label'],
'category_id' => $post['category'] ,
'mainpage' => $post['mainpage'],
'editor' => $post['editor'],
'content_type' => 'content',
'lang' => $post['lang']
]);
if (DB::affectedRows()) {redirect('blog');}
}
function update($post){
DB::where('id',$post['id'])->update('content',[
'title' => $post['title'] ,
'title_seo' => seo($post['title']),
'content' => $post['content'],
'keywords' => $post['keywords'],
'status' => $post['status'],
'label' => $post['label'],
'category_id' => $post['category'] ,
'mainpage' => $post['mainpage'],
'lang' => $post['lang'],
'editor' => $post['editor']
]);
if (DB::affectedRows()) {redirect('blog');}
}
function copy($post){
DB::insert('content',[
'title' => $post['title'] ,
'title_seo' => seo($post['title']),
'content' => $post['content'],
'keywords' => $post['keywords'],
'status' => $post['status'],
'label' => $post['label'],
'category_id' => $post['category'] ,
'mainpage' => $post['mainpage'],
'editor' => $post['editor'],
'content_type' => 'content',
'lang' => $post['lang'],
'hits' => '1'
]);
if (DB::affectedRows()) {redirect('blog');}
}
}
+101
View File
@@ -0,0 +1,101 @@
<?php
/*
* Created By: Erkan IŞIK
* Created Date: 2017-12-07
* Update Date: 2018-04-26
*/
class Download_model extends Model {
function new ($post) {
$sumx = implode(',', $post['sumx']);
DB::insert('download', [
'name' => $post['name'],
'content' => $post['content'],
'lang' => $post['lang'],
'sumx' => $sumx,
'status' => '1',
]);
if (DB::affectedRows()) {
$id = DB::insertID();
//s$count = count($post['downlink']);
DB::where('id', $id)->update('download', ['parentId' => $id]);
foreach ($post['downlink'] as $key) {
DB::insert('downlink', [
'country' => $key[0],
'link' => $key[1],
'downloadId' => $id,
'count' => '0',
'status' => '1',
]);
}
redirect('download');
} else {
echo DB::error();
}
}
function copy($post) {
$sumx = implode(',', $post['sumx']);
$parentid = downloadParentId($post['id']);
DB::insert('download', [
'name' => $post['name'],
'content' => $post['content'],
'lang' => $post['lang'],
'sumx' => $sumx,
'status' => 1,
]);
if (DB::affectedRows()) {
$id = DB::insertID();
$count = count($post['downlink']);
foreach($post['downlink'] as $key){
DB::insert('downlink',[
'country' => $key[0],
'link' => $key[1],
'downloadId' => $id,
'count' =>'0',
'status' => 1,
]);
}
redirect('download');
}else{
echo DB::error();
}
}
function update($post) {
$sumx = implode(',', $post['sumx']);
DB::where('id', $post['id'])->update('download', [
'name' => $post['name'],
'content' => $post['content'],
'lang' => $post['lang'],
'sumx' => $sumx,
]);
DB::where('downloadId', $post['id'])->delete('downlink');
foreach ($post['downlink'] as $key) {
if ($key[3] == "") {
$status = '1';
} else {
$status = $key[3];
}
DB::insert('downlink', [
'country' => $key[0],
'link' => $key[1],
'downloadId' => $post['id'],
'count' => $key[2],
'status' => $status
]);
}
redirect('download');
}
}
+56
View File
@@ -0,0 +1,56 @@
<?php
/**
*
*/
class Forum_model extends Model{
function cat_insert($post){
$adi_seo = seo($post['adi']);
return DB::insert('forum_kat',[
'adi' => $post['adi'],
'adi_seo' => $adi_seo,
'aciklama' => $post['aciklama'],
'kat_ustid' => $post['kat_ustid']
]);
hataVarmi('panel/forum');
}
function katlist(){return DB::where('kat_ustid','0')->get('forum_kat')->result();}
function kat_edit($post){
return DB::where('id',$post)->get('forum_kat')->row();
}
function cat_update($post){
$adi_seo = seo($post['adi']);
DB::where('id',$post['id'])->update('forum_kat',[
'adi' => $post['adi'],
'adi_seo' => $adi_seo,
'aciklama' => $post['aciklama'],
'kat_ustid' => $post['kat_ustid'],
'status' => $post['status']
]);
redirect('forum/category_list');
}
function update($post){
DB::where('id',$post['id'])->update('forum',[
'title' => $post['title'],
'title_seo' => seo($post['title']),
'content' => $post['content'],
'user_id' => Session::select('userid'),
'category_id' => $post['category']
]);
if (DB::affectedRows()) {
redirect('forum/konu/'.$post['id']);
}
}
}
+12
View File
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>403 Erişim Engellendi</title>
</head>
<body>
<p>Dizin Erişimi Engellendi!</p>
</body>
</html>
+61
View File
@@ -0,0 +1,61 @@
<?php
/**
* Created By: Erkan IŞIK
* Created Date: 2017-08-28
*/
class Login_model extends Model{
function userControl($data){
$password = md5($data['pass']);
$user = DB::where('mail', $data['mail'], 'and')
->where('password', $password,'and')
->where('authority','1')
->get('user')
->row();
if($user){
Session::insert('ADMINLOGIN', True);
Session::insert('username', $user->username);
Session::insert('userid', $user->user_id);
DB::where('user_id',$user->user_id)->update('user',[
'login_date' => date('Y-m-d H:i:s'),
]);
redirect(URL::base().'panel');
}
}
function passrename($post){
$pass = md5($post['pass']);
$passcontrol = DB::where('password',$pass)->get('user')->row();
if(DB::affectedRows()){
if($post['newpass'] == $post['newpassrepeat']){
$userid = Session::select('userid');
$newpass = md5($post['newpass']);
DB::where('user_id', 1)->update('user',['password' => $newpass,]);
if(DB::affectedRows()){
redirect(URL::base('panel/home/logout'));
}
}else{
return 'Yeni girdiğiniz şifre ve şifre tekrar uyuşmuyor!';
}
}else{
return 'Eski şifrenizi yanlış girdiniz...';
}
}
}
+48
View File
@@ -0,0 +1,48 @@
<?php
/**
*
*/
class Member_model extends Model{
function active_member(){
return DB::orderBy('user_id','desc')->where('status','1')->get('user')->result();
}
function pending_member(){
return DB::select('user_id','date','username','mail','aktivizasyon')->orderBy('user_id','asc')->where('status','0')->get('user')->result();
}
function disable_member(){
return DB::orderBy('user_id','asc')->where('status','2')->get('user')->result();
}
function edit($id){
return DB::where('user_id',$id)->get('user')->row();
}
function update($post){
if ($post['aktivizasyon'] == '') {
$aktivizasyon = '0';
}else{
$aktivizasyon = $post['aktivizasyon'];
}
DB::where('user_id',$post['id'])->update('user',[
'username' => $post['username'],
'mail' => $post['mail'],
'status' => $post['status'],
'authority' => $post['authority'],
'aktivizasyon' => $aktivizasyon
]);
if (DB::error()) {
jalert(DB::error());
}else{
redirect('user');
}
}
}
+99
View File
@@ -0,0 +1,99 @@
<?php
/*
* Created By: Erkan IŞIK
* Created Date: 2017-12-10
* Update Date: 2018-02-14
*/
class Menu_model extends Model{
function menuname_save($post)
{
DB::insert('menucat',[
'name' => $post['menuname'],
'nameSeo' => seo($post['menuname']),
]);
redirect('menu');
}
function menusave($post){
$link ='';
if (!empty($post['link'])) {
$link = $post['link'];
}else{
$link = $post['link1'];
}
DB::insert('menu',[
'menuCatId' => $post['menuCatId'],
'title' => $post['title'],
'nameSeo' => seo($post['title']),
'link' => $link,
'lang' => $post['lang'],
'icon' => $post['icon'],
'language' => ''
]);
if (!DB::error()) {
redirect('menu');
}
}
function edit($post){
$link ='';
if (!empty($post['link'])) {
$link = $post['link'];
}else{
$link = $post['link1'];
}
DB::where('id',$post['id'])->update('menu',[
'menuCatId' => $post['menuCatId'],
'title' => $post['title'],
'nameSeo' => seo($post['title']),
'link' => $link,
'lang' => $post['lang'],
'icon' => $post['icon'],
]);
if (!DB::error()) {
redirect('menu');
}
}
function copy($post){
$link ='';
if (!empty($post['link'])) {
$link = $post['link'];
}else{
$link = $post['link1'];
}
DB::insert('menu',[
'menuCatId' => $post['menuCatId'],
'title' => $post['title'],
'nameSeo' => seo($post['title']),
'link' => $link,
'lang' => $post['lang'],
'icon' => $post['icon'],
'language' => ''
]);
if (!DB::error()) {
redirect('menu');
}
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
class Message_model extends Model{
function send($data){
DB::insert('messages',[
'title' => 'Pisi GNU/Linux Yönetim',
'userId' => $data['userid'],
'message' => $data['message'],
'admin' => '0',
]);
}
}
+59
View File
@@ -0,0 +1,59 @@
<?php
/**
* Created By: Erkan IŞIK
* Created Date: 2017-09-05
* Update Date: 2018-08-25
*/
class Page_model extends model{
function page_list(){
return DB::orderBy('id','desc')->where('content_type','page')->get('content')->result();
}
function new($post){
DB::insert('content',[
'title' => $post['title'] ,
'title_seo' => seo($post['title']),
'content' => $post['content'],
'keywords' => $post['keywords'],
'status' => 1,
'label' => $post['label'],
'editor' => Session::select('userid'),
'content_type' => 'page',
'lang' => $post['lang'],
'category_id' => '0',
'mainpage' => '0',
'hits' => '0',
]);
if (DB::error()) {
echo DB::error();
}else{
redirect('page');
}
}
function Update($post){
DB::where('id',$post['id'])->update('content',[
'title' => $post['title'] ,
'title_seo' => seo($post['title']),
'content' => $post['content'],
'keywords' => $post['keywords'],
'status' => $post['status'],
'label' => $post['label'],
'editor' => Session::select('userid'),
'content_type' => 'page'
]);
redirect('page');
}
}// class sonu
+94
View File
@@ -0,0 +1,94 @@
<?php
/**
* Created By : Erkan IŞIK
* Created Date: 2017-09-05
* Update Date : 2018-02-13
*/
class Panel extends model{
function setting_update($post){
DB::where('id',$post['id'])->update('settings',[
'title' => $post['title'],
'value' => $post['value']
]);
/*
*/
/*
DB::update('settings',[
'logo' => $logo_path,
'favicon' => $favicon_path,
'title' => $post['title'],
'siteurl' => $post['siteurl'],
'description' => $post['description'],
'keywords' => $post['keywords'],
'author' => $post['author'],
'email' => $post['email'] ,
'facebook' => $post['facebook'],
'twitter' => $post['twitter'],
'instagram' => $post['instagram'],
'linkedin' => $post['linkedin'],
'youtube' => $post['youtube'],
'github' => $post['github'],
'telegram' => $post['telegram'],
'discord' => $post['discord'],
'slogan' => $post['slogan'],
'smtphost' => $post['smtphost'],
'smtpuser' => $post['smtpuser'],
'smtppassword' => $post['smtppassword'],
'smtpport' => $post['smtpport'],
'theme' => $post['theme'],
'yas' => $post['yas'],
]);
*/
//echo DB::Error();
redirect('setting');
}
function logo_update(){
if($_FILES["logo"]["name"]){
unlink(pathinfo($_SERVER['SCRIPT_FILENAME'],PATHINFO_DIRNAME).'/'.settings('logo'));
Upload::settings([
'encode' => false,
'prefix' => 'logo-',
'extensions' => 'jpg|jpeg|png',
])->target('upload')->start('logo');
$logo_path = Upload::info()->path;
}else{
$logo_path = setting('logo');
}
DB::where('title', 'logo')->update('settings',[
'value' => $logo_path,
]);
}
function favicon_update(){
if($_FILES["favicon"]["name"]){
unlink(pathinfo($_SERVER['SCRIPT_FILENAME'],PATHINFO_DIRNAME).'/'.settings('favicon'));
Upload::settings([
'encode' => false,
'prefix' => 'fav-',
'extensions' => 'ico',
])->target('upload')->start('favicon');
$favicon_path = Upload::info()->path;
}else{
$favicon_path = setting('favicon');
}
DB::where('title', 'favicon')->update('settings',[
'value' => $favicon_path,
]);
}
function theme_update(){
DB::where('title', 'theme')->update('settings',[
'value' => $post['theme'],
]);
}
}// class sonu
+72
View File
@@ -0,0 +1,72 @@
<?php
/*
* Created By: Erkan IŞIK
* Created Date: 2017-12-05
* Update Date: 2017-12-05
*/
class Slider_model extends model{
function new_slider_save($post){
Upload::settings([
'encode' => false,
'prefix' => '__slider-',
'extensions' => 'jpg|png|gif|jpeg',
])->target('upload/slider')->start('resim');
DB::insert('slider',[
'baslik' => $post['baslik'],
'aciklama' => $post['aciklama'],
'resim' => Upload::info()->path,
'link' => $post['link'],
'durum' => '1',
]);
if (DB::affectedRows()) {
redirect('slayt');
}else{
output(DB::error());
}
}
function slider_update($post){
if($_FILES['resim']['name']){
Upload::settings([
'encode' => false,
'prefix' => '__slider-',
'extensions' => 'jpg|png|gif',
])->target('upload')->start('resim');
DB::where('id',$post['id'])->update('slider',[
'baslik' => $post['baslik'],
'aciklama' => $post['aciklama'],
'resim' => Upload::info()->path,
'link' => $post['link'],
'durum' => $post['status'],
]);
redirect('slayt');
}else{
DB::where('id',$post['id'])->update('slider',[
'baslik' => $post['baslik'],
'aciklama' => $post['aciklama'],
'link' => $post['link'],
'durum' => $post['status'],
]);
redirect('slayt');
}
}
function delete($id){
$resimlink = DB::select('resim')->where('id',$id)->get('slider')->value();
unlink(pathinfo($_SERVER['SCRIPT_FILENAME'],PATHINFO_DIRNAME).'/'.$resimlink);
DB::where('id',$id)->delete('slider');
redirect('slayt');
}
}
+32
View File
@@ -0,0 +1,32 @@
<?php
class Sss_model extends Model{
function liste(){
return DB::get('sss')->result();
}
function new($post){
DB::insert('post:sss');
if (DB::affectedRows()) {
redirect('sss');
}else{
jalert(DB::error());
}
}
function update($post){
DB::where('id',$post['id'])->update('post:sss');
if (DB::affectedRows()) {
redirect('sss');
}else{
jalert(DB::error());
}
}
function edit($id){
return DB::where('id',$id)->get('sss')->row();
}
}
+99
View File
@@ -0,0 +1,99 @@
<?php
/**
* Created By : Erkan IŞIK
* Created Date: 2017-12-27
* Update Date : 2019-01-06
*/
class Wiki_model extends model{
function content_list(){return DB::orderBy('id','desc')->get('wiki')->result();}
function edit($id){return DB::where('id',$id)->get('wiki')->row();}
function new_category_save($post){
/* Wiki kategori resmini yüklüyoruz */
Upload::settings([
'encode' => false,
'prefix' => 'wiki_cat_',
'extensions' => 'jpg|png|gif',
])->target('upload')->start('resim');
/* Yeni wiki kategori adını veritabanına kaydediyoruz */
if (Upload::info()->path) {
$image = Upload::info()->path;
}else{
$image = " ";
}
DB::insert('wiki_kat',[
'adi' => $post['kategori'],
'adi_seo' => seo($post['kategori']),
'kat_ustid' => $post['ustkategori'],
'aciklama' => $post['aciklama'],
'img' => $image,
'lang' => $post['lang']
]);
if (DB::affectedRows()) {redirect('wiki/category');}
}
function edit_category_save($post){
/* Wiki kategori resmini yüklüyoruz */
Upload::settings([
'encode' => false,
'prefix' => 'wiki_cat_',
'extensions' => 'jpg|png|gif',
])->target('upload')->start('resim');
/* Yeni wiki kategori adını veritabanına kaydediyoruz */
if (Upload::info()->path) {
$image = Upload::info()->path;
}else{
$image = " ";
}
DB::where('id',$post['id'])->update('wiki_kat',[
'adi' => $post['kategori'],
'adi_seo' => seo($post['kategori']),
'kat_ustid' => $post['ustkategori'],
'aciklama' => $post['aciklama'],
'img' => $image,
'lang' => $post['lang']
]);
if (DB::affectedRows()) {redirect('wiki/category');}
}
function new_content_save($post){
/* Yeni wiki içeriğini veritabanına kaydediyoruz */
DB::insert('wiki',[
'baslik' => $post['baslik'] ,
'baslik_seo' => seo($post['baslik']),
'detay' => $post['yazi'],
'keywords' => $post['keywords'],
'label' => $post['etiket'],
'katid' => $post['kategori'] ,
'editor' => Session::select('userid'),
'hits' => '0'
]);
if (DB::affectedRows()) {redirect('wiki_content');}else{jalert(DB::error());}
}
function wiki_update($post){
/* Yeni wiki içeriğini veritabanını güncelliyoruz */
DB::where('id',$post['id'])->update('wiki',[
'baslik' => $post['baslik'] ,
'baslik_seo' => seo($post['baslik']),
'detay' => $post['yazi'],
'keywords' => $post['keywords'],
'label' => $post['etiket'],
'katid' => $post['kategori'] ,
'durum' => $post['durum'],
'deleted' => $post['deleted'],
'lang' => $post['lang']
]);
if (DB::error()){jalert(DB::error());}else{redirect('wiki');}
}
}// class sonu