- Timestamp:
- Feb 5, 2009, 11:22:27 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export.php
r61 r66 24 24 $SelectedUsers = substr($SelectedUsers, 1); 25 25 26 $UserNames = ''; 26 27 $DbResult = $Database->SQLCommand("SELECT user FROM `user` WHERE ID IN (".$SelectedUsers.')'); 27 28 while($DbRow = mysql_fetch_assoc($DbResult)) … … 50 51 51 52 foreach($TranslationTree as $Group) 52 if( ($Group['TablePrefix'] != '') and (in_array($Group['Id'], $Setting['groups'])))53 if(in_array($Group['Id'], $Setting['groups'])) 53 54 { 55 if($Group['MangosTable'] == '') 56 { 57 $Group['MangosTable'] = $Group['TablePrefix']; 58 $Group['MangosTableIndex'] = 'entry'; 59 } 54 60 $Query = 'SELECT * FROM (SELECT * FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$WhereLang.' AND '.$WhereUsers.' ORDER BY FIELD(User, '.$SelectedUsers.')) AS T GROUP BY T.entry'; 55 61 //echo($Query); … … 60 66 $Values = ''; 61 67 foreach($Group['Items'] as $GroupItem) 62 if($GroupItem['MangosColumn'] != '') 63 $Values .= ', `'.$GroupItem['MangosColumn'].'`="'.addslashes($Line[$GroupItem['Column']]).'"'; 68 { 69 if($GroupItem['MangosColumn'] == '') $GroupItem['MangosColumn'] = $GroupItem['Column']; 70 $Values .= ', `'.$GroupItem['MangosColumn'].'`="'.addslashes($Line[$GroupItem['Column']]).'"'; 71 } 64 72 $Values = substr($Values, 2); 65 73 $Buffer .= 'UPDATE `'.$Group['MangosTable'].'` SET '.$Values.' WHERE `'.$Group['MangosTableIndex'].'` = '.$Line['entry'].';'."\n"; -
trunk/save.php
r65 r66 35 35 foreach($TranslationTree[$GroupId]['Items'] as $GroupItem) 36 36 { 37 $Columns .= ', `'.$GroupItem['Column'].'`'; 38 $Values .= ', "'.@$_POST[$GroupItem['Column']].'"'; 37 if(array_key_exists($GroupItem['Column'], $_POST)) 38 { 39 $Columns .= ', `'.$GroupItem['Column'].'`'; 40 $Values .= ', "'.@$_POST[$GroupItem['Column']].'"'; 41 } 39 42 } 40 43 //echo('INSERT INTO `'.$Table.'` ('.$Columns.') VALUES ('.$Values.')');
Note:
See TracChangeset
for help on using the changeset viewer.