本文整理汇总了PHP中xecho函数的典型用法代码示例。如果您正苦于以下问题:PHP xecho函数的具体用法?PHP xecho怎么用?PHP xecho使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xecho函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getMNVotes
function getMNVotes($testnet = false)
{
if ($testnet) {
$testnetval = "1";
$testnetstr = "testnet";
} else {
$testnetval = "0";
$testnetstr = "";
}
xecho("Retrieving masternodes votes (testnet={$testnetval}): ");
$result = dmn_api_get("/masternodes/votes?testnet={$testnetval}", array(), $response);
if ($response['http_code'] == 200) {
echo "Fetched...";
$votes = json_decode($result, true);
if ($votes === false) {
echo " Failed to JSON decode!\n";
die(200);
} elseif (!is_array($votes) || !array_key_exists('data', $votes) || !is_array($votes['data'])) {
echo " Incorrect data!\n";
die(202);
}
$votes = $votes['data'];
echo " OK (" . count($votes) . " entries)\n";
} else {
echo "Failed [" . $response['http_code'] . "]\n";
if ($response['http_code'] != 500) {
$result = json_decode($result, true);
if ($result !== false) {
foreach ($result['messages'] as $num => $msg) {
xecho("Error #{$num}: {$msg}\n");
}
}
}
die(201);
}
$votesyea = 0;
$votesnay = 0;
$votesabstain = 0;
$votestotal = 0;
foreach ($votes as $vote) {
if ($vote["Vote"] == "Yea") {
$votesyea += $vote["VoteCount"];
} elseif ($vote["Vote"] == "Nay") {
$votesnay += $vote["VoteCount"];
} else {
$votesabstain += $vote["VoteCount"];
}
}
$votestotal = $votesyea + $votesnay + $votesabstain;
xecho("Submitting to RRDtool DB (N:{$votesyea}:{$votesnay}:{$votesabstain}:{$votestotal}): ");
// rrdtool create mnvotes2.rrd --start 1431101864 DS:Yea:GAUGE:600:U:U DS:Nay:GAUGE:600:U:U DS:Abstain:GAUGE:600:U:U DS:Total:GAUGE:600:U:U RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797
if (rrd_update("mnvotes2{$testnetstr}.rrd", ["N:{$votesyea}:{$votesnay}:{$votesabstain}:{$votestotal}"])) {
echo "OK\n";
} else {
echo "Failed\n";
}
}
开发者ID:nightlydash,项目名称:dashninja-ctl,代码行数:57,代码来源:dmnvotesrrd.script.inc.php
示例2: do_xport
function do_xport($start, $end, $step, $filename, $testnet = false)
{
if ($testnet) {
$testnet = "testnet";
} else {
$testnet = '';
}
xecho("RRD DB xport ({$start} to {$end} step {$step} {$testnet}): ");
$xport = rrd_xport(array("-s", $start, "-e", $end, "--step", $step, "DEF:a=mnvotes2{$testnet}.rrd:Yea:MAX", "DEF:b=mnvotes2{$testnet}.rrd:Nay:MAX", "DEF:c=mnvotes2{$testnet}.rrd:Abstain:MAX", 'XPORT:a:Yea', 'XPORT:b:Nay', 'XPORT:c:Abstain'));
if ($xport === false) {
echo "Failed!\n";
return false;
} else {
echo "OK\n";
foreach ($xport["data"] as $key1 => $data1) {
foreach ($xport["data"][$key1]["data"] as $key2 => $data2) {
if (is_nan($data2)) {
$xport["data"][$key1]["data"][$key2] = false;
} else {
$xport["data"][$key1]["data"][$key2] = intval(round($data2));
}
}
}
}
xecho("JSON Encoding output: ");
$json = json_encode($xport);
if ($json !== false) {
echo "OK (" . strlen($json) . " bytes)\n";
xecho("Writing to file: ");
if (file_put_contents($filename, $json) !== false) {
echo "OK\n";
return true;
} else {
echo "Error\n";
return false;
}
} else {
echo "Error\n";
return false;
}
}
开发者ID:carriercomm,项目名称:dashninja-ctl,代码行数:41,代码来源:dmnvotesrrdxport.script.inc.php
示例3: xecho
<div class="rightPageContainer">
<h1 class="Success">Success</h1><br />
Service group <?php
xecho($params['serviceGroup']->getName());
?>
successfully edited. <br />
<a href="index.php?Page_Type=Service_Group&id=<?php
echo $params['serviceGroup']->getId();
?>
">
View <?php
xecho($params['serviceGroup']->getName());
?>
</a>
</div>
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:15,代码来源:submit_edited_service_group.php
示例4: xecho
<div class="rightPageContainer">
<h1 class="Success">Success</h1><br />
<?php
$Site = $params['NewSite'];
?>
The following services have been moved to
<a href="index.php?Page_Type=Site&id=<?php
echo $Site->getId();
?>
">
<?php
xecho($Site->getShortName());
?>
</a>:
<?php
foreach ($params['Services'] as $sep) {
echo "<br />" . "<a href=\"index.php?Page_Type=Service&id=" . $sep->getId() . "\">" . xssafe($sep->getHostName()) . "</a> ";
}
?>
</div>
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:20,代码来源:moved_service_end_point.php
示例5: xecho
<?php
$property = $params['prop'];
$service = $params['service'];
?>
<div class="rightPageContainer">
<h1 class="Success">Delete Endpoint Property</h1><br/>
<p>
Are you sure you want to delete:<br/><br/>
Property name: <b><?php
xecho($property->getKeyName());
?>
<br/></b>
Property value: <b><?php
xecho($property->getKeyValue());
?>
<br/></b>
</p>
<p>
Are you sure you wish to continue?
</p>
<!--<form class="inputForm" method="post" action="index.php?Page_Type=Delete_Endpoint_Property&propertyid=<?php
echo $property->getId();
?>
&serviceid=<?php
echo $service->getId();
?>
" name="RemoveEndpointProperty">-->
<form class="inputForm" method="post" action="index.php?Page_Type=Delete_Endpoint_Property&propertyid=<?php
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:31,代码来源:delete_endpoint_property.php
示例6: xecho
">
<?php
xecho($params['Name']);
?>
</a> has been successfully edited as follows:
</p>
<p>
Name: <?php
xecho($params['Name']);
?>
<br />
Description: <?php
xecho($params['Description']);
?>
</p>
<p>
<a href="index.php?Page_Type=Admin_Edit_Scope&id=<?php
echo $params['ID'];
?>
">
Click here</a> to edit the <?php
xecho($params['Name']);
?>
scope again.
</p>
</div>
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:28,代码来源:edited_scope.php
示例7: base_url
<base href="<?php
echo base_url();
?>
">
<title><?php
xecho($site_title);
?>
</title>
<meta name="description" content="<?php
xecho($meta_desc);
?>
">
<meta name="keywords" content="<?php
xecho($meta_keywords);
?>
">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
if (ENVIRONMENT != 'prouction') {
?>
<meta name="robots" content="noindex">
<?php
}
?>
<link rel="stylesheet" href="<?php
echo base_url();
?>
开发者ID:groucho75,项目名称:ci_html5_auth_crud,代码行数:30,代码来源:header.php
示例8: foreach
if (sizeof($numberOfScopes > 0)) {
foreach ($params['Scopes'] as $scope) {
?>
<tr class="site_table_row_<?php
echo $num;
?>
">
<td class="site_table" style="width: 90%">
<div style="background-color: inherit;">
<span style="vertical-align: middle;">
<a href="index.php?Page_Type=Admin_Scope&id=<?php
echo $scope->getId();
?>
">
<?php
xecho($scope->getName());
?>
</a>
</span>
</div>
</td>
<?php
if (!$params['portalIsReadOnly']) {
?>
<td class="site_table">
<script type="text/javascript" src="<?php
echo \GocContextPath::getPath();
?>
javascript/confirm.js"></script>
<a onclick="return confirmSubmit()" href="index.php?Page_Type=Admin_Remove_Scope&id=<?php
echo $scope->getId();
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:31,代码来源:scopes.php
示例9: _AT
$operations[AT_ADMIN_LOG_UPDATE] = _AT('update_to');
$operations[AT_ADMIN_LOG_DELETE] = _AT('delete_from');
$operations[AT_ADMIN_LOG_INSERT] = _AT('insert_into');
$operations[AT_ADMIN_LOG_REPLACE] = _AT('replace_into');
$operations[AT_ADMIN_LOG_OTHER] = _AT('other');
?>
<form method="post" action="<?php
echo $_SERVER['PHP_SELF'];
?>
">
<input type="hidden" name="p" value="<?php
xecho($_GET['p']);
?>
" />
<input type="hidden" name="login" value="<?php
xecho($_GET['login']);
?>
" />
<div class="input-form">
<div class="row">
<?php
echo _AT('date');
?>
<br />
<?php
echo $row['time'];
?>
</div>
<div class="row">
<?php
echo _AT('login_name');
开发者ID:zort77,项目名称:ATutor,代码行数:31,代码来源:detail_log.php
示例10: foreach
<?php
$num = 2;
foreach ($downtimes as $dt) {
?>
<tr class="site_table_row_<?php
echo $num;
?>
">
<td class="site_table">
<a style="padding-right: 1em;" href="index.php?Page_Type=Downtime&id=<?php
echo $dt->getId();
?>
">
<?php
xecho($dt->getDescription());
?>
</a>
</td>
<td class="site_table"><?php
echo $dt->getStartDate()->format($dt::DATE_FORMAT);
?>
</td>
<td class="site_table"><?php
echo $dt->getEndDate()->format($dt::DATE_FORMAT);
?>
</td>
</tr>
<?php
if ($num == 1) {
$num = 2;
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:31,代码来源:view_site.php
示例11: xecho
<div class="rightPageContainer">
<h1>Error</h1>
<br />
<?php
if (strpos($params, 'DOCSVN.SERV_KEYPAIRS') || strpos($params, 'DOCSVN.SITE_KEYPAIRS')) {
echo "A key value pair already exists with this keyname and keyvalue.";
} else {
xecho($params);
}
?>
</div>
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:11,代码来源:error.php
示例12: foreach
<form name="Move_Service" action="index.php?Page_Type=Admin_Move_SEP" method="post" class="inputForm">
<h1>Move Service</h1>
<br />
<span class="input_name">New site for selected services</span>
<select class="add_edit_form" name="NewSite">
<?php
foreach ($params['Sites'] as $Site) {
echo "<option value=\"" . $Site->getId() . "\">" . xssafe($Site->getShortName()) . "</option>";
}
?>
</select>
<span class="input_name">Please select the service(s) to be moved from
<?php
xecho($params['OldSite']);
?>
</span>
<select class="Downtime_Select" name="Services[]" size="20"
multiple id="Sites" style="margin-left: 0em; width: 38em;">
<?php
foreach ($params['Services'] as $sep) {
echo "<option value=\"" . $sep->getId() . "\">" . xssafe($sep->getHostName()) . "</option>";
}
?>
</select>
<br>
<input class="input_button" type="submit" value="Move Service" />
</form>
</div>
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:31,代码来源:move_service_end_point.php
示例13: foreach
<div style="margin-left: 2em">
<?php
foreach ($params['scopes'] as $scopeArray) {
?>
<br />
<input type="checkbox" name="SCOPE_IDS[]" value="<?php
echo $scopeArray['scope']->getId();
?>
"<?php
if ($scopeArray['applied']) {
echo ' checked="checked"';
}
?>
>
<?php
xecho($scopeArray['scope']->getName());
?>
<?php
}
?>
</div>
<input class="input_input_hidden" type="hidden" name="ID" value="<?php
echo $params['ngi']->getId();
?>
">
<br />
<input class="input_button" type="submit" value="Update NGI">
</form>
</div>
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:31,代码来源:edit_ngi.php
示例14: test_condition
function test_condition($p)
{
global $url;
global $topicname;
$bret = false;
$maxtry = 10;
$try = 1;
$pattern = 'app=core&module=search§ion=search&do=quick_search&search_app=core&fromsearch=1&search_filter_app%%5Ball%%5D=1&content_title_only=1&search_term=' . $topicname . '%%2527 IN BOOLEAN MODE) AND %s AND MATCH(t.title) AGAINST(%%2527' . $topicname;
$post = sprintf($pattern, $p);
while (1) {
$buff = trim(make_post($url, $post, '', $url));
if (strpos($buff, 'Your search for the term <em><strong>') > 0) {
$bret = true;
break;
} elseif (strpos($buff, 'No results found for') > 0) {
break;
} elseif (strpos($buff, 'Driver Error</title>') !== false) {
die("Sql error! Wrong prefix?\nExiting ... ");
} else {
xecho("test_condition() - try {$try} - invalid return value ...\n");
xecho("Will wait 30 seconds for flood control. Expect 2-3 tries.\n");
xecho("This is going to take years...\n");
sleep(10);
$try++;
if ($try > $maxtry) {
die("Too many tries - exiting ...\n");
} else {
xecho("Trying again - try {$try} ...\n");
}
}
}
return $bret;
}
开发者ID:sasukeuni,项目名称:Python-Exploit-Search-Tool,代码行数:33,代码来源:12586.php
示例15: dmn_blockparse
function dmn_blockparse($uname, $testnet, $mnpubkeys, $mndonations, $poolpubkeys, $mnsuperblocks, &$bhws, &$bws, &$btarchive, &$blockarchive, &$txarchive)
{
xecho("==> Processing {$uname}: ");
if (!is_dir("/dev/shm/{$uname}")) {
echo "Error 1\n";
return false;
}
$canparseblocks = is_dir("/dev/shm/{$uname}/tx");
$canparseblocktemplates = is_dir("/dev/shm/{$uname}/bt");
if (!$canparseblocks && !$canparseblocktemplates) {
echo "Error 2\n";
return false;
}
if (!is_dir(DMN_BLOCKPARSER_ARCHIVE . $uname . '/') || !is_dir(DMN_BLOCKPARSER_ARCHIVE . $uname . '/tx/')) {
mkdir(DMN_BLOCKPARSER_ARCHIVE . $uname . '/tx/', 0700, true);
}
if (!is_dir(DMN_BLOCKPARSER_ARCHIVE . $uname . '/bt/')) {
mkdir(DMN_BLOCKPARSER_ARCHIVE . $uname . '/bt/', 0700, true);
}
echo "OK\n";
xecho(" Retrieving available block template files: ");
$btfiles = array();
if ($canparseblocktemplates) {
if ($handle = opendir("/dev/shm/{$uname}/bt/")) {
while (false !== ($entry = readdir($handle))) {
if (is_file("/dev/shm/{$uname}/bt/{$entry}")) {
if (strlen($entry) > 19 && substr($entry, 0, 14) == 'blocktemplate.' && substr($entry, -5) == '.json') {
$btfiles[] = $entry;
}
}
}
closedir($handle);
}
if (count($btfiles) == 0) {
echo "None found\n";
} else {
echo "OK (" . count($btfiles) . " files)\n";
}
sort($btfiles);
} else {
echo "Folder not found\n";
}
xecho(" Retrieving available block files: ");
$txfiles = array();
$blockfiles = array();
if ($canparseblocks) {
if ($handle = opendir("/dev/shm/{$uname}/")) {
while (false !== ($entry = readdir($handle))) {
if (is_file("/dev/shm/{$uname}/{$entry}")) {
if (strlen($entry) > 11 && substr($entry, 0, 6) == 'block.' && substr($entry, -5) == '.json') {
$blockfiles[] = $entry;
}
}
}
closedir($handle);
}
if (count($blockfiles) == 0) {
echo "None found\n";
} else {
echo "OK (" . count($blockfiles) . " files)\n";
}
xecho(" Retrieving available transaction files: ");
if ($handle = opendir("/dev/shm/{$uname}/tx/")) {
while (false !== ($entry = readdir($handle))) {
if (is_file("/dev/shm/{$uname}/tx/{$entry}")) {
if (strlen($entry) > 17 && substr($entry, 0, 12) == 'transaction.' && substr($entry, -5) == '.json') {
$txfiles[] = $entry;
}
}
}
closedir($handle);
}
if (count($txfiles) == 0) {
echo "None found\n";
} else {
echo "OK (" . count($txfiles) . " files)\n";
}
sort($blockfiles);
sort($txfiles);
} else {
echo "Folder not found\n";
}
if (count($txfiles) == 0 && count($btfiles) == 0) {
return true;
}
if (count($btfiles) > 0) {
xecho(" Parsing block templates:\n");
$btprotocol = 0;
foreach ($btfiles as $btfile) {
$blockid = substr($btfile, 14, strlen($btfile) - 19);
if (substr_count($blockid, '_') == 2) {
$pos1 = strpos($blockid, '_');
$pos2 = strrpos($blockid, '_');
$btprotocol = substr($blockid, $pos1 + 1, $pos2 - $pos1 - 1);
$btversion = substr($blockid, $pos2 + 1);
$blockid = substr($blockid, 0, $pos1);
xecho(" Block template {$blockid} (pv={$btprotocol} v={$btversion}): ");
$bt = json_decode(file_get_contents("/dev/shm/{$uname}/bt/{$btfile}"), true);
if ($bt !== false && isset($bt) && array_key_exists('payee', $bt)) {
echo $bt['payee'] . "\n";
//.........这里部分代码省略.........
开发者ID:schinzelh,项目名称:dashninja-ctl,代码行数:101,代码来源:dmnblockparser.script.inc.php
示例16: xecho
<form class="inputForm" method="post" action="index.php?Page_Type=Admin_Change_User_Admin_Status" name="editisAdmin">
<input class="input_input_hidden" type="hidden" name="IsAdmin" value="false" />
<input class="input_input_hidden" type="hidden" name="ID" value="<?php
echo $params['ID'];
?>
" />
<input type="submit" value="Remove <?php
xecho($name);
?>
's GOCDB administrator status" class="input_button" onclick="return confirmSubmit()">
</form>
<?php
} elseif (!$params['IsAdmin']) {
?>
<form class="inputForm" method="post" action="index.php?Page_Type=Admin_Change_User_Admin_Status" name="editisAdmin">
<input class="input_input_hidden" type="hidden" name="IsAdmin" value="true" />
<input class="input_input_hidden" type="hidden" name="ID" value="<?php
echo $params['ID'];
?>
" />
<input type="submit" value="Make <?php
xecho($name);
?>
a GOCDB administrator" class="input_button" onclick="return confirmSubmit()">
</form>
<?php
}
?>
</div>
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:30,代码来源:edit_user_isadmin.php
示例17: xecho
</td>
<td class="site_table">
<a href="index.php?Page_Type=NGI&id=<?php
echo $site->getNGI()->getId();
?>
">
<?php
xecho($site->getNGI()->getName());
?>
</a>
</td>
<td class="site_table">
<?php
xecho($site->getInfrastructure()->getName());
?>
</td>
</tr>
<?php
if ($num == 1) {
$num = 2;
} else {
$num = 1;
}
}
?>
</table>
<?php
}
// End of the foreach loop iterating over sites
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:31,代码来源:view_project.php
示例18: elseif
} elseif ($command == 'stop') {
xecho("Stopping {$uname}: ");
if (dmn_stop($uname, $conf)) {
echo "\n";
die(0);
} else {
echo "\n";
die(6);
}
} elseif ($command == 'restart') {
if (!is_executable($dashd)) {
xecho("Error ({$dashd} is not an executable file)\n");
die(8);
}
xecho("Restarting {$uname}: ");
if (dmn_stop($uname, $conf)) {
if (dmn_start($uname, $conf, $dashd, $extra)) {
echo "\n";
die(0);
} else {
echo "\n";
die(5);
}
} else {
echo " Could not stop daemon. Giving up.\n";
die(4);
}
} else {
xecho('Unknown command: ' . $command . "\n");
die(3);
}
开发者ID:elbereth,项目名称:dashninja-ctl,代码行数:31,代码来源:dmnctlstartstopdaemon.script.inc.php
示例19: xecho
<div style="overflow: hidden">
<div style="float: left;">
<h1 style="float: left; margin-left: 0em; padding-bottom: 0.3em;">
Downtimes for Service:
<br/>
<a style="font-family: inherit; font-size: inherit; font-weight: inherit; text-decoration: underline; padding-bottom: inherit; "
href="index.php?Page_Type=Service&id=<?php
echo $params['se']->getId();
?>
">
<?php
xecho($params['se']->getServiceType()->getName());
?>
-
<?php
xecho($params['se']->getHostName());
?>
</a>
</h1>
</div>
<!-- Downtimes -->
<div class="listContainer">
<span class="header" style="vertical-align:middle; float: left; padding-top: 0.9em; padding-left: 1em;">All Downtimes</span>
<img src="<?php
echo \GocContextPath::getPath();
?>
img/down_arrow.png" height="25px" style="float: right; padding-right: 1em; padding-top: 0.5em; padding-bottom: 0.5em;" />
<table style="clear: both; width: 100%;">
<tr class="site_table_row_1">
<th class="site_table">Description</th>
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:31,代码来源:se_downtimes.php
示例20: xecho
<?php
$this->load->view('header');
?>
</head> <!-- Close HEAD -->
<body> <!-- Open Body -->
<?php
$this->load->view('top_navbar');
?>
<div class="container" id="main-container">
<div class="page-header">
<h1><span class="glyphicon glyphicon-asterisk"></span> <?php
xecho($page_title);
?>
</h1>
</div>
<p class="lead"><?php
xecho($message);
?>
</p>
</div>
<?php
$this->load->view('footer');
开发者ID:groucho75,项目名称:ci_html5_auth_crud,代码行数:30,代码来源:message.php
注:本文中的xecho函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论