本文整理汇总了PHP中getFormToken函数 的典型用法代码示例。如果您正苦于以下问题:PHP getFormToken函数的具体用法?PHP getFormToken怎么用?PHP getFormToken使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getFormToken函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: flv_player_cleanup
function flv_player_cleanup($action)
{
$superCage = Inspekt::makeSuperCage();
$cleanup = $superCage->server->getEscaped('REQUEST_URI');
if ($action == 1) {
global $lang_common;
list($timestamp, $form_token) = getFormToken();
echo <<<EOT
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tableb">
Playback of existing flv files won't work anymore!
</td>
<td class="tableb">
<form action="pluginmgr.php" method="post">
<input type="submit" name="submit" value="{$lang_common['back']}" class="button" />
</form>
</td>
<td class="tableb">
<form action="{$cleanup}" method="post">
<input type="hidden" name="drop" value="1" />
<input type="hidden" name="form_token" value="{$form_token}" />
<input type="hidden" name="timestamp" value="{$timestamp}" />
<input type="submit" name="submit" value="{$lang_common['continue']}" class="button" />
</form>
</td>
</tr>
</table>
EOT;
}
}
开发者ID:phill104, 项目名称:branches, 代码行数:31, 代码来源:codebase.php
示例2: online_configure
function online_configure()
{
global $lang_plugin_php, $CONFIG, $lang_common, $lang_pluginmgr_php, $lang_admin_php, $icon_array;
$superCage = Inspekt::makeSuperCage();
if (!defined('ADMIN_PHP')) {
defined('ADMIN_PHP');
}
$action = $superCage->server->getEscaped('REQUEST_URI');
$matches = $superCage->post->getMatched('main_page_layout', '/^[0-9a-z,\\/]{1,}$/');
$contentOfTheMainpage_array = explode('/', $matches[0]);
if (in_array('onlinestats', $contentOfTheMainpage_array) == TRUE) {
// We have a winner
}
$icon_array['ok'] = cpg_fetch_icon('ok', 2);
$icon_array['config'] = cpg_fetch_icon('config', 2);
if (isset($CONFIG['mod_updates_duration']) != TRUE) {
$CONFIG['mod_updates_duration'] = 10;
}
list($timestamp, $form_token) = getFormToken();
echo <<<EOT
<form action="{$action}" method="post" name="onlinestats_configure">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="tableb" width="50%">
{$lang_plugin_php['onlinestats_config_text']}
</td>
<td class="tableb" width="50%">
<input size="2" type="text" name="duration" value="{$CONFIG['mod_updates_duration']}" class="textinput" />
{$lang_plugin_php['onlinestats_minute']}
</td>
</tr>
<tr>
<td class="tableb tableb_alternate">
{$lang_admin_php['main_page_layout']}
</td>
<td class="tableb tableb_alternate">
<input type="text" size="50" maxlength="250" class="textinput" style="width:90%" name="main_page_layout" id="main_page_layout" value="{$CONFIG['main_page_layout']}" />
</td>
</tr>
<tr>
<td class="tablef">
</td>
<td class="tablef">
<button type="submit" class="button" name="submit" value="{$lang_common['go']}">{$icon_array['ok']}{$lang_common['go']}</button>
<input type="hidden" name="form_token" value="{$form_token}" />
<input type="hidden" name="timestamp" value="{$timestamp}" />
</td>
</tr>
</table>
</form>
EOT;
}
开发者ID:JoseCOCA, 项目名称:baudprint, 代码行数:52, 代码来源:codebase.php
示例3: external_tracker_cleanup
function external_tracker_cleanup($action)
{
global $CONFIG, $lang_common, $lang_plugin_external_tracker;
require_once 'plugins/external_tracker/include/init.inc.php';
$superCage = Inspekt::makeSuperCage();
$form_action = $superCage->server->getEscaped('REQUEST_URI');
if ($action == '1') {
list($timestamp, $form_token) = getFormToken();
$help_icon = '<img src="images/help.gif" width="13" height="11" border="0" alt="" />';
echo <<<EOT
<form action="{$form_action}" method="post">
<p>
{$lang_plugin_external_tracker['clean_up_question']} <a href="plugins/external_tracker/docs/{$doc_lng}.html?hide_nav=1#uninstall" class="greybox" title="{$lang_plugin_external_tracker['help']}">{$help_icon}</a>
</p>
<div style="margin:25;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="radio" name="remove" value="1" /></td>
<td>{$lang_common['yes']}</td>
</tr>
<tr>
<td><input type="radio" name="remove" checked="checked" value="0" /></td>
<td>{$lang_common['no']}</td>
</tr>
</table>
</div>
<br />
<span>
<input type="hidden" name="form_token" value="{$form_token}" />
<input type="hidden" name="timestamp" value="{$timestamp}" />
<input type="submit" name="submit" class="button" value="{$lang_common['continue']}" />
<input type="button" name="cancel" class="button" onClick="window.location='pluginmgr.php';" value="{$lang_common['back']}" />
</span>
</form>
EOT;
}
}
开发者ID:phill104, 项目名称:branches, 代码行数:37, 代码来源:codebase.php
示例4: theme_html_comments
function theme_html_comments($pid)
{
global $CONFIG, $USER, $CURRENT_ALBUM_DATA, $lang_date, $HTML_SUBST, $THEME_DIR;
global $template_image_comments, $template_add_your_comment, $lang_display_comments, $lang_common, $REFERER, $lang_bbcode_help_title, $lang_bbcode_help;
$superCage = Inspekt::makeSuperCage();
$template_add_your_comment = CPGPluginAPI::filter('theme_add_comment', $template_add_your_comment);
$template_image_comments = CPGPluginAPI::filter('theme_edit_comment', $template_image_comments);
list($timestamp, $form_token) = getFormToken();
$html = '';
//report to moderator buttons
if (!($CONFIG['report_post'] == 1 && USER_CAN_SEND_ECARDS)) {
template_extract_block($template_image_comments, 'report_comment_button');
}
if (!$CONFIG['enable_smilies']) {
$tmpl_comment_edit_box = template_extract_block($template_image_comments, 'edit_box_no_smilies', '{EDIT}');
template_extract_block($template_image_comments, 'edit_box_smilies');
template_extract_block($template_add_your_comment, 'input_box_smilies');
} else {
$tmpl_comment_edit_box = template_extract_block($template_image_comments, 'edit_box_smilies', '{EDIT}');
template_extract_block($template_image_comments, 'edit_box_no_smilies');
template_extract_block($template_add_your_comment, 'input_box_no_smilies');
}
$tmpl_comments_buttons = template_extract_block($template_image_comments, 'buttons', '{BUTTONS}');
$tmpl_comments_ipinfo = template_extract_block($template_image_comments, 'ipinfo', '{IPINFO}');
if ($CONFIG['comments_sort_descending'] == 1) {
$comment_sort_order = 'DESC';
} else {
$comment_sort_order = 'ASC';
}
$result = cpg_db_query("SELECT COUNT(msg_id) FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='{$pid}'");
list($num) = mysql_fetch_row($result);
if ($num) {
$limit = $CONFIG['comments_per_page'];
$max = ceil($num / $limit);
if ($superCage->get->keyExists('page')) {
$page = $superCage->get->getInt('page');
$page = min($page, $max);
$page = max(0, $page);
} else {
if ($CONFIG['comments_sort_descending'] == 1) {
$page = 1;
} else {
$page = $max;
}
}
$start = max(0, $num - ($max - ($page - 1)) * $limit);
$location = defined('THEME_HAS_COMMENT_GRAPHICS') ? $THEME_DIR : '';
ob_start();
echo '<br />';
starttable();
echo '<tr><td class="tableh2"><div style="float: left">' . $lang_display_comments['comment'] . ' ' . sprintf($lang_display_comments['comment_x_to_y_of_z'], $start + 1, min($num, $start + $limit), $num) . '</div>';
echo '<div style="float: right">' . $lang_display_comments['page'] . ': ';
$links = array();
for ($i = 1; $i <= $max; $i++) {
if ($i < 5 || $i > $max - 5 || $i > $page - 5 && $i < $page + 5) {
$links[$i] = '<a href="displayimage.php?pid=' . $pid . '&page=' . $i . '#comments_top">' . $i . '</a>';
}
}
$links[$page] = "<b>{$page}</b>";
echo implode(' - ', $links);
echo '</div></td></tr>';
endtable();
echo '<br />';
$html .= $tabs = ob_get_clean();
$result = cpg_db_query("SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid, approval FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='{$pid}' ORDER BY msg_id {$comment_sort_order} LIMIT {$start}, {$limit}");
while ($row = mysql_fetch_assoc($result)) {
// while-loop start
$user_can_edit = GALLERY_ADMIN_MODE || USER_ID && USER_ID == $row['author_id'] && USER_CAN_POST_COMMENTS || !USER_ID && USER_CAN_POST_COMMENTS && $USER['ID'] == $row['author_md5_id'];
if ($user_can_edit != '' && $CONFIG['comment_user_edit'] != 0 || GALLERY_ADMIN_MODE) {
$comment_buttons = $tmpl_comments_buttons;
$comment_edit_box = $tmpl_comment_edit_box;
} else {
$comment_buttons = '';
$comment_edit_box = '';
}
$comment_ipinfo = $row['msg_raw_ip'] && GALLERY_ADMIN_MODE ? $tmpl_comments_ipinfo : '';
$hide_comment = 0;
// comment approval
$pending_approval = '';
if (USER_IS_ADMIN) {
//display the selector approve/disapprove
if ($row['approval'] == 'NO') {
$pending_approval = '<img src="' . $location . 'images/icons/comment_disapprove_disabled.png" border="0" alt="" width="16" height="16" class="icon" /><a href="reviewcom.php?pos=-{PID}&msg_id={MSG_ID}&form_token={FORM_TOKEN}&timestamp={TIMESTAMP}&what=approve" title="' . $lang_display_comments['approve'] . '"><img src="' . $location . 'images/icons/comment_approve.png" border="0" alt="" width="16" height="16" class="icon" /></a>';
} else {
$pending_approval = '<a href="reviewcom.php?pos=-{PID}&msg_id={MSG_ID}&form_token={FORM_TOKEN}&timestamp={TIMESTAMP}&what=disapprove" title="' . $lang_display_comments['disapprove'] . '"><img src="' . $location . 'images/icons/comment_disapprove.png" border="0" alt="" width="16" height="16" class="icon" /></a><img src="' . $location . 'images/icons/comment_approve_disabled.png" border="0" alt="" width="16" height="16" class="icon" />';
}
} else {
// user or guest is logged in - start
if ($row['approval'] == 'NO') {
// the comment is not approved - start
if ($user_can_edit) {
// the comment comes from the current visitor, display it with a warning that it needs admin approval
$pending_approval = '<img src="' . $location . 'images/icons/comment_approval.png" border="0" alt="" width="16" height="16" title="' . $lang_display_comments['pending_approval'] . '" class="icon" />';
} else {
// the comment comes from someone else - don't display it at all
if ($CONFIG['comment_placeholder'] == 0) {
$hide_comment = 1;
} else {
$row['msg_author'] = $lang_display_comments['unapproved_comment'];
$row['msg_body'] = $lang_display_comments['pending_approval_message'];
//.........这里部分代码省略.........
开发者ID:CatBerg-TestOrg, 项目名称:coppermine_1.6.x, 代码行数:101, 代码来源:theme.php
示例5: social_bookmarks_configure
//.........这里部分代码省略.........
$option_output['plugin_social_bookmarks_greyout'] = '';
} else {
$option_output['plugin_social_bookmarks_greyout'] = 'checked="checked"';
}
if ($CONFIG['plugin_social_bookmarks_layout'] == '0') {
$option_output['plugin_social_bookmarks_layout_simple_list'] = 'checked="checked"';
$option_output['plugin_social_bookmarks_layout_advanced_list'] = '';
$option_output['plugin_social_bookmarks_layout_icons_only'] = '';
} elseif ($CONFIG['plugin_social_bookmarks_layout'] == '1') {
//
$option_output['plugin_social_bookmarks_layout_simple_list'] = '';
$option_output['plugin_social_bookmarks_layout_advanced_list'] = 'checked="checked"';
$option_output['plugin_social_bookmarks_layout_icons_only'] = '';
} elseif ($CONFIG['plugin_social_bookmarks_layout'] == '2') {
//
$option_output['plugin_social_bookmarks_layout_simple_list'] = '';
$option_output['plugin_social_bookmarks_layout_advanced_list'] = '';
$option_output['plugin_social_bookmarks_layout_icons_only'] = 'checked="checked"';
}
if ($CONFIG['plugin_social_bookmarks_smart_language'] == '0') {
$option_output['plugin_social_bookmarks_smart_language'] = '';
} else {
$option_output['plugin_social_bookmarks_smart_language'] = 'checked="checked"';
}
if ($CONFIG['plugin_social_bookmarks_admin_menu'] == '0') {
$option_output['plugin_social_bookmarks_admin_menu'] = '';
} else {
$option_output['plugin_social_bookmarks_admin_menu'] = 'checked="checked"';
}
// Create the table row that is displayed during initial install
if ($social_bookmarks_installation == 1) {
$additional_submit_information = '<div class="cpg_message_info">' . $lang_plugin_social_bookmarks['submit_to_install'] . '</div>';
}
list($timestamp, $form_token) = getFormToken();
// Start the actual output
echo <<<EOT
<form action="" method="post" name="social_bookmarks_config" id="social_bookmarks_config">
EOT;
starttable('100%', $social_bookmarks_icon_array['configure'] . $lang_plugin_social_bookmarks['config'], 3);
echo <<<EOT
<tr>
<td valign="top" class="tableh2" colspan="3">
{$lang_plugin_social_bookmarks['site_integration']}
</td>
</tr>
<tr>
<td valign="top" class="tableb" rowspan="4">
{$lang_plugin_social_bookmarks['position_of_button']}
</td>
<td valign="top" class="tableb">
<input type="radio" name="plugin_social_bookmarks_position" id="plugin_social_bookmarks_position_placeholder_token" class="radio" value="0" {$option_output['plugin_social_bookmarks_position_placeholder_token']} />
</td>
<td valign="top" class="tableb">
\t<label for="plugin_social_bookmarks_position_placeholder_token" class="clickable_option">
\t {$lang_plugin_social_bookmarks['placeholder_token']} ({$lang_plugin_social_bookmarks['placeholder_token_explain1']})
\t <br />
\t <span class="album_stat">
\t {$lang_plugin_social_bookmarks['placeholder_token_explain2']}
\t </span>
\t</label>
</td>
</tr>
<tr>
<td valign="top" class="tableb">
<input type="radio" name="plugin_social_bookmarks_position" id="plugin_social_bookmarks_position_content_of_main_page" class="radio" value="1" {$option_output['plugin_social_bookmarks_position_content_of_main_page']} />
</td>
开发者ID:phill104, 项目名称:branches, 代码行数:67, 代码来源:codebase.php
示例6: html5_display_upload_form
function html5_display_upload_form($upload_settings)
{
global $CONFIG, $USER_DATA, $lang_common, $lang_upload_php, $lang_plugin_html5upload, $icon_array, $h5a_upload, $lang_bbcode_help_title, $lang_bbcode_help;
list($upload_form, $upload_select) = $upload_settings;
if ($upload_form != 'html5_upload') {
return $upload_settings;
}
$plugpath = 'plugins/html5upload';
$grpn = USER_ID > 0 ? (int) $USER_DATA['group_id'] : 0;
$grpc = $grpn ? $grpn : '';
$cfg = isset($CONFIG['html5upload_config' . $grpc]) ? unserialize($CONFIG['html5upload_config' . $grpc]) : unserialize($CONFIG['html5upload_config']);
$maxfilesizebytes = $cfg['upldsize'] ? max($cfg['upldsize'], $h5a_upload->sys_max_upl_size) : $h5a_upload->sys_max_upl_size;
$maxfilesize = sprintf($lang_upload_php['max_fsize'], $h5a_upload->to_KMG($maxfilesizebytes));
list($timestamp, $form_token) = getFormToken(time() + 14400);
//allow up to 4 hours for upload to complete
set_js_var('timestamp', $timestamp - 14400);
//subtract those 4 hours so edits happen correctly
set_js_var('concurrent', $cfg['concurrent']);
set_js_var('autoedit', $cfg['autoedit']);
set_js_var('user_id', USER_ID);
set_js_var('guest_edit', $CONFIG['allow_guests_enter_file_details']);
set_js_var('H5uPath', "{$plugpath}/");
set_js_var('maxfilesize', $maxfilesizebytes);
set_js_var('maxchunksize', $h5a_upload->sys_max_chnk_size);
set_js_var('fup_payload', array('event' => 'picture', 'process' => 1, 'form_token' => $form_token, 'timestamp' => $timestamp, 'MFU' => 1));
set_js_var('h5uM', array('selAlb' => $lang_plugin_html5upload['albmSelMsg'], 'aborted' => $lang_plugin_html5upload['aborted'], 'type_err' => $lang_plugin_html5upload['type_err'], 'size_err' => $lang_plugin_html5upload['size_err'], 'extallow' => $lang_plugin_html5upload['extallow'], 'q_stop' => $lang_plugin_html5upload['q_stop'], 'q_go' => $lang_plugin_html5upload['q_resume'], 'q_can' => $lang_plugin_html5upload['q_cancel']));
$allowed_types = array_merge(explode('/', $CONFIG['allowed_img_types']), explode('/', $CONFIG['allowed_mov_types']), explode('/', $CONFIG['allowed_snd_types']), explode('/', $CONFIG['allowed_doc_types']));
set_js_var('allowed_file_types', $allowed_types);
// include the javascript upload engine (minified unless in debug mode)
$jsv = $CONFIG['debug_mode'] == 1 || $CONFIG['debug_mode'] == 2 && GALLERY_ADMIN_MODE ? '' : '.min';
js_include('plugins/html5upload/js/upload' . $jsv . '.js');
// add our style sheet
$h5up_meta = '<link rel="stylesheet" href="plugins/html5upload/css/upload.css" type="text/css" />';
pageheader($lang_plugin_html5upload['title'], $h5up_meta);
$upload_help = $h5a_upload->help_button('use');
$upload_table_header = <<<EOT
\t<table border="0" cellspacing="0" cellpadding="0" width="100%">
\t\t<tr>
\t\t\t<td>
\t\t\t\t{$icon_array['upload']}{$lang_plugin_html5upload['upldfiles']}{$upload_help}
\t\t\t</td>
\t\t\t<td style="text-align:right">
\t\t\t\t<span id="upload_method_selector">{$upload_select}</span>
\t\t\t</td>
\t\t</tr>
\t</table>
EOT;
starttable('100%', $upload_table_header, 2);
echo '<tr><td colspan="2" class="tableb tableb_alternate"><strong>' . $maxfilesize . '</strong></td></tr>';
form_alb_list_box($lang_common['album'], 'h5u_album');
echo <<<EOT
\t<tr id="navailrow" style="text-align:center;background-color:yellow;display:none">
\t\t<td colspan="2">{$lang_plugin_html5upload['notavail']}</td>
\t</tr>
\t<tr class="H5upV">
\t\t<td class="tableb" width="30%">{$lang_plugin_html5upload['flistitl']}</td>
\t\t<td class="tableb"><input type="checkbox" id="flistitl" onchange="shide_titlrow(this);" /></td>
\t</tr>
EOT;
if (USER_ID > 0 || $CONFIG['allow_guests_enter_file_details'] == 1) {
if ($cfg['enabtitl']) {
echo '<tr id="titlrow"><td class="tableb">' . $lang_upload_php['pic_title'] . '</td><td class="tableb"><input type="text" name="title" id="title" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
if ($cfg['enabdesc']) {
$desclabl = $lang_upload_php['description'];
if ($CONFIG['show_bbcode_help']) {
$desclabl .= ' ' . cpg_display_help('f=empty.htm&base=64&h=' . urlencode(base64_encode(serialize($lang_bbcode_help_title))) . '&t=' . urlencode(base64_encode(serialize($lang_bbcode_help))), 470, 245);
}
echo '<tr><td class="tableb">' . $desclabl . '</td><td class="tableb"><textarea name="caption" rows="2" id="caption" class="textinput" style="width:90%" /></textarea></td></tr>';
}
if ($cfg['enabkeys']) {
$keywordLabel = sprintf($lang_common['keywords_insert1'], $lang_common['keyword_separators'][$CONFIG['keyword_separator']]) . '<br /><a href="keyword_select.php" class="greybox">' . $lang_common['keywords_insert2'] . '</a>';
echo '<tr><td class="tableb">' . $keywordLabel . '</td><td class="tableb"><input type="text" name="keywords" id="keywords" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
if ($cfg['enabusr1'] && !empty($CONFIG['user_field1_name'])) {
echo '<tr><td class="tableb">' . $CONFIG['user_field1_name'] . '</td><td class="tableb"><input type="text" name="user1" id="user1" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
if ($cfg['enabusr2'] && !empty($CONFIG['user_field2_name'])) {
echo '<tr><td class="tableb">' . $CONFIG['user_field2_name'] . '</td><td class="tableb"><input type="text" name="user2" id="user2" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
if ($cfg['enabusr3'] && !empty($CONFIG['user_field3_name'])) {
echo '<tr><td class="tableb">' . $CONFIG['user_field3_name'] . '</td><td class="tableb"><input type="text" name="user3" id="user3" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
if ($cfg['enabusr4'] && !empty($CONFIG['user_field4_name'])) {
echo '<tr><td class="tableb">' . $CONFIG['user_field4_name'] . '</td><td class="tableb"><input type="text" name="user4" id="user4" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
}
}
$acptmime = $cfg['acptmime'] ? "accept=\"{$cfg['acptmime']}\"" : '';
echo <<<EOT
\t<tr id="h5upldrow">
\t\t<td class="tableb">{$lang_plugin_html5upload['files']}</td>
\t\t<td class="tableb" style="padding:1em">
\t\t\t<div style="width:480px">
\t\t\t\t<input type="file" name="userpictures" id="upload_field" multiple="multiple" {$acptmime}/>
\t\t\t\t <br />
\t\t\t\t<div id="dropArea">{$lang_plugin_html5upload['drop_files']}</div>
\t\t\t\t <br />
\t\t\t\t<div id="progress_report" style="position:relative">
\t\t\t\t\t<div id="progress_report_name"></div>
\t\t\t\t\t<div id="progress_report_status" style="font-style: italic;"></div>
//.........这里部分代码省略.........
开发者ID:CatBerg-TestOrg, 项目名称:coppermine, 代码行数:101, 代码来源:codebase.php
示例7: endtable
EOT;
endtable();
echo '<br />';
}
echo '<form action="index.php?file=limit_upload/admin" method="post">';
starttable("100%", $lang_plugin_limit_upload['limit_upload'] . " - " . $lang_gallery_admin_menu['admin_lnk'], 3);
$upload_limit = mysql_result(cpg_db_query("SELECT value FROM {$CONFIG['TABLE_CONFIG']} WHERE name = 'limit_upload_upload_limit'"), 0);
$time_limit = mysql_result(cpg_db_query("SELECT value FROM {$CONFIG['TABLE_CONFIG']} WHERE name = 'limit_upload_time_limit'"), 0);
foreach ($lang_plugin_limit_upload['upload_limit_values'] as $key => $value) {
$selected = $time_limit == $key ? 'selected="selected"' : '';
$time_limit_options .= "<option value=\"{$key}\" {$selected}>{$value}</option>";
}
$submit_icon = cpg_fetch_icon('ok', 1);
echo <<<EOT
<tr>
<td class="tableb">
{$lang_plugin_limit_upload['upload_limit']}
</td>
<td class="tableb">
<input type="input" class="listbox" size="5" name="upload_limit" id="plugin_limit_upload_files" value="{$upload_limit}" /> <select class="listbox" name="time_limit">{$time_limit_options}</select>
</td>
<td class="tableb">
<button value="{$lang_common['apply_changes']}" name="submit" class="button" type="submit">{$submit_icon}{$lang_common['apply_changes']}</button>
</td>
</tr>
EOT;
endtable();
list($timestamp, $form_token) = getFormToken();
echo "<input type=\"hidden\" name=\"form_token\" value=\"{$form_token}\" />";
echo "<input type=\"hidden\" name=\"timestamp\" value=\"{$timestamp}\" />";
pagefooter();
开发者ID:phill104, 项目名称:branches, 代码行数:31, 代码来源:admin.php
示例8: display_cat_list
function display_cat_list()
{
global $CAT_LIST, $CONFIG, $lang_catmgr_php, $lang_common, $CPG_PHP_SELF, $LINEBREAK;
$CAT_LIST3 = $CAT_LIST;
$loop_counter = 0;
list($timestamp, $form_token) = getFormToken();
$form_token = "&form_token={$form_token}&timestamp={$timestamp}";
foreach ($CAT_LIST3 as $key => $category) {
if ($category['cid'] == 0) {
continue;
}
if ($loop_counter == 0) {
$row_style_class = 'tableb';
} else {
$row_style_class = 'tableb tableb_alternate';
}
$loop_counter++;
if ($loop_counter > 1) {
$loop_counter = 0;
}
echo ' <tr>' . $LINEBREAK;
echo ' <td class="' . $row_style_class . '" width="80%"><strong>' . $category['name'] . '</strong></td>' . $LINEBREAK;
if ($category['pos'] > 0 && $CONFIG['categories_alpha_sort'] != 1) {
echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $CPG_PHP_SELF . '?op=movetop&cid1=' . $category['cid'] . '&pos1=' . $category['pos'] . $form_token . '" class="rounded_menu"><span>' . cpg_fetch_icon('upup', 0, $lang_common['move_top']) . '</span></a></td>' . $LINEBREAK;
echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $CPG_PHP_SELF . '?op=move&cid1=' . $category['cid'] . '&pos1=' . ($category['pos'] - 1) . '&cid2=' . $category['prev'] . '&pos2=' . $category['pos'] . $form_token . '" class="rounded_menu"><span>' . cpg_fetch_icon('up', 0, $lang_common['move_up']) . '</span></a></td>' . $LINEBREAK;
} else {
echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . $LINEBREAK;
echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . $LINEBREAK;
}
if ($category['pos'] < $CAT_LIST[$category['parent']]['cat_count'] - 1 && $CONFIG['categories_alpha_sort'] != 1) {
echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $CPG_PHP_SELF . '?op=move&cid1=' . $category['cid'] . '&pos1=' . ($category['pos'] + 1) . '&cid2=' . $category['next'] . '&pos2=' . $category['pos'] . $form_token . '" class="rounded_menu"><span>' . cpg_fetch_icon('down', 0, $lang_common['move_down']) . '</span></a></td>' . $LINEBREAK;
echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $CPG_PHP_SELF . '?op=movebottom&cid1=' . $category['cid'] . '&pos1=' . $category['pos'] . $form_token . '" class="rounded_menu"><span>' . cpg_fetch_icon('downdown', 0, $lang_common['move_bottom']) . '</span></a></td>' . $LINEBREAK;
} else {
echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . $LINEBREAK;
echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . $LINEBREAK;
}
if ($category['cid'] != 1) {
echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $CPG_PHP_SELF . '?op=deletecat&cid=' . $category['cid'] . $form_token . '" onclick="return confirmDel(\'' . addslashes(str_replace(' ', '', $category['name'])) . '\')" class="rounded_menu"><span>' . cpg_fetch_icon('delete', 0, $lang_common['delete']) . '</span></a></td>' . $LINEBREAK;
} else {
echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . $LINEBREAK;
}
echo ' <td class="' . $row_style_class . '" width="4%">' . '<a href="' . $CPG_PHP_SELF . '?op=editcat&cid=' . $category['cid'] . $form_token . '" class="rounded_menu"><span>' . cpg_fetch_icon('edit', 0, $lang_common['edit']) . '</span></a></td>' . $LINEBREAK;
echo ' <td class="' . $row_style_class . '" width="4%">' . $LINEBREAK . cat_list_box($category['cid'], $CAT_LIST3[$category['parent']]) . $LINEBREAK . '</td>' . $LINEBREAK;
echo ' </tr>' . $LINEBREAK;
}
}
开发者ID:CatBerg-TestOrg, 项目名称:coppermine, 代码行数:46, 代码来源:catmgr.php
示例9: html_albummenu3
/**
* html_albummenu3()
*
* This function draws the links for admin menu of Albums when pics can't be edited
*
* @param integer $id ID of the album for which the links are being drawn
* @return string The evaluated template block with links
**/
function html_albummenu3($id)
{
global $lang_album_admin_menu;
/**
* This template variable can be defined in theme.php of respective theme.
* This is done here for simplicity.
*/
$template_album_admin_no_pic_edit_menu = <<<EOT
<div class="buttonlist align_right">
<ul>
<li>
<a href="delete.php?id={ALBUM_ID}&what=album&form_token={FORM_TOKEN}&timestamp={TIMESTAMP}" onclick="return confirm('{CONFIRM_DELETE}');"><span>{DELETE}</span></a>
</li>
<li>
<a href="modifyalb.php?album={ALBUM_ID}"><span>{MODIFY}</span></a>
</li>
</ul>
</div>
<div class="clearer"></div>
EOT;
static $template = '';
if ($template == '') {
list($timestamp, $form_token) = getFormToken();
$params = array('{CONFIRM_DELETE}' => $lang_album_admin_menu['confirm_delete'], '{DELETE}' => cpg_fetch_icon('delete', 1) . $lang_album_admin_menu['delete'], '{MODIFY}' => cpg_fetch_icon('modifyalb', 1) . $lang_album_admin_menu['modify'], '{FORM_TOKEN}' => $form_token, '{TIMESTAMP}' => $timestamp);
$template = template_eval($template_album_admin_no_pic_edit_menu, $params);
}
$params = array('{ALBUM_ID}' => $id);
return template_eval($template, $params);
}
开发者ID:CatBerg-TestOrg, 项目名称:coppermine, 代码行数:37, 代码来源:index.php
示例10: h5u_config_form
//.........这里部分代码省略.........
} elseif ($uplsiz % 1048576 == 0) {
$uplsizm = 1;
$uplsiz = $uplsiz >> 20;
} else {
$uplsiz = $uplsiz >> 10;
}
} else {
$uplsiz = '';
}
$sizmopts = '';
foreach (array('K', 'M', 'G') as $k => $v) {
$selected = $uplsizm == $k ? 'selected="selected"' : '';
$sizmopts .= "<option value=\"{$k}\" {$selected}>{$v}</option>";
}
$sysfmax = $h5a_upload->sys_max_upl_size;
$sysfmaxh = $h5a_upload->to_KMG($sysfmax);
$autochecked = $tcfg['autoedit'] ? 'checked="checked" ' : '';
$titlchecked = $tcfg['enabtitl'] ? 'checked="checked" ' : '';
$descchecked = $tcfg['enabdesc'] ? 'checked="checked" ' : '';
$keyschecked = $tcfg['enabkeys'] ? 'checked="checked" ' : '';
$usr1checked = $tcfg['enabusr1'] ? 'checked="checked" ' : '';
$usr2checked = $tcfg['enabusr2'] ? 'checked="checked" ' : '';
$usr3checked = $tcfg['enabusr3'] ? 'checked="checked" ' : '';
$usr4checked = $tcfg['enabusr4'] ? 'checked="checked" ' : '';
$enabflds = '';
if (!empty($CONFIG['user_field1_name'])) {
$enabflds .= '<br /><input type="checkbox" name="usr1fld" id="usr1fld" ' . $usr1checked . '/> <label for="usr1fld">' . $CONFIG['user_field1_name'] . '</label>';
}
if (!empty($CONFIG['user_field2_name'])) {
$enabflds .= '<br /><input type="checkbox" name="usr2fld" id="usr2fld" ' . $usr2checked . '/> <label for="usr2fld">' . $CONFIG['user_field2_name'] . '</label>';
}
if (!empty($CONFIG['user_field3_name'])) {
$enabflds .= '<br /><input type="checkbox" name="usr3fld" id="usr3fld" ' . $usr3checked . '/> <label for="usr3fld">' . $CONFIG['user_field3_name'] . '</label>';
}
if (!empty($CONFIG['user_field4_name'])) {
$enabflds .= '<br /><input type="checkbox" name="usr4fld" id="usr4fld" ' . $usr4checked . '/> <label for="usr4fld">' . $CONFIG['user_field4_name'] . '</label>';
}
$submit_icon = cpg_fetch_icon('ok', 1);
$rvrtbut = '';
if ($grpn && $scfg) {
$undo_icon = cpg_fetch_icon('undo', 1);
$rvrtbut = '<button value="' . $lang_plugin_html5upload['revert'] . '" name="revert" class="button" type="submit">' . $undo_icon . $lang_plugin_html5upload['revert'] . ' </button> ';
}
echo <<<EOT
\t<tr>
\t\t<td class="tableb" width="50%">
\t\t\t{$lang_plugin_html5upload['select']}
\t\t</td>
\t\t<td class="tableb">
\t\t\t<select class="listbox" name="concurrent">{$concopts}</select>
\t\t</td>
\t</tr>
\t<tr>
\t\t<td class="tableb">
\t\t\t{$lang_plugin_html5upload['maxUplSiz']} (PHP:CPG = {$sysfmaxh})
\t\t</td>
\t\t<td class="tableb">
\t\t\t<input type="text" name="upsize" style="width:4em" maxlength="5" value="{$uplsiz}" />
\t\t\t<select class="listbox" name="upsizem">{$sizmopts}</select>
\t\t</td>
\t</tr>
\t<tr>
\t\t<td class="tableb">
\t\t\t{$lang_plugin_html5upload['acptmime']}
\t\t</td>
\t\t<td class="tableb">
\t\t\t<input type="text" name="acptmime" style="width:90%" maxlength="60" value="{$tcfg['acptmime']}" />
\t\t</td>
\t</tr>
\t<tr>
\t\t<td class="tableb">
\t\t\t{$lang_plugin_html5upload['autoedit']}
\t\t</td>
\t\t<td class="tableb">
\t\t\t<input type="checkbox" name="autoedit" {$autochecked}/>
\t\t</td>
\t</tr>
\t<tr>
\t\t<td class="tableb">
\t\t\t{$lang_plugin_html5upload['incflds']}
\t\t</td>
\t\t<td class="tableb">
\t\t\t<input type="checkbox" name="titlfld" id="titlfld" {$titlchecked}/> <label for="titlfld">{$lang_common['title']}</label>
\t\t\t<br /><input type="checkbox" name="descfld" id="descfld" {$descchecked}/> <label for="descfld">{$lang_common['caption']}</label>
\t\t\t<br /><input type="checkbox" name="keysfld" id="keysfld" {$keyschecked}/> <label for="keysfld">{$lang_common['keywords']}</label>
\t\t\t{$enabflds}
\t\t</td>
\t</tr>
\t<tr>
\t\t<td class="tableb" colspan="2" style="text-align:center">
\t\t\t{$rvrtbut}<button value="{$lang_common['apply_changes']}" name="save" class="button" type="submit">{$submit_icon}{$lang_common['apply_changes']} </button>
\t\t</td>
\t</tr>
EOT;
endtable();
list($timestamp, $form_token) = getFormToken();
echo "<input type=\"hidden\" name=\"form_token\" value=\"{$form_token}\" />";
echo "<input type=\"hidden\" name=\"timestamp\" value=\"{$timestamp}\" />";
pagefooter();
}
开发者ID:CatBerg-TestOrg, 项目名称:coppermine, 代码行数:101, 代码来源:admin.php
示例11: custom_thumb_page_start
function custom_thumb_page_start()
{
global $CONFIG, $lang_errors;
$superCage = Inspekt::makeSuperCage();
if ($superCage->get->keyExists('custom_thmb_id')) {
$pid = $superCage->get->getInt('custom_thmb_id');
$result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = p.aid WHERE p.pid = '{$pid}' LIMIT 1");
$row = mysql_fetch_assoc($result);
if (!(USER_ADMIN_MODE && $row['category'] == FIRST_USER_CAT + USER_ID || $CONFIG['users_can_edit_pics'] && $row['owner_id'] == USER_ID && USER_ID != 0 || GALLERY_ADMIN_MODE)) {
load_template();
cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}
require_once "./plugins/custom_thumb/lang/english.php";
if ($CONFIG['lang'] != 'english' && file_exists("./plugins/custom_thumb/lang/{$CONFIG['lang']}.php")) {
require_once "./plugins/custom_thumb/lang/{$CONFIG['lang']}.php";
}
if ($superCage->files->keyExists('fileupload') && $row) {
if (!checkFormToken()) {
load_template();
global $lang_errors;
cpg_die(ERROR, $lang_errors['invalid_form_token'], __FILE__, __LINE__);
}
$fileupload = $superCage->files->_source['fileupload'];
if ($fileupload['error']) {
load_template();
cpg_die(ERROR, $lang_errors['error'] . ' ' . $fileupload['error'], __FILE__, __LINE__);
}
if (is_image($fileupload['name'])) {
if (!is_image($row['filename'])) {
$path_parts = pathinfo($row['filename']);
$row['filename'] = basename($row['filename'], '.' . $path_parts['extension']) . '.png';
}
$thumb = $CONFIG['fullpath'] . $row['filepath'] . $CONFIG['thumb_pfx'] . $row['filename'];
if (move_uploaded_file($fileupload['tmp_name'], $thumb) == TRUE) {
require 'include/picmgmt.inc.php';
if ($superCage->post->keyExists('create_intermediate')) {
$normal = $CONFIG['fullpath'] . $row['filepath'] . $CONFIG['normal_pfx'] . $row['filename'];
$resize_method = $CONFIG['picture_use'] == "thumb" ? $CONFIG['thumb_use'] == "ex" ? "any" : $CONFIG['thumb_use'] : $CONFIG['picture_use'];
resize_image($thumb, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $resize_method);
}
resize_image($thumb, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']);
} else {
load_template();
cpg_die(ERROR, sprintf($lang_plugin_custom_thumb['error_move_file'], $fileupload['tmp_name'], $thumb), __FILE__, __LINE__);
}
} else {
load_template();
cpg_die(ERROR, $lang_plugin_custom_thumb['error_images_only'], __FILE__, __LINE__);
}
header("Location: {$CONFIG['site_url']}displayimage.php?pid={$pid}");
die;
} else {
load_template();
pageheader($lang_plugin_custom_thumb['custom_thumbnail']);
echo '<form method="post" enctype="multipart/form-data">';
starttable('60%', $lang_plugin_custom_thumb['upload_custom_thumbnail'], 2);
list($timestamp, $form_token) = getFormToken();
echo <<<EOT
<tr>
<td class="tableb" valign="top">
{$lang_plugin_custom_thumb['browse']}
</td>
<td class="tableb" valign="top">
<input type="file" name="fileupload" size="40" class="listbox" />
</td>
</tr>
<tr>
<td class="tableb" valign="top">
{$lang_plugin_custom_thumb['create_intermediate']}
</td>
<td class="tableb" valign="top">
<input type="checkbox" name="create_intermediate" />
</td>
</tr>
<tr>
<td align="center" colspan="2" class="tablef">
<input type="hidden" name="form_token" value="{$form_token}" />
<input type="hidden" name="timestamp" value="{$timestamp}" />
<input type="submit" name="commit" class="button" value="{$lang_plugin_custom_thumb['upload']}"/>
</td>
</tr>
EOT;
endtable();
echo '</form>';
pagefooter();
exit;
}
}
}
开发者ID:phill104, 项目名称:branches, 代码行数:89, 代码来源:codebase.php
示例12: newsletter_configure
krishnaik06/Machine-Learning-in-90-days
阅读:1115| 2022-08-18
bazaarvoice/s3-upload-maven-plugin: Allows you to upload a file to S3 from maven
阅读:842| 2022-08-17
在美元的英文“dollar”里面明明没有字母“s”,为什么美元的符号($)是一条竖线穿过字
阅读:1117| 2022-11-06
VCVRack/library: Database for the VCV Library
阅读:432| 2022-08-14
直接看例子吧: WXML:直接看Button,用“data-”(data-total)传值,后台如何获取,
阅读:812| 2022-07-18
sydney0zq/covid-19-detection: The implementation of A Weakly-supervised Framewor
阅读:519| 2022-08-16
Multiple vulnerabilities in Cisco Nexus Dashboard could allow an authenticated,
阅读:622| 2022-07-29
dustinstansbury/medal: Matlab Environment for Deep Architecture Learning
阅读:399| 2022-08-17
长沙城南,有一所以“环保”为名的学校,从1979年创立以来,四易归属、五更其名。 这
阅读:817| 2022-11-06
jupyterlab/jupyterlab-latex: JupyterLab extension for live editing of LaTeX docu
阅读:602| 2022-08-12
请发表评论