Hello
Here is my local server config:
PHP 5.1.6, Apache 2.0.59, MySQL 5.0.24a and phpmyadmin 2.8.2.4
Here are the codes which arent working. I have tried 'or die(mysql_error())' but no error was given but it did die sometimes.
If you give help that let it work ill pay you for it. It just frihs, but its about the idea
Grtx and thx in advance
Edit: This code is developed for joomla 1.5
Last edited by devroom on Mon Oct 02, 2006 7:19 am; edited 1 time in total
Here is my local server config:
PHP 5.1.6, Apache 2.0.59, MySQL 5.0.24a and phpmyadmin 2.8.2.4
Here are the codes which arent working. I have tried 'or die(mysql_error())' but no error was given but it did die sometimes.
| Code: |
| $query = "UPDATE #__pms SET timezone = '$timezone', mailonnew = '$mailonnew', blocked = '$blocklist'\n WHERE userid = '$user_id'";
$db->setQuery($query); |
| Code: |
| //receipent has space left for a message?
$query = "SELECT COUNT(*) FROM #__pms \n" . "WHERE toid = '$receiver'"; $db->setQuery($query) or die (mysql_error()); $total = $db->loadResult() or die (mysql_error()); if ($total < $config['maxmessages'] || $system) { $query = "INSERT INTO #__pms (`id`, `toid`, `fromid`, `subject`, `message`, `inbox`, `outbox`, `readed`, `system`, `disablereply`, `datetime`) \n" . "VALUES ('', '$receiver', '$user_id', '$subject', '$message', '1', '1', '0', '$disable', '$system', '$datetime') "; $db->setQuery($query) or die ('not written because: '.mysql_error()); if (!$db->query()) { JError::raiseError( 500, $db->stderror()); } |
| Code: |
| $query = "SELECT id, toid, fromid, subject, message, inbox, outbox, readed, system, disablereply, datetime FROM #__pms WHERE id = '$messageid' ";
$db->setQuery($query); $result = $db->loadRow(); if (!$db->query()) { JError::raiseError( 500, $db->stderror()); } #TODO Make user able to read. Somehow its not working //Can user view choosen message? if (!$result) { $mainframe->redirect( "index.php?option=com_pms&Itemid=$Itemid" , JText::_('MUST SELECT') ).$messageid; exit; } else if ($result['toid'] == $user_id || $result['fromid'] == $user_id) { $ok = 1; } else { $mainframe->redirect( 'index.php?option=com_pms&Itemid='.$Itemid.'&t='.$result['toid'] , JText::_('MUST SELECT') ); exit; |
If you give help that let it work ill pay you for it. It just frihs, but its about the idea
Grtx and thx in advance
Edit: This code is developed for joomla 1.5
Last edited by devroom on Mon Oct 02, 2006 7:19 am; edited 1 time in total
