Changeset 35 for branches/3/frontend.php
- Timestamp:
- Oct 15, 2008, 9:40:03 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3/frontend.php
r33 r35 75 75 while($DbRow = $Query->fetch_array()) 76 76 { 77 echo ''.$DbRow['Name'].' ';77 echo ''.$DbRow['Name'].'<br />'; 78 78 } 79 79 echo '</p>'; … … 119 119 </form>'; 120 120 } // END function WriteLogin 121 122 function WriteTranslation($id, $show_en = true, $show_title = true) 123 { // BEGIN function WriteTranslation 124 global $database; 125 if ($show_en) $lead_translate = count($id); else $lead_translate = 0; 126 for ($i=0;$i<count($id) ;++$i ) { //seeking translated texts 127 $translation[$i] = new translation($id[$i], $database); 128 } 129 //seeking en text 130 if ($show_en) { 131 $translation[count($id)] = new translation($translation[0]->data['en_Id'], $database); 132 if ($translation[0]->data['en_Id'] == $translation[count($id)]->data['en_Id']) { 133 unset($translation[count($id)]); 134 $lead_translate = 0; 135 } 136 } 137 echo '<table>'; 138 139 foreach ($translation[$lead_translate]->text as $key=>$value) { 140 echo '<tr>'; 141 //writening colum name 142 if ($show_title) echo '<td>'.$key.'</td>'; 143 //writening texts 144 for ($i=count($translation)-1;$i>-1 ;--$i ) { 145 if (isset($translation[$i]->text[$key])) 146 echo '<td width="200">'.htmlspecialchars($translation[$i]->text[$key]).'</td>'; 147 else 148 echo '<td width="200"> </td>'; 149 } 150 echo '</tr>'; 151 } 152 echo '</table>'; 153 } // END function WriteTranslation 121 154 122 155 ?>
Note:
See TracChangeset
for help on using the changeset viewer.