Skip to content
Snippets Groups Projects
Commit 52892f11 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #13670 TIME 1 clean files apps/maarch_entreprise

parent 5e5220b4
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 6359 deletions
<?php
if ($_REQUEST['AJAX_CALL'] && $_REQUEST['res_id']) {
$res_id = $_REQUEST['res_id'];
$user_id = ($_REQUEST['user_id']) ? $_REQUEST['user_id'] : false;
$table = ($_REQUEST['table']) ? $_REQUEST['table'] : false;
$coll_id = ($_REQUEST['coll_id']) ? $_REQUEST['coll_id'] : false;
$docLocker = new docLocker($res_id, $user_id, $table, $coll_id);
if ($_REQUEST['lock'])
$docLocker->lock();
else if ($_REQUEST['unlock'])
$docLocker->unlock();
else if ($_REQUEST['isLock']) {
echo json_encode($docLocker->isLock());
}
}
class docLocker
{
private $res_id = null;
private $user_id = null;
private $table = null;
private $coll_id = null;
public function __construct($res_id, $user_id = false, $table = false, $coll_id = false)
{
// set properties
$this->res_id = $res_id;
$this->user_id = ($user_id) ? $user_id : $_SESSION['user']['UserId'];
$this->table = ($table) ? $table : 'res_letterbox';
$this->coll_id = ($coll_id) ? $coll_id : 'letterbox_coll';
// require
$corePath = $_SESSION['config']['corepath'];
$appId = $_SESSION['config']['app_id'];
$customOverrideId = $_SESSION['custom_override_id'];
}
public function canOpen()
{
if (!$this->checkProperties()) return false;
if ($this->isLocked() && $this->userLock() != $this->user_id) {
$userlock_id = $this->userLock();
$db = new Database();
$stmt = $db->query("SELECT firstname, lastname FROM users WHERE user_id = ?", array($userlock_id));
$userLock_info = $stmt->fetchObject();
$_SESSION['userLock'] = $userLock_info->firstname .' '. $userLock_info->lastname;
return false;
}
return true;
}
public function isLock()
{
$currentUser = \User\models\UserModel::getByLogin(['login' => $_SESSION['user']['UserId'], 'select' => ['id']]);
$resource = \Resource\models\ResModel::getById(['resId' => $this->res_id, 'select' => ['locker_user_id', 'locker_time']]);
$lock = true;
if (empty($resource['locker_user_id'] || empty($resource['locker_time']))) {
$lock = false;
} elseif ($resource['locker_user_id'] == $currentUser['id']) {
$lock = false;
} elseif (strtotime($resource['locker_time']) < time()) {
$lock = false;
}
$lockBy = '';
if ($lock) {
$lockBy = \User\models\UserModel::getLabelledUserById(['id' => $resource['locker_user_id']]);
}
return ['lock' => $lock, 'lockBy' => $lockBy];
}
public function lock()
{
if (!$this->checkProperties())
return false;
$query = "UPDATE res_letterbox SET locker_user_id = ?, locker_time = current_timestamp + interval '1' MINUTE WHERE res_id = ?";
$user = \User\models\UserModel::getByLogin(['login' => $this->user_id, 'select' => ['id']]);
$arrayPDO = array($user['id'], $this->res_id);
$db = new Database();
$db->query($query, $arrayPDO);
return true;
}
public function unlock()
{
if (!$this->checkProperties())
return false;
\Resource\models\ResModel::update([
'set' => ['locker_user_id' => null, 'locker_time' => null],
'where' => ['res_id = ?'],
'data' => [$this->res_id]
]);
return true;
}
private function checkProperties()
{
if (is_null($this->res_id)) return false;
if (is_null($this->user_id)) return false;
if (is_null($this->table)) return false;
if (is_null($this->coll_id)) return false;
return true;
}
private function isLocked()
{
$query = "SELECT ";
$query .= "1 ";
$query .= "FROM ";
$query .= $this->table . " ";
$query .= "WHERE ";
$query .= "res_id = ? ";
$query .= "AND ";
$query .= "locker_time > current_timestamp";
$arrayPDO = array($this->res_id);
$db = new Database();
$stmt = $db->query($query, $arrayPDO);
if ($stmt->rowCount() > 0)
return true;
return false;
}
private function userLock()
{
$resource = \Resource\models\ResModel::getById(['resId' => $this->res_id, 'select' => ['locker_user_id']]);
if (empty($resource['locker_user_id'])) {
return '';
}
$user = \User\models\UserModel::getById(['id' => $resource['locker_user_id'], 'select' => ['user_id']]);
return $user['user_id'];
}
}
\ No newline at end of file
.tree {
min-height:20px;
margin-bottom:20px;
}
.tree > ul {
padding-left:2px;
}
.tree li {
list-style-type:none;
margin:0;
padding:10px 0px 0 37px;
position:relative
}
.tree li::before, .tree li::after {
content:'';
left:14px;
position:absolute;
right:auto
}
.tree li::before {
border-left:1px solid #999;
bottom:50px;
height:100%;
top:0;
width:1px
}
.tree li::after {
border-top:1px solid #999;
height:20px;
top:25px;
width:25px
}
.tree .dropdown-menu li::before {
border-left:none;
}
.tree .dropdown-menu li::after {
border-top:none;
}
.tree button, .tree button::hover{
background-color: none;
border: none;
}
.tree li span {
-moz-border-radius:5px;
-webkit-border-radius:5px;
border:1px solid #dadada;
border-radius:5px;
display:inline-block;
padding:3px 5px;
text-decoration:none;
max-width : 440px;
}
.tree li span .icon {
width: 10px;
height: 10px;
padding:0 5px;
border: none;
}
.tree li.parent_li i {
cursor:pointer;
padding-right:5px;
}
.tree>ul>li::before, .tree>ul>li::after {
border:0
}
.tree li:last-child::before {
height:30px
}
/*.tree li.parent_li>span:hover, .tree li.parent_li>span:hover+ul li span {
background:#eee;
border:1px solid #94a0b4;
color:#000
}*/
.tree .parent_li .node {
background-color: #3d80ab ;
}
.tree .root{
color: white;
background-color: #45a469;
padding: 8px 8px;
}
.tree .node, .tree .node span{
color: white;
background-color: #3d80ab;
}
.tree .user, .tree .user span{
color: white;
background-color: #52b7d4;
}
.tree .node a, .tree .root a, .tree .user a{
color: white;
}
/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.8.7
Full source at https://github.com/harvesthq/chosen
Copyright (c) 2011-2018 Harvest http://getharvest.com
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
This file is generated by `grunt build`, do not edit it by hand.
*/
.chosen-container {
font-size: 10px;
text-align: left;
}
.chosen-container-single .chosen-single abbr {
background: url("../../node_modules/chosen-js/chosen-sprite.png") -42px 1px no-repeat;
}
.chosen-container-single .chosen-single div b {
background: url("../../node_modules/chosen-js/chosen-sprite.png") no-repeat 0px 2px;
}
.chosen-container-single .chosen-search input[type="text"] {
background: url("../../node_modules/chosen-js/chosen-sprite.png") no-repeat 100% -20px;
}
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
background: url("../../node_modules/chosen-js/chosen-sprite.png") -42px 1px no-repeat;
}
.chosen-rtl .chosen-search input[type="text"] {
background: url("../../node_modules/chosen-js/chosen-sprite.png") no-repeat -30px -20px;
}
/*!
* Font Maarch 4.3.0 by @davegandy - http://fontmaarch.io - @fontmaarch
* License - http://fontmaarch.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
/* FONT PATH
* -------------------------- */
@font-face {
font-family: 'FontMaarch';
src: url('../fonts/fontmaarch-webfont.eot?v=4.3.0');
src: url('../fonts/fontmaarch-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'), url('../fonts/fontmaarch-webfont.woff2?v=4.3.0') format('woff2'), url('../fonts/fontmaarch-webfont.woff?v=4.3.0') format('woff'), url('../fonts/fontmaarch-webfont.ttf?v=4.3.0') format('truetype'), url('../fonts/fontmaarch-webfont.svg?v=4.3.0#fontmaarchregular') format('svg');
font-weight: normal;
font-style: normal;
}
.fm {
display: inline-block;
font: normal normal normal 14px/1 FontMaarch;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: translate(0, 0);
}
/* makes the font 33% larger relative to the icon container */
.fm-lg {
font-size: 1.33333333em;
line-height: 0.75em;
vertical-align: -15%;
}
.fm-2x {
font-size: 2em;
}
.fm-3x {
font-size: 3em;
}
.fm-4x {
font-size: 4em;
}
.fm-5x {
font-size: 5em;
}
.fm-fw {
width: 1.28571429em;
text-align: center;
}
.fm-ul {
padding-left: 0;
margin-left: 2.14285714em;
list-style-type: none;
}
.fm-ul > li {
position: relative;
}
.fm-li {
position: absolute;
left: -2.14285714em;
width: 2.14285714em;
top: 0.14285714em;
text-align: center;
}
.fm-li.fm-lg {
left: -1.85714286em;
}
.fm-border {
padding: .2em .25em .15em;
border: solid 0.08em #eeeeee;
border-radius: .1em;
}
.pull-right {
float: right;
}
.pull-left {
float: left;
}
.fm.pull-left {
margin-right: .3em;
}
.fm.pull-right {
margin-left: .3em;
}
.fm-spin {
-webkit-animation: fa-spin 2s infinite linear;
animation: fa-spin 2s infinite linear;
}
.fm-pulse {
-webkit-animation: fa-spin 1s infinite steps(8);
animation: fa-spin 1s infinite steps(8);
}
@-webkit-keyframes fa-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes fa-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
.fm-rotate-90 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
.fm-rotate-180 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.fm-rotate-270 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
-webkit-transform: rotate(270deg);
-ms-transform: rotate(270deg);
transform: rotate(270deg);
}
.fm-flip-horizontal {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
-webkit-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
transform: scale(-1, 1);
}
.fm-flip-vertical {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
-webkit-transform: scale(1, -1);
-ms-transform: scale(1, -1);
transform: scale(1, -1);
}
:root .fm-rotate-90,
:root .fm-rotate-180,
:root .fm-rotate-270,
:root .fm-flip-horizontal,
:root .fm-flip-vertical {
filter: none;
}
.fm-stack {
position: relative;
display: inline-block;
width: 2em;
height: 2em;
line-height: 2em;
vertical-align: middle;
}
.fm-stack-1x,
.fm-stack-2x {
position: absolute;
left: 0;
width: 100%;
text-align: center;
}
.fm-stack-1x {
line-height: inherit;
}
.fm-stack-2x {
font-size: 2em;
}
.fm-inverse {
color: #ffffff;
}
/* Font Maarch uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */
.fm-contact:before {
content: "\f000";
}
.fm-contact-add:before {
content: "\f001";
}
.fm-contact-search:before {
content: "\f002";
}
.fm-contact-type:before {
content: "\f003";
}
.fm-contact-denomination:before {
content: "\f004";
}
.fm-tree:before {
content: "\f005";
}
.fm-classification-plan:before {
content: "\f006";
}
.fm-classification-plan-l1:before {
content: "\f007";
}
.fm-classification-plan-l2:before {
content: "\f008";
}
.fm-doctypes:before {
content: "\f009";
}
.fm-status:before {
content: "\f00a";
}
.fm-actions:before {
content: "\f00b";
}
.fm-letter-reopen:before {
content: "\f00c";
}
.fm-docserver:before {
content: "\f00d";
}
.fm-docserver-location:before {
content: "\f00e";
}
.fm-docserver-type:before {
content: "\f010";
}
.fm-letter:before {
content: "\f011";
}
.fm-letter-add:before {
content: "\f012";
}
.fm-letter-search:before {
content: "\f013";
}
.fm-letter-del:before {
content: "\f014";
}
.fm-letter-incoming:before {
content: "\f015";
}
.fm-letter-outgoing:before {
content: "\f016";
}
.fm-letter-internal:before {
content: "\f017";
}
.fm-letter-status-new:before {
content: "\f018";
}
.fm-letter-status-wait:before {
content: "\f019";
}
.fm-letter-status-inprogress:before {
content: "\f01a";
}
.fm-letter-status-validated:before {
content: "\f01b";
}
.fm-letter-status-rejected:before {
content: "\f01c";
}
.fm-letter-status-end:before {
content: "\f01d";
}
.fm-letter-status-newmail:before {
content: "\f01e";
}
.fm-letter-status-info:before {
content: "\f021";
}
.fm-letter-status-attr:before {
content: "\f022";
}
.fm-letter-status-arev:before {
content: "\f023";
}
.fm-letter-status-aval:before {
content: "\f024";
}
.fm-letter-status-aimp:before {
content: "\f025";
}
.fm-letter-status-imp:before {
content: "\f026";
}
.fm-letter-status-aenv:before {
content: "\f027";
}
.fm-letter-status-acla:before {
content: "\f028";
}
.fm-letter-status-aarch:before {
content: "\f029";
}
.fm-doc:before {
content: "\f02a";
}
.fm-doc-add:before {
content: "\f02b";
}
.fm-doc-search:before {
content: "\f02c";
}
.fm-doc-del:before {
content: "\f02d";
}
.fm-archive:before {
content: "\f02e";
}
.fm-archive-add:before {
content: "\f02f";
}
.fm-archive-search:before {
content: "\f030";
}
.fm-archive-del:before {
content: "\f031";
}
.fm-file-size:before {
content: "\f032";
}
.fm-file-format:before {
content: "\f032";
}
.fm-file-fingerprint:before {
content: "\f033";
}
.fm-folder-type:before {
content: "\f034";
}
.fm-folder-add:before {
content: "\f035";
}
.fm-folder-search:before {
content: "\f036";
}
.fm-folder-view:before {
content: "\f037";
}
.fm-life-cycle-policy:before {
content: "\f038";
}
.fm-life-cycle:before {
content: "\f039";
}
.fm-life-cycle-step:before {
content: "\f03a";
}
.fm-file-model:before {
content: "\f03b" ;
}
.lds-ring {
display: inline-block;
position: absolute;
width: 64px;
height: 64px;
margin-top: -60px;
}
.lds-ring div {
box-sizing: border-box;
display: block;
position: absolute;
width: 51px;
height: 51px;
margin: 6px;
border: 6px solid #135f7f;
border-radius: 50%;
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: #135f7f transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
animation-delay: -0.15s;
}
@keyframes lds-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
File deleted
File deleted
File deleted
File deleted
File deleted
.pswp__bg {
background: #FFF;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<?php
/*
* Copyright 2008,2009 Maarch
*
* This file is part of Maarch Framework.
*
* Maarch Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Maarch Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @brief Script used by an Ajax object to manage saved queries(create, modify and delete)
*
* @file manage_query.php
* @author Claire Figueras <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup indexing_searching_mlb
*/
require_once 'core/class/class_request.php';
$core_tools = new core_tools();
$core_tools->load_lang();
$db = new Database();
$req = new request();
$tmp = false;
if ($_POST['action'] == 'creation') {
if (isset($_POST['name']) && !empty($_POST['name'])) {
$name = preg_replace('/[\'"]/', '', $_POST['name']);
$stmt = $db->query(
'SELECT query_id FROM ' . $_SESSION['tablename']['saved_queries']
. " WHERE user_id = ? and query_name= ?",
array($_SESSION['user']['UserId'], $_POST['name'])
);
if ($stmt->rowCount() < 1) {
$tmp = $db->query(
'INSERT INTO ' . $_SESSION['tablename']['saved_queries']
. ' (user_id, query_name, creation_date, created_by, '
. " query_type, query_txt) VALUES (?, ?, CURRENT_TIMESTAMP, ?, 'my_search', ? )",
array($_SESSION['user']['UserId'], $_POST['name'], $_SESSION['user']['UserId'], $_SESSION['current_search_query']), true
);
} else {
if ($stmt->rowCount() >= 1) {
//si il existe déjà une ligne dans la base avec les mêmes infos, on va demander confirmation
$_SESSION['seekName'] = $_POST['name'];
echo '{status : 4}';
exit();
}
$res = $stmt->fetchObject();
$id = $res->query_id;
$tmp = $db->query(
'UPDATE ' . $_SESSION['tablename']['saved_queries']
. " SET query_txt = ?, last_modification_date = CURRENT_TIMESTAMP WHERE user_id = ? and query_name= ?"
, array ($_SESSION['current_search_query'], $_SESSION['user']['UserId'], $_POST['name']), true
);
}
if (!$tmp) {
echo "{status : 2, 'query':'".$tmp->debugDumpParams()."'}";
exit();
} else {
echo '{status : 0}';
exit();
}
} else {
echo '{status : 3}';
}
} elseif ($_POST['action'] == 'load') {
if (isset($_POST['id']) && !empty($_POST['id'])) {
$tmp = $db->query(
'SELECT query_txt FROM ' . $_SESSION['tablename']['saved_queries']
. " WHERE query_id = ?", array($_POST['id']), true
);
}
if (!$tmp) {
echo "{'status' : 2, 'query':'".$tmp->debugDumpParams()."'}";
} else {
$res = $tmp->fetchObject();
echo "{'status' : 0, 'query':".$res->query_txt."}";
}
} elseif ($_POST['action'] == 'delete') {
if (isset($_POST['id']) && !empty($_POST['id'])) {
$tmp = $db->query(
'DELETE FROM ' . $_SESSION['tablename']['saved_queries']
. " WHERE query_id = ?", array($_POST['id']), true
);
}
if (!$tmp) {
echo "{'status' : 2, 'query':'".$tmp->debugDumpParams()."'}";
} else {
echo "{'status' : 0}";
}
} elseif ($_POST['action'] == 'creation_ok') {
$tmp = $db->query(
'UPDATE ' . $_SESSION['tablename']['saved_queries']
. " SET query_txt = ?, last_modification_date = CURRENT_TIMESTAMP WHERE user_id = ? and query_name= ?"
, array($_SESSION['current_search_query'], $_SESSION['user']['UserId'], $_SESSION['seekName']), true
);
$_SESSION['seekName'] = null;
echo "{'status' : 0}";
} else {
echo "{status : 1}";
}
exit();
<?php
/*
* Copyright 2014-2015 Maarch
*
* This file is part of Maarch Framework.
*
* Maarch Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Maarch Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
*
* @brief Displays contacts list in search mode
*
* @file
* @author <dev@maarch.org>
* @date $date$
* @version $Revision$
*/
/*
* Fichier appelé par la function ajax multiLink. Elle permet de mettre en session les données lorsqu'on clique sur le checkbox.
*/
//$_SESSION['stockCheckbox'] = null;
if(isset($_REQUEST['uncheckAll'])){
unset($_SESSION['stockCheckbox']);
}else if (isset($_REQUEST['courrier_purpose'])) {
$key=false;
# Append something onto the $name variable so that you can see that it passed through your PHP script.
$courrier = functions::xssafe($_REQUEST['courrier_purpose']);
if(!empty($_SESSION['stockCheckbox'])){
$key = in_array($courrier, $_SESSION['stockCheckbox']);
if($key ==true){
unset($_SESSION['stockCheckbox'][array_search($courrier, $_SESSION['stockCheckbox'])]);
$_SESSION['stockCheckbox']=array_values($_SESSION['stockCheckbox']);
echo json_encode($_SESSION['stockCheckbox']);
exit();
}
}
if(empty($_SESSION['stockCheckbox'])){
$tableau[] = $courrier;
$_SESSION['stockCheckbox'] = $tableau;
echo json_encode($_SESSION['stockCheckbox']);
}elseif($key==false and !empty($_SESSION['stockCheckbox'])){
array_push($_SESSION['stockCheckbox'],$courrier);
echo json_encode($_SESSION['stockCheckbox']);
}
# I'm sending back a json structure in case there are multiple pieces of information you'd like
# to pass back.
}
exit;
?>
\ No newline at end of file
<?php
/*
* Copyright 2008,2009 Maarch
*
* This file is part of Maarch Framework.
*
* Maarch Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Maarch Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @brief Advanced search form error page
*
* @file search_adv_error.php
* @author Claire Figueras <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup indexing_searching_mlb
*/
require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_request.php");
$core_tools = new core_tools();
$core_tools->test_user();
$core_tools->load_lang();
$mode = 'normal';
if(isset($_REQUEST['mode'])&& !empty($_REQUEST['mode']))
{
$mode = $core_tools->wash($_REQUEST['mode'], "alphanum", _MODE);
}
if($mode == 'normal')
{
$core_tools->test_service('adv_search_mlb', 'apps');
/****************Management of the location bar ************/
$init = false;
if(isset($_REQUEST['reinit']) && $_REQUEST['reinit'] == "true")
{
$init = true;
}
$level = "3";
if(isset($_REQUEST['level'] ) && ($_REQUEST['level'] == 2 || $_REQUEST['level'] == 3 || $_REQUEST['level'] == 4 || $_REQUEST['level'] == 1))
{
$level = 3 ;
}
$page_path = $_SESSION['config']['businessappurl'].'index.php?page=search_adv_result&dir=indexing_searching';
$page_label = _RESULTS;
$page_id = "search_adv_result_apps";
$core_tools->manage_location_bar($page_path, $page_label, $page_id, $init, $level);
/***********************************************************/
}
elseif($mode == 'popup' || $mode == 'frame')
{
$core_tools->load_html();
$core_tools->load_header();
$time = $core_tools->get_session_time_expire('', true, false);
?><body>
<div id="container">
<div class="error" id="main_error">
<?php functions::xecho($_SESSION['error']);?>
</div>
<div class="info" id="main_info">
<?php functions::xecho($_SESSION['info']);?>
</div><?php
}
?>
<h1><i class="fa fa-search fa-2x"></i> <?php echo _ADV_SEARCH_TITLE;?></h1>
<div id="inner_content">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<?php echo($_SESSION['error_search']);
$_SESSION['error_search'] = "";
?>
</div>
<?php if($mode == 'popup' || $mode == 'frame')
{
echo '</div>';
if($mode == 'popup')
{
?><br/><div align="center"><input type="button" name="close" class="button" value="<?php echo _CLOSE_WINDOW;?>" onclick="self.close();" /></div> <?php
}
$core_tools->load_js();
echo '</body></html>';
}
<?php
/* View */
if ($viewResourceArr['status'] <> 'ko') {
if (strtolower($viewResourceArr['mime_type']) == 'application/maarch') {
?>
<head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"></head>
<!--<body id="validation_page"
onload="javascript:moveTo(0,0);">
<div id="template_content" style="width:100%;">-->
<?php echo $content;?>
<!--</div>
</body>
</html>-->
<?php
} else {
if(strtolower($viewResourceArr['ext']) == 'txt'){
$viewResourceArr['mime_type'] = 'text/plain';
}
header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: public');
header('Content-Description: File Transfer');
header('Content-Type: ' . strtolower($viewResourceArr['mime_type']));
header('Content-Disposition: inline; filename=' . basename(
'maarch.' . strtolower($viewResourceArr['ext'])
)
. ';');
header('Content-Transfer-Encoding: binary');
readfile($filePathOnTmp);
exit();
}
} else {
$core_tools->load_html();
$core_tools->load_header('', true, false);
echo '<body>';
echo '<br/><div class="indexing_error">' . $viewResourceArr['error'] . '</div>';
echo '</body></html>';
exit();
}
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment