isAdmin()) die('Access Denied'); $pageTypes = array( 'landing' => __('Landing Page'), 'offline' => __('Offline Page'), 'thank-you' => __('Thank-You Page'), 'other' => __('Other'), ); $info = $qs = array(); if($page && $_REQUEST['a']!='add'){ $title=__('Update Page'); $action='update'; $submit_text=__('Save Changes'); $info=$page->getHashtable(); $info['body'] = Format::viewableImages($page->getBody()); $info['notes'] = Format::viewableImages($info['notes']); $trans['name'] = $page->getTranslateTag('name'); $slug = Format::slugify($info['name']); $qs += array('id' => $page->getId()); $translations = CustomDataTranslation::allTranslations( $page->getTranslateTag('name:body'), 'article'); foreach ($cfg->getSecondaryLanguages() as $tag) { foreach ($translations as $t) { if (strcasecmp($t->lang, $tag) === 0) { $C = $t->getComplex(); $info['trans'][$tag] = Format::viewableImages($C['body']); break; } } } }else { $title=__('Add New Page'); $action='add'; $submit_text=__('Add Page'); $info['isactive']=isset($info['isactive'])?$info['isactive']:0; $qs += array('a' => $_REQUEST['a']); } $info=Format::htmlchars(($errors && $_POST)?$_POST:$info, true); ?>