예제 #1
0
 /**
  * 推測ユーザを取得
  */
 public function get($join = false, $legacy = false)
 {
     // ファイルの読み込み
     $file = $this->openFile('r');
     // ロック
     $file->flock(LOCK_SH);
     // 巻き戻し(要るの?)
     $file->rewind();
     // 初期値
     $result = array();
     // 1行毎ファイルを読む
     while (!$file->eof()) {
         $field = parent::table2array($file->fgets());
         // PukiWiki 表形式データを配列データに変換
         if (count($field) == 0) {
             continue;
         }
         $user = empty($field[3]) ? $field[2] : $field[3];
         // 任意欄が記入されていれば、それを採用
         $sum[$field[0]][$field[1]][$user] = '';
     }
     // アンロック
     $file->flock(LOCK_UN);
     // 念のためオブジェクトを開放
     unset($file);
     // 出力
     return $sum;
 }
예제 #2
0
 /**
  * 署名を抽出
  */
 public function getSigunature()
 {
     $sum = array();
     $lines = parent::get();
     $name = parent::get_log_field();
     if (!$lines) {
         return;
     }
     foreach ($lines as $_data) {
         foreach ($_data as $line) {
             $field = parent::line2field($line, $name);
             if (empty($field['ua'])) {
                 continue;
             }
             $user = parent::guess_user($field['user'], $field['ntlm'], $field['sig']);
             if (empty($user)) {
                 continue;
             }
             $sum[$field['ua']][$field['host']][$user] = '';
         }
     }
     return $sum;
 }
예제 #3
0
 function __construct($page)
 {
     $this->kind = 'download';
     $this->isWiki = false;
     parent::__construct($page);
 }
예제 #4
0
 function __construct($x)
 {
     $this->kind = 'login';
     $this->isWiki = true;
     parent::__construct();
 }
예제 #5
0
 function __construct($page)
 {
     $this->kind = 'check';
     $this->isWiki = false;
     parent::__construct($page);
 }
예제 #6
0
 function __construct($page)
 {
     $this->kind = 'cmd';
     $this->isWiki = true;
     parent::__construct($page);
 }