示例#1
0
     //we could pass a parameter to the print_select_row function to do escape when we use this array, but its
     //better to make it obvious the we're doing it and to prevent somebody from innocently reusing the
     //array for something else without similarly doing the escaping
     $clientnamelist["{$clientname['clientname']}"] = vB_String::htmlSpecialCharsUni($clientname['clientname']);
 }
 $users = vB::getDbAssertor()->getRows('api_fetchclientusers');
 $userlist = array('-1' => $vbphrase['all_users']);
 foreach ($users as $user) {
     if ($user['userid'] === '0') {
         $user['username'] = $vbphrase['guest'];
     }
     $userlist["{$user['userid']}"] = $user['username'];
 }
 $perpage_options = array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 40 => 40, 50 => 50, 100 => 100);
 if (!$vbulletin->options['enableapilog']) {
     print_warning_table($vbphrase['apilog_disabled_options']);
 }
 print_form_header('apilog', 'view');
 print_table_header($vbphrase['api_log_viewer']);
 print_select_row($vbphrase['log_entries_to_show_per_page'], 'perpage', $perpage_options, 15);
 print_select_row($vbphrase['show_only_entries_generated_by_apiclientname'], 'apiclientname', $clientnamelist, '-1');
 print_select_row($vbphrase['show_only_entries_related_to_remembered_user'], 'userid', $userlist, '-1');
 print_input_row($vbphrase['api_client_id'], 'apiclientid', '', true, 10);
 print_input_row($vbphrase['api_client_uniqueid'], 'apiclientuniqueid', '', true, 30);
 print_time_row($vbphrase['start_date'], 'startdate', 0, 0);
 print_time_row($vbphrase['end_date'], 'enddate', 0, 0);
 print_select_row($vbphrase['order_by_gcpglobal'], 'orderby', array('date' => $vbphrase['date'], 'user' => $vbphrase['user'], 'clientname' => $vbphrase['apiclientname']), 'date');
 print_submit_row($vbphrase['view'], 0);
 if (can_access_logs($vb5_config['SpecialUsers']['canpruneadminlog'], 1)) {
     print_form_header('apilog', 'prunelog');
     print_table_header($vbphrase['prune_api_log']);
示例#2
0
         print_table_start();
         print_description_row(construct_phrase($vbphrase['default_version_newer_merging_failed'], "template.php?do=docompare3&templateid={$template['templateid']}", $vbulletin->scriptpath . '&showmerge=1'));
         print_table_footer();
     } else {
         if ($template['mergestatus'] == 'merged') {
             $merge_info = vB::getDbAssertor()->getRow('templatemerge', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_SELECT, 'templateid' => $template[templateid]));
             print_table_start();
             print_description_row(construct_phrase($vbphrase['changes_made_default_merged_customized'], "template.php?do=docompare3&templateid={$template['templateid']}", "template.php?do=viewversion&id={$merge_info['savedtemplateid']}&type=historical"));
             print_table_footer();
         }
     }
     $text = $template['template_un'];
 }
 if ($updatetemplate_edit_conflict) {
     if ($vbulletin->GPC['fromeditconflict']) {
         print_warning_table($vbphrase['template_was_changed_again']);
     }
     // An edit conflict was detected in do=updatetemplate
     print_form_header('template', 'docompare', false, true, 'editconfcompform', '90%', '_new');
     print_table_header($vbphrase['edit_conflict']);
     print_description_row($vbphrase['template_was_changed']);
     construct_hidden_code('left_template_text', $vbulletin->GPC['template']);
     construct_hidden_code('right_template_text', $text);
     construct_hidden_code('do_compare_text', 1);
     construct_hidden_code('template_name', urlencode($template['title']));
     construct_hidden_code('inline', 1);
     construct_hidden_code('wrap', 0);
     print_submit_row($vbphrase['view_comparison_your_version_current_version'], false);
 }
 print_form_header('template', 'updatetemplate');
 print_column_style_code(array('width:20%', 'width:80%'));
示例#3
0
$vbulletin->input->clean_array_gpc('r', array('hookid' => vB_Cleaner::TYPE_UINT));
// ############################# LOG ACTION ###############################
log_admin_action(iif($vbulletin->GPC['hookid'] != 0, 'Hook id = ' . $vbulletin->GPC['hookid']));
// #############################################################################
// ########################### START MAIN SCRIPT ###############################
// #############################################################################
print_cp_header($vbphrase['hook_products_system']);
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'modify';
}
if (in_array($_REQUEST['do'], array('modify', 'edit', 'add', 'updateactive'))) {
    if (!$vbulletin->options['enablehooks'] or defined('DISABLE_HOOKS')) {
        if (!$vbulletin->options['enablehooks']) {
            print_warning_table($vbphrase['hooks_disabled_options']);
        } else {
            print_warning_table($vbphrase['hooks_disable_config']);
        }
    }
}
// #############################################################################
if ($_POST['do'] == 'updateactive') {
    $vbulletin->input->clean_array_gpc('p', array('order' => vB_Cleaner::TYPE_ARRAY_UINT, 'active' => vB_Cleaner::TYPE_ARRAY_UINT));
    $params = array();
    $hooks = $hook_api->getHookList();
    foreach ($hooks as $hook) {
        $params[$hook['hookid']]['hookorder'] = $vbulletin->GPC['order'][$hook['hookid']];
        $params[$hook['hookid']]['active'] = isset($vbulletin->GPC['active'][$hook['hookid']]) ? 1 : 0;
    }
    $hook_api->updateHookStatus($params);
    $_REQUEST['do'] = 'modify';
}