当前位置: 首页>>代码示例>>PHP>>正文


PHP adminPage::formtoken方法代码示例

本文整理汇总了PHP中adminPage::formtoken方法的典型用法代码示例。如果您正苦于以下问题:PHP adminPage::formtoken方法的具体用法?PHP adminPage::formtoken怎么用?PHP adminPage::formtoken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在adminPage的用法示例。


在下文中一共展示了adminPage::formtoken方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __

        echo '<p>' . __('No detail') . '</p>';
    } else {
        echo '<ul>';
        foreach ($file->media_meta as $k => $v) {
            if ((string) $v) {
                echo '<li><strong>' . $k . ':</strong> ' . html::escapeHTML($v) . '</li>';
            }
        }
        echo '</ul>';
    }
}
if ($file->editable && $core_media_writable) {
    if ($file->media_type == 'image') {
        echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Update thumbnails') . '</legend>' . '<p>' . __('This will create or update thumbnails for this image.') . '</p>' . '<p><input type="submit" name="thumbs" value="' . __('update thumbnails') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
    }
    if ($file->type == 'application/zip') {
        $inflate_combo = array(__('Extract in a new directory') => 'new', __('Extract in current directory') => 'current');
        echo '<form class="clear" id="file-unzip" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Extract archive') . '</legend>' . '<ul>' . '<li><strong>' . __('Extract in a new directory') . '</strong> : ' . __('This will extract archive in a new directory that should not exists yet.') . '</li>' . '<li><strong>' . __('Extract in current directory') . '</strong> : ' . __('This will extract archive in current directory and will overwrite existing files or directory.') . '</li>' . '</ul>' . '<p><label class="classic">' . __('Extract mode:') . ' ' . form::select('inflate_mode', $inflate_combo, 'new') . '</label> ' . '<input type="submit" name="unzip" value="' . __('c_c_action_extract') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
    }
    echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Change media properties') . '</legend>' . '<p class="field"><label>' . __('File name:') . '</label>' . form::text('media_file', 30, 255, html::escapeHTML($file->basename)) . '</p>' . '<p class="field"><label>' . __('File title:') . '</label>' . form::text('media_title', 30, 255, html::escapeHTML($file->media_title)) . '</p>' . '<p class="field"><label>' . __('File date:') . '</label>' . form::text('media_dt', 16, 16, html::escapeHTML($file->media_dtstr)) . '</p>' . '<p class="field"><label class="classic">' . form::checkbox('media_private', 1, $file->media_priv) . ' ' . __('Private') . '</label></p>' . '<p class="field"><label>' . __('New directory:') . '</label>' . form::select('media_path', $dirs_combo, dirname($file->relname)) . '</p>' . '<p><input type="submit" value="' . __('c_c_action_save') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
    echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post" enctype="multipart/form-data">' . '<fieldset><legend>' . __('Change file') . '</legend>' . '<div>' . form::hidden(array('MAX_FILE_SIZE'), OKT_MAX_UPLOAD_SIZE) . '</div>' . '<p class="field"><label for="upfile">' . __('Choose a file:') . '</label>' . '<input type="file" id="upfile" name="upfile" size="35" /></p>' . '<p class="note">' . sprintf(__('c_c_maximum_file_size_%s'), util::l10nFileSize(OKT_MAX_UPLOAD_SIZE)) . '</p>' . '<p><input type="submit" value="' . __('c_c_action_send') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
}
echo '</div>';
echo '</div>';
echo '</div>';
# Pied-de-page
if ($popup) {
    require OKT_ADMIN_FOOTER_SIMPLE_FILE;
} else {
    require OKT_ADMIN_FOOTER_FILE;
}
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:item.php

示例2: __

</td>
			<td class="<?php 
        echo $td_class;
        ?>
"><?php 
        echo $f->hasGUI() ? '<a href="' . html::escapeHTML($f->guiURL()) . '">' . __('m_antispam_Filter_configuration') . '</a>' : '&nbsp;';
        ?>
</td>
		</tr>
	<?php 
        $i++;
    }
    ?>

	</tbody></table>
	<p><?php 
    echo form::hidden('filters_order', '') . form::hidden('m', 'antispam') . adminPage::formtoken();
    ?>
	<input type="submit" name="filters_upd" value="<?php 
    _e('c_c_action_Save');
    ?>
" /></p>
	</fieldset></form>

<?php 
}
?>

<?php 
# Pied-de-page
require OKT_ADMIN_FOOTER_FILE;
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:admin.php

示例3: _e

}
?>
		</select></p>
	</div>

	<div id="uploader"><p><?php 
_e('m_galleries_plupload_update_or_change_browser');
?>
</p></div>

	<p><?php 
echo form::hidden('m', 'galleries');
?>
	<?php 
echo form::hidden('action', 'add_multiples');
?>
	<?php 
echo form::hidden('sended', 1);
?>
	<?php 
echo adminPage::formtoken();
?>
	<input type="submit" class="lazy-load" value="<?php 
_e('c_c_action_add');
?>
" /></p>
</form>

<?php 
# Pied-de-page
require OKT_ADMIN_FOOTER_FILE;
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:plupload.php

示例4: displayForms

 private function displayForms($url, $type, $title)
 {
     $res = '<h3>' . $title . '</h3>' . '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('m_antispam_Add_IP_address') . '</legend><p>' . form::hidden(array('ip_type'), $type) . form::text(array('addip'), 18, 255) . ' ';
     $res .= adminPage::formtoken() . '<input type="submit" value="' . __('c_c_action_Add') . '"/></p>' . '</fieldset></form>';
     $rs = $this->getRules($type);
     if ($rs->isEmpty()) {
         $res .= '<p><strong>' . __('m_antispam_No_IP_address_in_list') . '</strong></p>';
     } else {
         $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('m_antispam_IP_list') . '</legend>' . '<div style="' . $this->style_list . '">';
         while ($rs->fetch()) {
             $bits = explode(':', $rs->rule_content);
             $pattern = $bits[0];
             $ip = $bits[1];
             $bitmask = $bits[2];
             $p_style = $this->style_p;
             $res .= '<p style="' . $p_style . '"><label class="classic">' . form::checkbox(array('delip[]'), $rs->rule_id, false) . ' ' . html::escapeHTML($pattern) . '</label></p>';
         }
         $res .= '</div>' . '<p><input type="submit" value="' . __('c_c_action_Delete') . '"/>' . adminPage::formtoken() . form::hidden(array('ip_type'), $type) . '</p>' . '</fieldset></form>';
     }
     return $res;
 }
开发者ID:jewelhuq,项目名称:okatea,代码行数:21,代码来源:class.filter.ip.php

示例5: gui

 public function gui($url)
 {
     # Create list
     if (!empty($_POST['createlist'])) {
         try {
             $this->defaultWordsList();
             http::redirect($url . '&list=1');
         } catch (Exception $e) {
             $this->okt->error->set($e->getMessage());
         }
     }
     # Adding a word
     if (!empty($_POST['swa'])) {
         try {
             $this->addRule($_POST['swa']);
             http::redirect($url . '&added=1');
         } catch (Exception $e) {
             $okt->error->add($e->getMessage());
         }
     }
     # Removing spamwords
     if (!empty($_POST['swd']) && is_array($_POST['swd'])) {
         try {
             $this->removeRule($_POST['swd']);
             http::redirect($url . '&removed=1');
         } catch (Exception $e) {
             $okt->error->add($e->getMessage());
         }
     }
     /* DISPLAY
     		---------------------------------------------- */
     global $okt;
     $okt->page->messages->success('list', __('m_antispam_Words_successfully_added'));
     $okt->page->messages->success('added', __('m_antispam_Word_successfully_added'));
     $okt->page->messages->success('removed', __('m_antispam_Words_successfully_removed'));
     $res = '';
     $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('m_antispam_Add_word') . '</legend>' . '<p>' . form::text('swa', 20, 128) . ' ';
     $res .= adminPage::formtoken() . '<input type="submit" value="' . __('c_c_action_Add') . '"/></p>' . '</fieldset>' . '</form>';
     $rs = $this->getRules();
     if ($rs->isEmpty()) {
         $res .= '<p><strong>' . __('m_antispam_No_word_in_list') . '</strong></p>';
     } else {
         $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('m_antispam_List') . '</legend>' . '<div style="' . $this->style_list . '">';
         while ($rs->fetch()) {
             $disabled_word = false;
             $p_style = $this->style_p;
             $res .= '<p style="' . $p_style . '"><label class="classic">' . form::checkbox(array('swd[]'), $rs->rule_id, false) . ' ' . html::escapeHTML($rs->rule_content) . '</label></p>';
         }
         $res .= '</div>' . '<p>' . form::hidden(array('spamwords'), 1) . adminPage::formtoken() . '<input type="submit" value="' . __('m_antispam_Delete_selected_words') . '"/></p>' . '</fieldset></form>';
     }
     $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<p><input type="submit" value="' . __('m_antispam_Create_default_wordlist') . '" />' . form::hidden(array('spamwords'), 1) . form::hidden(array('createlist'), 1) . adminPage::formtoken() . '</p>' . '</form>';
     return $res;
 }
开发者ID:jewelhuq,项目名称:okatea,代码行数:53,代码来源:class.filter.words.php

示例6: array

        $aEditTabs[100] = array('id' => 'tab-change-password', 'title' => __('c_c_user_Password'), 'content' => '');
        $aEditTabs[100]['content'] = '<h3>Mot de passe</h3>

		<form action="module.php" method="post">
			<fieldset>
				<legend>' . __('m_users_Edit_password') . '</legend>
				<div class="two-cols">
					<p class="field col"><label for="edit_password">' . __('c_c_user_Password') . '</label>' . form::password('edit_password', 40, 255, html::escapeHTML($edit_password)) . '</p>

					<p class="field col"><label for="edit_password_confirm">' . __('c_c_auth_confirm_password') . '</label>' . form::password('edit_password_confirm', 40, 255, html::escapeHTML($edit_password_confirm)) . '</p>
				</div>
				<div class="two-cols">
					<p class="field col"><label>' . form::checkbox('send_password_mail', 1, 0) . ' ' . __('m_users_Alert_user_by_email') . '</label></p>
				</div>
			</fieldset>
			<p>' . form::hidden('change_password', 1) . form::hidden('m', 'users') . form::hidden('action', 'edit') . form::hidden('id', $aEditPageInfos['iUserId']) . adminPage::formtoken() . '<input type="submit" value="' . __('c_c_action_Edit') . '" /></p>
		</form>';
    }
}
# -- CORE TRIGGER : adminModUsersEditDisplayTabs
$okt->triggers->callTrigger('adminModUsersEditDisplayTabs', $okt, $aEditPageInfos, $aEditTabs);
$aEditTabs->ksort();
# En-tête
require OKT_ADMIN_HEADER_FILE;
?>

<?php 
# buttons set
echo $okt->page->getButtonSet('users');
?>
开发者ID:jewelhuq,项目名称:okatea,代码行数:30,代码来源:edit.php

示例7: __

    if (!$digest_is_readable) {
        echo '<p><span class="icon error"></span>' . __('c_a_update_digest_file_not_readable') . '</p>';
    }
    echo '<p><a href="' . $p_url . '&amp;update_db=1" class="icon database_refresh">' . __('c_a_update_database') . '</a></p>';
}
if (!empty($_GET['update_db'])) {
    echo $oChecklist->getHTML();
    if ($oChecklist->checkAll()) {
        echo '<p>' . __('c_a_update_database_successful') . ' ' . '<a href="' . $p_url . '">' . __('c_a_update_complete_update') . '</a></p>';
    } else {
        echo '<p><span class="icon error"></span> ' . __('c_a_update_database_blocking_errors_occurred') . '</p>';
    }
} elseif ($digest_is_readable && !$step) {
    if (empty($new_v)) {
        echo '<p><strong>' . __('c_a_update_no_newer_version_available') . '</strong></p>';
    } else {
        echo '<p class="static-msg">' . sprintf(__('c_a_update_okatea_%s_available'), $new_v) . '</p>' . '<p>' . __('c_a_update_to_upgrade_instructions') . '</p>' . '<form action="configuration.php" method="get">' . '<p><label for="do_not_check">' . form::checkbox('do_not_check', 1, false) . __('c_a_update_do_not_check_file_integrity') . '</label></p>' . '<p><input type="hidden" name="step" value="check" />' . '<input type="hidden" name="action" value="update" />' . '<input type="submit" class="lazy-load" value="' . __('c_a_update_action') . '" /></p>' . '</form>';
    }
    if (!empty($archives)) {
        echo '<h3>' . __('c_a_update_backup_files') . '</h3>' . '<p>' . __('c_a_update_backup_instructions') . '</p>';
        echo '<form action="configuration.php" method="post">';
        foreach ($archives as $v) {
            echo '<p><label class="classic">' . form::radio(array('backup_file'), html::escapeHTML($v)) . ' ' . html::escapeHTML($v) . '</label></p>';
        }
        echo '<p><strong>' . __('c_a_update_backup_warning') . '</strong> ' . sprintf(__('c_a_update_should_not_revert_prior_%s'), end($archives)) . '</p>' . '<p><input type="submit" name="b_del" value="' . __('c_a_update_delete_selected_file') . '" /> ' . '<input type="submit" name="b_revert" class="lazy-load" value="' . __('c_a_update_revert_selected_file') . '" />' . '<input type="hidden" name="action" value="update" />' . adminPage::formtoken() . '</p>' . '</form>';
    }
} elseif ($step == 'done' && !$okt->error->hasError()) {
    echo '<p class="message">' . __('c_a_update_congratulations') . ' <strong><a href="' . $p_url . '">' . __('c_a_update_finish') . '</a></strong>' . '</p>';
}
# Pied-de-page
require OKT_ADMIN_FOOTER_FILE;
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:update.php

示例8: mediaItemLine

    if ($pager->getNbPages() > 1) {
        echo '<ul class="pagination">' . $pager->getLinks() . '</ul>';
    }
    for ($i = $pager->index_start, $j = 0; $i <= $pager->index_end; $i++, $j++) {
        echo mediaItemLine($items[$i], $j);
    }
    echo '<div class="clearer"></div>';
    if ($pager->getNbPages() > 1) {
        echo '<ul class="pagination">' . $pager->getLinks() . '</ul>';
    }
    echo '</div>';
}
if ($core_media_writable) {
    echo '<div class="two-cols">';
    echo '<div class="col"><h3 id="add-file">' . __('Add files') . '</h3>' . '<form id="media-upload" action="' . html::escapeURL($page_url) . '" method="post" enctype="multipart/form-data">' . '<div>' . form::hidden(array('MAX_FILE_SIZE'), OKT_MAX_UPLOAD_SIZE) . adminPage::formtoken() . '</div>' . '<fieldset id="add-file-f">' . '<p class="field"><label for="upfile">' . __('Choose a file:') . '</label>' . '<input type="file" name="upfile" id="upfile" size="20" /></p>' . '<p class="note">' . sprintf(__('c_c_maximum_file_size_%s'), util::l10nFileSize(OKT_MAX_UPLOAD_SIZE)) . '</p>' . '<p class="field"><label for="upfiletitle">' . __('Title:') . '</label>' . form::text('upfiletitle', 35, 255) . '</p>' . '<p class="field"><label>' . form::checkbox(array('upfilepriv'), 1) . ' ' . __('Private') . '</label></p>' . '<p><input type="submit" value="' . __('c_c_action_send') . '" />' . form::hidden(array('d'), $d) . '</p>' . '</fieldset>' . '</form>' . '<p class="note">' . __('Please take care to publish media that you own and that are not protected by copyright.') . '</p>' . '</div>';
    echo '<div class="col"><h3 id="new-dir">' . __('New directory') . '</h3>' . '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset id="new-dir-f">' . adminPage::formtoken() . '<p class="field"><label for="newdir">' . __('Directory Name:') . '</label>' . form::text('newdir', 35, 255) . '</p>' . '<p><input type="submit" value="' . __('c_c_action_save') . '" />' . form::hidden(array('d'), html::escapeHTML($d)) . '</p>' . '</fieldset>' . '</form></div>';
    echo '</div>';
}
# Get zip directory
if ($okt->checkPerm('media_admin')) {
    echo '<p><a href="' . html::escapeURL($page_url) . '&amp;zipdl=1" class="icon package">' . __('Download this directory as a zip file') . '</a></p>';
}
# Pied-de-page
if ($popup) {
    require OKT_ADMIN_FOOTER_SIMPLE_FILE;
} else {
    require OKT_ADMIN_FOOTER_FILE;
}
/* ----------------------------------------------------- */
function mediaItemLine($f, $i)
{
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:index.php


注:本文中的adminPage::formtoken方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。