Ejemplo n.º 1
1
 public function register()
 {
     Menu::macro('front', function () {
         return Menu::new()->setActiveFromRequest(locale());
     });
     Menu::macro('main', function () {
         return Menu::front()->addClass('nav__list')->url('/', 'Home');
     });
     Menu::macro('language', function () {
         return Menu::build(locales(), function (Menu $menu, string $locale) {
             return $menu->url($locale, strtoupper($locale));
         })->setActiveFromRequest();
     });
     Menu::macro('articleSiblings', function (Article $article) {
         return $article->siblings->reduce(function (Menu $menu, Article $article) {
             return $menu->url($article->fullUrl, $article->name);
         }, Menu::front());
     });
 }
 /**
  * Get the translation for the given locale. If it doesn't exist create it.
  *
  * @param null $locale
  * @param bool $withFallback
  *
  * @return \Illuminate\Database\Eloquent\Model|null
  */
 public function translate($locale = null, $withFallback = false)
 {
     if ($this->hasTranslation($locale)) {
         return $this->getTranslation($locale, $withFallback);
     }
     return $this->getTranslationOrNew(is_null($locale) ? locale() : $locale);
 }
Ejemplo n.º 3
0
Archivo: i18n.php Proyecto: laiello/xiv
 public function __construct(&$params = null)
 {
     parent::__construct(&$params);
     $conf =& $this->using('conf');
     $lang = $conf->get('core/locale', 'en', 's');
     locale($lang);
 }
Ejemplo n.º 4
0
 public static function build(CMSNav &$parent, array &$records, $level = 0)
 {
     // Iterate all items on current level
     foreach ($records as &$record) {
         // If if item is current level parent item TODO: How could it be?
         if ($record->StructureID == $parent->StructureID) {
             continue;
         }
         // If this item is connected with current level parent item
         if ($record->ParentID == $parent->StructureID) {
             // Save pointer to parent item
             $record->parent =& $parent;
             $current =& $record;
             $url_base = '';
             while (isset($current)) {
                 $record->parents[] =& $current;
                 $url_base = trim($current->Url . '/' . $url_base);
                 $record->url_base[$current->StructureID] = $url_base;
                 $record->url_base[$current->StructureID . '_' . locale()] = locale() . '/' . $url_base;
                 $current =& $current->parent;
             }
             $record->level = $level;
             $parent->children['id_' . $record->StructureID] = $record;
             // Go deeper in recursion
             self::build($record, $records, $level + 1);
         }
     }
 }
Ejemplo n.º 5
0
 /**
  * Get the locale in which the content in lists of the back module must be rendered.
  *
  * @return string
  */
 public function getContentLocale()
 {
     if (!$this->isValidLocale(app()->getLocale())) {
         return $this->app->config->get('app.locales')[0];
     }
     return locale();
 }
Ejemplo n.º 6
0
 public static function getContentLocale() : string
 {
     if (!static::isValidLocale(locale())) {
         return config('app.locales')[0];
     }
     return locale();
 }
Ejemplo n.º 7
0
 public function __construct()
 {
     $CI =& get_instance();
     $CI->load->helper('locale');
     $this->_folder = realpath(APPPATH . '../');
     $this->_jarTranslate = APPPATH . 'modules/traductions/third_party/translate.jar';
     $this->_trads = $this->getDico(locale());
 }
Ejemplo n.º 8
0
 private function getLang()
 {
     $lang = $this->input->post_get('lang');
     if ($lang) {
         return $lang;
     }
     $this->load->helper('locale');
     return locale();
 }
Ejemplo n.º 9
0
 /**
  * Entity additional fields localization support.
  */
 protected function rewriteEntityLocale()
 {
     // Iterate all generated entity classes
     foreach (get_declared_classes() as $entityClass) {
         if (is_subclass_of($entityClass, '\\samsoncms\\api\\Entity')) {
             // Insert current application locale
             str_replace('@locale', locale(), $entityClass::$_sql_select);
         }
     }
 }
Ejemplo n.º 10
0
 /** {@inheritdoc} */
 public function __construct($renderer, $query = null, $pager = null)
 {
     // Call parents
     parent::__construct($renderer, $query, $pager, locale());
     // Call external handlers
     $this->entityHandler(array($this, 'joinTables'));
     $this->baseEntityHandler(array($this, 'parentIdInjection'));
     // Fill default column fields for collection
     $this->fields = array(new Generic('MaterialID', '#', 0, 'id', false), new Generic('Name', t('Наименование', true), 0), new Generic('Url', t('Идентификатор', true), 0), new Navigation(), new Generic('Modyfied', t('Последнее изменение', true), 7, 'modified', false, true), new User(), new Generic('Published', t('Показывать', true), 11, 'publish'), new Control());
 }
Ejemplo n.º 11
0
 public function getFullUrlAttribute() : string
 {
     $localeSegment = '';
     if (locales()->count() > 1) {
         $localeSegment = '/' . locale();
     }
     if ($this->technical_name === SpecialArticle::HOME) {
         return $localeSegment;
     }
     $parentUrl = $this->hasParent() ? $this->parent->url . '/' : '';
     return "{$localeSegment}/{$parentUrl}{$this->url}";
 }
Ejemplo n.º 12
0
 public function translate($lang = null)
 {
     if (!$lang) {
         $lang = locale();
     }
     $this->layout->css('css/traductions/trads.css');
     $this->layout->js('js/homePopup.js');
     $this->load->helper('form');
     $this->traductor->export();
     $fullTrads = $this->traductor->getFull();
     $datas = array('fullTrads' => $fullTrads, 'lang' => $lang);
     $this->layout->view('traductions/index', $datas);
 }
Ejemplo n.º 13
0
function gfscanada_preprocess_search_block_form(&$vars, $hook)
{
    // Modify elements of the search form
    $vars['form']['search_block_form']['#title'] = t('Site Search');
    // Set a default value for text inside the search box field.
    $vars['form']['search_block_form']['#value'] = locale('Enter Keywords');
    // Change the text on the submit button
    $vars['form']['submit']['#value'] = locale('GO');
    // Rebuild the rendered version (search form only, rest remains unchanged)
    unset($vars['form']['search_block_form']['#printed']);
    unset($vars['form']['submit']['#printed']);
    $vars['search']['search_block_form'] = drupal_render($vars['form']['search_block_form']);
    $vars['search']['submit'] = drupal_render($vars['form']['submit']);
    // Collect all form elements to make it easier to print the whole form.
    $vars['search_form'] = implode($vars['search']);
}
Ejemplo n.º 14
0
 public function map(Router $router)
 {
     Route::group(['namespace' => $this->namespace], function () {
         /*
          * Special routes
          */
         Route::group(['middleware' => 'web'], function () {
             Route::demoAccess('/demo');
             Route::get('coming-soon', function () {
                 return view('temp/index');
             });
         });
         /*
          * Back site
          */
         Route::group(['namespace' => 'Back', 'middleware' => 'web', 'prefix' => 'blender'], function () {
             Auth::routes();
             Route::group(['middleware' => 'auth'], function () {
                 require base_path('routes/back.php');
             });
         });
         /*
          * Frontsite
          */
         Route::group(['namespace' => 'Front'], function () {
             Route::group(['namespace' => 'Api', 'middleware' => 'api', 'prefix' => 'api'], function () {
                 require base_path('routes/frontApi.php');
             });
             Route::group(['middleware' => ['web', 'demoMode', 'rememberLocale']], function () {
                 $multiLingual = count(config('app.locales')) > 1;
                 Route::group($multiLingual ? ['prefix' => locale()] : [], function () {
                     try {
                         Auth::routes();
                         require base_path('routes/front.php');
                     } catch (Exception $exception) {
                         logger()->warning("Front routes weren't included.");
                     }
                 });
                 if ($multiLingual) {
                     Route::get('/', function () {
                         return redirect(locale());
                     });
                 }
             });
         });
     });
 }
function t($string, $args = array(), $langcode = NULL)
{
    global $language;
    static $custom_strings;
    $langcode = isset($langcode) ? $langcode : $language->language;
    // First, check for an array of customized strings. If present, use the array
    // *instead of* database lookups. This is a high performance way to provide a
    // handful of string replacements. See settings.php for examples.
    // Cache the $custom_strings variable to improve performance.
    if (!isset($custom_strings[$langcode])) {
        $custom_strings[$langcode] = variable_get('locale_custom_strings_' . $langcode, array());
    }
    // Custom strings work for English too, even if locale module is disabled.
    if (isset($custom_strings[$langcode][$string])) {
        $string = $custom_strings[$langcode][$string];
    } elseif (function_exists('locale') && $langcode != 'en') {
        $string = locale($string, $langcode);
    }
    if (empty($args)) {
        return $string;
    } else {
        // Transform arguments before inserting them.
        foreach ($args as $key => $value) {
            switch ($key[0]) {
                case '@':
                    // Escaped only.
                    $args[$key] = check_plain($value);
                    break;
                case '%':
                default:
                    // Escaped and placeholder.
                    $args[$key] = theme('placeholder', $value);
                    break;
                case '!':
                    // Pass-through.
            }
        }
        return strtr($string, $args);
    }
}
Ejemplo n.º 16
0
 /** @inheritdoc */
 public function __construct(RenderInterface $renderer, QueryInterface $query, Record $entity)
 {
     // Get all locales
     $locales = \samson\core\SamsonLocale::get();
     // Set current locale as first value of array
     $localArray = array(locale());
     // Iterate all locales
     foreach ($locales as $local) {
         // Avoid current locale
         if ($local == locale()) {
             continue;
         }
         $localArray[] = $local;
     }
     // Set locales in the new order
     \samson\core\SamsonLocale::$locales = $localArray;
     // TODO This is fix loading SEO module
     // Because seo module used this class, and for checking class_exists function this class have to be exists
     // And we have to call it this but when cms and app will be one single application please remove this line
     new \samsoncms\app\material\form\tab\LocaleTab($renderer, $query, $entity);
     // Fill generic tabs
     $this->tabs = array(new Main($renderer, $query, $entity), new Field($renderer, $query, $entity));
     $this->navigationIDs = dbQuery('structurematerial')->cond('MaterialID', $entity->id)->fields('StructureID');
     // Get all another tabs
     if (sizeof($this->navigationIDs)) {
         $wysiwygFields = dbQuery('field')->cond('Type', 8)->join('structurefield')->cond('structurefield_StructureID', $this->navigationIDs)->exec();
         foreach ($wysiwygFields as $field) {
             $this->tabs[] = new MaterialField($renderer, $query, $entity, $field);
         }
     }
     parent::__construct($renderer, $query, $entity);
     // Fire new event after creating form tabs
     Event::fire('samsoncms.material.form.created', array(&$this, $renderer, $query, $entity));
     // Set old locales
     \samson\core\SamsonLocale::$locales = $locales;
 }
Ejemplo n.º 17
0
function dispatch($languages)
{
    global $base_path;
    global $request_path, $request_query;
    global $closing_time, $opening_time;
    global $track_visitor, $track_visitor_agent;
    $req = $base_path ? substr(request_uri(), strlen($base_path)) : request_uri();
    if ($track_visitor) {
        track($req, $track_visitor_agent);
    }
    $url = @parse_url($req);
    $path = isset($url['path']) ? trim(urldecode($url['path']), '/') : false;
    $query = isset($url['query']) ? $url['query'] : false;
    $request_query = $query;
    if (empty($path)) {
        $path = false;
    }
    /* site language */
    $p = $path ? explode('/', $path) : false;
    $lang = $p ? $p[0] : false;
    if ($lang && in_array($lang, $languages, true)) {
        array_shift($p);
        $path = implode('/', $p);
    } else {
        require_once 'locale.php';
        $lang = locale();
        if (!$lang or !in_array($lang, $languages, true)) {
            $lang = $languages[0];
        }
    }
    $request_path = $path ? $lang . '/' . $path : $lang;
    $action = $args = $params = false;
    if ($closing_time) {
        $action = 'error/serviceunavailable';
        $args = array($closing_time, $opening_time);
    } else {
        $r = route($path, $lang);
        if (!$r) {
            $action = 'error/notfound';
        } else {
            list($action, $args) = $r;
            if ($query) {
                $params = array();
                foreach (explode('&', $query) as $q) {
                    $p = explode('=', $q);
                    if (count($p) == 2) {
                        list($key, $value) = $p;
                        if ($key) {
                            $params[$key] = urldecode($value);
                        }
                    }
                }
            }
        }
    }
    $arglist = $args ? $params ? array_merge($args, $params) : $args : $params;
    run($action, $lang, $arglist);
}
Ejemplo n.º 18
0
 /** @see \samson\core\CompressableExternalModule::afterCompress() */
 public function afterCompress(&$obj = null, array &$code = null)
 {
     // Fill additional fields data to material db request data for automatic altering material request
     self::$fields = array();
     $t_name = '_mf';
     // Save original material attributes
     self::$materialAttributes =& Material::$_attributes;
     // Copy original material table attributes
     CMSMaterial::$_attributes = \samson\activerecord\Material::$_attributes;
     CMSMaterial::$_sql_select = \samson\activerecord\Material::$_sql_select;
     CMSMaterial::$_sql_from = \samson\activerecord\Material::$_sql_from;
     CMSMaterial::$_own_group = \samson\activerecord\Material::$_own_group;
     CMSMaterial::$_map = \samson\activerecord\Material::$_map;
     // Perform db query to get all possible material fields
     if (dbQuery('field')->cond('Active', 1)->cond('Name', '', dbRelation::NOT_EQUAL)->exec($this->material_fields)) {
         foreach ($this->material_fields as $db_field) {
             // Add additional field localization condition
             if ($db_field->local == 1) {
                 $equal = '((' . $t_name . '.FieldID = ' . $db_field->id . ')&&(' . $t_name . ".locale = '" . locale() . "'))";
             } else {
                 $equal = '((' . $t_name . '.FieldID = ' . $db_field->id . ')&&(' . $t_name . ".locale is NULL))";
             }
             // Define field value DB column for storing data
             $v_col = 'Value';
             // We must get data from other column for this type of field
             if ($db_field->Type == 7 || $db_field->Type == 3 || $db_field->Type == 10) {
                 $v_col = 'numeric_value';
             } else {
                 if ($db_field->Type == 6) {
                     $v_col = 'key_value';
                 }
             }
             // Save additional field
             self::$fields[$db_field->Name] = "\n" . ' MAX(IF(' . $equal . ',' . $t_name . '.`' . $v_col . '`, NULL)) as `' . $db_field->Name . '`';
             // Set additional object metadata
             CMSMaterial::$_attributes[$db_field->Name] = $db_field->Name;
             CMSMaterial::$_map[$db_field->Name] = dbMySQLConnector::$prefix . 'material.' . $db_field->Name;
         }
     }
     // Set additional object metadata
     CMSMaterial::$_sql_select['this'] = ' STRAIGHT_JOIN ' . Material::$_sql_select['this'];
     if (sizeof(self::$fields)) {
         CMSMaterial::$_sql_select['this'] .= ',' . implode(',', self::$fields);
     }
     CMSMaterial::$_sql_from['this'] .= "\n" . 'LEFT JOIN ' . dbMySQLConnector::$prefix . 'materialfield as ' . $t_name . ' on ' . dbMySQLConnector::$prefix . 'material.MaterialID = ' . $t_name . '.MaterialID';
     CMSMaterial::$_own_group[] = dbMySQLConnector::$prefix . 'material.MaterialID';
 }
 /**
  * Installs Atrium instead of Drupal
  * 
  * Generates a random database prefix, runs the install scripts on the
  * prefixed database and enable the specified modules. After installation
  * many caches are flushed and the internal browser is setup so that the
  * page requests will run on the new prefix. A temporary files directory
  * is created with the same name as the database prefix.
  *
  * @param ...
  *   List of modules to enable for the duration of the test.
  */
 protected function setUp()
 {
     global $db_prefix, $user, $language, $profile, $install_locale;
     // $language (Drupal 6).
     // Store necessary current values before switching to prefixed database.
     $this->originalPrefix = $db_prefix;
     $this->originalLanguage = clone $language;
     $clean_url_original = variable_get('clean_url', 0);
     // Must reset locale here, since schema calls t().  (Drupal 6)
     if (module_exists('locale')) {
         $language = (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => '');
         locale(NULL, NULL, TRUE);
     }
     // Generate temporary prefixed database to ensure that tests have a clean starting point.
     //    $db_prefix = Database::getConnection()->prefixTables('{simpletest' . mt_rand(1000, 1000000) . '}');
     $db_prefix = 'simpletest' . mt_rand(1000, 1000000);
     $install_locale = $this->install_locale;
     $profile = $this->install_profile;
     //    include_once DRUPAL_ROOT . '/includes/install.inc';
     include_once './includes/install.inc';
     drupal_install_system();
     //    $this->preloadRegistry();
     // Set up theme system for the maintenance page.
     // Otherwise we have trouble: https://ds.openatrium.com/dsi/node/18426#comment-38118
     // @todo simpletest module patch
     drupal_maintenance_theme();
     // Add the specified modules to the list of modules in the default profile.
     $args = func_get_args();
     //    $modules = array_unique(array_merge(drupal_get_profile_modules('default', 'en'), $args));
     $modules = array_unique(array_merge(drupal_verify_profile($this->install_profile, $this->install_locale), $args));
     //    drupal_install_modules($modules, TRUE);
     drupal_install_modules($modules);
     // Because the schema is static cached, we need to flush
     // it between each run. If we don't, then it will contain
     // stale data for the previous run's database prefix and all
     // calls to it will fail.
     drupal_get_schema(NULL, TRUE);
     if ($this->install_profile == 'openatrium') {
         // Download and import translation if needed
         if ($this->install_locale != 'en') {
             $this->installLanguage($this->install_locale);
         }
         // Install more modules
         $modules = _openatrium_atrium_modules();
         drupal_install_modules($modules);
         // Configure intranet
         // $profile_tasks = $this->install_profile . '_profile_tasks';
         _openatrium_intranet_configure();
         _openatrium_intranet_configure_check();
         variable_set('atrium_install', 1);
         // Clear views cache before rebuilding menu tree. Requires patch
         // [patch_here] to Views, as new modules have been included and
         // default views need to be re-detected.
         module_exists('views') ? views_get_all_views(TRUE) : TRUE;
         menu_rebuild();
     }
     _drupal_flush_css_js();
     $this->refreshVariables();
     $this->checkPermissions(array(), TRUE);
     user_access(NULL, NULL, TRUE);
     // Drupal 6.
     // Log in with a clean $user.
     $this->originalUser = $user;
     //    drupal_save_session(FALSE);
     //    $user = user_load(1);
     session_save_session(FALSE);
     $user = user_load(array('uid' => 1));
     // Restore necessary variables.
     variable_set('install_profile', $this->install_profile);
     variable_set('install_task', 'profile-finished');
     variable_set('clean_url', $clean_url_original);
     variable_set('site_mail', '*****@*****.**');
     // Use temporary files directory with the same prefix as database.
     $this->originalFileDirectory = file_directory_path();
     variable_set('file_directory_path', file_directory_path() . '/' . $db_prefix);
     $directory = file_directory_path();
     // Create the files directory.
     file_check_directory($directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
     set_time_limit($this->timeLimit);
 }
            </div>
          </div>
        </div>
    
        <div id="footer-region" class="region grid-16 clear-block">
          <?php 
print $footer;
?>
          <p class="copyright">&#169; <?php 
echo date('Y');
?>
  <?php 
print locale('GFS Canada Company, Inc. All Rights Reserved.');
?>
</p>
          <?php 
print $footer_bottom;
?>
          <?php 
print locale('<a id="footer_us_homepage_link" href="http://www.gfs.com/" title="Go to GFS US"><img alt="Go to Gordon Food Service (US)." src="/sites/all/themes/gfscanada/images/GFSUSLogoImageChangeAsset.png"></img></a>');
?>
          <br/>
        </div>
      </div>
    </div>

    <?php 
print $closure;
?>
  </body>
</html>
Ejemplo n.º 21
0
                        <?php 
    $success = $block->getSuccess();
    ?>
                        <div class="alert alert-success alert-dismissible">
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                            <p><?php 
    echo $this->e($success);
    ?>
</p>
                        </div>
                    <?php 
}
?>

                    <form action="<?php 
echo route("admin.role.edit.post", ['locale' => locale(), 'id' => $role->id]);
?>
" method="post">
                        <input type="hidden" name="_token" value="<?php 
echo csrf_token();
?>
">
                        <input type="hidden" name="_method" value="put">

                        <div class="form-group">
                            <label for="name"><?php 
echo $this->e(trans('lpanel::admin.Name'));
?>
</label>
                            <input type="text" name="name" class="form-control" id="name" value="<?php 
echo $role->name;
Ejemplo n.º 22
0
 /**
  * Render file to a buffer.
  *
  * @param string $view Path to file
  * @param array  $data Collection of variables to path to file
  *
  * @return string Rendered file contents
  * @throws ViewPathNotFound
  */
 public function render($view, $data = array())
 {
     // TODO: Make rendering as external system, to split up these 3 rendering options
     // Объявить ассоциативный массив переменных в данном контексте
     if (is_array($data)) {
         extract($data);
     }
     // Начать вывод в буффер
     ob_start();
     // Path to another template view, by default we are using default template folder path,
     // for meeting first condition
     $templateView = $view;
     if (locale() != SamsonLocale::DEF) {
         // Modify standard view path with another template
         $templateView = str_replace(__SAMSON_VIEW_PATH, __SAMSON_VIEW_PATH . locale() . '/', $templateView);
     }
     // Depending on core view rendering model
     switch ($this->render_mode) {
         // Standard algorithm for view rendering
         case self::RENDER_STANDART:
             // Trying to find another template path, by default it's an default template path
             if (file_exists($templateView)) {
                 include $templateView;
             } elseif (file_exists($view)) {
                 // If another template wasn't found - we will use default template path
                 include $view;
             } else {
                 // Error no template view was found
                 throw new ViewPathNotFound($view);
             }
             break;
             // View rendering algorithm from array of view variables
         // View rendering algorithm from array of view variables
         case self::RENDER_VARIABLE:
             // Collection of views
             $views =& $GLOBALS['__compressor_files'];
             // Trying to find another template path, by default it's an default template path
             if (isset($views[$templateView])) {
                 eval(' ?>' . $views[$templateView] . '<?php ');
             } elseif (isset($views[$view])) {
                 // If another template wasn't found - we will use default template path
                 eval(' ?>' . $views[$view] . '<?php ');
             } else {
                 // Error no template view was found
                 throw new ViewPathNotFound($view);
             }
             break;
     }
     // Получим данные из буффера вывода
     $html = ob_get_contents();
     // Очистим буффер
     ob_end_clean();
     // Fire core render event
     Event::fire('core.render', array(&$html, &$data, &$this->active));
     ////elapsed('End rendering '.$__view);
     return $html;
 }
Ejemplo n.º 23
0
            <h2>Blog</h2>
        </header>
        <div class="row box row-box">
            <div class="3u 3u(2) 12u$(4)">
                @include('blog.partials.latest-posts')
            </div>
            <div class="9u 9u(2) 12u$(4) content">
                <?php 
if ($posts->count() > 0) {
    ?>
                    <?php 
    foreach ($posts as $post) {
        ?>
                        <article>
                            <?php 
        $url = route(locale() . '.blog.slug', [$post->slug]);
        ?>
                            <h2>
                                <a href="{{ $url }}">{{ $post->title }}</a>
                                <small class="pull-right">{{ $post->created_at->format('d-m-Y') }}</small>
                            </h2>
                            <?php 
        $readmore = "&nbsp; <a href='{$url}'>Read more</a>";
        ?>
                            {!! str_limit($post->content, 150, $readmore) !!}
                        </article>
                    <?php 
    }
    ?>
                <?php 
} else {
Ejemplo n.º 24
0
                            <th>{{ trans('workshop::modules.table.name') }}</th>
                            <th>{{ trans('workshop::modules.table.version') }}</th>
                            <th>{{ trans('workshop::modules.table.enabled') }}</th>
                        </tr>
                        </tfoot>
                    </table>
                    <!-- /.box-body -->
                </div>
            </div>
        </div>
    </div>
@stop

@section('scripts')
    <?php 
$locale = locale();
?>
    <script>
        $(function () {
            $('.data-table').dataTable({
                "paginate": true,
                "lengthChange": true,
                "filter": true,
                "sort": true,
                "info": true,
                "autoWidth": true,
                "order": [[ 0, "asc" ]],
                "language": {
                    "url": '<?php 
echo Module::asset("core:js/vendor/datatables/{$locale}.json");
?>
Ejemplo n.º 25
0
                </div>
              </div>
            </div>
          </div>
        </div>
    
        <div id="footer-region" class="region grid-16 clear-block">
          <?php 
print $footer;
?>
          <?php 
print locale('<a id="footer_us_homepage_link" href="http://www.gfs.com/" title="Go to GFS US"><img alt="Go to Gordon Food Service (US)." src="/sites/all/themes/gfscanada/images/GFSUSLogoImageChangeAsset.png"></img></a>');
?>
          <p class="copyright">&#169; <?php 
echo date('Y');
?>
  <?php 
print locale('GFS Canada Company, Inc. All Rights Reserved.');
?>
</p>
          <?php 
print $footer_bottom;
?>
        </div>
        <div style="clear: both"></div>
    </div>
  <?php 
print $closure;
?>
</body>
</html>
Ejemplo n.º 26
0
    } elseif ($p == "admin_export_users") {
        require_once realpath(__DIR__ . '/../includes/controller/export_users_controller.php');
        if (isset($_REQUEST['type'])) {
            $type = $_REQUEST['type'];
        } else {
            $ype = 'csv';
        }
        users_export_controller($type);
    } elseif ($p == "admin_log") {
        $title = admin_log_title();
        $content = admin_log();
    } elseif ($p == "credits") {
        require_once realpath(__DIR__ . '/../includes/pages/guest_credits.php');
        $title = credits_title();
        $content = guest_credits();
    } else {
        require_once realpath(__DIR__ . '/../includes/pages/guest_start.php');
        $content = guest_start();
    }
} else {
    // Wenn schon eingeloggt, keine-Berechtigung-Seite anzeigen
    if (isset($user)) {
        $title = _("No Access");
        $content = _("You don't have permission to view this page. You probably have to sign in or register in order to gain access!");
    } else {
        // Sonst zur Loginseite leiten
        redirect(page_link_to("login"));
    }
}
echo template_render('../templates/layout.html', array('theme' => isset($user) ? $user['color'] : $default_theme, 'title' => $title, 'atom_link' => $p == 'news' || $p == 'user_meetings' ? '<link href="' . page_link_to('atom') . ($p == 'user_meetings' ? '&amp;meetings=1' : '') . '&amp;key=' . $user['api_key'] . '" type="application/atom+xml" rel="alternate" title="Atom Feed">' : '', 'menu' => make_menu(), 'content' => msg() . $content, 'header_toolbar' => header_toolbar(), 'faq_url' => $faq_url, 'contact_email' => $contact_email, 'locale' => locale()));
Ejemplo n.º 27
0
 /**
  * @param $key
  * @param null $locale
  */
 protected function &findDictionary(&$key, $locale = null)
 {
     // If no locale for translation is specified - use current system locale
     $locale = !isset($locale) ? locale() : $locale;
     // Remove whitespaces from key
     $key = trim($key);
     // Get pointer to locale dictionary
     return $this->dictionary[$locale];
 }
print $header_top_language;
?>
        </div>
        <div id="site-menu" class="">
          <?php 
$nice_supplier_main_menu = theme('nice_menus', 0, 'menu-supplier-main-menu-links', 0, 'down', 1);
?>
          <?php 
print $nice_supplier_main_menu['content'];
?>
              
          <a id="site_menu_homepage_link" class="iefix" href="/supplier" title="<?php 
t("Go to Supplier Homepage");
?>
">GFS <?php 
print locale("Canada");
?>
</a>
        </div>
      </div>

    <?php 
if ($header) {
    ?>
      <div id="header-region" class="region grid-16">
        <?php 
    print $header;
    ?>
      </div>
    <?php 
}
Ejemplo n.º 29
0
Archivo: view.php Proyecto: cabloo/RTG2
                    $idb = "<I>";
                    $ide = "</I>";
                }
                print "<A HREF=\"" . $_SERVER["SCRIPT_NAME"] . "/" . $path_array[1] . "/{$val}\">{$icb}{$idb} [{$val}]{$ice}{$ide}</A>\n";
            }
            print "</TD></TR></TABLE>\n";
        } else {
            print_headers($VERSION, $_SERVER["REQUEST_URI"], $_SESSION["autorefresh"], "");
            print "Sorry, we aren't handling text cookie values yet!\n";
        }
    } else {
        print_headers($VERSION, $_SERVER["REQUEST_URI"], $refresh, "");
        print locale("VALIDOPTIONVAR", $path_array[1]) . "\n";
    }
} else {
    print_headers($VERSION, $_SERVER["REQUEST_URI"], $refresh, "");
    print "<P><A HREF=\"" . $_SERVER["SCRIPT_NAME"] . "/host\">" . locale("VIEWHOSTS") . "</A>\n";
    print "<P><A HREF=\"" . $_SERVER["SCRIPT_NAME"] . "/stat\">" . locale("VIEWSTATS") . "</A>\n";
}
$php_end_time = time();
$php_total_time = $php_end_time - $php_start_time;
debug(__FUNCTION__, "total sql time: {$total_sql_time}");
debug(__FUNCTION__, "total php time: {$php_total_time}");
print_footer($VERSION);
if ($update_last) {
    $_SESSION["last_real"] = $_SERVER["REQUEST_URI"];
}
?>
</BODY>
</HTML>
Ejemplo n.º 30
0
    } elseif ($p == "imprint") {
        require_once realpath(__DIR__ . '/../includes/pages/guest_imprint.php');
        $title = credits_title();
        $content = guest_credits();
    } elseif ($p == "privacy") {
        require_once realpath(__DIR__ . '/../includes/pages/guest_privacy.php');
        $title = credits_title();
        $content = guest_credits();
    } elseif ($p === "dashboard") {
        require_once realpath(__DIR__ . '/../includes/pages/dashboard.php');
        $title = getDashboardTitle();
        $content = get_dashboard();
    } elseif ($p == "api_key") {
        require_once realpath(__DIR__ . '/../includes/controller/api_key.php');
        $content = getAPIKey();
    } else {
        require_once realpath(__DIR__ . '/../includes/pages/guest_start.php');
        $content = guest_start();
    }
} else {
    // Wenn schon eingeloggt, keine-Berechtigung-Seite anzeigen
    if (isset($user)) {
        $title = _("No Access");
        $content = _("You don't have permission to view this page. You probably have to sign in or register in order to gain access!");
    } else {
        // Sonst zur Loginseite leiten
        redirect(page_link_to("login"));
    }
}
echo template_render('../templates/layout.html', array('theme' => isset($user) ? $user['color'] : $default_theme, 'title' => $title, 'atom_link' => $p == 'news' || $p == 'user_meetings' ? '<link href="' . page_link_to('atom') . ($p == 'user_meetings' ? '&amp;meetings=1' : '') . '&amp;key=' . $user['api_key'] . '" type="application/atom+xml" rel="alternate" title="Atom Feed">' : '', 'menu' => make_menu(), 'content' => msg() . $content, 'privacy_note' => PN_ShowNotice(), 'header_toolbar' => header_toolbar(), 'faq_url' => $faq_url, 'locale' => locale(), 'selectAllText' => _('Select all'), 'filterPlaceholder' => _("Search"), 'allSelectedText' => _("All selected"), 'nSelectedText' => _("selected"), 'nonSelectedText' => _("None selected")));