- Timestamp:
- Feb 5, 2009, 10:39:11 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TranslationList.php
r58 r64 51 51 Zobrazit stránku: '); 52 52 53 $limitx = 0; 53 54 for($i = 0; $i < $CountLists; ++$i) 54 55 { … … 60 61 } 61 62 62 if(@$_SESSION['limitx'] > $limitx) $_SESSION['limitx'] = 0; 63 if(!array_key_exists('limitx', $_SESSION)) $_SESSION['limitx'] = 0; 64 if($_SESSION['limitx'] > $limitx) $_SESSION['limitx'] = 0; 63 65 } 64 66 -
trunk/fill_database.php
r56 r64 2 2 3 3 include('includes/global.php'); 4 include('dbc/dbc.php'); 4 5 5 6 echo('Načítání textů z databáze MaNGOSu: '); … … 55 56 } 56 57 echo('<br />Celkem: '.$Count.' Nových: '.$NewCount.'<br />'); 57 } 58 } else 59 if(($Group['DBCFileName'] != '') and ($Group['TablePrefix'] != '')) 60 { 61 echo('<br />'.$Group['Name'].'<br />'); 62 $DBCFile = new DBCReader(); 63 $DBCFile->loadDbc('dbc/'.$Group['DBCFileName'].'.dbc', $Group['DBCColumns']); 64 $ItemCount = $DBCFile->count(); 65 $NewCount = 0; 66 $Count = 0; 67 for($i = 0; $i < $ItemCount; $i++) 68 { 69 $ItemId = $DBCFile->getUint($i, 0); 70 $DbResult2 = $Database->SQLCommand('SELECT ID FROM '.$Group['TablePrefix'].' WHERE entry='.$ItemId.' AND Language=0'); 71 if(isset($DbResult2) and (mysql_num_rows($DbResult2) > 0)) 72 { 73 $DbRow2 = mysql_fetch_assoc($DbResult2); 74 //echo($DbRow2['ID']); 75 $ColumnsValues = ''; 76 foreach($Group['Items'] as $GroupItem) 77 { 78 $ColumnsValues .= ', `'.$GroupItem['Column'].'`="'.addslashes($DBCFile->getString($i, $GroupItem['DBCColumnIndex'])).'"'; 79 } 80 $ColumnsValues = substr($ColumnsValues, 2); 81 echo('. '); //'UPDATE `'.$Group['TablePrefix'].'` SET '.$ColumnsValues.' WHERE ID='.$DbRow2['ID']."<br>"); 82 //print_r($DbRow2); 83 $Database->SQLCommand('UPDATE `'.$Group['TablePrefix'].'` SET '.$ColumnsValues.' WHERE ID='.$DbRow2['ID']); 84 } else 85 { 86 $Columns = 'entry, language'; 87 $Values = $ItemId.', 0'; 88 foreach($Group['Items'] as $GroupItem) 89 { 90 $Columns .= ', `'.$GroupItem['Column'].'`'; 91 $Values .= ', "'.addslashes($DBCFile->getString($i, $GroupItem['DBCColumnIndex'])).'"'; 92 } 93 //$Columns = substr($Columns, 2); 94 //$Values = substr($Values, 2); 95 $Database->SQLCommand('INSERT `'.$Group['TablePrefix'].'` ('.$Columns.') VALUES ('.$Values.')'); 96 echo('# '); 97 //echo('INSERT `'.$Group['TablePrefix'].'` ('.$Columns.') VALUES ('.$Values.')'."<br>"); 98 $NewCount++; 99 } 100 $Count++; 101 } 102 echo('<br />Celkem: '.$Count.' Nových: '.$NewCount.'<br />'); 103 } 58 104 } 59 105 echo('Dokončeno.</div>'); -
trunk/sql/text_table_init_structure.sql
r57 r64 14 14 KEY `Take` (`Take`), 15 15 KEY `Language` ( `Language` ), 16 KEY `Complete` ( `Complete` ) ,16 KEY `Complete` ( `Complete` ) 17 17 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 18 18 -
trunk/sql/updates/63.sql
r63 r64 1 1 CREATE TABLE `news` ( 2 `Id` INT NOT NULL ,2 `Id` INT NOT NULL auto_increment, 3 3 `Time` DATETIME NOT NULL , 4 4 `User` INT NOT NULL , 5 `Text` TEXT NOT NULL 6 ) ENGINE = MYISAM ; 5 `Text` TEXT NOT NULL, 6 PRIMARY KEY (`Id`) 7 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; 7 8 8 9
Note:
See TracChangeset
for help on using the changeset viewer.