Changeset 539 for trunk/team.php
- Timestamp:
- May 15, 2013, 12:44:32 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/team.php
r525 r539 39 39 '<td><a href="?action=team&id='.$Team['Id'].'">'.$Team['Name'].'</a></td>'. 40 40 '<td><a href="http://'.$Team['URL'].'">'.$Team['URL'].'</a></td>'. 41 '<td> '.$Team['LeaderName'].'</td>'.41 '<td><a href="'.$System->Link('/user.php?user='.$Team['Leader']).'">'.$Team['LeaderName'].'</a></td>'. 42 42 '<td><a href="userlist.php?team='.$Team['Id'].'" title="Zobrazit členy týmu">'.$Team['NumberUser'].'</a></td>'. 43 43 '<td>'.HumanDate($Team['TimeCreate']).'</td>'; … … 193 193 ImgLevelUpdate(); 194 194 195 $DbResult = $System->Database->query('SELECT *, (SELECT COUNT(*) FROM `User` WHERE `Team` = `Team`.`Id`) AS `NumberUser`, (SELECT SUM(`TranslatedCount`) FROM `User` WHERE `team` = `Team`.`Id`) AS `NumberTranslate` FROM `Team` WHERE `Id`='.$_GET['id']); 195 $DbResult = $System->Database->query('SELECT `Id`, `Name`, `Description`, `URL`, `Leader`, '. 196 '(SELECT COUNT(*) FROM `User` WHERE '. 197 '`Team` = `Team`.`Id`) AS `NumberUser`, (SELECT SUM(`TranslatedCount`) FROM `User` WHERE '. 198 '`Team` = `Team`.`Id`) AS `NumberTranslate` FROM '. 199 '`Team` WHERE `Id`='.($_GET['id'] * 1)); 196 200 if($DbResult->num_rows > 0) 197 201 { 198 202 $Team = $DbResult->fetch_assoc(); 199 $DbResult2 = $System->Database->query('SELECT `Name` FROM `User` WHERE `ID`='.$Team['Leader']);203 $DbResult2 = $System->Database->query('SELECT `Name`, `Id` FROM `User` WHERE `ID`='.$Team['Leader']); 200 204 if($DbResult2->num_rows > 0) 201 205 { 202 206 $Leader = $DbResult2->fetch_assoc(); 203 $Leader = $Leader['Name']; 204 } else $Leader = ''; 207 } else $Leader = array('Name' => '', 'Id' => 0); 205 208 206 209 $Output .='<strong>Překladatelský tým '.$Team['Name'].'</strong><br />'. 207 210 'Webové stránky: <a href="http://'.$Team['URL'].'">'.$Team['URL'].'</a><br/>'. 208 'Vedoucí: < strong>'.$Leader.'</strong><br/>'.211 'Vedoucí: <a href="'.$System->Link('/user.php?user='.$Leader['Id']).'">'.$Leader['Name'].'</a><br/>'. 209 212 'Popis: '.$Team['Description'].'<br /><br />'; 210 213 //$Output .= '<a href="export/?team='.$Team['Id'].'">Exportovat překlad týmu</a> '; … … 227 230 { 228 231 $Query .= 'SELECT (SELECT COUNT(DISTINCT(`Entry`)) FROM ('. 229 ' SELECT `T`.*FROM `'.$DbRow['TablePrefix'].'` AS `T` '.232 'SELECT `T`.`Entry` FROM `'.$DbRow['TablePrefix'].'` AS `T` '. 230 233 'WHERE (`User` IN (SELECT `ID` FROM `User` WHERE `Team` = '.$Team['Id'].')) '. 231 234 'AND (`Complete` = 1) AND (`T`.`Language`!='.$Config['OriginalLanguage'].') '. … … 233 236 ') AS `C1`) AS `Translated`, '. 234 237 '(SELECT COUNT(DISTINCT(`Entry`)) FROM ('. 235 ' SELECT `T`.* FROM `'.$DbRow['TablePrefix'].'` AS `T`'. 236 ' WHERE (`Language` = '.$Config['OriginalLanguage'].') AND (`VersionStart` <= '.$BuildNumber.') AND (`VersionEnd` >= '.$BuildNumber.')'. 238 'SELECT `T`.`Entry` FROM `'.$DbRow['TablePrefix'].'` AS `T` '. 239 'WHERE (`Language` = '.$Config['OriginalLanguage'].') '. 240 'AND (`VersionStart` <= '.$BuildNumber.') AND (`VersionEnd` >= '.$BuildNumber.')'. 237 241 ') AS `C2`) AS `Total`, "'.$DbRow['Name'].'" AS `Name` UNION '; 238 242 }
Note:
See TracChangeset
for help on using the changeset viewer.