Changeset 787 for trunk/Modules/User/Profile.php
- Timestamp:
- Feb 7, 2014, 5:14:20 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/Profile.php
r769 r787 157 157 if($UserLine['TeamName'] != '') 158 158 $Output .= 'Člen týmu: <a href="team/?action=team&id='.$UserLine['Team'].'"><strong>'.$UserLine['TeamName'].'</strong></a><br />'; 159 $Output .= '<fieldset><legend>Text profilu:</legend>'.str_replace("\n", '<br/>', $UserLine['Info']).'</fieldset><br/>'; 159 //user tags 160 $Query = 'SELECT * FROM `UserTag` '. 161 'LEFT JOIN `UserTagType` ON `UserTagType`.`ID` = `UserTag`.`UserTagType` '. 162 'WHERE `User` = '.($_GET['user'] * 1); 163 $DbResult = $this->Database->query($Query); 164 if ($DbResult->num_rows != 0) { 165 $Output .= 'Překladatel se řídí těmito pravidly:<br />'; 166 while ($UserTag = $DbResult->fetch_array()) { 167 $Output .= ' <li>'.$UserTag['Text'].'</li>'; 168 } 169 } 170 171 172 $Output .= '<br /><fieldset><legend>Text profilu:</legend>'.str_replace("\n", '<br/>', $UserLine['Info']).'</fieldset><br/>'; 160 173 161 174 $Output .= '<table class="Home"><tr>'. … … 165 178 $Output .= '<br />'.$this->ShowLastForum().'<br />'; 166 179 if($this->System->User->Licence(LICENCE_MODERATOR)) 167 { 168 $Output .= '<fieldset><legend>Moderování</legend>'; 169 $Output .= 'Poslední IP: <strong>'.$UserLine['LastIP'].'</strong><br />'. 180 { 181 $Output .= '<fieldset><legend>Moderování</legend>'; 182 183 $Output .= '<form action="?user='.($_GET['user'] * 1).'" method="post">Přidání tagu uživateli:<br />'; 184 $Query = 'SELECT * FROM UserTagType'; 185 $DbResult = $this->Database->query($Query); 186 while ($UserTag = $DbResult->fetch_array()) { 187 //save: 188 if (array_key_exists('save', $_POST)) { 189 if (array_key_exists('Tag'.$UserTag['ID'], $_POST)) { 190 $Query = 'SELECT * FROM `UserTag` '. 191 'WHERE `UserTagType` = '.$UserTag['ID'].' AND `User` = '.($this->System->User->Id * 1); 192 $DbResult2 = $this->Database->query($Query); 193 if ($DbResult2->num_rows == 0) { 194 $Query = 'INSERT INTO `UserTag` (`ID` ,`UserTagType`,`User` ) '. 195 'VALUES (NULL, '.$UserTag['ID'].' , '.($_GET['user']*1).')'; 196 $DbResult2 = $this->Database->query($Query); 197 } 198 } else { 199 $Query = 'DELETE FROM `UserTag` '. 200 'WHERE `UserTagType` = '.$UserTag['ID'].' AND `User` = '.($_GET['user'] * 1); 201 $DbResult2 = $this->Database->query($Query); 202 } 203 } 204 205 $Query = 'SELECT * FROM `UserTag` '. 206 'WHERE `UserTagType` = '.$UserTag['ID'].' AND `User` = '.($_GET['user'] * 1); 207 $DbResult2 = $this->Database->query($Query); 208 if ($DbResult2->num_rows != 0) $checked = true; 209 else $checked = false; 210 211 $Output .= CheckBox('Tag'.$UserTag['ID'], $checked, 'CheckBox'); 212 $Output .= ''.$UserTag['Text'].'<br />'; 213 } 214 $Output .= '<input name="save" type="submit" value="Uložit" /></form>'; 215 216 $Output .= ' PosledníIP: <strong>'.$UserLine['LastIP'].'</strong><br />'. 170 217 'Prohlížeč: <strong>'.$UserLine['UserAgent'].'</strong><br />'. 171 218 'Email: <strong>'.$UserLine['Email'].'</strong><br />';
Note:
See TracChangeset
for help on using the changeset viewer.