Changeset 884 for trunk/Modules/Admin/Admin.php
- Timestamp:
- Apr 8, 2020, 7:27:09 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Admin/Admin.php
r880 r884 127 127 // '(Select `ID` FROM `'.$Group['TablePrefix'].'` as `sub2` WHERE `sub2`.`Language` = 0 AND `T`.`Entry` = `sub2`.`Entry` AND `T`.`VersionStart` = `sub2`.`VersionStart`)'. 128 128 ' '; //LIMIT 1000 129 //echo $sql;130 129 $DbResult = $this->System->Database->query($sql); 131 130 echo ': <br />'.$Group['TablePrefix'].': <br />'; … … 161 160 ' WHERE `T`.`Language` = 0 '. 162 161 ' ORDER BY `T`.`VersionStart`'; //LIMIT 1000 163 //echo $sql;164 162 $DbResult = $this->System->Database->query($sql); 165 163 echo ': <br />'.$Group['TablePrefix'].': '; … … 169 167 ' WHERE `T`.`Language` = 0 AND `T`.`VersionStart` > '.$line['VersionEnd'].' AND `T`.`Entry` = '.$line['Entry']. 170 168 ' ORDER BY `T`.`VersionStart` LIMIT 1'; //LIMIT 1000 171 // echo $sql;172 169 $DbResult2 = $this->System->Database->query($sql); 173 if ($DbResult2->num_rows > 0) { 170 if ($DbResult2->num_rows > 0) 171 { 174 172 $line2 = $DbResult2->fetch_assoc(); 175 173 176 174 $Same = true; 177 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) { 175 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) 176 { 178 177 if ($this->StripText($line[$Column['Column']]) <> $this->StripText($line2[$Column['Column']])) 179 178 $Same = false; 180 179 } 181 if ($Same) { 180 if ($Same) 181 { 182 182 echo $line['ID'].'='.$line2['ID'].' ('; 183 183 // $this->System->Database->query('UPDATE `'.$Group['TablePrefix'].'` SET `Take` = NULL WHERE ID='.$line2['ID']); … … 186 186 ' WHERE `T`.`Entry` = '.$line['Entry'].' AND (`T`.`Take` = '.$line['ID'].' OR `T`.`Take` = '.$line2['ID'].') '; 187 187 $DbResult3 = $this->System->Database->query($sql); 188 while ($line3 = $DbResult3->fetch_assoc()) { 188 while ($line3 = $DbResult3->fetch_assoc()) 189 { 189 190 echo $line3['ID'].' '; 190 191 $this->System->Database->query('UPDATE `'.$Group['TablePrefix'].'` SET `VersionEnd` = '.$line2['VersionEnd'].', `VersionStart` = '.$line['VersionStart'].', `Take` = '.$line['ID'].' WHERE ID='.$line3['ID']); … … 207 208 208 209 $Output = ''; 209 if (array_key_exists('GameVersion', $_GET)) { 210 if (array_key_exists('GameVersion', $_GET)) 211 { 210 212 $_SESSION['GameVersion'] = $_GET['GameVersion']; 211 213 } … … 221 223 $Output .= 'vloženo <br />'; 222 224 } 223 if (array_key_exists('id', $_GET)) { 225 if (array_key_exists('id', $_GET)) 226 { 224 227 $Group = $TranslationTree[$_GET['id']]; 225 228 // $Output .= '<form action="?action=dbcstructure&id='.$Group['Id'].'">'; … … 242 245 $Line = $File->ReadLine(); 243 246 244 for ($i = 0; $i < substr_count($Line, ','); $i++) { 247 for ($i = 0; $i < substr_count($Line, ','); $i++) 248 { 245 249 $Output .= $i; 246 250 $Output .= '</td><td>'; 247 251 } 248 252 $Output .= '</td></tr><tr><td>'; 249 for ($i = 0; $i < substr_count($Line, ','); $i++) { 253 for ($i = 0; $i < substr_count($Line, ','); $i++) 254 { 250 255 foreach ($Group['Items'] as $GroupItem) 251 256 $Output .= ' <a href="'.$this->System->Link('/admin/?action=dbcstructure&id='. … … 259 264 $Output .= str_replace(',', '</td><td>', $Line); 260 265 $Output .= '</td></tr><tr><td>'; 261 for ($i = 0; $i < 50; $i++) { 266 for ($i = 0; $i < 50; $i++) 267 { 262 268 $Line = $File->ReadLine(); 263 269 $Output .= str_replace(',', '</td><td>', $Line); … … 267 273 $Output .= '</td></tr>'; 268 274 $Output .= '</table>'; 269 } else { 275 } else 276 { 270 277 $DbResult = $this->System->Database->query('SELECT * FROM `ClientVersion`'); 271 278 while ($Version = $DbResult->fetch_assoc())
Note:
See TracChangeset
for help on using the changeset viewer.