本文整理汇总了PHP中print_checkbox_row函数的典型用法代码示例。如果您正苦于以下问题:PHP print_checkbox_row函数的具体用法?PHP print_checkbox_row怎么用?PHP print_checkbox_row使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_checkbox_row函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cachedb
}
cachedb();
redirect_to_rebuild();
}
/**
* Display installed definitions for exporting
*/
if ($do == "export") {
$results = $db->query_read_slave("SELECT providerid id, provider title, url description from " . TABLE_PREFIX . "bbcode_video ORDER BY priority, provider ASC");
print_form_header('ame', 'doexport');
badhook_check();
if ($db->num_rows($results)) {
print_table_header($vbphrase['ame_installed_definitions'], 2);
print_cells_row(array($vbphrase['title'], "<label for=\"export_toggle\">{$vbphrase['export']}</label> <input type=\"checkbox\" id=\"export_toggle\" onclick=\"tick_all(this.form, 'items', this.checked)\" checked=\"checked\" />"), true);
while ($result = $db->fetch_array($results)) {
print_checkbox_row("{$result['title']}<dfn>{$result['description']}</dfn>", "items[{$result['id']}]");
}
print_submit_row();
} else {
print_table_header($vbphrase['ame_installed_definitions'], 2);
print_description_row($vbphrase['ame_no_definitions']);
print_table_footer(2, construct_button_code("Add new", "ame.php?do=edit"));
}
}
/**
* Spits out an XML file of the exported items
*/
if ($do == "doexport") {
$items = $vbulletin->input->clean_gpc('p', 'items', TYPE_ARRAY_UINT);
if (sizeof($items)) {
foreach ($items as $key => $value) {
示例2: print_user_search_rows
function print_user_search_rows($email = false)
{
global $vbulletin, $vbphrase, $stylevar;
print_label_row($vbphrase['username'], "\n\t\t<input type=\"text\" class=\"bginput\" name=\"user[username]\" tabindex=\"1\" size=\"35\"\n\t\t/><input type=\"image\" src=\"../" . $vbulletin->options['cleargifurl'] . "\" width=\"1\" height=\"1\"\n\t\t/><input type=\"submit\" class=\"button\" value=\"{$vbphrase['exact_match']}\" tabindex=\"1\" name=\"user[exact]\" />\n\t", '', 'top', 'user[username]');
if ($email) {
global $iusergroupcache;
$userarray = array('usergroupid' => 0, 'membergroupids' => '');
$iusergroupcache = array();
$usergroups = $vbulletin->db->query_read("SELECT usergroupid, title, (forumpermissions & " . $vbulletin->bf_ugp_forumpermissions['canview'] . ") AS CANVIEW FROM " . TABLE_PREFIX . "usergroup ORDER BY title");
while ($usergroup = $vbulletin->db->fetch_array($usergroups)) {
if ($usergroup['CANVIEW']) {
$userarray['membergroupids'] .= "{$usergroup['usergroupid']},";
}
$iusergroupcache["{$usergroup['usergroupid']}"] = $usergroup['title'];
}
unset($usergroup);
$vbulletin->db->free_result($usergroups);
print_checkbox_row($vbphrase['all_usergroups'], 'usergroup_all', 0, -1, $vbphrase['all_usergroups'], 'check_all_usergroups(this.form, this.checked);');
print_membergroup_row($vbphrase['primary_usergroup'], 'user[usergroupid]', 2, $userarray);
print_membergroup_row($vbphrase['additional_usergroups'], 'user[membergroup]', 2);
print_yes_no_row($vbphrase['include_users_that_have_declined_email'], 'user[adminemail]', 0);
} else {
print_chooser_row($vbphrase['primary_usergroup'], 'user[usergroupid]', 'usergroup', -1, '-- ' . $vbphrase['all_usergroups'] . ' --');
print_membergroup_row($vbphrase['additional_usergroups'], 'user[membergroup]', 2);
}
print_description_row('<div align="' . $stylevar['right'] . '"><input type="submit" class="button" value=" ' . iif($email, $vbphrase['submit'], $vbphrase['find']) . ' " tabindex="1" /></div>');
print_input_row($vbphrase['email'], 'user[email]');
print_input_row($vbphrase['parent_email_address'], 'user[parentemail]');
print_yes_no_other_row($vbphrase['coppa_user'], 'user[coppauser]', $vbphrase['either'], -1);
print_input_row($vbphrase['home_page'], 'user[homepage]');
print_input_row($vbphrase['icq_uin'], 'user[icq]');
print_input_row($vbphrase['aim_screen_name'], 'user[aim]');
print_input_row($vbphrase['yahoo_id'], 'user[yahoo]');
print_input_row($vbphrase['msn_id'], 'user[msn]');
print_input_row($vbphrase['skype_name'], 'user[skype]');
print_input_row($vbphrase['signature'], 'user[signature]');
print_input_row($vbphrase['user_title'], 'user[usertitle]');
print_input_row($vbphrase['join_date_is_after'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[joindateafter]');
print_input_row($vbphrase['join_date_is_before'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[joindatebefore]');
print_input_row($vbphrase['last_activity_is_after'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastactivityafter]');
print_input_row($vbphrase['last_activity_is_before'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastactivitybefore]');
print_input_row($vbphrase['last_post_is_after'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastpostafter]');
print_input_row($vbphrase['last_post_is_before'] . '<dfn>(yyyy-mm-dd hh:mm:ss)</dfn>', 'user[lastpostbefore]');
print_input_row($vbphrase['birthday_is_after'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[birthdayafter]');
print_input_row($vbphrase['birthday_is_before'] . '<dfn>(yyyy-mm-dd)</dfn>', 'user[birthdaybefore]');
print_input_row($vbphrase['posts_are_greater_than'], 'user[postslower]', '', 1, 7);
print_input_row($vbphrase['posts_are_less_than'], 'user[postsupper]', '', 1, 7);
print_input_row($vbphrase['reputation_is_greater_than'], 'user[reputationlower]', '', 1, 7);
print_input_row($vbphrase['reputation_is_less_than'], 'user[reputationupper]', '', 1, 7);
print_input_row($vbphrase['warnings_are_greater_than'], 'user[warningslower]', '', 1, 7);
print_input_row($vbphrase['warnings_are_less_than'], 'user[warningsupper]', '', 1, 7);
print_input_row($vbphrase['infractions_are_greater_than'], 'user[infractionslower]', '', 1, 7);
print_input_row($vbphrase['infractions_are_less_than'], 'user[infractionsupper]', '', 1, 7);
print_input_row($vbphrase['infraction_points_are_greater_than'], 'user[pointslower]', '', 1, 7);
print_input_row($vbphrase['infraction_points_are_less_than'], 'user[pointsupper]', '', 1, 7);
print_input_row($vbphrase['userid_is_greater_than'], 'user[useridlower]', '', 1, 7);
print_input_row($vbphrase['userid_is_less_than'], 'user[useridupper]', '', 1, 7);
print_input_row($vbphrase['registration_ip_address'], 'user[ipaddress]');
print_description_row('<div align="' . $stylevar['right'] . '"><input type="submit" class="button" value=" ' . iif($email, $vbphrase['submit'], $vbphrase['find']) . ' " tabindex="1" /></div>');
$forms = array(0 => $vbphrase['edit_your_details'], 1 => "{$vbphrase['options']}: {$vbphrase['log_in']} / {$vbphrase['privacy']}", 2 => "{$vbphrase['options']}: {$vbphrase['messaging']} / {$vbphrase['notification']}", 3 => "{$vbphrase['options']}: {$vbphrase['thread_viewing']}", 4 => "{$vbphrase['options']}: {$vbphrase['date']} / {$vbphrase['time']}", 5 => "{$vbphrase['options']}: {$vbphrase['other']}");
$currentform = -1;
print_table_header($vbphrase['user_profile_fields']);
$profilefields = $vbulletin->db->query_read("\n\t\tSELECT *\n\t\tFROM " . TABLE_PREFIX . "profilefield AS profilefield\n\t\tLEFT JOIN " . TABLE_PREFIX . "profilefieldcategory AS profilefieldcategory ON\n\t\t\t(profilefield.profilefieldcategoryid = profilefieldcategory.profilefieldcategoryid)\n\t\tORDER BY profilefield.form, profilefieldcategory.displayorder, profilefield.displayorder\n\t");
while ($profilefield = $vbulletin->db->fetch_array($profilefields)) {
if ($profilefield['form'] != $currentform) {
print_description_row(construct_phrase($vbphrase['fields_from_form_x'], $forms["{$profilefield['form']}"]), false, 2, 'optiontitle');
$currentform = $profilefield['form'];
}
$profilefield['def'] = 0;
print_profilefield_row('profile', $profilefield);
}
print_description_row('<div align="' . $stylevar['right'] . '"><input type="submit" class="button" value=" ' . iif($email, $vbphrase['submit'], $vbphrase['find']) . ' " tabindex="1" /></div>');
}
示例3: construct_hidden_code
construct_hidden_code('lastedit', $template['dateline']);
construct_hidden_code('hash', htmlspecialchars($template['hash']));
if ($updatetemplate_edit_conflict) {
construct_hidden_code('fromeditconflict', 1);
}
$products = fetch_product_list();
if ($template['styleid'] == -1) {
print_select_row($vbphrase['product'], 'product', $products, $template['product']);
} else {
print_label_row($vbphrase['product'], $products[$template['product'] ? $template['product'] : 'vbulletin']);
construct_hidden_code('product', $template['product'] ? $template['product'] : 'vbulletin');
}
$backlink = "template.php?" . vB::getCurrentSession()->get('sessionurl') . "do=modify&expandset={$template['styleid']}&group=" . $vbulletin->GPC['group'] . "&templateid=" . $vbulletin->GPC['templateid'] . "&searchstring=" . urlencode($vbulletin->GPC['searchstring']);
print_label_row($vbphrase['style'], "<a href=\"{$backlink}\" title=\"" . $vbphrase['edit_templates'] . "\"><b>{$template['style']}</b></a>");
print_input_row($vbphrase['title'] . '<dfn>' . construct_link_code($vbphrase['view_history_gstyle'], 'template.php?do=history&dostyleid=' . $template['styleid'] . '&title=' . urlencode($template['title']), 1) . '</dfn>', 'title', $template['title']);
print_checkbox_row($vbphrase['textonly'] . '<dfn>' . $vbphrase['textonly_desc'] . '</dfn>', 'textonly', !empty($template['textonly']));
if ($updatetemplate_edit_conflict) {
print_description_row($vbphrase['template_current_version_merge_here'], false, 2, 'tfoot', 'center');
}
print_textarea_row($vbphrase['template'] . '
<br /><br />
<span class="smallfont">' . iif($template['styleid'] != -1, construct_link_code($vbphrase['show_default'], "template.php?" . vB::getCurrentSession()->get('sessionurl') . "do=view&title={$template['title']}", 1) . '<br /><br />', '') . '<!--' . $vbphrase['wrap_text'] . '<input type="checkbox" unselectable="on" onclick="set_wordwrap(\'ta_template\', this.checked);" accesskey="w" checked="checked" />-->
</span>', 'template', $text, 22, '5000" style="width:99%', true, false, 'ltr', 'code');
print_template_javascript($vbulletin->textarea_id);
print_label_row($vbphrase['search_in_template'], '
<input type="text" class="bginput searchstring" name="string" accesskey="t" value="" size="20" />
<input type="button" class="button findbutton" style="font-weight:normal" value=" ' . $vbphrase['find'] . ' " accesskey="f" />');
print_label_row($vbphrase['save_in_template_history'], '<label for="savehistory"><input type="checkbox" name="savehistory" id="savehistory" value="1" tabindex="1" ' . (($updatetemplate_edit_conflict and $vbulletin->GPC['savehistory']) ? 'checked="checked" ' : '') . '/>' . $vbphrase['yes'] . '</label><br /><span class="smallfont">' . $vbphrase['comment_gstyle'] . '</span> <input type="text" name="histcomment" value="' . ($updatetemplate_edit_conflict ? $vbulletin->GPC['histcomment'] : '') . '" tabindex="1" class="bginput" size="50" />');
print_submit_row($vbphrase['save'], '_default_', 2, '', "<input type=\"submit\" class=\"button js-reload-to-position\" tabindex=\"1\" name=\"return\" value=\"{$vbphrase['save_and_reload']}\" accesskey=\"e\" />");
if ($updatetemplate_edit_conflict) {
print_form_header('', '', false, true, 'cpform_oldtemplate');
示例4: array
$feed = array('options' => 1025, 'ttl' => 1800, 'maxresults' => 0, 'endannouncement' => 7, 'titletemplate' => $vbphrase['rssfeed_title_template'], 'bodytemplate' => $vbphrase['rssfeed_body_template'], 'itemtype' => 'thread');
$form_title = $vbphrase['add_new_rss_feed'];
}
}
$checked = array();
if (!defined('FEED_SAVE_ERROR') and !is_array($feed['options'])) {
$feed['options'] = convert_bits_to_array($feed['options'], $vbulletin->bf_misc_feedoptions);
}
foreach ($feed['options'] as $bitname => $bitvalue) {
$checked["{$bitname}"] = $bitvalue ? ' checked="checked"' : '';
}
$checked['itemtype']["{$feed['itemtype']}"] = ' checked="checked"';
print_form_header('rssposter', 'update');
print_table_header($form_title);
if ($feed['rssfeedid']) {
print_checkbox_row($vbphrase['reset_last_checked_time'], 'resetlastrun', 0, 1, "<span class=\"normal\">{$vbphrase['reset']}</span>");
}
print_yes_no_row($vbphrase['feed_is_enabled'], 'options[enabled]', $feed['options']['enabled']);
print_input_row($vbphrase['title'], 'title', $feed['title'], false, 50);
print_input_row($vbphrase['url_of_feed'], 'url', $feed['url'], true, 50);
print_select_row($vbphrase['check_feed_every'], 'ttl', array(600 => construct_phrase($vbphrase['x_minutes'], 10), 1200 => construct_phrase($vbphrase['x_minutes'], 20), 1800 => construct_phrase($vbphrase['x_minutes'], 30), 3600 => construct_phrase($vbphrase['x_minutes'], 60), 7200 => construct_phrase($vbphrase['x_hours'], 2), 14400 => construct_phrase($vbphrase['x_hours'], 4), 21600 => construct_phrase($vbphrase['x_hours'], 6), 28800 => construct_phrase($vbphrase['x_hours'], 8), 36000 => construct_phrase($vbphrase['x_hours'], 10), 43200 => construct_phrase($vbphrase['x_hours'], 12)), $feed['ttl']);
print_input_row($vbphrase['maximum_items_to_fetch'], 'maxresults', $feed['maxresults'], true, 50);
print_label_row($vbphrase['search_items_for_words'], '
<div><textarea name="searchwords" rows="5" cols="50" tabindex="1">' . $feed['searchwords'] . '</textarea></div>
<input type="hidden" name="options[searchboth]" value="0" />
<input type="hidden" name="options[matchall]" value="0" />
<div class="smallfont">
<label for="cb_searchboth"><input type="checkbox" name="options[searchboth]" id="cb_searchboth" value="1" tabindex="1"' . $checked['searchboth'] . ' />' . $vbphrase['search_item_body'] . '</label>
<label for="cb_matchall"><input type="checkbox" name="options[matchall]" id="cb_matchall" value="1" tabindex="1"' . $checked['matchall'] . ' />' . $vbphrase['match_all_words'] . '</label>
</div>
', '', 'top', 'searchwords');
示例5: vb_number_format
$cells[] = vb_number_format($table['Data_free'], 0, true);
$cells[] = "<input type=\"checkbox\" name=\"tablelist[{$nullcount}]\" id=\"tablelist_{$nullcount}\" title=\"{$table['Name']}\" value=\"{$table['Name']}\" /><label for=\"tablelist_{$nullcount}\">{$vbphrase['yes']}</label>";
print_cells_row($cells);
$nullcount++;
if ($table['Engine'] == 'ISAM') {
$isamtables[] = $table['Name'];
}
}
}
if (!empty($isamtables)) {
$nullcount = 0;
print_table_break('');
print_table_header($vbphrase['isam_tables'], 0, 5);
print_description_row('<span class="smallfont">' . construct_phrase($vbphrase['you_are_running_mysql_version_x_convert_to_myisam'], $mysqlversion['version']) . '</span>');
foreach ($isamtables as $index => $value) {
print_checkbox_row($value, "isamtablelist[{$nullcount}]", false, $value);
$nullcount++;
}
}
print_table_break('');
// can use REPAIR TABLE xxxx
print_table_header($vbphrase['options']);
if (isset($isamtables[0])) {
print_yes_no_row(construct_phrase($vbphrase['convert_tables_from_x_to_y'], 'ISAM', 'MyISAM'), 'converttables', 1);
}
print_yes_no_row($vbphrase['optimize_tables'], 'optimizetables', 1);
print_yes_no_row($vbphrase['repair_tables'], 'repairtables', 1);
print_submit_row($vbphrase['continue']);
echo '<a name="fixunique"> </a>';
print_form_header('repair', 'fixunique', 0, 1, 'bla');
print_table_header($vbphrase['fix_unique_indexes']);
示例6: print_table_header
} else {
if ($phrase['varname'] == $desc) {
$pfc['desc'] = $phrase['text'];
}
}
}
} else {
print_table_header($vbphrase['add_new_profile_field_category']);
$pfc = array('profilefieldcategoryid' => 0, 'location' => '', 'displayorder' => 1, 'title' => '', 'descr' => '');
}
$trans_link = "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&fieldname=cprofilefield&t=1&varname=";
print_input_row($vbphrase['title'] . ($pfc['profilefieldcategoryid'] ? '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . "category{$pfc['profilefieldcategoryid']}_title", 1) . '</dfn>' : ''), 'title', $pfc['title'], false);
print_textarea_row($vbphrase['description'] . ($pfc['profilefieldcategoryid'] ? '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . "category{$pfc['profilefieldcategoryid']}_desc", 1) . '</dfn>' : ''), 'desc', $pfc['desc']);
print_select_row($vbphrase['location_on_profile_page_dfn'], 'location', $category_locations, $pfc['location']);
print_input_row($vbphrase['display_order'], 'displayorder', $pfc['displayorder']);
print_checkbox_row($vbphrase['allow_privacy_options'], 'allowprivacy', $pfc['allowprivacy']);
print_submit_row();
}
// #############################################################################
if ($_POST['do'] == 'displayordercats') {
$vbulletin->input->clean_array_gpc('p', array('order' => TYPE_ARRAY_UINT));
if (!empty($vbulletin->GPC['order'])) {
$sql = '';
foreach ($vbulletin->GPC['order'] as $profilefieldcategoryid => $displayorder) {
$sql .= "WHEN " . intval($profilefieldcategoryid) . " THEN " . intval($displayorder) . "\n";
}
$db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "profilefieldcategory\n\t\t\tSET displayorder = CASE profilefieldcategoryid\n\t\t\t{$sql} ELSE displayorder END\n\t\t");
define('CP_REDIRECT', 'profilefield.php?do=modifycats');
print_stop_message('saved_display_order_successfully');
} else {
$_REQUEST['do'] = 'modifycats';
示例7: htmlspecialchars_uni
$photoplog_comment = htmlspecialchars_uni($photoplog_moderate_comment['comment']);
if (empty($photoplog_title)) {
if ($photoplog_moderate_comment['file_title']) {
$photoplog_title = htmlspecialchars_uni($photoplog_moderate_comment['file_title']);
} else {
$photoplog_title = $vbphrase['photoplog_untitled'];
}
}
if (empty($photoplog_comment)) {
$photoplog_comment = $vbphrase['photoplog_not_available'];
}
$photoplog_comment = "<a href=\"" . $photoplog_location . "/index.php?" . $vbulletin->session->vars['sessionurl'] . "n=" . $photoplog_fileid . $photoplog_comment_page . "\" target=\"_blank\">" . $photoplog_title . "</a><br /><br />" . $photoplog_comment;
echo "\r\n\t\t\t\t<tr><td colspan=\"2\" class=\"tcat\">" . $vbphrase['photoplog_posted_by'] . " " . $photoplog_username . " " . $photoplog_date . " " . $photoplog_time . " " . $photoplog_click . "</td></tr>\r\n\t\t\t";
$photoplog_file_moderate = $photoplog_moderate_comment['file_moderate'];
if (!$photoplog_file_moderate) {
print_checkbox_row($photoplog_comment, "photoplog_check[{$photoplog_commentid}]", true, 1, $photoplog_thumb, '');
} else {
$photoplog_moderate_msg = "<a href=\"photoplog_file.php?" . $vbulletin->session->vars['sessionurl'] . "do=moderate\">" . $vbphrase['photoplog_approve_file'] . "</a>";
print_description_row($photoplog_moderate_msg . $photoplog_thumb, 0, 2);
}
}
if ($photoplog_cnt_bits) {
echo "\r\n\t\t\t\t<tr><td colspan=\"2\" class=\"tcat\">" . $vbphrase['photoplog_action_not_reversible'] . "</td></tr>\r\n\t\t\t";
print_description_row('
<div class="smallfont" align="center" style="font-weight: bold;">
' . $vbphrase['photoplog_action'] . ':
<label for="dw_delete"><input type="radio" name="doaction" value="delete" id="dw_delete" tabindex="1" />' . $vbphrase['photoplog_delete'] . '</label>
<label for="dw_approve"><input type="radio" name="doaction" value="approve" id="dw_approve" tabindex="1" />' . $vbphrase['photoplog_approve'] . '</label>
</div>', 0, 2);
print_submit_row($vbphrase['photoplog_submit'], $vbphrase['photoplog_check_all'], 2);
} else {
示例8: elseif
$errnote = "<br /><font color=\"red\">Invalid characters in key</font>";
} elseif ($value['empty_char_key']) {
$errnote = "<br /><font color=\"red\">Empty key!</font>";
} elseif ($value['existing_char_key']) {
$errnote = "<br /><font color=\"red\">Duplicate key.";
if ($existing["{$value['ameid']}"]['id']) {
$errnote .= "This key would clash with an existing item";
} else {
$errnote .= "This key will clash with another item you are trying to import.";
}
$errnote .= "</font>";
} else {
$errnote = "";
}
print_table_header($value['title']);
print_checkbox_row($vbphrase['import'], "import[{$x}]");
print_input_row($vbphrase['title'], "title[{$x}]", $value['title']);
print_input_row($vbphrase['description'], "description[{$x}]", $value['description'], true, 35, 255);
print_input_row($vbphrase['automediaembed_key'] . $errnote, "key[{$x}]", $value['ameid']);
print_input_row($vbphrase['automediaembed_display_order'], "displayorder[{$x}]", $value['displayorder']);
print_yes_no_row($vbphrase['automediaembed_active_desc'], "status[{$x}]", $value['status']);
print_yes_no_row($vbphrase['automediaembed_contain_desc'], "container[{$x}]", $value['container']);
print_textarea_row($vbphrase['automediaembed_search'], "findcode[{$x}]", $value['findcode']);
print_textarea_row($vbphrase['automediaembed_replace'], "replacecode[{$x}]", $value['replacecode']);
print_yes_no_row($vbphrase['automediaembed_extraction'], "extraction[{$x}]", $value['extraction']);
print_textarea_row($vbphrase['automediaembed_embedregexp'], "embedregexp[{$x}]", $value['embedregexp']);
print_textarea_row($vbphrase['automediaembed_validation'], "validation[{$x}]", $value['validation']);
$x++;
}
print_table_break();
} else {
示例9: USING
print_table_break();
print_table_header($vbphrase['prune_posts']);
print_label_row($vbphrase['title'], '<label for="cb_allposts">' . $vbphrase['delete'] . ' <input type="checkbox" name="allboxposts" tabindex="1" title="' . $vbphrase['check_all'] . '" onClick="js_check_all_posts();" checked="checked" /></label>', 'thead');
$threads = $db->query_read("
SELECT post.postid,thread.threadid,thread.title
FROM " . TABLE_PREFIX . "post AS post, " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "forum AS forum USING (forumid)
WHERE thread.threadid = post.threadid
AND thread.firstpostid <> post.postid
AND $forumcheck post.userid=" . $vbulletin->GPC['userid'] . "
ORDER BY post.threadid DESC, post.dateline DESC
");
while ($thread = $db->fetch_array($threads))
{
print_checkbox_row("<a href=\"../showthread.php?" . $vbulletin->session->vars['sessionurl'] . "p=$thread[postid]\" target=\"_blank\">$thread[title]</a> (postid $thread[postid])", "deletepost[$thread[postid]]", 1, 1);
}
print_table_break();
print_submit_row($vbphrase['submit']);
}
// ###################### Start Prune by user selected #######################
if ($_POST['do'] == 'dopruneuser')
{
require_once(DIR . '/includes/functions_log_error.php');
$vbulletin->input->clean_array_gpc('p', array(
'deletethread' => TYPE_ARRAY_BOOL,
示例10: foreach
//build a nice array with permission names
foreach ($vbulletin->bf_ugp_forumpermissions as $key => $val) {
$bitfieldnames["{$val}"] = $perm_phrase["{$key}"];
}
if (empty($_REQUEST['do'])) {
$_REQUEST['do'] = 'index';
}
// ###################### Start index ########################
if ($_REQUEST['do'] == 'index') {
print_form_header('resources', 'view');
print_table_header($vbphrase['view_forum_permissions']);
print_forum_chooser($vbphrase['forum'], 'forumid', -1, "({$vbphrase['forum']})");
print_chooser_row($vbphrase['usergroup'], 'usergroupid', 'usergroup', '', "({$vbphrase['usergroup']})");
print_label_row($vbphrase['forum_permissions'], '<label for="cb_checkall"><input type="checkbox" id="cb_checkall" name="allbox" onclick="js_check_all(this.form)" />' . $vbphrase['check_all'] . '</label>', 'thead');
foreach ($vbulletin->bf_ugp_forumpermissions as $field => $value) {
print_checkbox_row($perm_phrase["{$field}"], "checkperm[{$value}]", false, $value);
}
print_submit_row($vbphrase['find']);
}
// ###################### Start viewing resources for forums or usergroups ########################
if ($_REQUEST['do'] == 'view') {
$vbulletin->input->clean_array_gpc('r', array('checkperm' => TYPE_ARRAY_INT));
if ($vbulletin->GPC['forumid'] == -1 and $vbulletin->GPC['usergroupid'] == -1) {
print_stop_message('you_must_pick_a_usergroup_or_forum_to_check_permissions');
}
if (empty($vbulletin->GPC['checkperm'])) {
$vbulletin->GPC['checkperm'][] = 1;
}
$fpermscache = array();
$_PERMQUERY = "\r\n\tSELECT forumpermission.usergroupid, forumpermission.forumpermissions, forum.forumid, forum.title, FIND_IN_SET(forumpermission.forumid, forum.parentlist) AS ordercontrol\r\n\tFROM " . TABLE_PREFIX . "forum AS forum\r\n\tLEFT JOIN " . TABLE_PREFIX . "forumpermission AS forumpermission ON\r\n\t(FIND_IN_SET(forumpermission.forumid, forum.parentlist))\r\n\tORDER BY ordercontrol DESC\r\n\t";
$forumpermissions = $db->query_read($_PERMQUERY);
示例11: print_form_header
}
</script>
<?php
print_form_header('thread', 'dopruneuser');
print_table_header($vbphrase['prune_threads']);
print_label_row($vbphrase['title'], '<label for="cb_allthreads">' . $vbphrase['delete'] . ' <input type="checkbox" name="allboxthreads" title="' . $vbphrase['check_all'] . '" onClick="js_check_all_threads();" checked="checked" /></label>', 'thead');
$threads = $db->query_read("\n\t\tSELECT threadid,thread.title\n\t\tFROM " . TABLE_PREFIX . "thread AS thread\n\t\tLEFT JOIN " . TABLE_PREFIX . "forum AS forum USING(forumid)\n\t\tWHERE {$forumcheck} postusername = '" . $db->escape_string($username) . "'\n\t\tORDER BY thread.lastpost DESC\n\t");
while ($thread = $db->fetch_array($threads)) {
print_checkbox_row("<a href=\"" . fetch_seo_url('thread|bburl', $thread) . "\" target=\"_blank\">{$thread['title']}</a>", "deletethread[{$thread['threadid']}]", 1, 1);
}
print_table_break();
print_table_header($vbphrase['prune_posts']);
print_label_row($vbphrase['title'], '<label for="cb_allposts">' . $vbphrase['delete'] . ' <input type="checkbox" name="allboxposts" tabindex="1" title="' . $vbphrase['check_all'] . '" onClick="js_check_all_posts();" checked="checked" /></label>', 'thead');
$threads = $db->query_read("\n\t\tSELECT post.postid,thread.threadid,thread.title\n\t\tFROM " . TABLE_PREFIX . "post AS post, " . TABLE_PREFIX . "thread AS thread\n\t\tLEFT JOIN " . TABLE_PREFIX . "forum AS forum USING (forumid)\n\t\tWHERE thread.threadid = post.threadid\n\t\t\tAND thread.firstpostid <> post.postid\n\t\t\tAND {$forumcheck} post.userid=" . $vbulletin->GPC['userid'] . "\n\t\tORDER BY post.threadid DESC, post.dateline DESC\n\t");
while ($thread = $db->fetch_array($threads)) {
print_checkbox_row("<a href=\"" . fetch_seo_url('thread|bburl', $thread, array('p' => $thread['postid'])) . "#post{$thread['postid']}" . "\" target=\"_blank\">{$thread['title']}</a> (postid {$thread['postid']})", "deletepost[{$thread['postid']}]", 1, 1);
}
print_table_break();
print_submit_row($vbphrase['submit']);
}
// ###################### Start Prune by user selected #######################
if ($_POST['do'] == 'dopruneuser') {
require_once DIR . '/includes/functions_log_error.php';
$vbulletin->input->clean_array_gpc('p', array('deletethread' => TYPE_ARRAY_BOOL, 'deletepost' => TYPE_ARRAY_BOOL));
$deletethread = array_keys($vbulletin->GPC['deletethread']);
$deletepost = array_keys($vbulletin->GPC['deletepost']);
if (empty($deletethread) and empty($deletepost)) {
print_stop_message('no_matches_found');
}
if (!empty($deletethread)) {
echo '<p><b>' . $vbphrase['deleting_threads'] . '</b>';
示例12: vbdate
$photoplog_time = vbdate($vbulletin->options['timeformat'], $photoplog_moderate_file['dateline']);
$photoplog_click = "<strong>[<a href=\"" . $photoplog_location . "/edit.php?" . $vbulletin->session->vars['sessionurl'] . "n=" . $photoplog_fileid . "\" target=\"_blank\">" . $vbphrase['photoplog_click_here_to_edit'] . "</a>]</strong>";
if ($vbulletin->options['photoplog_dynamic_link']) {
$photoplog_thumb = "<img src=\"" . $photoplog_location . "/file.php?" . $vbulletin->session->vars['sessionurl'] . "n=" . $photoplog_fileid . "&w=s\" border=\"0\" />";
} else {
$photoplog_file_slink = $photoplog_location . "/" . $vbulletin->options['photoplog_upload_dir'] . "/" . $photoplog_userid . "/small/" . $photoplog_filename;
$photoplog_thumb = "<img src=\"" . $photoplog_file_slink . "\" border=\"0\" />";
}
$photoplog_thumb = "<a style=\"float: right;\" href=\"" . $photoplog_location . "/index.php?" . $vbulletin->session->vars['sessionurl'] . "n=" . $photoplog_fileid . "\" target=\"_blank\">" . $photoplog_thumb . "</a>";
$photoplog_title = htmlspecialchars_uni($photoplog_moderate_file['title']);
if (empty($photoplog_title)) {
$photoplog_title = $vbphrase['photoplog_untitled'];
}
$photoplog_title = "<a href=\"" . $photoplog_location . "/index.php?" . $vbulletin->session->vars['sessionurl'] . "n=" . $photoplog_fileid . "\" target=\"_blank\">" . $photoplog_title . "</a>";
echo "\r\n\t\t\t\t<tr><td colspan=\"2\" class=\"tcat\">" . $vbphrase['photoplog_posted_by'] . " " . $photoplog_username . " " . $photoplog_date . " " . $photoplog_time . " " . $photoplog_click . "</td></tr>\r\n\t\t\t";
print_checkbox_row($photoplog_title, "photoplog_check[{$photoplog_fileid}]", true, 1, $photoplog_thumb, '');
}
if ($photoplog_cnt_bits) {
echo "\r\n\t\t\t\t<tr><td colspan=\"2\" class=\"tcat\">" . $vbphrase['photoplog_action_not_reversible'] . "</td></tr>\r\n\t\t\t";
print_description_row('
<div class="smallfont" align="center" style="font-weight: bold;">
' . $vbphrase['photoplog_action'] . ':
<label for="dw_delete"><input type="radio" name="doaction" value="delete" id="dw_delete" tabindex="1" />' . $vbphrase['photoplog_delete'] . '</label>
<label for="dw_approve"><input type="radio" name="doaction" value="approve" id="dw_approve" tabindex="1" />' . $vbphrase['photoplog_approve'] . '</label>
</div>', 0, 2);
print_submit_row($vbphrase['photoplog_submit'], $vbphrase['photoplog_check_all'], 2);
} else {
print_description_row($vbphrase['photoplog_nothing_to_moderate'], 0, 2);
print_table_footer();
}
} else {
示例13: print_cells_row
echo "\n\t <col align=\"center\" style=\"white-space:nowrap\"></col>\n\t <col width=\"50%\" align=\"{$stylevar['left']}\"></col>\n\t <col align=\"center\" style=\"white-space:nowrap\"></col>\n\t <col align=\"center\" style=\"white-space:nowrap\"></col>\n\t ";
print_cells_row(array($vbphrase['award_name'], $vbphrase['award_description'], $vbphrase['award_icon'], $vbphrase['award_image']), 1, '', -1);
echo "\n\t <tr>\n\t\t\t<td class=\"{$bgclass}\"><strong>{$award['award_name']}</strong></td>\n\t\t\t<td class=\"{$bgclass}\"><dfn>{$award[award_desc]}</dfn></td>\n\t\t\t<td class=\"{$bgclass}\" align=\"center\"><img src=\"" . iif(substr($award[award_icon_url], 0, 7) != 'http://' and substr($award[award_icon_url], 0, 1) != '/', '../', '') . "{$award['award_icon_url']}\" border=\"0\"></td>\n\t\t\t<td class=\"{$bgclass}\" align=\"center\"><img src=\"" . iif(substr($award[award_img_url], 0, 7) != 'http://' and substr($award[award_img_url], 0, 1) != '/', '../', '') . "{$award['award_img_url']}\" border=\"0\"></td>\n\t\n\t </tr>";
print_table_footer();
// print give award to user block
print_form_header('award', 'dogiveaward');
construct_hidden_code('award_id', $vbulletin->GPC['award_id']);
construct_hidden_code('award_name', $award['award_name']);
construct_hidden_code('award_img_url', $award['award_img_url']);
print_table_header("{$vbphrase['add']} {$vbphrase['user_awards']}", 2, 0);
print_description_row($vbphrase[give_user_award_desc]);
print_input_row($vbphrase['userid'], 'awarduserid');
print_input_row($vbphrase['username'], 'awardusername');
print_textarea_row($vbphrase['award_reason'], 'issue_reason', '', 3, 33);
print_checkbox_row($vbphrase['award_sendpm'], 'award_sendpm');
print_checkbox_row($vbphrase['award_sendemail'], 'award_sendemail', 0);
print_submit_row($vbphrase['save']);
// print remove user's award block
print_form_header('award', 'doremoveissuedaward');
construct_hidden_code('award_id', $vbulletin->GPC['award_id']);
print_table_header($vbphrase['users_with_awards'], 5, 0);
echo "\n <col align=\"center\" style=\"white-space:nowrap\"></col>\n <col width=\"50%\" align=\"{$stylevar['left']}\"></col>\n <col align=\"center\" style=\"white-space:nowrap\"></col>\n <col align=\"center\" style=\"white-space:nowrap\"></col>\n <col align=\"center\" style=\"white-space:nowrap\"></col>\n ";
print_cells_row(array($vbphrase['member'], $vbphrase['award_reason'], $vbphrase['award_time'], $vbphrase['controls'], $vbphrase['remove']), 1, '', -1);
$awardusers = $db->query_read("\n\t\t\tSELECT au.*, u.username\n\t\t\tFROM " . TABLE_PREFIX . "award_user AS au\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "user AS u USING (userid)\n\t\t\tWHERE au.award_id=" . $vbulletin->GPC['award_id'] . "\n\t\t");
while ($awarduser = $db->fetch_array($awardusers)) {
$awarduser['issue_reason'] = $bbcode_parser->parse($awarduser['issue_reason']);
construct_hidden_code('issue_id', $awarduser[issueid]);
$cell = array();
$cell[] = "<b>{$awarduser['username']}</b>";
$cell[] = "{$awarduser['issue_reason']}";
$cell[] = '<span class="smallfont">' . vbdate($vbulletin->options['dateformat'], $awarduser['issue_time']) . ' ' . vbdate($vbulletin->options['timeformat'], $awarduser['issue_time']) . '</span>';
示例14: print_submit_row
print_submit_row('Run', '');
} else {
$db->query_write($vbulletin->GPC['query']);
define('SCRIPT_REDIRECT', true);
}
break;
case 'repair':
if (empty($vbulletin->GPC['tables'])) {
print_form_header('tools', 'mysql');
construct_hidden_code('type', 'repair');
print_table_header('Please select tables to repair');
print_label_row('Table', "<input type=\"checkbox\" name=\"allbox\" title=\"Check All\" onclick=\"js_check_all(this.form);\" />Check All", 'thead');
$result = $db->query_write("SHOW TABLE STATUS");
while ($currow = $db->fetch_array($result, DBARRAY_NUM)) {
if (!in_array(strtolower($currow[1]), array('heap', 'memory'))) {
print_checkbox_row($currow[0], "tables[{$currow['0']}]", 0);
}
}
print_submit_row('Repair', '');
} else {
foreach ($vbulletin->GPC['tables'] as $key => $val) {
if ($val == 1) {
echo "Repairing {$key}<br />\n";
flush();
$db->query_write("REPAIR TABLE {$key}");
echo "Repair Complete<br />\n";
}
}
echo "Overall Repair complete<br />";
define('SCRIPT_REDIRECT', true);
}
示例15: print_form_header
}
</script>
<?php
print_form_header('thread', 'dopruneuser');
print_table_header($vbphrase['prune_threads']);
print_label_row($vbphrase['title'], '<label for="cb_allthreads">' . $vbphrase['delete'] . ' <input type="checkbox" name="allboxthreads" title="' . $vbphrase['check_all'] . '" onClick="js_check_all_threads();" checked="checked" /></label>', 'thead');
$threads = $db->query_read("\n\t\tSELECT threadid,thread.title\n\t\tFROM " . TABLE_PREFIX . "thread AS thread\n\t\tLEFT JOIN " . TABLE_PREFIX . "forum AS forum USING(forumid)\n\t\tWHERE {$forumcheck} postusername = '" . $db->escape_string($username) . "'\n\t\tORDER BY thread.lastpost DESC\n\t");
while ($thread = $db->fetch_array($threads)) {
print_checkbox_row("<a href=\"../showthread.php?" . $vbulletin->session->vars['sessionurl'] . "t={$thread['threadid']}\" target=\"_blank\">{$thread['title']}</a>", "deletethread[{$thread['threadid']}]", 1, 1);
}
print_table_break();
print_table_header($vbphrase['prune_posts']);
print_label_row($vbphrase['title'], '<label for="cb_allposts">' . $vbphrase['delete'] . ' <input type="checkbox" name="allboxposts" tabindex="1" title="' . $vbphrase['check_all'] . '" onClick="js_check_all_posts();" checked="checked" /></label>', 'thead');
$threads = $db->query_read("\n\t\tSELECT post.postid,thread.threadid,thread.title\n\t\tFROM " . TABLE_PREFIX . "post AS post, " . TABLE_PREFIX . "thread AS thread\n\t\tLEFT JOIN " . TABLE_PREFIX . "forum AS forum USING (forumid)\n\t\tWHERE thread.threadid = post.threadid\n\t\t\tAND thread.firstpostid <> post.postid\n\t\t\tAND {$forumcheck} post.userid=" . $vbulletin->GPC['userid'] . "\n\t\tORDER BY post.threadid DESC, post.dateline DESC\n\t");
while ($thread = $db->fetch_array($threads)) {
print_checkbox_row("<a href=\"../showthread.php?" . $vbulletin->session->vars['sessionurl'] . "p={$thread['postid']}\" target=\"_blank\">{$thread['title']}</a> (postid {$thread['postid']})", "deletepost[{$thread['postid']}]", 1, 1);
}
print_table_break();
print_submit_row($vbphrase['submit']);
}
// ###################### Start Prune by user selected #######################
if ($_POST['do'] == 'dopruneuser') {
require_once DIR . '/includes/functions_log_error.php';
$vbulletin->input->clean_array_gpc('p', array('deletethread' => TYPE_ARRAY_BOOL, 'deletepost' => TYPE_ARRAY_BOOL));
$deletethread = array_keys($vbulletin->GPC['deletethread']);
$deletepost = array_keys($vbulletin->GPC['deletepost']);
if (empty($deletethread) and empty($deletepost)) {
print_stop_message('no_matches_found');
}
if (!empty($deletethread)) {
echo '<p><b>' . $vbphrase['deleting_threads'] . '</b>';