39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?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();
|
|
} |