HEX
Server: Apache
System: Linux web2213.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: clinicamaciel (596848)
PHP: 7.3.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,eval,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/clinicamaciel/www/wp-content/plugins/trx_addons/cpt/sport/tpl.sc_points.default.php
<?php
/**
 * The style "default" of the Points table
 *
 * @package WordPress
 * @subpackage ThemeREX Addons
 * @since v1.6.17
 */

$args = get_query_var('trx_addons_args_sc_points');

?><div class="sc_points sc_points_<?php
			echo esc_attr($args['type']);
			if (!empty($args['class'])) echo ' '.esc_attr($args['class']); 
			?>">
	<?php
		
	trx_addons_sc_show_titles('sc_points', $args);

	// Get list of the players sorted by descending points
	$players = trx_addons_get_list_posts(false, array(
													'post_type' => TRX_ADDONS_CPT_PLAYERS_PT,
													'post_parent' => $args['competition'],
													'meta_key' => 'trx_addons_player_points',
													'orderby' => 'meta_value',
													'order' => 'DESC'
													)
											);
	if (isset($players['none'])) unset($players['none']);

	?><table width="100%" class="sc_points_table sc_points_content sc_item_content">
		<tr>
			<th class="sc_points_table_rank"><?php esc_html_e('Rank', 'trx_addons'); ?></th>
			<th class="sc_points_table_name"><?php esc_html_e('Player/Command (Club/Country)', 'trx_addons'); ?></th>
			<th class="sc_points_table_games"><?php esc_html_e('Games', 'trx_addons'); ?></th>
			<th class="sc_points_table_points"><?php esc_html_e('Points', 'trx_addons'); ?></th>
		</tr>
		<?php
		$rank = 1;
		foreach ($players as $id=>$name) {
			$meta = get_post_meta($id, 'trx_addons_options', true);
			$points = get_post_meta($id, 'trx_addons_player_points', true);
			$points_data = get_post_meta($id, 'trx_addons_player_points_data', true);
			$link = get_permalink($id);
			$logo = !empty($args['logo']) ? trx_addons_get_attachment_url(get_post_thumbnail_id($id), trx_addons_get_thumb_size('tiny')) : '';
			?><tr<?php
				if ($rank <= $args['accented_top']) echo ' class="sc_points_table_accented sc_points_table_accented_top"';
				else if ($rank > count($players) - $args['accented_bottom']) echo ' class="sc_points_table_accented sc_points_table_accented_bottom"';
			?>>
				<td class="sc_points_table_rank"><a href="<?php echo esc_url($link); ?>" class="sport_page_list_link"><?php
					echo intval($rank++); ?>.
				</a></td>
				<td class="sc_points_table_name"><a href="<?php echo esc_url($link); ?>" class="sport_page_list_link"><?php
					if (!empty($logo)) {
						$attr = trx_addons_getimagesize($logo);
						?><span class="sc_points_table_logo"><img src="<?php echo esc_url($logo); ?>" alt="" <?php if (!empty($attr[3])) trx_addons_show_layout($attr[3]);?>></span><?php
					}
					?><span class="sc_points_table_player">
						<span class="sc_points_table_player_name"><?php echo esc_html($name); ?></span><?php
						if (!empty($meta['club'])) {
							?><span class="sc_points_table_player_club"><?php echo ' ('. $meta['club'].')'; ?></span><?php
						}
					?></span>
				</a></td>
				<td class="sc_points_table_games"><a href="<?php echo esc_url($link); ?>" class="sport_page_list_link"><?php
					echo esc_html(count($points_data));
				?></a></td>
				<td class="sc_points_table_points"><a href="<?php echo esc_url($link); ?>" class="sport_page_list_link"><?php
					echo esc_html($points);
				?></a></td>
			</tr><?php
		}
	?></table><?php
	
	trx_addons_sc_show_links('sc_matches', $args);

?></div><!-- /.sc_points -->