コード例 #1
0
ファイル: TSystem.php プロジェクト: A1Gard/ToosFrameWork
 public static function GetInstance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
コード例 #2
0
 /**
  * @brief Konstruktor
  */
 public function __construct()
 {
     $this->_system = TSystem::instance();
     // Globale Variablen initialisieren
     //
     $GLOBALS['home'] = 0;
     $GLOBALS['index'] = 0;
 }
コード例 #3
0
ファイル: Index.php プロジェクト: A1Gard/ToosFrameWork
echo TSystem::GetServerCPUUsage();
?>
">
                    </span>
                </li>
                <li>
                <?php 
_lp("Server Memory usage");
?>
                    :
                    <span>
                        <progress max="100" title="<?php 
echo TSystem::GetServerMemUsage();
?>
%" value="<?php 
echo TSystem::GetServerMemUsage();
?>
">
                    </span>
                </li>
                
            </ul>

        </div>

    </div>
    <div class="grd12">
        <div class="white-bg" >
            <br />
            <h3>
                <?php 
コード例 #4
0
ファイル: header.php プロジェクト: A1Gard/ToosFrameWork
                    </ul>

                </div>
                <div id="admin-bar">
                    <div id="you" class="pre-actived">
                        <img src="<?php 
echo UR_MP_ASSETS;
?>
img/anonymous.gif" alt="[your avatar]" />
                        <span class="hello">
                            <?php 
_lp('Hello');
?>
, 
                            <?php 
$s = new TSystem();
echo $s->GetField('manager', 'manager_', 'manager_displayname', $_SESSION['MN_ID']);
?>
                        </span>
                        <span class="fa fa-angle-down" ></span>
                        <ul class="mini-dropdown animate">
                            <li>
                                <a href="#">
                                    <span class="fa fa-android"></span>
                                    text1
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <span class="fa fa-bell-o"></span>
                                    text2
コード例 #5
0
 public function Statistic()
 {
     $sys = new TSystem();
     $st = new TStatistic();
     $dt = new TDate();
     $this->view->m = $sys->GetRcordCount('member');
     $this->view->ma = $sys->GetRcordCount('member', 'member_type = 1');
     $this->view->com = $sys->GetRcordCount('comment');
     $this->view->acom = $sys->GetRcordCount('member', 'member_status = 1');
     $this->view->top = $sys->GetRcordCount('topic');
     $this->view->topa = $sys->GetRcordCount('topic', 'topic_status = 1');
     $this->view->tops = $sys->GetRcordCount('topic', 'topic_status = 2');
     $viss['visitcount'] = $st->VisitCount($dt->Today(), time());
     $viss['visitorcount'] = $st->VisitorCount($dt->Today(), time());
     $viss['y'] = $st->VisitCount($dt->Yesterday(), $dt->Today());
     $viss['ys'] = $st->VisitorCount($dt->Yesterday(), $dt->Today());
     $viss['m'] = $st->VisitCount($dt->ThisMonthStart(), time());
     $viss['lm'] = $st->VisitCount($dt->LastMonthStart(), $dt->LastMonthEnd());
     $viss['total'] = $st->VisitCount(0, time());
     $viss['online'] = $st->OnlineCount();
     $t = time();
     $s = $dt->Yesterday();
     $e = $dt->Today() - 1;
     $dayz = array();
     $viz = array();
     $vit = array();
     $viz[0] = $viss['visitcount'];
     $vit[0] = $viss['visitorcount'];
     for ($index = 0; $index < 30; $index++) {
         $mod = $index * DAY;
         $dayz[$index] = $dt->SDate('d', $t - $mod);
         $viz[$index + 1] = $st->VisitCount($s - $mod, $e - $mod);
         $vit[$index + 1] = $st->VisitorCount($s - $mod, $e - $mod);
     }
     unset($viz[$index + 1]);
     unset($vit[$index + 1]);
     $this->view->dayz = array_reverse($dayz);
     $this->view->viz = array_reverse($viz);
     $this->view->vit = array_reverse($vit);
     global $browser_list, $os_list;
     $this->view->bw = array();
     $this->view->os = array();
     for ($i = 0; $i < count($browser_list); $i++) {
         $this->view->bw[$i] = $sys->GetRcordCount('statistic', 'statistic_browser = ' . $i);
     }
     for ($i = 0; $i < count($os_list); $i++) {
         $this->view->os[$i] = $sys->GetRcordCount('statistic', 'statistic_os = ' . $i);
     }
     while (($key = array_search('0', $this->view->os)) !== false) {
         unset($this->view->os[$key]);
     }
     while (($key = array_search('0', $this->view->bw)) !== false) {
         unset($this->view->bw[$key]);
     }
     $this->view->cl1 = $sys->GetRedToGreen(count($this->view->bw));
     $this->view->cl2 = $sys->GetRedToGreen(count($this->view->os));
     $this->view->topvisits = $sys->GetRecordByOrd('topic', 'topic_counter', '1', 'DESC');
     $this->view->lastsch = $sys->GetRecordByOrd('statistic', 'statistic_id', ' CHAR_LENGTH(statistic_keyword) > 2 ', 'DESC');
     $this->view->vis = $viss;
     $this->view->PageRender('Index/Statistic', _lg('Statistic'));
 }