本文整理汇总了PHP中print_upload_row函数的典型用法代码示例。如果您正苦于以下问题:PHP print_upload_row函数的具体用法?PHP print_upload_row怎么用?PHP print_upload_row使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_upload_row函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: construct_select_options
' . construct_select_options($styleoptions, $vbulletin->GPC['dostyleid']) . '
</select>
', '', 'top', 'dostyleid');
print_select_row($vbphrase['product'], 'product', fetch_product_list());
print_input_row($vbphrase['title'], 'title');
print_input_row($vbphrase['filename'], 'filename', 'vbulletin-style.xml');
print_label_row($vbphrase['options'], '
<span class="smallfont">
<label for="rb_mode_0"><input type="radio" name="mode" value="0" id="rb_mode_0" tabindex="1" checked="checked" />' . $vbphrase['get_customizations_from_this_style_only'] . '</label><br />
<label for="rb_mode_1"><input type="radio" name="mode" value="1" id="rb_mode_1" tabindex="1" />' . $vbphrase['get_customizations_from_parent_styles'] . '</label>
</span>
', '', 'top', 'mode');
print_submit_row($vbphrase['download']);
print_form_header('template', 'upload', 1, 1, 'uploadform" onsubmit="return js_confirm_upload(this, this.stylefile);');
print_table_header($vbphrase['import_style_xml_file']);
print_upload_row($vbphrase['upload_xml_file'], 'stylefile', 999999999);
print_input_row($vbphrase['import_xml_file'], 'serverfile', './install/vbulletin-style.xml');
print_style_chooser_row('overwritestyleid', -1, '(' . $vbphrase['create_new_style'] . ')', $vbphrase['overwrite_style'], 1);
print_yes_no_row($vbphrase['ignore_style_version'], 'anyversion', 0);
print_description_row($vbphrase['following_options_apply_only_if_new_style'], 0, 2, 'thead" style="font-weight:normal; text-align:center');
print_input_row($vbphrase['title_for_uploaded_style'], 'title');
print_style_chooser_row('parentid', -1, $vbphrase['no_parent_style'], $vbphrase['parent_style'], 1);
print_input_row($vbphrase['display_order'], 'displayorder', 1);
print_yes_no_row($vbphrase['allow_user_selection'], 'userselect', 1);
print_submit_row($vbphrase['import']);
}
// #############################################################################
// find & replace
if ($_POST['do'] == 'replace') {
$vbulletin->input->clean_array_gpc('r', array('startat_template' => TYPE_INT, 'startat_style' => TYPE_INT, 'requirerebuild' => TYPE_BOOL, 'test' => TYPE_BOOL, 'regex' => TYPE_BOOL, 'case_insensitive' => TYPE_BOOL, 'searchstring' => TYPE_NOTRIM, 'replacestring' => TYPE_NOTRIM));
$perpage = 50;
示例2: confirm
{
if (filefield.value == "")
{
return confirm("<?php
echo construct_phrase($vbphrase['you_did_not_specify_a_file_to_upload'], '" + tform.serverfile.value + "');
?>
");
}
return true;
}
//-->
</script>
<?php
print_form_header('plugin', 'productimport', 1, 1, 'uploadform" onsubmit="return js_confirm_upload(this, this.productfile);');
print_table_header($vbphrase['import_product']);
print_upload_row($vbphrase['upload_xml_file'], 'productfile', 999999999);
print_input_row($vbphrase['import_xml_file'], 'serverfile', './includes/xml/product.xml');
print_yes_no_row($vbphrase['allow_overwrite_upgrade_product'], 'allowoverwrite', 0);
print_submit_row($vbphrase['import']);
}
print_form_header('plugin', 'productsave');
if ($product) {
print_table_header(construct_phrase($vbphrase['edit_product_x'], $product['productid']));
print_label_row($vbphrase['product_id'], $product['productid']);
construct_hidden_code('productid', $product['productid']);
construct_hidden_code('editing', 1);
} else {
print_table_header($vbphrase['add_new_product']);
print_input_row($vbphrase['product_id'], 'productid', '', true, 50, 25);
// max length = 25
}
示例3: print_cp_header
// ######################### START MAIN SCRIPT ############################
// ########################################################################
if (!isset($_GET['act'])) {
if (isset($_POST['act'])) {
$_GET['act'] = $_POST['act'];
} else {
$_GET['act'] = 1;
}
}
print_cp_header('QuantumHacks vbMailer');
if ($_GET['do'] == 'manage_attachments') {
if ($_GET['act'] == 1) {
print_form_header('qhvbmailer', 'manage_attachments', true, true, '', '50%');
print_table_header('Add Attachment');
construct_hidden_code('act', '2');
print_upload_row('Browse...', 'attachment_file');
print_submit_row('Upload');
$select_options[0] = "---Select---";
$sql = "SELECT * FROM " . TABLE_PREFIX . "qhvbmailer_attachments ORDER BY created DESC";
$attachments = $db->query_read_slave($sql);
while ($attachment = $db->fetch_array($attachments)) {
$select_options[$attachment['id']] = $attachment['filename'];
}
print_form_header('qhvbmailer', 'manage_attachments', false, true, '', '50%');
print_table_header('Delete Attachment');
construct_hidden_code('act', '3');
print_select_row('Choose an Attachment', 'attachment_id', $select_options);
print_submit_row('Delete');
} elseif ($_GET['act'] == 2) {
if ($_FILES['attachment']['error'] == 0) {
if (!file_exists("./qhvbmailer_attachments/" . $_FILES['attachment_file']['name'])) {
示例4: confirm
if (filefield.value == "")
{
return confirm("<?php
echo construct_phrase($vbphrase['you_did_not_specify_a_file_to_upload'], '" + tform.serverfile.value + "');
?>
");
}
return true;
}
//-->
</script>
<?php
// upload form
print_form_header('language', 'upload', 1, 1, 'uploadform" onsubmit="return js_confirm_upload(this, this.languagefile);');
print_table_header($vbphrase['import_language_xml_file']);
print_upload_row($vbphrase['upload_xml_file'], 'languagefile', 999999999);
print_input_row($vbphrase['import_xml_file'], 'serverfile', './install/vbulletin-language.xml');
print_label_row($vbphrase['overwrite_language_dfn'], '<select name="dolanguageid" tabindex="1" class="bginput"><option value="0">(' . $vbphrase['create_new_language'] . ')</option>' . construct_select_options($languages) . '</select>', '', 'top', 'olanguageid');
print_input_row($vbphrase['title_for_uploaded_language'], 'title');
print_yes_no_row($vbphrase['ignore_language_version'], 'anyversion', 0);
print_submit_row($vbphrase['import']);
}
// ##########################################################################
if ($_REQUEST['do'] == 'rebuild') {
$vbulletin->input->clean_array_gpc('r', array('goto' => TYPE_STR));
$help = construct_help_button('', NULL, '', 1);
echo "<p> </p>\n\t<blockquote><form><div class=\"tborder\">\n\t<div class=\"tcat\" style=\"padding:4px\" align=\"center\"><div style=\"float:{$stylevar['right']}\">{$help}</div><b>" . $vbphrase['rebuild_language_information'] . "</b></div>\n\t<div class=\"alt1\" style=\"padding:4px\">\n<blockquote>\n\t";
vbflush();
$languages = fetch_languages_array();
foreach ($languages as $_languageid => $language) {
echo "<p>" . construct_phrase($vbphrase['rebuilding_language_x'], "<b>{$language['title']}</b>") . iif($_languageid == $vbulletin->options['languageid'], " ({$vbphrase['default']})") . ' ...';
示例5: print_label_row
if (empty($userinfo['avatarurl']) or $userinfo['avatarid'] != 0) {
$userinfo['avatarurl'] = '<img src="' . vB::getDatastore()->getOption('bburl') . '/' . $vbulletin->options['cleargifurl'] . '" alt="" border="0" />';
} else {
$userinfo['avatarurl'] = "<img src=\"../" . $userinfo['avatarurl'][0] . "\" " . $userinfo['avatarurl'][1] . " alt=\"\" border=\"0\" />";
}
if (!empty($avatarchecked[0])) {
print_label_row($vbphrase['custom_avatar'], $userinfo['avatarurl']);
}
print_yes_row(!empty($avatarchecked[0]) ? $vbphrase['use_current_avatar'] : $vbphrase['add_new_custom_avatar'], 'avatarid', $vbphrase['yes'], $avatarchecked[0], 0);
cache_permissions($userinfo, false);
// if ($userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canuseavatar'] AND ($userinfo['permissions']['avatarmaxwidth'] > 0 OR $userinfo['permissions']['avatarmaxheight'] > 0))
// {
// print_yes_no_row($vbphrase['resize_image_to_users_maximum_allowed_size'], 'resize');
// }
print_input_row($vbphrase['enter_image_url_gcpuser'], 'avatarurl', 'http://');
print_upload_row($vbphrase['upload_image_from_computer'], 'upload');
construct_hidden_code('userid', $vbulletin->GPC['userid']);
print_submit_row($vbphrase['save']);
}
// ###################### Start Update Avatar ################
if ($_POST['do'] == 'updateavatar') {
$vbulletin->input->clean_array_gpc('p', array('userid' => vB_Cleaner::TYPE_UINT, 'avatarid' => vB_Cleaner::TYPE_INT, 'avatarurl' => vB_Cleaner::TYPE_STR));
$useavatar = iif($vbulletin->GPC['avatarid'] == -1, 0, 1);
$userinfo = fetch_userinfo($vbulletin->GPC['userid']);
if (!$userinfo) {
print_stop_message2('invalid_user_specified');
}
if ($useavatar) {
$crop = array();
if (!empty($_FILES['upload']['tmp_name'])) {
if (!file_exists($_FILES['upload']['tmp_name'])) {
示例6: confirm
return confirm("<?php
echo construct_phrase($vbphrase['you_did_not_specify_a_file_to_upload'], '" + tform.serverfile.value + "');
?>
");
}
return true;
}
//-->
</script>
<?php
print_form_header('ame', 'importoptions', 1, 1, 'uploadform" onsubmit="return js_confirm_upload(this, this.uploadedfile);');
badhook_check();
print_table_header($vbphrase['import']);
print_description_row($vbphrase['ame_import_desc']);
print_upload_row($vbphrase['upload_xml_file'], 'uploadedfile', 999999999);
print_input_row($vbphrase['import_xml_file'], 'serverfile', './includes/xml/ame.xml');
print_submit_row($vbphrase['import'], 0);
}
/**
* Display imported results
*/
if ($do == "importoptions") {
$vbulletin->input->clean_gpc('f', 'uploadedfile', TYPE_FILE);
$vbulletin->input->clean_gpc('p', 'serverfile', TYPE_FILE);
print_dots_start($vbphrase['ame_importing']);
if (file_exists($vbulletin->GPC['uploadedfile']['tmp_name'])) {
$xml = file_read($vbulletin->GPC['uploadedfile']['tmp_name']);
} else {
if (file_exists($vbulletin->GPC['serverfile'])) {
$xml = file_read($vbulletin->GPC['serverfile']);
示例7: print_label_row
$urlPrefix = vB::getDatastore()->getOption('frontendurl') . '/filedata/fetch?filedataid=';
// icon
if ($style['filedataid'] > 0) {
print_label_row($vbphrase['theme_icon'], "<div><strong>{$vbphrase['current_theme_icon']}</strong></div><img src=\"{$urlPrefix}{$style['filedataid']}\" alt=\"\" />", '', 'top', 'icon_file');
print_checkbox_row('', 'icon_remove', false, 1, $vbphrase['theme_remove_icon_desc']);
print_upload_row('', 'icon_file', 2000000, 35, '');
} else {
print_upload_row($vbphrase['theme_icon'], 'icon_file', 2000000);
}
// preview image
if ($style['previewfiledataid'] > 0) {
print_label_row($vbphrase['theme_preview_image'], "<div><strong>{$vbphrase['current_theme_preview_image']}</strong></div><img src=\"{$urlPrefix}{$style['previewfiledataid']}\" alt=\"\" />", '', 'top', 'preview_image_file');
print_checkbox_row('', 'preview_image_remove', false, 1, $vbphrase['theme_remove_preview_image_desc']);
print_upload_row('', 'preview_image_file', 2000000, 35, '');
} else {
print_upload_row($vbphrase['theme_preview_image'], 'preview_image_file', 2000000);
}
}
// Legacy Hook 'admin_style_form' Removed //
print_submit_row($vbphrase['save']);
}
// #############################################################################
// kill a style, set parents for child forums and update template id caches for dependent styles
if ($_POST['do'] == 'killstyle') {
if (!vB::getUserContext()->hasAdminPermission('canadminstyles')) {
print_cp_no_permission();
}
$vbulletin->input->clean_array_gpc('p', array('parentid' => vB_Cleaner::TYPE_INT, 'parentlist' => vB_Cleaner::TYPE_STR, 'group' => vB_Cleaner::TYPE_STR));
$result = vB_Api::instance('style')->deleteStyle($vbulletin->GPC['dostyleid']);
//we can't easily display multiple errors in the admincp code, so display the first one.
if (isset($result['errors'][0])) {
示例8: function
?>
<script type="text/javascript">
YAHOO.util.Event.addListener("mod_security_test", "error", function(e) { YAHOO.util.Dom.get('mod_security_test_result').innerHTML = '<?php
echo $vbphrase['yes'];
?>
'; YAHOO.util.Dom.setStyle('mod_security_test', 'display', 'none'); });
YAHOO.util.Event.addListener("mod_security_test", "load", function(e) { YAHOO.util.Dom.setStyle('mod_security_test', 'display', 'none'); });
</script>
<?php
}
// ###################### Start options list #######################
if ($_REQUEST['do'] == 'list') {
print_form_header('diagnostic', 'doupload', 1);
print_table_header($vbphrase['upload']);
print_description_row($vbphrase['upload_test_desc']);
print_upload_row($vbphrase['filename'], 'attachfile');
print_submit_row($vbphrase['upload']);
print_form_header('diagnostic', 'domail');
print_table_header($vbphrase['email']);
print_description_row($vbphrase['email_test_explained']);
print_input_row($vbphrase['email'], 'emailaddress');
print_submit_row($vbphrase['send']);
print_form_header('diagnostic', 'doversion');
print_table_header($vbphrase['suspect_file_versions']);
print_description_row(construct_phrase($vbphrase['file_versions_explained'], $vbulletin->options['templateversion']));
print_submit_row($vbphrase['submit'], 0);
print_form_header('diagnostic', 'server_modules');
print_table_header($vbphrase['problematic_server_modules']);
print_description_row($vbphrase['problematic_server_modules_explained']);
print_submit_row($vbphrase['submit']);
print_form_header('diagnostic', 'dosysinfo');
示例9: confirm
{
return confirm("<?php
echo construct_phrase($vbphrase['you_did_not_specify_a_file_to_upload'], '" + tform.serverfile.value + "');
?>
");
}
return true;
}
//-->
</script>
<?php
print_form_header('options', 'doimport', 1, 1, 'uploadform', '90%', '', true, 'post" onsubmit="return js_confirm_upload(this, this.settingsfile);');
construct_hidden_code('restore', 1);
print_table_header($vbphrase['restore_settings_xml_file']);
print_yes_no_row($vbphrase['ignore_blacklisted_settings'], 'blacklist', 1);
print_upload_row($vbphrase['upload_xml_file'], 'settingsfile', 999999999);
print_input_row($vbphrase['restore_xml_file'], 'serverfile', './install/vbulletin-settings.xml');
print_submit_row($vbphrase['restore'], 0);
}
// #################### Start Change Search Type #####################
if ($_REQUEST['do'] == 'searchtype') {
require_once DIR . '/includes/class_dbalter.php';
$db_alter =& new vB_Database_Alter_MySQL($db);
$db_alter->fetch_table_info('post');
$convertpost = iif($db_alter->fetch_table_type() != 'MYISAM', true, false);
$db_alter->fetch_table_info('thread');
$convertthread = iif($db_alter->fetch_table_type() != 'MYISAM', true, false);
$warning2 = iif($convertpost or $convertthread, $vbphrase['your_post_and_thread_table_will_be_converted']);
print_form_header('options', 'dosearchtype');
print_table_header("{$vbphrase['search_type']}");
if ($vbulletin->options['fulltextsearch']) {
示例10: array
}
// ###################### Edit an attachment ####################
if ($_REQUEST['do'] == 'edit') {
$vbulletin->input->clean_array_gpc('r', array('attachmentid' => TYPE_UINT));
if (!($attachment = $db->query_first("\n\t\tSELECT attachmentid, filename, visible, counter\n\t\tFROM " . TABLE_PREFIX . "attachment AS attachment\n\t\tWHERE attachment.attachmentid = " . $vbulletin->GPC['attachmentid'] . "\n\t"))) {
print_stop_message('no_matches_found');
}
print_form_header('attachment', 'doedit', true);
construct_hidden_code('attachmentid', $vbulletin->GPC['attachmentid']);
print_table_header($vbphrase['edit_attachment']);
print_input_row($vbphrase['filename'], 'a_filename', $attachment['filename']);
print_input_row($vbphrase['views'], 'a_counter', $attachment['counter']);
print_yes_no_row($vbphrase['visible'], 'a_visible', $attachment['visible']);
print_table_break();
print_table_header($vbphrase['replace_attachment']);
print_upload_row($vbphrase['please_select_a_file_to_attach'], 'upload', 99999999);
print_input_row($vbphrase['or_enter_a_full_url_to_a_file'], 'url');
print_yes_no_row($vbphrase['visible'], 'newvisible', true);
print_submit_row($vbphrase['save']);
}
// ###################### Edit an attachment ####################
if ($_POST['do'] == 'doedit') {
$vbulletin->input->clean_array_gpc('p', array('attachmentid' => TYPE_UINT, 'a_filename' => TYPE_STR, 'a_counter' => TYPE_UINT, 'a_visible' => TYPE_BOOL, 'newvisible' => TYPE_BOOL, 'url' => TYPE_STR));
if (!($attachment = $db->query_first("\n\t\tSELECT attachmentid, post.postid, attachment.userid\n\t\tFROM " . TABLE_PREFIX . "attachment AS attachment\n\t\tLEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = attachment.postid)\n\t\tWHERE attachment.attachmentid = " . $vbulletin->GPC['attachmentid'] . "\n\t"))) {
print_stop_message('no_matches_found');
}
$vbulletin->input->clean_gpc('f', 'upload', TYPE_FILE);
$attachdata =& datamanager_init('Attachment', $vbulletin, ERRTYPE_CP);
$attachdata->set_existing($attachment);
# Replace attachment
if (!empty($vbulletin->GPC['upload']['tmp_name']) or !empty($vbulletin->GPC['url'])) {
示例11: vB_Upload_Image
require_once DIR . '/includes/class_image.php';
$upload = new vB_Upload_Image($vbulletin);
$upload->image =& vB_Image::fetch_library($vbulletin);
$upload->path = $vbulletin->GPC['imagespath'];
if (!($imagepath = $upload->process_upload($vbulletin->GPC['upload']))) {
print_stop_message('there_were_errors_encountered_with_your_upload_x', $upload->fetch_error());
}
define('IMAGE_UPLOADED', true);
$_POST['do'] = 'insert';
}
// ###################### Start Upload #######################
if ($_REQUEST['do'] == 'upload') {
print_form_header('image', 'doupload', 1);
construct_hidden_code('table', $vbulletin->GPC['table']);
print_table_header($vbphrase["upload_{$itemtype}"]);
print_upload_row($vbphrase['filename'], 'upload');
print_input_row($vbphrase['title'], 'title');
switch ($vbulletin->GPC['table']) {
case 'avatar':
print_input_row($vbphrase['minimum_posts'], 'minimumposts', 0);
break;
case 'smilie':
print_input_row($vbphrase['text_to_replace'], 'smilietext', '', true, 35, 20);
break;
}
print_input_row($vbphrase["{$itemtype}_file_path_dfn"], 'imagespath', 'images/' . $vbulletin->GPC['table'] . 's');
print_label_row($vbphrase["{$itemtype}_category"], "<select name=\"imagecategoryid\" tabindex=\"1\" class=\"bginput\">" . construct_select_options(fetch_image_categories_array($catid), $item['imagecategoryid']) . '</select>', '', 'top', 'imagecategoryid');
print_input_row($vbphrase['display_order'], 'displayorder', 1);
print_submit_row($vbphrase['upload']);
}
// ###################### Start Kill #######################
示例12: print_stop_message2
print_stop_message2(array('there_were_errors_encountered_with_your_upload_x', $upload->fetch_error()));
}
if ($fixpath and substr($imagepath, 0, strlen(DIR)) == DIR) {
//Just put the path relative to the core installation location into the database record.
$imagepath = substr($imagepath, strlen(DIR) + 1);
}
define('IMAGE_UPLOADED', true);
$_POST['do'] = 'insert';
}
// ###################### Start Upload #######################
if ($_REQUEST['do'] == 'upload') {
$vbulletin->input->clean_array_gpc('r', array('imagecategoryid' => vB_Cleaner::TYPE_INT));
print_form_header('image', 'doupload', 1);
construct_hidden_code('table', $vbulletin->GPC['table']);
print_table_header($vbphrase["upload_{$itemtype}"]);
print_upload_row($vbphrase['filename_gcpglobal'], 'upload');
print_input_row($vbphrase['title'], 'title');
switch ($vbulletin->GPC['table']) {
case 'avatar':
print_input_row($vbphrase['minimum_posts'], 'minimumposts', 0);
break;
case 'smilie':
print_input_row($vbphrase['text_to_replace'], 'smilietext', '', true, 35, 20);
break;
}
print_input_row($vbphrase["{$itemtype}_file_path_dfn"], 'imagespath', 'images/' . $vbulletin->GPC['table'] . 's');
print_label_row($vbphrase["{$itemtype}_category"], "<select name=\"imagecategoryid\" tabindex=\"1\" class=\"bginput\">" . construct_select_options(fetch_image_categories_array($catid), $vbulletin->GPC['imagecategoryid']) . '</select>', '', 'top', 'imagecategoryid');
print_input_row($vbphrase['display_order'], 'displayorder', 1);
print_submit_row($vbphrase['upload']);
}
// ###################### Start Kill #######################
示例13: curl_close
curl_close($ch);
}
if (function_exists('openssl_open')) {
// passed
$ssl_available = true;
}
print_label_row($vbphrase['ssl_available'], $ssl_available ? $vbphrase['yes'] : $vbphrase['no']);
print_diagnostic_test_result(0, $vbphrase['ssl_unavailable_desc'], 0);
print_table_footer();
}
// ###################### Start options list #######################
if ($_REQUEST['do'] == 'list') {
print_form_header('diagnostic', 'doupload', 1);
print_table_header($vbphrase['upload']);
print_description_row($vbphrase['upload_test_desc']);
print_upload_row($vbphrase['filename_gcpglobal'], 'attachfile');
print_submit_row($vbphrase['upload'], NULL);
print_form_header('diagnostic', 'domail');
print_table_header($vbphrase['email']);
print_description_row($vbphrase['email_test_explained']);
print_input_row($vbphrase['email'], 'emailaddress');
print_submit_row($vbphrase['send']);
print_form_header('diagnostic', 'doversion');
print_table_header($vbphrase['suspect_file_versions']);
print_description_row(construct_phrase($vbphrase['file_versions_explained'], $vbulletin->options['templateversion']));
print_submit_row($vbphrase['submit'], 0);
print_form_header('diagnostic', 'server_modules');
print_table_header($vbphrase['problematic_server_modules']);
print_description_row($vbphrase['problematic_server_modules_explained']);
print_submit_row($vbphrase['submit'], 0);
print_form_header('diagnostic', 'ssl');