本文整理汇总了PHP中get_vocab函数的典型用法代码示例。如果您正苦于以下问题:PHP get_vocab函数的具体用法?PHP get_vocab怎么用?PHP get_vocab使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_vocab函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: invalid_booking
function invalid_booking($message)
{
global $day, $month, $year, $area, $room;
print_header($day, $month, $year, $area, isset($room) ? $room : "");
echo "<h1>" . get_vocab('invalid_booking') . "</h1>\n";
echo "<p>{$message}</p>\n";
// Print footer and exit
print_footer(TRUE);
}
示例2: create_field_entry_timezone
function create_field_entry_timezone()
{
global $timezone, $zoneinfo_outlook_compatible;
$special_group = "Others";
echo "<div>\n";
echo "<label for=\"area_timezone\">" . get_vocab("timezone") . ":</label>\n";
// If possible we'll present a list of timezones that this server supports and
// which also have a corresponding VTIMEZONE definition.
// Otherwise we'll just have to let the user type in a timezone, which introduces
// the possibility of an invalid timezone.
if (function_exists('timezone_identifiers_list')) {
$timezones = array();
$timezone_identifiers = timezone_identifiers_list();
foreach ($timezone_identifiers as $value) {
if (strpos($value, '/') === FALSE) {
// There are some timezone identifiers (eg 'UTC') on some operating
// systems that don't fit the Continent/City model. We'll put them
// into the special group
$continent = $special_group;
$city = $value;
} else {
// Note: timezone identifiers can have three components, eg
// America/Argentina/Tucuman. To keep things simple we will
// treat anything after the first '/' as a single city and
// limit the explosion to two
list($continent, $city) = explode('/', $value, 2);
}
// Check that there's a VTIMEZONE definition
$tz_dir = $zoneinfo_outlook_compatible ? TZDIR_OUTLOOK : TZDIR;
$tz_file = "{$tz_dir}/{$value}.ics";
// UTC is a special case because we can always produce UTC times in iCalendar
if ($city == 'UTC' || file_exists($tz_file)) {
$timezones[$continent][] = $city;
}
}
echo "<select id=\"area_timezone\" name=\"area_timezone\">\n";
foreach ($timezones as $continent => $cities) {
if (count($cities) > 0) {
echo "<optgroup label=\"" . htmlspecialchars($continent) . "\">\n";
foreach ($cities as $city) {
if ($continent == $special_group) {
$timezone_identifier = $city;
} else {
$timezone_identifier = "{$continent}/{$city}";
}
echo "<option value=\"" . htmlspecialchars($timezone_identifier) . "\"" . ($timezone_identifier == $timezone ? " selected=\"selected\"" : "") . ">" . htmlspecialchars($city) . "</option>\n";
}
echo "</optgroup>\n";
}
}
echo "</select>\n";
} else {
echo "<input id=\"area_timezone\" name=\"area_timezone\" value=\"" . htmlspecialchars($timezone) . "\">\n";
}
echo "</div>\n";
}
示例3: get_loc_field_name
function get_loc_field_name($name)
{
global $vocab;
// Search for indexes "user_name", "user_password", etc, in the localization array.
if (isset($vocab["user_" . $name])) {
return get_vocab("user_" . $name);
}
// If there is no entry (likely if user-defined fields have been added), return itself.
return $name;
}
示例4: generateOwnerButtons
function generateOwnerButtons($id, $series)
{
global $user, $create_by, $status, $area;
global $PHP_SELF, $reminders_enabled, $last_reminded, $reminder_interval;
$this_page = basename($PHP_SELF);
// Remind button if you're the owner AND there's a booking awaiting
// approval AND sufficient time has passed since the last reminder
// AND we want reminders in the first place
if ($reminders_enabled && $user == $create_by && $status & STATUS_AWAITING_APPROVAL && working_time_diff(time(), $last_reminded) >= $reminder_interval) {
echo "<tr>\n";
echo "<td> </td>\n";
echo "<td>\n";
generateButton("approve_entry_handler.php", $id, $series, "remind", $this_page . "?id={$id}&area={$area}", get_vocab("remind_admin"));
echo "</td>\n";
echo "</tr>\n";
}
}
示例5: display_series_header
function display_series_header($row, $table_id)
{
echo "<tr>";
// no \n so as not to create another child in the DOM
echo "<th class=\"control\" onClick=\"toggle_table('{$table_id}')\"> </th>\n";
// reservation name, with a link to the view_entry page
echo "<th class=\"header_name\"><a href=\"view_entry/id:" . $row['repeat_id'] . "-series:1\">" . htmlspecialchars($row['name']) . "</a></th>\n";
// create_by, area and room names
echo "<th class=\"header_create\">" . htmlspecialchars($row['create_by']) . "</th>\n";
echo "<th class=\"header_area\">" . htmlspecialchars($row['area_name']) . "</th>\n";
echo "<th class=\"header_room\">" . htmlspecialchars($row['room_name']) . "</th>\n";
echo "<th class=\"header_start_time\">" . get_vocab("series") . "</th>\n";
echo "<th class=\"header_action\">\n";
display_buttons($row, TRUE);
echo "</th>\n";
echo "</tr>\n";
}
示例6: affichetableau
/**
* admin_col_gauche.php
* colonne de gauche des écrans d'administration
* des sites, des domaines et des ressources de l'application GRR
* Dernière modification : $Date: 2010-04-07 15:38:13 $
* @author Laurent Delineau <laurent.delineau@ac-poitiers.fr>
* @author Marc-Henri PAMISEUX <marcori@users.sourceforge.net>
* @copyright Copyright 2003-2008 Laurent Delineau
* @copyright Copyright 2008 Marc-Henri PAMISEUX
* @link http://www.gnu.org/licenses/licenses.html
* @package admin
* @version $Id: admin_col_gauche.php,v 1.13 2010-04-07 15:38:13 grr Exp $
* @filesource
*
* This file is part of GRR.
*
* GRR is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* GRR is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRR; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
function affichetableau($liste, $titre = '')
{
global $chaine, $vocab;
if (count($liste) > 0) {
echo "<fieldset>\n";
echo "<legend>{$titre}</legend><ul>\n";
$k = 0;
foreach ($liste as $key) {
if ($chaine == $key) {
echo "<li><span class=\"bground\"><b>" . get_vocab($key) . "</b></span></li>\n";
} else {
echo "<li><a href='" . $key . "'>" . get_vocab($key) . "</a></li>\n";
}
$k++;
}
echo "</ul></fieldset>\n";
}
}
示例7: generate_search_nav_html
function generate_search_nav_html($search_pos, $total, $num_records, $search_str)
{
global $day, $month, $year;
global $search;
$html = '';
$has_prev = $search_pos > 0;
$has_next = $search_pos < $total - $search["count"];
if ($has_prev || $has_next) {
$html .= "<div id=\"record_numbers\">\n";
$html .= get_vocab("records") . ($search_pos + 1) . get_vocab("through") . ($search_pos + $num_records) . get_vocab("of") . $total;
$html .= "</div>\n";
$html .= "<div id=\"record_nav\">\n";
$base_query_string = "search_str=" . urlencode($search_str) . "&" . "total={$total}&" . "from_year={$year}&" . "from_month={$month}&" . "from_day={$day}";
// display a "Previous" button if necessary
if ($has_prev) {
$query_string = $base_query_string . "&search_pos=" . max(0, $search_pos - $search["count"]);
$html .= "<a href=\"search.php?{$query_string}\">";
}
$html .= get_vocab("previous");
if ($has_prev) {
$html .= "</a>";
}
// add a separator for Next and Previous
$html .= " | ";
// display a "Previous" button if necessary
if ($has_next) {
$query_string = $base_query_string . "&search_pos=" . max(0, $search_pos + $search["count"]);
$html .= "<a href=\"search.php?{$query_string}\">";
}
$html .= get_vocab("next");
if ($has_next) {
$html .= "</a>";
}
$html .= "</div>\n";
}
return $html;
}
示例8: do_summary
function do_summary(&$count, &$hours, &$room_hash, &$name_hash)
{
global $enable_periods;
// Make a sorted array of area/rooms, and of names, to use for column
// and row indexes. Use the rooms and names hashes built by accumulate().
// At PHP4 we could use array_keys().
reset($room_hash);
while (list($room_key) = each($room_hash)) {
$rooms[] = $room_key;
}
ksort($rooms);
reset($name_hash);
while (list($name_key) = each($name_hash)) {
$names[] = $name_key;
}
ksort($names);
$n_rooms = sizeof($rooms);
$n_names = sizeof($names);
echo "<div id=\"div_summary\">\n";
echo "<h1>" . (empty($enable_periods) ? get_vocab("summary_header") : get_vocab("summary_header_per")) . "</h1>\n";
echo "<table>\n";
echo "<thead>\n";
echo "<tr><th> </th>\n";
for ($c = 0; $c < $n_rooms; $c++) {
echo "<th colspan=\"2\">{$rooms[$c]}</th>\n";
$col_count_total[$c] = 0;
$col_hours_total[$c] = 0.0;
}
echo "<th colspan=\"2\"><br>" . get_vocab("total") . "</th></tr>\n";
$grand_count_total = 0;
$grand_hours_total = 0;
echo "</thead>\n";
echo "<tbody>\n";
for ($r = 0; $r < $n_names; $r++) {
$row_count_total = 0;
$row_hours_total = 0.0;
$name = $names[$r];
echo "<tr><td>{$name}</td>\n";
for ($c = 0; $c < $n_rooms; $c++) {
$room = $rooms[$c];
if (isset($count[$room][$name])) {
$count_val = $count[$room][$name];
$hours_val = $hours[$room][$name];
cell($count_val, $hours_val);
$row_count_total += $count_val;
$row_hours_total += $hours_val;
$col_count_total[$c] += $count_val;
$col_hours_total[$c] += $hours_val;
} else {
echo "<td class=\"count\"> </td><td> </td>\n";
}
}
cell($row_count_total, $row_hours_total);
echo "</tr>\n";
$grand_count_total += $row_count_total;
$grand_hours_total += $row_hours_total;
}
echo "<tr><td>" . get_vocab("total") . "</td>\n";
for ($c = 0; $c < $n_rooms; $c++) {
cell($col_count_total[$c], $col_hours_total[$c]);
}
cell($grand_count_total, $grand_hours_total);
echo "</tr></tbody></table>\n";
echo "</div>\n";
}
示例9: do_summary
function do_summary(&$count, &$hours, &$room_hash, &$name_hash)
{
global $enable_periods;
# Make a sorted array of area/rooms, and of names, to use for column
# and row indexes. Use the rooms and names hashes built by accumulate().
# At PHP4 we could use array_keys().
reset($room_hash);
while (list($room_key) = each($room_hash)) {
$rooms[] = $room_key;
}
ksort($rooms);
reset($name_hash);
while (list($name_key) = each($name_hash)) {
$names[] = $name_key;
}
ksort($names);
$n_rooms = sizeof($rooms);
$n_names = sizeof($names);
echo "<hr><h1>" . (empty($enable_periods) ? get_vocab("summary_header") : get_vocab("summary_header_per")) . "</h1><table border=2 cellspacing=4>\n";
echo "<tr><td> </td>\n";
for ($c = 0; $c < $n_rooms; $c++) {
echo "<td class=\"BL\" align=left><b>{$rooms[$c]}</b></td>\n";
$col_count_total[$c] = 0;
$col_hours_total[$c] = 0.0;
}
echo "<td class=\"BR\" align=right><br><b>" . get_vocab("total") . "</b></td></tr>\n";
$grand_count_total = 0;
$grand_hours_total = 0;
for ($r = 0; $r < $n_names; $r++) {
$row_count_total = 0;
$row_hours_total = 0.0;
$name = $names[$r];
echo "<tr><td class=\"BR\" align=right><b>{$name}</b></td>\n";
for ($c = 0; $c < $n_rooms; $c++) {
$room = $rooms[$c];
if (isset($count[$room][$name])) {
$count_val = $count[$room][$name];
$hours_val = $hours[$room][$name];
cell($count_val, $hours_val);
$row_count_total += $count_val;
$row_hours_total += $hours_val;
$col_count_total[$c] += $count_val;
$col_hours_total[$c] += $hours_val;
} else {
echo "<td> </td>\n";
}
}
cell($row_count_total, $row_hours_total);
echo "</tr>\n";
$grand_count_total += $row_count_total;
$grand_hours_total += $row_hours_total;
}
echo "<tr><td class=\"BR\" align=right><b>" . get_vocab("total") . "</b></td>\n";
for ($c = 0; $c < $n_rooms; $c++) {
cell($col_count_total[$c], $col_hours_total[$c]);
}
cell($grand_count_total, $grand_hours_total);
echo "</tr></table>\n";
}
示例10: substr
$description = substr($description, 0, $maxlength['room.description']);
// Add SQL escaping
$room_name_q = addslashes($name);
$description_q = addslashes($description);
if (empty($capacity)) {
$capacity = 0;
}
// Acquire a mutex to lock out others who might be editing rooms
if (!sql_mutex_lock("{$tbl_room}")) {
fatal_error(TRUE, get_vocab("failed_to_acquire"));
}
// Check that the room name is unique within the area
if (sql_query1("SELECT COUNT(*) FROM {$tbl_room} WHERE room_name='{$room_name_q}' AND area_id={$area} LIMIT 1") > 0) {
$error = "invalid_room_name";
} else {
$sql = "INSERT INTO {$tbl_room} (room_name, sort_key, area_id, description, capacity)\n VALUES ('{$room_name_q}', '{$room_name_q}', {$area}, '{$description_q}',{$capacity})";
if (sql_command($sql) < 0) {
trigger_error(sql_error(), E_USER_WARNING);
fatal_error(TRUE, get_vocab("fatal_db_error"));
}
}
// Release the mutex
sql_mutex_unlock("{$tbl_room}");
}
if (!empty($error)) {
$url = formatURLError($area, $error);
} else {
$url = formatURLError($area, NULL);
}
$returl = "admin/{$url}";
header("Location: {$returl}");
示例11: display_series_title_row
function display_series_title_row($row)
{
echo "<tr id=\"row_" . $row['repeat_id'] . "\">\n";
echo "<td class=\"control\"> </td>\n";
// reservation name, with a link to the view_entry page
echo "<td><a href=\"view_entry.php?id=" . $row['repeat_id'] . "&series=1\">" . htmlspecialchars($row['name']) . "</a></td>\n";
// create_by, area and room names
echo "<td>" . htmlspecialchars($row['create_by']) . "</td>\n";
echo "<td>" . htmlspecialchars($row['area_name']) . "</td>\n";
echo "<td>" . htmlspecialchars($row['room_name']) . "</td>\n";
echo "<td>";
// <span> for sorting
echo "<span title=\"" . $row['start_time'] . "\"></span>";
echo get_vocab("series");
echo "</td>\n";
echo "<td>\n";
display_buttons($row, TRUE);
echo "</td>\n";
echo "</tr>\n";
}
示例12: reset
}
echo '</tr>' . PHP_EOL;
reset($rooms);
}
echo '</table>' . PHP_EOL;
}
grr_sql_free($res);
if ($_GET['pview'] != 1) {
echo '<div id="toTop">' . PHP_EOL;
echo '<b>' . get_vocab('top_of_page') . '</b>' . PHP_EOL;
bouton_retour_haut();
echo '</div>' . PHP_EOL;
}
echo '</div>' . PHP_EOL;
echo '</div>' . PHP_EOL;
affiche_pop_up(get_vocab('message_records'), 'user');
?>
<script type="text/javascript">
$(document).ready(function(){
$('table.table-bordered td').each(function(){
var $row = $(this);
var height = $row.height();
var h2 = $row.find('a').height();
$row.find('a').css('height', height);
$row.find('a').css('padding-top', height/2 - h2/2);
});
});
jQuery(document).ready(function($){
$("#popup_name").draggable({containment: "#container"});
$("#popup_name").resizable();
示例13: get_vocab
}
}
echo "<div id=\"del_room_confirm\">\n";
echo "<p>" . get_vocab("sure") . "</p>\n";
echo "<div id=\"del_room_confirm_links\">\n";
echo "<a href=\"del.php?type=room&room={$room}&confirm=Y\"><span id=\"del_yes\">" . get_vocab("YES") . "!</span></a>\n";
echo "<a href=\"admin.php\"><span id=\"del_no\">" . get_vocab("NO") . "!</span></a>\n";
echo "</div>\n";
echo "</div>\n";
include "trailer.inc";
}
}
if ($type == "area") {
// We are only going to let them delete an area if there are
// no rooms. its easier
$n = sql_query1("select count(*) from {$tbl_room} where area_id={$area}");
if ($n == 0) {
// OK, nothing there, lets blast it away
sql_command("delete from {$tbl_area} where id={$area}");
// Redirect back to the admin page
header("Location: admin.php");
} else {
// There are rooms left in the area
print_header($day, $month, $year, $area);
echo "<p>\n";
echo get_vocab("delarea");
echo "<a href=\"admin.php\">" . get_vocab("backadmin") . "</a>";
echo "</p>\n";
include "trailer.inc";
}
}
示例14: do_summary
function do_summary(&$count, &$hours, &$room_hash, &$breve_description_hash, $enable_periods, $decompte, $csv = "n")
{
global $vocab;
if ($csv != "n") {
echo " ;";
}
// Make a sorted array of area/rooms, and of names, to use for column
// and row indexes. Use the rooms and names hashes built by accumulate().
// At PHP4 we could use array_keys().
reset($room_hash);
$rooms = array();
while (list($room_key) = each($room_hash)) {
$rooms[] = $room_key;
}
ksort($rooms);
reset($breve_description_hash);
$breve_descriptions = array();
while (list($breve_description_key) = each($breve_description_hash)) {
$breve_descriptions[] = $breve_description_key;
}
ksort($breve_descriptions);
$n_rooms = sizeof($rooms);
$n_names = sizeof($breve_descriptions);
// On affiche uniquement pour une sortie HTML
if ($csv == "n") {
if ($_GET["sumby"] == "6") {
$premiere_cellule = get_vocab("sum_by_creator");
} else {
if ($_GET["sumby"] == "3") {
$premiere_cellule = get_vocab("sum_by_descrip");
} else {
if ($_GET["sumby"] == "5") {
$premiere_cellule = get_vocab("type");
} else {
$premiere_cellule = grr_sql_query1("SELECT fieldname FROM " . TABLE_PREFIX . "_overload WHERE id='" . $_GET["sumby"] . "'");
}
}
}
if ($enable_periods == 'y') {
echo "<hr /><h1>" . get_vocab("summary_header_per") . "</h1><table class=\"table table-bordered table-striped\">\n";
} else {
echo "<hr /><h1>" . get_vocab("summary_header") . "</h1><table class=\"table table-bordered table-striped\">\n";
}
echo "<tr><td class=\"BL\" align=\"left\"><b>" . $premiere_cellule . " \\ " . get_vocab("room") . "</b></td>\n";
}
$col_count_total = array();
$col_hours_total = array();
for ($c = 0; $c < $n_rooms; $c++) {
if ($csv == "n") {
echo "<td class=\"BL\" align=\"left\"><b>{$rooms[$c]}</b></td>\n";
} else {
echo "{$rooms[$c]};";
}
$col_count_total[$c] = 0;
$col_hours_total[$c] = 0.0;
}
if ($csv == "n") {
echo "<td class=\"BR\" align=\"right\"><br /><b>" . get_vocab("total") . "</b></td></tr>\n";
} else {
echo html_entity_decode($vocab['total']) . ";\r\n";
}
$grand_count_total = 0;
$grand_hours_total = 0;
for ($r = 0; $r < $n_names; $r++) {
$row_count_total = 0;
$row_hours_total = 0.0;
$breve_description = $breve_descriptions[$r];
if ($csv == "n") {
echo "<tr><td class=\"BR\" align=\"right\"><b>{$breve_description}</b></td>\n";
} else {
echo "{$breve_description};";
}
for ($c = 0; $c < $n_rooms; $c++) {
$room = $rooms[$c];
if (isset($count[$room][$breve_description])) {
$count_val = $count[$room][$breve_description];
$hours_val = $hours[$room][$breve_description];
cell($count_val, $hours_val, $csv, $decompte);
$row_count_total += $count_val;
$row_hours_total += $hours_val;
$col_count_total[$c] += $count_val;
$col_hours_total[$c] += $hours_val;
} else {
if ($csv == "n") {
echo "<td> </td>\n";
} else {
echo ";";
}
}
}
cell($row_count_total, $row_hours_total, $csv, $decompte);
if ($csv == "n") {
echo "</tr>\n";
} else {
echo "\r\n";
}
$grand_count_total += $row_count_total;
$grand_hours_total += $row_hours_total;
}
if ($csv == "n") {
//.........这里部分代码省略.........
示例15: get_vocab
</tr>
<tr>
<td><input type="text" name="cleanDay" size="2" value="<?php
echo $_POST['cleanDay'];
?>
" style="text-align: center;"/></td>
<td>/</td>
<td><input type="text" name="cleanMonth" size="2" value="<?php
echo $_POST['cleanMonth'];
?>
" style="text-align: center;"/></td>
<td>/</td>
<td><input type="text" name="cleanYear" size="4" value="<?php
echo $_POST['cleanYear'];
?>
" style="text-align: center;"/></td>
</tr>
</table>
<input class="btn btn-primary" type="submit" value="<?php
echo get_vocab("OK");
?>
" style="font-variant: small-caps;" />
</fieldset>
</form>
</div>
<?php
echo "</td></tr></table>";
?>
</body>
</html>