当前位置: 首页>>代码示例>>PHP>>正文


PHP Log::addLog方法代码示例

本文整理汇总了PHP中Log::addLog方法的典型用法代码示例。如果您正苦于以下问题:PHP Log::addLog方法的具体用法?PHP Log::addLog怎么用?PHP Log::addLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Log的用法示例。


在下文中一共展示了Log::addLog方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: to_log

 public function to_log($message = NULL)
 {
     parent::getRequest();
     $request = $this->getRequest();
     $controller = $request->getControllerName();
     $action = $request->getActionName();
     $data = array('log_user' => $this->user->getLogin(), 'log_ip' => $_SERVER['REMOTE_ADDR'], 'log_controller' => $controller, 'log_action' => $action, 'log_request' => $_SERVER['REQUEST_URI'], 'log_message' => $message);
     $log = new Log($this->siteId);
     $log->addLog($data);
 }
开发者ID:rjon76,项目名称:netspotapp,代码行数:10,代码来源:MainAppController.php

示例2: logout

 public function logout()
 {
     //$this->model->logout();
     //Session::unsetAll();
     Session::createSession();
     $log = new Log();
     $log->addLog(Session::get('user'), 'LOGOUT', '');
     unset($log);
     Session::destroySession();
     //session_destroy();
     header('location:' . URL . 'login');
     exit;
 }
开发者ID:ryderonil,项目名称:sisurip,代码行数:13,代码来源:login_controller.php

示例3: save

 function save($values, $id_node)
 {
     $tmp = dibi::fetch("SELECT * FROM " . self::TABLE . " WHERE id_node=%i", $id_node);
     //  	print_r($tmp);
     unset($values['id_node']);
     //odstranenie premennych ktore niesu v databaze
     foreach ($values as $key => $v) {
         if (!array_key_exists($key, $tmp)) {
             unset($values[$key]);
         }
     }
     //  	print_r($values);
     dibi::query("UPDATE " . self::TABLE . " SET ", $values, " WHERE id_node=%i", $id_node);
     Log::addLog($this, "Uprava contact form", "Menil:" . NEnvironment::getSession('Authentication')->login_form, '', $id_node);
 }
开发者ID:oaki,项目名称:demoshop,代码行数:15,代码来源:Admin_Contact.php

示例4: saveGMap

 function saveGMap($values, $id_node)
 {
     $tmp = dibi::fetch("SELECT * FROM [gmap] WHERE id_node=%i", $id_node);
     unset($values['id_node']);
     unset($values['saveGMap']);
     //odstranenie premennych ktore niesu v databaze
     $tmp = (array) $tmp;
     foreach ($values as $key => $v) {
         if (!array_key_exists($key, $tmp)) {
             unset($values[$key]);
         }
     }
     $values['googleBar'] = (int) $values['googleBar'];
     $values['enableScrollWheelZoom'] = (int) $values['enableScrollWheelZoom'];
     $values['doubleClickZoom'] = (int) $values['doubleClickZoom'];
     if (isset($values['modul_visible'])) {
         node::changeVisibility($id_node, $values['modul_visible']);
     }
     dibi::query("UPDATE gmap SET ", $values, " WHERE id_node=%i", $id_node);
     Log::addLog($this, "Uprava gmap", "Menil:" . NEnvironment::getSession('Authentication')->login_form, '', $id_node);
 }
开发者ID:oaki,项目名称:demoshop,代码行数:21,代码来源:gmap.php

示例5: redirect

                    echo " <a href='?page=" . $_GET['page'] . '&amp;action=' . $_GET['action'] . '&amp;do=' . $_GET['do'] . "&amp;page-id={$lastPage}'>&gt;&gt;</a>";
                }
                echo ' </div>';
                break;
        }
    }
} else {
    echo '<h1>Admin Panel</h1>';
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
        if (empty($_POST['username']) || empty($_POST['password'])) {
            echo '<p id="response" class="notification red">Please fill in all the fields.</p>';
        } else {
            if ($admin->login($_POST['username'], $_POST['password'])) {
                echo '<p id="response" class="notification green">You have successfully logged in. Please wait until the page reloads.</p>';
                $loggedIn = true;
                $log->addLog($_SESSION['loggedIn']['id'], "Logged in.");
                redirect("", "3");
            } else {
                echo '<p id="response" class="notification red">The user / password combination was incorrect. Please try again.</p>';
            }
        }
    }
    if ($loggedIn !== true) {
        ?>
	<form class="styled" action="" method="post">
		<label>Username</label>
	
		<input type="text" name="username" value="" />
		<br />
		
		
开发者ID:robbederks,项目名称:SiriKeys,代码行数:29,代码来源:admin.php

示例6: logRequest

 /**
  * Saves all aspects of current request to a log file so that we ensure
  * that we never lose user data and can retrieve it in the event of an
  * emergency
  *
  * @return none
  */
 function logRequest()
 {
     $log = new Log("direct_entry");
     $logmsg = $_SERVER['REMOTE_ADDR'];
     if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
         $logmsg .= " (" . $_SERVER['HTTP_X_FORWARDED_FOR'] . ")";
     }
     $logmsg .= substr(print_r($_REQUEST, true), 5);
     $log->addLog($logmsg);
 }
开发者ID:frankbiospective,项目名称:Loris,代码行数:17,代码来源:survey.php

示例7: deleteUser

 private function deleteUser()
 {
     dibi::query("DELETE FROM auth_user WHERE id_auth_user=%i", $_GET['id_delete_user']);
     Log::addLog($this, "Zmazanie uzovatela", $_GET['id_delete_user']);
 }
开发者ID:oaki,项目名称:demoshop,代码行数:5,代码来源:authentication.php

示例8: saveProduct

 function saveProduct($values, $id_node)
 {
     $collums = Tools::getCollum('module_product');
     foreach ($values as $k => $v) {
         if (!in_array($k, $collums)) {
             unset($values[$k]);
         }
     }
     $newname = "";
     $name = $values['title'];
     $i = 0;
     while ($i < 50) {
         if ($i == 0) {
             $newname = $name;
         } else {
             $newname = NStrings::webalize($name . $i);
         }
         $s = dibi::fetchSingle("SELECT COUNT(id_node) FROM [module_product] WHERE url_identifier=%s", $newname, " AND id_node!=%i", $id_node);
         if ($s == 0) {
             break;
         } else {
             $i++;
         }
     }
     $values['url_identifier'] = $newname;
     dibi::query("UPDATE [module_product] SET ", $values, " WHERE id_node=%i", $id_node);
     Log::addLog($this, "Uprava produktu", "Menil:" . NEnvironment::getSession('Authentication')->login_form, $values['title'], $id_node);
 }
开发者ID:oaki,项目名称:demoshop,代码行数:28,代码来源:Admin_Product.php

示例9: uploadFileSurat

 public function uploadFileSurat()
 {
     $upload = new Upload('upload');
     $upload->setDirTo('arsip/');
     $tipe = 'M';
     $satker = $_POST['satker'];
     $nomor = $_POST['nomor'];
     //nama baru akan terdiri dari tipe naskah_nomor surat_asal(asal/tetapi asal terlaku kepanjangan)
     $ubahNama = array($tipe, $nomor, $satker);
     $upload->setUbahNama($ubahNama);
     $upload->changeFileName($upload->getFileName(), $ubahNama);
     $namafile = $upload->getFileTo();
     $where = ' id_suratmasuk=' . $_POST['id'];
     $data = array('file' => $namafile);
     if ($upload->uploadFile()) {
         $this->model->uploadFile($data, $where);
         $datastat = array('stat' => '14');
         @Session::createSession();
         $user = Session::get('user');
         $log = new Log();
         $log->addLog($user, 'UPLOAD', 'user ' . $user . ' upload file surat no agenda ' . $this->model->getNomorAgenda($_POST['id']) . ' file:' . $namafile);
         unset($log);
         $this->model->update('suratmasuk', $datastat, $where);
         //update status -> pelaksana
         echo "<div id=success>Upload file berhasil</div>";
     } else {
         echo "<div id=error>Upload file berhasil</div>";
     }
     //        return true;
     //header('location:'.URL.'suratmasuk');
 }
开发者ID:ryderonil,项目名称:sisurip,代码行数:31,代码来源:suratmasuk_controller.php

示例10: Log

require_once '../lib/Log.php';
require_once 'arraysDominios.php';
$sqlInsert = 'INSERT INTO sgdoc.tb_pessoa_siorg_carga (co_orgao, co_orgao_pai, link_tipo_orgao, co_tipo_orgao, no_tipo_orgao, link_tipo_unidade, no_orgao, sg_orgao,
	link_endereco, link_contato, in_organizacao, tx_versao_consulta) 
VALUES (:co_orgao, :co_orgao_pai, :link_tipo_orgao, :co_tipo_orgao, :no_tipo_orgao, :link_tipo_unidade, :no_orgao, :sg_orgao,
	:link_endereco, :link_contato, :in_organizacao, :tx_versao_consulta);';
/*
 * Em virtude do tamanho do arquivo, ele será lido como um arquivo txt,
 * linha a linha, e cada linha será convertida, como um string xml, para um objeto
 */
$arqDadosXml = 'dados.txt';
$log = new Log('.', 'cargaSiorg');
$log->setPrintScreen(true);
$cnnBanco = ConfigWs::factory()->getConnection();
try {
    $log->addLog("Abrindo arquivo de dados [{$arqDadosXml}]");
    $hdlDados = fopen($arqDadosXml, 'r');
    libxml_use_internal_errors(true);
    if ($hdlDados) {
        $l = 0;
        $tmp = '';
        $strXml = '';
        $cnnBanco->beginTransaction();
        $log->addLog('Limpando tabela destino');
        $cnnBanco->prepare('truncate sgdoc.tb_pessoa_siorg_carga;')->execute();
        $stmt = $cnnBanco->prepare($sqlInsert);
        $log->addLog('Início da leitura dos dados');
        while (($linha = fgets($hdlDados)) !== false) {
            $l++;
            /*
            if ($l > 100) { break; }
开发者ID:roquebrasilia,项目名称:sgdoc-codigo,代码行数:31,代码来源:carga.php

示例11: delete

 function delete($id_node)
 {
     dibi::query("DELETE FROM user_form WHERE id_node=%i", $id_node);
     Log::addLog($this, "Vymazanie user_form", $id_node);
 }
开发者ID:oaki,项目名称:demoshop,代码行数:5,代码来源:Admin_UserForm.php

示例12: uploadrev


//.........这里部分代码省略.........
     $fln = array();
     if (file_exists('arsip/temp/' . $filename)) {
         //jika file telah ada di folder temp/
         $temp = explode('.', $filename);
         //            var_dump($temp);
         $sql = "SELECT file FROM revisisurat WHERE file LIKE '{$temp['0']}%'";
         $file = $this->model->select($sql);
         //            var_dump($file);
         if (count($file > 0)) {
             if (count($file) == 1) {
                 $pisah = explode('.', $filename);
                 $nama = $pisah[0];
                 $ext = $pisah[1];
                 var_dump($ext);
                 $filename = $nama . '_1.' . $ext;
                 //                    var_dump($filename);
                 //                    break;
             } else {
                 foreach ($file as $val) {
                     $temp = explode('.', $val['file']);
                     $pisah = explode('_', $temp[0]);
                     if (count($pisah) <= 3) {
                         $fln[] = 0;
                     } else {
                         $fln[] = $pisah[3];
                     }
                     //                        $fln[] = explode('_', $temp[0]);
                     //                        var_dump($fln);
                     //                        $len = count($temp);
                     //                        $fln[] = (int) ($len-1); //mengambil array terakhir
                     $num = max($fln);
                     //                        var_dump($num);
                     $filename = $pisah[0] . '_' . $pisah[1] . '_' . $pisah[2] . '_' . ($num + 1) . '.' . $temp[1];
                     //                        var_dump($filename);
                 }
             }
         }
     }
     //-----------------------------------
     $data = array('id_surat' => $id, 'catatan' => $catatan, 'user' => $user, 'file' => $filename, 'time' => $time);
     $ext = explode(".", $filename);
     if ($ext[count($ext) - 1] == 'pdf') {
         //jika telah diupload tipe file pdf
         if (file_exists('arsip/' . $filename)) {
             copy('arsip/' . $filename, 'arsip/temp/' . $filename);
         }
         //copykan ke folder temp/
     } else {
         $upload = new Upload('upload');
         //jika tidak, upload file tersebut
         $upload->setDirTo('arsip/temp/');
         $upload->setFileTo($filename);
         $upload->uploadFile();
     }
     //upload file revisi
     //        $upl = $upload->uploadFile(); //upload dengan nama beda jika sudah terdapat file di arsip
     //        if(!$upl){
     //            $return = "Gagal upload! cek file dan ekstensi, ekstensi harus pdf, doc atau docx";
     //        }
     $role = Session::get('role');
     /*
      * alurnya klo revisi kasi->pelaksana
      * revisi kk -> kasi dan pelaksana :siiip
      * otak atik dari awak lagi, ternyata butuh field user/creator surat keluar yg berisi pelaksananya siapa
      */
     //var_dump($id);
     $notif->set('id_surat', $id);
     //cek lagi
     $notif->set('jenis_surat', 'SK');
     $notif->set('stat_notif', 1);
     $user = $this->model->getUser($id);
     //var_dump($user);
     $notif->set('bagian', $user[2]);
     if ($role == 1) {
         $dataks = $this->model->select("SELECT id_user FROM user WHERE role=2 AND bagian =" . $user[2] . " AND active='Y'");
         foreach ($dataks as $val) {
             $notif->set('id_user', $val['id_user']);
         }
         $notif->set('role', 2);
         //tambah notifikasi untuk kasi
         $notif->addNotifikasi();
     }
     $notif->set('id_user', $user[0]);
     $notif->set('role', $user[1]);
     //tambah notifikasi untuk pelaksana
     $notif->addNotifikasi();
     //tambah revisi
     if ($this->model->addRevisi($data)) {
         //        $this->showAll();
         @Session::createSession();
         $user = Session::get('user');
         $log = new Log();
         $log->addLog($user, 'REKAM REVISI', 'user ' . $user . ' rekam revisi surat keluar id ' . $id . ' nama file ' . $filename);
         unset($log);
         echo "<div id=success>Rekam revisi berhasil</div>";
     } else {
         echo "<div id=error>Rekam revisi gagal</div>";
     }
     //        return $return;
 }
开发者ID:ryderonil,项目名称:sisurip,代码行数:101,代码来源:suratkeluar_controller.php

示例13: delete

 /**
  * @access public
  * @param $id_node
  * @ParamType $id_node 
  */
 public function delete($id_node)
 {
     parent::deleleFiles($id_node);
     dibi::query("DELETE FROM gallery WHERE id_node=%i", $id_node);
     Log::addLog($this, "Vymazanie galerie", $id_node);
 }
开发者ID:oaki,项目名称:demoshop,代码行数:11,代码来源:Admin_GalleryMultiuploadControl.php

示例14: deleteItemTree

 function deleteItemTree($parent, $objNode)
 {
     $list = dibi::fetchAll("SELECT id_menu_item FROM menu_item WHERE parent=%i", $parent);
     foreach ($list as $l) {
         $this->deleteItemTree($l['id_menu_item'], $objNode);
         $objNode->deleteNode($l['id_menu_item']);
         dibi::query("DELETE FROM menu_item WHERE id_menu_item=%i", $l['id_menu_item']);
         //vymazanie z access
         Log::addLog($this, "Vymazanie polozky z menu", $l['id_menu_item']);
     }
 }
开发者ID:oaki,项目名称:demoshop,代码行数:11,代码来源:menu_class.php


注:本文中的Log::addLog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。