Example #1
0
# You should have received a copy of the GNU
# General Public License along with Exponent; if
# not, write to:
#
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307  USA
#
# $Id: edit.php,v 1.3 2005/02/19 00:32:37 filetreefrog Exp $
##################################################
if (!defined('PATHOS')) {
    exit('');
}
$textitem = null;
if (isset($_GET['id'])) {
    $textitem = $db->selectObject('textitem', 'id=' . $_GET['id']);
}
if ($textitem != null) {
    $loc = unserialize($textitem->location_data);
}
if (pathos_permissions_check('edit', $loc)) {
    $form = textitem::form($textitem);
    $form->location($loc);
    $form->meta('action', 'save');
    $template = new template('textmodule', '_form_edit', $loc);
    $template->assign('form_html', $form->toHTML());
    $template->output();
} else {
    echo SITE_403_HTML;
}