本文整理汇总了PHP中displayMessage函数的典型用法代码示例。如果您正苦于以下问题:PHP displayMessage函数的具体用法?PHP displayMessage怎么用?PHP displayMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了displayMessage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Output
/**
* \brief Generate the text for this plugin.
*/
function Output()
{
global $PG_CONN;
global $SysConf;
if ($this->State != PLUGIN_STATE_READY) {
return;
}
$user_pk = $SysConf['auth']['UserId'];
/* Get array of groups that this user is an admin of */
$GroupArray = GetGroupArray($user_pk);
$V = "";
/* If this is a POST, then process the request. */
$Group = GetParm('grouppk', PARM_TEXT);
if (!empty($Group)) {
$rc = DeleteGroup($Group);
if (empty($rc)) {
/* Need to refresh the screen */
$text = _("Group");
$text1 = _("Deleted");
$V .= displayMessage("{$text} {$GroupArray[$Group]} {$text1}.");
} else {
$V .= displayMessage($rc);
}
}
/* Build HTML form */
$text = _("Delete a Group");
$V .= "<h4>{$text}</h4>\n";
$V .= "<form name='formy' method='POST' action=" . Traceback_uri() . "?mod=group_delete>\n";
/* Get array of users */
$UserArray = Table2Array('user_pk', 'user_name', 'users');
/* Remove from $GroupArray any active users. A user must always have a group by the same name */
foreach ($GroupArray as $group_fk => $group_name) {
if (array_search($group_name, $UserArray)) {
unset($GroupArray[$group_fk]);
}
}
if (empty($GroupArray)) {
$text = _("You have no groups you can delete.");
echo "<p>{$text}<p>";
return;
}
reset($GroupArray);
if (empty($group_pk)) {
$group_pk = key($GroupArray);
}
$text = _("Select the group to delete: \n");
$V .= "{$text}";
/*** Display group select list, on change request new page with group= in url ***/
$V .= Array2SingleSelect($GroupArray, "grouppk", $group_pk, false, false);
$text = _("Delete");
$V .= "<input type='submit' value='{$text}'>\n";
$V .= "</form>\n";
if (!$this->OutputToStdout) {
return $V;
}
print "{$V}";
return;
}
示例2: _loopMsgs
function _loopMsgs($sth_msgs, $high_pointer = null, $anonymous = null)
{
if (!$high_pointer) {
$high_pointer = 0;
}
$low_pointer = $high_pointer;
while ($row_msgs = @mysql_fetch_assoc($sth_msgs)) {
displayMessage($row_msgs, $anonymous);
echo "<tr><td> </td></tr>";
$high_pointer = $row_msgs['id'] > $high_pointer ? $row_msgs['id'] : $high_pointer;
$low_pointer = $row_msgs['id'];
}
return array($high_pointer, $low_pointer);
}
示例3: sendMail
function sendMail()
{
// From, to, subject, message ...
$email_from = $_POST['email'];
$email_to = "avenirsdinternet-news-join@lists.hackstub.netlib.re";
$email_subject = "Nouvelle inscription";
$email_message = "Une nouvelle inscription a ete recue\n\n";
// Create email headers
$headers = 'From: ' . $email_from . "\r\n" . 'Reply-To: ' . $email_from . "\r\n" . 'X-Mailer: PHP/' . phpversion();
// Actually send the mail
@mail($email_to, $email_subject, $email_message, $headers);
// Notice the user the mail was sent
displayMessage("Votre inscription a bien été envoyée.<br/>");
}
示例4: TryToDelete
/**
* \brief Given a folder_pk, try to add a job after checking permissions.
* \param $uploadpk - the upload(upload_id) you want to delete
*
* \return string with the message.
*/
function TryToDelete($uploadpk)
{
if (!GetUploadPerm($uploadpk) >= Auth::PERM_WRITE) {
$text = _("You dont have permissions to delete the upload");
return DisplayMessage($text);
}
$rc = $this->Delete($uploadpk);
if (!empty($rc)) {
$text = _("Deletion Scheduling failed: ");
return DisplayMessage($text . $rc);
}
/* Need to refresh the screen */
$URL = Traceback_uri() . "?mod=showjobs&upload={$uploadpk} ";
$LinkText = _("View Jobs");
$text = _("Deletion added to job queue.");
$msg = "{$text} <a href={$URL}>{$LinkText}</a>";
return displayMessage($msg);
}
示例5: Output
/**
* \brief Generate the text for this plugin.
*/
function Output()
{
if ($this->State != PLUGIN_STATE_READY) {
return;
}
global $Plugins;
$V = "";
switch ($this->OutputType) {
case "XML":
break;
case "HTML":
/* If this is a POST, then process the request. */
$uploadpk = GetParm('uploadunpack', PARM_INTEGER);
if (!empty($uploadpk)) {
$P =& $Plugins[plugin_find_id("agent_unpack")];
$rc = $P->AgentAdd($uploadpk);
if (empty($rc)) {
/* Need to refresh the screen */
$text = _("Unpack added to job queue");
$V .= displayMessage($text);
} else {
$text = _("Unpack of Upload failed");
$V .= displayMessage("{$text}: {$rc}");
}
}
/* Set default values */
if (empty($GetURL)) {
$GetURL = 'http://';
}
//$V .= $this->ShowReunpackView($uploadtree_pk);
break;
case "Text":
break;
default:
break;
}
if (!$this->OutputToStdout) {
return $V;
}
print "{$V}";
return;
}
示例6: Output
/**
* \brief Generate the text for this plugin.
*/
function Output()
{
if ($this->State != PLUGIN_STATE_READY) {
return;
}
$V = "";
switch ($this->OutputType) {
case "XML":
break;
case "HTML":
/* If this is a POST, then process the request. */
$Folder = GetParm('folder', PARM_INTEGER);
$GetURL = GetParm('geturl', PARM_TEXT);
$Desc = GetParm('description', PARM_TEXT);
// may be null
$Name = GetParm('name', PARM_TEXT);
// may be null
$Accept = GetParm('accept', PARM_TEXT);
// may be null
$Reject = GetParm('reject', PARM_TEXT);
// may be null
$Level = GetParm('level', PARM_TEXT);
// may be null
$public = GetParm('public', PARM_TEXT);
// may be null
if (empty($public)) {
$public_perm = PERM_NONE;
} else {
$public_perm = PERM_READ;
}
if (!empty($GetURL) && !empty($Folder)) {
$rc = $this->Upload($Folder, $GetURL, $Desc, $Name, $Accept, $Reject, $Level, $public_perm);
if (empty($rc)) {
/* Need to refresh the screen */
$GetURL = NULL;
$Desc = NULL;
$Name = NULL;
$Accept = NULL;
$Reject = NULL;
$Level = NULL;
} else {
$text = _("Upload failed for");
$V .= displayMessage("{$text} {$GetURL}: {$rc}");
}
}
/* Set default values */
if (empty($Level)) {
$Level = 1;
}
/* Set default values */
if (empty($GetURL)) {
$GetURL = 'http://';
}
/* Display instructions */
$text22 = _("Starting in FOSSology v 2.2 only your group and any other group you assign will have access to your uploaded files. To manage your own group go into Admin > Groups > Manage Group Users. To manage permissions for this one upload, go to Admin > Upload Permissions");
$V .= "<p><b>{$text22}</b><p>";
$V .= _("This option permits uploading a single file (which may be iso, tar, rpm, jar, zip, bz2, msi, cab, etc.) or a directory from a remote web or FTP server to FOSSology.\n");
$V .= _("The file or directory to upload must be accessible via a URL and must not require human interaction ");
$V .= _("such as login credentials.\n");
/* Display the form */
$V .= "<form method='post'>\n";
// no url = this url
$V .= "<ol>\n";
$text = _("Select the folder for storing the uploaded file (directory):");
$V .= "<li>{$text}\n";
$V .= "<select name='folder'>\n";
$V .= FolderListOption(-1, 0);
$V .= "</select><P />\n";
$text = _("Enter the URL to the file (directory):");
$V .= "<li>{$text}<br />\n";
$V .= "<INPUT type='text' name='geturl' size=60 value='" . htmlentities($GetURL) . "'/><br />\n";
$text = _("NOTE");
$text1 = _(": If the URL requires authentication or navigation to access, then the upload will fail. Only provide a URL that goes directly to the file (directory). The URL can begin with HTTP://, HTTPS://, or FTP://.");
$V .= "<b>{$text}</b>{$text1}<P />\n";
$text = _("(Optional) Enter a description of this file (directory):");
$V .= "<li>{$text}<br />\n";
$V .= "<INPUT type='text' name='description' size=60 value='" . htmlentities($Desc) . "'/><P />\n";
$text = _("(Optional) Enter a viewable name for this file (directory):");
$V .= "<li>{$text}<br />\n";
$V .= "<INPUT type='text' name='name' size=60 value='" . htmlentities($Name) . "'/><br />\n";
$text = _("NOTE");
$text1 = _(": If no name is provided, then the uploaded file (directory) name will be used.");
$V .= "<b>{$text}</b>{$text1}<P />\n";
$text = _("(Optional) Enter comma-separated lists of file name suffixes or patterns to accept:");
$V .= "<li>{$text}<br />\n";
$V .= "<INPUT type='text' name='accept' size=60 value='" . htmlentities($Accept) . "'/><P />\n";
$text = _("NOTE");
$text1 = _(": If any of the wildcard characters, *, ?, [ or ], appear in an element of acclist, it will be treated as a pattern, rather than a suffix.");
$V .= "<b>{$text}</b>{$text1}<P />\n";
$text = _("(Optional) Enter comma-separated lists of file name suffixes or patterns to reject:");
$V .= "<li>{$text}<br />\n";
$V .= "<INPUT type='text' name='reject' size=60 value='" . htmlentities($Reject) . "'/><P />\n";
$text = _("NOTE");
$text1 = _(": If any of the wildcard characters, *, ?, [ or ], appear in an element of rejlist, it will be treated as a pattern, rather than a suffix.");
$V .= "<b>{$text}</b>{$text1}<P />\n";
$text = _("(Optional) maximum recursion depth (inf or 0 for infinite):");
$V .= "<li>{$text}<br />\n";
//.........这里部分代码省略.........
示例7: head_tag
head_tag("Admin LACTOR - " . _("Mother Log In"));
?>
</head>
<body>
<div id="maincontainer">
<?php
page_header();
admin_menu(2);
?>
<div id="pagecontent">
<?php
displayMessage('ProxyMessage', 'ProxyDetails', 'ProxyType');
?>
<div id="registercontent">
<div id="container">
<ul class="menu">
<li id="breastfeeding" class="active"><?php
echo _("Mother's Portal");
?>
</li>
</ul>
<span class="clear"></span>
示例8: page_menu
page_menu(PAGE_PROFILE);
?>
<div id="pagecontent">
<?php
if (isset($_SESSION['s_mid'])) {
$_SESSION['Smessage'] = "Logged in as scientist.";
$_SESSION['Stype'] = 2;
$_SESSION['Sdetail'] = "";
displayMessage('Smessage', 'Sdetail', 'Stype');
}
displayNotification();
?>
<?php
displayMessage('ChangePassMessage', 'ChangePassDetails', 'ChangePassType');
?>
<div id="registercontent">
<div id="container">
<div class="tabs">
<ul class="menu">
<li><a href="#motherInfo"><?php
echo _("Mother Information");
?>
</a></li>
<li><a href="#childInfo"><?php
echo _("Child Information");
?>
</a></li>
示例9: Output
/**
* \brief Generate the text for this plugin.
*/
function Output()
{
global $PG_CONN;
if ($this->State != PLUGIN_STATE_READY) {
return;
}
$V = "";
/* If this is a POST, then process the request. */
$Group = GetParm('groupname', PARM_TEXT);
if (!empty($Group)) {
$rc = $this->Add($Group);
if (empty($rc)) {
/* Need to refresh the screen */
$text = _("Group");
$text1 = _("added");
$V .= displayMessage("{$text} {$Group} {$text1}.");
} else {
$V .= displayMessage($rc);
}
}
/* Build HTML form */
$text = _("Add a Group");
$V .= "<h4>{$text}</h4>\n";
$V .= "<form name='formy' method='POST' action=" . Traceback_uri() . "?mod=group_add>\n";
$Val = htmlentities(GetParm('groupname', PARM_TEXT), ENT_QUOTES);
$text = _("Enter the groupname:");
$V .= "{$text}\n";
$V .= "<input type='text' value='{$Val}' name='groupname' size=20>\n";
$text = _("Add");
$V .= "<input type='submit' value='{$text}'>\n";
$V .= "</form>\n";
if (!$this->OutputToStdout) {
return $V;
}
print "{$V}";
return;
}
示例10: Output
function Output()
{
global $PG_CONN;
if ($this->State != PLUGIN_STATE_READY) {
return;
}
$V = "";
$folder_pk = GetParm('folder', PARM_TEXT);
$FolderSelectId = GetParm('selectfolderid', PARM_INTEGER);
if (empty($FolderSelectId)) {
$FolderSelectId = GetUserRootFolder();
}
$NewName = GetArrayVal("newname", $_POST);
$NewDesc = GetArrayVal("newdesc", $_POST);
$upload_pk = GetArrayVal("upload_pk", $_POST);
if (empty($upload_pk)) {
$upload_pk = GetParm('upload', PARM_INTEGER);
}
/* Check Upload permission */
if (!empty($upload_pk)) {
$UploadPerm = GetUploadPerm($upload_pk);
if ($UploadPerm < PERM_WRITE) {
$text = _("Permission Denied");
echo "<h2>{$text}<h2>";
return;
}
}
$rc = $this->UpdateUploadProperties($upload_pk, $NewName, $NewDesc);
if ($rc == 0) {
$text = _("Nothing to Change");
$V .= displayMessage($text);
} else {
if ($rc == 1) {
$text = _("Upload Properties successfully changed");
$V .= displayMessage($text);
}
}
/* define js_url */
$V .= js_url();
/* Build the HTML form */
$V .= "<form name='formy' method='post'>\n";
// no url = this url
$V .= "<ol>\n";
$text = _("Select the folder that contains the upload: \n");
$V .= "<li>{$text}";
/*** Display folder select list, on change request new page with folder= in url ***/
$Uri = Traceback_uri() . "?mod=" . $this->Name . "&selectfolderid=";
$V .= "<select name='oldfolderid' onChange='window.location.href=\"{$Uri}\" + this.value'>\n";
$V .= FolderListOption(-1, 0, 1, $FolderSelectId);
$V .= "</select><P />\n";
/*** Display upload select list, on change, request new page with new upload= in url ***/
$text = _("Select the upload you wish to edit: \n");
$V .= "<li>{$text}";
// Get list of all upload records in this folder
$UploadList = FolderListUploads_perm($FolderSelectId, PERM_WRITE);
// Make data array for upload select list. Key is upload_pk, value is a composite
// of the upload_filename and upload_ts.
$UploadArray = array();
foreach ($UploadList as $UploadRec) {
$SelectText = htmlentities($UploadRec['name']);
if (!empty($UploadRec['upload_ts'])) {
$SelectText .= ", " . substr($UploadRec['upload_ts'], 0, 19);
}
$UploadArray[$UploadRec['upload_pk']] = $SelectText;
}
/* Get selected upload info to display*/
if (empty($upload_pk)) {
// no upload selected, so use the top one in the select list
reset($UploadArray);
$upload_pk = key($UploadArray);
}
if ($upload_pk) {
// case where upload is set in the URL
$sql = "SELECT * FROM upload WHERE upload_pk = '{$upload_pk}'";
$result = pg_query($PG_CONN, $sql);
DBCheckResult($result, $sql, __FILE__, __LINE__);
if (pg_num_rows($result) == 0) {
/* Bad upload_pk */
$text = _("Missing upload.");
$V .= displayMessage($text);
pg_free_result($result);
return 0;
}
$UploadRec = pg_fetch_assoc($result);
pg_free_result($result);
$V .= "<INPUT type='hidden' name='upload_pk' value='{$upload_pk}' />\n";
} else {
// no uploads in the folder
$UploadRec = array();
}
$url = Traceback_uri() . "?mod=upload_properties&folder={$folder_pk}&upload=";
$onchange = "onchange=\"js_url(this.value, '{$url}')\"";
$V .= Array2SingleSelect($UploadArray, "uploadselect", $upload_pk, false, false, $onchange);
/* Input upload_filename */
$text = _("Upload name: \n");
$V .= "<li>{$text}";
if (empty($UploadRec['upload_filename'])) {
$upload_filename = "";
} else {
$upload_filename = htmlentities($UploadRec['upload_filename']);
//.........这里部分代码省略.........
示例11: page_header
background-color: #eee;
}
#messageBox h1 {
margin-top: 0;
color: #333;
}
</style>
<body>
<div id="maincontainer">
<?php
page_header();
?>
<div id="pagecontent">
<?php
displayMessage('LoginMessage', 'LoginDetails', 'LoginType');
?>
<div id="loginContainer">
<div id="messageBox">
<h1><?php
echo _("Welcome to LACTOR");
?>
</h1>
<?php
echo _("LACTOR is an innovative, interactive web-based breastfeeding monitoring system. LACTOR was created to help breastfeeding mothers monitor their breastfeeding patterns and detect early breastfeeding problems. The lactation consultant can also monitor mothers' data and intervene immediately in case of a breastfeeding problem. Mothers also receive notifications if they have any breastfeeding problem with suggestions to help solve the problem.");
?>
</div>
<div id="loginBox" class="tabs">
示例12: showError
function showError($msg = "ERROR")
{
displayMessage($msg, 31);
}
示例13: page_header
}
.nowrap {
white-space: nowrap;
}
</style>
</head>
<body>
<div id="maincontainer">
<?php
page_header();
?>
<div id="pagecontent">
<?php
displayMessage('PerMessage', 'PerDetails', 'PerType');
?>
<p><?php
echo _("Please fill out all the fields.");
?>
</p>
<div id="container">
<ul class="menu">
<li id="breastfeeding" class="active"><?php
echo _("Breastfeeding follow-up");
?>
</li>
</ul>
示例14: ShowView
//.........这里部分代码省略.........
}
/* No item */
$V .= Dir2Browse($BackMod, $Item, NULL, 1, "View", -1, '', '', $uploadtree_tablename) . "<P />\n";
}
// if ShowHeader
$this->SortHighlightMenu();
/***********************************
Display file contents
***********************************/
print $V;
$V = "";
$openedFin = False;
if (empty($Fin)) {
$Fin = @fopen(RepPathItem($Item), "rb");
if ($Fin) {
$openedFin = true;
}
if (empty($Fin)) {
/* Added by vincent implement when view files which not in repository, ask user if want to reunpack*/
/** BEGIN **/
/* If this is a POST, then process the request. */
$uploadunpack = GetParm('uploadunpack', PARM_INTEGER);
$uploadpk = $Upload;
$flag = 0;
$P =& $Plugins[plugin_find_id("ui_reunpack")];
$state = $P->CheckStatus($uploadpk, "reunpack", "ununpack");
//print "<p>$state</p>";
if ($state == 0 || $state == 2) {
if (!empty($uploadunpack)) {
$rc = $P->AgentAdd($uploadpk);
if (empty($rc)) {
/* Need to refresh the screen */
$text = _("Unpack added to job queue");
$V .= displayMessage($text);
$flag = 1;
$text = _("Reunpack job is running: you can see it in");
$text1 = _("jobqueue");
print "<p> <font color=red>{$text} <a href='" . Traceback_uri() . "?mod=showjobs'>{$text1}</a></font></p>";
} else {
$text = _("Unpack of Upload failed");
$V .= displayMessage("{$text}: {$rc}");
}
print $V;
}
} else {
$flag = 1;
$text = _("Reunpack job is running: you can see it in");
$text1 = _("jobqueue");
print "<p> <font color=red>{$text} <a href='" . Traceback_uri() . "?mod=showjobs'>{$text1}</a></font></p>";
}
$text = _("File contents are not available in the repository.");
print "{$text}\n";
$P =& $Plugins[plugin_find_id("ui_reunpack")];
print $P->ShowReunpackView($Item, $flag);
return;
}
/** END **/
}
rewind($Fin);
$Pages = "";
$Uri = preg_replace('/&page=[0-9]*/', '', Traceback());
$HighlightMenu = "";
$HighlightMenu .= "</center>";
// some fcn left a dangling center
if ($Format == 'hex') {
$HighlightMenu .= $this->GetHighlightMenu(VIEW_BLOCK_HEX, $ViewOnly, $DispView);
示例15: Superior
//.........这里部分代码省略.........
?>
images/logopng.png" border="0" >
<br />
<span style="text-transform: capitalize; font-size: 18px; color: #000; font-variant: small-caps; font-family: sans-serif; font-weight: bold;" > <?php
echo $LABELINDEX[$INDEXIDIOMA][408];
?>
</span> </td>
<td width="50%" align="right" style="padding-right: 40">
<table cellpadding="2" cellspacing="2">
<tr>
<td>
<?php
if ($this->seleccionmenu == true) {
?>
<table>
<tr>
<td><strong><?php
echo $LABELINDEX[$INDEXIDIOMA][0];
?>
:</strong> </td>
<td><?php
echo $_SESSION["usuario"];
?>
</td>
</tr>
<tr>
<td><strong><?php
echo $LABELINDEX[$INDEXIDIOMA][58];
?>
:</strong> </td>
<td><?php
echo $_SESSION["nombreempresa"];
?>
</td>
</tr>
<tr>
<td colspan='2'><strong><a href="<?php
echo $RUTA_R;
?>
tuto/BELCORP_MANUAL_USUARIO_Expenses.pdf" target="_blank"><?php
echo $LABELINDEX[$INDEXIDIOMA][5];
?>
</a></strong> </td>
</tr>
</table>
<?php
}
?>
</td>
<td><img src="<?php
echo $RUTA_R;
?>
images/logoExpenses.png" ></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" width="93%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="center" valign="top">
<?php
if ($this->seleccionmenu == true) {
$this->Mn->Imprime_Papas();
}
?>
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" style="padding-left: 10px; padding-right: 10px;">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="inicio">
<tr>
<td>
<?php
if (isset($_GET['loginErr'])) {
echo displayMessage($FWK_MSG_LOGINERROR, $FWK_MSG_ERROR);
}
?>
<?php
if (isset($_GET['notLogged'])) {
echo displayMessage($FWK_MSG_NOTLOGGED, $FWK_MSG_WARN);
}
?>
<?php
if (isset($_GET['errormsg'])) {
echo displayMessage(base64_decode($_GET['errormsg']), $FWK_MSG_ERROR);
}
?>
</td>
</tr>
<tr>
<td valign="top">
<?php
}