General updates and cleanup
This commit is contained in:
+15
-15
@@ -1,31 +1,31 @@
|
||||
<?php
|
||||
// 1. Adım: Tarayıcı dilini al, yoksa 'tr' yap
|
||||
$lang = !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) : 'tr';
|
||||
|
||||
//define('LANG', $lang);
|
||||
// 2. Adım: Eğer kullanıcının özel seçtiği bir çerez varsa, dil bilgisini onunla güncelle
|
||||
if (isset($_COOKIE['country'])) {
|
||||
$lang = $_COOKIE['country'];
|
||||
|
||||
}else{
|
||||
$lang = $lang;
|
||||
$lang = $_COOKIE['country'];
|
||||
}
|
||||
|
||||
ML::lang($lang);
|
||||
Lang::set($lang);
|
||||
//echo defined('LANG') ? 'LANG is defined' : 'LANG is not defined';
|
||||
define('LANG', $lang);
|
||||
define('THEMA_NAME','pisilinux/');
|
||||
define('THEMA_NAME','pisiV4/');
|
||||
define('THEMA', 'Projects/Frontend/Views/'.THEMA_NAME);
|
||||
define('MEMBER','Projects/Members/Views/');
|
||||
define('DEVELOP','Projects/Develop/Views/');
|
||||
define('ADMIN','Projects/Panel/Views/');
|
||||
|
||||
|
||||
if(Cookie::select('username')){
|
||||
define('USERNAME',Cookie::select('username'));
|
||||
}else{
|
||||
define('USERNAME',Session::select('username'));
|
||||
}
|
||||
if(Cookie::select('username')){
|
||||
define('USERNAME',Cookie::select('username'));
|
||||
}else{
|
||||
define('USERNAME',Session::select('username'));
|
||||
}
|
||||
|
||||
if(Cookie::select('userid')){
|
||||
define('USERID',Cookie::select('userid'));
|
||||
}else{
|
||||
define('USERID',Session::select('userid'));
|
||||
if(Cookie::select('userid')){
|
||||
define('USERID',Cookie::select('userid'));
|
||||
}else{
|
||||
define('USERID',Session::select('userid'));
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
$lang = !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) : 'tr';
|
||||
|
||||
//define('LANG', $lang);
|
||||
if (isset($_COOKIE['country'])) {
|
||||
$lang = $_COOKIE['country'];
|
||||
|
||||
}else{
|
||||
$lang = $lang;
|
||||
}
|
||||
ML::lang($lang);
|
||||
Lang::set($lang);
|
||||
define('LANG', $lang);
|
||||
define('THEMA_NAME','pisilinux/');
|
||||
define('THEMA', 'Projects/Frontend/Views/'.THEMA_NAME);
|
||||
define('MEMBER','Projects/Members/Views/');
|
||||
define('DEVELOP','Projects/Develop/Views/');
|
||||
define('ADMIN','Projects/Panel/Views/');
|
||||
|
||||
|
||||
if(Cookie::select('username')){
|
||||
define('USERNAME',Cookie::select('username'));
|
||||
}else{
|
||||
define('USERNAME',Session::select('username'));
|
||||
}
|
||||
|
||||
if(Cookie::select('userid')){
|
||||
define('USERID',Cookie::select('userid'));
|
||||
}else{
|
||||
define('USERID',Session::select('userid'));
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
<?php
|
||||
|
||||
function content_list(){
|
||||
return DB::limit(NULL,10)
|
||||
->orderBy('id','desc')
|
||||
->where('content_type','content','and')
|
||||
->where('lang',LANG)
|
||||
->get('content');
|
||||
}
|
||||
|
||||
function user_content_list($editor){
|
||||
return DB::orderBy('id','desc')->where('content_type','content','and')->where('editor',$editor)->get('content')->result();
|
||||
}
|
||||
|
||||
|
||||
function content_edit($id){
|
||||
return DB::where('id',$id)->get('content')->row();
|
||||
}
|
||||
|
||||
function blog($id=null){
|
||||
if ($id) {
|
||||
return DB::orderBy('id','desc')
|
||||
->where('content_type','content','and')
|
||||
->where('status','1','and')
|
||||
->where('category_id',$id)
|
||||
->get('content')
|
||||
->result();
|
||||
}else{
|
||||
return DB::orderBy('id','desc')
|
||||
->where('content_type','content','and')
|
||||
->where('status','1')
|
||||
->get('content')
|
||||
->result();
|
||||
}
|
||||
}
|
||||
|
||||
function blogCategory($id){
|
||||
return DB::limit(NULL,10)
|
||||
->orderBy('id','desc')
|
||||
->where('content_type','content','and')
|
||||
->where('status','1','and')
|
||||
->where('category_id',$id)
|
||||
->get('content');
|
||||
}
|
||||
|
||||
function content($limit = '3'){
|
||||
return DB::orderBy('id','desc')->where('content_type','content','and')->where('status','1','and')->where('lang',LANG)->limit($limit)->get('content')->result();
|
||||
}
|
||||
|
||||
function content_confirmation(){
|
||||
return DB::orderBy('id','desc')->where('content_type','content','and')->where('status','0')->limit('3')->get('content')->result();
|
||||
}
|
||||
|
||||
|
||||
function contentCategory(){
|
||||
return DB::content_category()->result();
|
||||
}
|
||||
|
||||
function contentCategoryRow($id){
|
||||
return DB::where('id',$id)->content_category()->row();
|
||||
}
|
||||
|
||||
function contentRow($id){
|
||||
if (is_numeric($id)) {
|
||||
$row = DB::where('id',$id)->get('content')->row();
|
||||
if ($row) return $row;
|
||||
}
|
||||
return DB::where('title_seo',$id)->get('content')->row();
|
||||
}
|
||||
|
||||
function content_image($icerik) {
|
||||
$resimbir = '';
|
||||
ob_start();
|
||||
ob_end_clean();
|
||||
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', htmlspecialchars_decode($icerik), $matches);
|
||||
if($output){$resimbir = $matches['1']['0'];}
|
||||
if(empty($resimbir)){ //Eğer resim eklememişseniz
|
||||
$resimbir = URL::base('upload/pisilinux_pisi.png');
|
||||
}
|
||||
return $resimbir;
|
||||
}
|
||||
|
||||
function contentStatusAdmin($status){
|
||||
|
||||
if ($status == '0') {
|
||||
$stat = '<i class="fa fa-times">';
|
||||
}elseif($status == '1'){
|
||||
$stat = '<i class="fa fa-check">';
|
||||
}elseif($status == '2'){
|
||||
$stat = '<span class="badge badge-pill badge-danger text-white">'.lang('Genel','banned').'</span>';
|
||||
}elseif($status == '3'){
|
||||
$stat = '<span class="badge badge-pill badge-primary">'.lang('Genel','waiting_for_approval').'</span>';
|
||||
}elseif($status == '4'){
|
||||
$stat = '<span class="badge badge-pill badge-primary">'.lang('Genel','solved').'</span>';
|
||||
}
|
||||
|
||||
return $stat;
|
||||
}
|
||||
|
||||
function slider(){
|
||||
return DB::where('durum','1')->orderBy('sira','asc')->get('slider')->result();
|
||||
}
|
||||
|
||||
function blogSearch($search){
|
||||
return DB::select('id','title','title_seo','content')->orderBy('id','desc')->whereLike('title', $search,'or')->whereLike('content', $search)->get('content')->result();
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
function taskType(){
|
||||
return DB::tasktypeResult();
|
||||
}
|
||||
|
||||
|
||||
function bugs(){
|
||||
return DB::where('status',1)->bugsResult();
|
||||
}
|
||||
|
||||
function bugsRow($id){
|
||||
return DB::where('id',$id)->bugsRow();
|
||||
}
|
||||
|
||||
function taskTypeName($id){
|
||||
return DB::select('tasktype')->where('id', $id)->get('tasktype')->value();
|
||||
|
||||
}
|
||||
|
||||
function taskName($id){
|
||||
return DB::whereId($id)->tasktypeRowTasktype();
|
||||
}
|
||||
|
||||
function taskTypeList($id = 0){
|
||||
if ($id==0) {
|
||||
return DB::orderBY('id','desc')->where('contentId','0')->bugsResult();
|
||||
//return DB::orderBY('id','desc')->whereNot('status','0')->bugsResult();
|
||||
}else{
|
||||
|
||||
return DB::orderBY('id','desc')->whereAnd('tasktype',$id)->whereNot('status','0')->bugsResult();
|
||||
}
|
||||
}
|
||||
|
||||
function bugsResult($id){
|
||||
return DB::where('contentId',$id)->bugsResult();
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
/*
|
||||
function slack_message($message){
|
||||
$message = array('payload' => json_encode(array('text' => $message)));
|
||||
$c = curl_init(SLACK_WEBHOOK);
|
||||
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($c, CURLOPT_POST, true);
|
||||
curl_setopt($c, CURLOPT_POSTFIELDS, $message);
|
||||
curl_exec($c);
|
||||
curl_close($c);
|
||||
}
|
||||
|
||||
function slack_invite($usermail){
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL,"https://slack.com/api/users.admin.invite?C02NPT4MB");
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS,'email='.$usermail.'&token=xoxp-2771922705-2834958271-429249401667-ade5482f00f7fa2722526a1354d3b1f9');
|
||||
curl_setopt($ch ,CURLOPT_RETURNTRANSFER , True);
|
||||
$replyRaw = curl_exec($ch);
|
||||
/*
|
||||
$reply=json_decode($replyRaw,true);
|
||||
|
||||
if($reply['error']=='invalid_email')
|
||||
{
|
||||
echo '<p style="font-family: \'Roboto\', sans-serif; color: #9d3d3d">';
|
||||
echo 'E-mail Adresini yazmayı unuttun!';
|
||||
echo '</p>';
|
||||
}
|
||||
elseif($reply['error']=='already_in_team')
|
||||
{
|
||||
echo '<p style="font-family: \'Roboto\', sans-serif; color: #9d3d3d">';
|
||||
echo 'Pisi Slack Kanalına Zaten Üyesin! <a class="pure-button pure-button-primary" href=https://pisi.slack.com>Pisi Slack Kanalına Git.</a>';
|
||||
echo '</p>';
|
||||
}
|
||||
elseif($reply['error']=='already_invited')
|
||||
{
|
||||
echo '<p style="font-family: \'Roboto\', sans-serif; color: #9d3d3d">';
|
||||
echo 'Daha önce kayıt olmuşsunuz! Lütfen Kayıt olduğunuz e-posta ile <a class="pure-button pure-button-primary" href=https://pisi.slack.com>Pisi Slack Kanalına Giriş yapın.</a>';
|
||||
echo '</p>';
|
||||
}
|
||||
|
||||
elseif($reply['ok']==false) {
|
||||
echo '<p style="font-family: \'Roboto\', sans-serif; color: #9d3d3d">';
|
||||
echo 'Hata Oluştu, Tekrar Deneyin!';
|
||||
echo '</p>';
|
||||
} else
|
||||
{
|
||||
|
||||
echo '<p style="font-family: \'Roboto\', sans-serif; color: #9d3d3d">';
|
||||
echo 'Başarıyla Üye oldunuz. <b color=white>'.$newmail.'</b> Adresinde Davet için Mail Gönderdik. Lütfen E-mailinizi kontrol ediniz.';
|
||||
echo '</p>';
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
function gitter($message){
|
||||
$message = urlencode($message);
|
||||
$ch = curl_init('https://webhooks.gitter.im/e/fbf2cac6623ba8a4ab13');
|
||||
curl_setopt ($ch, CURLOPT_POSTFIELDS,"message=$message");
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
}
|
||||
|
||||
*/
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
function countries(){
|
||||
return DB:: countries()->result();
|
||||
}
|
||||
|
||||
function countriesName($id){
|
||||
return DB::select('name')->where('id',$id)->countries()->value();
|
||||
}
|
||||
|
||||
function downloadUrl($id){
|
||||
return DB::where('downloadId', $id,'and')->where('status','1')->downlinkResult();
|
||||
}
|
||||
|
||||
function downloadUrlAdmin($id){
|
||||
return DB::where('downloadId', $id)->downlinkResult();
|
||||
}
|
||||
|
||||
function downloadLast(){
|
||||
if (LANG == 'az' || LANG == 'bg' || LANG == 'de' || LANG == 'ir') {
|
||||
$db = DB::where('lang','en','and')->where('status','1')->orderBy('id','desc')->downloadResult();
|
||||
}else{
|
||||
$db = DB::where('lang',LANG,'and')->where('status','1')->orderBy('id','desc')->downloadResult();
|
||||
}
|
||||
return $db;
|
||||
//return DB::where('lang',LANG,'and')->where('status','1')->orderBy('id','desc')->downloadResult();
|
||||
}
|
||||
|
||||
function downloadEdit($id){
|
||||
return DB::where('id',$id)->download()->row();
|
||||
}
|
||||
function sumx($şid){
|
||||
return DB::select('sumx')->where('downloadId',$id)->downlink()->value();
|
||||
}
|
||||
|
||||
function downloadParentId($id){
|
||||
return DB::select('parentId')->where('id',$id)->download()->value();
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date: 2018-02-21
|
||||
* Update Date : 2018-03-30
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function forum_kategori_panel($par = '0'){
|
||||
return DB::orderBy('id','asc')->where('kat_ustid',$par,'and')->where('status',1)->get('forum_kat')->result();
|
||||
}
|
||||
|
||||
function mesaj_sayisi($id){
|
||||
return DB::where('category_id',$id,'and')->where('content_id','0')->forum()->totalRows();
|
||||
}
|
||||
|
||||
function toplam_mesaj_sayisi($id){
|
||||
return DB::where('category_id',$id)->forum()->totalRows();
|
||||
}
|
||||
|
||||
|
||||
function question_category($par = '0'){
|
||||
return DB::where('status','1','and')
|
||||
->where('kat_ustid',$par)
|
||||
->forum_kat()
|
||||
->result();
|
||||
}
|
||||
|
||||
function forum_kategori_adi($data){
|
||||
return DB::select('adi','kat_ustid','adi_seo')->where('id',$data)->get('forum_kat')->row();
|
||||
}
|
||||
|
||||
function forumCategoryName($data){
|
||||
return DB::select('adi')->where('id',$data)->get('forum_kat')->value();
|
||||
}
|
||||
|
||||
function forum_kategori_row($data){
|
||||
return DB::where('id',$data)->get('forum_kat')->row();
|
||||
}
|
||||
|
||||
function iletisayisi($id){
|
||||
$s = DB::where('category_id',$id)->get('forum')->result();
|
||||
return count($s);
|
||||
}
|
||||
|
||||
function yazar($deg){
|
||||
return DB::select('username')->where('user_id',$deg)->get('user')->value();
|
||||
}
|
||||
|
||||
function userCreateDate($deg){
|
||||
return DB::select('date')->where('user_id',$deg)->get('user')->value();
|
||||
}
|
||||
|
||||
function avatar(){
|
||||
$avatar = DB::select('avatar')->where('user_id', USERID)->get('user')->value();
|
||||
return URL::base($avatar);
|
||||
}
|
||||
|
||||
function avatar1($userid){
|
||||
$avatar = DB::select('avatar')->where('user_id',$userid)->get('user')->value();
|
||||
if ($avatar){
|
||||
return URL::base($avatar);
|
||||
}else{
|
||||
return '/img/user.png';
|
||||
}
|
||||
}
|
||||
|
||||
function cevaplist($deg){
|
||||
return DB::where('content_id',$deg)->orderBy('id','asc')->get('forum')->result();
|
||||
}
|
||||
|
||||
function contentlist($d){
|
||||
return DB::where('content_id',$d)->count('id')->get('forum')->value();
|
||||
}
|
||||
|
||||
function forum_content($d = '0'){
|
||||
return DB::orderBy('id','desc')->where('content_id',$d,'and')->where('status','1')->get('forum')->result();
|
||||
}
|
||||
|
||||
function subject($d = '0'){
|
||||
return DB::where('id',$d,'and')
|
||||
->where('status','1')
|
||||
->get('forum')
|
||||
->row();
|
||||
}
|
||||
function forum_kategori($par = '0'){
|
||||
return DB::where('kat_ustid',$par,'and')->where('status','1')->get('forum_kat')->result();
|
||||
}
|
||||
|
||||
function forum_category($d = '0'){
|
||||
return DB::orderBy('id','desc')->where('category_id',$d,'and')->where('content_id','0')->get('forum')->result();
|
||||
}
|
||||
|
||||
function sonileti($d){
|
||||
return DB::select('content')->where('content_id',$d)->orderBy('id','desc')->limit('1')->get('forum')->value();
|
||||
}
|
||||
|
||||
function sonMesajlar($limit = 5){
|
||||
return DB::orderBy('id', 'desc')->where('content_id','0')->limit($limit)->get('forum')->result();
|
||||
}
|
||||
|
||||
function message_count($d){
|
||||
$s = DB::where('category_id',$d)->get('forum')->result();
|
||||
foreach ($s as $key) {
|
||||
$a = DB::where('content_id',$key->id)->get('forum')->result();
|
||||
echo count($a)+1;
|
||||
}
|
||||
$say1 = count($s);
|
||||
|
||||
//return count($b);
|
||||
}
|
||||
function soniletiler($limit = 10){
|
||||
return DB::orderBy('id','desc')->whereNot('content_id', '0')->limit($limit)->get('forum')->result();
|
||||
}
|
||||
|
||||
function forum_title($id='0'){
|
||||
return DB::select('title')->where('id',$id)->get('forum')->value();
|
||||
}
|
||||
|
||||
function forum_kat(){
|
||||
return DB::where('kat_ustid',0)->get('forum_kat')->result();
|
||||
}
|
||||
|
||||
function forun_alt_kat($id){
|
||||
return DB::where('kat_ustid',$id)->get('forum_kat')->result();
|
||||
}
|
||||
|
||||
function end_message_userid($id){
|
||||
return DB::select('user_id')->orderBy('id','desc')->where('content_id',$id)->get('forum')->limit('1')->value();
|
||||
}
|
||||
|
||||
function end_message($id){
|
||||
return DB::orderBy('id','desc')->where('content_id',$id)->get('forum')->limit('1')->row();
|
||||
}
|
||||
|
||||
function end_message_insertdate($id){
|
||||
return DB::select('insertDate')->orderBy('id','desc')->where('content_id',$id)->get('forum')->limit('1')->value();
|
||||
}
|
||||
|
||||
function forumSearch($search){
|
||||
return DB::select('id','title','title_seo','content','content_id')->whereLike('title', $search,'or')->whereLike('content', $search)->get('forum')->result();
|
||||
}
|
||||
|
||||
function forum_content_row($id){
|
||||
return DB::where('id', $id)->get('forum')->row();
|
||||
}
|
||||
|
||||
function userMessageCount($id){
|
||||
return DB::where('user_id',$id)->forum()->totalRows();
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Created By : Erkan IŞIK
|
||||
* Created Date: 2021-07-27
|
||||
* Update Date : 2021-07-27
|
||||
*/
|
||||
|
||||
function rssForumSonKonular(){
|
||||
$rss = DB::orderBy('id','desc')->where('content_id','0')->limit('15')->forumResult();
|
||||
|
||||
$rss1 = '<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Pisi GNU/Linux forum rss</title>
|
||||
<link>https://pisilinux.org</link>
|
||||
<description>Pisi GNU/Linux forum rss içerikleri</description>
|
||||
<language>turkish</language>
|
||||
<image>
|
||||
<title>Pisi GNU/Linux</title>
|
||||
<url>'.URL::base('upload/pisilogo/pisilogo240x71.png').'</url>
|
||||
<link>'.URL::base('upload/pisilogo/pisilogo240x71.png').'</link>
|
||||
<width>240</width>
|
||||
<height>71</height>
|
||||
</image>';
|
||||
|
||||
|
||||
foreach ($rss as $key){
|
||||
$rss1 .='<item>
|
||||
<title>'.$key->title.'</title>
|
||||
<link>'.URL::base('/forum/subject/'.$key->id.'-'.$key->title).'</link>
|
||||
<description>'.Limiter::word(html_entity_decode($key->content), 10).'</description>
|
||||
<pubDate>'.$key->insertDate.'</pubDate>
|
||||
</item>';
|
||||
}
|
||||
|
||||
$rss1 .= '
|
||||
</channel>
|
||||
</rss>';
|
||||
File::write('forum_son_konular_rss.xml', $rss1);
|
||||
}
|
||||
@@ -1,318 +0,0 @@
|
||||
|
||||
<?php
|
||||
function tarih($tarih, $ayrac = '.',$sec = '') {
|
||||
$bosluk = explode(' ', $tarih);
|
||||
$tr = explode($ayrac,$bosluk['0']);
|
||||
if ($sec=='gun') {return $tr['2'];}
|
||||
if ($sec=='ay') {return $tr['1'];}
|
||||
if ($sec=='yil') {return $tr['0'];}
|
||||
if ($sec=='') {return $tr['2']."-".$tr['1']."-".$tr['0'];}
|
||||
}
|
||||
|
||||
function timeConvert ( $zaman ){
|
||||
$zaman = strtotime($zaman);
|
||||
$zaman_farki = time() - $zaman;
|
||||
$saniye = $zaman_farki;
|
||||
$dakika = round($zaman_farki/60);
|
||||
$saat = round($zaman_farki/3600);
|
||||
$gun = round($zaman_farki/86400);
|
||||
$hafta = round($zaman_farki/604800);
|
||||
$ay = round($zaman_farki/2419200);
|
||||
$yil = round($zaman_farki/29030400);
|
||||
if( $saniye < 60 ){
|
||||
if ($saniye == 0){
|
||||
return "az önce";
|
||||
} else {
|
||||
return $saniye .' '.lang('time', 'saniye önce');
|
||||
}
|
||||
} else if ( $dakika < 60 ){
|
||||
return $dakika .' '.lang('time', 'dakika önce');
|
||||
} else if ( $saat < 24 ){
|
||||
return $saat.' '.lang('time', 'saat önce');
|
||||
} else if ( $gun < 7 ){
|
||||
return $gun .' '.lang('time', 'gün önce');
|
||||
} else if ( $hafta < 4 ){
|
||||
return $hafta.' '.lang('time', 'hafta önce');
|
||||
} else if ( $ay < 12 ){
|
||||
return $ay .' '.lang('time', 'ay önce');
|
||||
} else {
|
||||
return $yil.' '.lang('time', 'yıl önce');
|
||||
}
|
||||
}
|
||||
|
||||
function status($status){
|
||||
$stat = '';
|
||||
if ($status === '0') {
|
||||
$stat = '<span class="badge bg-danger text-white">'.lang('General','passive').'</span>';
|
||||
}elseif($status === '1'){
|
||||
$stat = '<span class="badge bg-success">'.lang('General','active').'</span>';
|
||||
}elseif($status === '2'){
|
||||
$stat = '<span class="badge bg-danger text-white">'.lang('General','banned').'</span>';
|
||||
}elseif($status === '3'){
|
||||
$stat = '<span class="badge bg-primary">'.lang('General','waiting_for_approval').'</span>';
|
||||
}elseif($status === '4'){
|
||||
$stat = '<span class="badge bg-blue">'.lang('General','solved').'</span>';
|
||||
}elseif($status === '5'){
|
||||
$stat = '<span class="badge bg-blue">'.lang('General','solved').'</span>';
|
||||
}
|
||||
|
||||
return $stat;
|
||||
}
|
||||
|
||||
function statusAdmin($status){
|
||||
if ($status === '0') {
|
||||
$stat = '<span class="badge badge-pill badge-danger text-white">'.lang('Genel','passive').'</span>';
|
||||
}elseif($status === '1'){
|
||||
$stat = '<span class="badge badge-pill badge-success">'.lang('Genel','active').'</span>';
|
||||
}elseif($status === '2'){
|
||||
$stat = '<span class="badge badge-pill badge-danger text-white">'.lang('Genel','banned').'</span>';
|
||||
}elseif($status === '3'){
|
||||
$stat = '<span class="badge badge-pill badge-primary">'.lang('Genel','waiting_for_approval').'</span>';
|
||||
}elseif($status === '4'){
|
||||
$stat = '<span class="badge badge-pill badge-primary">'.lang('Genel','solved').'</span>';
|
||||
}
|
||||
|
||||
return $stat;
|
||||
}
|
||||
|
||||
|
||||
function status1($status){
|
||||
if ($status === '1') {
|
||||
$stat = '<i class="fas fa-check"></i>';
|
||||
}elseif($status === '0'){
|
||||
$stat = '<i class="fas fa-times"></i>';
|
||||
}
|
||||
|
||||
return $stat;
|
||||
}
|
||||
|
||||
|
||||
function tcevir($tarih,$saatvarmi = '') {
|
||||
$bosluk = explode(' ', $tarih);
|
||||
$tr = explode("-",$bosluk['0']);
|
||||
$saat = $bosluk['1']['0'].$bosluk['1']['1'].$bosluk['1']['2'].$bosluk['1']['3'].$bosluk['1']['4'];
|
||||
if ($saatvarmi) {
|
||||
$tarih1 = $tr['2']."-".$tr['1']."-".$tr['0'].' '.$saat;
|
||||
}else{
|
||||
$tarih1 = $tr['2']."-".$tr['1']."-".$tr['0'];
|
||||
}
|
||||
return $tarih1;
|
||||
}
|
||||
|
||||
function tarih1($tarih) {
|
||||
$bosluk = explode(' ', $tarih);
|
||||
$tr = explode('-',$bosluk['0']);
|
||||
return $bosluk[0];
|
||||
}
|
||||
|
||||
function jalert($p){echo '<script>alert("'.$p.'")</script>';}
|
||||
function jsetitem($p,$a){echo '<script>localStorage.setItem("'.$p.'", "'.$a.'")</script>';}
|
||||
|
||||
|
||||
function jswal($p, $r = 'error'){echo '<script>swal("","'.$p.'","'.$r.'")</script>';}
|
||||
|
||||
function jconfirm($p){echo '<script>confirm("'.$p.'")</script>';}
|
||||
|
||||
function ayar(){return DB::get('settings')->row();}
|
||||
|
||||
function editor($sec){
|
||||
return DB::select('username')->where('user_id',$sec)->get('user')->value();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function katname($data){
|
||||
return DB::select('name')->where('id',$data)->content_category()->value();
|
||||
}
|
||||
|
||||
function etiket($data){
|
||||
$array = explode(',',$data);
|
||||
$a = '';
|
||||
foreach ($array as $key ) {
|
||||
$a .= '<a href="#" class="tags">'.$key.'</a> ';
|
||||
}
|
||||
return $a;
|
||||
}
|
||||
|
||||
function git($link = ''){
|
||||
if($link){
|
||||
echo '<meta http-equiv="refresh" content="0; url='.URL::base($link).'">';
|
||||
}else{
|
||||
echo '<meta http-equiv="refresh" content="0; url='.URL::base().'">';
|
||||
}
|
||||
}
|
||||
|
||||
function seo($s) {
|
||||
$tr = array('ş','Ş','ı','I','İ','ğ','Ğ','ü','Ü','ö','Ö','Ç','ç','(',')','/',':',',','.');
|
||||
$eng = array('s','s','i','i','i','g','g','u','u','o','o','c','c','','','-','-','-','-');
|
||||
$s = str_replace($tr,$eng,$s);
|
||||
$s = strtolower($s);
|
||||
$s = preg_replace('/&amp;amp;amp;amp;amp;amp;amp;amp;.+?;/', '', $s);
|
||||
$s = preg_replace('/\s+/', '-', $s);
|
||||
$s = preg_replace('|-+|', '-', $s);
|
||||
$s = preg_replace('/#/', '', $s);
|
||||
$s = str_replace('.', '', $s);
|
||||
$s = trim($s, '-');
|
||||
return $s;
|
||||
}
|
||||
|
||||
function kategoriler($kat = '0',$table = 'kategoriler') {
|
||||
return DB::where('kat_ustid',$kat)->get($table)->result();
|
||||
}
|
||||
|
||||
function hataVarmi($p){
|
||||
if (DB::affectedRows()) {
|
||||
redirect(URL::base($p));
|
||||
}else{
|
||||
jalert(DB::error());
|
||||
}
|
||||
}
|
||||
|
||||
function KategoriListesi($id = 0,$secim = 0,$tire = 0,$select = ''){
|
||||
$sorgu = DB::where('kat_ustid',$id)->get('kategoriler')->result();
|
||||
$se = '';
|
||||
foreach ($sorgu as $key) {
|
||||
if ($key->kat_ustid == 0) {
|
||||
$tire = 0;
|
||||
$style = 'color:#000;font-weight:bolder;font-size:13px;';
|
||||
}
|
||||
|
||||
if ($secim != $key->kat_ustid){
|
||||
$secim = $key->kat_ustid;
|
||||
$style = 'color:#000';
|
||||
$tire++;
|
||||
}
|
||||
|
||||
if($key->id == $select){$sel = 'selected';}else{$sel='';}
|
||||
|
||||
echo '<option value="'.$key->id.'" style="'.$style.'"'.$se.$sel.' >'.str_repeat('- ',$tire).$key->adi."</option>";
|
||||
KategoriListesi($key->id,$secim,$tire,$select);
|
||||
}
|
||||
}
|
||||
|
||||
function post($method,$function){
|
||||
if (method::post()) {
|
||||
$this->$method->$function(method::post());
|
||||
}
|
||||
}
|
||||
|
||||
function yonetimKategori($selected = 0, $id = 0,$secim = 0,$tire = 0){
|
||||
|
||||
$sorgu = DB::where('kat_ustid',$id)->get('kategoriler')->result();
|
||||
|
||||
foreach ($sorgu as $key) {
|
||||
|
||||
if ($key->kat_ustid == 0) {$tire = 0;$style = 'color:#000;font-weight:bolder;font-size:13px;';}
|
||||
|
||||
if ($secim != $key->kat_ustid){$secim = $key->kat_ustid;$style = 'color:#000';$tire++;}
|
||||
|
||||
if ($key->id == $selected) { $selected = 'selected'; }
|
||||
echo '<option value="'.$key->id.'" style="'.$style.'" '.$selected.'>'.str_repeat('- ',$tire).$key->adi."</option>";
|
||||
|
||||
yonetimKategori($key->id,$secim,$tire);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function KategoriTablosu($id = 0,$secim = 0,$tire = 0){
|
||||
$sorgu = DB::where('kat_ustid',$id)->get('kategoriler')->result();
|
||||
|
||||
foreach ($sorgu as $key) {
|
||||
|
||||
if ($key->kat_ustid == 0) {
|
||||
$tire = 0;
|
||||
$style = 'color:#000;font-weight:bolder;font-size:13px;';
|
||||
}
|
||||
|
||||
if ($secim != $key->kat_ustid){
|
||||
$secim = $key->kat_ustid;
|
||||
$style = 'color:#000';
|
||||
$tire++;
|
||||
}
|
||||
|
||||
$duzenle = URL::base('panel/category/edit/'.$key->id);
|
||||
$sil = URL::base('panel/category/delete/'.$key->id);
|
||||
|
||||
echo '<tr>
|
||||
<td><img src="'.URL::base($key->img).'"></td>
|
||||
<td style="'.$style.'">'.str_repeat('- ',$tire).$key->adi.'</td>
|
||||
<td>'.$key->aciklama.'</td>
|
||||
<td class="islemler" style="text-align: center;">
|
||||
<a href="'.$duzenle.'"><i class="fa fa-pencil"></i></a>
|
||||
<a href="'.$sil.'" onclick="return confirm(\'Bu kaydı silmek istediğinize eminmisiniz?\')"><i class="fa fa-remove"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
KategoriTablosu($key->id,$secim,$tire);
|
||||
}
|
||||
}
|
||||
|
||||
function kelimebol($metin, $karaktersayisi){
|
||||
$icerik = htmlspecialchars_decode($metin);
|
||||
$icerik = strip_tags($icerik);
|
||||
$icerik = str_replace(array("\t","\r","\n"), ' ',$icerik);
|
||||
$icerik_bol = explode(' ', $icerik); // metini bosluklara gore bolduk
|
||||
$icerik = '';
|
||||
for($i = 0; $i < count($icerik_bol); $i++) {
|
||||
if ($icerik_bol[$i] != '') // veri yok mu? Atla, varsa ekle
|
||||
$icerik .= trim($icerik_bol[$i]).' ';
|
||||
}
|
||||
|
||||
if( preg_match('/(.*?)\s/i', substr($icerik, $karaktersayisi), $dizi) )
|
||||
return $icerik = substr($icerik, 0, $karaktersayisi+strlen($dizi[0]));
|
||||
}
|
||||
|
||||
|
||||
function authority($id){
|
||||
$user = DB::where('user_id',$id)->get('user')->row();
|
||||
|
||||
return DB::where('id',$user->authority)->get('authority')->row();
|
||||
}
|
||||
|
||||
function setting($row){
|
||||
return DB::select('value')->where('title',$row)->get('settings')->value();
|
||||
}
|
||||
|
||||
function settings($key){
|
||||
return DB::select('value')->where('title',$key)->settings()->Value();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
function view($deg = ''){
|
||||
return import::view($deg);
|
||||
}
|
||||
*/
|
||||
function selected($id1, $id2){
|
||||
if ($id1 == $id2){echo 'selected';}
|
||||
}
|
||||
|
||||
function checked($id1, $id2){
|
||||
if ($id1 == $id2){echo 'checked';}
|
||||
}
|
||||
|
||||
|
||||
function linkcleaner($text){
|
||||
return preg_replace('/<a(.*?)href=\"(.*?)\"(.*?)>(.*?)<\/a>/', "\\4", $text);
|
||||
}
|
||||
|
||||
function theme_list(){
|
||||
return Folder::files('Projects/Frontend/Views/');
|
||||
}
|
||||
|
||||
function logo_list(){
|
||||
return Folder::files('img/logo/');
|
||||
}
|
||||
|
||||
function favicon_list(){
|
||||
return Folder::files('img/fav/');
|
||||
}
|
||||
|
||||
function decode($deger){ echo htmlspecialchars_decode($deger);}//decode
|
||||
function decode1($deger){ return htmlspecialchars_decode($deger);}//decode
|
||||
|
||||
function flag($slug){
|
||||
|
||||
$flag = DB::select('flag')->where('slug',$slug)->language()->value();
|
||||
return URL::base($flag);
|
||||
|
||||
}
|
||||
@@ -1,407 +0,0 @@
|
||||
<?php
|
||||
|
||||
function category(){
|
||||
return DB::where('kat_ustid',0)->kategoriler()->result();
|
||||
}
|
||||
|
||||
function content_category(){return DB::where('lang',LANG,'and')->where('parentId',0)->content_category()->result();}
|
||||
|
||||
function contentListAdmin($lang = 'tr'){
|
||||
return DB::orderBy('id','desc')
|
||||
->where('content_type','content','and')
|
||||
->where('lang',$lang)
|
||||
->get('content')
|
||||
->result();
|
||||
}
|
||||
|
||||
/* Functions Content */
|
||||
function pageList($lang = 'tr'){
|
||||
return DB::orderBy('title','asc')
|
||||
->where('content_type','page','and')
|
||||
->where('lang', $lang)
|
||||
->get('content')->result();
|
||||
}
|
||||
|
||||
function pageEdit($id){
|
||||
return DB::where('id',$id)->get('content')->row();
|
||||
}
|
||||
|
||||
|
||||
function duyuru(){
|
||||
return DB::where('status','1')->duyuruRow();
|
||||
}
|
||||
|
||||
function duyuruRow($id){
|
||||
return DB::Where('id',$id)->duyuruRow();
|
||||
}
|
||||
|
||||
function etiketler(){
|
||||
$par = DB::select('icerik_tag')->get('content')->result();
|
||||
$a = '';$b='';
|
||||
foreach ($par as $key ) {
|
||||
$a .= $key->icerik_tag.',';
|
||||
}
|
||||
|
||||
$new = explode(',',$a);
|
||||
return array_unique($new);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* End Functions Content */
|
||||
function telegram1($messaggio) {
|
||||
$url = "https://api.telegram.org/bot889222363:AAF-kRBifC2lt9Yvv6mUqEuu1h0f7vIYhhA/sendMessage?forum_topic_created_name=-testkonu";
|
||||
$url = $url . "&text=" . urlencode($messaggio);
|
||||
$ch = curl_init();
|
||||
$optArray = array(
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_RETURNTRANSFER => true
|
||||
);
|
||||
curl_setopt_array($ch, $optArray);
|
||||
$result = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
}
|
||||
|
||||
function telegram($messaggio) {
|
||||
//echo "Mesaj Gönderiliyor.. -1001464176086\n";
|
||||
$url = "https://api.telegram.org/bot889222363:AAF-kRBifC2lt9Yvv6mUqEuu1h0f7vIYhhA/sendMessage?chat_id=-1001464176086";
|
||||
$url = $url . "&text=" . urlencode($messaggio);
|
||||
$ch = curl_init();
|
||||
$optArray = array(
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_RETURNTRANSFER => true
|
||||
);
|
||||
curl_setopt_array($ch, $optArray);
|
||||
$result = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
}
|
||||
|
||||
function translate($data){echo ML::select($data);}
|
||||
|
||||
function lang($langFile, $langParam){
|
||||
return Lang::select($langFile, $langParam);
|
||||
}
|
||||
|
||||
|
||||
function loginControl($deg='Panel'){
|
||||
if(!Session::select('login')){
|
||||
redirect('home/login');
|
||||
}
|
||||
}
|
||||
|
||||
function reCaptcha($response){
|
||||
$fileds = [
|
||||
'secret' => "6Lc2qXwUAAAAAGfGK29-85EpV72saCoGwDUvwJv2",
|
||||
'response' => $response
|
||||
];
|
||||
|
||||
$ch = curl_init('https://www.google.com/recaptcha/api/siteverify');
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => http_build_query($fileds),
|
||||
CURLOPT_RETURNTRANSFER => true
|
||||
]);
|
||||
|
||||
$result = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return json_decode($result,true);
|
||||
}
|
||||
|
||||
function member_role($id){
|
||||
return DB::select('authority')->where('id',$id)->get('authority')->value();
|
||||
|
||||
}
|
||||
|
||||
function authority_list(){
|
||||
return DB::get('authority')->result();
|
||||
}
|
||||
|
||||
|
||||
function category_name($id){
|
||||
return DB::select('adi')->where('id',$id)->get('kategoriler')->value();
|
||||
}
|
||||
|
||||
function galeryCategory(){
|
||||
return DB::get('galeryCategory')->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function languageList(){
|
||||
return DB::orderBy('sirala','asc')->language()->result();
|
||||
}
|
||||
|
||||
function langList(){
|
||||
return DB::orderBy('sirala','asc')->language()->result();
|
||||
}
|
||||
|
||||
function langRow($id){
|
||||
return DB::where('id',$id)->language()->row();
|
||||
}
|
||||
|
||||
/* MENU FUNCTIONS */
|
||||
function menuList($menuCatId=''){
|
||||
return DB::where('menuCatId',$menuCatId)->menuResult();
|
||||
}
|
||||
|
||||
function menuListAdmin($subMenuId ='0'){
|
||||
return DB::where('subMenuId',$subMenuId)->menuResult();
|
||||
}
|
||||
|
||||
function menuCatList(){
|
||||
return DB::menucat()->result();
|
||||
}
|
||||
|
||||
function menuCatName($id){
|
||||
return DB::where('id',$id)->menucat()->value('name');
|
||||
}
|
||||
|
||||
|
||||
function menu($data){
|
||||
$catid = DB::where('name', $data)->menucat()->value('id');
|
||||
|
||||
$menu = DB::where('menuCatId', $catid, 'and')->where('lang', LANG)->menu()->result();
|
||||
|
||||
foreach ($menu as $item) {
|
||||
// Sadece http:// veya https:// ile BAŞLAMIYORSA base URL ekle
|
||||
if (!preg_match('/^(https?:\/\/)/i', $item->link)) {
|
||||
$item->link = URL::base() . ltrim($item->link, '/');
|
||||
}
|
||||
}
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
||||
function menu1($menuCatId){
|
||||
return DB::where('menuCatId', $menuCatId,'and')->where('lang',LANG)->menu()->result();
|
||||
}
|
||||
|
||||
function menuRow($id){
|
||||
return DB::where('id',$id)->menu()->row();
|
||||
}
|
||||
|
||||
/* END MENU FUNCTIONS */
|
||||
function userRow($id){
|
||||
return DB::where('user_id',$id)->get('user')->row();
|
||||
}
|
||||
|
||||
function activeUserCount(){
|
||||
return DB::where('status','1')->get('user')->totalRows();
|
||||
}
|
||||
|
||||
function disableMemberCount(){
|
||||
return DB::where('status','2')->get('user')->totalRows();
|
||||
}
|
||||
|
||||
function pendingMemberCount(){
|
||||
return DB::where('status','0')->get('user')->totalRows();
|
||||
}
|
||||
|
||||
function username($id){
|
||||
return DB::select('username')->where('user_id',$id)->get('user')->value();
|
||||
}
|
||||
|
||||
function userId($username){
|
||||
return DB::select('user_id')->whereLike('username',$username)->get('user')->value();
|
||||
}
|
||||
|
||||
function userStatus($id){
|
||||
return DB::select('status')->where('user_id',$id)->get('user')->value();
|
||||
}
|
||||
|
||||
function userList(){
|
||||
return DB::orderBy('username','asc')->where('status',1)->get('user')->limit('10')->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function contentStatus($id){
|
||||
return DB::select('status')->where('value',$id, 'and')->where('lang',LANG)->contentStatus()->value();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* functions Meagges*/
|
||||
function messsageCount($userid){
|
||||
return DB::where('userId',$userid,'and')->where('status','0')->messages()->totalRows('TRUE');
|
||||
}
|
||||
|
||||
function messageList($userid){
|
||||
return DB::where('userId',$userid)->messages()->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function messageListAdmin(){
|
||||
return DB::where('admin','1')->messages()->result();
|
||||
}
|
||||
|
||||
function messageRow($id){
|
||||
return DB::where('id',$id)->messages()->row();
|
||||
}
|
||||
|
||||
function messageStatus($status){
|
||||
if ($status == 1) {
|
||||
echo '<i class="fa-solid fa-envelope-circle-check" title="'.lang('message','read').'"></i>';
|
||||
}else{
|
||||
echo '<i class="fa-solid fa-envelope" title="'.lang('message','unread').'"></i>';
|
||||
}
|
||||
}
|
||||
|
||||
/* End Functions Meagges*/
|
||||
function curl($url, $post = NULL)
|
||||
{
|
||||
$http_header = array(
|
||||
"Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
|
||||
"Accept-Language:tr-TR,tr;q=0.8,en-US;q=0.6,en;q=0.4,id;q=0.2,ru;q=0.2,ar;q=0.2,fa;q=0.2",
|
||||
"Cache-Control:max-age=0",
|
||||
"Upgrade-Insecure-Requests:1",
|
||||
);
|
||||
$ch = curl_init();
|
||||
curl_setopt_array($ch, array(
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36",
|
||||
CURLOPT_RETURNTRANSFER => TRUE,
|
||||
CURLOPT_FOLLOWLOCATION => TRUE,
|
||||
CURLOPT_ENCODING => "",
|
||||
CURLOPT_SSL_VERIFYPEER => FALSE,
|
||||
CURLOPT_SSL_VERIFYHOST => FALSE,
|
||||
CURLOPT_MAXREDIRS => 3,
|
||||
CURLOPT_HTTPHEADER => $http_header,
|
||||
));
|
||||
if (isset($post)) {
|
||||
curl_setopt_array($ch, array(
|
||||
CURLOPT_POST => TRUE,
|
||||
CURLOPT_POSTFIELDS => $post,
|
||||
CURLOPT_HTTPHEADER => array_merge($http_header, array(
|
||||
"Expect: ",
|
||||
)),
|
||||
));
|
||||
}
|
||||
$content = curl_exec($ch);
|
||||
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
$http_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
|
||||
curl_close($ch);
|
||||
return (object)array(
|
||||
"http_code" => $http_code,
|
||||
"http_url" => $http_url,
|
||||
"content" => $content,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Üyelik onayı e-posta şablonu
|
||||
function emailActivationTemplate($username, $rnd) {
|
||||
return "
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
||||
<title>Üyelik Onayı</title>
|
||||
</head>
|
||||
<body style='margin: 0; padding: 0; font-family: Arial, sans-serif; background-color: #f4f4f4;'>
|
||||
<div style='max-width: 600px; margin: 0 auto; background-color: #ffffff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);'>
|
||||
<div style='text-align: center; margin-bottom: 30px;'>
|
||||
<h1 style='color: #333; margin: 0; font-size: 24px;'>Pisi GNU / Linux</h1>
|
||||
<p style='color: #666; margin: 10px 0 0; font-size: 14px;'>Üyelik Onayı</p>
|
||||
</div>
|
||||
|
||||
<div style='background-color: #f9f9f9; padding: 20px; border-radius: 6px; margin-bottom: 20px;'>
|
||||
<p style='color: #333; margin: 0 0 15px; font-size: 16px; line-height: 1.6;'>
|
||||
Merhaba <strong>$username</strong>,
|
||||
</p>
|
||||
<p style='color: #666; margin: 0 0 15px; font-size: 14px; line-height: 1.6;'>
|
||||
Sitemize kayıt olduğunuz için teşekkür ederiz. Üyeliğinizi aktif etmek için aşağıdaki butona tıklayın:
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style='text-align: center; margin: 30px 0;'>
|
||||
<a href='https://pisilinux.org/member/aktivizasyon/$rnd'
|
||||
style='display: inline-block; background-color: #007bff; color: #ffffff; text-decoration: none; padding: 12px 30px; border-radius: 6px; font-size: 16px; font-weight: bold;'>
|
||||
Üyeliği Aktif Et
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style='background-color: #fff3cd; padding: 15px; border-left: 4px solid #ffc107; border-radius: 4px; margin-bottom: 20px;'>
|
||||
<p style='color: #856404; margin: 0; font-size: 13px; line-height: 1.5;'>
|
||||
<strong>Alternatif:</strong> Eğer buton çalışmazsa, şu bağlantıyı tarayıcınıza kopyalayın:<br>
|
||||
<span style='word-break: break-all; color: #007bff;'>https://pisilinux.org/member/aktivizasyon/$rnd</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style='border-top: 1px solid #e0e0e0; padding-top: 20px; margin-top: 20px;'>
|
||||
<p style='color: #666; margin: 0 0 10px; font-size: 14px; line-height: 1.6;'>
|
||||
Ayrıca <a href='https://t.me/joinchat/MAcpp0o6E4dAAoz090cDjA' style='color: #007bff; text-decoration: none;'>Telegram</a> kanalımızda da sizi aramızda görmekten memnuniyet duyarız.
|
||||
</p>
|
||||
<p style='color: #999; margin: 10px 0 0; font-size: 12px;'>
|
||||
Bu e-posta otomatik olarak gönderilmiştir, lütfen cevaplamayınız.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style='text-align: center; margin-top: 30px;'>
|
||||
<p style='color: #999; margin: 0; font-size: 12px;'>
|
||||
". date("Y") ." Pisi GNU / Linux. Tüm hakları saklıdır.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>";
|
||||
}
|
||||
|
||||
// Şifre kurtarma e-posta şablonu
|
||||
function emailPasswordResetTemplate($rnd) {
|
||||
return "
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
||||
<title>Şifre Kurtarma</title>
|
||||
</head>
|
||||
<body style='margin: 0; padding: 0; font-family: Arial, sans-serif; background-color: #f4f4f4;'>
|
||||
<div style='max-width: 600px; margin: 0 auto; background-color: #ffffff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);'>
|
||||
<div style='text-align: center; margin-bottom: 30px;'>
|
||||
<h1 style='color: #333; margin: 0; font-size: 24px;'>Pisi GNU / Linux</h1>
|
||||
<p style='color: #666; margin: 10px 0 0; font-size: 14px;'>Şifre Kurtarma</p>
|
||||
</div>
|
||||
|
||||
<div style='background-color: #f9f9f9; padding: 20px; border-radius: 6px; margin-bottom: 20px;'>
|
||||
<p style='color: #333; margin: 0 0 15px; font-size: 16px; line-height: 1.6;'>
|
||||
Merhaba,
|
||||
</p>
|
||||
<p style='color: #666; margin: 0 0 15px; font-size: 14px; line-height: 1.6;'>
|
||||
Şifrenizi kurtarmak için aşağıdaki butona tıklayarak yeni şifrenizi belirleyebilirsiniz:
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style='text-align: center; margin: 30px 0;'>
|
||||
<a href='https://pisilinux.org/member/yenisifre/$rnd'
|
||||
style='display: inline-block; background-color: #007bff; color: #ffffff; text-decoration: none; padding: 12px 30px; border-radius: 6px; font-size: 16px; font-weight: bold;'>
|
||||
Yeni Şifre Belirle
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style='background-color: #fff3cd; padding: 15px; border-left: 4px solid #ffc107; border-radius: 4px; margin-bottom: 20px;'>
|
||||
<p style='color: #856404; margin: 0; font-size: 13px; line-height: 1.5;'>
|
||||
<strong>Alternatif:</strong> Eğer buton çalışmazsa, şu bağlantıyı tarayıcınıza kopyalayın:<br>
|
||||
<span style='word-break: break-all; color: #007bff;'>https://pisilinux.org/member/yenisifre/$rnd</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style='border-top: 1px solid #e0e0e0; padding-top: 20px; margin-top: 20px;'>
|
||||
<p style='color: #999; margin: 10px 0 0; font-size: 12px;'>
|
||||
Bu e-posta otomatik olarak gönderilmiştir, lütfen cevaplamayınız.<br>
|
||||
Şifrenizi değiştirmediyseniz bu e-postayı görmezden gelebilirsiniz.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style='text-align: center; margin-top: 30px;'>
|
||||
<p style='color: #999; margin: 0; font-size: 12px;'>
|
||||
". date("Y") ." Pisi GNU / Linux. Tüm hakları saklıdır.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>";
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
/* Functions Wiki */
|
||||
function wiki_katname($data){
|
||||
return DB::select('adi')->where('id',$data)->get('wiki_kat')->value();
|
||||
}
|
||||
|
||||
function wikiCategory($kat = '30') {
|
||||
return DB::where('kat_ustid',$kat)->get('wiki_kat')->result();
|
||||
}
|
||||
|
||||
function wikiMenu($menuCatId){
|
||||
return DB::where('menuCatId', $menuCatId,'and')->where('lang',LANG)->menu()->result();
|
||||
}
|
||||
|
||||
function wikicontent(){
|
||||
return DB::orderBy('id','desc')->where('durum','1','and')->where('lang', LANG)->limit('3')->get('wiki')->result();
|
||||
}
|
||||
|
||||
function wikicontentAdmin(){
|
||||
return DB::orderBy('baslik','asc')->where('durum','1','and')->where('lang', LANG)->get('wiki')->result();
|
||||
}
|
||||
|
||||
|
||||
function wikiCategoryName($id){
|
||||
return DB::select('adi')->where('id',$id)->get('wiki_kat')->value();
|
||||
}
|
||||
|
||||
function wiki_confirmation_content(){
|
||||
return DB::where('durum','3')->wiki()->result();
|
||||
}
|
||||
|
||||
function wiki_update_content(){
|
||||
return DB::where('durum','3')->wiki()->result();
|
||||
}
|
||||
|
||||
function wikiContentRow($id){
|
||||
return DB::where('id',$id,'and')
|
||||
->where('durum','1','and')
|
||||
->wiki()
|
||||
->row();
|
||||
}
|
||||
|
||||
function wikiContentRowAdmin($id){
|
||||
return DB::where('id',$id)
|
||||
->wiki()
|
||||
->row();
|
||||
}
|
||||
|
||||
function wikiUpdateRow($id){
|
||||
return DB::where('id',$id)
|
||||
->wiki_update()
|
||||
->row();
|
||||
}
|
||||
|
||||
|
||||
function WikiCategoryList($id){
|
||||
return DB::orderBy('id','desc')
|
||||
->where('katid',$id,'and')
|
||||
->where('durum','1', 'and')
|
||||
->where('lang', LANG)
|
||||
->wikiResult();
|
||||
|
||||
}
|
||||
|
||||
function wikiStatus($value){
|
||||
return DB::select('status')->where('value',$value)->get('status')->value();
|
||||
}
|
||||
|
||||
function wikiSearch($search){
|
||||
return DB::select('id','baslik','baslik_seo','detay')->orderBy('id','desc')->whereLike('baslik', $search,'or')->whereLike('detay', $search)->get('wiki')->result();
|
||||
}
|
||||
|
||||
function wikiContentCountByCategoryLink($link) {
|
||||
preg_match('/\/wiki\/category\/(\d+)/', $link, $matches);
|
||||
if (!isset($matches[1])) return 0;
|
||||
return DB::where('katid', $matches[1], 'and')
|
||||
->where('durum', '1', 'and')
|
||||
->where('lang', LANG)
|
||||
->get('wiki')
|
||||
->totalRows();
|
||||
}
|
||||
|
||||
/* End Functions Wiki */
|
||||
@@ -1 +0,0 @@
|
||||
@view
|
||||
@@ -1 +0,0 @@
|
||||
@style('https://fonts.googleapis.com/css?family=Sarpanch', 'style')
|
||||
Reference in New Issue
Block a user