Changeset 774 for trunk/Modules/Forum
- Timestamp:
- Feb 2, 2014, 12:00:04 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Forum/Forum.php
r773 r774 235 235 if($this->System->User->Licence(LICENCE_USER)) 236 236 { 237 $DbResult = $this->System->Database->query('SELECT * FROM `ForumThread` WHERE ID='.($_GET['Thread']*1).' LIMIT 1');238 if($DbResult->num_rows > 0)239 {240 237 if(array_key_exists('text', $_POST)) 241 238 { … … 257 254 else 258 255 { 259 if ($Table == 'ForumText') 260 $this->System->Database->query('INSERT INTO `'.$Table.'` ( `User`, `UserName` , `Text` , `Date` , `IP` , `Thread` ) '. 256 if ($Table == 'ForumText') { 257 258 $DbResult = $this->System->Database->query('SELECT * FROM `ForumThread` WHERE ID='.($_GET['Thread']*1).' LIMIT 1'); 259 if($DbResult->num_rows > 0) 260 { 261 $this->System->Database->query('INSERT INTO `'.$Table.'` ( `User`, `UserName` , `Text` , `Date` , `IP` , `Thread` ) '. 261 262 ' VALUES ('.$this->System->User->Id.', "'.$this->System->User->Name. 262 263 '", "'.$Text.'", NOW(), "'.$_SERVER['REMOTE_ADDR'].'","'.$_GET['Thread'].'")'); 263 else 264 } else $Output .= ShowMessage(T('Item not found'), MESSAGE_CRITICAL); 265 } else 264 266 $this->System->Database->query('INSERT INTO `'.$Table.'` ( `User`, `UserName` , `Text` , `Date` , `IP`) '. 265 267 ' VALUES ('.$this->System->User->Id.', "'.$this->System->User->Name. … … 270 272 } else $Output .= ShowMessage('Nezadán text pro novou zprávu.', MESSAGE_CRITICAL); 271 273 $Output .= '<br/>'; 272 } else $Output .= ShowMessage(T('Item not found'), MESSAGE_CRITICAL);273 274 } else $Output .= ShowMessage('Pro vkládaní zpráv musíte byt registrováni.', MESSAGE_CRITICAL); 274 275 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.