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

PHP kill函数代码示例

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

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



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

示例1: search

function search($ds, $filter, $attributes)
{
    // Nous allons commencer par afficher des informations de bases concernant le domaine auquel on est connecté et son administrateur
    $dn = "dc=rBOX,dc=lan";
    //Domaine
    $filtre = "({$filter})";
    //Filtre de recherche
    $sr = ldap_search($ds, $dn, '(' . $filter . ')', $attributes);
    //On effectue la recherche
    if (!$sr) {
        echo '<p class="center red">Le serveur LDAP n\'a pas pu effectuer la recherche . Nous vous prions de nous excuser pour le désagrément.</p>';
        kill($ds);
        exit;
    }
    $info = ldap_get_entries($ds, $sr);
    //On récupère les résultats
    if (!$info) {
        echo '<p class="center red">Le serveur LDAP n\'a pas pu récupérer les résultats de la recherche . Nous vous prions de nous excuser pour le désagrément.</p>';
        kill($ds);
        exit;
    }
    return $info;
}
开发者ID:hillfias,项目名称:LDAPWebApp,代码行数:23,代码来源:index.php


示例2: Memuse

function Memuse($limit = 65, $sup = '')
{
    if (e(',dead1', 1)) {
        return;
    }
    static $i;
    if (!$sup) {
        $i++;
    }
    $sup = $i;
    #if(j9){echo"+";return;}#dev
    #Timelong();no recursion#if(j9)kill("+$mem>$limit $_ENV[args]");#dev
    $mem = Round(Memory_get_usage(1) / 1000000, 2);
    if ($mem == $_ENV['lastmemusage']) {
        return;
    }
    $_ENV['lastmemusage'] = $mem;
    $db = "Erreur : usage mémoire : {$mem} mo cause {$sup}";
    if ($sup) {
        $_ENV['Mem'][$sup] = $mem;
    }
    if ($mem > $limit) {
        e(',dead1');
        dbm("MemLeak:{$mem}@{$sup}@" . SU . pre($_ENV));
        $x = dbkt();
        $line = p3(print_r(end($x), 1));
        db($line);
        return $mem;
        kill($line);
    }
    return $mem;
}
开发者ID:Ben749,项目名称:racetrack,代码行数:32,代码来源:kernel.php


示例3: implode

<html><head><title>racetrack editor - <?php 
echo $title;
?>
</title>
<link rel="shortcut icon" type="image/png" href="/favicon.ico">
<link href="/style.css" rel="stylesheet"><link href="/?css" rel="stylesheet">
<script src="//cdn.ckeditor.com/4.5.7/standard<?php 
#basic|full
?>
/ckeditor.js"></script>
<title>Racetrack :: editor</title></head><body>
<div class=w50><div class=w50>
<?php 
echo implode(' - ', $f->dc());
if ($choices) {
    kill('' . $choices . '</div></div>');
}
?>


<form method=post action='?fi=<?php 
echo $fi;
?>
'>
<input name=id type=hidden value='<?php 
echo $id;
?>
'>
Title : <input name=title value='<?php 
echo $title;
?>
开发者ID:Ben749,项目名称:racetrack,代码行数:31,代码来源:editor.php


示例4: session_start

<?php

session_start();
$skip_login = true;
require_once 'functions.php';
$expiration = (int) $_GET['expiration'];
$get_hash = $_GET['hash'];
$hash = encrypt($expiration);
if ($hash != $get_hash && !$_GET['state']) {
    kill();
}
$expiration_date = date("Y-m-d", $expiration);
$yesterday = date("Y-m-d", strtotime(date("Y-m-d" . " -1day")));
if ($expiration_date < date("Y-m-d") && !$_GET['state']) {
    kill("Expiration date can not be before yesterday or after tomorrow");
}
if (LOCAL) {
    $redirect = 'http://ib.is/openstreets/register.php';
} else {
    $redirect = 'http://friends.openstreets.co.za/register.php';
}
if ($_GET['state']) {
    if ($_GET['state'] != $_SESSION['state']) {
        $error = "Invalid session";
    }
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://www.googleapis.com/oauth2/v3/token");
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "code={$_GET['code']}&client_id={$client_id}&client_secret={$client_secret}&redirect_uri={$redirect}&grant_type=authorization_code");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $output = curl_exec($ch);
开发者ID:OpenStreetsCapeTown,项目名称:backoffice,代码行数:31,代码来源:register.php


示例5: header

<?php

header("Content-Type: text/plain");
/**
 * delete a group
 * @param : group name [required]
 * @return : success/fail message (txt)
 * */
if (!empty($_POST['group'])) {
    // LDAP ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    // On a besoin de récupérer les infos sur les groupes pour le formulaire/ pour ajouter un nouvel utilisateur
    include '../ldap/index.php';
    $ds = connectionLDAP();
    // LDAP ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    $name = $_POST['group'];
    $dn = "cn={$name},ou=groups,dc=rBOX,dc=lan";
    // Supression de l'entrée de l'annuaire
    $r = ldap_delete($ds, $dn);
    if ($r) {
        echo 'Le groupe a été correctement supprimé.';
    } else {
        echo 'Données non conformes.';
    }
    kill($ds);
}
开发者ID:hillfias,项目名称:LDAPWebApp,代码行数:25,代码来源:deleteGroup.php


示例6: array

     }
 }
 // Step 2 - Execute the program, only if there is no compile error
 $descriptorspec = array(0 => array("file", "{$cwd}input.txt", "r"), 1 => array("file", "{$cwd}output.txt", "w"), 2 => array("file", "{$cwd}error-output.txt", "a"));
 chmod($cwd . 'myfile.out', 0777);
 // Start the Counter
 $start_time = time();
 // Start the program execution
 $process = proc_open("ulimit -Sv {$memory_limit};\nLD_PRELOAD={$path}/sandbox/EasySandbox.so {$cwd}/myfile.out", $descriptorspec, $pipes, $cwd, $env);
 // Time to sleep, for the program to complete
 usleep($time_limit * 1000);
 // Now awake up to see if the execution is complete
 $status = proc_get_status($process);
 if ($status['running']) {
     // If the process is still running, terminate it
     kill($status['pid']);
     proc_terminate($process);
     echo json_encode(array('type' => 'ERROR', 'content' => 'Time limit exceeded'));
     removeFiles();
     exit;
 }
 if (is_resource($process)) {
     // It is important that you close any pipes before calling
     // proc_close in order to avoid a deadlock
     $return_value = proc_close($process);
     $end_time = time();
     // echo "Total Time taken - " . date('H:m:s', $end_time - $start_time);
     //		echo $return_value;
     $command_output = str_replace("\r\n", "\n", rtrim(trim(file_get_contents($cwd . 'output.txt'))));
     if (substr($command_output, 0, 26) == "<<entering SECCOMP mode>>\n") {
         $command_output = substr($command_output, 26);
开发者ID:ATofighi,项目名称:PHP-CPP-Compile,代码行数:31,代码来源:compile.php


示例7: deathnote

function deathnote($itmd = 0, $dnname = '', $dndeath = '', $dngender = 'm', $dnicon = 1, $sfn)
{
    global $db, $tablepre, $log, $killnum, $mode, $achievement;
    global ${'itm' . $itmd}, ${'itms' . $itmd}, ${'itmk' . $itmd}, ${'itme' . $itmd}, ${'itmsk' . $itmd};
    $dn =& ${'itm' . $itmd};
    $dnk =& ${'itmk' . $itmd};
    $dne =& ${'itme' . $itmd};
    $dns =& ${'itms' . $itmd};
    $dnsk =& ${'itmsk' . $itmd};
    $mode = 'command';
    if ($dn != '■DeathNote■' && $dn != '四面亲手制作的■DeathNote■') {
        $log .= '道具使用错误!<br>';
        return;
    } elseif ($dns <= 0) {
        $dn = $dnk = $dnsk = '';
        $dne = $dns = 0;
        $log .= '道具不存在!<br>';
        return;
    }
    if (!$dnname) {
        return;
    }
    if ($dnname == $sfn && $dn != '四面亲手制作的■DeathNote■') {
        $log .= "你不能自杀。<br>";
        return;
    }
    if (!$dndeath) {
        $dndeath = '心脏麻痹';
    }
    if ($dn == '四面亲手制作的■DeathNote■') {
        $dndeath = "使用了天然呆四面的假冒伪劣■DeathNote■";
    }
    //echo "name=$dnname,gender = $dngender,icon=$dnicon,";
    if ($dn != '四面亲手制作的■DeathNote■') {
        $result = $db->query("SELECT * FROM {$tablepre}players WHERE name='{$dnname}' AND type = 0");
    } else {
        $result = $db->query("SELECT * FROM {$tablepre}players WHERE name='{$sfn}' AND type = 0");
    }
    if (!$db->num_rows($result)) {
        $log .= "你使用了■DeathNote■,但是什么都没有发生。<br>哪里出错了?<br>";
    } else {
        $edata = $db->fetch_array($result);
        if (($dngender != $edata['gd'] || $dnicon != $edata['icon']) && $dn != '四面亲手制作的■DeathNote■') {
            $log .= "你使用了■DeathNote■,但是什么都没有发生。<br>哪里出错了?<br>";
        } else {
            if ($dn != '四面亲手制作的■DeathNote■') {
                $log .= "你将<span class=\"yellow b\">{$dnname}</span>的名字写在了■DeathNote■上。<br>";
                $log .= "<span class=\"yellow b\">{$dnname}</span>被你杀死了。";
                include_once GAME_ROOT . './include/state.func.php';
                kill('dn', $dnname, 0, $edata['pid'], $dndeath);
                $killnum++;
            } else {
                $log .= "你将<span class=\"yellow b\">{$dnname}</span>的名字写在了■DeathNote■上。<br>";
                $log .= "但就在这时,你突然感觉一阵晕眩。<br>你失去了意识。<br>";
                $log .= "<span class='lime'>“这张■DeathNote■似乎制作不合格呢,还真是对不起呢……”<br></span>";
                include_once GAME_ROOT . './include/state.func.php';
                death('fake_dn', '', 0, $dndeath);
                $killnum++;
            }
        }
    }
    $dns--;
    if ($dns <= 0) {
        $log .= '■DeathNote■突然燃烧起来,转瞬间化成了灰烬。<br>';
        $dn = $dnk = $dnsk = '';
        $dne = $dns = 0;
    }
    return;
}
开发者ID:jiangtiandao,项目名称:phpdts,代码行数:69,代码来源:item2.func.php


示例8: handle_data

function handle_data($data, $is_sock = False, $auth = False, $exec = False)
{
    global $buckets;
    global $alias_locks;
    global $dest_overrides;
    global $admin_accounts;
    global $admin_data;
    global $admin_is_sock;
    global $admin_aliases;
    global $exec_errors;
    global $exec_list;
    global $throttle_time;
    global $ignore_list;
    if ($auth == False) {
        echo "[33m" . date("Y-m-d H:i:s", microtime(True)) . " > [0m{$data}";
        handle_errors($data);
    } else {
        term_echo("*** auth = true");
    }
    $items = parse_data($data);
    if ($items !== False) {
        write_out_buffer_data($items);
        if ($items["destination"] == DEBUG_CHAN) {
            return;
        }
        if ($auth == False and $is_sock == True) {
            log_items($items);
        }
        if (in_array($items["nick"], $ignore_list) == True) {
            return;
        }
        if (isset($buckets[BUCKET_IGNORE_NEXT]) == True and $items["nick"] == get_bot_nick()) {
            unset($buckets[BUCKET_IGNORE_NEXT]);
            return;
        }
        if ($items["prefix"] == IRC_HOST and strpos(strtolower($items["trailing"]), "throttled") !== False) {
            term_echo("*** THROTTLED BY SERVER - REFUSING ALL OUTGOING MESSAGES TO SERVER FOR " . THROTTLE_LOCKOUT_TIME . " SECONDS ***");
            $throttle_time = microtime(True);
            return;
        }
        if ($items["cmd"] == 330) {
            authenticate($items);
        }
        if ($items["cmd"] == 376) {
            dojoin(INIT_CHAN_LIST);
        }
        if ($items["cmd"] == "NOTICE" and $items["nick"] == "NickServ" and $items["trailing"] == NICKSERV_IDENTIFY_PROMPT) {
            if (file_exists(PASSWORD_FILE) == True and NICKSERV_IDENTIFY === "1") {
                rawmsg("NickServ IDENTIFY " . trim(file_get_contents(PASSWORD_FILE)), True);
            }
            startup();
        }
        $args = explode(" ", $items["trailing"]);
        if (in_array($args[0], $admin_aliases) == True or has_account_list($args[0]) == True) {
            if ($auth == False and $is_sock == True) {
                term_echo("authenticating \"" . $args[0] . "\"...");
                $admin_data = $items["data"];
                $admin_is_sock = $is_sock;
                rawmsg("WHOIS " . $items["nick"]);
                return;
            }
        }
        $alias = $args[0];
        handle_events($items);
        switch ($alias) {
            case ALIAS_ADMIN_NICK:
                if (count($args) == 2) {
                    rawmsg(":" . get_bot_nick() . " NICK :" . trim($args[1]));
                    set_bot_nick(trim($args[1]));
                }
                break;
            case ALIAS_ADMIN_QUIT:
                if (count($args) == 1) {
                    write_out_buffer_command($items, "quit");
                    process_scripts($items, ALIAS_QUIT);
                }
                break;
            case ALIAS_ADMIN_PS:
                if (count($args) == 1) {
                    write_out_buffer_command($items, "ps");
                    ps($items);
                }
                break;
            case ALIAS_ADMIN_KILL:
                if (count($args) == 2) {
                    write_out_buffer_command($items, "kill");
                    kill($items, $args[1]);
                }
                break;
            case ALIAS_ADMIN_KILLALL:
                if (count($args) == 1) {
                    write_out_buffer_command($items, "killall");
                    killall($items);
                }
                break;
            case ALIAS_LIST:
                if (check_nick($items, $alias) == True) {
                    if (count($args) == 1) {
                        write_out_buffer_command($items, "list");
                        get_list($items);
//.........这里部分代码省略.........
开发者ID:cmn32480,项目名称:exec-irc-bot,代码行数:101,代码来源:irc_lib.php


示例9: get_row_info

function get_row_info($tab_name, $col, $row_id, &$row, $show_err = 1)
{
    global $conni;
    $SQL = "SELECT * FROM {$tab_name} where {$col}='{$row_id}'";
    #    print $SQL."<br>";
    $rs = mysqli_query($SQL) or die($SQL);
    if (mysqli_error($conni) != '') {
        error_page(mysqli_error($conni), "Database Error");
        die;
    }
    if (mysqli_num_rows($rs) == 0 and $show_err == 1) {
        kill("Invalid Row id Id#{$row_id} for table {$tab_name}");
    }
    $row = mysqli_fetch_assoc($rs);
    return mysqli_num_rows($rs);
}
开发者ID:baltincsoft,项目名称:VarnerCC,代码行数:16,代码来源:functions.php


示例10: kill

<?php

$skip_login = true;
require_once 'functions.php';
$id = (int) $_GET['id'];
if (!$id) {
    kill("Invalid link opened");
}
$hash = $_GET['hash'];
$gethash = $_GET['hash'];
$info = $db->query("SELECT * FROM people WHERE id = {$id}");
$hash = encrypt($id . $info->email);
if ($hash != $gethash) {
    die("Sorry, this link is invalid. Please click the link in your e-mail. If this does not work, contact us at [email protected].");
} else {
    logThis(12, $id);
    $db->query("UPDATE people SET active = 1 WHERE id = {$id} LIMIT 1");
    $date = date("r");
    $message = "A new user signed up for the mailing list and was registered in the database.\n\nName: {$info->firstname} {$info->lastname}\nE-mail: {$info->email}\nDate: {$date}\n\nMore details:\n" . URL . "people/{$id}";
    $headers = 'From: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
    mail("[email protected]", "Open Streets Subscription", $message, $headers);
}
?>
<!doctype html>
<html>
<head>
<title>Newsletter subscription | Friends of Open Streets</title>
<?php 
echo $head;
?>
<style type="text/css">
开发者ID:OpenStreetsCapeTown,项目名称:backoffice,代码行数:31,代码来源:newsletter.confirm.php


示例11: send

                        $names .= $chars . $user['nick'] . ' ';
                    }
                }
                send($me, ':' . $config['name'] . ' 353 ' . $me['nick'] . ' = ' . $target . ' :' . $names);
                send($me, ':' . $config['name'] . ' 366 ' . $me['nick'] . ' ' . $target . ' :End of /NAMES list.');
                break;
            case 'ping':
                // PONG DAMNIT!
                if (strpos($args[1], ':') === false) {
                    $args[1] = ':' . $args[1];
                }
                send($me, ':' . $config['name'] . ' PONG ' . $config['name'] . ' ' . $args[1]);
                break;
                // tabbing jumps
        }
        // select
    }
    // while
    // closed?
    $error = socket_last_error($me['sock']);
    //echo $error;
    if ($error == 10053 || $error == 10054 || $error === false) {
        // he failed.
        echo $me['nick'] . " has died.\r\n";
        kill($me, 'Something failed...');
        array_removal($me, $conn);
    }
}
// foreach
sleep(1);
// 100% CPU ftl
开发者ID:laiello,项目名称:zircd,代码行数:31,代码来源:connection_handler.php


示例12: fun

<?php

#consumes 2 list files and tries downloading missing files over http, could also be some scp command injected via shell_exec or directly bash script
$basepath = '/home/devsite/';
#base local path
#find $basepath/media > media.prod.list;#1
$prodlist = $basepath . 'media.prod.list';
#find $basepath/media -type f > medias.list;#2
$devlist = $basepath . 'medias.list';
$distantDomain = 'http://productionwebsite.com/';
/**********************************************/
new fun();
pretitle(1);
#assumes : +ob_start();
if (!is_file($prodlist) or !is_file($devlist)) {
    kill("missing parameters");
}
$copied = [];
$lf = __FILE__ . '.log';
$a = explode("\n", fgc($prodlist));
$b = explode("\n", fgc($devlist));
$missing = array_diff($a, $b);
$c = ['a' => count($a), 'b' => count($b), 'missing' => count($missing)];
out($c, $lf);
foreach ($missing as $url) {
    if (strpos($url, '.') === FALSE) {
        continue;
    }
    $targetFile = $basepath . $url;
    #str_replace(' ','%20',$url);
    if (is_file($targetFile)) {
开发者ID:Ben749,项目名称:racetrack,代码行数:31,代码来源:prod.dev.import.nonversionned.files.simple.php


示例13: lockfile

function lockfile($f)
{
    global $unlinks;
    if (substr($f, 0, 1) != '/') {
        $cwd = getcwd();
        $f = $cwd . '/' . $f;
    }
    #from the script for reference
    if (is_file($f)) {
        kill("locked {$f}");
    }
    touch($f);
    $unlinks[] = $f;
}
开发者ID:Ben749,项目名称:racetrack,代码行数:14,代码来源:fun.php


示例14: kill

<?php

include 'php/autoload.php';
function kill()
{
    $GLOBALS['db']->close();
    die;
}
if (!$isLoggedIn) {
    kill(';failed-not-logged-in');
}
if (is_null($me->getAdmin()) || !$me->getAdmin()->canMakeAdmin()) {
    kill(';failed-insufficient-permissions');
}
$action = $_GET['action'];
if ($action == 'delete') {
    $id = $_GET['id'];
    kill($db->query('DELETE FROM Admins WHERE userId = ?', array($id), array(SQLITE3_TEXT)));
} elseif ($action == 'recruit') {
    $username = $_GET['username'];
    $id = $db->scalar('SELECT userId FROM Users WHERE username = ?', array($username), array(SQLITE3_TEXT));
    if ($id === false) {
        kill(';failed-user-doesnt-exist');
    } else {
        $canReview = $_GET['canReview'] == 'y';
        $canMakeAdmin = $_GET['canMakeAdmin'] == 'y';
        kill($db->addAdmin($id, $canReview, $canMakeAdmin));
    }
}
开发者ID:kezadias,项目名称:ShitpostBotWeb,代码行数:29,代码来源:manage-admin.php


示例15: StdClass

<?php

require 'vendor/autoload.php';
$sSql = "SELECT * FROM testes.teste inner join  coisa.neh on teste.codigo = neh.codigo where teste.xoxo = 1 and teste.xoxb is true;";
$oObjeto = new StdClass();
$oObjeto->aArray = array(1, 2, 3, 4, 5, "6", array(7));
$oObjeto->backtrace = debug_backtrace();
\PHP\Utils::dump_sql($sSql);
\PHP\Utils::dump($sSql, $oObjeto);
dump_sql($sSql);
dump($sSql, $oObjeto);
kill($sSql, $oObjeto);
\PHP\Utils::kill($sSql, $oObjeto);
echo "Não deve aparecer";
开发者ID:hmschreiner,项目名称:PHPUtils,代码行数:14,代码来源:testes.php


示例16: kill

<?
	return kill($argv, $argc);

	function kill($argv, $argc) {
		$cloud_id = $argv[1];
		if (isset($argv['i'])) {
			$cloud_id = $argv['i'];
		}
		if (isset($argv['id'])) {
			$cloud_id = $argv['id'];
		}

		if (empty($cloud_id)) {
			throw new Exception("Укажите ID процесса, который вы хотите остановить", 3495);
		}

		echo '<div class="last-answer"></div><script>cloude_close(' . $cloud_id . '); $(".last-answer").last().text("Остановлен процесс #" + ' . $cloud_id . ');</script>';
	}
开发者ID:Adeptx,项目名称:adeptx_core,代码行数:18,代码来源:kill.php


示例17: onPost

 function onPost($postData, FormSubmit $sender)
 {
     kill($this->testBox);
 }
开发者ID:ArkayCZ,项目名称:NexusFramework,代码行数:4,代码来源:TestFormController.php


示例18: combat

function combat($active = 1, $wep_kind = '')
{
    global $log, $mode, $main, $cmd, $battle_title, $db, $tablepre, $pls, $message, $now, $w_log, $nosta, $hdamage, $hplayer;
    global $pid, $name, $club, $inf, $lvl, $exp, $killnum, $bid, $tactic, $pose, $hp, $mhp;
    global $wep, $wepk, $wepe, $weps, $wepsk;
    global $edata, $w_pid, $w_name, $w_pass, $w_type, $w_endtime, $w_deathtime, $w_gd, $w_sNo, $w_icon, $w_club, $w_hp, $w_mhp, $w_sp, $w_msp, $w_att, $w_def, $w_pls, $w_lvl, $w_exp, $w_money, $w_bid, $w_inf, $w_rage, $w_pose, $w_tactic, $w_killnum, $w_state, $w_wp, $w_wk, $w_wg, $w_wc, $w_wd, $w_wf, $w_teamID, $w_teamPass;
    global $w_wep, $w_wepk, $w_wepe, $w_weps, $w_arb, $w_arbk, $w_arbe, $w_arbs, $w_arh, $w_arhk, $w_arhe, $w_arhs, $w_ara, $w_arak, $w_arae, $w_aras, $w_arf, $w_arfk, $w_arfe, $w_arfs, $w_art, $w_artk, $w_arte, $w_arts, $w_itm0, $w_itmk0, $w_itme0, $w_itms0, $w_itm1, $w_itmk1, $w_itme1, $w_itms1, $w_itm2, $w_itmk2, $w_itme2, $w_itms2, $w_itm3, $w_itmk3, $w_itme3, $w_itms3, $w_itm4, $w_itmk4, $w_itme4, $w_itms4, $w_itm5, $w_itmk5, $w_itme5, $w_itms5, $w_itm6, $w_itmk6, $w_itme6, $w_itms6, $w_wepsk, $w_arbsk, $w_arhsk, $w_arask, $w_arfsk, $w_artsk, $w_itmsk0, $w_itmsk1, $w_itmsk2, $w_itmsk3, $w_itmsk4, $w_itmsk5, $w_itmsk6;
    global $infinfo, $w_combat_inf;
    global $rp, $w_rp, $action, $w_action, $achievement, $w_achievement, $skills, $w_skills, $skillpoint, $w_skillpoint;
    $battle_title = '战斗发生';
    if (!$wep_kind) {
        $w1 = substr($wepk, 1, 1);
        $w2 = substr($wepk, 2, 1);
        if (($w1 == 'G' || $w1 == 'J') && $weps == $nosta) {
            $wep_kind = $w2 ? $w2 : 'P';
        } else {
            $wep_kind = $w1;
        }
    } elseif (strpos($wepk, $wep_kind) === false && $wep_kind != 'back') {
        $wep_kind = substr($wepk, 1, 1);
    }
    $wep_temp = $wep;
    include_once GAME_ROOT . './include/game/clubskills.func.php';
    if ($active) {
        if ($wep_kind == 'back') {
            $log .= "你逃跑了。";
            $action = '';
            $mode = 'command';
            return;
        }
        $enemyid = $active ? str_replace('enemy', '', $action) : $bid;
        if (!$enemyid || strpos($action, 'enemy') === false) {
            $log .= "<span class=\"yellow\">你没有遇到敌人,或已经离开战场!</span><br>";
            $action = '';
            $mode = 'command';
            return;
        }
        $result = $db->query("SELECT * FROM {$tablepre}players WHERE pid='{$enemyid}'");
        if (!$db->num_rows($result)) {
            $log .= "对方不存在!<br>";
            $action = '';
            $mode = 'command';
            return;
        }
        $edata = $db->fetch_array($result);
        if ($edata['pls'] != $pls) {
            $log .= "<span class=\"yellow\">" . $edata['name'] . "</span>已经离开了<span class=\"yellow\">{$plsinfo[$pls]}</span>。<br>";
            $action = '';
            $mode = 'command';
            return;
        } elseif ($edata['hp'] <= 0) {
            global $corpseprotect, $gamestate;
            $log .= "<span class=\"red\">" . $edata['name'] . "</span>已经死亡,不能被攻击。<br>";
            if ($edata['endtime'] < $now - $corpseprotect && $gamestate < 40) {
                $action = 'corpse' . $edata['pid'];
                include_once GAME_ROOT . './include/game/battle.func.php';
                findcorpse($edata);
            }
            //$action = '';
            return;
        }
        if ($message) {
            //			foreach ( Array('<','>',';',',') as $value ) {
            //				if(strpos($message,$value)!==false){
            //					$message = str_replace ( $value, '', $message );
            //				}
            //			}
            $log .= "<span class=\"lime\">你对{$edata['name']}大喊:{$message}</span><br>";
            if (!$edata['type']) {
                $w_log = "<span class=\"lime\">{$name}对你大喊:{$message}</span><br>";
                logsave($edata['pid'], $now, $w_log, 'c');
            }
        }
        extract($edata, EXTR_PREFIX_ALL, 'w');
        init_battle(1);
        include_once GAME_ROOT . './include/game/attr.func.php';
        $log .= "你向<span class=\"red\">{$w_name}</span>发起了攻击!<br>";
        $att_dmg = attack($wep_kind, 1);
        global $ggflag;
        if ($ggflag) {
            return;
        }
        $w_hp -= $att_dmg;
        if ($w_hp > 0 && $w_tactic != 4 && $w_pose != 5) {
            global $rangeinfo;
            $w_w1 = substr($w_wepk, 1, 1);
            $w_w2 = substr($w_wepk, 2, 1);
            if (($w_w1 == 'G' || $w_w1 == 'J') && $w_weps == $nosta) {
                $w_wep_kind = $w_w2 ? $w_w2 : 'P';
            } else {
                $w_wep_kind = $w_w1;
            }
            //if (($rangeinfo [$wep_kind] == $rangeinfo [$w_wep_kind]) || ($rangeinfo [$w_wep_kind] == 'M')) {
            if ($rangeinfo[$wep_kind] <= $rangeinfo[$w_wep_kind] && $rangeinfo[$wep_kind] !== 0) {
                $counter = get_counter($w_wep_kind, $w_tactic, $w_club, $w_inf);
                $counter *= get_clubskill_bonus_counter($w_club, $w_skills, 'w_', $club, $skills, '');
                $counter_dice = rand(0, 99);
                if ($counter_dice < $counter) {
                    $log .= "<span class=\"red\">{$w_name}的反击!</span><br>";
                    $log .= npc_chat($w_type, $w_name, 'defend');
//.........这里部分代码省略.........
开发者ID:jiangtiandao,项目名称:phpdts,代码行数:101,代码来源:combat.func.php


示例19: kill

            }
        }
    }
    echo "false";
    kill();
}
//otherwise check for user map ownership with mapid given
/*$table = "maps_bought";
$q=sprintf("SELECT * FROM %s WHERE ign='%s'",
            mysql_real_escape_string($table),
            mysql_real_escape_string($username));
$results = mysql_query($q, $link);*/
$q = sprintf("SELECT * FROM %s WHERE ign='%s'", mysql_real_escape_string($table), mysql_real_escape_string($username));
$results = mysql_query($q, $link);
while ($row = mysql_fetch_array($results)) {
    $ids = split(",", $row[2]);
    //print_r($ids);
    for ($i = 0; $i < count($ids); $i++) {
        if ($ids[$i] == $mapid || $ids[$i] == -1) {
            echo "true";
            kill();
        }
    }
}
echo "false";
function kill()
{
    global $link;
    mysql_close($link);
    die;
}
开发者ID:BGCX261,项目名称:zombie-craft-svn-to-git,代码行数:31,代码来源:haspaid.php


示例20: dirname

<?php

/**
 *
 *  ____            _        _   __  __ _                  __  __ ____  
 * |  _ \ ___   ___| | _____| |_|  \/  (_)_ __   ___      |  \/  |  _ \ 
 * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
 * |  __/ (_) | (__|   <  __/ |_| |  | | | | | |  __/_____| |  | |  __/ 
 * |_|   \___/ \___|_|\_\___|\__|_|  |_|_|_| |_|\___|     |_|  |_|_| 
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * @author PocketMine Team
 * @link http://www.pocketmine.net/
 * 
 *
*/
/***REM_START***/
require_once dirname(__FILE__) . "/src/config.php";
require_once FILE_PATH . "/src/functions.php";
require_once FILE_PATH . "/src/dependencies.php";
/***REM_END***/
$server = new ServerAPI();
$server->start();
kill(getmypid());
//Fix for ConsoleAPI being blocked
exit(0);
开发者ID:ungarscool1,项目名称:Multicraft,代码行数:30,代码来源:PocketMine-MP.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP killSurveySession函数代码示例发布时间:2022-05-15
下一篇:
PHP kick函数代码示例发布时间: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