function check()
 {
     // Get Repo from Blair2004
     // Check Version Releases
     // http://api.github.com/repos/Blair2004/tendoo-cms/releases
     $json_api = $this->curl->security(false)->get('https://api.github.com/repos/Blair2004/tendoo-cms/releases');
     if ($json_api != '') {
         $array_api = json_decode($json_api, true);
         $lastest_release = return_if_array_key_exists(0, $array_api);
         $release_tag_name = return_if_array_key_exists('tag_name', $lastest_release);
         $release_id = (double) substr($release_tag_name, 1);
         $lastest_release = array('id' => $release_id, 'name' => return_if_array_key_exists('name', $lastest_release), 'description' => return_if_array_key_exists('body', $lastest_release), 'beta' => return_if_array_key_exists('prerelease', $lastest_release), 'published' => return_if_array_key_exists('published_at', $lastest_release), 'link' => return_if_array_key_exists('zipball_url', $lastest_release));
         $tendoo_update['core'] = $lastest_release;
         set_meta('tendoo_core_update', $tendoo_update);
     }
     $core_id = (double) get('core_id');
     if ($tendoo_update = get_meta('tendoo_core_update')) {
         $array = array();
         // Setting Core Warning
         if ($release = return_if_array_key_exists('core', $tendoo_update)) {
             if ($release['id'] > $core_id) {
                 //
                 if ($release['beta'] == false) {
                     $array[] = array('link' => $release['link'], 'content' => $release['description'], 'title' => $release['name'], 'date' => $release['published']);
                 }
             }
         }
         return $array;
     }
     return false;
 }
Пример #2
0
 /**
  * Response for extension configuration.
  *
  * @param  array  $data
  *
  * @return mixed
  */
 public function showConfigurationChanger(array $data)
 {
     $name = $data['extension']->name;
     set_meta('title', Foundation::memory()->get("extensions.available.{$name}.name", $name));
     set_meta('description', trans('orchestra/foundation::title.extensions.configure'));
     return view('orchestra/foundation::extensions.configure', $data);
 }
Пример #3
0
 /**
  * Edit a post.
  *
  * @param  int  $id
  *
  * @return mixed
  */
 public function edit($id = null)
 {
     set_meta('title', 'Write a Post');
     $content = Content::post()->where('id', $id)->firstOrFail();
     $this->authorize('update', $content);
     return view('orchestra/story::admin.editor', ['content' => $content, 'url' => handles("orchestra::storycms/posts/{$content->getAttribute('id')}"), 'method' => 'PUT']);
 }
 /**
  * Once user actually visit the reset my password page, we now should be
  * able to make the operation to create a new password.
  *
  * GET (:orchestra)/forgot/reset/(:hash)
  *
  * @param  string  $token
  *
  * @return mixed
  */
 public function showResetForm($token = null)
 {
     if (is_null($token)) {
         return $this->showLinkRequestForm();
     }
     $email = Request::input('email');
     set_meta('title', trans('orchestra/foundation::title.reset-password'));
     return view('orchestra/foundation::forgot.reset', compact('email', 'token'));
 }
function add_to_meta($name, $addition = "")
{
    global $fusion_page_meta;
    if (isset($fusion_page_meta[$name])) {
        $fusion_page_meta[$name] .= $addition;
    } else {
        set_meta($name, $addition);
    }
}
Пример #6
0
 /**
  * Show the content.
  *
  * @return mixed
  */
 public function show()
 {
     $params = static::$router->current()->parameters();
     $id = Arr::get($params, 'id');
     $slug = Arr::get($params, 'slug');
     $page = $this->getRequestedContent($id, $slug);
     $id = $page->getAttribute('id');
     $slug = $page->getAttribute('slug');
     set_meta('title', $page->getAttribute('title'));
     return $this->getResponse($page, $id, $slug);
 }
Пример #7
0
 public function showFranchise($franchise, $cateegory, $id)
 {
     $item = Franchise::find($franchise)->{$cateegory}->find($id);
     set_meta('title', trans('blupl/franchises::title.media.reporter'));
     if ($item != null && $item->status == 0) {
         return view('blupl/franchises::franchise', compact('item'));
     } else {
         if ($item->status == 1) {
             $massage = "Already Approve";
         } else {
             $massage = "Reporter Not Found";
         }
         Flash::error($massage);
         return $this->redirect(handles('blupl/franchise::approval/franchise/' . $franchise . '/' . $cateegory));
     }
 }
Пример #8
0
 public function showReporter($reporterId)
 {
     $reporter = MediaReporter::find($reporterId);
     set_meta('title', trans('blupl/printmedia::title.media.reporter'));
     if ($reporter != null && $reporter->status == 0) {
         return view('blupl/printmedia::reporter', compact('reporter'));
     } else {
         if ($reporter->status == 1) {
             $massage = "Already Approve";
         } else {
             $massage = "Reporter Not Found";
         }
         Flash::error($massage);
         return $this->redirect(handles('blupl/printmedia::approval'));
     }
 }
Пример #9
0
 public function index()
 {
     $active_theme = get_core_vars('active_theme');
     $setting_key = $active_theme['namespace'] . '_theme_settings';
     $this->load->library('form_validation');
     $this->form_validation->set_rules('api_limit', 'API LIMIT', 'required');
     $this->form_validation->set_rules('declared_apis', 'Declared API', 'required');
     $this->form_validation->set_rules('declared_item', 'Declared Item', 'required');
     // For Static using API
     if ($this->form_validation->run()) {
         if ($active_theme) {
             $datas_get = get_meta($setting_key);
             $saved_settings = $datas_get ? $datas_get : array();
             // If there are same setting already saved, they'll be overwrited
             $saved_settings[$this->input->post('declared_item')] = array('api_limit' => $this->input->post('api_limit'), 'declared_apis' => $this->input->post('declared_apis'), 'declared_item' => $this->input->post('declared_item'));
             if (set_meta($active_theme['namespace'] . '_theme_settings', $saved_settings)) {
                 notice('push', fetch_notice_output('done'));
             }
         }
     }
     // For Static not draggable
     if ($this->input->post('is_static_item')) {
         $this->load->library('form_validation');
         if ($static = return_if_array_key_exists('static', $_POST)) {
             if (is_array($static)) {
                 $active_theme = get_core_vars('active_theme');
                 $saved_settings = get_meta($active_theme['namespace'] . '_theme_settings');
                 foreach ($static as $namespace => $item) {
                     if (is_array($item)) {
                         foreach ($item as $name => $fields) {
                             $saved_settings[$namespace][$name] = $fields;
                         }
                     }
                 }
                 if (set_meta($active_theme['namespace'] . '_theme_settings', $saved_settings)) {
                     notice('push', fetch_notice_output('done'));
                 }
             }
         }
     }
     // Add Settings to Core vars
     push_core_vars('active_theme', 'theme_settings', get_meta($setting_key));
     set_page('title', 'TIM | ' . get('core_version'));
     return $this->load->view($this->module_metas['uri_path'] . 'views/body', $this->data, true, true);
 }
Пример #10
0
 /**
  * Fetches all Forum Tag Table records
  *
  * @param bool|TRUE $setTitle
  */
 public function set_TagInfo($setTitle = TRUE)
 {
     $locale = fusion_get_locale("", FORUM_LOCALE);
     $locale += fusion_get_locale("", FORUM_TAGS_LOCALE);
     if ($setTitle == TRUE) {
         set_title($locale['forum_0000']);
         add_to_title($locale['global_201'] . $locale['forum_tag_0100']);
         add_breadcrumb(array('link' => FORUM . "index.php", 'title' => $locale['forum_0000']));
         add_breadcrumb(array('link' => FORUM . "tags.php", 'title' => $locale['forum_tag_0100']));
     }
     $thread_result = NULL;
     if (isset($_GET['tag_id']) && isnum($_GET['tag_id'])) {
         $tag_query = "SELECT * FROM " . DB_FORUM_TAGS . " WHERE tag_status=1 AND tag_id='" . intval($_GET['tag_id']) . "'\n            " . (multilang_table("FO") ? "AND tag_language='" . LANGUAGE . "'" : "") . "\n            ";
         $tag_result = dbquery($tag_query);
         if (dbrows($tag_result) > 0) {
             $data = dbarray($tag_result);
             add_to_title($locale['global_201'] . $data['tag_title']);
             add_breadcrumb(array('link' => FORUM . "tags.php?tag_id=" . $data['tag_id'], 'title' => $data['tag_title']));
             if (!empty($data['tag_description'])) {
                 set_meta('description', $data['tag_description']);
             }
             $data['tag_link'] = FORUM . "tags.php?tag_id=" . $data['tag_id'];
             $data['tag_active'] = isset($_GET['viewtags']) && isset($_GET['tag_id']) && $_GET['tag_id'] == $data['tag_id'] ? TRUE : FALSE;
             $this->tag_info['tags'][$data['tag_id']] = $data;
             $this->tag_info['tags'][0] = array('tag_id' => 0, 'tag_link' => FORUM . "tags.php", 'tag_title' => fusion_get_locale("global_700") . "…", 'tag_active' => '', 'tag_color' => '');
             $this->tag_info['filter'] = $this->filter()->get_FilterInfo();
             $filter_sql = $this->filter()->get_filterSQL();
             // get forum threads.
             $this->tag_info = array_merge_recursive($this->tag_info, self::get_tag_thread($_GET['tag_id'], array("condition" => $filter_sql['condition'], "order" => $filter_sql['order'])));
         } else {
             redirect(FORUM . "index.php");
         }
     } else {
         $this->cache_tags();
     }
 }
Пример #11
0
 /**
  * Response when edit user page succeed.
  *
  * @param  array  $data
  *
  * @return mixed
  */
 public function showUserChanger(array $data)
 {
     set_meta('title', trans('orchestra/foundation::title.users.update'));
     return view('orchestra/foundation::users.edit', $data);
 }
Пример #12
0
        // maybe clean description by sanitize_replacement_tags()
        set_meta('og:description', $content['opengraph']['description'], 'property');
    }
    // Open Graph images
    $content['opengraph']['has_image'] = false;
    if (isset($content['images']['shop']) && count($content['images']['shop'])) {
        foreach ($content['images']['shop'] as $og_img) {
            $content['opengraph']['has_image'] = true;
            set_meta('og:image', PHPWCMS_URL . 'img/cmsimage.php/500x500x0/' . $og_img['hash'] . '.' . $og_img['ext'], 'property', false, true);
        }
    }
    if (isset($content['images']['news']) && count($content['images']['news'])) {
        foreach ($content['images']['news'] as $og_img) {
            $content['opengraph']['has_image'] = true;
            set_meta('og:image', PHPWCMS_URL . 'img/cmsimage.php/500x500x0/' . $og_img['id'] . '.' . $og_img['ext'], 'property', false, true);
        }
    }
    if (isset($content['images']['article']['image'])) {
        $content['opengraph']['has_image'] = true;
        // Based on default article detail / zoom image
        //set_meta('og:image', PHPWCMS_URL . $content['images']['article'][ isset($content['images']['article']) ? 'zoom' : 'image' ]['src'], 'property');
        // This can be set dynamically ad allow always the same size
        set_meta('og:image', PHPWCMS_URL . 'img/cmsimage.php/500x500x0/' . $content['images']['article']['hash'] . '.' . $content['images']['article']['ext'], 'property');
    }
    if (!$content['opengraph']['has_image']) {
        // Default Open Graph image
        set_meta('og:image', PHPWCMS_URL . TEMPLATE_PATH . 'img/opengraph-default.png', 'property');
    }
    // Disable the built-in Open Graph rendering
    $content['opengraph']['support'] = false;
}
Пример #13
0
 /**
  * Login page.
  *
  * GET (:orchestra)/login
  *
  * @return mixed
  */
 public function index()
 {
     set_meta('title', trans('orchestra/foundation::title.login'));
     return view('orchestra/foundation::credential.login');
 }
Пример #14
0
 /**
  * Response when lists ACL page succeed.
  *
  * @param  array  $data
  *
  * @return mixed
  */
 public function indexSucceed(array $data)
 {
     set_meta('title', trans('orchestra/control::title.acls.list'));
     return view('orchestra/control::acl.index', $data);
 }
Пример #15
0
<?php

defined('LARAVEL_START') or die('No direct script access allowed');
set_meta('GIFTWISHES::SKIN', 'skin-blue');
if (!App::bound('orchestra.avatar') && class_exists('Orchestra\\Avatar\\AvatarServiceProvider')) {
    App::register('Orchestra\\Avatar\\AvatarServiceProvider');
}
Пример #16
0
 /**
  * Response to show dashboard.
  *
  * @param  array  $data
  *
  * @return mixed
  */
 public function showDashboard(array $data)
 {
     set_meta('title', trans('orchestra/foundation::title.home'));
     return view('orchestra/foundation::dashboard.index', $data);
 }
Пример #17
0
    }
    if (isset($content['images']['news']) && count($content['images']['news'])) {
        foreach ($content['images']['news'] as $og_img) {
            $content['opengraph']['has_image'] = true;
            set_meta('og:image', PHPWCMS_URL . 'img/cmsimage.php/500x500x0/' . $og_img['id'] . '.' . $og_img['ext'], 'property', false, true);
        }
    }
    if (isset($content['images']['article']['image'])) {
        $content['opengraph']['has_image'] = true;
        set_meta('og:image', PHPWCMS_URL . 'img/cmsimage.php/500x500x0/' . $content['images']['article']['hash'] . '.' . $content['images']['article']['ext'], 'property');
    }
    if (!$content['opengraph']['has_image'] && is_file(PHPWCMS_TEMPLATE . 'img/opengraph-default.png')) {
        set_meta('og:image', PHPWCMS_URL . TEMPLATE_PATH . 'img/opengraph-default.png', 'property');
    }
}
set_meta('generator', 'phpwcms ' . PHPWCMS_VERSION);
// replace Print URL
if (strpos($content["all"], '[PRINT]') !== false) {
    $content["all"] = str_replace('[PRINT]', '<a href="' . rel_url(array('print' => 1), array(), PHPWCMS_ALIAS) . '" class="' . $template_default['classes']['link-print'] . '" target="_blank" rel="nofollow">', $content["all"]);
    $content["all"] = str_replace('[/PRINT]', '</a>', $content["all"]);
}
if (strpos($content["all"], '[PRINT_PDF]') !== false) {
    $content["all"] = str_replace('[PRINT_PDF]', '<a href="' . rel_url(array('print' => 2), array(), PHPWCMS_ALIAS) . '" class="' . $template_default['classes']['link-print-pdf'] . '" target="_blank" rel="nofollow">', $content["all"]);
    $content["all"] = str_replace('[/PRINT_PDF]', '</a>', $content["all"]);
}
// some article related "global" replacement tags
if (isset($content['article_livedate'])) {
    $content['all'] = render_cnt_template($content['all'], 'AUTHOR', html_specialchars($content['article_username']));
    $content['all'] = render_cnt_date($content['all'], $content["article_date"], $content['article_livedate'], $content['article_killdate']);
    $content['all'] = render_cnt_template($content['all'], 'CATEGORY', $content['cat']);
} else {
Пример #18
0
 public function add_permission($role_id, $action)
 {
     $role = $this->get($role_id);
     if ($role) {
         $roles_permissions = get_meta('roles_permissions');
         $permissions = riake($role_id, $roles_permissions, array($role_id => array()));
         if (!in_array($action, force_array($permissions))) {
             $roles_permissions[$role_id][] = $action;
             set_meta('roles_permissions', $roles_permissions);
             return true;
         }
     }
     return false;
 }
Пример #19
0
            $data['download_title'] = "<a class='text-dark' href='" . INFUSIONS . "downloads/downloads.php?readmore=" . $data['download_id'] . "'>" . $data['download_title'] . "</a>";
            $info['download_item'] = $data;
        } else {
            redirect(INFUSIONS . "downloads/downloads.php");
        }
    } else {
        redirect(INFUSIONS . "downloads/downloads.php");
    }
} else {
    $condition = '';
    if (isset($_GET['author']) && isnum($_GET['author'])) {
        $condition = "AND download_user = '******'author']) . "'";
    }
    if (isset($_GET['cat_id']) && isnum($_GET['cat_id'])) {
        set_title($locale['download_1000']);
        set_meta("name", $locale['download_1000']);
        downloadCats_breadcrumbs(get_downloadCatsIndex());
        $res = dbarray(dbquery("SELECT * FROM " . DB_DOWNLOAD_CATS . " " . (multilang_table("DL") ? "WHERE download_cat_language='" . LANGUAGE . "' AND" : "WHERE ") . "\n\t\t\tdownload_cat_id='" . intval($_GET['cat_id']) . "'"));
        if (!empty($res)) {
            $info += $res;
        } else {
            redirect(FUSION_SELF);
        }
        $info['download_title'] = $info['download_cat_name'];
        $info['download_max_rows'] = dbcount("('download_id')", DB_DOWNLOADS, "download_cat='" . intval($_GET['cat_id']) . "' AND " . groupaccess('download_visibility'));
        $_GET['rowstart'] = isset($_GET['rowstart']) && isnum($_GET['rowstart']) && $_GET['rowstart'] <= $info['download_max_rows'] ? $_GET['rowstart'] : 0;
        if ($info['download_max_rows']) {
            switch ($_GET['type']) {
                case 'recent':
                    $filter_condition = 'download_datestamp DESC';
                    break;
Пример #20
0
 /**
  * Show FTP configuration form or run the queue.
  *
  * @return mixed
  */
 public function ftp()
 {
     set_meta('title', trans('orchestra/foundation::title.publisher.ftp'));
     set_meta('description', trans('orchestra/foundation::title.publisher.description'));
     return view('orchestra/foundation::publisher.ftp');
 }
Пример #21
0
     $cache_searchable = '1';
 }
 $content['opengraph']['support'] = phpwcms_boolval($row["article_opengraph"]);
 $content['opengraph']['type'] = 'article';
 // Open Graph type
 //check if article has custom pagetitle
 if (empty($row["article_pagetitle"])) {
     $content["pagetitle"] = setPageTitle($content["pagetitle"], $article['cat'], $row["article_title"]);
     $content['opengraph']['title'] = $row["article_title"];
 } else {
     $content["pagetitle"] = $row["article_pagetitle"];
     $content['opengraph']['title'] = $content["pagetitle"];
 }
 // check description
 if (!empty($row['article_description'])) {
     set_meta('description', $row['article_description']);
     $content['opengraph']['description'] = $row["article_description"];
 }
 $content['all_keywords'] = $row['article_keyword'];
 if (!empty($template_default['article_render_anchor'])) {
     $content["main"] .= '<a ';
     if (!HTML5_MODE) {
         $content["main"] .= 'name="jump' . $row["article_id"] . '" ';
     }
     $content["main"] .= 'id="jump' . $row["article_id"] . '" class="' . $template_default['classes']['jump-anchor'] . '"></a>';
 }
 // enable frontend edit link
 if (FE_EDIT_LINK && ($_SESSION["wcs_user_admin"] || $_SESSION["wcs_user_id"] == $row["article_uid"])) {
     // enym add structure level frontend edit link for admins only
     if ($_SESSION["wcs_user_admin"]) {
         $content["main"] .= getFrontendEditLink('structure', $content['cat_id']);
Пример #22
0
 /**
  * Response when edit role page succeed.
  *
  * @param  array  $data
  *
  * @return mixed
  */
 public function editSucceed(array $data)
 {
     set_meta('title', trans('blupl/host::title.host.update'));
     return view('blupl/host::edit', $data);
 }
Пример #23
0
 /**
  * Response when edit role page succeed.
  *
  * @param  array  $data
  *
  * @return mixed
  */
 public function editSucceed(array $data)
 {
     set_meta('title', trans('blupl/printmedia::title.media.update'));
     return view('blupl/printmedia::edit', $data);
 }
Пример #24
0
    $result = dbquery("SELECT ta.article_subject, ta.article_snippet, ta.article_article, ta.article_keywords, ta.article_breaks,\n\t\tta.article_datestamp, ta.article_reads, ta.article_allow_comments, ta.article_allow_ratings,\n\t\ttac.article_cat_id, tac.article_cat_name,\n\t\ttu.user_id, tu.user_name, tu.user_status, tu.user_avatar, tu.user_joined, tu.user_level\n\t\tFROM " . DB_ARTICLES . " ta\n\t\tINNER JOIN " . DB_ARTICLE_CATS . " tac ON ta.article_cat=tac.article_cat_id\n\t\tLEFT JOIN " . DB_USERS . " tu ON ta.article_name=tu.user_id\n\t\t" . (multilang_table("AR") ? "WHERE tac.article_cat_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('article_visibility') . " AND article_id='" . $_GET['article_id'] . "' AND article_draft='0'");
    if (dbrows($result) > 0) {
        $data = dbarray($result);
        require_once INCLUDES . "comments_include.php";
        require_once INCLUDES . "ratings_include.php";
        $_GET['rowstart'] = isset($_GET['rowstart']) && isnum($_GET['rowstart']) ? $_GET['rowstart'] : 0;
        if ($_GET['rowstart'] == 0 && empty($_POST)) {
            dbquery("UPDATE " . DB_ARTICLES . " SET article_reads=article_reads+1 WHERE article_id='" . $_GET['article_id'] . "'");
        }
        $article = preg_split("/<!?--\\s*pagebreak\\s*-->/i", parse_textarea($data['article_article']));
        $pagecount = count($article);
        $article_subject = stripslashes($data['article_subject']);
        add_breadcrumb(array('link' => INFUSIONS . 'articles/articles.php?cat_id=' . $data['article_cat_id'], 'title' => $data['article_cat_name']));
        add_breadcrumb(array('link' => INFUSIONS . 'articles/articles.php?article_id=' . $_GET['article_id'], 'title' => $data['article_subject']));
        if ($data['article_keywords'] !== "") {
            set_meta("keywords", $data['article_keywords']);
        }
        $article_info = array("article_id" => $_GET['article_id'], "article_subject" => $article_subject, "article_snippet" => parse_textarea($data['article_snippet']), "article_article" => $article, "cat_id" => $data['article_cat_id'], "cat_name" => $data['article_cat_name'], "user_id" => $data['user_id'], "user_name" => $data['user_name'], "user_status" => $data['user_status'], "user_avatar" => $data['user_avatar'], "user_joined" => $data['user_joined'], "user_level" => $data['user_level'], "article_date" => $data['article_datestamp'], "article_breaks" => $data['article_breaks'], "article_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='A' AND comment_item_id='" . $_GET['article_id'] . "'"), "article_reads" => $data['article_reads'], "article_allow_comments" => $data['article_allow_comments'], "article_allow_ratings" => $data['article_allow_ratings'], "page_nav" => $pagecount > 1 ? makepagenav($_GET['rowstart'], 1, $pagecount, 3, INFUSIONS . "articles/articles.php?article_id=" . $_GET['article_id'] . "&amp;") : "", "edit_link" => "");
        if (iADMIN && checkrights("A")) {
            $article_info['edit_link'] = INFUSIONS . "articles/articles_admin.php" . $aidlink . "&amp;action=edit&amp;section=article_form&amp;article_id=" . $article_info['article_id'];
        }
        set_title($article_subject . $locale['global_200'] . $locale['400']);
        render_article($article_subject, $article[$_GET['rowstart']], $article_info);
    } else {
        redirect(INFUSIONS . "articles/articles.php");
    }
} elseif (!isset($_GET['cat_id']) || !isnum($_GET['cat_id'])) {
    // category query
    set_title($locale['400']);
    $result = dbquery("SELECT\n\t\tac.article_cat_id, ac.article_cat_name, ac.article_cat_description, count(a.article_id) 'article_count', count(ac2.article_cat_id) 'article_sub_count'\n\t\tFROM " . DB_ARTICLE_CATS . " ac\n\t\tLEFT JOIN " . DB_ARTICLE_CATS . " ac2 on ac.article_cat_id=ac2.article_cat_parent\n\t\tLEFT JOIN " . DB_ARTICLES . " a on a.article_cat=ac.article_cat_id\n\t\t" . (multilang_table("AR") ? "WHERE ac.article_cat_language='" . LANGUAGE . "' AND" : "WHERE") . "\n\t\tac.article_cat_parent = '0'\n\t\tGROUP BY ac.article_cat_id\n\t\tORDER BY ac.article_cat_name\n\t\t");
    $info['articles_rows'] = dbrows($result);
 /**
  * Response to show user profile changer.
  *
  * @param  array  $data
  *
  * @return mixed
  */
 public function showProfileChanger(array $data)
 {
     set_meta('title', trans('orchestra/foundation::title.account.profile'));
     return view('orchestra/foundation::account.index', $data);
 }
Пример #26
0
        $catWhere = "f2.forum_id='" . $catID . "' AND";
    }
}
add_to_title($locale['global_200'] . $locale['400']);
opentable($locale['400']);
$forum_list = "";
$current_cat = "";
$forumCollapsed = false;
$forumCollapse = true;
$result = dbquery("SELECT\tf.forum_id, f.forum_cat, f.forum_name, f.forum_description, f.forum_moderators, f.forum_lastpost, f.forum_postcount,\n\tf.forum_threadcount, f.forum_lastuser, f.forum_access, f2.forum_name AS forum_cat_name, f2.forum_description AS forum_cat_description,\n\tt.thread_id, t.thread_lastpost, t.thread_lastpostid, t.thread_subject,\n\tu.user_id, u.user_name, u.user_status, u.user_avatar\n\tFROM " . DB_FORUMS . " f\n\tLEFT JOIN " . DB_FORUMS . " f2 ON f.forum_cat = f2.forum_id\n\tLEFT JOIN " . DB_THREADS . " t ON f.forum_id = t.forum_id AND f.forum_lastpost=t.thread_lastpost\n\tLEFT JOIN " . DB_USERS . " u ON f.forum_lastuser = u.user_id\n\tWHERE " . $catWhere . " " . groupaccess('f.forum_access') . " AND f.forum_cat!='0'\n\tGROUP BY forum_id ORDER BY f2.forum_order ASC, f.forum_order ASC, t.thread_lastpost DESC");
$i = 0;
if (dbrows($result) != 0) {
    while ($data = dbarray($result)) {
        if ($catID != "") {
            add_to_title($locale['global_201'] . $data['forum_cat_name']);
            set_meta("description", $data['forum_cat_name']);
        }
        if ($data['forum_cat_name'] != $current_cat) {
            if ($i > 0) {
                echo "</tbody></table>\n<!--sub_forum_idx_table-->\n<br />\n";
            }
            $current_cat = $data['forum_cat_name'];
            $forumStatus = $forumCollapsed ? "off" : "on";
            $boxname = "forum_" . $data['forum_id'];
            $element = "tbody";
            if ($i == 0) {
                echo "<!--pre_forum_idx-->";
            }
            echo "<table class='tbl-border forum_idx_table' id='forum_cat_" . $data['forum_cat'] . "' cellpadding='0' cellspacing='0' width='100%'>\n<thead>\n<tr class='forum-cat-head'>\n";
            echo "<td class='forum-caption forum_cat_name' colspan='2'><!--forum_cat_name-->";
            echo "<h3><a href='" . FORUM . "index.php?cat=" . $data['forum_cat'] . "'>" . $data['forum_cat_name'] . "</a></h3>";
Пример #27
0
 /**
  * Response when edit role page succeed.
  *
  * @param  array  $data
  *
  * @return mixed
  */
 public function editSucceed(array $data)
 {
     set_meta('title', trans('bluschool/students::title.students.update'));
     return view('bluschool/students::edit', $data);
 }
Пример #28
0
 /**
  * Response when edit role page succeed.
  *
  * @param  array  $data
  *
  * @return mixed
  */
 public function editSucceed(array $data)
 {
     set_meta('title', trans('blupl/franchises::title.franchises.update'));
     return view('blupl/franchises::edit', $data);
 }
Пример #29
0
 /**
  * Response when show setting page.
  *
  * @param  array  $data
  *
  * @return mixed
  */
 public function showSettingChanger(array $data)
 {
     set_meta('title', trans('orchestra/foundation::title.settings.list'));
     return view('orchestra/foundation::settings.index', $data);
 }
 /**
  * Once user actually visit the reset my password page, we now should be
  * able to make the operation to create a new password.
  *
  * GET (:orchestra)/forgot/reset/(:hash)
  *
  * @param  string  $token
  *
  * @return mixed
  */
 public function show($token)
 {
     set_meta('title', trans('orchestra/foundation::title.reset-password'));
     return view('orchestra/foundation::forgot.reset')->with('token', $token);
 }