new pisilinux web sites
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, ML, Method, Email;
|
||||
|
||||
class Ajax extends Controller{
|
||||
|
||||
function activemailSend(){
|
||||
/*
|
||||
$kisibul = DB::where('aktivizasyon', method::post('par'))->get('user')->row();
|
||||
$mesaj = "
|
||||
Merhaba $kisibul->username.<br>
|
||||
Sitemize kayıt olduğunuz için teşekkür ederiz.<br>
|
||||
Aşağıdaki linke tıklayarak üyeliğinizi aktif edebilirsiniz.<br>
|
||||
<a href=\"http://pisilinux.org/uye/aktivizasyon/$kisibul->aktivizasyon\">Üyelik aktif etmek için lütfen buraya tıklayın.</a>
|
||||
";
|
||||
|
||||
Email::sender('info@pisilinux.org', 'Pisilinux Üyelik İşlemleri')
|
||||
->receiver($kisibul->mail)
|
||||
->subject('Üyelik onayı')
|
||||
->message($mesaj)
|
||||
->send();
|
||||
*/
|
||||
echo 'Aktivizasyon maili tekrardan gönderildi';
|
||||
|
||||
}
|
||||
|
||||
function emailSend(){
|
||||
if (method::post('cevap')) {
|
||||
|
||||
email::sender('info@pisilinux.org', 'Pisi Linux')
|
||||
->receiver(method::post('email'))
|
||||
->subject('Pisi Linux İletişim Cevap')
|
||||
->message(method::post('cevap'))
|
||||
->send();
|
||||
|
||||
|
||||
|
||||
if (Email::error()){
|
||||
echo 'Bir hata oluştu: '.Email::error();
|
||||
}else{
|
||||
DB::where('id',method::post('id'))->update('iletisim',[
|
||||
'cevap' => method::post('cevap'),
|
||||
'senddate' => method::post('senddate')
|
||||
]);
|
||||
echo 'Cevabınız Başarıyla Gönderildi';
|
||||
}
|
||||
|
||||
//echo 'Cevap maili gönderildi';
|
||||
}
|
||||
//uzbgetvqeinmkhvl
|
||||
}
|
||||
|
||||
|
||||
|
||||
function duyuruStatusChange(){
|
||||
//$status = Method::post('status');
|
||||
$id = Method::post('id');
|
||||
|
||||
$st = DB::select('status')->where('id',$id)->duyuru()->value();
|
||||
|
||||
if ($st == '0') {$stat = '1';}else{$stat = '0';}
|
||||
DB::where('id',$id)->update('duyuru',['status' => $stat]);
|
||||
if (DB::error()) {
|
||||
echo DB::error();
|
||||
}else{
|
||||
|
||||
$stat = '';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function downloadStatusChange(){
|
||||
echo Method::post('status')
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, ML, Method,DBTool,File,Crontab;
|
||||
|
||||
class Backup extends Controller
|
||||
{
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
function main(){
|
||||
Masterpage::title('Backup Manage');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function cron(){
|
||||
Crontab::daily()->command('Db_backups:do');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB,Import,URL,URI,Cookie,Session,Method;
|
||||
/**
|
||||
* Created By: Erkan IŞIK
|
||||
* Created Date: 2017-08-30
|
||||
* Upcdate Date: 2017-12-29
|
||||
*/
|
||||
class Blog extends Controller{
|
||||
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
|
||||
function main(){}
|
||||
|
||||
function edit(){
|
||||
$id = Uri::get('edit');
|
||||
if (method::post()){$this->content_model->update(method::post());}
|
||||
View::id($id)->get('edit');
|
||||
//import::view('content/content_edit',$data);
|
||||
}
|
||||
|
||||
function delete(){
|
||||
$id = Uri::get('delete');
|
||||
DB::where('id', $id)->delete('content');
|
||||
redirect('content');
|
||||
}
|
||||
|
||||
function new(){
|
||||
if (method::post()) {
|
||||
$this->content_model->new(method::post());
|
||||
}
|
||||
|
||||
|
||||
View::userid(Session::select('userid'));
|
||||
|
||||
}
|
||||
|
||||
function copy(){
|
||||
$id = Uri::get('copy');
|
||||
if (method::post()){$this->content_model->new(method::post());}
|
||||
View::id($id);
|
||||
|
||||
}
|
||||
|
||||
function category(){
|
||||
|
||||
}
|
||||
|
||||
function categoryEdit(){
|
||||
$id = Uri::get('categoryEdit');
|
||||
if (Method::post()) {
|
||||
$this->category_model->update(Method::post());
|
||||
}
|
||||
view::id($id);
|
||||
|
||||
}
|
||||
|
||||
function categoryNew(){
|
||||
if (Method::post()) {
|
||||
$this->category_model->new(Method::post());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function categoryDelete(){
|
||||
$id = Uri::get('categoryDelete');
|
||||
DB::where('id',$id)->delete('content_category');
|
||||
redirect('blog/category');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, URI, Method;
|
||||
|
||||
/**
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date: 2017-12-27
|
||||
* Update Date : 2019-01-06
|
||||
*/
|
||||
class Bugs extends Controller{
|
||||
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
|
||||
function main(){
|
||||
View::list(DB::bugsResult());
|
||||
}
|
||||
|
||||
function edit(){
|
||||
$id = URI::get('edit');
|
||||
if (method::post()) {$this->bugs_model->bugs_update(method::post());}
|
||||
View::id($id);
|
||||
}
|
||||
|
||||
|
||||
function delete(){
|
||||
$id = URI::get('delete');
|
||||
DB::where('id',$id)->delete('bugs');
|
||||
redirect('bugs');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function tasktype(){
|
||||
if (method::post()) {$this->bugs_Model->tasktype_new(method::post());}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, ML, Method;
|
||||
|
||||
/**
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date : 2017-09-05
|
||||
* Update Date : 2018-02-13
|
||||
*/
|
||||
class Category extends Controller{
|
||||
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
|
||||
function main(){
|
||||
}
|
||||
|
||||
function new(){
|
||||
if (method::post()) {$this->category_model->new(method::post());}
|
||||
}
|
||||
|
||||
function edit($id){
|
||||
//if (method::post()) {$this->category_model->update(method::post());}
|
||||
/*
|
||||
$data['edit'] = $this->category_model->edit($id);
|
||||
$data['ustkatid'] = $data['edit']->kat_ustid;
|
||||
|
||||
import::view('category/edit_view',$data);
|
||||
|
||||
*/
|
||||
|
||||
View::id($id)->get('edit');
|
||||
}
|
||||
|
||||
function delete($id){
|
||||
DB::where('id', $id)->delete('kategoriler');
|
||||
redirect('category');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, ML, Method, Email;
|
||||
/**
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date : 2018-02-19
|
||||
* Update Date : 2018-02-19
|
||||
*/
|
||||
class Contact extends Controller{
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
function main() {
|
||||
$data['mesaj'] = DB::orderBy('id','desc')->get('iletisim')->result();
|
||||
|
||||
import::view('iletisim/index',$data);
|
||||
}
|
||||
|
||||
function oku($ata){
|
||||
|
||||
$data['read'] = DB::where('id',$ata)->get('iletisim')->row();
|
||||
|
||||
import::view('iletisim/read',$data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, Method, Folder, File;
|
||||
|
||||
class Creator extends Controller
|
||||
{
|
||||
function main(){
|
||||
|
||||
|
||||
if (Method::post()) {
|
||||
if (Method::post('controller') == '1') {
|
||||
$filename = Ucwords(Method::post('name'));
|
||||
$path = REAL_BASE_DIR.'/Projects/'.Method::post('section').'/Controllers/'.$filename.'.php';
|
||||
|
||||
touch($path);
|
||||
$dosya=fopen($path,"a");
|
||||
$yazdir ="<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session,Method;
|
||||
|
||||
class $filename extends Controller{\n
|
||||
function main(){ \n";
|
||||
|
||||
if (Method::post('section') == 'Frontend') {
|
||||
$yazdir .= "Import::view(THEMA_NAME.'$filename/$filename.view');}\n}";
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
fwrite($dosya, $yazdir);
|
||||
}
|
||||
|
||||
if (Method::post('models') == '1') {
|
||||
$filename = Ucwords(Method::post('name')).'_model';
|
||||
$path = REAL_BASE_DIR.'/Projects/'.Method::post('section').'/Models/'.$filename.'.php';
|
||||
touch($path);
|
||||
|
||||
$dosya=fopen($path,"a");
|
||||
$yazdir ="<?php
|
||||
class $filename extends Model{\n
|
||||
function new(){ \n }";
|
||||
fwrite($dosya, $yazdir);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (Method::post('views') == '1') {
|
||||
$filename = Ucwords(Method::post('name'));
|
||||
$folder = REAL_BASE_DIR.'Projects/'.Method::post('section').'/Views/'.$filename;
|
||||
Folder::create($folder, 777);
|
||||
|
||||
$path = REAL_BASE_DIR.'Projects/'.Method::post('section').'/Views/'.$filename.'/main.php';
|
||||
File::create('Projects/'.Method::post('section').'/Views/'.$filename.'/main.wizard.php', 0655);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, ML, Method, URI ;
|
||||
/*
|
||||
* Created By: Erkan IŞIK
|
||||
* Created Date: 2017-12-07
|
||||
* Update Date: 2019-12-09
|
||||
*/
|
||||
class Download extends Controller{
|
||||
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
|
||||
function main(){
|
||||
$query = DB::orderBy('lang','desc')->where('status','1')->downloadResult();
|
||||
$archive = DB::orderBy('lang','desc')->where('status','0')->downloadResult();
|
||||
|
||||
View::list($query)->archive($archive);
|
||||
}
|
||||
|
||||
function new(){
|
||||
if (method::post()){$this->download_model->new(method::post());}
|
||||
}
|
||||
|
||||
function edit(){
|
||||
$id = Uri::get('edit');
|
||||
if (method::post()){$this->download_model->update(method::post());}
|
||||
View::id($id)->get('edit');
|
||||
}
|
||||
|
||||
function copy(){
|
||||
$id = Uri::get('copy');
|
||||
if (method::post()){$this->download_model->copy(method::post());}
|
||||
View::id($id)->get('copy');
|
||||
}
|
||||
|
||||
function delete(){
|
||||
$id = Uri::get('delete');
|
||||
DB::where('id',$id)->delete('download');
|
||||
DB::where('downloadId',$id)->delete('downlink');
|
||||
redirect('download');
|
||||
}
|
||||
|
||||
function detail(){
|
||||
$id = Uri::get('detail');
|
||||
view::id($id);
|
||||
}
|
||||
|
||||
function linkedit(){
|
||||
$id = Uri::get('linkedit');
|
||||
view::id($id);
|
||||
}
|
||||
|
||||
function downlinkdStatusChange(){
|
||||
if (Method::post('status') == 1) {
|
||||
DB::where('id', Method::post('id'))->update('downlink',['status' => '0', ]);
|
||||
}else{
|
||||
DB::where('id', Method::post('id'))->update('downlink',['status' => '1', ]);
|
||||
}
|
||||
echo DB::error();
|
||||
}
|
||||
|
||||
|
||||
function downloadStatusChange(){
|
||||
if (Method::post('status') == 1) {
|
||||
DB::where('id', Method::post('id'))->update('download',['status' => '0', ]);
|
||||
}else{
|
||||
DB::where('id', Method::post('id'))->update('download',['status' => '1', ]);
|
||||
}
|
||||
echo DB::error();
|
||||
}
|
||||
|
||||
function downlinkDelete(){
|
||||
//echo Method::post('id');
|
||||
DB::where('id', Method::post('id'))->delete('downlink');
|
||||
if (!DB::error()) {
|
||||
echo 'Kayıt Silindi';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use Method,URI;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Duyuru extends Controller{
|
||||
|
||||
function main(){
|
||||
$content = $this->Duyuru_model->contentList();
|
||||
|
||||
view::list($content);
|
||||
|
||||
}
|
||||
|
||||
function new(){
|
||||
if (Method::post()){$this->Duyuru_model->new(Method::post());}
|
||||
|
||||
}
|
||||
|
||||
function edit(){
|
||||
$id = Uri::get('edit');
|
||||
if (Method::post()){$this->Duyuru_model->update(Method::post());}
|
||||
|
||||
View::id($id);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import,URL,Cookie,Session,ML,Method,URI;
|
||||
/**
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date: 2017-09-27
|
||||
* Update Date : 2018-03-28
|
||||
*/
|
||||
class Forum extends Controller{
|
||||
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
|
||||
function main(){
|
||||
$konu='';
|
||||
if (method::post('delete')==1) {
|
||||
foreach (method::post('forumDel') as $key) {
|
||||
DB::where('id', $key )->delete('forum');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (method::post()) {
|
||||
|
||||
$konu = DB::where('user_id', userId(Method::post('username')))->orderBy('id','desc')->get('forum')->result();
|
||||
View::konu($konu);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function category_list(){
|
||||
$lists = $this->forum_model->katlist();
|
||||
View::catList($lists);
|
||||
|
||||
|
||||
}
|
||||
|
||||
function forumKat(){
|
||||
if(method::post()){$this->forum_model->cat_insert(method::post());}
|
||||
|
||||
}
|
||||
|
||||
function kategori_edit(){
|
||||
$id = Uri::get('kategori_edit');
|
||||
if(method::post()){
|
||||
$this->forum_model->cat_update(method::post());
|
||||
}
|
||||
|
||||
View::id($id);
|
||||
}
|
||||
|
||||
|
||||
function category_delete($id){
|
||||
DB::where('id', $id)->delete('forum_kat');
|
||||
redirect('forum/category_list');
|
||||
}
|
||||
|
||||
/* konu işlemleri*/
|
||||
|
||||
function konular(){
|
||||
$data['konu'] = DB::where('content_id', '0')->orderBy('id','asc')->get('forum')->result();
|
||||
Import::view('forum/konular_view',$data);
|
||||
}
|
||||
|
||||
function konu($id){
|
||||
$data['id'] = $id;
|
||||
|
||||
Import::view('forum/konu_view',$data);
|
||||
}
|
||||
|
||||
function edit($id){
|
||||
$data['id'] = $id;
|
||||
if (Method::post()) {$this->forum_model->update(Method::post());}
|
||||
Import::view('forum/konu_edit',$data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB;
|
||||
use Import;
|
||||
use URL;
|
||||
use Cookie;
|
||||
use Session;
|
||||
use ML;
|
||||
use Method;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Funclist extends Controller{
|
||||
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
|
||||
function main(){ import::view('funclist_view');}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use Cookie, Session, Method;
|
||||
|
||||
class Home extends Controller{
|
||||
function main(){
|
||||
|
||||
if (method::post()) {$this->login_model->userControl(method::post());}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function logout(){
|
||||
Session::deleteAll();
|
||||
redirect();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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('adminkit/');
|
||||
#Theme::active('matrixBt5/');
|
||||
Theme::active('default/');
|
||||
# The current settings are being configured.
|
||||
Masterpage::headPage('Assets/head')
|
||||
->bodyPage('Assets/body');
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session,Method, URI;
|
||||
|
||||
class Language extends Controller{
|
||||
|
||||
function main(){
|
||||
$sql = DB::language()->result();
|
||||
View::list($sql);
|
||||
}
|
||||
|
||||
function new(){
|
||||
if (Method::post()) {$this->Language_model->new(Method::post());}
|
||||
}
|
||||
|
||||
function edit(){
|
||||
if (Method::post()) {$this->Language_model->update(Method::post());}
|
||||
View::id(Uri::get('edit'));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, ML, Method, CDN;
|
||||
|
||||
class Member extends Controller {
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
|
||||
function main(){
|
||||
$data['active_member'] = $this->member_model->active_member();
|
||||
$data['pending_member'] = $this->member_model->pending_member();
|
||||
import::view('user/active_member_list',$data);
|
||||
}
|
||||
|
||||
function usernew() {
|
||||
$data['authority'] = DB::orderBy('id','desc')->get('authority')->result();
|
||||
import::view('user/user_new',$data);
|
||||
}
|
||||
|
||||
function mail(){
|
||||
import::view('user/mail');
|
||||
}
|
||||
|
||||
function delete($id){
|
||||
DB::where('user_id',$id)->delete('user');
|
||||
redirect('member');
|
||||
}
|
||||
|
||||
function edit($id){
|
||||
if (method::post()) {$this->member_model->update(method::post());}
|
||||
$data['edit'] = $this->member_model->edit($id);
|
||||
import::view('user/user_edit',$data);
|
||||
|
||||
}
|
||||
|
||||
function pending_member(){
|
||||
$data['pending_member'] = $this->member_model->pending_member();
|
||||
import::view('user/pending_member_list',$data);
|
||||
}
|
||||
|
||||
function disable_member(){
|
||||
$data['disable_member'] = $this->member_model->disable_member();
|
||||
import::view('user/disable_member_list',$data);
|
||||
}
|
||||
|
||||
|
||||
}// class sonu
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, Method, URI;
|
||||
/*
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date : 09-12-2017
|
||||
* Update Date : 29-12-2017
|
||||
*/
|
||||
class Menu extends Controller{
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
|
||||
function main(){
|
||||
|
||||
if (method::post('islem') == '1') {$this->menu_model->menuname_save(method::post());}
|
||||
if (method::post('islem') == '2') {$this->menu_model->menusave(method::post());}
|
||||
|
||||
$menu = method::post('menuCatId');
|
||||
$lang = DB::language()->result();
|
||||
|
||||
View::lang($lang)->menulist($menu);
|
||||
}
|
||||
|
||||
|
||||
function delete(){
|
||||
$id = URI::get('delete');
|
||||
DB::where('id',$id)->delete('menu');
|
||||
redirect('menu');
|
||||
}
|
||||
|
||||
function edit(){
|
||||
$id = URI::get('edit');
|
||||
if (Method::post()) {$this->menu_model->edit(Method::post());}
|
||||
View::id($id);
|
||||
}
|
||||
|
||||
function copy(){
|
||||
|
||||
$id = URI::get('copy');
|
||||
if (Method::post()) {$this->menu_model->copy(Method::post());}
|
||||
View::id($id);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, URI, Method;
|
||||
|
||||
|
||||
class Messages extends Controller
|
||||
{
|
||||
|
||||
function main(){
|
||||
|
||||
}
|
||||
|
||||
function read(){
|
||||
|
||||
View::id(URI::get('read'));
|
||||
}
|
||||
|
||||
function delete(){
|
||||
DB::where('id', URI::get('delete'))->delete('messages');
|
||||
redirect('');
|
||||
}
|
||||
|
||||
function write(){
|
||||
if(Method::post()){$this->message_model->send(Method::post());
|
||||
}
|
||||
|
||||
View::userid(URI::get('write'));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use Import, Method,DB, XML, DBForge, URI, CURL, Regex, Folder, File, Json;
|
||||
|
||||
class Package extends Controller{
|
||||
|
||||
function main(){
|
||||
|
||||
|
||||
$link = "https://repology.org/api/v1/project/arduino";
|
||||
$kr = curl($link);
|
||||
$krjson = Json::decode($kr->content);
|
||||
|
||||
output($kr->content);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function repology(){
|
||||
$b = [];
|
||||
|
||||
$link = "https://repology.org/api/v1/project/arduino";
|
||||
$kr = curl($link);
|
||||
$krjson = Json::decode($kr->content);
|
||||
|
||||
output($kr);
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
DBForge::truncate('packageUpdate');
|
||||
|
||||
foreach (pList() as $key ) {
|
||||
$link = "https://repology.org/api/v1/project/".seo($key->name);
|
||||
//$kr=file_get_contents($link);
|
||||
$kr = curl($link);
|
||||
|
||||
|
||||
$KrJson=Json::decode($kr->content);
|
||||
|
||||
|
||||
|
||||
foreach ($KrJson as $key1){
|
||||
if ($key1->status == 'newest' ) {
|
||||
if (packageStableVersion(seo($key->name)) != $key1->version) {
|
||||
DB::insert('packageUpdate',[
|
||||
'name' => seo($key->name),
|
||||
'visiblename' => $key1->visiblename,
|
||||
'newVersion' => $key1->version,
|
||||
'oldVersion' => packageStableVersion(seo($key->name))
|
||||
|
||||
]);
|
||||
|
||||
$b[] = seo($key->name).' | '.$key1->visiblename.' | Old Version: '.packageStableVersion(seo($key->name)).' | New Version: '.$key1->version;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//redirect('package/packageUpdateList');
|
||||
|
||||
//view::a($KrJson);
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
function packageUpdateList(){
|
||||
$list = DB::groupBy('name')->get('packageUpdate');
|
||||
$count = $list->totalRows();
|
||||
$list = $list->result();
|
||||
view::list($list)->count($count);
|
||||
}
|
||||
|
||||
function search(){
|
||||
$repolist = '';
|
||||
$total = '1';
|
||||
if (Method::post()) {
|
||||
$repolist = Method::post('Repolist');
|
||||
$list = DB::where('reponame',$repolist)->packageResult();
|
||||
View::list($list);
|
||||
}
|
||||
|
||||
if (Method::get()) {
|
||||
$get = Uri::get('search');
|
||||
if ($get) {
|
||||
$result = DB::orderBy('name', 'asc')->whereStartLike('name',$get)->package();
|
||||
$list = $result->result();
|
||||
$total = $result->totalRows(true);
|
||||
}else{
|
||||
$total='0';
|
||||
$list = '';
|
||||
}
|
||||
View::list($list)->total($total);
|
||||
}
|
||||
}
|
||||
|
||||
function depoekle(){if(method::post()){$this->package_model->depoekle(method::post());}}
|
||||
|
||||
}// class end
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, ML, Method, URI;
|
||||
|
||||
class Page extends Controller{
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
|
||||
function main(){
|
||||
|
||||
View::list($this->page_model->page_list())->get('main');
|
||||
//import::view('page/index',$data);
|
||||
}
|
||||
|
||||
function new(){
|
||||
if(method::post()){$this->page_model->new(method::post());}
|
||||
}
|
||||
|
||||
|
||||
function edit(){
|
||||
|
||||
if(method::post()){$this->page_model->Update(method::post());}
|
||||
|
||||
//$data['pages'] = DB::where('id',$id)->get('content')->row();
|
||||
|
||||
|
||||
view::id(Uri::get('edit'));
|
||||
//import::view('page/page_edit',$data);
|
||||
}
|
||||
|
||||
function delete($id){
|
||||
DB::where('id', $id)->delete('content');
|
||||
redirect('page');
|
||||
}
|
||||
|
||||
}// class sonu
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, Method, FOLDER;
|
||||
|
||||
/**
|
||||
* Created By: Osman Erkan
|
||||
* Created Date: 2017-09-10
|
||||
* Update Date: 2023-02-10
|
||||
*/
|
||||
class Setting extends Controller{
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
function main() {
|
||||
$result = DB::orderBy('title', 'asc')->settingsResult();
|
||||
//output($result);
|
||||
|
||||
if (method::post()) {$this->panel->setting_update(method::post());}
|
||||
|
||||
View::list($result);
|
||||
|
||||
}
|
||||
|
||||
function logo(){
|
||||
if (method::post()) {$this->panel->logo_update(method::post());}
|
||||
}
|
||||
|
||||
function favicon(){
|
||||
if (method::post()) {$this->panel->favicon_update(method::post());}
|
||||
}
|
||||
|
||||
function theme(){
|
||||
if (method::post()) {$this->panel->theme_update(method::post());}
|
||||
}
|
||||
|
||||
function selectLogo(){
|
||||
$value = Method::post('value');
|
||||
DB::where('title', 'logo')->update('settings',[
|
||||
'value' => $value,
|
||||
]);
|
||||
echo DB::error();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, ML, Method, URI;
|
||||
/*
|
||||
* Created By: Erkan IŞIK
|
||||
* Created Date: 2017-09-06
|
||||
*/
|
||||
class Slayt extends Controller{
|
||||
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
// slayt ana fonksiyonu
|
||||
function main(){
|
||||
$data['breadcrumb'] = 'Slayt';
|
||||
$sql = DB::orderBy('sira','asc')->get('slider')->result();
|
||||
$sql1 = DB::max('sira')->get('slider')->value();
|
||||
View::slider_list($sql)
|
||||
->sira_max($sql1)
|
||||
;
|
||||
//import::view('slayt/slayt_view',$data);
|
||||
}
|
||||
|
||||
// slayt ekleme fonksiyonu
|
||||
function new(){
|
||||
if(method::post()){$this->slider_model->new_slider_save(method::post());}
|
||||
import::view('slayt/new_slider');
|
||||
}
|
||||
|
||||
// slayt sırasını bir yukarı alan fonksiyon
|
||||
function up($dt){
|
||||
$d = DB::select('sira')->where('id',$dt)->get('slider')->value();
|
||||
$r = $d-1; //3 oldu surası 3 olanı 4 yapacağız
|
||||
DB::where('sira',$r)->update('slider',[
|
||||
'sira' => $r+1,
|
||||
]);
|
||||
|
||||
DB::where('id',$dt)->update('slider',[
|
||||
'sira' => $r,
|
||||
]);
|
||||
redirect('slayt');
|
||||
|
||||
}
|
||||
|
||||
// slayt sırasını bir aşağı alan fonksiyon
|
||||
function down($dt){
|
||||
$d = DB::select('sira')->where('id',$dt)->get('slider')->value();
|
||||
$r = $d+1; //3 oldu surası 3 olanı 4 yapacağız
|
||||
DB::where('sira',$r)->update('slider',[
|
||||
'sira' => $r-1,
|
||||
]);
|
||||
|
||||
DB::where('id',$dt)->update('slider',[
|
||||
'sira' => $r,
|
||||
]);
|
||||
redirect('slayt');
|
||||
}
|
||||
// slaytı silen fonksiyon
|
||||
function delete($id){
|
||||
$this->slider_model->delete($id);
|
||||
}
|
||||
|
||||
function edit(){
|
||||
$id = Uri::get('edit');
|
||||
if(Method::post()){
|
||||
$this->slider_model->slider_update(Method::post());
|
||||
}
|
||||
$edit = DB::where('id',$id)->get('slider')->row();
|
||||
view::edit($edit);
|
||||
|
||||
//import::view('slayt/edit_slider',$data);
|
||||
}
|
||||
|
||||
function sliderStatusChange(){
|
||||
$status = Method::post('status');
|
||||
$id = Method::post('id');
|
||||
if ($status == '0') {$stat = '1';}else{$stat = '0';}
|
||||
DB::where('id',$id)->update('slider',['durum' => $stat]);
|
||||
echo $id.'-'.$status;
|
||||
if (DB::error()) {echo DB::error();}else{echo 'başarılı';}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Import, URL, Cookie, Session, ML, Method,URI;
|
||||
|
||||
class Sss extends Controller
|
||||
{
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
function main(){
|
||||
|
||||
View::liste($this->sss_model->liste())->get('main');
|
||||
//import::view('sss/index',$data);
|
||||
}
|
||||
|
||||
function new(){
|
||||
if (method::post()) {$this->sss_model->new(method::post());}
|
||||
import::view('sss/new');
|
||||
}
|
||||
|
||||
function delete(){
|
||||
$id = Uri::get('delete');
|
||||
DB::where('id',$id)->delete('sss');
|
||||
redirect('sss');
|
||||
}
|
||||
|
||||
function edit(){
|
||||
$id = Uri::get('edit');
|
||||
if (method::post()) {$this->sss_model->update(method::post());}
|
||||
$edit = $this->sss_model->edit($id);
|
||||
View::edit($edit);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php namespace Project\Controllers;
|
||||
use DB, Method, Import, URL, Cookie, Session, URI, Email;
|
||||
|
||||
/**
|
||||
* Created By: Erkan IŞIK
|
||||
* Created Date: 2017-08-28
|
||||
*/
|
||||
class User extends Controller{
|
||||
function __construct(){if (!USERID) {redirect(URL::base('panel'));}}
|
||||
function main(){
|
||||
$search = '';
|
||||
if(Method::post('username')){
|
||||
$search = DB::whereLike('username',method::post('username'))->userResult();
|
||||
}
|
||||
|
||||
if(Method::post('email')){
|
||||
$search = DB::where('mail',method::post('email'))->userResult();
|
||||
}
|
||||
|
||||
View::active_member($search);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function pending_member(){
|
||||
View::pending_member($this->member_model->pending_member());
|
||||
}
|
||||
|
||||
function disable_member(){
|
||||
View::disable_member($this->member_model->disable_member());
|
||||
}
|
||||
|
||||
function passRename(){
|
||||
$data['message'] = null;
|
||||
if(method::post()){
|
||||
$data['message'] = $this->login->passrename(method::post());
|
||||
}
|
||||
import::view('user/passRename',$data);
|
||||
}
|
||||
|
||||
function deleteMemberAjax(){
|
||||
$id = method::post('par');
|
||||
DB::where('user_id',$id)->delete('user');
|
||||
echo 'Üye Silinmiştir!';
|
||||
}
|
||||
|
||||
function edit(){
|
||||
if (method::post()) {$this->member_model->update(method::post());}
|
||||
$edit = $this->member_model->edit(URI::get('edit'));
|
||||
view::edit($edit);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function disableMemberAjax(){
|
||||
$id = method::post('par');
|
||||
DB::where('user_id', $id)->update('user',['status' => '2']);
|
||||
if(!DB::error()) {echo 'Üye yasaklandı';}else{echo DB::error();}
|
||||
}
|
||||
|
||||
function activemailSendAjax(){
|
||||
$id = method::post('par');
|
||||
$kisibul = DB::where('aktivizasyon', $id)->get('user')->row();
|
||||
|
||||
$mesaj = "
|
||||
Merhaba $kisibul->username.<br>
|
||||
Sitemize kayıt olduğunuz için teşekkür ederiz.<br>
|
||||
Aşağıdaki linke tıklayarak üyeliğinizi aktif edebilirsiniz.<br>
|
||||
<a href=\"http://pisilinux.org/member/aktivizasyon/$kisibul->aktivizasyon\">Üyelik aktif etmek için lütfen buraya tıklayın.</a><br>
|
||||
<a href=\"https://t.me/joinchat/MAcpp0o6E4dAAoz090cDjA.\"> Telegram </a> pisilinux kanalında aramızda görmekten memnun oluruz.
|
||||
";
|
||||
|
||||
Email::from('info@pisilinux.org','Pisi GNU/Linux')
|
||||
->to($kisibul->mail)
|
||||
->send('Pisilinux Üyelik İşlemleri', $mesaj);
|
||||
|
||||
echo "Aktivizasyon maili tekrardan gönderildi";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user