Exemple #1
0
<?php

/**
* @version		1.5.0
* @package		Fiyo CMS
* @copyright	Copyright (C) 2012 Fiyo CMS.
* @license		GNU/GPL, see LICENSE.txt
* @description	
**/
define('_FINDEX_', 1);
require_once '../../../system/jscore.php';
$db = new FQuery();
$db->connect();
$online = angka(FQuery('statistic_online'));
$total = angka(FQuery('statistic'));
$dtf = date('Y-m-d 00:00:00');
$today = angka(FQuery('statistic', "time >= '{$dtf}'", "", "", "time ASC"));
$dtf = date('Y-m-d 00:00:00', strtotime("-1 Months"));
$month = angka(FQuery('statistic', "time >= '{$dtf}'", "", "", "time ASC"));
$timer = time() - 300;
$db->delete(FDBPrefix . 'statistic_online', "time < {$timer}");
echo "\n{ \"today\":\"{$today}\" , \"month\":\"{$month}\", \"total\":\"{$total}\", \"online\":\"{$online}\" }";
Exemple #2
0
<?php

declare (strict_types=1);
function angka() : string
{
    return true;
}
echo angka();
// TypeError
Exemple #3
0
 function item($id, $menuId, $DL = null)
 {
     if (FQuery("pustaka_file", "id={$id}")) {
         $db = new FQuery();
         $db->connect();
         $sql = $db->select(FDBPrefix . "pustaka_file", "*", "id={$id} AND status=1");
         $qr = mysql_fetch_array($sql);
         if ($qr) {
             $category = oneQuery('pustaka_category', 'id', $qr['category'], 'name');
             $catlevel = oneQuery('pustaka_category', 'id', $qr['category'], 'level');
             $author = oneQuery('user', 'id', $qr['lecturer'], 'name');
             if (USER_LEVEL <= $catlevel or USER_LEVEL <= $qr['level']) {
                 $catlink = categoryLink($qr['category']);
                 $labels = labelToLink($qr['tags']);
                 $category = "<a href='{$catlink}' title='See more {$category}'>{$category}</a>";
                 /*********** File Link *************/
                 $x = substr_count($qr['link1'], ".zip");
                 $r = substr_count($qr['link1'], ".rar");
                 $z = substr_count($qr['link1'], ".7zip");
                 if ($x > 0 or $r > 0 or $z > 0) {
                     $vlink = "?app=pdf&view=item&id={$qr['id']}&go=pdf";
                     $link = make_permalink($vlink);
                     $link = "<a href='{$link}' class='pdf' title='pdf File'><span>@</span> pdf</a>";
                 } else {
                     $link = $qr['link1'];
                     $link = "<a href='{$link}' target='_blank' class='pdf' title='pdf File'><span>@</span> pdf</a>";
                 }
                 /********** author link ***********/
                 if (!empty($qr['author'])) {
                     $author = $qr['author'];
                 }
                 $alink = "?app=pdf&view=author&id={$qr['id']}";
                 $author = $qr['author'];
                 $lecturer = lecToLink($qr['lecturer']);
                 /********** date updated ***********/
                 /********** pdf hits ***********/
                 $pdfed = "<a class='pdf' style='margin-right:0 !important' title='Hits'><span>\$</span> 1</a>";
                 $this->pdf = $link;
                 $this->pdff = $qr['link1'];
                 $this->author = $author;
                 $this->lecturer = $lecturer;
                 // $this -> labels		= $labels;
                 $this->category = $category;
                 $this->pdfed = $pdfed;
                 $this->title = $qr['title'];
                 $this->year = $qr['year'];
                 $this->desc = $qr['description'];
                 $this->hits = angka($qr['hits']);
             } else {
                 echo pustaka_Page_Denied;
             }
         } else {
             echo pustaka_Page_Notfound;
         }
     }
 }