本文整理汇总了PHP中et函数的典型用法代码示例。如果您正苦于以下问题:PHP et函数的具体用法?PHP et怎么用?PHP et使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了et函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: rename_column
function rename_column($table, $field, $new_name)
{
if (substr($field, -3) == '_id' || $field == 'sort') {
d()->db->exec("ALTER TABLE `" . $table . "` CHANGE COLUMN `{$field}` " . et($new_name) . " int NULL");
} elseif (substr($field, 0, 3) == 'is_') {
d()->db->exec("ALTER TABLE `" . $table . "` CHANGE COLUMN `{$field}` " . et($new_name) . " tinyint(4) NOT NULL DEFAULT 0");
} elseif (substr($field, -3) == '_at') {
d()->db->exec("ALTER TABLE `" . $table . "` CHANGE COLUMN `{$field}` " . et($new_name) . " datetime NULL");
} else {
d()->db->exec("ALTER TABLE `" . $table . "` CHANGE COLUMN `{$field}` " . et($new_name) . " text NULL, DEFAULT CHARACTER SET=utf8");
}
}
开发者ID:ramainen,项目名称:doit-cms,代码行数:12,代码来源:scaffold.class.php
示例2: get
public function get($name, $mutilang = false)
{
if ($this->_options['queryready'] == false) {
$this->fetch_data_now();
}
if (isset($this->_future_data[$name])) {
return $this->_future_data[$name];
}
if ($mutilang && doitClass::$instance->lang != '' && doitClass::$instance->lang != '') {
if (isset($this->_data[$this->_cursor]) && isset($this->_data[$this->_cursor][doitClass::$instance->lang . '_' . $name]) && $this->_data[$this->_cursor][doitClass::$instance->lang . '_' . $name] != '') {
return $this->get(doitClass::$instance->lang . '_' . $name);
}
}
if (isset($this->_data[$this->_cursor])) {
//Item.title //Получение одного свойства
if (isset($this->_data[$this->_cursor][$name])) {
if (isset($this->_data[$this->_cursor]['admin_options']) && $this->_data[$this->_cursor]['admin_options'] != '' && $this->_safe_mode === false) {
$admin_options = unserialize($this->_data[$this->_cursor]['admin_options']);
if (isset($admin_options[$name])) {
return preg_replace_callback('/\\<img\\ssrc=\\"\\/cms\\/external\\/tiny_mce\\/plugins\\/mymodules\\/module\\.php\\?([\\@\\-\\_0-9a-zA-Z\\&]+)\\=([\\-\\_0-9a-zA-Z\\&]+)\\".[^\\>]*\\>/', create_function('$matches', 'if(isset(d()->plugins[str_replace("@","#",$matches[1])])){return d()->call(str_replace("@","#",$matches[1]),array($matches[2]));};return "";'), $this->_data[$this->_cursor][$name]);
}
}
return $this->_data[$this->_cursor][$name];
}
if (!in_array($name, doitClass::$instance->datapool['_known_fields'][$this->_options['table']])) {
//Item.user //Получение связанного объекта
$_is_column_exists = false;
if (isset($this->_data[$this->_cursor][$name . '_id'])) {
$_is_column_exists = true;
} else {
//Проверка на факт наличия столбца $name.'_id'
$columns = $this->columns();
if ($columns !== false) {
$columns = array_flip($columns);
//TODO: возможно, array_keys будет быстрее
if (isset($columns[$name . '_id'])) {
$_is_column_exists = true;
}
}
}
if ($_is_column_exists == true) {
if (!isset($this->_objects_cache[$name])) {
/* кеш собранных массивов */
$ids_array = array();
foreach ($this->_data as $key => $value) {
if (!empty($value[$name . '_id'])) {
$ids_array[$value[$name . '_id']] = true;
}
}
$ids_array = array_keys($ids_array);
$this->_objects_cache[$name] = activerecord_factory_from_table(ActiveRecord::one_to_plural($name))->order('')->where(' ' . DB_FIELD_DEL . id . DB_FIELD_DEL . ' IN (?)', $ids_array);
}
$cursor_key = $this->_objects_cache[$name]->get_cursor_key_by_id($this->_data[$this->_cursor][$name . '_id'], true);
if ($cursor_key === false) {
$trash = clone $this->_objects_cache[$name];
return $trash->limit('0')->where('false');
}
return $this->_objects_cache[$name][$cursor_key];
}
//Item.users
//1. Поиск альтернативных подходящих столбцов
//TODO: удалить позже
$foundedfield = false;
//ищем поле item_id в таблице users
//??щем таблицу с названием $name (например, users)
$columns = $this->columns($name);
if ($columns === false && $name == 'template') {
return '';
//template - ключевое частозапрашиваемое поле, данный оборот ускорит работу
}
/*
DEPRECATED - лишние запросы
if ($columns===false) {
$_tmpael = activerecord_factory_from_table($this->_options["table"]);
return $_tmpael->find_by('url',$name);
}
*/
//при запросе users возможны несколько случаев
//Четрые варианта: 1. есть И user_id, 2. и (3. или) users_to_groups, 4. только вспомогательная таблица
//При запросе users_over_memberships преобразуем $name в users
$over_position = strpos($name, '_over_');
if ($over_position !== false) {
$over_method = substr($name, $over_position + 6);
$name = substr($name, 0, $over_position);
$_tmpael = activerecord_factory_from_table($name);
$second_table_column = ActiveRecord::plural_to_one(strtolower($name)) . '_id';
//Проверка на факт наличия таблицы users_to_groups
$ids_array = $this->{$over_method}->select($second_table_column)->to_array;
$ids = array();
foreach ($ids_array as $key => $value) {
$ids[] = $value[$second_table_column];
}
return $_tmpael->where("`id` IN (?)", $ids);
} else {
$many_to_many_table = $this->calc_many_to_many_table_name($name, $this->_options['table']);
$many_to_many_table_columns = $this->columns($many_to_many_table);
}
if (strpos($name, ' ') !== false) {
return '';
//.........这里部分代码省略.........
开发者ID:ramainen,项目名称:doit-cms,代码行数:101,代码来源:orm.func.php
示例3: showListTable
function showListTable($listFields, $records, $options = array())
{
global $tableName, $schema;
?>
<table cellspacing="0" class="data sortable">
<input type='hidden' name='_tableName' class='_tableName' value='<?php
echo htmlencode($tableName);
?>
' />
<thead>
<tr class="nodrag nodrop">
<?php
displayColumnHeaders($listFields, @$options['isRelatedRecords']);
?>
</tr>
</thead>
<?php
foreach ($records as $record) {
$trStyle = applyFilters('listRow_trStyle', '', $tableName, $record);
$trClass = @$trClass == "listRowEven" ? 'listRowOdd' : 'listRowEven';
# rotate bgclass
$trClass .= ' draggable droppable';
if (@$schema['menuType'] == 'category') {
// v2.60 add CSS classes with category data for filtering categories with jquery.
$trClass .= ' category_row';
$trClass .= ' category_num_' . $record['num'];
$trClass .= ' category_parent_' . $record['parentNum'];
$trClass .= ' category_depth_' . $record['depth'];
$trClass .= ' category_lineage' . str_replace(':', '_', $record['lineage']);
// eg: lineage_6_13_14_
}
$trClass = applyFilters('listRow_trClass', $trClass, $tableName, $record);
// v2.60
print "<tr class='{$trClass}' style='{$trStyle}'>\n";
displayListColumns($listFields, $record, $options);
print "</tr>\n";
}
?>
<?php
if (count($records) == 0) {
$listFieldCount = count($listFields) + 3;
// for checkbox, modify, and erase
if (@$schema['menuType'] == 'category') {
$listFieldCount++;
}
// for extra order field
?>
<tr>
<td class="listRowOdd listRowNoResults" colspan="<?php
echo $listFieldCount;
?>
">
<?php
if (!@$_REQUEST['search']) {
?>
<?php
et('Sorry, no records were found!');
?>
<?php
}
?>
<?php
if (@$_REQUEST['search']) {
?>
<?php
et('Sorry, the <b>search</b> returned no results!');
?>
<?php
}
?>
</td>
</tr>
<?php
}
?>
</table>
<?php
}
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:82,代码来源:list_functions.php
示例4: et
?>
</a></td>
<?php
}
}
?>
</tr>
<?php
}
?>
<tr style="display: none"><td></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" class="noUploads" style="display: none; width: 100%">
<tr><td style="text-align: center; padding: 30px"><?php
et('There are no files uploaded for this record.');
?>
</td></tr>
</table>
<script type="text/javascript"><!-- // language strings
lang_confirm_erase_image = '<?php
echo addslashes(t("Remove file: %s"));
?>
';
//--></script>
<script type="text/javascript" src="lib/admin_functions.js?<?php
echo filemtime(SCRIPT_DIR . '/lib/admin_functions.js');
// on file change browsers should no longer use cached versions
?>
"></script>
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:31,代码来源:uploadList.php
示例5: t
<?php
if ($row['tableName'] == 'accounts') {
?>
<td width="11%" style="text-align:center; color: #666"><?php
echo t('erase');
?>
</td>
<?php
} else {
?>
<td width="11%" style="text-align:center"><a href="javascript:confirmEraseTable('<?php
echo urlencode($row['tableName']);
?>
')"><?php
et('erase');
?>
</a></td>
<?php
}
?>
</tr>
<?php
}
?>
</table>
<?php
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:30,代码来源:listTables.php
示例6: urlencode
<option value=''> </option>
<?php
if ($CURRENT_USER['isAdmin']) {
?>
<option value="?menu=database&action=editTable&tableName=<?php
echo urlencode($tableName);
?>
"><?php
et('Admin: Edit Section');
?>
</option>
<option value="?menu=_codeGenerator&tableName=<?php
echo urlencode($tableName);
?>
"><?php
et('Admin: Code Generator');
?>
</option>
<?php
}
?>
</select>
<input class="button" type="submit" name="_advancedActionSubmit" value=" go " onclick="$('form').ajaxFormUnbind();" />
<br />
<?php
}
?>
</div>
<div style="float:right">
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:31,代码来源:view.php
示例7: disableAutocomplete
" tabindex="2" <?php
disableAutocomplete();
?>
/>
</p>
<p>
<input class="button" type="submit" name="login" value="<?php
et('Login');
?>
" tabindex="4" />
</p>
<p>
<a href="?menu=forgotPassword"><?php
et('Forgot your password?');
?>
</a>
</p>
<?php
$content = ob_get_clean();
// get cached output
$content = applyFilters('login_content', $content);
echo $content;
?>
<div class="clear"></div>
</div> <!-- End .tab-content -->
</div> <!-- End .content-box-content -->
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:31,代码来源:login.php
示例8: confirmRestoreDatabase
//
function confirmRestoreDatabase() {
var backupFile = $('#restore').val();
// error checking
if (backupFile == '') { return alert('<?php
et('No backup file selected!');
?>
'); }
// request confirmation
if (!confirm("<?php
et('Restore data from this backup file?');
?>
\n" +backupFile+ "\n\n<?php
et('WARNING: BACKUP DATA WILL OVERWRITE EXISTING DATA!');
?>
")) { return; }
//
redirectWithPost('?', {
'menu': 'admin',
'action': 'restore',
'file': backupFile,
'_CSRFToken': $('[name=_CSRFToken]').val()
});
}
//--></script>
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:30,代码来源:general.php
示例9: getTableRow
function getTableRow($record, $value, $formType)
{
global $TABLE_PREFIX;
// load access list
$accessList = array();
if (@$_REQUEST['num']) {
$query = "SELECT * FROM `{$TABLE_PREFIX}_accesslist` WHERE userNum = '" . mysql_escape($_REQUEST['num']) . "'";
$result = mysql_query($query) or die("MySQL Error: " . htmlencode(mysql_error()) . "\n");
while ($record = mysql_fetch_assoc($result)) {
$accessList[$record['tableName']] = $record;
}
}
// get section list
$sectionList = array();
foreach (getSchemaTables() as $tableName) {
$schema = loadSchema($tableName);
$allowedMenuTypes = array('single', 'multi', 'category', 'menugroup', 'link', 'custom');
if (!in_array(@$schema['menuType'], $allowedMenuTypes)) {
continue;
}
$thisMenu = array();
$thisMenu['menuName'] = htmlencode($schema['menuName']);
if (@$schema['menuType'] != 'menugroup') {
$thisMenu['menuName'] = ' ' . $thisMenu['menuName'];
}
if (@$schema['_indent']) {
$thisMenu['menuName'] = ' ' . $thisMenu['menuName'];
}
$thisMenu['menuOrder'] = $schema['menuOrder'];
$thisMenu['tableName'] = $tableName;
$thisMenu['menuType'] = $schema['menuType'];
array_push($sectionList, $thisMenu);
}
uasort($sectionList, '_sortMenusByOrder');
// sort menus by order value
// display field
$allAccessLevel = @$accessList['all']['accessLevel'];
$sectionsDivStyle = $allAccessLevel != 1 ? "display: none;" : '';
//
ob_start();
?>
<tr>
<td valign="top" style="padding-top: 2px"><?php
echo $this->label;
?>
</td>
<td>
<table border="0" cellspacing="1" cellpadding="0">
<thead>
<tr>
<th width="305"><?php
et('Section Name');
?>
</th>
<th width="115" style="text-align: center"><?php
et('Access');
?>
</th>
<th width="100" style="text-align: center"><?php
et('Max Records');
?>
</th>
</tr>
</thead>
<tr>
<td class="listRow listRowOdd"><?php
et('All Sections');
?>
</td>
<td class="listRow listRowOdd" style="text-align: center">
<select name="accessList[all][accessLevel]" style="width: 140px" onchange="(this.value=='1') ? $('.sectionAccessList').slideDown() : $('.sectionAccessList').slideUp();">
<option value="0" <?php
selectedIf($allAccessLevel, '0');
?>
><?php
et('None');
?>
</option>
<option value="3" <?php
selectedIf($allAccessLevel, '3');
?>
><?php
et('Viewer');
?>
</option>
<option value="6" <?php
selectedIf($allAccessLevel, '6');
?>
><?php
et('Author');
?>
</option>
<option value="7" <?php
selectedIf($allAccessLevel, '7');
?>
><?php
eht('Author & Viewer');
?>
</option>
//.........这里部分代码省略.........
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:101,代码来源:accessList.php
示例10: foreach
</b>
<?php
}
?>
</div>
<!-- upload fields -->
<br/>
<?php
if ($uploadsRemaining) {
?>
<?php
foreach (range(1, (int) min($uploadsRemaining, $maxUploadFields)) as $count) {
?>
<?php
et("Upload File");
?>
<input type="file" name="upload<?php
echo $count;
?>
" size="50" style="vertical-align: middle;" /><br />
<?php
}
?>
<?php
}
?>
<?php
printf(t("%s seconds"), showExecuteSeconds());
?>
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:31,代码来源:uploadForm.php
示例11: et
<div style="float:left">
<select class="listAdvancedCmds" name="do">
<option value=''><?php
et('Advanced Commands...');
?>
</option>
<option value=''> </option>
<option value="enableSystemFieldEditing"><?php
et('Enable System Field Editing');
?>
</option>
<option value="disableSystemFieldEditing"><?php
et('Disable System Field Editing');
?>
</option>
</select>
<input class="button" type="submit" name="_advancedActionSubmit" value=" <?php
echo t('go');
?>
" />
<br />
</div>
<div style="float:right">
<input class="button" type="submit" name="action=listTables" value="<< <?php
echo t('Back');
?>
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:29,代码来源:editTable.php
示例12: cg2_code_loadLibraries
function cg2_code_loadLibraries()
{
$libDirPath = $GLOBALS['PROGRAM_DIR'] . "/lib/";
$escapedLibDirPath = dirname(dirname($libDirPath));
$escapedLibDirPath = str_replace('\\', '\\\\', $escapedLibDirPath);
# escape \\ for UNC paths (eg: \\SERVER/www/index.php)
$programDirName = basename($GLOBALS['PROGRAM_DIR']);
?>
// load viewer library
$libraryPath = '<?php
echo $programDirName;
?>
/lib/viewer_functions.php';
$dirsToCheck = array('<?php
echo $escapedLibDirPath;
?>
/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("<?php
et("Couldn't load viewer library, check filepath in sourcecode.");
?>
"); }
<?php
}
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:25,代码来源:generator_functions.php
示例13: cg2_categorypage_ajaxJsCode
function cg2_categorypage_ajaxJsCode()
{
$ajaxUrl = "?menu=" . @$_REQUEST['menu'] . "&_generator=" . @$_REQUEST['_generator'] . "&_ajax=schemaFields";
?>
<script type="text/javascript">
$(document).ready(function() {
// register change event
$('select[name=tableName]').live('change', function() {
cg2_updateSchemaFieldPulldowns('defaultCategoryNum');
cg2_updateSchemaFieldPulldowns('rootCategoryNum');
});
});
//
function cg2_updateSchemaFieldPulldowns(fieldname) {
var tableName = $('select[name=tableName]').val(); // get tableName
var jSelector = 'select[name='+fieldname+']';
// show loading... for all pulldowns
$(jSelector).html("<option value=''><?php
et('loading...');
?>
</option>");
// load schema fields
var ajaxUrl = '<?php
echo $ajaxUrl;
?>
&tableName=' + tableName + '&fieldname=' + fieldname;
$.ajax({
url: ajaxUrl,
cache: false,
dataType: 'html',
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert("There was an error sending the request! (" + XMLHttpRequest['status'] + " " + XMLHttpRequest['statusText'] + ")\n" + errorThrown);
},
success: function(optionsHTML) {
console.log(fieldname);
if (optionsHTML != '' && !optionsHTML.match(/^<option/)) { return alert("Error loading field list!\n" + optionsHTML); }
$(jSelector).html(optionsHTML);
}
});
}
</script>
<?php
}
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:49,代码来源:categoryMenu.php
示例14: jsencode
echo jsencode(CMS_ASSETS_URL);
?>
"; }
else {
alert("phpConstant: Unknown constant name '" +cname+ "'!");
return '';
}
}
</script>
<body class="simpla">
<div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
<?php
include "lib/menus/sidebar.php";
?>
<div id="main-content"> <!-- Main Content Section with everything -->
<noscript> <!-- Show a notification if the user has disabled javascript -->
<div class="notification error png_bg">
<div><?php
et("Javascript is disabled or is not supported by your browser. Please upgrade your browser or enable Javascript to navigate the interface properly.");
?>
</div>
</div>
</noscript>
<?php
displayAlertsAndNotices();
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:31,代码来源:header.php
示例15: et
</a>
<?php
}
?>
<?php
}
?>
</div>
<div style="float: right">
<input class="button" type="submit" name="_action=uploadModify" value="<?php
et('Save');
?>
" />
<input class="button" type="button" onclick="self.parent.tb_remove()" value="<?php
et('Cancel');
?>
" />
</div>
<?php
printf(t("%s seconds"), showExecuteSeconds());
?>
</div>
</div>
</form>
</body>
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:31,代码来源:uploadModify.php
示例16: et
<form method="get" action="?" autocomplete="off">
<div class="content-box">
<div class="content-box-header">
<div style="float:right;"><input class="button" type="submit" name="null" value="<?php
et("Done");
?>
" /></div>
<h3>License Agreement</h3>
</div>
<div class="content-box-content">
<div class="tab-content default-tab">
<div class="contentBody">
<h4>Software License Agreement</h4>
<hr size="1" />
<p><b>IMPORTANT - READ CAREFULLY:</b> This License Agreement is a legal
agreement between You and Vendor. Read it carefully before completing the
installation process and using the Software. It provides a license to use the
Software and contains warranty information and liability disclaimers. <b>BY
INSTALLING, COPYING OR OTHERWISE USING THE SOFTWARE, YOU ARE CONFIRMING YOUR
ACCEPTANCE OF THE SOFTWARE AND AGREEING TO BECOME BOUND BY THE TERMS OF THIS
AGREEMENT. IF YOU DO NOT AGREE, DO NOT INSTALL OR USE THE PRODUCT.</b></p>
<p>The Software is owned by Vendor and/or its licensors and is protected by
copyright laws and international copyright treaties, as well as other
intellectual property laws and treaties. <b>THE SOFTWARE IS LICENSED, NOT
SOLD.</b></p>
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:30,代码来源:license.php
示例17: applyFilters
$advancedCommands['Erase selected'] = 'eraseRecords';
}
if ($CURRENT_USER['isAdmin']) {
$advancedCommands['Admin: Edit Section'] = 'editSection';
}
if ($CURRENT_USER['isAdmin']) {
$advancedCommands['Admin: Code Generator'] = '?menu=_codeGenerator&tableName=' . $GLOBALS['tableName'];
}
$advancedCommands = applyFilters('list_advancedCommands', $advancedCommands);
if ($advancedCommands) {
$labels = array_map('t', array_keys($advancedCommands));
// translate labels
?>
<select name="_advancedAction">
<option value=''><?php
et('Advanced Commands...');
?>
</option>
<option value=''> </option>
<?php
echo getSelectOptions(null, array_values($advancedCommands), $labels);
?>
</select>
<input name="_advancedActionSubmit" value=" go " class="button" type="submit" />
<br />
<?php
}
?>
</div>
<div style="float:right">
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:31,代码来源:list.php
示例18: upload_form
function upload_form()
{
global $_FILES, $current_dir, $dir_dest, $fechar, $quota_mb, $path_info;
$num_uploads = 5;
html_header();
echo "<body marginwidth=\"0\" marginheight=\"0\">";
if (count($_FILES) == 0) {
echo "\r\n <table height=\"100%\" border=0 cellspacing=0 cellpadding=2 align=center>\r\n <form name=\"upload_form\" action=\"" . $path_info["basename"] . "\" method=\"post\" ENCTYPE=\"multipart/form-data\">\r\n <input type=hidden name=dir_dest value=\"{$current_dir}\">\r\n <input type=hidden name=action value=10>\r\n <tr><th colspan=2>" . et('Upload') . "</th></tr>\r\n <tr><td align=right><b>" . et('Destination') . ":<td><b><nobr>{$current_dir}</nobr>";
for ($x = 0; $x < $num_uploads; $x++) {
echo "<tr><td width=1 align=right><b>" . et('File') . ":<td><nobr><input type=\"file\" name=\"file{$x}\"></nobr>";
$test_js .= "(document.upload_form.file{$x}.value.length>0)||";
}
echo "\r\n <input type=button value=\"" . et('Send') . "\" onclick=\"test_upload_form()\"></nobr>\r\n <tr><td> <td><input type=checkbox name=fechar value=\"1\"> <a href=\"JavaScript:troca();\">" . et('AutoClose') . "</a>\r\n <tr><td colspan=2> </td></tr>\r\n </form>\r\n </table>\r\n <script language=\"Javascript\" type=\"text/javascript\">\r\n <!--\r\n function troca(){\r\n if(document.upload_form.fechar.checked){document.upload_form.fechar.checked=false;}else{document.upload_form.fechar.checked=true;}\r\n }\r\n foi = false;\r\n function test_upload_form(){\r\n if(" . substr($test_js, 0, strlen($test_js) - 2) . "){\r\n if (foi) alert('" . et('SendingForm') . "...');\r\n else {\r\n foi = true;\r\n document.upload_form.submit();\r\n }\r\n } else alert('" . et('NoFileSel') . ".');\r\n }\r\n window.moveTo((window.screen.width-400)/2,((window.screen.height-200)/2)-20);\r\n //-->\r\n </script>";
} else {
$out = "<tr><th colspan=2>" . et('UploadEnd') . "</th></tr>\r\n <tr><th colspan=2><nobr>" . et('Destination') . ": {$dir_dest}</nobr>";
for ($x = 0; $x < $num_uploads; $x++) {
$temp_file = $_FILES["file" . $x]["tmp_name"];
$filename = $_FILES["file" . $x]["name"];
if (strlen($filename)) {
$resul = save_upload($temp_file, $filename, $dir_dest);
} else {
$resul = 7;
}
switch ($resul) {
case 1:
$out .= "<tr><td><b>" . str_zero($x + 1, 3) . ".<font color=green><b> " . et('FileSent') . ":</font><td>" . $filename . "</td></tr>\n";
break;
case 2:
$out .= "<tr><td colspan=2><font color=red><b>" . et('IOError') . "</font></td></tr>\n";
$x = $upload_num;
break;
case 3:
$out .= "<tr><td colspan=2><font color=red><b>" . et('SpaceLimReached') . " ({$quota_mb} Mb)</font></td></tr>\n";
$x = $upload_num;
break;
case 4:
$out .= "<tr><td><b>" . str_zero($x + 1, 3) . ".<font color=red><b> " . et('InvExt') . ":</font><td>" . $filename . "</td></tr>\n";
break;
case 5:
$out .= "<tr><td><b>" . str_zero($x + 1, 3) . ".<font color=red><b> " . et('FileNoOverw') . "</font><td>" . $filename . "</td></tr>\n";
break;
case 6:
$out .= "<tr><td><b>" . str_zero($x + 1, 3) . ".<font color=green><b> " . et('FileOverw') . ":</font><td>" . $filename . "</td></tr>\n";
break;
case 7:
$out .= "<tr><td colspan=2><b>" . str_zero($x + 1, 3) . ".<font color=red><b> " . et('FileIgnored') . "</font></td></tr>\n";
}
}
if ($fechar) {
echo "\r\n <script language=\"Javascript\" type=\"text/javascript\">\r\n <!--\r\n window.close();\r\n //-->\r\n </script>\r\n ";
} else {
echo "\r\n <table height=\"100%\" border=0 cellspacing=0 cellpadding=2 align=center>\r\n {$out}\r\n <tr><td colspan=2> </td></tr>\r\n </table>\r\n <script language=\"Javascript\" type=\"text/javascript\">\r\n <!--\r\n window.focus();\r\n //-->\r\n </script>\r\n ";
}
}
echo "</body>\n</html>";
}
开发者ID:ijustyce,项目名称:zblogphp,代码行数:56,代码来源:action.php
示例19: _showFormButtons
function _showFormButtons()
{
?>
<div style="float: right">
<input class="button" type="submit" name="save" value="<?php
et('Save');
?>
" /><!-- form saved via ajax on submit, see js file) -->
<input class="button" type="button" onclick="$('#saveAndCopy').val(1); $('form').submit();" value="<?php
echo eht('Save & Copy');
?>
" />
<input class="button" type="button" onclick="self.parent.tb_remove()" value="<?php
et('Cancel');
?>
" />
</div>
<?php
}
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:19,代码来源:editField.php
示例20: showPluginList
function showPluginList($listType)
{
global $ALL_PLUGINS;
// get list name
$listName = '';
if ($listType == 'active') {
$listName = 'Active Plugins';
} elseif ($listType == 'inactive') {
$listName = 'Inactive Plugins';
} elseif ($listType == 'system') {
$listName = 'System Plugins';
} else {
die("Unknown list type '" . htmlencode($listType) . "'");
}
// show plugin list
?>
<table cellspacing="0" class="data" style="overflow: scroll">
<thead>
<tr>
<th width="15%" style="white-space:nowrap;"><?php
et($listName);
?>
</th>
<th width="8%" style="text-align:center; padding: 0px 10px"><?php
et('Version');
?>
</th>
<th width="62%"><?php
et('Description');
?>
</th>
<th width="15%" style="text-align:center"><?php
et('Action');
?>
</th>
</tr>
</thead>
<?php
// list plugins
$pluginCount = 0;
foreach (array_values($ALL_PLUGINS) as $pluginData) {
if ($listType == 'system' && !@$pluginData['isSystemPlugin']) {
continue;
}
if ($listType != 'system' && @$pluginData['isSystemPlugin']) {
continue;
}
if ($listType == 'active' && !$pluginData['isActive']) {
continue;
}
if ($listType == 'inactive' && $pluginData['isActive']) {
continue;
}
$pluginCount++;
$bgColorClass = @$bgColorClass == "listRowOdd" ? 'listRowEven' : 'listRowOdd';
# rotate bgclass
_showPluginRow($listType, $bgColorClass, $pluginData);
}
?>
<?php
if (!$pluginCount) {
?>
<tr>
<td colspan="4" style="text-align: center; vertical-align: middle; height: 50px;">
<?php
?>
<?php
printf(t("There are currently no %s."), t($listName));
?>
<br/>
</td>
</tr>
<?php
}
?>
</table><br/><br/><br/>
<?php
}
开发者ID:afineedge,项目名称:thinkbeforeyoulaunch,代码行数:81,代码来源:plugins.php
注:本文中的et函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论