コード例 #1
0
ファイル: story.php プロジェクト: bklein01/pligg-cms
     // check for redirects
     include mnminclude . 'redirector.php';
     $x = new redirector($_SERVER['REQUEST_URI']);
     header("Location: {$my_pligg_base}/error_404.php");
     die;
 }
 // Hide private group stories
 if ($link->link_group_id) {
     $privacy = $db->get_var("SELECT group_privacy FROM " . table_groups . " WHERE group_id = {$link->link_group_id}");
     if ($privacy == 'private' && !isMember($link->link_group_id)) {
         die('Access denied');
     }
 }
 if (isset($_POST['process']) && sanitize($_POST['process'], 3) != '') {
     if (sanitize($_POST['process'], 3) == 'newcomment') {
         check_referrer();
         $vars = array('user_id' => $link->author, 'link_id' => $link->id);
         check_actions('comment_subscription', $vars);
         insert_comment();
     }
 }
 require_once mnminclude . 'check_behind_proxy.php';
 // Set globals
 $globals['link_id'] = $link->id;
 $globals['category_id'] = $link->category;
 $globals['category_name'] = $link->category_name();
 $globals['category_url'] = $link->category_safe_name();
 $vars = '';
 check_actions('story_top', $vars);
 $main_smarty->assign('link_submitter', $link->username());
 // setup breadcrumbs and page title
コード例 #2
0
ファイル: submit.php プロジェクト: bendroid/pligg-cms
include_once 'internal/Smarty.class.php';
$main_smarty = new Smarty();
include 'config.php';
include mnminclude . 'html1.php';
include mnminclude . 'link.php';
include mnminclude . 'tags.php';
include mnminclude . 'user.php';
include mnminclude . 'smartyvariables.php';
if (!$_COOKIE['referrer']) {
    if (empty($_POST['phase']) && !empty($_GET['url'])) {
        if (!empty($_GET['url'])) {
            $_POST['url'] = $_GET['url'];
        }
    }
    $url = htmlspecialchars(sanitize($_POST['url'], 3));
    check_referrer($url);
}
// html tags allowed during submit
if (checklevel('admin')) {
    $Story_Content_Tags_To_Allow = Story_Content_Tags_To_Allow_God;
} elseif (checklevel('moderator')) {
    $Story_Content_Tags_To_Allow = Story_Content_Tags_To_Allow_Admin;
} else {
    $Story_Content_Tags_To_Allow = Story_Content_Tags_To_Allow_Normal;
}
$main_smarty->assign('Story_Content_Tags_To_Allow', htmlspecialchars($Story_Content_Tags_To_Allow));
#print_r($_SESSION);
#exit;
// breadcrumbs and page titles
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_Submit');
$navwhere['link1'] = getmyurl('submit', '');