init
This commit is contained in:
commit
db400e4a38
2750 changed files with 440400 additions and 0 deletions
11
help_FR/pages/.htaccess
Normal file
11
help_FR/pages/.htaccess
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<IfModule mod_rewrite.c>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} (.*/pages)
|
||||
|
||||
RewriteRule ^(.*)$ %1/index.php/$1 [L]
|
||||
|
||||
</IfModule>
|
||||
62
help_FR/pages/index.php
Normal file
62
help_FR/pages/index.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
/*********************************************************************
|
||||
pages/index.php
|
||||
|
||||
Custom pages servlet
|
||||
|
||||
Peter Rotich <peter@osticket.com>
|
||||
Jared Hancock <jared@osticket.com>
|
||||
Copyright (c) 2006-2013 osTicket
|
||||
http://www.osticket.com
|
||||
|
||||
Released under the GNU General Public License WITHOUT ANY WARRANTY.
|
||||
See LICENSE.TXT for details.
|
||||
|
||||
vim: expandtab sw=4 ts=4 sts=4:
|
||||
**********************************************************************/
|
||||
@chdir(dirname(__file__).'/../');
|
||||
|
||||
require_once('client.inc.php');
|
||||
require_once(INCLUDE_DIR.'class.format.php');
|
||||
require_once(INCLUDE_DIR.'class.page.php');
|
||||
|
||||
// Determine the requested page
|
||||
// - Strip extension
|
||||
$slug = Format::slugify($ost->get_path_info());
|
||||
|
||||
// Get the part before the first dash
|
||||
$first_word = explode('-', $slug);
|
||||
$first_word = $first_word[0];
|
||||
|
||||
$pages = Page::objects()->filter(array(
|
||||
'name__like' => "$first_word%"
|
||||
));
|
||||
|
||||
$selected_page = null;
|
||||
foreach ($pages as $P) {
|
||||
if (Format::slugify($P->name) == $slug) {
|
||||
$selected_page = $P;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$selected_page)
|
||||
Http::response(404, __('Page Not Found'));
|
||||
|
||||
if (!$selected_page->isActive() || $selected_page->getType() != 'other')
|
||||
Http::response(404, __('Page Not Found'));
|
||||
|
||||
require(CLIENTINC_DIR.'header.inc.php');
|
||||
|
||||
$BUTTONS = false;
|
||||
include CLIENTINC_DIR.'templates/sidebar.tmpl.php';
|
||||
?>
|
||||
<div class="main-content">
|
||||
<?php
|
||||
print $selected_page->getBodyWithImages();
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require(CLIENTINC_DIR.'footer.inc.php');
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue