Changeset 455 for trunk/form.php
- Timestamp:
- Apr 13, 2010, 10:03:12 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/form.php
r443 r455 30 30 $TextID = $_GET['ID'] * 1; 31 31 32 $DbResult = $ Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE `ID` = '.$TextID);33 $Line = mysql_fetch_assoc($DbResult);32 $DbResult = $System->Database->query('SELECT * FROM `'.$Table.'` WHERE `ID` = '.$TextID); 33 $Line = $DbResult->fetch_assoc(); 34 34 if(!$Line) ErrorMessage('Překlad nenalezen.'); 35 35 36 $DbResult = $ Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`Language` = 0) AND (`Entry` = '.$Line['Entry'].') AND (`VersionEnd` = '.$Line['VersionEnd'].') LIMIT 1');37 $LineAJ = mysql_fetch_assoc($DbResult);36 $DbResult = $System->Database->query('SELECT * FROM `'.$Table.'` WHERE (`Language` = 0) AND (`Entry` = '.$Line['Entry'].') AND (`VersionEnd` = '.$Line['VersionEnd'].') LIMIT 1'); 37 $LineAJ = $DbResult->fetch_assoc(); 38 38 if(!$Line) ErrorMessage('Anglický originál k překladu nenalezen.'); 39 39 40 $IDUser = $ Database->SQLCommand('SELECT * FROM `User` WHERE `ID` = '.$Line['User']);41 $LineUser = mysql_fetch_array($IDUser);40 $IDUser = $System->Database->query('SELECT * FROM `User` WHERE `ID` = '.$Line['User']); 41 $LineUser = $IDUser->fetch_array(); 42 42 43 43 echo('Skupina: <strong>'.$TranslationTree[$GroupId]['Name'].'</strong><br />'); … … 47 47 if(($Line['Take'] <> 0) and ($Line['Take'] <> $Line['ID'])) 48 48 { 49 $Language = mysql_fetch_assoc($Database->SQLCommand('SELECT `Language`,`VersionStart`,`VersionEnd` FROM `'.$Table.'` WHERE `ID` = '.$Line['Take'])); 49 $DbResult = $System->Database->query('SELECT `Language`,`VersionStart`,`VersionEnd` FROM `'.$Table.'` WHERE `ID` = '.$Line['Take']); 50 $Language = $DbResult->fetch_assoc(); 50 51 // echo $Language['Language'].' '.$Line['Take']; 51 52 if($Language['Language'] <> 0) … … 63 64 echo('<br />'); 64 65 65 $DbResult = $ Database->SQLCommand('SELECT COUNT(*) FROM `'.$Table.'` WHERE (`Entry` = '.$Line['Entry'].') AND (`Language` <> 0) AND (`Complete` = 1)');66 $Version = mysql_fetch_row($DbResult);66 $DbResult = $System->Database->query('SELECT COUNT(*) FROM `'.$Table.'` WHERE (`Entry` = '.$Line['Entry'].') AND (`Language` <> 0) AND (`Complete` = 1)'); 67 $Version = $DbResult->fetch_row(); 67 68 $Version = $Version[0]; 68 69 if($Version > 0) … … 75 76 <option value="-1">Vyberte text k porovnání</option> 76 77 <option value="-1">Zobrazit/porovnat všechny</option>'); 77 $DataID = $ Database->SQLCommand('SELECT *, (SELECT `User`.`Name` AS `UserName` FROM `User` WHERE `User`.`ID` = `'.$Table.'`.`User`) AS `UserName` FROM `'.$Table.'` WHERE (`Entry` = '.$Line['Entry'].') AND (`ID` <> '.$Line['ID'].') AND (`Complete` = 1)');78 while($version = mysql_fetch_array($DataID))78 $DataID = $System->Database->query('SELECT *, (SELECT `User`.`Name` AS `UserName` FROM `User` WHERE `User`.`ID` = `'.$Table.'`.`User`) AS `UserName` FROM `'.$Table.'` WHERE (`Entry` = '.$Line['Entry'].') AND (`ID` <> '.$Line['ID'].') AND (`Complete` = 1)'); 79 while($version = $DataID->fetch_array()) 79 80 { 80 81 if ($version['ID'] == $Line['Take']) echo('<option value="'.$version['ID'].'">'.$version['ID'].' - '.$version['User'].' (převzato)</option>');
Note:
See TracChangeset
for help on using the changeset viewer.