Пример #1
0
     $MyPost = php_execute($MyPost);
 }
 if ($User1CanDoHTML1 == "no") {
     $MyPost = preg_replace("/\\[DoHTML\\](.*?)\\[\\/DoHTML\\]/is", "<span style=\"color: red; font-weight: bold;\">ERROR:</span> cannot execute html.", $MyPost);
 }
 if ($User1CanDoHTML1 == "yes") {
     $MyPost = do_html_bbcode($MyPost);
 }
 $MyPost = text2icons($MyPost, $Settings['sqltable'], $SQLStat);
 $MyPost = preg_replace("/\\<br\\>/", "<br />", nl2br($MyPost));
 $MyPost = url2link($MyPost);
 if ($MySubPost != null) {
     $MyPost = $MyPost . "\n" . $MySubPost;
 }
 if ($User1CanUseBBags == "yes") {
     $User1Signature = bbcode_parser($User1Signature);
 }
 if ($User1CanExecPHP == "no") {
     $User1Signature = preg_replace("/\\[ExecPHP\\](.*?)\\[\\/ExecPHP\\]/is", "<span style=\"color: red; font-weight: bold;\">ERROR:</span> cannot execute php code.", $User1Signature);
 }
 if ($User1CanExecPHP == "yes") {
     $User1Signature = php_execute($User1Signature);
 }
 if ($User1CanDoHTML1 == "no") {
     $User1Signature = preg_replace("/\\[DoHTML\\](.*?)\\[\\/DoHTML\\]/is", "<span style=\"color: red; font-weight: bold;\">ERROR:</span> cannot execute html.", $User1Signature);
 }
 if ($User1CanDoHTML == "yes") {
     $User1Signature = do_html_bbcode($User1Signature);
 }
 $User1Signature = text2icons($User1Signature, $Settings['sqltable'], $SQLStat);
 $User1Signature = preg_replace("/\\<br\\>/", "<br />", nl2br($User1Signature));
Пример #2
0
 }
 if ($User1CanDoHTML != "yes" && $User1CanDoHTML != "no") {
     $User1CanDoHTML = "no";
 }
 $User1CanUseBBags = $PreUserCanUseBBags;
 if ($User1CanUseBBags == "group") {
     $User1CanUseBBags = sql_result($gresult, 0, "CanUseBBags");
 }
 if ($User1CanUseBBags != "yes" && $User1CanUseBBags != "no") {
     $User1CanUseBBags = "no";
 }
 $GroupNamePrefix = sql_result($gresult, 0, "NamePrefix");
 $GroupNameSuffix = sql_result($gresult, 0, "NameSuffix");
 sql_free_result($gresult);
 if ($User1CanUseBBags == "yes") {
     $MyDescription = bbcode_parser($MyDescription);
 }
 if ($User1CanExecPHP == "no") {
     $MyDescription = preg_replace("/\\[ExecPHP\\](.*?)\\[\\/ExecPHP\\]/is", "<span style=\"color: red; font-weight: bold;\">ERROR:</span> cannot execute php code.", $MyDescription);
 }
 if ($User1CanExecPHP == "yes") {
     $MyDescription = php_execute($MyDescription);
 }
 if ($User1CanDoHTML == "no") {
     $MyDescription = preg_replace("/\\[DoHTML\\](.*?)\\[\\/DoHTML\\]/is", "<span style=\"color: red; font-weight: bold;\">ERROR:</span> cannot execute html.", $MyDescription);
 }
 if ($User1CanDoHTML == "yes") {
     $MyDescription = do_html_bbcode($MyDescription);
 }
 $MyDescription = text2icons($MyDescription, $Settings['sqltable'], $SQLStat);
 $MyDescription = preg_replace("/\\<br\\>/", "<br />", nl2br($MyDescription));
function previewPage()
{
    /*/initialize classes/*/
    global $template, $target_val, $users;
    $settings = new GlobalSettings("pages");
    $pgcategory = new GetTableRecord("pagecategory");
    $page = new Page("pages");
    $Image = new Image("pageimgs");
    //$users = new User("Users");
    $pagecat = $pgcategory::findRow("Position={$settings->Contentpos}");
    if ($pagecat) {
        $tp = $settings::countRows();
        $settings->Perpage = 1;
        $paginate = new Pagination($settings->Currentpage, $settings->Perpage, $tp->Totalrows);
        $paginate->addparam = "action=display,target=" . $target_val["managepage"] . ",cpos=" . $pagecat->Position . "";
        $paginate->mid_range = $tp->Totalrows > 100 ? 20 : 6;
        $output = "";
        $getid = $GLOBALS["id"] != null ? "Id=" . $GLOBALS["id"] : "";
        $getpages = $page::findPage($settings->Perpage, $paginate->pageOffset(), $getid, "ORDER By Id");
    }
    /*/initialize classes ends/*/
    /*Link image to flex boxes*/
    $image_path = "../" . PAGEIMG_DIR;
    /*Link image to pages*/
    if ($pagecat) {
        $output .= "<div id=\"page\">";
        $output .= "{$paginate->pageofpage()}";
        if ($getpages != null) {
            foreach ($getpages as $getpage) {
                $template->setPage("Title", "{$getpage->Title}");
                $users::$id = "Id={$getpage->Postedby}";
                $author = $users::findRow($users::$id);
                $output .= "<h1>{$getpage->Title}</h1>";
                $output .= "<p><i>Authored By: " . $author->Firstname . " " . $author->Lastname . "</i><br>\n\t <datetime class=\"dateposted\">Date Published : " . formatDate($getpage->Dateposted, "datetime_word") . "</datetime><hr></p>";
                if ($Image->showFullImage($getpage->Id, $image_path) != null) {
                    $output .= "<div class=\"imgholder\">" . $Image->showFullImage($getpage->Id, $image_path) . "</div>";
                }
                $output .= bbcode_parser($getpage->Content);
            }
            $output .= "</div>";
            $output .= $paginate->buildPagination();
        } else {
            $output = "<h1>Ooops!!! No Information posted Yet</h1>";
        }
    } else {
        $output = "<h1 class=\"construct\">Ooops!!! Site Under Consturction </h1>";
        //$output .= $template->pageLoader(array("event"));
    }
    return $output;
}
Пример #4
0
function ibbcode_parser($text)
{
    return bbcode_parser($text);
}