Changeset 353
- Timestamp:
- Mar 3, 2010, 1:42:04 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin.php
r350 r353 37 37 ' AND (`ID` != 128)'. // Skip user Neznámý 38 38 ' AND (`LastLogin` < DATE_SUB(NOW(), INTERVAL 3 MONTH))'. // Time limit 39 ' AND (NOT EXISTS (SELECT `ID` FROM `dictionary` WHERE `user`.`ID` = `dictionary`.`user`))'. // dictionary 40 ' AND (NOT EXISTS (SELECT `Id` FROM `news` WHERE `user`.`ID` = `news`.`user`))'. // news 41 ' AND (NOT EXISTS (SELECT `ID` FROM `shoutbox` WHERE `user`.`user` = `shoutbox`.`user`))'. // shoutbox 39 ' AND (NOT EXISTS (SELECT `Id` FROM `Export` WHERE `user`.`ID` = `Export`.`User`))'. // Without exports 40 ' AND (NOT EXISTS (SELECT `ID` FROM `dictionary` WHERE `user`.`ID` = `dictionary`.`user`))'. // Without dictionary words 41 ' AND (NOT EXISTS (SELECT `Id` FROM `news` WHERE `user`.`ID` = `news`.`user`))'. // Without news 42 ' AND (NOT EXISTS (SELECT `ID` FROM `shoutbox` WHERE `user`.`user` = `shoutbox`.`user`))'. // Without shoutbox messages 42 43 ''; 43 44 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `user`'.$Condition); -
trunk/download.php
r298 r353 5 5 ShowPage(); 6 6 7 function GetPercentOfTable($TableID, $Users)7 function GetPercentOfTable($TableID, $Users) 8 8 { 9 9 -
trunk/export/index.php
r329 r353 178 178 else $InitialOrder = ''; 179 179 180 $Columns = ''; 181 $Joins = ''; 182 foreach($TranslationTree as $Group) 183 if($Group['TablePrefix'] != '') 184 { 185 $Columns .= 'COALESCE(T'.$Group['Id'].'.Count, 0) + '; 186 $Joins .= ' LEFT JOIN (SELECT User, COUNT(User) as Count FROM `'.$Group['TablePrefix'].'` WHERE (Complete = 1) AND (Language <> 0) GROUP BY User) as T'.$Group['Id'].' ON user.ID=T'.$Group['Id'].'.User'; 187 } 188 $Query = 'SELECT (@I := @I + 1) AS Sequence2, TT.* FROM (SELECT ExportUser.Sequence, T.ID, T.TranslatedCount, T.user, T.XP FROM (SELECT user.ID, user.user, user.XP, ('.substr($Columns, 0, -3).') as TranslatedCount FROM `user`'.$Joins.') AS T'; 180 $Query = 'SELECT (@I := @I + 1) AS Sequence2, TT.* FROM (SELECT ExportUser.Sequence, T.ID, T.TranslatedCount, T.user, T.XP FROM (SELECT user.ID, user.user, user.XP, TranslatedCount FROM `user`) AS T'; 189 181 $Query .=' LEFT JOIN ExportUser ON ExportUser.Export = '.$_GET['ExportId'].' AND ExportUser.User=T.ID'; 190 182 $Query .=' WHERE T.TranslatedCount > 0 ORDER BY COALESCE(ExportUser.Sequence, 100000000)'.$InitialOrder.') AS TT';
Note:
See TracChangeset
for help on using the changeset viewer.