Changeset 707
- Timestamp:
- 11/10/08 17:29:57 (5 years ago)
- Location:
- racing.league
- Files:
-
- 1 added
- 7 modified
-
de.xml (modified) (1 diff)
-
files/lib/action/RacingLeagueDeletePunishAction.class.php (added)
-
files/lib/action/RacingLeagueDeleteRaceAction.class.php (modified) (1 diff)
-
files/lib/action/RacingLeagueDeleteResultAction.class.php (modified) (1 diff)
-
files/lib/action/RacingLeagueDeleteSaisonAction.class.php (modified) (1 diff)
-
files/lib/form/RacingLeaguePunishForm.class.php (modified) (4 diffs)
-
package.xml (modified) (1 diff)
-
templates/racingLeaguePunish.tpl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
racing.league/de.xml
r699 r707 4 4 <category name="wcf.racing.league"> 5 5 <!-- COPYRIGHT --> 6 <item name="wcf.racing.league.copyright"><![CDATA[<a href="http://www.mdman.de"><strong>Racing-League PlugIn© 1.0.0 beta 2</strong>, entwickelt von MDMAN</a> <strong>| Icons by illyaine</strong>]]></item>6 <item name="wcf.racing.league.copyright"><![CDATA[<a href="http://www.mdman.de"><strong>Racing-League PlugIn© 1.0.0 beta 3</strong>, entwickelt von MDMAN</a> <strong>| Icons by illyaine</strong>]]></item> 7 7 <!-- COPYRIGHT --> 8 8 -
racing.league/files/lib/action/RacingLeagueDeleteRaceAction.class.php
r691 r707 39 39 WCF::getDB()->sendQuery($sql); 40 40 41 // hier werden auch Strafen fÌr das gelöschte Rennen gelöscht 42 $sql = "DELETE FROM `wcf".WCF_N."_racing_punish` 43 WHERE `raceID` = '".escapeString($this->raceID)."' 44 "; 45 WCF::getDB()->sendQuery($sql); 46 41 47 if ($row > 0) { 42 48 WCF::getTPL()->append('userMessages', WCF::getTPL()->fetch('racingLeagueDeleteSuccess')); -
racing.league/files/lib/action/RacingLeagueDeleteResultAction.class.php
r691 r707 35 35 $res = WCF::getDB()->sendQuery($sql); 36 36 $row = WCF::getDB()->getAffectedRows($res); 37 38 // Hier werden Strafen fÌr das Rennen gelöscht 39 $sql = "DELETE FROM `wcf".WCF_N."_racing_punish` 40 WHERE `raceID` = '".escapeString($this->raceID)."' 41 "; 42 WCF::getDB()->sendQuery($sql); 37 43 38 44 // Hier wird das Rennen wieder aktiviert (drived = 0) -
racing.league/files/lib/action/RacingLeagueDeleteSaisonAction.class.php
r691 r707 63 63 "; 64 64 WCF::getDB()->sendQuery($sql); 65 66 $sql = "DELETE FROM `wcf".WCF_N."_racing_punish` 67 WHERE `saisonID` = '".escapeString($this->saisonID)."' 68 "; 69 WCF::getDB()->sendQuery($sql); 65 70 66 71 if (WCF::getSession()->getVar('activeSaisonID') == $this->saisonID) { -
racing.league/files/lib/form/RacingLeaguePunishForm.class.php
r706 r707 21 21 public $addPunish = 0; 22 22 public $raceID = 0; 23 public $driver = 0;23 public $driver = ''; 24 24 public $minusPoints = ''; 25 25 public $punishReason = ''; … … 62 62 63 63 // driver 64 if (empty($this->driver) ) {64 if (empty($this->driver) && $this->addPunish == 3) { 65 65 throw new UserInputException('driver'); 66 66 } 67 67 68 68 // punishReason 69 if (empty($this->punishReason) ) {69 if (empty($this->punishReason) && $this->addPunish == 3) { 70 70 throw new UserInputException('punishReason'); 71 71 } … … 80 80 // Hier werden alle Rennen inklusive Strafen geladen 81 81 if ($this->activeSaisonID != 0) { 82 82 $sql = "SELECT `a`.*, 83 `b`.`username`, 84 `b`.`userID`, 85 `c`.`raceName`, 86 `c`.`raceNo` 87 FROM `wcf".WCF_N."_racing_punish` AS `a` 88 LEFT JOIN `wcf".WCF_N."_user` AS `b` 89 ON (`b`.`userID` = `a`.`userID`) 90 LEFT JOIN `wcf".WCF_N."_racing_races` AS `c` 91 ON (`a`.`raceID` = `c`.`raceID`) 92 WHERE `a`.`saisonID` = '".$this->activeSaisonID."' 93 AND `c`.`saisonID` = '".$this->activeSaisonID."' 94 ORDER BY `raceNo` ASC 95 "; 96 $res = WCF::getDB()->sendQuery($sql); 97 98 while ($row = WCF::getDB()->fetchArray($res)) { 99 $this->punish[] = $row; 100 } 83 101 } 84 102 85 103 if ($this->activeSaisonID != 0 && $this->addPunish == 1) { 86 104 // Hier werden alle gefahrenen Rennen geladen (drived = 1) 87 $sql = "SELECT *105 $sql = "SELECT raceID, raceName 88 106 FROM `wcf".WCF_N."_racing_races` 89 107 WHERE `saisonID` = '".$this->activeSaisonID."' … … 112 130 parent::save(); 113 131 114 if ($this->addPunish == 1&& isset($this->driver) && isset($this->minusPoints) && isset($this->punishReason) && $this->raceID > 0 && $this->activeSaisonID != 0) {132 if ($this->addPunish == 3 && isset($this->driver) && isset($this->minusPoints) && isset($this->punishReason) && $this->raceID > 0 && $this->activeSaisonID != 0) { 115 133 116 134 $sql = "INSERT INTO `wcf".WCF_N."_racing_punish` -
racing.league/package.xml
r691 r707 11 11 <packagedescription language="de"><![CDATA[Mit diesem PlugIn werden PunktestÀnde einer laufenden Racing-Liga dargestellt.]]></packagedescription> 12 12 <packagedescription language="de-informal"><![CDATA[Mit diesem PlugIn werden PunktestÀnde einer laufenden Racing-Liga dargestellt.]]></packagedescription> 13 <version>1.0.0 beta 2</version>14 <date>2008-1 0-11</date>13 <version>1.0.0 beta 3</version> 14 <date>2008-11-11</date> 15 15 <plugin>com.woltlab.wcf</plugin> 16 16 <isunique>1</isunique> -
racing.league/templates/racingLeaguePunish.tpl
r706 r707 38 38 39 39 {if $addPunish == 1 && $raceID == 0} 40 //hier wird das Rennen ausgewÀhlt, in der die Straftat gefahren wurde41 <form method="post" action="index.php?form=RacingLeaguePunish{@SID_ARG_2ND}&addPunish= 1">40 41 <form method="post" action="index.php?form=RacingLeaguePunish{@SID_ARG_2ND}&addPunish=2"> 42 42 <div class="border content"> 43 43 <div class="container-1"> … … 50 50 </div> 51 51 <div class="formField"> 52 52 53 53 <select name='raceID'> 54 54 {foreach from=$drivedRaces item=value} 55 <option value='{$value.raceID}'>{$value.raceName}< option>55 <option value='{$value.raceID}'>{$value.raceName}</option> 56 56 {/foreach} 57 57 </select> … … 75 75 {/if} 76 76 77 {if $addPunish == 1&& $raceID > 0}78 //hier kann man die Strafe einem Fahrer zuordnen und den Grund sowie die Minuspunkte deklarieren.79 <form method="post" action="index.php?form=RacingLeaguePunish{@SID_ARG_2ND}&addPunish= 1&raceID={$raceID}">77 {if $addPunish >= 2 && $raceID > 0} 78 79 <form method="post" action="index.php?form=RacingLeaguePunish{@SID_ARG_2ND}&addPunish=3&raceID={$raceID}"> 80 80 <div class="border content"> 81 81 <div class="container-1"> 82 <h3 class="subHeadline"><img src="{@RELATIVE_WCF_DIR}icon/saisonWarningAddS.png" alt="" /> {lang}wcf.racing.league.punish.add addPunish{/lang}</h3>83 <p class="description">{lang}wcf.racing.league.punish.add addPunish.description{/lang}</p>82 <h3 class="subHeadline"><img src="{@RELATIVE_WCF_DIR}icon/saisonWarningAddS.png" alt="" /> {lang}wcf.racing.league.punish.addPunish{/lang}</h3> 83 <p class="description">{lang}wcf.racing.league.punish.addPunish.description{/lang}</p> 84 84 <br /> 85 85 <div class="formElement{if $errorField == 'driver'} formError{/if}"> … … 92 92 <option value="">----------</option> 93 93 {foreach from=$users item=value} 94 <option value='{$value.userID}' {if $driver == $value.userID}selected{/if}>{$value.username}< option>94 <option value='{$value.userID}' {if $driver == $value.userID}selected{/if}>{$value.username}</option> 95 95 {/foreach} 96 96 </select> … … 208 208 <col width="320"> 209 209 <col width="80"> 210 <col width="80"> 210 211 <col width="160"> 211 212 </colgroup> … … 213 214 <thead> 214 215 <tr class="tableHead"> 215 <td align='center'>{lang}wcf.racing.league.results.raceNo{/lang}</td>216 216 <td align='center'>{lang}wcf.racing.league.results.racename{/lang}</td> 217 <td align='center'>{lang}wcf.racing.league.results.username{/lang}</td> 218 <td align='center'>{lang}wcf.racing.league.results.minuspoints{/lang}</td> 217 219 <td align='center'>{lang}wcf.racing.league.results.punish{/lang}</td> 218 220 <td align='center'>{lang}wcf.racing.league.results.action{/lang}</td> … … 223 225 224 226 <tr class={cycle}> 225 <td align='center'><strong>{$punish.raceNo}</strong></td> 226 <td align='center'><a href="index.php?form=RacingLeaguePunish{@SID_ARG_2ND}&punishRaceID={$punish.raceID}">{$punish.raceName}</a></td> 227 <td align='center'></td> 228 <td align='center'><a href="index.php?form=RacingLeaguePunish{@SID_ARG_2ND}&punishRaceID={$punish.raceID}"><img src="{@RELATIVE_WCF_DIR}icon/saisonWarningAddS.png" alt="" title="{lang}wcf.racing.league.punish.Add{/lang}" /></a></td> 227 <td align='center'><strong>{$punish.raceName}</strong></td> 228 <td align='center'><a href="/index.php?page=User{@SID_ARG_2ND}&userID={$punish.userID}">{$punish.username}</a></td> 229 <td align='center'><strong>{$punish.minusPoints}</strong></td> 230 <td align='center'>{$punish.punishReason}</td> 231 <td align='center'> 232 <a href="index.php?form=RacingLeaguePunish{@SID_ARG_2ND}&punishRaceID={$punish.punishID}"><img src="{@RELATIVE_WCF_DIR}icon/saisonWarningEditS.png" alt="" title="{lang}wcf.racing.league.punish.edit{/lang}" /></a> 233 <a href="index.php?action=RacingLeagueDeletePunish{@SID_ARG_2ND}&punishID={$punish.punishID}" onclick="return confirm('{lang}wcf.racing.league.punish.delete.confirm{/lang}');"><img src="{@RELATIVE_WCF_DIR}icon/deleteS.png" alt="" title="{lang}wcf.racing.league.punish.delete{/lang}" /></a> 234 </td> 229 235 </tr> 230 236
