Пример #1
0
function print_statistic_code($title, $name, $start, $end, $nullvalue = true, $scope = 'daily', $sort = 'date_desc')
{

	global $vbphrase;

	print_form_header('stats', $name);
	print_table_header($title);

	print_time_row($vbphrase['start_date'], 'start', $start, false);
	print_time_row($vbphrase['end_date'], 'end', $end, false);

	if ($name != 'activity')
	{
		print_select_row($vbphrase['scope'], 'scope', array('daily' => $vbphrase['daily'], 'weekly' => $vbphrase['weekly'], 'monthly' => $vbphrase['monthly']), $scope);
	}
	else
	{
		construct_hidden_code('scope', 'daily');
	}
	print_select_row($vbphrase['order_by'], 'sort', array(
		'date_asc'   => $vbphrase['date_ascending'],
		'date_desc'  => $vbphrase['date_descending'],
		'total_asc'  => $vbphrase['total_ascending'],
		'total_desc' => $vbphrase['total_descending'],
	), $sort);
	print_yes_no_row($vbphrase['include_empty_results'], 'nullvalue', $nullvalue);
	print_submit_row($vbphrase['go']);
}
Пример #2
0
    } else {
        $vbulletin->GPC['userid'] = 0;
    }
    // Default View Values
    if (!$vbulletin->GPC['start']) {
        $vbulletin->GPC['start'] = TIMENOW - 3600 * 24 * 30;
    }
    if (!$vbulletin->GPC['end']) {
        $vbulletin->GPC['end'] = TIMENOW;
    }
    print_form_header('adminreputation', 'dolist');
    print_table_header($vbphrase['view_reputation_comments']);
    print_input_row($vbphrase['leftfor'], 'leftfor', $vbulletin->GPC['leftfor'], 0);
    print_input_row($vbphrase['leftby'], 'leftby', $vbulletin->GPC['leftby'], 0);
    print_time_row($vbphrase['start_date'], 'start', $vbulletin->GPC['start'], false);
    print_time_row($vbphrase['end_date'], 'end', $vbulletin->GPC['end'], false);
    print_submit_row($vbphrase['go']);
}
// *************************************************************************************************
if ($_REQUEST['do'] == 'dolist') {
    require_once DIR . '/includes/functions_misc.php';
    if ($vbulletin->GPC['startstamp']) {
        $vbulletin->GPC['start'] = $vbulletin->GPC['startstamp'];
    } else {
        $vbulletin->GPC['start'] = vbmktime(0, 0, 0, $vbulletin->GPC['start']['month'], $vbulletin->GPC['start']['day'], $vbulletin->GPC['start']['year']);
    }
    if ($vbulletin->GPC['endstamp']) {
        $vbulletin->GPC['end'] = $vbulletin->GPC['endstamp'];
    } else {
        $vbulletin->GPC['end'] = vbmktime(23, 59, 59, $vbulletin->GPC['end']['month'], $vbulletin->GPC['end']['day'], $vbulletin->GPC['end']['year']);
    }
Пример #3
0
     print_form_header('qhvbmailer', 'compose_email');
     print_table_header('Compose Email');
     construct_hidden_code('act', '2');
     $sql = "SELECT * FROM " . TABLE_PREFIX . "qhvbmailer_templates WHERE orderr < 1 ORDER BY created DESC";
     $templates = $db->query_read_slave($sql);
     while ($template = $db->fetch_array($templates)) {
         $select_options_templates[$template['id']] = $template_phrases[$template['id'] . "_" . $template['varname'] . "_subject"];
     }
     $select_options_usergroups[0] = 'All Users';
     $sql = "SELECT * FROM " . TABLE_PREFIX . "usergroup";
     $usergroups = $db->query_read_slave($sql);
     while ($usergroup = $db->fetch_array($usergroups)) {
         $select_options_usergroups[$usergroup['usergroupid']] = $usergroup['title'];
     }
     print_select_row('What to send', 'template_id', $select_options_templates);
     print_time_row('When to send', 'date', TIMENOW);
     print_select_row('Who to send to', 'send_to', $select_options_usergroups);
     print_submit_row('Continue', '');
 } elseif ($_GET['act'] == 2) {
     $vbulletin->input->clean_array_gpc('p', array('template_id' => TYPE_UINT, 'date' => TYPE_ARRAY, 'send_to' => TYPE_UINT));
     if ($vbulletin->GPC['template_id'] > 0) {
         $send_when = mktime($vbulletin->GPC['date'][hour], $vbulletin->GPC['date'][minute], '00', $vbulletin->GPC['date'][month], $vbulletin->GPC['date'][day], $vbulletin->GPC['date'][year]);
         if ($db->query_write("INSERT INTO " . TABLE_PREFIX . "qhvbmailer_campaigns(created, send_when, send_to, template_id) VALUES('" . TIMENOW . "', '" . $send_when . "', '" . $vbulletin->GPC['send_to'] . "', '" . $vbulletin->GPC['template_id'] . "')")) {
             print_cp_message('Campaign scheduled!', 'qhvbmailer.php?do=manage_campaigns', 1);
         } else {
             print_cp_message('Error scheduling campaign!', 'qhvbmailer.php?do=compose_email', 2);
         }
     } else {
         print_cp_message('Template ID must be greater than zero!', 'qhvbmailer.php?do=compose_email', 2);
     }
 }
Пример #4
0
            define('CP_REDIRECT', "user.php?do=prune" . "&usergroupid=" . $vbulletin->GPC['usergroupid'] . "&daysprune=" . $vbulletin->GPC['daysprune'] . "&joindateunix={$joindateunix}" . "&minposts=" . $vbulletin->GPC['minposts']);
            print_stop_message('no_users_matched_your_query');
        }
    } else {
        print_stop_message('please_complete_required_fields');
    }
}
// ############################# start prune users #########################
if ($_REQUEST['do'] == 'prune') {
    $vbulletin->input->clean_array_gpc('r', array('usergroupid' => TYPE_UINT, 'daysprune' => TYPE_INT, 'joindateunix' => TYPE_INT, 'minposts' => TYPE_INT));
    print_form_header('user', 'pruneusers');
    print_table_header($vbphrase['user_moving_pruning_system']);
    print_description_row('<blockquote>' . $vbphrase['this_system_allows_you_to_mass_move_delete_users'] . '</blockquote>');
    print_chooser_row($vbphrase['usergroup'], 'usergroupid', 'usergroup', iif($vbulletin->GPC['usergroupid'], $vbulletin->GPC['usergroupid'], -1), $vbphrase['all_usergroups']);
    print_input_row($vbphrase['has_not_logged_on_for_xx_days'], 'daysprune', iif($vbulletin->GPC['daysprune'], $vbulletin->GPC['daysprune'], 365));
    print_time_row($vbphrase['join_date_is_before'], 'joindate', $vbulletin->GPC['joindateunix'], false, false, 'middle');
    print_input_row($vbphrase['posts_is_less_than'], 'minposts', iif($vbulletin->GPC['minposts'], $vbulletin->GPC['minposts'], '0'));
    print_label_row($vbphrase['order_by'], '<select name="order" tabindex="1" class="bginput">
		<option value="username">' . $vbphrase['username'] . '</option>
		<option value="email">' . $vbphrase['email'] . '</option>
		<option value="usergroup">' . $vbphrase['usergroup'] . '</option>
		<option value="posts">' . $vbphrase['post_count'] . '</option>
		<option value="lastactivity">' . $vbphrase['last_activity'] . '</option>
		<option value="joindate">' . $vbphrase['join_date'] . '</option>
	</select>', '', 'top', 'order');
    print_submit_row($vbphrase['find']);
}
// ############################# user change history #########################
if ($_REQUEST['do'] == 'changehistory') {
    require_once DIR . '/includes/class_userchangelog.php';
    require_once DIR . '/includes/functions_misc.php';
Пример #5
0
    define('CP_REDIRECT', 'modlog.php?do=choose');
    print_stop_message('pruned_moderator_log_successfully');
}
// ###################### Start modify #######################
if ($_REQUEST['do'] == 'choose') {
    $users = $db->query_read("\n\t\tSELECT DISTINCT moderatorlog.userid, user.username\n\t\tFROM " . TABLE_PREFIX . "moderatorlog AS moderatorlog\n\t\tINNER JOIN " . TABLE_PREFIX . "user AS user USING(userid)\n\t\tORDER BY username\n\t");
    $userlist = array('no_value' => $vbphrase['all_log_entries']);
    while ($user = $db->fetch_array($users)) {
        $userlist["{$user['userid']}"] = $user['username'];
    }
    print_form_header('modlog', 'view');
    print_table_header($vbphrase['moderator_log_viewer']);
    print_input_row($vbphrase['log_entries_to_show_per_page'], 'perpage', 15);
    print_select_row($vbphrase['show_only_entries_generated_by'], 'userid', $userlist);
    print_time_row($vbphrase['start_date'], 'startdate', 0, 0);
    print_time_row($vbphrase['end_date'], 'enddate', 0, 0);
    if (count($products = fetch_product_list()) > 1) {
        print_select_row($vbphrase['product'], 'product', array('' => $vbphrase['all_products']) + $products);
    }
    print_select_row($vbphrase['order_by'], 'orderby', array('date' => $vbphrase['date'], 'user' => $vbphrase['username']), 'date');
    print_submit_row($vbphrase['view'], 0);
    if (can_access_logs($vbulletin->config['SpecialUsers']['canpruneadminlog'], 0, '')) {
        print_form_header('modlog', 'prunelog');
        print_table_header($vbphrase['prune_moderator_log']);
        print_select_row($vbphrase['remove_entries_logged_by_user'], 'userid', $userlist);
        if (count($products) > 1) {
            print_select_row($vbphrase['product'], 'product', array('' => $vbphrase['all_products']) + $products);
        }
        print_input_row($vbphrase['remove_entries_older_than_days'], 'daysprune', 30);
        print_submit_row($vbphrase['prune_log_entries'], 0);
    }
Пример #6
0
    $resolvedip = @gethostbyaddr($vbulletin->GPC['ip']);
    if ($resolvedip == $vbulletin->GPC['ip']) {
        print_label_row($vbphrase['host_name'], '<i>' . $vbphrase['n_a'] . '</i>');
    } else {
        print_label_row($vbphrase['host_name'], "<b>{$resolvedip}</b>");
    }
    // Legacy Hook 'useradmin_gethost' Removed //
    print_table_footer();
}
// ############################# start referrers #########################
if ($_REQUEST['do'] == 'referrers') {
    print_form_header('usertools', 'showreferrers');
    print_table_header($vbphrase['referrals_guser']);
    print_description_row($vbphrase['please_input_referral_dates']);
    print_time_row($vbphrase['start_date'], 'startdate', TIMENOW - 24 * 60 * 60 * 31, 1, 0, 'middle');
    print_time_row($vbphrase['end_date'], 'enddate', TIMENOW, 1, 0, 'middle');
    print_submit_row($vbphrase['find']);
}
// ############################# start show referrers #########################
if ($_POST['do'] == 'showreferrers') {
    $vbulletin->input->clean_array_gpc('p', array('startdate' => vB_Cleaner::TYPE_ARRAY_INT, 'enddate' => vB_Cleaner::TYPE_ARRAY_INT));
    require_once DIR . '/includes/functions_misc.php';
    $datequery = '';
    if ($vbulletin->GPC['startdate']['month']) {
        $datestartText = vbmktime(intval($vbulletin->GPC['startdate']['hour']), intval($vbulletin->GPC['startdate']['minute']), 0, intval($vbulletin->GPC['startdate']['month']), intval($vbulletin->GPC['startdate']['day']), intval($vbulletin->GPC['startdate']['year']));
        $datestart = vbdate($vbulletin->options['dateformat'] . ' ' . $vbulletin->options['timeformat'], $datestartText);
    } else {
        $vbulletin->GPC['startdate'] = 0;
    }
    if ($vbulletin->GPC['enddate']['month']) {
        $dateendText = vbmktime(intval($vbulletin->GPC['enddate']['hour']), intval($vbulletin->GPC['enddate']['minute']), 0, intval($vbulletin->GPC['enddate']['month']), intval($vbulletin->GPC['enddate']['day']), intval($vbulletin->GPC['enddate']['year']));
Пример #7
0
    print_yes_no_row($vbphrase['display_avatars'], 'options[showavatars]', $user['showavatars']);
    print_yes_no_row($vbphrase['display_images'], 'options[showimages]', $user['showimages']);
    //print_yes_no_row($vbphrase['use_email_notification_by_default'], 'options[emailnotification]', $user['emailnotification']);
    print_radio_row($vbphrase['auto_subscription_mode'], 'user[autosubscribe]', array(-1 => $vbphrase['subscribe_choice_none'], 0 => $vbphrase['subscribe_choice_0'], 1 => $vbphrase['subscribe_choice_1'], 2 => $vbphrase['subscribe_choice_2'], 3 => $vbphrase['subscribe_choice_3']), $user['autosubscribe'], 'smallfont');
    print_radio_row($vbphrase['thread_display_mode'], 'threaddisplaymode', array(0 => "{$vbphrase['linear']} - {$vbphrase['oldest_first']}", 3 => "{$vbphrase['linear']} - {$vbphrase['newest_first']}", 2 => $vbphrase['hybrid'], 1 => $vbphrase['threaded']), $threaddisplaymode, 'smallfont');
    print_radio_row($vbphrase['message_editor_interface'], 'user[showvbcode]', array(0 => $vbphrase['do_not_show_editor_toolbar'], 1 => $vbphrase['show_standard_editor_toolbar'], 2 => $vbphrase['show_enhanced_editor_toolbar']), $user['showvbcode'], 'smallfont');
    construct_style_chooser($vbphrase['style'], 'user[styleid]', $user['styleid']);
    print_table_break('', $INNERTABLEWIDTH);
    // TIME FIELDS SECTION
    print_table_header($vbphrase['time_options']);
    print_description_row($vbphrase['timezone'] . ' <select name="user[timezoneoffset]" class="bginput" tabindex="1">' . construct_select_options(fetch_timezones_array(), $user['timezoneoffset']) . '</select>');
    print_label_row($vbphrase['default_view_age'], '<select name="user[daysprune]" class="bginput" tabindex="1">' . construct_select_options($pruneoptions, $user['daysprune']) . '</select>');
    print_time_row($vbphrase['join_date'], 'joindate', $user['joindate'], 0);
    print_time_row($vbphrase['last_visit'], 'lastvisit', $user['lastvisit']);
    print_time_row($vbphrase['last_activity'], 'lastactivity', $user['lastactivity']);
    print_time_row($vbphrase['last_post'], 'lastpost', $user['lastpost']);
    ($hook = vBulletinHook::fetch_hook('useradmin_edit_column2')) ? eval($hook) : false;
    ?>
	</table>
	</tr>
	<?php 
    print_table_break('', $OUTERTABLEWIDTH);
    $tableadded = 1;
    print_table_footer();
}
// ###################### Start editsig #######################
if ($_REQUEST['do'] == 'editsig') {
    if (!can_moderate(0, 'caneditsigs')) {
        print_stop_message('no_permission_signatures');
    }
    if (empty($vbulletin->GPC['userid'])) {
Пример #8
0
			else if ($announcement['forumid'] != -1 AND !can_moderate($announcement['forumid'], 'canannounce'))
			{
				print_table_header($vbphrase['no_permission_announcement']);
				print_table_break();
			}
		}

		construct_hidden_code('announcementid', $vbulletin->GPC['announcementid']);
		print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['announcement'], htmlspecialchars_uni($announcement['title']), $announcement['announcementid']));
	}

	print_forum_chooser($vbphrase['forum_and_children'], 'forumid', $announcement['forumid'], $vbphrase['all_forums']);
	print_input_row($vbphrase['title'], 'title', $announcement['title']);

	print_time_row($vbphrase['start_date'], 'startdate', $announcement['startdate'], 0);
	print_time_row($vbphrase['end_date'], 'enddate', $announcement['enddate'], 0);

	print_textarea_row($vbphrase['text'], 'pagetext', $announcement['pagetext'], 20, '75" style="width:100%');

	if ($vbulletin->GPC['announcementid'])
	{
		print_yes_no_row($vbphrase['reset_views_counter'], 'reset_views', 0);
	}

	print_yes_no_row($vbphrase['allow_bbcode'], 'announcementoptions[allowbbcode]', ($announcement['announcementoptions'] & $vbulletin->bf_misc_announcementoptions['allowbbcode'] ? 1 : 0));
	print_yes_no_row($vbphrase['allow_smilies'], 'announcementoptions[allowsmilies]', ($announcement['announcementoptions'] & $vbulletin->bf_misc_announcementoptions['allowsmilies'] ? 1 : 0));
	print_yes_no_row($vbphrase['allow_html'], 'announcementoptions[allowhtml]', ($announcement['announcementoptions'] & $vbulletin->bf_misc_announcementoptions['allowhtml'] ? 1 : 0));
	print_yes_no_row($vbphrase['automatically_parse_links_in_text'], 'announcementoptions[parseurl]', ($announcement['announcementoptions'] & $vbulletin->bf_misc_announcementoptions['parseurl'] ? 1 : 0));
	print_yes_no_row($vbphrase['show_your_signature'], 'announcementoptions[signature]', ($announcement['announcementoptions'] & $vbulletin->bf_misc_announcementoptions['signature'] ? 1 : 0));

	print_submit_row($vbphrase['save']);
Пример #9
0
if ($_REQUEST['do'] == 'search') {
    print_form_header('socialgroups', 'dosearch');
    print_table_header($vbphrase['search_social_groups']);
    print_input_row($vbphrase['key_words'], 'filtertext');
    // get category options
    $category_options = array();
    $categories = fetch_socialgroup_category_options(false, true);
    foreach ($categories as $category) {
        $category_options[$category['socialgroupcategoryid']] = $category['title'];
    }
    unset($categories);
    print_select_row($vbphrase['category_is'], 'category', $category_options, 0);
    print_input_row($vbphrase['members_greater_than'], 'members_gteq', '', true, 5);
    print_input_row($vbphrase['members_less_than'], 'members_lteq', '', true, 5);
    print_time_row($vbphrase['creation_date_is_before'], 'date_lteq', '', false);
    print_time_row($vbphrase['creation_date_is_after'], 'date_gteq', '', false);
    print_input_row($vbphrase['group_created_by'], 'creator');
    print_select_row($vbphrase['group_type'], 'type', array('' => '', 'public' => $vbphrase['group_type_public'], 'moderated' => $vbphrase['group_type_moderated'], 'inviteonly' => $vbphrase['group_type_inviteonly']));
    print_submit_row($vbphrase['search']);
    print_cp_footer();
}
// #######################################################################
if ($_REQUEST['do'] == 'groupsby' and !empty($vbulletin->GPC['userid'])) {
    if (verify_id('user', $vbulletin->GPC['userid'], false)) {
        $vbulletin->GPC['creatoruserid'] = $vbulletin->GPC['userid'];
        $_REQUEST['do'] = 'dosearch';
    } else {
        print_cp_message($vbphrase['invalid_username']);
    }
}
// #######################################################################
Пример #10
0
         $cell = array();
         $cell[] = $modpoints['username'];
         $cell[] = vb_number_format($modpoints['forums'], 2) . iif($modpoints['forums'], '<br/>' . '<span class="smallfont">' . iif($modpoints['reply_new'], '<span title="Point for new post">' . vb_number_format($modpoints['reply_new'], 2) . '</span> ') . iif($modpoints['thread_new'], '<span title="Point for new thread">' . vb_number_format($modpoints['thread_new'], 2) . '</span> ') . iif($modpoints['chars_new'], '<span title="Point for  Character/Post">' . vb_number_format($modpoints['chars_new'], 2) . '</span> ') . iif($modpoints['modlog'], '<span title="Point for mod-action">' . vb_number_format($modpoints['modlog'], 2) . '</span>') . '</span>');
         $cell[] = vb_number_format($modpoints['posting'], 2) . iif($modpoints['posting'], '<br/>' . '<span class="smallfont">' . iif($modpoints['reply_post'] + $modpoints['reply_post_other'], '<span title="Point for posting reply">' . vb_number_format($modpoints['reply_post'] + $modpoints['reply_post_other'], 2) . '</span> ') . iif($modpoints['thread_post'] + $modpoints['threadreply_post'] + $modpoints['threadview_post'] + $modpoints['thread_post_other'] + $modpoints['threadreply_post_other'] + $modpoints['threadview_post_other'], '<span title="Point for posting thread">' . vb_number_format($modpoints['thread_post'] + $modpoints['threadreply_post'] + $modpoints['threadview_post'] + $modpoints['thread_post_other'] + $modpoints['threadreply_post_other'] + $modpoints['threadview_post_other'], 2) . '</span>') . '</span>');
         $cell[] = vb_number_format($modpoints['thanks'], 2) . iif($modpoints['thanks'], '<br/>' . '<span class="smallfont">' . iif($modpoints['thanksendtime'] + $modpoints['thanksendamount'] + $modpoints['thanksendtime_other'] + $modpoints['thanksendamount_other'], '<span title="Point for sending thank">' . vb_number_format($modpoints['thanksendtime'] + $modpoints['thanksendamount'] + $modpoints['thanksendtime_other'] + $modpoints['thanksendamount_other'], 2) . '</span> ') . iif($modpoints['thankreceivetime'] + $modpoints['thankreceiveamount'] + $modpoints['thankreceivetime_other'] + $modpoints['thankreceiveamount_other'], '<span title="Point for receiving thank">' . vb_number_format($modpoints['thankreceivetime'] + $modpoints['thankreceiveamount'] + $modpoints['thankreceivetime_other'] + $modpoints['thankreceiveamount_other'], 2) . '</span> ') . '</span>');
         $cell[] = vb_number_format($modpoints['awards'], 2);
         $cell[] = vb_number_format($modpoints['total'], 2);
         print_cells_row($cell);
     }
     print_table_footer(6);
 }
 print_form_header('kbankadmin', 'salary');
 construct_hidden_code('calculate', $vbphrase['kbank_banklogs_forum_stat_calculate']);
 print_table_header($vbphrase['kbank_banklogs_forum_stat_calculate']);
 print_time_row('Please select start time', 'from', iif(is_numeric($vbulletin->GPC['from']), intval($vbulletin->GPC['from']), TIMENOW - 30 * 24 * 60 * 60));
 print_time_row('Please select end time', 'to', iif(is_numeric($vbulletin->GPC['to']), intval($vbulletin->GPC['to']), TIMENOW));
 print_description_row('Point for forums\' stuff', 0, 2, 'optiontitle');
 print_input_row('Point for 1 new post', 'points[reply_new]', $points['reply_new']);
 print_input_row('Point for 1 new thread', 'points[thread_new]', $points['thread_new']);
 print_input_row('Point for 1 character/post', 'points[chars_new]', $points['chars_new']);
 print_input_row('Point for 1 mod-action', 'points[modlog]', $points['modlog']);
 print_description_row('Point for posting', 0, 2, 'optiontitle');
 print_input_row('Point for posting 1 post in moderating forums', 'points[reply_post]', $points['reply_post']);
 print_input_row('Point for posting 1 thread in moderating forums', 'points[thread_post]', $points['thread_post']);
 print_input_row('Point for 1 reply in thread posted in moderating forums', 'points[threadreply_post]', $points['threadreply_post']);
 print_input_row('Point for 1 view in thread posted in moderating forums', 'points[threadview_post]', $points['threadview_post']);
 print_input_row('Point for posting 1 post in other forums', 'points[reply_post_other]', $points['reply_post_other']);
 print_input_row('Point for posting 1 thread in other forums', 'points[thread_post_other]', $points['thread_post_other']);
 print_input_row('Point for 1 reply in thread posted in other forums', 'points[threadreply_post_other]', $points['threadreply_post_other']);
 print_input_row('Point for 1 view in thread posted in other forums', 'points[threadview_post_other]', $points['threadview_post_other']);
 print_description_row('Point for thanks', 0, 2, 'optiontitle');
Пример #11
0
        $milestone = array('milestoneid' => 0, 'title' => '', 'description' => '', 'targetdate' => 0, 'completeddate' => 0);
    }
    $project = fetch_project_info($vbulletin->GPC['projectid'], false);
    if (!$project) {
        print_stop_message('invalid_action_specified');
    }
    print_form_header('project', 'projectmilestoneupdate');
    if ($milestone['milestoneid']) {
        print_table_header($vbphrase['edit_milestone']);
    } else {
        print_table_header($vbphrase['add_milestone']);
    }
    print_input_row("{$vbphrase['title']}<dfn>{$vbphrase['html_is_allowed']}</dfn>", 'title', $milestone['title']);
    print_textarea_row("{$vbphrase['description']}<dfn>{$vbphrase['html_is_allowed']}</dfn>", 'description', $milestone['description']);
    print_time_row("{$vbphrase['target_date']}<dfn>{$vbphrase['target_date_desc']}</dfn>", 'targetdate', $milestone['targetdate'], false);
    print_time_row("{$vbphrase['completed_date']}<dfn>{$vbphrase['completed_date_desc']}</dfn>", 'completeddate', $milestone['completeddate'], false);
    construct_hidden_code('projectid', $project['projectid']);
    construct_hidden_code('milestoneid', $milestone['milestoneid']);
    print_submit_row();
}
// ########################################################################
if ($_POST['do'] == 'projectmilestonekill') {
    $vbulletin->input->clean_array_gpc('p', array('milestoneid' => TYPE_UINT, 'destmilestoneid' => TYPE_UINT));
    $milestone = $db->query_first("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "pt_milestone\r\n\t\tWHERE milestoneid = " . $vbulletin->GPC['milestoneid']);
    $project = fetch_project_info($milestone['projectid'], false);
    if (!$project) {
        print_stop_message('invalid_action_specified');
    }
    $db->query_write("\r\n\t\tUPDATE " . TABLE_PREFIX . "pt_issue SET\r\n\t\t\tmilestoneid = " . $vbulletin->GPC['destmilestoneid'] . "\r\n\t\tWHERE milestoneid = {$milestone['milestoneid']}\r\n\t");
    $milestonedata =& datamanager_init('Pt_Milestone', $vbulletin, ERRTYPE_CP);
    $milestonedata->set_existing($milestone);
Пример #12
0
    print_time_row($vbphrase['photoplog_last_comment_after'], 'photoplog_last_comment_after');
    print_time_row($vbphrase['photoplog_last_comment_before'], 'photoplog_last_comment_before');
    print_input_row($vbphrase['photoplog_number_comments_at_least'], 'photoplog_number_comments_at_least');
    print_input_row($vbphrase['photoplog_number_comments_at_most'], 'photoplog_number_comments_at_most');
    print_input_row($vbphrase['photoplog_number_ratings_at_least'], 'photoplog_number_ratings_at_least');
    print_input_row($vbphrase['photoplog_number_ratings_at_most'], 'photoplog_number_ratings_at_most');
    $photoplog_rating_array = array("-1" => $vbphrase['photoplog_ignore'], "1" => $vbphrase['photoplog_terrible'], "2" => $vbphrase['photoplog_bad'], "3" => $vbphrase['photoplog_average'], "4" => $vbphrase['photoplog_good'], "5" => $vbphrase['photoplog_excellent']);
    print_select_row($vbphrase['photoplog_average_rating_at_least'], 'photoplog_average_rating_ge', $photoplog_rating_array, "-1");
    print_select_row($vbphrase['photoplog_average_rating_at_most'], 'photoplog_average_rating_le', $photoplog_rating_array, "-1");
    print_table_header($vbphrase['photoplog_move_destination']);
    $photoplog_destination_list_categories = array();
    photoplog_list_categories($photoplog_destination_list_categories);
    print_select_row($vbphrase['photoplog_category'], 'photoplog_destination_category', $photoplog_destination_list_categories, "-1", true, 0, false);
    print_yes_no_row($vbphrase['photoplog_make_subcategories'], 'photoplog_make_subcategories', "0");
    print_input_row($vbphrase['photoplog_destination_posted_by_id'], 'photoplog_destination_posted_by');
    print_time_row($vbphrase['photoplog_destination_posted_on'], 'photoplog_destination_posted_on');
    print_submit_row($vbphrase['photoplog_preview']);
}
if ($_REQUEST['do'] == 'domassmove' || $_REQUEST['do'] == 'preview') {
    $photoplog_input_names = array('photoplog_md' => TYPE_INT, 'photoplog_source_category' => TYPE_INT, 'photoplog_include_subcategories' => TYPE_UINT, 'photoplog_posted_by' => TYPE_STR, 'photoplog_title' => TYPE_STR, 'photoplog_description' => TYPE_STR, 'photoplog_posted_after' => TYPE_ARRAY_UINT, 'photoplog_posted_before' => TYPE_ARRAY_UINT, 'photoplog_filesize_at_least' => TYPE_UINT, 'photoplog_filesize_at_most' => TYPE_UINT, 'photoplog_width_at_least' => TYPE_UINT, 'photoplog_width_at_most' => TYPE_UINT, 'photoplog_height_at_least' => TYPE_UINT, 'photoplog_height_at_most' => TYPE_UINT, 'photoplog_number_views_at_least' => TYPE_UINT, 'photoplog_number_views_at_most' => TYPE_UINT, 'photoplog_last_comment_after' => TYPE_ARRAY_UINT, 'photoplog_last_comment_before' => TYPE_ARRAY_UINT, 'photoplog_number_comments_at_least' => TYPE_UINT, 'photoplog_number_comments_at_most' => TYPE_UINT, 'photoplog_number_ratings_at_least' => TYPE_UINT, 'photoplog_number_ratings_at_most' => TYPE_UINT, 'photoplog_average_rating_ge' => TYPE_INT, 'photoplog_average_rating_le' => TYPE_INT, 'photoplog_destination_category' => TYPE_INT, 'photoplog_make_subcategories' => TYPE_UINT, 'photoplog_destination_posted_by' => TYPE_UINT, 'photoplog_destination_posted_on' => TYPE_ARRAY_UINT);
    $photoplog_input_okay_info = array('photoplog_md' => array('photoplog_bad_input', 1, 2), 'photoplog_source_category' => array('photoplog_bad_source_category', 1, 2), 'photoplog_include_subcategories' => array('photoplog_bad_input', 1, 2), 'photoplog_posted_by' => array('photoplog_bad_posted_by_id', 1, 2), 'photoplog_title' => array('photoplog_bad_input', 1, 2), 'photoplog_description' => array('photoplog_bad_input', 1, 2), 'photoplog_posted_after' => array('photoplog_bad_date', 1, 2), 'photoplog_posted_before' => array('photoplog_bad_date', 1, 2), 'photoplog_filesize_at_least' => array('photoplog_bad_filesize', 1, 2), 'photoplog_filesize_at_most' => array('photoplog_bad_filesize', 1, 2), 'photoplog_width_at_least' => array('photoplog_bad_width', 1, 2), 'photoplog_width_at_most' => array('photoplog_bad_width', 1, 2), 'photoplog_height_at_least' => array('photoplog_bad_height', 1, 2), 'photoplog_height_at_most' => array('photoplog_bad_height', 1, 2), 'photoplog_number_views_at_least' => array('photoplog_bad_number_views', 1, 2), 'photoplog_number_views_at_most' => array('photoplog_bad_number_views', 1, 2), 'photoplog_last_comment_after' => array('photoplog_bad_date', 1, 2), 'photoplog_last_comment_before' => array('photoplog_bad_date', 1, 2), 'photoplog_number_comments_at_least' => array('photoplog_bad_number_comments', 1, 2), 'photoplog_number_comments_at_most' => array('photoplog_bad_number_comments', 1, 2), 'photoplog_number_ratings_at_least' => array('photoplog_bad_number_ratings', 1, 2), 'photoplog_number_ratings_at_most' => array('photoplog_bad_number_ratings', 1, 2), 'photoplog_average_rating_ge' => array('photoplog_bad_average_rating', 1, 2), 'photoplog_average_rating_le' => array('photoplog_bad_average_rating', 1, 2), 'photoplog_destination_category' => array('photoplog_bad_destination_category', 1), 'photoplog_make_subcategories' => array('photoplog_bad_input', 1), 'photoplog_destination_posted_by' => array('photoplog_bad_posted_by_id', 1), 'photoplog_destination_posted_on' => array('photoplog_bad_date', 1));
    $vbulletin->input->clean_array_gpc('p', $photoplog_input_names);
    $photoplog_blank_to_minus_one = array('photoplog_filesize_at_most', 'photoplog_filesize_at_least', 'photoplog_width_at_most', 'photoplog_width_at_least', 'photoplog_height_at_most', 'photoplog_height_at_least', 'photoplog_number_views_at_most', 'photoplog_number_views_at_least', 'photoplog_number_comments_at_most', 'photoplog_number_comments_at_least', 'photoplog_number_ratings_at_most', 'photoplog_number_ratings_at_least', 'photoplog_destination_posted_by');
    $photoplog_input_okay = array();
    foreach ($photoplog_input_names as $photoplog_key => $photoplog_value) {
        ${$photoplog_key} = $vbulletin->GPC[$photoplog_key];
        $photoplog_input_okay[$photoplog_key] = true;
        if (($photoplog_value == TYPE_INT || $photoplog_value == TYPE_UINT) && isset($_REQUEST[$photoplog_key]) && trim($_REQUEST[$photoplog_key]) != '' && strval(${$photoplog_key}) != trim($_REQUEST[$photoplog_key])) {
            $photoplog_input_okay[$photoplog_key] = false;
        }
        if ($photoplog_value == TYPE_ARRAY_INT || $photoplog_value == TYPE_ARRAY_UINT) {
Пример #13
0
    }
    $award = $db->query_first("\n\t\tSELECT au.*, aw.* \n\t\tFROM " . TABLE_PREFIX . "award_user AS au\n\t\tLEFT JOIN  " . TABLE_PREFIX . "award AS aw ON (aw.award_id = au.award_id)\n\t\tWHERE au.issue_id = " . $vbulletin->GPC['issue_id'] . "\n\t");
    print_form_header();
    print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['award_name'], $award['award_name'], $award['award_id']), 4, 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   ";
    print_cells_row(array($vbphrase['award_name'], $vbphrase['award_description'], $vbphrase['award_icon'], $vbphrase['award_image']), 1, '', -1);
    echo "\n  <tr>\n\t\t<td class=\"{$bgclass}\"><strong>{$award['award_name']}</strong></td>\n\t\t<td class=\"{$bgclass}\"><dfn>{$award[award_desc]}</dfn></td>\n\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<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  </tr>";
    print_table_footer();
    print_form_header('award', 'doeditissuedaward');
    construct_hidden_code('issue_id', $vbulletin->GPC['issue_id']);
    construct_hidden_code('award_id', $award['award_id']);
    print_table_header("{$vbphrase['edit']} {$vbphrase['user_awards']}", 2, 0);
    print_input_row($vbphrase['userid'], 'awarduserid', $award['userid']);
    print_input_row($vbphrase['username'], 'awardusername', $award['username']);
    print_textarea_row($vbphrase['award_reason'], 'issue_reason', $award['issue_reason'], 3, 33);
    print_time_row($vbphrase['award_time'], 'issue_time', $award['issue_time']);
    print_submit_row($vbphrase['save']);
}
// ###################### Start do give award #######################
if ($_POST['do'] == 'dogiveaward') {
    $vbulletin->input->clean_array_gpc('p', array('award_id' => TYPE_INT, 'award_name' => TYPE_STR, 'award_img_url' => TYPE_STR, 'awarduserid' => TYPE_INT, 'awardusername' => TYPE_STR, 'issue_reason' => TYPE_STR, 'award_sendpm' => TYPE_INT, 'award_sendemail' => TYPE_INT));
    if (!empty($vbulletin->GPC['awarduserid'])) {
        $user = $db->query_first("\n\t\t\tSELECT userid, username, email\n\t\t\tFROM " . TABLE_PREFIX . "user\n\t\t\tWHERE userid = " . $vbulletin->GPC['awarduserid'] . "\n\t\t");
    } else {
        if (!empty($vbulletin->GPC['awardusername'])) {
            $user = $db->query_first("\n\t\t\tSELECT userid, username\n\t\t\tFROM " . TABLE_PREFIX . "user\n\t\t\tWHERE username = '******'awardusername'] . "'\n\t\t");
        } else {
            print_stop_message('please_complete_required_fields');
        }
    }
    if (empty($user)) {