Esempio n. 1
0
 public function action_information()
 {
     $data = ['info' => S::getEnvironment($this->getContext())];
     $this->param_manager->setParam('method_title', _i('Information'));
     $this->builder->createPartial('body', 'system/information')->getParamManager()->setParams($data);
     return new Response($this->builder->build());
 }
Esempio n. 2
0
    public function toString()
    {
        header('X-UA-Compatible: IE=edge,chrome=1');
        header('imagetoolbar: false');
        $url = $this->getParamManager()->getParam('url');
        ?>
<!DOCTYPE html>
<html>
    <head>
        <title><?php 
        echo htmlspecialchars($this->getBuilder()->getProps()->getTitle());
        ?>
</title>
        <meta http-equiv="Refresh" content="0; url=<?php 
        echo $url;
        ?>
">
    </head>
    <body>
        <?php 
        echo _i('You are being redirected to %s.', $url);
        ?>
    </body>
</html><?php 
    }
Esempio n. 3
0
    public function toString()
    {
        $radix = $this->getBuilderParamManager()->getParam('radix');
        $search = $this->getBuilderParamManager()->getParam('search', []);
        $form = $this->getForm();
        if (is_null($radix) && $this->getPreferences()->get('foolslide.sphinx.global')) {
            // search can work also without a radix selected
            $search_radix = '_';
        } elseif (!is_null($radix)) {
            $search_radix = $radix->shortname;
        }
        if (isset($search_radix)) {
            ?>

        <ul class="nav pull-right">
        <?php 
            echo $form->open(['class' => 'navbar-search', 'method' => 'POST', 'action' => $this->getUri()->create($search_radix . '/search')]);
            ?>

        <li>
        <?php 
            echo $form->input(['name' => 'text', 'value' => isset($search["text"]) ? rawurldecode($search["text"]) : '', 'class' => 'search-query', 'placeholder' => $search_radix !== '_' ? _i('Search or insert post number') : _i('Search through all the boards')]);
            ?>
        </li>
        <?php 
            echo $form->close();
            ?>
        </ul>
        <?php 
        }
    }
Esempio n. 4
0
    public function toString()
    {
        $form = $this->getForm();
        echo $form->open(['class' => 'form-account', 'onsubmit' => 'fuel_set_csrf_token(this);']);
        ?>
    <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>
    <h2 class="form-account-heading"><?php 
        echo _i('Forgot Password');
        ?>
</h2>

    <?php 
        echo $form->input(['class' => 'input-block-level', 'name' => 'email', 'type' => 'email', 'value' => $this->getPost('email'), 'placeholder' => _i('Email Address'), 'required' => true]);
        ?>

    <?php 
        echo $form->submit(['class' => 'btn btn-primary', 'name' => 'submit', 'value' => _i('Submit')]);
        ?>

    <input type="button" onClick="window.location.href='<?php 
        echo $this->getUri()->create('/admin/account/login/');
        ?>
'" class="btn" value="<?php 
        echo htmlspecialchars(_i('Back'));
        ?>
" />
<?php 
        echo $form->close();
    }
Esempio n. 5
0
    public function toString()
    {
        /** @var SeriesBulk $series_bulk */
        $release_bulk = $this->getParamManager()->getParam('release_bulk');
        $form = $this->getForm();
        ?>

<div class="admin-container">
    <div class="admin-container-header">
        <?php 
        echo _i('Pages for series %s, chapter ID %s', $release_bulk->series->title, $release_bulk->release->id);
        ?>
    </div>

    <div class="pull-right">
        <?php 
        echo $form->open(['enctype' => 'multipart/form-data', 'onsubmit' => 'fuel_set_csrf_token(this);']);
        ?>
        <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>
        <?php 
        echo $form->file(['name' => 'pages']);
        ?>
        <?php 
        echo $form->submit(['name' => 'Submit']);
        ?>
        <?php 
        echo $form->close();
        ?>
    </div>
</div>
<?php 
    }
    public function toString()
    {
        $form = $this->getForm();
        ?>
<div class="admin-container">
    <div class="admin-container-header"><?php 
        echo _i('Change Password');
        ?>
</div>
    <p>
        <?php 
        echo _i('To change your password click the button below.<br>An email will be sent to your registered email account with further instructions.');
        ?>

        <hr/>

        <?php 
        echo $form->open(['onsubmit' => 'fuel_set_csrf_token(this);']);
        ?>
        <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>
        <?php 
        echo $form->submit(['class' => 'btn btn-primary', 'name' => 'submit', 'value' => _i('Request Password Change')]);
        ?>
        <?php 
        echo $form->close();
        ?>
    </p>
</div>
<?php 
    }
Esempio n. 7
0
    public function toString()
    {
        ?>
        <div id="post_tools_modal" class="modal hide fade">
            <div class="modal-header">
                <a href="#" class="close">&times;</a>
                <h3 class="title"></h3>
            </div>
            <div class="modal-body" style="text-align: center">
                <div class="modal-error"></div>
                <div class="modal-loading loading"><img src="<?php 
        echo $this->getAssetManager()->getAssetLink('images/loader-18.gif');
        ?>
"/></div>
                <div class="modal-information"></div>
            </div>
            <div class="modal-footer">
                <input type="button" value="<?php 
        echo htmlspecialchars(_i('Submit'));
        ?>
" href="#" class="btn btn-primary submitModal" data-function="submitModal" data-report="0" data-delete="0">
                <input type="button" value="<?php 
        echo htmlspecialchars(_i('Cancel'));
        ?>
" href="#" class="btn secondary closeModal" data-function="closeModal">
            </div>
        </div>
        <?php 
    }
Esempio n. 8
0
 public function before()
 {
     $request = $this->getRequest();
     $this->uri = $this->getContext()->getService('uri');
     $this->mailer = $this->getContext()->getService('mailer');
     $this->notices = $this->getContext()->getService('notices');
     $this->preferences = $this->getContext()->getService('preferences');
     $this->config = $this->getContext()->getService('config');
     $this->security = $this->getContext()->getService('security');
     $theme_instance = \Foolz\Theme\Loader::forge('foolframe_admin');
     $theme_instance->addDir(VENDPATH . 'foolz/foolframe/assets/themes-admin/');
     $theme_instance->addDir(VAPPPATH . 'foolz/foolframe/themes-admin/');
     $theme_instance->setBaseUrl($this->uri->base() . 'foolframe/');
     $theme_instance->setPublicDir(DOCROOT . 'foolframe/');
     // make it possible to override the theme so other framework components can extend with their own
     $this->setupTheme($theme_instance);
     $this->builder = $this->theme->createBuilder();
     $this->param_manager = $this->builder->getParamManager();
     $this->builder->createLayout('base');
     $this->builder->getProps()->addTitle(_i('Control Panel') . ' - ' . $this->preferences->get('foolframe.gen.website_title'));
     $this->param_manager->setParams(['context' => $this->getContext(), 'notices' => $this->notices, 'uri' => $this->uri, 'request' => $request]);
     // returns the hardcoded sidebar array (can't use functions when declaring a class variable)
     $sidebar = $this->getSidebarValues();
     $sidebar_dynamic = Hook::forge('Foolz\\FoolFrame\\Controller\\Admin::before#var.sidebar')->setObject($this)->setParam('sidebar', [])->execute()->getParam('sidebar');
     // merge if there were sidebar elements added dynamically
     if (!empty($sidebar_dynamic)) {
         $sidebar = $this->mergeSidebars($sidebar, $sidebar_dynamic);
     }
     $this->builder->createPartial('navbar', 'navbar');
     $this->builder->createPartial('sidebar', 'sidebar')->getParamManager()->setParams(['sidebar' => $this->getSidebar($request, $sidebar)]);
 }
Esempio n. 9
0
    public function toString()
    {
        $title = $this->getParamManager()->getParam('title');
        $form = $this->getForm();
        ?>
            <div class="alert alert-success" style="margin:15% 30%;">
                <h4 class="alert-heading"><?php 
        echo e($title);
        ?>
</h4>
                <br>
                <?php 
        echo $form->open();
        ?>
                <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>
                <?php 
        echo _i('Explain in short (max. 500 chars) why your ban should be lifted.');
        ?>
                <br>
                <?php 
        echo $form->textarea(['name' => 'appeal', 'style' => 'width: 100%; height: 100px; margin: 10px 0']);
        ?>
                <?php 
        echo $form->submit(['name' => 'submit', 'value' => _i('Submit'), 'class' => 'btn btn-inverse']);
        ?>
                <?php 
        echo $form->close();
        ?>
            </div>
        <?php 
    }
Esempio n. 10
0
    public function toString()
    {
        $form = $this->getForm();
        $modules = $this->getParamManager()->getParam('modules');
        ?>
        <p class="description">
            <?php 
        echo _i('Congratulations, you have completed the installation and setup of FoolFrame. Please choose the module(s) you wish to install below:');
        ?>
        </p>

        <?php 
        echo $form->open();
        ?>

            <?php 
        foreach ($modules as $module => $info) {
            ?>
                <label class="checkbox">
                    <?php 
            if ($info['disabled']) {
                ?>
                        <input type="checkbox" name="<?php 
                echo $module;
                ?>
" disabled="disabled" />
                    <?php 
            } else {
                ?>
                        <input type="checkbox" name="<?php 
                echo $module;
                ?>
" />
                    <?php 
            }
            ?>
                    <?php 
            echo $info['title'];
            ?>
                </label>
                <p style="font-size: 0.8em; padding-left: 20px"><?php 
            echo $info['description'];
            ?>
</p>
            <?php 
        }
        ?>

            <hr>

            <?php 
        echo $form->submit(array('name' => 'submit', 'value' => _i('Next'), 'class' => 'btn btn-success pull-right'));
        ?>
        <?php 
        echo $form->close();
        ?>
        <?php 
    }
Esempio n. 11
0
 public function action_manage()
 {
     $this->param_manager->setParam('method_title', [_i('Foolslide'), _i("Board Statistics"), _i('Manage')]);
     $data['form'] = $this->structure();
     $this->preferences->submit_auto($this->getRequest(), $data['form'], $this->getPost());
     // create a form
     $this->builder->createPartial('body', 'form_creator')->getParamManager()->setParams($data);
     return new Response($this->builder->build());
 }
Esempio n. 12
0
    public function toString()
    {
        $form = $this->getForm();
        ?>
<div class="admin-container">
        <div class="admin-container-header"><?php 
        echo _i('New Password');
        ?>
</div>
        <p>
            <?php 
        echo $form->open(['onsubmit' => 'fuel_set_csrf_token(this);']);
        ?>
            <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>

            <div class="control-group">
                <label class="control-label" for="new-password"><?php 
        echo _i('Password');
        ?>
</label>
                <div class="controls">
                    <?php 
        echo $form->password(['id' => 'new-password', 'name' => 'password', 'placeholder' => _i('Password'), 'required' => true]);
        ?>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="new-password-confirm"><?php 
        echo _i('Confirm Password');
        ?>
</label>
                <div class="controls">
                    <?php 
        echo $form->password(['id' => 'new-password-confirm', 'name' => 'confirm_password', 'placeholder' => _i('Password'), 'required' => true]);
        ?>
                </div>
            </div>

            <div class="control-group">
                <div class="controls">
                    <?php 
        echo $form->submit(['class' => 'btn btn-primary', 'name' => 'submit', 'value' => _i('Submit')]);
        ?>
                </div>
            </div>

            <?php 
        echo $form->close();
        ?>
        </p>
    </div>
    <?php 
    }
Esempio n. 13
0
    public function toString()
    {
        $form = $this->getForm();
        ?>
<div class="admin-container">
    <div class="admin-container-header"><?php 
        echo _i('Change Email Address');
        ?>
</div>
    <p>
        <?php 
        echo $form->open(['onsubmit' => 'fuel_set_csrf_token(this);']);
        ?>
        <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>

        <div class="control-group">
            <label class="control-label" for="new-email"><?php 
        echo _i('New Email Address');
        ?>
</label>
            <div class="controls">
                <?php 
        echo $form->input(['id' => 'new-email', 'name' => 'email', 'type' => 'email', 'value' => $this->getPost('email'), 'placeholder' => '*****@*****.**', 'required' => true]);
        ?>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="password"><?php 
        echo _i('Password');
        ?>
</label>
            <div class="controls">
                <?php 
        echo $form->password(['id' => 'password', 'name' => 'password', 'placeholder' => _i('Password'), 'required' => true]);
        ?>
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
                <?php 
        echo $form->submit(['class' => 'btn btn-primary', 'name' => 'submit', 'value' => _i('Submit')]);
        ?>
            </div>
        </div>

        <?php 
        echo $form->close();
        ?>
    </p>
</div>
<?php 
    }
Esempio n. 14
0
    public function toString()
    {
        ?>
        <nav class="index_nav clearfix">
        <h1><?php 
        echo $this->getPreferences()->get('foolfuuka.gen_index_title');
        ?>
</h1>
        <?php 
        $index_nav = array();
        if ($this->getRadixColl()->getArchives()) {
            $index_nav['archives'] = array('title' => _i('Archives'), 'elements' => array());
            foreach ($this->getRadixColl()->getArchives() as $key => $item) {
                $index_nav['archives']['elements'][] = array('href' => $this->getUri()->create($item->shortname), 'text' => '/' . $item->shortname . '/ <span class="help">' . $item->name . '</span>');
            }
        }
        if ($this->getRadixColl()->getBoards()) {
            $index_nav['boards'] = array('title' => _i('Boards'), 'elements' => array());
            foreach ($this->getRadixColl()->getBoards() as $key => $item) {
                $index_nav['boards']['elements'][] = array('href' => $this->getUri()->create($item->shortname), 'text' => '/' . $item->shortname . '/ <span class="help">' . $item->name . '</span>');
            }
        }
        $index_nav = Hook::forge('foolframe.themes.generic.index_nav_elements')->setObject($this)->setParam('nav', $index_nav)->execute()->get($index_nav);
        $index_nav = Hook::forge('foolfuuka.themes.default.index_nav_elements')->setObject($this)->setParam('nav', $index_nav)->execute()->get($index_nav);
        foreach ($index_nav as $item) {
            ?>
                <ul class="pull-left clearfix">
                    <li><h2><?php 
            echo $item['title'];
            ?>
</h2></li>
                    <li>
                        <ul>
                            <?php 
            foreach ($item['elements'] as $i) {
                ?>
                                <li><h3><a href="<?php 
                echo $i['href'];
                ?>
"><?php 
                echo $i['text'];
                ?>
</a></h3></li>
                            <?php 
            }
            ?>
                        </ul>
                    </li>
                </ul>
            <?php 
        }
        ?>
        </nav>
    <?php 
    }
Esempio n. 15
0
 /**
  * The structure of the radix table to be used with validation and form creator
  *
  * @param  \Foolz\Foolfuuka\Model\Radix|null  $radix  If available insert to customize the structure
  *
  * @return  array  The structure
  */
 public function structure($radix = null)
 {
     $dc = $this->dc;
     $structure = ['open' => ['type' => 'open'], 'id' => ['type' => 'hidden', 'database' => true, 'validation_func' => function ($input, $form_internal) use($dc) {
         // check that the ID exists
         $row = $dc->qb()->select('COUNT(*) as count')->from($dc->p('boards'), 'b')->where('id = :id')->setParameter(':id', $input['id'])->execute()->fetch();
         if ($row['count'] != 1) {
             return ['error_code' => 'ID_NOT_FOUND', 'error' => _i('Couldn\'t find the board with the submitted ID.'), 'critical' => true];
         }
         return ['success' => true];
     }], 'name' => ['database' => true, 'type' => 'input', 'label' => _i('Name'), 'help' => _i('Insert the title of the board.'), 'placeholder' => _i('Required'), 'class' => 'span3', 'validation' => [new Assert\NotBlank(), new Assert\Length(['max' => 128])]], 'shortname' => ['database' => true, 'type' => 'input', 'label' => _i('Shortname'), 'help' => _i('Insert the shortname for the board. Reserved: "admin". '), 'placeholder' => _i('Req.'), 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Length(['max' => 32])], 'validation_func' => function ($input, $form_internal) use($dc) {
         // if we're working on the same object
         if (isset($input['id'])) {
             // existence ensured by CRITICAL in the ID check
             $row = $dc->qb()->select('shortname')->from($dc->p('boards'), 'b')->where('id = :id')->setParameter(':id', $input['id'])->execute()->fetch();
             if ($row === false) {
                 return ['error_code' => 'ID_NOT_FOUND', 'error' => _i('Couldn\'t find the board with the submitted ID.')];
             }
             // no change?
             if ($input['shortname'] === $row['shortname']) {
                 // no change
                 return ['success' => true];
             }
         }
         if (!preg_match('/^\\w+$/', $input['shortname'], $matches)) {
             return ['error_code' => 'INVALID SHORTNAME', 'error' => _i('The shortname is must be composed of letters, numbers and underscores.')];
         }
         $row = $dc->qb()->select('shortname')->from($dc->p('boards'), 'r')->where('shortname = :s')->setParameter(':s', $input['shortname'])->execute()->fetch();
         // check that there isn't already a board with that name
         if ($row !== false) {
             return ['error_code' => 'ALREADY_EXISTS', 'error' => _i('The shortname is already used for another board.')];
         }
     }], 'rules' => ['database' => true, 'boards_preferences' => true, 'type' => 'textarea', 'label' => _i('General rules'), 'help' => _i('Full board rules displayed in a separate page, in <a href="http://daringfireball.net/projects/markdown/basics" target="_blank">MarkDown</a> syntax. Will not display if left empty.'), 'class' => 'span6', 'placeholder' => _i('MarkDown goes here')], 'separator-3' => ['type' => 'separator'], 'posting_rules' => ['database' => true, 'boards_preferences' => true, 'type' => 'textarea', 'label' => _i('Posting rules'), 'help' => _i('Posting rules displayed in the posting area, in <a href="http://daringfireball.net/projects/markdown/basics" target="_blank">MarkDown</a> syntax. Will not display if left empty.'), 'class' => 'span6', 'placeholder' => _i('MarkDown goes here')], 'separator-1' => ['type' => 'separator'], 'threads_per_page' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Maximum number of threads to display in the index pages'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'archive' => ['database' => true, 'type' => 'checkbox', 'help' => _i('Is this a 4chan archiving board?'), 'sub' => ['paragraph' => ['type' => 'paragraph', 'help' => _i('Options for archive boards')], 'board_url' => ['database' => true, 'boards_preferences' => true, 'type' => 'input', 'label' => _i('URL to the 4chan board (facultative)'), 'placeholder' => 'http://boards.4chan.org/' . (is_object($radix) ? $radix->shortname : 'shortname') . '/', 'class' => 'span4', 'validation' => [new Assert\Length(['max' => 256])]], 'thumbs_url' => ['database' => true, 'boards_preferences' => true, 'type' => 'input', 'label' => _i('URL to the board thumbnails (facultative)'), 'placeholder' => 'http://0.thumbs.4chan.org/' . (is_object($radix) ? $radix->shortname : 'shortname') . '/', 'class' => 'span4', 'validation' => [new Assert\Length(['max' => 256])]], 'images_url' => ['database' => true, 'boards_preferences' => true, 'type' => 'input', 'label' => _i('URL to the board images (facultative)'), 'placeholder' => 'http://images.4chan.org/' . (is_object($radix) ? $radix->shortname : 'shortname') . '/', 'class' => 'span4', 'validation' => [new Assert\Length(['max' => 256])]], 'archive_full_images' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Is the archive storing full images?'), 'type' => 'checkbox']], 'sub_inverse' => ['paragraph' => ['type' => 'paragraph', 'help' => _i('Options for normal boards')], 'op_image_upload_necessity' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Select if users have to upload an image when starting a new thread?'), 'type' => 'select', 'default_value' => 'always', 'options' => ['always' => _i('Always'), 'optional' => _i('Optional'), 'never' => _i('Never')]], 'thumbnail_op_width' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Opening post thumbnails maximum width in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'thumbnail_op_height' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Opening post thumbnails maximum height in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'thumbnail_reply_width' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Reply thumbnails maximum width in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'thumbnail_reply_height' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Reply thumbnails maximum height in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'max_image_size_kilobytes' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Full image maximum size in kilobytes.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'max_image_size_width' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Full image maximum width in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'max_image_size_height' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Full image maximum height in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'max_posts_count' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The maximum replies for each thread.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'max_images_count' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The maximum image replies for each thread.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'cooldown_new_thread' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The minimum delay to start new threads for each user in seconds.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'thread_lifetime' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The amount of time a thread will stay alive in seconds.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'min_image_repost_time' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The minimum delay between posting the same image in seconds.<br>(0 means no limit, -1 means never allowing a repost)'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => -2])]]]], 'anonymous_default_name' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The default name if a user doesn\'t enter a name.'), 'type' => 'input', 'class' => 'span3', 'validation' => [new Assert\NotBlank()]], 'max_comment_characters_allowed' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The maximum number of characters allowed in the post.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'max_comment_lines_allowed' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The maximum number of lines in the post.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'cooldown_new_comment' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The minimum delay between posts for each user in seconds.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'captcha_comment_link_limit' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Maximum allowed `HTTP` links before triggering spam detection.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'transparent_spoiler' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Spoilers images to be semi-transparent. (Mods and Admins are not affected)'), 'type' => 'checkbox'], 'enable_flags' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Display country flags of posters? (<a href="http://www.maxmind.com/en/geolocation_landing" target="_blank">Required GeoIP</a>)'), 'type' => 'checkbox'], 'enable_animated_gif_thumbs' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Enable animated gif’s thumbnail creation. (CPU-heavy)'), 'type' => 'checkbox'], 'display_exif' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Display EXIF data from images. (EXIF data is always stored in the database)'), 'type' => 'checkbox', 'disabled' => 'disabled'], 'enable_poster_hash' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Enable an IP-based code to poster hashes. (Temporarily distinguish Anonymous users)'), 'type' => 'checkbox'], 'disable_ghost' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Disable ghost replies.'), 'type' => 'checkbox'], 'hide_thumbnails' => ['database' => true, 'type' => 'checkbox', 'help' => _i('Disable thumbnails.')], 'sphinx' => ['database' => true, 'type' => 'checkbox', 'help' => _i('Use SphinxSearch as search engine.')], 'hidden' => ['database' => true, 'type' => 'checkbox', 'help' => _i('Hide the board from public access. (Mods and Admins are not affected)')]];
     $structure = \Foolz\Plugin\Hook::forge('Foolz\\Foolfuuka\\Model\\Radix::structure.result')->setParam('structure', $structure)->execute()->get($structure);
     $structure = array_merge($structure, ['separator-2' => ['type' => 'separator-short'], 'submit' => ['type' => 'submit', 'class' => 'btn-primary', 'value' => _i('Submit')], 'close' => ['type' => 'close']]);
     foreach ($structure as $key => $item) {
         $default = $this->config->get('foolz/foolfuuka', 'package', 'preferences.radix.' . $key);
         if ($default !== null) {
             $structure[$key]['default_value'] = $default;
         }
         $subs = ['sub', 'sub_inverse'];
         foreach ($subs as $inv) {
             if (isset($item[$inv])) {
                 foreach ($item[$inv] as $k => $i) {
                     $default = $this->config->get('foolz/foolfuuka', 'package', 'preferences.radix.' . $k);
                     if (!is_null($default)) {
                         $structure[$key][$inv][$k]['default_value'] = $default;
                     }
                 }
             }
         }
     }
     return $structure;
 }
Esempio n. 16
0
 public static function getEnvironment(Context $context)
 {
     $environment = [];
     $environment['server'] = ['title' => _i('Server Information'), 'data' => [['title' => _i('Web Server Software'), 'value' => $_SERVER['SERVER_SOFTWARE'], 'alert' => ['type' => 'warning', 'condition' => (bool) preg_match('/nginx/i', $_SERVER['SERVER_SOFTWARE']), 'title' => 'Warning', 'string' => _i('The nginx web server has its own internal file size limit variable for uploads. It is recommended that this value be set at the same value set in the PHP configuration file.')]], ['title' => _i('PHP Version'), 'value' => PHP_VERSION, 'alert' => ['type' => 'important', 'condition' => version_compare(PHP_VERSION, '5.4.0') < 0, 'title' => _i('Please Update Immediately'), 'string' => _i('The minimum requirements to run this software is 5.4.0.')]]]];
     $environment['software'] = ['title' => _i('Software Information'), 'data' => [['title' => _i('FoolFrame Version'), 'value' => $context->getService('config')->get('foolz/foolframe', 'package', 'main.version'), 'alert' => ['type' => 'info', 'condition' => true, 'title' => _i('New Update Available'), 'string' => _i('There is a new version of the software available for download.')]]]];
     $environment['php-configuration'] = ['title' => _i('PHP Configuration'), 'data' => [['title' => _i('Config Location'), 'value' => php_ini_loaded_file(), 'description' => _i('This is the path to the location of the php.ini configuration file.')], ['title' => 'allow_url_fopen', 'value' => ini_get('allow_url_fopen') ? _i('On') : _i('Off'), 'description' => _i('This option enables the URL-aware fopen wrappers that allows access to remote files using the FTP or HTTP protocol.'), 'alert' => ['type' => 'important', 'condition' => (bool) (!ini_get('allow_url_fopen')), 'title' => _i('Critical'), 'string' => _i('The PHP configuration on the server currently has URL-aware fopen wrappers disabled. The software will be operating at limited functionality.')]], ['title' => 'max_execution_time', 'value' => ini_get('max_execution_time'), 'description' => _i('This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser.'), 'alert' => ['type' => 'warning', 'condition' => (bool) (intval(ini_get('max_execution_time')) < 60), 'title' => _i('Warning'), 'string' => _i('Your current value for maximum execution time is below the suggested value.')]], ['title' => 'file_uploads', 'value' => ini_get('file_uploads') ? _i('On') : _i('Off'), 'description' => _i('This sets whether or not to allow HTTP file uploads.'), 'alert' => ['type' => 'important', 'condition' => (bool) (!ini_get('file_uploads')), 'title' => _i('Critical'), 'string' => _i('The PHP configuration on the server currently has file uploads disabled. This option must be enabled for the software to fully function.')]], ['title' => 'post_max_size', 'value' => ini_get('post_max_size'), 'description' => _i('This sets the maximum size of POST data allowed.'), 'alert' => ['type' => 'warning', 'condition' => (bool) (intval(substr(ini_get('post_max_size'), 0, -1)) < 16), 'title' => _i('Warning'), 'string' => _i('Your current value for maximum POST data size is below the suggested value.')]], ['title' => 'upload_max_filesize', 'value' => ini_get('upload_max_filesize'), 'description' => _i('This sets the maximum size allowed to be uploaded.'), 'alert' => ['type' => 'warning', 'condition' => (bool) (intval(substr(ini_get('upload_max_filesize'), 0, -1)) < 16), 'title' => _i('Warning'), 'string' => _i('Your current value for maximum upload file size is below the suggested value.')]], ['title' => 'max_file_uploads', 'value' => ini_get('max_file_uploads'), 'description' => _i('This sets the maximum number of files allowed to be uploaded concurrently.'), 'alert' => ['type' => 'warning', 'condition' => (bool) (intval(ini_get('max_file_uploads')) < 60), 'title' => _i('Warning'), 'string' => _i('Your current value for maximum number of concurrent uploads is below the suggested value.')]]]];
     $environment['php-extensions'] = ['title' => _i('PHP Extensions'), 'data' => [['title' => 'APC', 'value' => extension_loaded('apc') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'warning', 'condition' => (bool) (!extension_loaded('apc')), 'title' => _i('Warning'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'APC')]], ['title' => 'cURL', 'value' => extension_loaded('curl') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('curl')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'cURL')]], ['title' => 'FileInfo', 'value' => extension_loaded('fileinfo') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('fileinfo')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'FileInfo')]], ['title' => 'JSON', 'value' => extension_loaded('json') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('json')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'JSON')]], ['title' => 'Multi-byte String', 'value' => extension_loaded('mbstring') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('mbstring')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'Multi-byte String')]], ['title' => 'MySQLi', 'value' => extension_loaded('mysqli') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('mysqli')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'MySQLi')]], ['title' => 'PDO MySQL', 'value' => extension_loaded('pdo_mysql') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('pdo_mysql')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'PDO MySQL')]]]];
     $environment = Hook::forge('Foolz\\FoolFrame\\Model\\System::getEnvironment#var.environment')->setParam('environment', $environment)->execute()->get($environment);
     usort($environment['php-extensions']['data'], array('System', 'sortByTitle'));
     return $environment;
 }
Esempio n. 17
0
 public function __construct($options = null)
 {
     if (!isset($options['field'])) {
         throw new ConstraintDefinitionException(sprintf('The %s constraint requires the "field" option to be set.', get_class($this)));
     }
     if (!isset($options['value'])) {
         throw new ConstraintDefinitionException(sprintf('The %s constraint requires the "value" option to be set.', get_class($this)));
     }
     $this->message = _i('This field should match the contents of {{ field }}.');
     parent::__construct($options);
 }
Esempio n. 18
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if (($radix = $input->getOption('radix')) !== null) {
         if ($this->radix_coll->getByShortname($radix) !== false) {
             $this->board_statistics($output, $radix);
         } else {
             $output->writeln('<error>' . _i('Wrong radix (board short name) specified.') . '</error>');
         }
     } else {
         $this->board_statistics($output);
     }
 }
Esempio n. 19
0
 function action_action()
 {
     if ($this->getPost() && !$this->security->checkCsrfToken($this->getRequest())) {
         $this->notices->setFlash('warning', _i('The security token wasn\'t found. Try resubmitting.'));
         return $this->redirect('admin/plugins/manage');
     }
     if (!($slug = $this->getPost('name'))) {
         throw new NotFoundHttpException();
     }
     if (!$this->getPost('action') || !in_array($this->getPost('action'), array('enable', 'disable', 'remove'))) {
         throw new NotFoundHttpException();
     }
     $action = $this->getPost('action');
     $plugin = $this->plugins->getPlugin($slug);
     if (!$plugin) {
         throw new NotFoundHttpException();
     }
     switch ($action) {
         case 'enable':
             try {
                 $this->plugins->enable($slug);
             } catch (PluginException $e) {
                 $this->notices->setFlash('error', _i('The plugin %s couldn\'t be enabled.', $plugin->getJsonConfig('extra.name')));
                 break;
             }
             $this->notices->setFlash('success', _i('The %s plugin is now enabled.', $plugin->getJsonConfig('extra.name')));
             break;
         case 'disable':
             try {
                 $this->plugins->disable($slug);
             } catch (PluginException $e) {
                 $this->notices->setFlash('error', _i('The %s plugin couldn\'t be enabled.', $plugin->getJsonConfig('extra.name')));
                 break;
             }
             $this->notices->setFlash('success', _i('The %s plugin is now disabled.', $plugin->getJsonConfig('extra.name')));
             break;
         case 'upgrade':
             break;
         case 'remove':
             try {
                 $this->plugins->remove($slug);
             } catch (PluginException $e) {
                 $this->notices->setFlash('error', _i('The :slug plugin couldn\'t be removed.', $plugin->getJsonConfig('extra.name')));
                 break;
             }
             $this->notices->setFlash('success', _i('The :slug plugin was removed.', $plugin->getJsonConfig('extra.name')));
             break;
     }
     return $this->redirect('admin/plugins/manage');
 }
Esempio n. 20
0
    public function toString()
    {
        $form = $this->getForm();
        ?>
<div class="admin-container">
    <div class="admin-container-header"><?php 
        echo _i('New Email Address');
        ?>
</div>
    <p>
        <i class="icon-warning-sign text-error"></i> <?php 
        echo _i('This action is irreversible, Insert your account password below and click the button.<br>An email will be sent to your registered email account with further instructions to verify your decision to purge your account from the system.');
        ?>

        <hr/>

        <?php 
        echo $form->open(['onsubmit' => 'fuel_set_csrf_token(this);']);
        ?>
        <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>

        <div class="control-group">
            <label class="control-label" for="password"><?php 
        echo _i('Password');
        ?>
</label>
            <div class="controls">
                <?php 
        echo $form->password(['id' => 'password', 'name' => 'password', 'placeholder' => _i('Password'), 'required' => true]);
        ?>
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
                <?php 
        echo $form->submit(['class' => 'btn btn-primary', 'name' => 'submit', 'value' => _i('Request Account Deletion')]);
        ?>
            </div>
        </div>

        <?php 
        echo $form->close();
        ?>
    </p>
</div>
    <?php 
    }
Esempio n. 21
0
    public function toString()
    {
        $error = $this->getParamManager()->getParam('error');
        ?>
        <div class="alert" style="margin:15%;">
            <h4 class="alert-heading"><?php 
        echo _i('Error!');
        ?>
</h4>
            <?php 
        echo $error;
        ?>
        </div>
        <?php 
    }
Esempio n. 22
0
/**
 * Check and get the authentication configuration settings
 */
function auth_prerequisite()
{
    global $lc_siteErrors;
    db_prerequisite();
    $auth = _cfg('auth');
    if (isset($auth['table']) && $auth['table'] && isset($auth['fields']['id']) && $auth['fields']['id'] && isset($auth['fields']['role']) && $auth['fields']['role']) {
        return $auth;
    } else {
        $error = new stdClass();
        $error->message = 'Required to configure <code class="inline">$lc_auth</code> in "/inc/config.php" or "/inc/site.config.php".';
        $error->message = array(function_exists('_t') ? _t($error->message) : $error->message);
        $error->type = 'sitewide-message error';
        include _i('inc/tpl/site.error.php');
        exit;
    }
}
Esempio n. 23
0
 public function run()
 {
     Event::forge('Foolz\\Plugin\\Plugin::execute.foolz/foolfuuka-plugin-dice-roll')->setCall(function ($result) {
         /* @var Context $context */
         $context = $result->getParam('context');
         /** @var Autoloader $autoloader */
         $autoloader = $context->getService('autoloader');
         $autoloader->addClass('Foolz\\Foolfuuka\\Plugins\\DiceRoll\\Model\\Dice', __DIR__ . '/classes/model/dice.php');
         Event::forge('Foolz\\Foolfuuka\\Model\\CommentInsert::insert.call.after.input_checks')->setCall('Foolz\\Foolfuuka\\Plugins\\DiceRoll\\Model\\Dice::roll')->setPriority(4);
         Event::forge('Foolz\\Foolfuuka\\Model\\Radix::structure.result')->setCall(function ($result) {
             $structure = $result->getParam('structure');
             $structure['plugin_dice_roll_enable'] = ['database' => true, 'boards_preferences' => true, 'type' => 'checkbox', 'help' => _i('Enable dice roll?')];
             $result->setParam('structure', $structure)->set($structure);
         })->setPriority(4);
     });
 }
Esempio n. 24
0
 private function structure()
 {
     $this->param_manager->setParam('method_title', 'Manage');
     $form = [];
     $form['open'] = ['type' => 'open'];
     $form['paragraph'] = ['type' => 'paragraph', 'help' => _i('You can add board-specific locks by browsing the board preferences.')];
     $form['foolslide.plugins.geoip_region_lock.allow_comment'] = ['label' => _i('Countries allowed to post'), 'type' => 'textarea', 'preferences' => true, 'validation' => [new Trim()], 'class' => 'span6', 'style' => 'height:60px', 'help' => _i('Comma separated list of GeoIP 2-letter nation codes.') . ' ' . _i('If you allow a nation, all other nations won\'t be able to comment.')];
     $form['foolslide.plugins.geoip_region_lock.disallow_comment'] = ['label' => _i('Countries disallowed to post'), 'type' => 'textarea', 'preferences' => true, 'validation' => [new Trim()], 'class' => 'span6', 'style' => 'height:60px', 'help' => _i('Comma separated list of GeoIP 2-letter nation codes.') . ' ' . _i('Disallowed nations won\'t be able to comment.')];
     $form['foolslide.plugins.geoip_region_lock.allow_view'] = ['label' => _i('Countries allowed to view the site'), 'type' => 'textarea', 'preferences' => true, 'validation' => [new Trim()], 'class' => 'span6', 'style' => 'height:60px', 'help' => _i('Comma separated list of GeoIP 2-letter nation codes.') . ' ' . _i('If you allow a nation, all other nations won\'t be able to reach the interface.')];
     $form['foolslide.plugins.geoip_region_lock.disallow_view'] = ['label' => _i('Countries disallowed to view the site.'), 'type' => 'textarea', 'preferences' => true, 'validation' => [new Trim()], 'class' => 'span6', 'style' => 'height:60px', 'help' => _i('Comma separated list of GeoIP 2-letter nation codes.') . ' ' . _i('Disallowed nations won\'t be able to reach the interface.')];
     $form['separator-1'] = ['type' => 'separator'];
     $form['foolslide.plugins.geoip_region_lock.allow_logged_in'] = ['label' => _i('Allow logged in users to post regardless.'), 'type' => 'checkbox', 'preferences' => true, 'help' => _i('Allow all logged in users to post regardless of region lock? (Mods and Admins are always allowed to post)')];
     $form['separator'] = ['type' => 'separator'];
     $form['submit'] = ['type' => 'submit', 'value' => _i('Submit'), 'class' => 'btn btn-primary'];
     $form['close'] = ['type' => 'close'];
     $data['form'] = $form;
     return $form;
 }
Esempio n. 25
0
    public function toString()
    {
        $level = $this->getParamManager()->getParam('level');
        $message = $this->getParamManager()->getParam('message');
        ?>
        <div class="alert alert-<?php 
        echo $level;
        ?>
" style="margin:15%;">
            <h4 class="alert-heading"><?php 
        echo _i('Message');
        ?>
</h4>
            <?php 
        echo $message;
        ?>
        </div>
        <?php 
    }
Esempio n. 26
0
    public function toString()
    {
        ?>
        <p class="text-success">
            <?php 
        echo _i('Congratulations! The installation is complete!');
        ?>
        </p>

        <hr>

        <a href="<?php 
        echo $this->getUri()->create('admin');
        ?>
" class="btn btn-info pull-right"><?php 
        echo _i('Log In');
        ?>
</a>
        <?php 
    }
Esempio n. 27
0
 public function run()
 {
     Event::forge('Foolz\\Plugin\\Plugin::execute.foolz/foolfuuka-plugin-geoip-region-lock')->setCall(function (Result $result) {
         /* @var $context Context */
         $context = $result->getParam('context');
         /** @var Autoloader $autoloader */
         $autoloader = $context->getService('autoloader');
         $autoloader->addClassMap(['Foolz\\Foolframe\\Controller\\Admin\\Plugins\\GeoipRegionLock' => __DIR__ . '/classes/controller/admin.php', 'Foolz\\Foolfuuka\\Plugins\\GeoipRegionLock\\Model\\GeoipRegionLock' => __DIR__ . '/classes/model/geoip_region_lock.php']);
         Event::forge('Foolz\\Foolframe\\Model\\Context.handleWeb.has_auth')->setCall(function ($result) use($context) {
             // don't add the admin panels if the user is not an admin
             /** @var Auth $auth */
             $auth = $context->getService('auth');
             if ($auth->hasAccess('maccess.admin')) {
                 $context->getRouteCollection()->add('foolframe.plugin.geoip_region_lock.admin', new \Symfony\Component\Routing\Route('/admin/plugins/geoip_region_lock/{_suffix}', ['_suffix' => 'manage', '_controller' => '\\Foolz\\Foolframe\\Controller\\Admin\\Plugins\\GeoipRegionLock::manage'], ['_suffix' => '.*']));
                 Event::forge('Foolz\\Foolframe\\Controller\\Admin.before.sidebar.add')->setCall(function ($result) {
                     $sidebar = $result->getParam('sidebar');
                     $sidebar[]['plugins'] = ["content" => ["geoip_region_lock/manage" => ["level" => "admin", "name" => 'GeoIP Region Lock', "icon" => 'icon-flag']]];
                     $result->setParam('sidebar', $sidebar);
                 });
             }
             $preferences = $context->getService('preferences');
             $context->getContainer()->register('foolfuuka-plugin.geoip_region_lock', 'Foolz\\Foolfuuka\\Plugins\\GeoipRegionLock\\Model\\GeoipRegionLock')->addArgument($context);
             /** @var GeoipRegionLock $object */
             $object = $context->getService('foolfuuka-plugin.geoip_region_lock');
             if (!$auth->hasAccess('maccess.mod') && !($preferences->get('foolfuuka.plugins.geoip_region_lock.allow_logged_in') && $auth->hasAccess('access.user'))) {
                 Event::forge('Foolz\\Foolframe\\Model\\Context.handleWeb.override_response')->setCall(function (Result $result) use($context, $object) {
                     $object->blockCountryView($result);
                 })->setPriority(2);
                 Event::forge('Foolz\\Foolfuuka\\Model\\CommentInsert::insert.call.before.method')->setCall(function (Result $result) use($context, $object) {
                     $object->blockCountryComment($result);
                 })->setPriority(4);
             }
         });
         Event::forge('Foolz\\Foolfuuka\\Model\\Radix::structure.result')->setCall(function (Result $result) {
             $structure = $result->getParam('structure');
             $structure['plugin_geo_ip_region_lock_allow_comment'] = ['database' => true, 'boards_preferences' => true, 'type' => 'input', 'class' => 'span3', 'label' => 'Nations allowed to post comments', 'help' => _i('Comma separated list of GeoIP 2-letter nation codes.'), 'default_value' => false];
             $structure['plugin_geo_ip_region_lock_disallow_comment'] = ['database' => true, 'boards_preferences' => true, 'type' => 'input', 'class' => 'span3', 'label' => 'Nations disallowed to post comments', 'help' => _i('Comma separated list of GeoIP 2-letter nation codes.'), 'default_value' => false];
             $result->setParam('structure', $structure)->set($structure);
         })->setPriority(8);
     });
 }
Esempio n. 28
0
    public function toString()
    {
        $form = $this->getForm();
        ?>
<div class="alert alert-block alert-<?php 
        echo $this->getParamManager()->getParam('alert_level');
        ?>
 fade in">
    <p><?php 
        echo $this->getParamManager()->getParam('message');
        ?>
</p>
    <p><?php 
        echo $form->open(array('onsubmit' => 'fuel_set_csrf_token(this);'));
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        echo $form->submit(array('name' => 'confirm', 'value' => _i('Confirm'), 'class' => 'btn btn-danger', 'style' => 'margin-right:6px;'));
        echo '<input type="button" onClick="history.back()" class="btn" value="' . _i('Go back') . '" />';
        echo $form->close();
        ?>
</p>
</div>
<?php 
    }
Esempio n. 29
0
    public function toString()
    {
        ?>
        <p class="description"><?php 
        echo _i('FoolFrame is a custom, light-weight framework that utilizes multiple open source components. It provides a very basic foundation for all Foolz Software and serves as an abstraction layer for our modules.');
        ?>
</p>
        <p class="info"><?php 
        echo _i('The installation procedure is divided into six simple steps and should take approximately 5 minutes to complete.');
        ?>
</p>

        <hr>

        <a href="<?php 
        echo $this->getUri()->create('install/system_check');
        ?>
" class="btn btn-success pull-right"><?php 
        echo _i('Next');
        ?>
</a>
        <?php 
    }
Esempio n. 30
0
    public function toString()
    {
        ?>
        <div id="content">
            <h1><?php 
        echo $this->getPreferences()->get('foolframe.gen.website_title');
        ?>
</h1>
            <h2><?php 
        echo _i('Choose a Board:');
        ?>
</h2>
            <p>
                <?php 
        $board_urls = array();
        foreach ($this->getRadixColl()->getAll() as $key => $item) {
            array_push($board_urls, '<a href="' . $this->getUri()->create($item->shortname) . '" title="' . $item->name . '">/' . $item->shortname . '/</a>');
        }
        echo implode(' ', $board_urls);
        ?>
            </p>
        </div>
    <?php 
    }