function paypal_info() { $mainframe = JFactory::getApplication(); $user = JFactory::getUser(); $db = JFactory::getDBO(); $id = JRequest::getVar('id'); $row = JTable::getInstance('formmaker', 'Table'); $row->load($id); if (!$user->authorise('core.manage.submits', 'com_formmaker')) { if ($user->authorise('core.manage.submits.own', 'com_formmaker') && $row->created_by != $user->id) { $mainframe->redirect("index.php?option=com_formmaker", JText::_('JACCESS_NOT_PERMITTED'), 'error'); } } $query = "SELECT * FROM #__formmaker_sessions where group_id=" . $db->escape((int) $id); $db->setQuery($query); $row = $db->loadObject(); if ($db->getErrorNum()) { echo $db->stderr(); return false; } HTML_contact::paypal_info($row); }