• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP events函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中events函数的典型用法代码示例。如果您正苦于以下问题:PHP events函数的具体用法?PHP events怎么用?PHP events使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: review

function review()
{
    $id = (int) $_GET['user'];
    $q = mysql_query("select * from users where id='{$id}' ");
    $w = mysql_fetch_array($q);
    echo '<h2 class="ui header">
			<i class="user icon"></i>
			<div class="content">';
    echo $w['name'] . " " . $w['surname'];
    echo '</div></h2>';
    echo '<h5 class="ui top attached header">
			  Etkinlikler
			</h5>';
    $eventQuery = mysql_query("select * from events where uid='{$id}'");
    while ($w = mysql_fetch_array($eventQuery)) {
        if ($w['event'] == 4 || $w['event'] == 6) {
            $icon = events($w['event'])[$w['state']]['icon'];
            $desc = events($w['event'])[$w['state']]['desc'];
        } else {
            $icon = events($w['event'])['icon'];
            $desc = events($w['event'])['desc'];
        }
        $pos = $w['videoPosition'];
        echo "<div class='ui attached segment'>\n\t\t\t<i class=' {$icon} icon'></i>\n\t\t\t{$desc}   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <b>[ {$pos} ]</b>\n\t\t\t<span style='float:right'>" . $w['clock'] . "</span>\n\t\t</div>";
        echo "<div class='aciklama'>\n\t\t\t\n\t\t\t<table class='ui definition table'>\n\t\t\t    <tbody>\n\t\t\t      <tr>\n\t\t\t        <td class='two wide column'>Size</td>\n\t\t\t        <td>1 x 2</td>\n\t\t\t      </tr>\n\t\t\t      <tr>\n\t\t\t        <td>Weight</td>\n\t\t\t        <td>6 ounces</td>\n\t\t\t      </tr>\n\t\t\t      <tr>\n\t\t\t        <td>Color</td>\n\t\t\t        <td>Yellowish</td>\n\t\t\t      </tr>\n\t\t\t      <tr>\n\t\t\t        <td>Odor</td>\n\t\t\t        <td>Not Much Usually</td>\n\t\t\t      </tr>\n\t\t\t    </tbody>\n\t\t\t  </table>\n\n\t\t</div>";
    }
    echo '<div class="ui bottom attached warning message">
		<i class="warning icon"></i>
		Başka bir işlem görünmüyor..
	</div>';
}
开发者ID:saujquery,项目名称:sauplayer,代码行数:31,代码来源:func.php


示例2: DirListsql

function DirListsql($path)
{
    $dir_handle = @opendir($path);
    if (!$dir_handle) {
        events("Unable to open \"{$path}\"");
        return array();
    }
    $count = 0;
    while ($file = readdir($dir_handle)) {
        if ($file == '.') {
            continue;
        }
        if ($file == '..') {
            continue;
        }
        if (!is_file("{$path}/{$file}")) {
            continue;
        }
        if (!preg_match("#\\.sql\$#", $file)) {
            continue;
        }
        $array[$file] = $file;
    }
    if (!is_array($array)) {
        return array();
    }
    @closedir($dir_handle);
    return $array;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:29,代码来源:exec.fetchmail.sql.php


示例3: start

function start()
{
    $events = events(1);
    $html = "\n\t<H1>{APP_PUREFTPD} {events}</H1>\n\t<div id='showevents' style='width:100%;height:250px;overflow:auto'>\n\t\t{$events}\n\t</div>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:7,代码来源:pureftp.events.php


示例4: popup

function popup()
{
    $tpl = new templates();
    $logs = events();
    $html = "\n\t<H1>{APP_DHCP_EVENTS}</H1>\n\t" . RoundedLightWhite("\n\t<div style='width:100%;height:350px;overflow:auto' id='DHCPDL'>{$logs}</div>");
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:7,代码来源:dhcpd.events.php


示例5: afficherPageAdminGE

function afficherPageAdminGE()
{
    require './Modele/admins.php';
    verifAdmin($db);
    require './Modele/evenements.php';
    require_once './Modele/utilisateurs.php';
    $events = events($db);
    include "./Vue/Admin/gestionEvent.php";
}
开发者ID:Zawartek,项目名称:4event,代码行数:9,代码来源:admin.php


示例6: reservation

 function reservation()
 {
     checkPerm('view');
     require_once _base_ . '/lib/lib.tab.php';
     require_once _base_ . '/lib/lib.urlmanager.php';
     require_once _base_ . '/lib/lib.form.php';
     require_once $GLOBALS['where_lms'] . '/lib/lib.course.php';
     $mod_perm = checkPerm('mod', true);
     $lang =& DoceboLanguage::createInstance('reservation');
     $um =& UrlManager::getInstance("reservation");
     $out = $GLOBALS['page'];
     $out->setWorkingZone('content');
     $man_res = new Man_Reservation();
     $tab_man = new TabView('reservation', '');
     $tab_events = new TabElemDefault('events', $lang->def('_RESERVATION_EVENTS'));
     $tab_my_events = new TabElemDefault('my_events', $lang->def('_RESERVATION_MY_EVENTS'));
     $tab_past_event = new TabElemDefault('past_events', $lang->def('_RESERVATION_PAST_EVENTS'));
     if ($mod_perm) {
         $tab_subscribed_user = new TabElemDefault('subscribed_user', $lang->def('_RESERVATION_SUBSCRIBED_USER'));
     }
     $tab_man->addTab($tab_events);
     $tab_man->addTab($tab_my_events);
     $tab_man->addTab($tab_past_event);
     if ($mod_perm) {
         $tab_man->addTab($tab_subscribed_user);
     }
     $tab_man->parseInput($_POST, $_SESSION);
     $active_tab = $tab_man->getActiveTab();
     if ($active_tab != 'events' && $active_tab != 'my_events' && $active_tab != 'past_events' && $active_tab != 'subscribed_user') {
         $active_tab = importVar('active_tab', false, 'events');
         $tab_man->setActiveTab($active_tab);
     }
     $out->add(getTitleArea(Lang::t('_RESERVATION', 'reservation')) . '<div class="std_block">', 'content');
     $out->add(Form::openForm('tab_reservation', 'index.php?modname=reservation&amp;op=reservation&amp;confirm=1&amp;ap=mod_profile&amp;from=2') . $tab_man->printTabView_Begin('', false), 'content');
     switch ($active_tab) {
         case 'events':
             events();
             break;
         case 'my_events':
             myEvents();
             break;
         case 'past_events':
             pastEvents();
             break;
         case 'subscribed_user':
             subscribedUser();
             break;
     }
     $out->add($tab_man->printTabView_End() . Form::closeForm(), 'content');
     $out->add('</div>', 'content');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:51,代码来源:reservation.php


示例7: ParseLogsDir

function ParseLogsDir()
{
    $d = 0;
    $h = 0;
    $sock = new sockets();
    $workingDir = $sock->GET_INFO("SquidOldLogsDefaultDir");
    if (!($handle = opendir($workingDir))) {
        @mkdir($workingDir, 0755, true);
        return;
    }
    $squidtail = new squid_tail();
    while (false !== ($filename = readdir($handle))) {
        if ($filename == ".") {
            continue;
        }
        if ($filename == "..") {
            continue;
        }
        $targetFile = "{$workingDir}/{$filename}";
        if (!is_file($targetFile)) {
            continue;
        }
        $d++;
        $h++;
        $c = 0;
        if ($d > 300) {
            if (systemMaxOverloaded()) {
                $array_load = sys_getloadavg();
                $internal_load = $array_load[0];
                events("ParseSquidLogBrutProcess()::{$workingDir}:: Overloaded: {$internal_load} system, break loop...", __LINE__);
                break;
            }
            $d = 0;
        }
        $handle = @fopen($targetFile, "r");
        if (!$handle) {
            events("Failed to open file", __LINE__);
            continue;
        }
        while (!feof($handle)) {
            $c++;
            $buffer = trim(fgets($handle, 4096));
            if (!$squidtail->parse_tail($buffer, null)) {
                continue;
            }
        }
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:48,代码来源:exec.old.access.logs.php


示例8: Builsql

function Builsql($uri, $ip, $virus)
{
    $virus = str_replace("+", " ", $virus);
    $virus = trim($virus);
    $md5 = md5(time() . "{$uri},{$ip},{$virus}");
    $ip = GetComputerName($ip);
    $sql = "INSERT INTO `antivirus_events` (`zDate`, `TaskName`, `email`, `VirusName`, `InfectedPath`, `ComputerName`, `zmd5`) \n\tVALUES (NOW(), 'HTTP Scan', 0, '{$virus}', '{$uri}', '{$ip}', '{$md5}')";
    $q = new mysql();
    $q->QUERY_SQL($sql, "artica_events");
    if (!$q->ok) {
        events($q->mysql_error);
        events($sql);
        return;
    }
    events("Virus {$virus} found from {$uri} to {$ip}");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:16,代码来源:exec.squid-clamav-tail.php


示例9: off

/**
 * Remove one or all listeners from event.
 *
 * @param $event
 * @param callable $listener
 * @return bool
 */
function off($event, callable $listener = null)
{
    if (!isset(events()->{$event})) {
        return;
    }
    if ($listener === null) {
        unset(events()->{$event});
    } else {
        foreach (events()->{$event} as $priority => $listeners) {
            if (false !== ($index = array_search($listener, $listeners, true))) {
                unset(events()->{$event}[$priority][$index]);
            }
        }
    }
    return true;
}
开发者ID:sphido,项目名称:events,代码行数:23,代码来源:events.php


示例10: checkdates

function checkdates($workfile)
{
    $handle = @fopen($workfile, "r");
    if (!$handle) {
        events("Fopen failed on {$workfile}");
        return false;
    }
    while (!feof($handle)) {
        $buffer = trim(fgets($handle));
        $t = explode(",", $buffer);
        if (intval($t[1]) < 100) {
            continue;
        }
        $IPAddr = $t[0];
        $date = date("Y-m-d H:i:s", $t[1]);
        echo "{$IPAddr} : {$date}\n";
    }
}
开发者ID:articatech,项目名称:artica,代码行数:18,代码来源:exec.bandwidthd.scan.php


示例11: xstart

function xstart()
{
    $Directory = "/home/artica-postfix/squid/StatsApplicance/BEREKLEY";
    if (!is_dir($Directory)) {
        return;
    }
    if (!($handle = opendir($Directory))) {
        return;
    }
    while (false !== ($fileZ = readdir($handle))) {
        if ($fileZ == ".") {
            continue;
        }
        if ($fileZ == "..") {
            continue;
        }
        $path = "{$Directory}/{$fileZ}";
        $lockfile = "{$Directory}/{$fileZ}.LCK";
        events("parse_stats(): Scanning {$path}");
        $t1 = microtime_float();
        if (preg_match("#^(.+?)-UserAuthDB\\.db#", $fileZ, $re)) {
            if (is_file($lockfile)) {
                continue;
            }
            @file_put_contents($lockfile, time());
            parse_userauthdb($path, $re[1], true);
            events("{$fileZ} " . microtime_ms($t1));
            @unlink($path);
            @unlink($lockfile);
            continue;
        }
        if (preg_match("#^(.+?)-[0-9]+_QUOTASIZE\\.db#", $fileZ, $re)) {
            if (is_file($lockfile)) {
                continue;
            }
            @file_put_contents($lockfile, time());
            ParseDB_FILE($path, $re[1], true);
            events("{$fileZ} " . microtime_ms($t1));
            @unlink($lockfile);
            @unlink($path);
            continue;
        }
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:44,代码来源:exec.squid.stats-appliance-parse-dbs.php


示例12: Parseline

function Parseline($buffer)
{
    $buffer = trim($buffer);
    if ($buffer == null) {
        return null;
    }
    if (!preg_match("#^[0-9]+,\\s+\\[(.+?)]#", $buffer, $re)) {
        events("Not filtered: {$buffer}");
        return;
    }
    $date = date("Y-m-d H:i:00");
    $category = trim(strtolower($re[1]));
    if (!isset($GLOBALS["MAIN"][$date][$category])) {
        $GLOBALS["MAIN"][$date][$category] = 1;
    } else {
        $GLOBALS["MAIN"][$date][$category] = $GLOBALS["MAIN"][$date][$category] + 1;
    }
    if (count($GLOBALS["MAIN"]) > 2) {
        dump_main();
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:21,代码来源:exec.nginx-tail.php


示例13: test01_Conveniences

 /**
  * The only tests done here are for existence and validation.
  */
 public function test01_Conveniences()
 {
     /*
      * Test each function twice - first for value then after caching 
      */
     $this->assertTrue(forge() instanceof Forge);
     $this->assertTrue(forge('ioc') instanceof IlluminateContainer);
     $this->assertTrue(config() instanceof Config);
     $this->assertTrue(config() instanceof Config);
     $this->assertTrue(path() instanceof Paths);
     $this->assertTrue(path() instanceof Paths);
     $this->assertTrue(events() instanceof Events);
     $this->assertTrue(events() instanceof Events);
     //$this->assertTrue(router() instanceof Router);
     //$this->assertTrue(router() instanceof Router);
     //$this->assertTrue(routing() instanceof Routing);
     //$this->assertTrue(routing() instanceof Routing);
     $test = function () {
         return "test";
     };
     $this->assertEquals("test", value($test));
 }
开发者ID:anctemarry27,项目名称:cogs,代码行数:25,代码来源:ConvenienceHelpersTest.php


示例14: Parseline

function Parseline($buffer){
$buffer=trim($buffer);
if($buffer==null){return null;}

if(strpos($buffer,"init urllist")>0){return ;}
if(strpos($buffer,"init expressionlist")>0){return ;}
if(strpos($buffer,"init domainlist")>0){return ;}


	if(preg_match('#INFO: loading dbfile (.+)#',$buffer,$re)){
		events("LOADING $re[1]");
	  	$GLOBALS[__FILE__]["DBFILE"]=trim($re[1]);
		return null;
		}	
		
		
		
	if(preg_match("#FATAL: Error db_open: Unknown error#",$buffer,$re)){
	  	events("ERROR ON {$GLOBALS[__FILE__]["DBFILE"]}");
	  	$file="/etc/artica-postfix/croned.1/squidguard.". md5($GLOBALS[__FILE__]["DBFILE"]).".error";
		if(IfFileTime($file)){
	  		shell_exec(LOCATE_PHP5_BIN2()." /usr/share/artica-postfix/exec.squidguard.php --compile-single \"{$GLOBALS[__FILE__]["DBFILE"]}\" &");
	  		WriteFileCache($file);
		}
		return null;
		}

	if(strpos($buffer,"ERROR: Going into emergency mode")>0){
		events("ERROR: Going into emergency mode");
		send_email_events("squidguard: squidguard turn to emergency mode","SquidGuard claim\n$buffer\nPlease contact your support to fix this problem\ncurrently, no filtering urls will be enabled","proxy");
		return ;
	}
		
		

	events("Not filtered: $buffer");

}
开发者ID:rsd,项目名称:artica-1.5,代码行数:38,代码来源:exec.squidguard-tail.php


示例15: restore

function restore($id, $target_resource, $db)
{
    $sql = "SELECT * FROM dar_index where filekey='{$id}'";
    $q = new mysql();
    $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup'));
    $ressource = $ligne["mount_md5"];
    $sourcefile = $ligne["filepath"];
    if ($_GET["RESTORE_DIR"]) {
        $sourcefile = dirname($sourcefile);
    }
    $ini = new Bs_IniHandler("/tmp/restore.{$id}.ini");
    $ini->set('INFO', "backup_resource", $ressource);
    $ini->set('INFO', "target_resource", $target_resource);
    $ini->set('INFO', "database", $db);
    $ini->set('INFO', "source_path", $sourcefile);
    $ini->saveFile("/tmp/restore.{$id}.ini");
    $ini = new Bs_IniHandler(dirname(__FILE__) . "/ressources/logs/exec.dar.find.restore.ini");
    $ini->set("STATUS", "progress", 15);
    $ini->set("STATUS", "text", "{Executing}...");
    $ini->saveFile(dirname(__FILE__) . "/ressources/logs/exec.dar.find.restore.ini");
    $cmd = "/usr/share/artica-postfix/bin/artica-backup --dar-restore-path /tmp/restore.{$id}.ini";
    events($cmd);
    system($cmd);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:24,代码来源:exec.dar.find.php


示例16: scanarp

function scanarp()
{
    $GLOBALS["CLASS_USERS"] = new usersMenus();
    $GLOBALS["CLASS_SOCKETS"] = new sockets();
    if (!$GLOBALS["CLASS_USERS"]->ARPD_INSTALLED) {
        if ($GLOBALS["VERBOSE"]) {
            echo __FUNCTION__ . " ARPD_INSTALLED = FALSE\n";
        }
        return;
    }
    $EnableArpDaemon = $GLOBALS["CLASS_SOCKETS"]->GET_INFO("EnableArpDaemon");
    if (!is_numeric($EnableArpDaemon)) {
        $EnableArpDaemon = 1;
    }
    if ($EnableArpDaemon == 0) {
        if ($GLOBALS["VERBOSE"]) {
            echo __FUNCTION__ . " EnableArpDaemon = {$EnableArpDaemon}\n";
        }
        return;
    }
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . ".pid";
    $unix = new unix();
    $me = basename(__FILE__);
    $pid = $unix->get_pid_from_file($pidfile);
    if ($unix->process_exists($pid, $me)) {
        if ($GLOBALS["VERBOSE"]) {
            echo " {$pid} --> Already executed.. aborting the process\n";
        }
        $time = $unix->PROCCESS_TIME_MIN($pid);
        system_admin_events("Already executed pid {$pid} since {$time}Mn.. aborting the process", __FUNCTION__, __FILE__, __LINE__, "system");
        die;
    }
    @file_put_contents($pidfile, getmypid());
    if (!is_file("/var/lib/arpd/arpd.db")) {
        die;
    }
    $GLOBALS["CLASS_UNIX"] = $unix;
    $GLOBALS["nmblookup"] = $unix->find_program("nmblookup");
    $GLOBALS["arpd"] = $unix->find_program("arpd");
    $GLOBALS["arp"] = $unix->find_program("arp");
    $GLOBALS["ARP_DB"] = "/var/lib/arpd/arpd.db";
    $GLOBALS["CACHE_DB"] = "/etc/artica-postfix/arpd.cache";
    $GLOBALS["EnableMacAddressFilter"] = trim(@file_get_contents("/etc/artica-postfix/settings/Daemons/EnableMacAddressFilter"));
    if (!is_numeric($GLOBALS["EnableMacAddressFilter"])) {
        $GLOBALS["EnableMacAddressFilter"] = 1;
    }
    $squidbin = $unix->LOCATE_SQUID_BIN();
    if (is_file($squidbin)) {
        if ($GLOBALS["EnableMacAddressFilter"] == 0) {
            return;
        }
    }
    $ArpdArray = unserialize(base64_decode(@file_get_contents($GLOBALS["CACHE_DB"])));
    if ($GLOBALS["FLUSH"]) {
        $ArpdArray = array();
    }
    if (!is_array($ArpdArray)) {
        $ArpdArray = array();
    }
    if (!isset($ArpdArray["LAST"])) {
        $ArpdArray["LAST"] = 0;
    }
    $last_modified = filemtime($GLOBALS["ARP_DB"]);
    $TimeArpd = $ArpdArray["LAST"];
    if ($TimeArpd == $last_modified) {
        events("{$TimeArpd} -> {$last_modified} No modification time", __FUNCTION__, __LINE__);
        return;
    }
    events("Scanning ARP table....", __FUNCTION__, __LINE__);
    $ArpdArray["LAST"] = $last_modified;
    exec("{$GLOBALS["arpd"]} -l 2>&1", $results);
    events("{$GLOBALS["arpd"]} -l return " . count($results) . " element(s)", __FUNCTION__, __LINE__);
    while (list($num, $ligne) = each($results)) {
        if (preg_match("#unexpected file type or format#", $ligne)) {
            @unlink($GLOBALS["ARP_DB"]);
            @unlink($GLOBALS["CACHE_DB"]);
            shell_exec("/etc/init.d/arpd restart");
            die;
        }
        if (!preg_match("#^[0-9]+\\s+\\s+(.+?)\\s+(.+)#", $ligne, $re)) {
            if ($GLOBALS["VERBOSE"]) {
                echo "line: {$num}, unexpected line..\n";
            }
            continue;
        }
        if (preg_match("#FAILED:#", $re[2])) {
            continue;
        }
        $mac = $re[2];
        $ipaddr = $re[1];
        if ($GLOBALS["VERBOSE"]) {
            echo "line: {$num}, MAC:{$mac} -> {$ipaddr}\n";
        }
        if (isset($ArpdArray["MACS"][$mac])) {
            if ($GLOBALS["VERBOSE"]) {
                echo "MAC:{$mac} Already cached, aborting....\n";
            }
            continue;
        }
        $ArpdArray["MACS"][$mac] = true;
//.........这里部分代码省略.........
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:exec.arpscan.php


示例17:

if(isset($_GET["DelDarPersoFolder"])){user_defined_del();exit;}

if(isset($_GET["external-storage"])){external_storage();exit;}
if(isset($_GET["net_storage_server"])){external_storage_net_save();exit;}

if(isset($_GET["external-storage-usb"])){external_storage_usb();exit;}
if(isset($_GET["external-storage-usb-list"])){echo external_storage_usb_list();exit;}
if(isset($_GET["ExternalUsbSelect"])){external_storage_usb_save();exit;}
if(isset($_GET["external-storage-list"])){external_storage_list();exit;}
if(isset($_GET["ExternalStorageDelete"])){external_storage_delete();exit;}

if(isset($_GET["external-storage-network"])){external_storage_net();exit;}
if(isset($_GET["refresh-dar-status"])){echo dar_status();exit;}
if(isset($_GET["RebuildCollection"])){dar_rebuild();exit;}

if(isset($_GET["events"])){events();exit;}


if(isset($_GET["dar-view"])){dar_view_index();exit;}
if(isset($_GET["mount-dar"])){js_dar_mount();exit;}
if(isset($_GET["mount-dar-list"])){dar_mount_select();exit;}
if(isset($_GET["mount-dar-2"])){dar_mount_2();exit;}
if(isset($_GET["mount-dar-collection"])){dar_mount_collection();exit;}

if(isset($_GET["dar-query"])){dar_query();exit;}
if(isset($_GET["DarQuery"])){dar_query_results();exit;}

if(isset($_GET["dar-list"])){dar_list();exit;}
if(isset($_GET["dar-list-index"])){dar_list_type();exit;}
if(isset($_GET["dar-list-query"])){dar_list_query();exit;}
开发者ID:rsd,项目名称:artica-1.5,代码行数:30,代码来源:dar.index.php


示例18: CheckAmavisLocalInterface

function CheckAmavisLocalInterface()
{
    $sock = new sockets();
    $a = $sock->GET_INFO("EnableAmavisInMasterCF");
    $EnableAmavisInMasterCF = intval(trim($a));
    if ($EnableAmavisInMasterCF == 0) {
        events("CheckAmavisLocalInterface():: EnableAmavisInMasterCF not enabled = \"{$a}\"");
        return;
    }
    $datas = @file_get_contents("/usr/local/etc/amavisd.conf");
    $tbl = explode("\n", $datas);
    events("CheckAmavisLocalInterface():: " . count($tbl) . " lines");
    while (list($num, $ligne) = each($tbl)) {
        if (trim($ligne) == null) {
            continue;
        }
        if (preg_match("#inet_acl.+?qw#", $ligne)) {
            events("CheckAmavisLocalInterface():: inet_acl parameters ok");
            return true;
        }
    }
    events("rebuild amavis");
    $amavis = new amavis();
    $amavis->Save();
    $amavis->SaveToServer();
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:26,代码来源:exec.policyd-weight.php


示例19: stop

function stop($aspid = false)
{
    $unix = new unix();
    $kill = $unix->find_program("kill");
    if (!$aspid) {
        $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
        $pid = $unix->get_pid_from_file($pidfile);
        if ($unix->process_exists($pid, basename(__FILE__))) {
            $time = $unix->PROCCESS_TIME_MIN($pid);
            if ($GLOBALS["OUTPUT"]) {
                echo "Stopping......: " . date("H:i:s") . " [INIT]: nginx-tail, Already task running PID {$pid} since {$time}mn\n";
            }
            return;
        }
        @file_put_contents($pidfile, getmypid());
    }
    $pid = GETPID();
    if (!$unix->process_exists($pid)) {
        if ($GLOBALS["OUTPUT"]) {
            echo "Stopping......: " . date("H:i:s") . " [INIT]: nginx-tail, already stopped\n";
        }
        return;
    }
    if ($GLOBALS["OUTPUT"]) {
        echo "Stopping......: " . date("H:i:s") . " [INIT]: nginx-tail, stopping pid: {$pid}\n";
    }
    unix_system_kill_force($pid);
    for ($i = 0; $i < 6; $i++) {
        $pid = GETPID();
        if (!$unix->process_exists($pid)) {
            break;
        }
        if ($GLOBALS["OUTPUT"]) {
            echo "Stopping......: " . date("H:i:s") . " [INIT]: nginx-tail, waiting pid: {$pid} {$i}/5\n";
        }
        unix_system_kill_force($pid);
        sleep(1);
    }
    $tail = $unix->find_program("tail");
    $pid = $unix->PIDOF("/bin/nginx-tail");
    if ($unix->process_exists($pid)) {
        for ($i = 0; $i < 20; $i++) {
            if ($GLOBALS["OUTPUT"]) {
                echo "Stopping......: " . date("H:i:s") . " [INIT]: killing old process pid {$pid}\n";
            }
            unix_system_kill_force($pid);
            usleep(800);
            $pid = $unix->PIDOF("/bin/access-tail");
            if (!$unix->process_exists($pid)) {
                break;
            }
            unix_system_kill_force($pid);
        }
    }
    $pid = GETPID();
    if (!$unix->process_exists($pid)) {
        events("exec.init-tail-nginx.phpp success to stop daemon...");
        if ($GLOBALS["OUTPUT"]) {
            echo "Stopping......: " . date("H:i:s") . " [INIT]: nginx-tail, success\n";
        }
    } else {
        events("exec.init-tail-nginx.php failed to stop daemon...");
        if ($GLOBALS["OUTPUT"]) {
            echo "Stopping......: " . date("H:i:s") . " [INIT]: nginx-tail, failed\n";
        }
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:67,代码来源:exec.init-tail-nginx.php


示例20: generate_pagination

		<td colspan="4" class="hidden" align="right" width="25%">';
    // multi page links
    $output .= generate_pagination('events.php?order_by=' . $order_by . '&amp;dir=' . ($dir ? 0 : 1), $all_record, $itemperpage, $start);
    unset($start);
    $output .= '
		</td>
	</tr>
	<tr>
		<td colspan="4" class="hidden" align="right">' . $lang_events['total'] . ' : ' . $all_record . '</td>
	</tr>
</table>
</center>';
}
//#############################################################################
// MAIN
//#############################################################################
// error variable reserved for future use
//$err = (isset($_GET['error'])) ? $_GET['error'] : NULL;
//unset($err);
$lang_events = lang_events();
$output .= '
<div class="top">
	<h1>' . $lang_events['events'] . '</h1>
</div>';
// action variable reserved for future use
//$action = (isset($_GET['action'])) ? $_GET['action'] : NULL;
events();
//unset($action);
unset($action_permission);
unset($lang_events);
require_once 'footer.php';
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:31,代码来源:events.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP events_cron函数代码示例发布时间:2022-05-15
下一篇:
PHP eventosInputText函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap