Exemple #1
0
function edit_blocked_ips()
{
    $mainframe = JFactory::getApplication();
    $user = JFactory::getUser();
    if (!$user->authorise('core.edit', 'com_formmaker')) {
        $mainframe->redirect("index.php?option=com_formmaker&task=blocked_ips", JText::_('JLIB_APPLICATION_ERROR_EDIT_NOT_PERMITTED'), 'error');
    }
    $db = JFactory::getDBO();
    $cid = JRequest::getVar('cid', array(0), '', 'array');
    JArrayHelper::toInteger($cid, array(0));
    $id = $cid[0];
    $row = JTable::getInstance('formmaker_blocked', 'Table');
    // load the row from the db table
    $row->load($id);
    // display function
    HTML_contact::edit_blocked_ips($row);
}