Esempio n. 1
0
</html>
<?php 
    exit;
}
$faq->faqRecord = null;
$faq->getRecord($id);
if (!isset($faq->faqRecord['content'])) {
    ?>
    Error: No entry for #<?php 
    print $id;
    ?>
(<?php 
    print $lang;
    ?>
) available.
</body>
</html>
<?php 
    exit;
}
if (!is_null($lookup)) {
    if (count(ob_list_handlers()) > 0) {
        ob_clean();
    }
    print $linkverifier->verifyArticleURL($faq->faqRecord['content'], $id, $lang);
    exit;
}
link_ondemand_javascript($id, $lang);
?>
</body>
</html>
Esempio n. 2
0
     // Add current version into revision table
     $faq->addNewRevision($record_id, $record_lang);
     $revision_id++;
 }
 $recordData = array('id' => $record_id, 'lang' => $record_lang, 'revision_id' => $revision_id, 'active' => $active, 'sticky' => !is_null($sticky) ? 1 : 0, 'thema' => html_entity_decode($question), 'content' => html_entity_decode($content), 'keywords' => $keywords, 'author' => $author, 'email' => $email, 'comment' => !is_null($comment) ? 'y' : 'n', 'date' => date('YmdHis'), 'dateStart' => empty($dateStart) ? '00000000000000' : str_replace('-', '', $dateStart) . '000000', 'dateEnd' => empty($dateEnd) ? '99991231235959' : str_replace('-', '', $dateEnd) . '235959', 'linkState' => '', 'linkDateCheck' => 0);
 // Create ChangeLog entry
 $faq->createChangeEntry($record_id, $user->getUserId(), nl2br($changed), $record_lang, $revision_id);
 // save or update the FAQ record
 if ($faq->isAlreadyTranslated($record_id, $record_lang)) {
     $faq->updateRecord($recordData);
 } else {
     $record_id = $faq->addRecord($recordData, false);
 }
 if ($record_id) {
     print $PMF_LANG['ad_entry_savedsuc'];
     link_ondemand_javascript($record_id, $record_lang);
 } else {
     print $PMF_LANG['ad_entry_savedfail'] . $db->error();
 }
 // delete category relations
 $faq->deleteCategoryRelations($record_id, $record_lang);
 // save or update the category relations
 $faq->addCategoryRelations($categories['rubrik'], $record_id, $record_lang);
 // Insert the tags
 if ($tags != '') {
     $tagging->saveTags($record_id, explode(',', $tags));
 } else {
     $tagging->deleteTagsFromRecordId($record_id);
 }
 // Add user permissions
 $faq->deletePermission('user', $record_id);
Esempio n. 3
0
                // save or update the category relations
                $categoryRelations->create($categoryData);
                // Add user permissions
                $userPermission = array('category_id' => $categoryId, 'user_id' => $restricted_users);
                $categoryUser->delete($categoryId);
                $categoryUser->create($userPermission);
                // Add group permission
                if ($groupSupport) {
                    $groupPermission = array('category_id' => $categoryId, 'group_id' => $restricted_groups);
                    $categoryGroup->delete($categoryId);
                    $categoryGroup->create($groupPermission);
                }
            }
            print $PMF_LANG['ad_entry_savedsuc'];
            // Call Link Verification
            link_ondemand_javascript($recordId, $recordData['lang']);
            ?>
    <script type="text/javascript">
    <!--
    $(document).ready(function(){
        setTimeout(function() {
            window.location = "index.php?action=view";
            }, 5000);
        });
    //-->
    </script>       
<?php 
        } else {
            print $PMF_LANG['ad_entry_savedfail'] . $db->error();
        }
    } elseif (isset($submit['submit'][2]) && !is_null($question) && !is_null($categories)) {