本文整理汇总了PHP中show_help函数的典型用法代码示例。如果您正苦于以下问题:PHP show_help函数的具体用法?PHP show_help怎么用?PHP show_help使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了show_help函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_parameter
function check_parameter($argv_param)
{
global $clear, $is_forced;
switch ($argv_param) {
case '-c':
case '--clear':
$clear = true;
break;
case '-f':
case '--force':
$is_forced = true;
break;
case '-cf':
case '-fc':
$is_forced = true;
$clear = true;
break;
case '-h':
case '--help':
show_help();
exit;
default:
echo 'Incorrect parameter name';
exit;
}
}
示例2: getBookmarksFile
/**
* Get the bookmarks file as a string
*
* Uses the -f or --file parameter to open and read a
* a bookmarks file
*
* @return string Contents of the file
*/
function getBookmarksFile()
{
$filename = get_option_value('f', 'file');
if (empty($filename)) {
show_help();
exit(1);
}
if (!file_exists($filename)) {
// TRANS: Exception thrown when a file upload cannot be found.
// TRANS: %s is the file that could not be found.
throw new Exception(sprintf(_m('No such file "%s".'), $filename));
}
if (!is_file($filename)) {
// TRANS: Exception thrown when a file upload is incorrect.
// TRANS: %s is the irregular file.
throw new Exception(sprintf(_m('Not a regular file: "%s".'), $filename));
}
if (!is_readable($filename)) {
// TRANS: Exception thrown when a file upload is not readable.
// TRANS: %s is the file that could not be read.
throw new Exception(sprintf(_m('File "%s" not readable.'), $filename));
}
// TRANS: %s is the filename that contains a backup for a user.
printfv(_m('Getting backup from file "%s".') . "\n", $filename);
$html = file_get_contents($filename);
return $html;
}
示例3: show_options
function show_options(array $commands = array())
{
drush_print(t('Please type one of the following options to continue:'));
show_help($commands);
$handle = fopen("php://stdin", "r");
$line = fgets($handle);
run(trim($line), $commands);
}
示例4: perform
function perform($callback)
{
global $list, $argv;
$args = $argv;
array_shift($args);
$list = parse_list('images.lst');
if (!$list) {
die("Hubo un error\n");
}
function show_help()
{
global $list;
echo "Ficheros:\n";
echo implode(', ', array_keys($list));
echo "\n";
exit;
}
if (!sizeof($args)) {
show_help();
}
$total = 0;
$error = 0;
foreach ($args as $ac) {
if ($ac == '*') {
$ac = array_keys($list);
} else {
$ac = array($ac);
}
foreach ($ac as $c) {
$cc =& $list[$c];
if (!isset($cc)) {
echo "No existe '{$c}'\n";
continue;
}
try {
if (!$callback($c, $cc)) {
$error++;
}
} catch (Exception $e) {
echo $e;
$error++;
}
$total++;
}
}
printf("----------------------\n");
printf("Total procesados: %d\n", $total);
printf("Total errores : %d\n", $error);
}
示例5: show_byday2
function show_byday2($tmin, $tmax, $link)
{
$result = mysql_query("select distinct u.login as uname, d.id as id, count(d.size) as _count, sum(d.size) as _ssize from detail d, users u where d.u_id=u.id and utime<{$tmax} and utime>{$tmin} group by u_id order by _ssize desc;", $link);
$mod_name = "day stat, daily leve2";
show_head();
show_help();
// echo "select distinct u.login as uname, sum(d.size) as _ssize from detail d, users u where d.u_id=u.id and utime<$tmax and utime>$tmin group by u_id;";
echo "<br>" . strftime("%d %B, %T", (int) $tmin) . "-" . strftime("%d, %B %T", (int) $tmax) . " ";
echo "<HR NOSHADE COLOR=#000000 SIZE=1>\n<BR>\n";
echo "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n <TR><TD BGCOLOR=#93BEE2>\n <TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1>\n <TR VALIGN=TOP ALIGN=CENTER>\n <TD HEIGHT=15>login</TD>\n <TD><B>count</B></TD>\n <TD><B>bytes</B></TD>\n </TR>";
$max = mysql_num_rows($result);
for ($i = 0; $i < $max; $i++) {
$login = @mysql_result($result, $i, "uname");
$uid = @mysql_result($result, $i, "id");
$size = @mysql_result($result, $i, "_ssize");
$count = @mysql_result($result, $i, "_count");
echo "<TR BGCOLOR=#FFF7E5 ALIGN=RIGHT>\n\t<td>{$login}</td>\n\t<td>" . dotize($count) . "</a></td>\n\t<td>" . dotize($size) . "</a></td>\n\t</tr>";
}
}
示例6: getBookmarksFile
/**
* Get the bookmarks file as a string
*
* Uses the -f or --file parameter to open and read a
* a bookmarks file
*
* @return string Contents of the file
*/
function getBookmarksFile()
{
$filename = get_option_value('f', 'file');
if (empty($filename)) {
show_help();
exit(1);
}
if (!file_exists($filename)) {
throw new Exception("No such file '{$filename}'.");
}
if (!is_file($filename)) {
throw new Exception("Not a regular file: '{$filename}'.");
}
if (!is_readable($filename)) {
throw new Exception("File '{$filename}' not readable.");
}
// TRANS: %s is the filename that contains a backup for a user.
printfv(_("Getting backup from file '%s'.") . "\n", $filename);
$html = file_get_contents($filename);
return $html;
}
示例7: getActivityStreamDocument
function getActivityStreamDocument()
{
$filename = get_option_value('f', 'file');
if (empty($filename)) {
show_help();
exit(1);
}
if (!file_exists($filename)) {
throw new Exception("No such file '{$filename}'.");
}
if (!is_file($filename)) {
throw new Exception("Not a regular file: '{$filename}'.");
}
if (!is_readable($filename)) {
throw new Exception("File '{$filename}' not readable.");
}
// TRANS: Commandline script output. %s is the filename that contains a backup for a user.
printfv(_("Getting backup from file '%s'.") . "\n", $filename);
$xml = file_get_contents($filename);
return $xml;
}
示例8: getAtomFeedDocument
function getAtomFeedDocument()
{
$filename = get_option_value('f', 'file');
if (empty($filename)) {
show_help();
exit(1);
}
if (!file_exists($filename)) {
throw new Exception("No such file '{$filename}'.");
}
if (!is_file($filename)) {
throw new Exception("Not a regular file: '{$filename}'.");
}
if (!is_readable($filename)) {
throw new Exception("File '{$filename}' not readable.");
}
$xml = file_get_contents($filename);
$dom = DOMDocument::loadXML($xml);
if ($dom->documentElement->namespaceURI != Activity::ATOM || $dom->documentElement->localName != 'feed') {
throw new Exception("'{$filename}' is not an Atom feed.");
}
return $dom;
}
示例9: str_replace
}
/***********************************************************************************/
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
$HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
$form_action = "list";
}
//ask-add
if (!isset($action)) {
$action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include "PP_header.php";
// #### HELP SECTION
show_help('list_payment_methods');
// #### PAYMENT METHOD SECTION
echo $PAYMENT_METHOD;
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
$_SESSION["menu"] = $_GET["menu"];
}
$HD_Form->create_form($form_action, $list, $id = null);
// #### FOOTER SECTION
include 'PP_footer.php';
示例10: snmp_walk
function snmp_walk($snmp_host, $snmp_community, $snmp_oid, $snmp_version)
{
if (extension_loaded("snmp")) {
if ($snmp_version == "1") {
if ($snmp_return = @snmpwalk($snmp_host, $snmp_community, $snmp_oid)) {
return $snmp_return;
} else {
show_help("SNMP");
}
} else {
if ($snmp_version == "2c" || $snmp_version == "2") {
if ($snmp_return = @snmp2_walk($snmp_host, $snmp_community, $snmp_oid)) {
return $snmp_return;
} else {
show_help("SNMP");
}
} else {
show_help("SNMP");
}
}
} else {
show_help("SNMP_MODULE");
}
}
示例11: get_option_value
Attempts a User Stream connection to Twitter as the given user, dumping
data as it comes.
ENDOFHELP;
require_once INSTALLDIR . '/scripts/commandline.inc';
if (have_option('n')) {
$nickname = get_option_value('n');
} else {
if (have_option('nick')) {
$nickname = get_option_value('nickname');
} else {
if (have_option('all')) {
$nickname = null;
} else {
show_help($helptext);
exit(0);
}
}
}
/**
*
* @param User $user
* @return TwitterOAuthClient
*/
function twitterAuthForUser(User $user)
{
$flink = Foreign_link::getByUserID($user->id, TWITTER_SERVICE);
$token = TwitterOAuthClient::unpackToken($flink->credentials);
if (!$token) {
throw new ServerException("No Twitter OAuth credentials for this user.");
示例12: str_replace
$HD_Form->init();
if (cardid != '' || !is_null($cardid)) {
$HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$cardid}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
$form_action = "list";
}
//ask-add
if (!isset($action)) {
$action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include 'PP_header.php';
// #### HELP SECTION
show_help("money_situation");
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
$_SESSION["menu"] = $_GET["menu"];
}
?>
<br>
<script language="javascript">
function go(URL)
{
if ( Check() )
{
示例13: Header
Header("Location: PP_error.php?c=accessdenied");
die;
}
/***********************************************************************************/
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
$HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
$form_action = "list";
}
//ask-add
if (!isset($action)) {
$action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include "PP_header.php";
// #### HELP SECTION
show_help('view_payment');
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
$_SESSION["menu"] = $_GET["menu"];
}
$HD_Form->create_form($form_action, $list, $id = null);
// #### FOOTER SECTION
include "PP_footer.php";
示例14: _
</td>
<td>
<input id="machine_id" type="text" required size="40" name="machine_id" saved-value="<?php
echo $machine_id;
?>
" value="<?php
echo $machine_id;
?>
"/>
</td>
</tr>
</table>
</form>
</div>
<h2><?php
echo _("Module Administration");
?>
</h2>
<div id="shield_link_div">
<a href="#" id="show_auto_update" title="<?php
echo _("Click to configure Update Notifications");
?>
"><span id="shield_link" class="<?php
echo $shield_class;
?>
"></span></a>
</div>
<?php
if ($edgemode) {
echo show_help(sprintf(_("This system has edge mode enabled. This means you will get modules as they are released and may encounter bugs not seen in general availibility modules.</br> For more information visit %s"), '<a href="http://wiki.freepbx.org/x/boi3Aw">http://wiki.freepbx.org/x/boi3Aw</a>'), _("EDGE MODE"));
}
示例15: ttsengines_delete_engine
$enginename = false;
$enginepath = false;
// Handle adding/updating an engine
if ($_REQUEST['delete']) {
ttsengines_delete_engine($_REQUEST['engineid']);
} else {
if ($_POST['edit']) {
ttsengines_update_engine($_POST['engineid'], $_POST['enginename'], $_POST['enginepath']);
} else {
if ($_POST['addengine']) {
ttsengines_add_engine($_POST['enginename'], $_POST['enginepath']);
}
}
}
$engines = ttsengines_get_all_engines();
$info = show_help(_('On this page you can manage text to speech engines on your system. When you add an engine you give it a name, and the full path to the engine on your system. After doing this the engine will be available on the text to speech page.'));
$heading = _('Text to Speech Engines');
$delurl = '';
if (isset($edit)) {
$data = \FreePBX::Ttsengines()->getEngine($edit);
$enginename = isset($data['name']) ? $data['name'] : '';
$enginepath = isset($data['path']) ? $data['path'] : '';
$delurl = '?display=ttsengines&delete=true&engineid=' . $edit . '&edit=' . $edit;
}
?>
<div class="container-fluid">
<h1><?php
echo $heading;
?>
</h1>
<?php