本文整理汇总了PHP中construct_link_code函数的典型用法代码示例。如果您正苦于以下问题:PHP construct_link_code函数的具体用法?PHP construct_link_code怎么用?PHP construct_link_code使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了construct_link_code函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: construct_user_ip_table
function construct_user_ip_table($userid, $previpaddress, $depth = 2)
{
global $vbulletin, $vbphrase;
if (VB_AREA == 'AdminCP') {
$userscript = 'usertools.php';
} else {
$userscript = 'user.php';
}
$depth--;
$ips = vB_Api::instanceInternal('user')->searchIP($userid, $depth);
$retdata = '';
// @TODO user api currently returns only 1 IP per user.
$result = array('ipaddress' => $ips['regip']);
foreach ($result as $ip) {
$retdata .= '<li>' . "<a href=\"{$userscript}?" . vB::getCurrentSession()->get('sessionurl') . "do=gethost&ip={$ip['ipaddress']}\" title=\"" . $vbphrase['resolve_address'] . "\">{$ip['ipaddress']}</a> " . construct_link_code($vbphrase['find_more_users_with_this_ip_address'], "{$userscript}?" . vB::getCurrentSession()->get('sessionurl') . "do=doips&ipaddress={$ip['ipaddress']}&hash=" . CP_SESSIONHASH) . "</li>\n";
if ($depth > 0) {
$retdata .= construct_ip_usage_table($ip['ipaddress'], $userid, $depth);
}
}
if (empty($retdata)) {
return '';
} else {
return '<ul>' . $retdata . '</ul>';
}
}
示例2: print_editor
public function print_editor($masterstyleid)
{
global $vbulletin, $vbphrase;
$addon = $masterstyleid == -2 ? '_mobile' : '';
$header = $vbphrase["stylevar_{$this->stylevarid}_name{$addon}"] ? $vbphrase["stylevar_{$this->stylevarid}_name{$addon}"] : $this->stylevarid;
$addbit = false;
if ($vbulletin->GPC['dostyleid'] == -1 or $vbulletin->GPC['dostyleid'] == -2) {
$header .= ' - <span class="smallfont">' . construct_link_code($vbphrase['edit'], "stylevar.php?" . $vbulletin->session->vars['sessionurl'] . "do=dfnedit&stylevarid=" . $this->stylevarid . "&dostyleid=" . $vbulletin->GPC['dostyleid']);
$addbit = true;
}
if ($this->inherited == -1 or $this->inherited == -2) {
if (!$addbit) {
$header .= ' - <span class="smallfont">';
} else {
$header .= ' - ';
}
$header .= (count($header) == 1 ? '<span class="smallfont">' : '') . construct_link_code($vbphrase['revert'], "stylevar.php?" . $vbulletin->session->vars['sessionurl'] . "do=confirmrevert&dostyleid=" . $vbulletin->GPC['dostyleid'] . "&stylevarid=" . $this->stylevarid . "&rootstyle=" . $this->inherited);
}
if ($addbit) {
$header .= '</span>';
}
print_table_header($header);
if ($vbphrase["stylevar_{$this->stylevarid}_description{$addon}"]) {
print_description_row($vbphrase["stylevar_{$this->stylevarid}_description{$addon}"], false, 2);
}
// once we have LSB change this to self::
$this->print_editor_form();
}
示例3: print_editor
public function print_editor()
{
global $vbulletin, $vbphrase;
$vb5_config =& vB::getConfig();
$header = $vbphrase["stylevar_{$this->stylevarid}_name"] ? $vbphrase["stylevar_{$this->stylevarid}_name"] : $this->stylevarid;
$addbit = false;
if ($vbulletin->GPC['dostyleid'] == -1) {
$header .= ' - <span class="smallfont">' . construct_link_code($vbphrase['edit'], "stylevar.php?" . vB::getCurrentSession()->get('sessionurl') . "do=dfnedit&stylevarid=" . $this->stylevarid);
$addbit = true;
}
if ($this->inherited == -1) {
if (!$addbit) {
$header .= ' - <span class="smallfont">';
$addbit = true;
} else {
$header .= ' - ';
}
$header .= construct_link_code($vbphrase['revert_gcpglobal'], "stylevar.php?" . vB::getCurrentSession()->get('sessionurl') . "do=confirmrevert&dostyleid=" . $vbulletin->GPC['dostyleid'] . "&stylevarid=" . $this->stylevarid . "&rootstyle=-1");
}
if ($addbit) {
$header .= '</span>';
}
print_table_header($header);
if ($vbphrase["stylevar_{$this->stylevarid}_description"]) {
print_description_row($vbphrase["stylevar_{$this->stylevarid}_description"], false, 2);
}
if ($vb5_config['Misc']['debug']) {
print_label_row($vbphrase['stylevarid'], $this->stylevarid);
}
// output this stylevar's inheritance level (inherited or customized)
// so that we can update the stylevar list and show inherited status
// immediately
echo '<script type="text/javascript">
window.vBulletinStylevarInheritance = window.vBulletinStylevarInheritance ? window.vBulletinStylevarInheritance : {};
window.vBulletinStylevarInheritance["' . $this->stylevarid . '"] = ' . $this->inherited . ';
</script>';
// once we have LSB change this to self::
$this->print_editor_form();
}
示例4: print_table_break
print_table_break();
print_table_header('MySQL');
print_column_style_code(array('width:30%'));
print_label_row(construct_link_code('Run Query', THIS_SCRIPT . '?do=mysql&type=query'), 'This allows you to run alter and update queries on the database');
print_label_row(construct_link_code('Repair Tables', THIS_SCRIPT . '?do=mysql&type=repair'), 'You can select tables that need repaired here');
print_label_row(construct_link_code('Reset Admin Access', THIS_SCRIPT . '?do=user&type=access'), 'Reset admin access for a user');
print_table_break();
$randnumb = vbrand(0, 100000000);
print_table_header('Other Tools');
print_column_style_code(array('width:30%'));
print_label_row(construct_link_code($vbulletin->options['bbactive'] ? 'Turn Off Forum' : 'Turn On Forum', THIS_SCRIPT . '?do=bbactive'), 'Your forum is <b>' . ($vbulletin->options['bbactive'] ? 'On' : 'Off') . '</b>');
$childcount = $db->query_first("\n\t\tSELECT COUNT(*) AS count\n\t\tFROM " . TABLE_PREFIX . "forum\n\t\tWHERE childlist = ''\n\t");
if ($childcount['count']) {
print_label_row(construct_link_code('Rebuild', THIS_SCRIPT . '?do=childlist'), 'You have forum with empty childlists, which is not good.');
}
print_label_row(construct_link_code('Default Language', THIS_SCRIPT . '?do=language'), 'Reset board default language.');
print_table_break();
print_table_header('Time');
print_column_style_code(array('width:30%'));
print_label_row('System Time', $systemdate = date('r T'));
print_label_row('Your Time', $userdate = vbdate('r T'));
print_table_footer();
} else {
if ($_REQUEST['do'] == 'xml') {
switch ($vbulletin->GPC['type']) {
case 'style':
require_once './includes/adminfunctions_template.php';
if (!($xml = file_read('./install/vbulletin-style.xml'))) {
echo '<p>Uh oh, ./install/vbulletin-style.xml doesn\'t appear to exist! Upload it and refresh the page.</p>';
break;
}
示例5: define
$db->query_write("\n\t\tDELETE FROM " . TABLE_PREFIX . "reputation\n\t\tWHERE reputationid = " . $vbulletin->GPC['reputationid']);
define('CP_REDIRECT', "adminreputation.php?do=list&u={$repinfo['userid']}");
print_stop_message('deleted_reputation_successfully');
}
// *************************************************************************************************
if ($_REQUEST['do'] == 'deletereputation') {
$vbulletin->input->clean_array_gpc('r', array('reputationid' => TYPE_INT));
print_delete_confirmation('reputation', $vbulletin->GPC['reputationid'], 'adminreputation', 'killreputation');
}
if ($_REQUEST['do'] == 'modify') {
$reputationlevels = $db->query_read("\n\t\tSELECT *\n\t\tFROM " . TABLE_PREFIX . "reputationlevel\n\t\tORDER BY minimumreputation\n\t");
print_form_header('adminreputation', 'updateminimums');
print_table_header($vbphrase['user_reputation_manager'], 3);
print_cells_row(array($vbphrase['reputation_level'], $vbphrase['minimum_reputation_level'], $vbphrase['controls']), 1);
while ($reputationlevel = $db->fetch_array($reputationlevels)) {
$reputationlevel['level'] = htmlspecialchars_uni($vbphrase['reputation' . $reputationlevel['reputationlevelid']]);
$cell = array();
$cell[] = "{$vbphrase['user']} <b>{$reputationlevel['level']}</b>";
$cell[] = "<input type=\"text\" class=\"bginput\" tabindex=\"1\" name=\"reputation[{$reputationlevel['reputationlevelid']}]\" value=\"{$reputationlevel['minimumreputation']}\" size=\"5\" />";
$cell[] = construct_link_code($vbphrase['edit'], "adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&reputationlevelid={$reputationlevel['reputationlevelid']}") . construct_link_code($vbphrase['delete'], "adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=remove&minimumreputation={$reputationlevel['minimumreputation']}");
print_cells_row($cell);
}
print_submit_row($vbphrase['update'], $vbphrase['reset'], 3);
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 40911 $
|| ####################################################################
\*======================================================================*/
示例6: preg_replace
}
$options['productexport'] = $vbphrase['export'];
$options['productdelete'] = $vbphrase['uninstall'];
$safeid = preg_replace('#[^a-z0-9_]#', '', $product['productid']);
if (file_exists(DIR . '/includes/version_' . $safeid . '.php')) {
include_once DIR . '/includes/version_' . $safeid . '.php';
}
$define_name = 'FILE_VERSION_' . strtoupper($safeid);
if (defined($define_name) and constant($define_name) !== '') {
$product['version'] = constant($define_name);
}
$i++;
print_cells_row(array($title, htmlspecialchars_uni($product['version']), htmlspecialchars_uni($product['description']), "<div align=\"" . vB_Template_Runtime::fetchStyleVar('right') . "\">\r\n\t\t\t\t<select name=\"s{$product['productid']}\" id=\"prodsel{$i}\" onchange=\"js_page_jump({$i}, '{$product['productid']}')\" class=\"bginput\">\r\n\t\t\t\t\t" . construct_select_options($options) . "\r\n\t\t\t\t</select> <input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_page_jump({$i}, '{$product['productid']}');\" />\r\n\t\t\t</div>"), false, '', -2);
}
print_table_footer();
echo '<p align="center">' . construct_link_code($vbphrase['add_import_product'], "plugin.php?" . $vbulletin->session->vars['sessionurl'] . "do=productadd") . '</p>';
}
// #############################################################################
if ($_REQUEST['do'] == 'productversioncheck') {
$vbulletin->input->clean_array_gpc('r', array('productid' => TYPE_STR));
$product = $db->query_first("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "product\r\n\t\tWHERE productid = '" . $db->escape_string($vbulletin->GPC['productid']) . "'\r\n\t");
if (!$product or empty($product['versioncheckurl'])) {
print_stop_message('invalid_product_specified');
}
$version_url = @parse_url($product['versioncheckurl']);
if (!$version_url) {
print_stop_message('invalid_version_check_url_specified');
}
if (!$version_url['port']) {
$version_url['port'] = 80;
}
示例7: vbdate
if ($forum['lastactivity'] >= $unixtoday - 86400) {
$onlinecolor = 'modyesterday';
} else {
if ($forum['lastactivity'] >= $unixtoday - 864000) {
$onlinecolor = 'modlasttendays';
} else {
if ($forum['lastactivity'] >= $unixtoday - 2592000) {
$onlinecolor = 'modsincetendays';
} else {
$onlinecolor = 'modsincethirtydays';
}
}
}
}
$lastonline = vbdate($vbulletin->options['dateformat'] . ' ' . $vbulletin->options['timeformat'], $forum['lastactivity']);
echo "\t\t\t<li><a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$forum['userid']}\" target=\"_blank\">{$forum['username']}</a>" . "\t\t\t\t<span class=\"smallfont\">(" . construct_link_code($vbphrase['edit'], "moderator.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&moderatorid={$forum['moderatorid']}&redir=showmods") . construct_link_code($vbphrase['remove'], "moderator.php?" . $vbulletin->session->vars['sessionurl'] . "do=remove&moderatorid={$forum['moderatorid']}&redir=showmods") . ")" . " - " . $vbphrase['last_online'] . " <span class=\"{$onlinecolor}\">" . $lastonline . "</span></span>\n" . "\t\t\t</li><br />\n";
}
echo "\t\t</ul>\n\t\t</ul>\n\t</li>\n\t</ul>\n";
} else {
echo $vbphrase['there_are_no_moderators'];
}
echo "</div>\n";
echo "</td>\n</tr>\n";
if (!empty($modlist)) {
print_table_footer(1, $vbphrase['total'] . ": <b>" . count($modlist) . "</b>");
} else {
print_table_footer();
}
}
// ###################### Start Remove moderator from all forums #######################
if ($_REQUEST['do'] == 'removeall') {
示例8: construct_link_code
echo $vbphrase['search_in_templates'];
?>
" onclick="window.location='template.php?<?php
echo $vbulletin->session->vars['sessionurl_js'];
?>
do=search';" />
</td>
</tr>
</table>
</div>
</div>
</form>
<?php
echo '<p align="center" class="smallfont">' . construct_link_code($vbphrase['add_new_style'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=addstyle");
if ($vbulletin->debug) {
echo construct_link_code($vbphrase['rebuild_all_styles'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=rebuild&goto=template.php?" . $vbulletin->session->vars['sessionurl']);
}
echo "</p>\n";
// search only
/*
print_form_header('template', 'modify');
print_table_header($vbphrase['search_templates']);
construct_hidden_code('searchset', -1);
construct_hidden_code('titlesonly', 0);
print_input_row($vbphrase['search_for_text'], 'searchstring', $vbulletin->GPC['searchstring']);
print_description_row('<input type="button" value="Submit with GET" onclick="window.location = (\'template.php?do=modify&searchset=-1&searchstring=\' + this.form.searchstring.value)" />');
print_submit_row($vbphrase['find']);
*/
}
// #############################################################################
// rebuilds all parent lists and id cache lists
示例9: print_form_header
}
}
$_REQUEST['do'] = 'modify';
}
// #############################################################################
// list existing ads
if ($_REQUEST['do'] == 'modify') {
print_form_header('ad', 'quickupdate');
print_column_style_code(array('width:100%', 'white-space:nowrap'));
print_table_header($vbphrase['ad_manager']);
$ad_result = $db->query("SELECT * FROM " . TABLE_PREFIX . "ad ORDER BY displayorder, title");
$ad_count = $db->num_rows($ad_result);
if ($ad_count) {
print_description_row('<label><input type="checkbox" id="allbox" checked="checked" />' . $vbphrase['toggle_active_status_for_all'] . '</label><input type="image" src="../' . $vbulletin->options['cleargifurl'] . '" name="normalsubmit" />', false, 2, 'thead" style="font-weight:normal; padding:0px 4px 0px 4px');
while ($ad = $db->fetch_array($ad_result)) {
print_label_row('<a href="ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=locate&editloc=1&ad_location=' . $ad['adlocation'] . '&adid=' . $ad['adid'] . '" title="' . $vbphrase['edit_ad'] . '">' . $ad['title'] . '</a>', '<div style="white-space:nowrap">' . '<label class="smallfont"><input type="checkbox" name="active[' . $ad['adid'] . ']" value="1"' . ($ad['active'] ? ' checked="checked"' : '') . ' />' . $vbphrase['active'] . '</label> ' . '<input type="image" src="../cpstyles/' . $vbulletin->options['cpstylefolder'] . '/move_down.gif" name="displayorderswap[' . $ad['adid'] . ',higher]" />' . '<input type="text" name="displayorder[' . $ad['adid'] . ']" value="' . $ad['displayorder'] . '" class="bginput" size="4" title="' . $vbphrase['display_order'] . '" style="text-align:' . vB_Template_Runtime::fetchStyleVar('right') . '" />' . '<input type="image" src="../cpstyles/' . $vbulletin->options['cpstylefolder'] . '/move_up.gif" name="displayorderswap[' . $ad['adid'] . ',lower]" />' . construct_link_code($vbphrase['edit'], 'ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=locate&editloc=1&ad_location=' . $ad['adlocation'] . '&adid=' . $ad['adid']) . construct_link_code($vbphrase['delete'], 'ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=delete&adid=' . $ad['adid']) . '</div>');
}
}
print_label_row('<input type="button" class="button" value="' . $vbphrase['add_new_ad'] . '" onclick="window.location=\'ad.php?' . $vbulletin->session->vars['sessionurl'] . 'do=locate\';" />', $ad_count ? '<div align="' . vB_Template_Runtime::fetchStyleVar('right') . '"><input type="submit" class="button" accesskey="s" value="' . $vbphrase['save'] . '" /> <input type="reset" class="button" accesskey="r" value="' . $vbphrase['reset'] . '" /></div>' : ' ', 'tfoot');
print_table_footer();
?>
<script type="text/javascript">
<!--
function toggle_all_active(e)
{
for (var i = 0; i < this.form.elements.length; i++)
{
if (this.form.elements[i].type == "checkbox" && this.form.elements[i].name.substr(0, 6) == "active")
{
this.form.elements[i].checked = this.checked;
}
示例10: print_usergroup_row
function print_usergroup_row($usergroup, $options)
{
global $usergroupleaders, $vbphrase, $promotions, $vbulletin;
if ($promotions["{$usergroup['usergroupid']}"]) {
$options['promote'] .= " ({$promotions[$usergroup[usergroupid]]})";
}
$cell = array();
$cell[] = "<b>{$usergroup['title']}" . iif($usergroup['canoverride'], '*') . "</b>" . iif($usergroup['ispublicgroup'], '<br /><span class="smallfont">' . $usergroup['description'] . '</span>');
$cell[] = iif($usergroup['count'], vb_number_format($usergroup['count']), '-');
$cell[] = iif($usergroup['secondarycount'], vb_number_format($usergroup['secondarycount']), '-');
if ($usergroup['ispublicgroup']) {
$cell[] = iif($usergroup['requests'], vb_number_format($usergroup['requests']), '0');
}
if ($usergroup['ispublicgroup']) {
$cell_out = '<span class="smallfont">';
if (is_array($usergroupleaders["{$usergroup['usergroupid']}"])) {
foreach ($usergroupleaders["{$usergroup['usergroupid']}"] as $usergroupleader) {
$cell_out .= "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$usergroupleader['userid']}\"><b>{$usergroupleader['username']}</b></a>" . construct_link_code($vbphrase['delete'], "usergroup.php?" . $vbulletin->session->vars['sessionurl'] . "do=removeleader&usergroupleaderid={$usergroupleader['usergroupleaderid']}") . '<br />';
}
}
$cell[] = $cell_out . '</span>';
}
$options['edit'] .= " (id: {$usergroup['usergroupid']})";
$cell[] = "\n\t<select name=\"u{$usergroup['usergroupid']}\" onchange=\"js_usergroup_jump({$usergroup['usergroupid']});\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select><input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_usergroup_jump({$usergroup['usergroupid']});\" />\n\t";
print_cells_row($cell);
}
示例11: array
$minutes = array(-1 => '*');
for ($x = 0; $x < 60; $x++) {
$minutes[] = $x;
}
if ($cron['cronid']) {
$trans_link = "phrase.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit&fieldname=cron&t=1&varname=";
// has varname appended
if (!$cron['volatile'] or $vb5_config['Misc']['debug']) {
// non volatile or in debug mode -- always editable (custom created)
print_input_row($vbphrase['title'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['titlevarname'], 1) . '</dfn>', 'title', $cron['title']);
print_textarea_row($vbphrase['description_gcpglobal'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['descvarname'], 1) . '</dfn>', 'description', $cron['description']);
print_textarea_row($vbphrase['log_phrase'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['logvarname'], 1) . '</dfn>', 'logphrase', $cron['logphrase']);
} else {
print_label_row($vbphrase['title'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['titlevarname'], 1) . '</dfn>', htmlspecialchars_uni($cron['title']));
print_label_row($vbphrase['description_gcpglobal'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['descvarname'], 1) . '</dfn>', htmlspecialchars_uni($cron['description']));
print_label_row($vbphrase['log_phrase'] . '<dfn>' . construct_link_code($vbphrase['translations'], $trans_link . $cron['logvarname'], 1) . '</dfn>', htmlspecialchars_uni($cron['logphrase']));
}
} else {
print_input_row($vbphrase['title'], 'title');
print_textarea_row($vbphrase['description_gcpglobal'], 'description');
print_textarea_row($vbphrase['log_phrase'], 'logphrase');
}
print_select_row($vbphrase['day_of_week'], 'weekday', $weekdays, $cron['weekday']);
print_select_row($vbphrase['day_of_month'], 'day', $days, $cron['day']);
print_select_row($vbphrase['hour'], 'hour', $hours, $cron['hour']);
$selects = '';
for ($x = 0; $x < 6; $x++) {
if ($x == 1) {
$minutes = array(-2 => '-') + $minutes;
unset($minutes[-1]);
}
示例12: print_cells_row
print_cells_row(array($vbphrase['title'], $vbphrase['bb_code'], $vbphrase['html'], $vbphrase['replacement'], $vbphrase['button_image'], $vbphrase['controls']), 1, '', -5);
while ($bbcode = $db->fetch_array($bbcodes)) {
$class = fetch_row_bgclass();
$altclass = iif($class == 'alt1', 'alt2', 'alt1');
$parsed_code = $parser->do_parse($bbcode['bbcodeexample'], false, false, true, false, true);
$cell = array("<b>{$bbcode['title']}</b>", "<div class=\"{$altclass}\" style=\"padding:2px; border:solid 1px; width:200px; height:75px; overflow:auto\"><span class=\"smallfont\">" . htmlspecialchars_uni($bbcode['bbcodeexample']) . '</span></div>', "<div class=\"{$altclass}\" style=\"padding:2px; border:solid 1px; width:200px; height:75px; overflow:auto\"><span class=\"smallfont\">" . htmlspecialchars_uni($parsed_code) . '</span></div>', '<iframe src="bbcode.php?do=previewbbcode&bbcodeid=' . $bbcode['bbcodeid'] . '" style="width:200px; height:75px;"></iframe>');
if ($bbcode['buttonimage']) {
$src = $bbcode['buttonimage'];
if (!preg_match('#^[a-z]+://#i', $src) and $src[0] != '/') {
$src = "../{$src}";
}
$cell[] = "<img style=\"background:buttonface; border:solid 1px highlight\" src=\"{$src}\" alt=\"\" />";
} else {
$cell[] = $vbphrase['n_a'];
}
$cell[] = construct_link_code($vbphrase['edit'], "bbcode.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&bbcodeid={$bbcode['bbcodeid']}") . construct_link_code($vbphrase['delete'], "bbcode.php?" . $vbulletin->session->vars['sessionurl'] . "do=remove&bbcodeid={$bbcode['bbcodeid']}");
print_cells_row($cell, 0, $class, -4);
}
print_submit_row($vbphrase['add_new_bb_code'], false, 6);
if (empty($donetest)) {
print_form_header('bbcode', 'test');
print_table_header($vbphrase['test_your_bb_code']);
print_textarea_row($vbphrase['enter_text_with_bb_code'], 'text', '', 15, 60);
print_submit_row($vbphrase['go']);
}
}
// ########################################################################
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:39, Wed May 30th 2012
示例13: fetch_reminders_array2
function fetch_reminders_array2()
{
// prints out all reminders for the appropriate control panel
global $vbulletin, $permissions, $vbphrase;
if ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) {
$condition = '';
} else {
$condition = 'AND allowmodcp = 1';
}
$reminders = $vbulletin->db->query_read("\n\t\tSELECT * FROM " . TABLE_PREFIX . "adminreminder\n\t\tWHERE duedate < " . (TIMENOW + 7 * 86400) . "\n\t\t{$condition} ORDER BY duedate\n\t");
if ($vbulletin->db->num_rows($reminders)) {
print_form_header(iif(VB_AREA == 'AdminCP', '../modcp/reminder', 'reminder'), 'docompleted');
print_table_header($vbphrase['adminfunctions_getreminders2_header'], 4);
print_cells_row(array($vbphrase['adminfunctions_getreminders2_duedate'], $vbphrase['event'], $vbphrase['edit'], $vbphrase['status']), 1, 0, -1);
while ($reminder = $vbulletin->db->fetch_array($reminders)) {
if ($reminder['completed'] == 0) {
if ($reminder['duedate'] < TIMENOW) {
$date = '<b class="col-i">%s</b>';
$status = '<b>' . $vbphrase['adminfunctions_getreminders2_overdue'] . '</b>';
$hint = $vbphrase['adminfunctions_getreminders2_completed'];
$checkbox = '';
} else {
$date = '%s';
$status = 'Pending';
$hint = $vbphrase['adminfunctions_getreminders2_completed'];
$checkbox = '';
}
} else {
$date = '%s';
$status = $vbphrase['adminfunctions_getreminders2_complete'];
$hint = $vbphrase['adminfunctions_getreminders2_delete'];
$checkbox = ' checked="checked" disabled="disabled"';
}
$cell = array();
$cell[] = '<p class="smallfont" style="white-space:nowrap">' . sprintf($date, vbdate("M jS 'y", $reminder['duedate'])) . '</p>';
$cell[] = '<p class="smallfont">' . $reminder['title'] . '</p>';
//$cell[] = '<span class="smallfont">'.construct_link_code($status, $link, 0, $hint) . '</span>';
$cell[] = '<p class="smallfont">' . construct_link_code($vbphrase['edit'], "reminder.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&id[{$reminder['adminreminderid']}]=1") . '</p>';
$cell[] = '<p class="smallfont" style="text-align:' . vB_Template_Runtime::fetchStyleVar('right') . '">' . $status . '<input type="checkbox" name="id[' . $reminder['adminreminderid'] . ']" value="1" tabindex="1"' . $checkbox . ' /></p>';
print_cells_row($cell, 0, '', -2);
}
print_submit_row($vbphrase['adminfunctions_getreminders2_delcomplete'], 0, 4);
}
unset($reminder);
$vbulletin->db->free_result($reminders);
}
示例14: catch
$pms = vB_Api::instanceInternal('user')->fetchUsersPms();
} catch (vB_Exception_Api $ex) {
print_stop_message2($ex->getMessage());
}
print_form_header('usertools', 'viewpmstats');
print_table_header($vbphrase['private_message_statistics_gcpuser'], 3);
print_cells_row(array($vbphrase['number_of_messages'], $vbphrase['number_of_users'], $vbphrase['controls']), 1);
$groups = array();
foreach ($pms as $pm) {
$groups["{$pm['total']}"]++;
}
foreach ($groups as $key => $total) {
$cell = array();
$cell[] = $key . iif($vbulletin->options['pmquota'], '/' . $vbulletin->options['pmquota']);
$cell[] = $total;
$cell[] = construct_link_code(construct_phrase($vbphrase['list_users_with_x_messages'], $key), "usertools.php?" . vB::getCurrentSession()->get('sessionurl') . "do=pmuserstats&total={$key}");
print_cells_row($cell);
}
print_table_footer();
}
// ############################# start PM stats #########################
if ($_REQUEST['do'] == 'pmuserstats') {
$vbulletin->input->clean_array_gpc('r', array('total' => vB_Cleaner::TYPE_UINT));
try {
$users = vB_Api::instanceInternal('user')->fetchUsersPms(array('sortby' => array('fields' => 'user.username', 'direction' => vB_dB_Query::SORT_DESC), 'total' => $vbulletin->GPC['total']));
} catch (vB_Exception_Api $ex) {
print_stop_message2($ex->getMessage());
}
if (!count($users)) {
print_stop_message2('no_users_matched_your_query');
}
示例15: print_form_header
print_form_header('', '');
while ($rank = $db->fetch_array($ranks)) {
if ($tempgroup != $rank['usergroupid']) {
if (isset($tempgroup)) {
print_table_break();
}
$tempgroup = $rank['usergroupid'];
print_table_header(iif($rank['usergroupid'] == 0, $vbphrase['all_usergroups'], $rank['title']), 5, 1);
print_cells_row(array($vbphrase['user_rank'], $vbphrase['minimum_posts'], $vbphrase['display_type'], $vbphrase['stack_rank'], $vbphrase['controls']), 1, '', -1);
}
$count = 0;
$rankhtml = '';
while ($count++ < $rank['ranklevel']) {
if (!$rank['type']) {
$rankhtml .= "<img src=\"../{$rank['rankimg']}\" border=\"0\" alt=\"\" />";
} else {
$rankhtml .= $rank['rankimg'];
}
}
$cell = array($rankhtml, vb_number_format($rank['minposts']), $rank['display'] ? $vbphrase['displaygroup'] : $vbphrase['always'], $rank['stack'] ? $vbphrase['yes'] : $vbphrase['no'], construct_link_code($vbphrase['edit'], "ranks.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&rankid={$rank['rankid']}") . construct_link_code($vbphrase['delete'], "ranks.php?" . $vbulletin->session->vars['sessionurl'] . "do=remove&rankid={$rank['rankid']}"));
print_cells_row($cell, 0, '', -1);
}
print_table_footer();
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 32878 $
|| ####################################################################
\*======================================================================*/