Exemplo n.º 1
0
/**
* Creates a new or edits and existing user record
* @param int The id of the record, 0 if a new entry
* @param string The current GET/POST option
*/
function editStudent($edit)
{
    $db =& JFactory::getDBO();
    $user =& JFactory::getUser();
    $cid = JRequest::getVar('cid', array(0), '', 'array');
    $option = JRequest::getCmd('option');
    JArrayHelper::toInteger($cid, array(0));
    $row =& JTable::getInstance('student', 'Table');
    // load the row from the db table
    if ($edit) {
        $row->load($cid[0]);
    }
    // get params definitions
    HTML_contact::editstudent($row);
}