Skip to content
Snippets Groups Projects
Commit 3398153c authored by SNA's avatar SNA
Browse files

Création rep entreprise

parent 1bc09e9c
No related branches found
No related tags found
No related merge requests found
Showing
with 5230 additions and 0 deletions
<?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 Action : simple confirm
*
* Open a modal box to confirm a status modification. Used by the core (manage_action.php page).
*
* @file
* @author Claire Figueras <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup apps
*/
/**
* $confirm bool true
*/
$confirm = true;
/**
* $etapes array Contains only one etap, the status modification
*/
$etapes = array('status','close');
require_once($_SESSION['pathtocoreclass']."class_history.php");
/**
* Manages a status (All params must be declared, even if not used, to corresponds to the action management of the core)
*
* @param $arr_id array Contains the res_id to be modified
* @param $history string Not Used here
* @param $id_action string Action identifier
* @param $label_action string Action label
* @param $status string New status
* @return bool false in sql error case, true otherwise
*/
function manage_status($arr_id, $history, $id_action, $label_action, $status)
{
$db = new dbquery();
$db->connect();
$result = '';
for($i=0; $i<count($arr_id );$i++)
{
$result .= $arr_id[$i].'#';
$req = $db->query("update ".$_POST['table']. " set status = '".$status."' where res_id = ".$arr_id[$i], true);
if(!$req)
{
$_SESSION['error'] = _SQL_ERROR;
return false;
}
}
return array('result' => $result, 'history_msg' => '');
//return true;
}
function manage_close($arr_id, $history, $id_action, $label_action, $status)
{
$db = new dbquery();
$db->connect();
$result = '';
require_once($_SESSION['pathtocoreclass'].'class_security.php');
require_once($_SESSION['pathtocoreclass'].'class_request.php');
$sec = new security();
$req = new request();
$ind_coll = $sec->get_ind_collection($_POST['coll_id']);
$ext_table = $_SESSION['collections'][$ind_coll]['extensions'][0];
$current_date = $req->current_datetime();
for($i=0; $i<count($arr_id );$i++)
{
$result .= $arr_id[$i].'#';
$req = $db->query("update ".$ext_table. " set closing_date = ".$current_date." where res_id = ".$arr_id[$i], true);
if(!$req)
{
$_SESSION['error'] = _SQL_ERROR;
return false;
}
}
return array('result' => $result, 'history_msg' => '');
}
?>
<?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 Action : simple confirm
*
* Open a modal box to confirm a status modification. Used by the core (manage_action.php page).
*
* @file
* @author Claire Figueras <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup apps
*/
/**
* $confirm bool true
*/
$confirm = true;
/**
* $etapes array Contains only one etap, the status modification
*/
$etapes = array('status');
require_once($_SESSION['pathtocoreclass']."class_history.php");
/**
* Manages a status (All params must be declared, even if not used, to corresponds to the action management of the core)
*
* @param $arr_id array Contains the res_id to be modified
* @param $history string Not Used here
* @param $id_action string Action identifier
* @param $label_action string Action label
* @param $status string New status
* @return bool false in sql error case, true otherwise
*/
function manage_status($arr_id, $history, $id_action, $label_action, $status)
{
$db = new dbquery();
$db->connect();
$result = '';
for($i=0; $i<count($arr_id );$i++)
{
$result .= $arr_id[$i].'#';
$req = $db->query("update ".$_POST['table']. " set status = '".$status."' where res_id = ".$arr_id[$i], true);
if(!$req)
{
$_SESSION['error'] = _SQL_ERROR;
return false;
}
}
return array('result' => $result, 'history_msg' => '');
//return true;
}
?>
This diff is collapsed.
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 View a document
*
* @file view.php
* @author Claire Figueras <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup indexing_searching_mlb
*/
/**
* $etapes array Contains 2 etaps : form and status (order matters)
*/
$etapes = array('form', 'status');
/**
* $frm_width Width of the modal (empty)
*/
$frm_width='';
/**
* $frm_height Height of the modal (empty)
*/
$frm_height = '';
/**
* $mode_form Mode of the modal : fullscreen
*/
$mode_form = 'fullscreen';
/**
* Returns the indexing form text
*
* @param $values Array Contains the res_id of the document to process
* @param $path_manage_action String Path to the PHP file called in Ajax
* @param $id_action String Action identifier
* @param $table String Table
* @param $module String Origin of the action
* @param $coll_id String Collection identifier
* @param $mode String Action mode 'mass' or 'page'
* @return String The form content text
**/
function get_form_txt($values, $path_manage_action, $id_action, $table, $module, $coll_id, $mode )
{
$res_id = $values[0];
$frm_str = '';
$_SESSION['doc_id'] = $res_id;
$frm_str .= '<div>';
$frm_str .= ' <center><input name="close" id="close" type="button" value="'._CLOSE.'" class="button" onClick="javascript:$(\'baskets\').style.visibility=\'visible\';destroyModal(\'modal_'.$id_action.'\');reinit();"/></center>';
$frm_str .= ' <iframe src="'.$_SESSION['config']['businesappurl'].'indexing_searching/view.php?id='.$res_id.'" name="viewframe" id="viewframe" scrolling="auto" frameborder="0" ></iframe>';
$frm_str .= '</div>';
$frm_str .= '<script type="text/javascript">resize_frame_process("modal_'.$id_action.'", "viewframe", true, true);resize_frame_process("modal_'.$id_action.'", "hist_doc", true, false);window.scrollTo(0,0);</script>';
return addslashes($frm_str);
}
?>
<?php
/**
* File : admin.php
*
* Administration summary Page
* {@internal this page calls an admin object (class admin)}}
*
* @package Maarch Framework v3
* @version 2.1
* @since 10/2005
* @license GPL
* @author Claire Figueras <dev@maarch.org>
*/
/**
* include the test admin page
*
* this page tests the user access level, and if the user is an admin or not
*/
require_once($_SESSION['pathtocoreclass']."class_functions.php");
require($_SESSION['config']['businessapppath']."class".$_SESSION['slash_env']."class_admin.php");
$admin = new admin();
$core_tools2 = new core_tools();
$core_tools2->test_admin('admin', 'apps');
/****************Management of the location bar ************/
$init = false;
if($_REQUEST['reinit'] == "true")
{
$init = true;
}
$level = "";
if($_REQUEST['level'] == 2 || $_REQUEST['level'] == 3 || $_REQUEST['level'] == 4 || $_REQUEST['level'] == 1)
{
$level = $_REQUEST['level'];
}
$page_path = $_SESSION['config']['businessappurl'].'index.php?page=admin';
$page_label = _ADMIN;
$page_id = "admin";
$core_tools2->manage_location_bar($page_path, $page_label, $page_id, $init, $level);
/***********************************************************/
unset($_SESSION['m_admin']);
?>
<h1><img src="<?php echo $_SESSION['config']['img'];?>/picto_admin_b.gif" alt="" /> <?php echo _ADMIN;?></h1>
<div id="inner_content" class="clearfix">
<?php
$admin->retrieve_app_admin_services($_SESSION['app_services']);
?>
<!--<hr />-->
<?php
$admin->retrieve_modules_admin_services($_SESSION['modules_services']);
?>
</div>
<?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 Displays actions in a list
*
* @file
* @author Claire Figueras <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup admin
*/
$admin = new core_tools();
$admin->test_admin('admin_actions', 'apps');
$func = new functions();
/****************Management of the location bar ************/
$init = false;
if($_REQUEST['reinit'] == "true")
{
$init = true;
}
$level = "";
if($_REQUEST['level'] == 2 || $_REQUEST['level'] == 3 || $_REQUEST['level'] == 4 || $_REQUEST['level'] == 1)
{
$level = $_REQUEST['level'];
}
$page_path = $_SESSION['config']['businessappurl'].'index.php?page=action&admin=action';
$page_label = _ACTION_LIST;
$page_id = "action";
$admin->manage_location_bar($page_path, $page_label, $page_id, $init, $level);
/***********************************************************/
require_once($_SESSION['pathtocoreclass']."class_request.php");
require_once($_SESSION['config']['businessapppath']."class".DIRECTORY_SEPARATOR."class_list_show.php");
$select[$_SESSION['tablename']['actions']] = array();
array_push($select[$_SESSION['tablename']['actions']],"id", "label_action", 'is_system');
$what = "";
$where =" enabled = 'Y' ";
if(isset($_REQUEST['what']))
{
$what = $func->protect_string_db($_REQUEST['what']);
if($_SESSION['config']['databasetype'] == "POSTGRESQL")
{
$where .= " and (label_action ilike '".$func->protect_string_db($what,$_SESSION['config']['databasetype'])."%' or id ilike '".$func->protect_string_db($what,$_SESSION['config']['databasetype'])."%' ) ";
}
else
{
$where .= " and (label_action like '".$func->protect_string_db($what,$_SESSION['config']['databasetype'])."%' or id like '".$func->protect_string_db($what,$_SESSION['config']['databasetype'])."%' ) ";
}
}
$list = new list_show();
$order = 'asc';
if(isset($_REQUEST['order']) && !empty($_REQUEST['order']))
{
$order = trim($_REQUEST['order']);
}
$field = 'label_action';
if(isset($_REQUEST['order_field']) && !empty($_REQUEST['order_field']))
{
$field = trim($_REQUEST['order_field']);
}
$orderstr = $list->define_order($order, $field);
$request= new request;
$tab=$request->select($select,$where,$orderstr,$_SESSION['config']['databasetype']);
//$request->show();
$del = array();
for ($i=0;$i<count($tab);$i++)
{
for ($j=0;$j<count($tab[$i]);$j++)
{
foreach(array_keys($tab[$i][$j]) as $value)
{
if($tab[$i][$j][$value]=="id")
{
$load = $admin->is_action_defined($tab[$i][$j]['value']);
$tab[$i][$j]["id"]=$tab[$i][$j]['value'];
$tab[$i][$j]["label"]= _ID;
$tab[$i][$j]["size"]="18";
$tab[$i][$j]["label_align"]="left";
$tab[$i][$j]["align"]="left";
$tab[$i][$j]["valign"]="bottom";
$tab[$i][$j]["show"]=true;
$tab[$i][$j]["order"]='id';
if(!$load)
{
array_push($del, $i);
//unset($tab[$i]);
}
}
if($tab[$i][$j][$value]=="label_action")
{
$tab[$i][$j]['value']=$request->show_string($tab[$i][$j]['value']);
$tab[$i][$j]["label_action"]=$tab[$i][$j]['value'];
$tab[$i][$j]["label"]=_DESC;
$tab[$i][$j]["size"]="15";
$tab[$i][$j]["label_align"]="left";
$tab[$i][$j]["align"]="left";
$tab[$i][$j]["valign"]="bottom";
$tab[$i][$j]["show"]=true;
$tab[$i][$j]["order"]='label_action';
}
if($tab[$i][$j][$value]=="is_system")
{
if($tab[$i][$j]['value'] == 'Y')
{
$tab[$i][$j]['value'] = _YES;
array_push($tab[$i], array('column' => 'can_delete', 'value' => 'false', 'can_delete' => 'false',
'label' => _DESC,'show' => false));
}
else
{
$tab[$i][$j]['value'] = _NO;
array_push($tab[$i], array('column' => 'can_delete', 'value' => 'true', 'can_delete' => 'true',
'label' => _DESC,'show' => false));
}
$tab[$i][$j]["is_system"]=$tab[$i][$j]['value'];
$tab[$i][$j]["label"]=_IS_SYSTEM;
$tab[$i][$j]["size"]="5";
$tab[$i][$j]["label_align"]="left";
$tab[$i][$j]["align"]="left";
$tab[$i][$j]["valign"]="bottom";
$tab[$i][$j]["show"]=true;
$tab[$i][$j]["order"]='is_system';
}
}
}
}
for($i=0; $i<count($del);$i++)
{
array_splice($tab, $del[$i], 1);
}
//$request->show_array($tab);
$page_name = "action";
$page_name_up = "action_up";
$page_name_del = "action_del";
$page_name_val= "";
$page_name_ban = "";
$page_name_add = "action_add";
$label_add = _ADD_ACTION;
$_SESSION['m_admin']['init'] = true;
$title = _ACTION_LIST." : ".count($tab)." "._ACTIONS;
$autoCompletionArray = array();
$autoCompletionArray["list_script_url"] = $_SESSION['config']['businessappurl']."admin/action/action_list_by_name.php";
$autoCompletionArray["number_to_begin"] = 1;
$list->admin_list($tab, count($tab), $title, 'id','action','action','id', true, $page_name_up, $page_name_val, $page_name_ban, $page_name_del, $page_name_add, $label_add, FALSE, FALSE, _ALL_ACTIONS, _ACTION, $_SESSION['config']['img'].'/manage_actions_b.gif', false, true, false, true, $what, true, $autoCompletionArray);
$_SESSION['m_admin']['action'] = array();
?>
<?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 Form to add an action
*
* @file
* @author Claire Figueras <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup admin
*/
session_name('PeopleBox');
session_start();
$core_tools2 = new core_tools();
//here we loading the lang vars
$core_tools2->load_lang();
$core_tools2->test_admin('admin_actions', 'apps');
/****************Management of the location bar ************/
$init = false;
if($_REQUEST['reinit'] == "true")
{
$init = true;
}
$level = "";
if($_REQUEST['level'] == 2 || $_REQUEST['level'] == 3 || $_REQUEST['level'] == 4 || $_REQUEST['level'] == 1)
{
$level = $_REQUEST['level'];
}
$page_path = $_SESSION['config']['businessappurl'].'index.php?page=action_add&admin=action';
$page_label = _ADDITION;
$page_id = "action_add";
$core_tools2->manage_location_bar($page_path, $page_label, $page_id, $init, $level);
/***********************************************************/
require($_SESSION['config']['businessapppath']."class".DIRECTORY_SEPARATOR."class_admin_actions.php");
$action = new AdminActions();
$action->formaction("add");
?>
\ 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 Delete an action
*
* @file
* @author Claire Figueras <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup admin
*/
session_name('PeopleBox');
session_start();
require_once($_SESSION['pathtocoreclass']."class_functions.php");
require($_SESSION['pathtocoreclass']."class_core_tools.php");
$core_tools = new core_tools();
//here we loading the lang vars
$core_tools->load_lang();
$core_tools->test_admin('admin_actions', 'apps');
require_once($_SESSION['pathtocoreclass']."class_db.php");
require($_SESSION['config']['businessapppath']."class".DIRECTORY_SEPARATOR."class_admin_actions.php");
$func = new functions();
if(isset($_GET['id']))
{
$s_id = addslashes($func->wash($_GET['id'], "alphanum", _THE_ACTION));
}
else
{
$s_id = "";
}
$action= new AdminActions();
$action->delaction($s_id);
?>
\ 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 Script used by an ajax autocompleter object to get actions list
*
* @file
* @author Laurent Giovannoni <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup admin
*/
session_name('PeopleBox');
session_start();
require_once($_SESSION['pathtocoreclass']."class_functions.php");
require_once($_SESSION['pathtocoreclass']."class_db.php");
require_once($_SESSION['pathtocoreclass']."class_request.php");
$db = new dbquery();
$db->connect();
if($_SESSION['config']['databasetype'] == "POSTGRESQL")
{
$db->query("select label_action as tag from ".$_SESSION['tablename']['actions']." where label_action ilike '".$_REQUEST['what']."%' order by label_action");
}
else
{
$db->query("select label_action as tag from ".$_SESSION['tablename']['actions']." where label_action like '".$_REQUEST['what']."%' order by label_action");
}
$listArray = array();
while($line = $db->fetch_object())
{
array_push($listArray, $line->tag);
}
echo "<ul>\n";
$authViewList = 0;
foreach($listArray as $what)
{
if($authViewList >= 10)
{
$flagAuthView = true;
}
if(stripos($what, $_REQUEST['what']) === 0)
{
echo "<li>".$what."</li>\n";
if($flagAuthView)
{
echo "<li>...</li>\n";
break;
}
$authViewList++;
}
}
echo "</ul>";
\ 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 Form to modify an action
*
* @file
* @author Claire Figueras <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup admin
*/
session_name('PeopleBox');
session_start();
$core_tools2 = new core_tools();
//here we loading the lang vars
$core_tools2->load_lang();
$core_tools2->test_admin('admin_actions', 'apps');
$func = new functions();
if(isset($_GET['id']))
{
$id = addslashes($func->wash($_GET['id'], "alphanum", _THE_ACTION));
}
else
{
$id = "";
}
/****************Management of the location bar ************/
$init = false;
if($_REQUEST['reinit'] == "true")
{
$init = true;
}
$level = "";
if($_REQUEST['level'] == 2 || $_REQUEST['level'] == 3 || $_REQUEST['level'] == 4 || $_REQUEST['level'] == 1)
{
$level = $_REQUEST['level'];
}
$page_path = $_SESSION['config']['businessappurl'].'index.php?page=action_add&admin=action';
$page_label = _ADDITION;
$page_id = "action_up";
$core_tools2->manage_location_bar($page_path, $page_label, $page_id, $init, $level);
/***********************************************************/
require($_SESSION['config']['businessapppath']."class".DIRECTORY_SEPARATOR."class_admin_actions.php");
$action = new AdminActions();
$action->formaction("up", $id);
?>
\ 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 Creates or modifies an action in the database
*
* @file
* @author Claire Figueras <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup admin
*/
session_name('PeopleBox');
session_start();
require_once($_SESSION['pathtocoreclass']."class_functions.php");
require($_SESSION['pathtocoreclass']."class_core_tools.php");
$core_tools = new core_tools();
//here we loading the lang vars
$core_tools->load_lang();
$core_tools->test_admin('admin_actions', 'apps');
require_once($_SESSION['pathtocoreclass']."class_db.php");
require($_SESSION['config']['businessapppath']."class".DIRECTORY_SEPARATOR."class_admin_actions.php");
$satus = new AdminActions();
$satus->addupaction($_REQUEST['mode']);
?>
\ 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 Architecture Administration summary Page
*
* Architecture Administration summary Page
*
* @file
* @author Claire Figueras <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup admin
*/
$admin = new core_tools();
$admin->test_admin('admin_architecture', 'apps');
/****************Management of the location bar ************/
$init = false;
if($_REQUEST['reinit'] == "true")
{
$init = true;
}
$level = "";
if($_REQUEST['level'] == 2 || $_REQUEST['level'] == 3 || $_REQUEST['level'] == 4 || $_REQUEST['level'] == 1)
{
$level = $_REQUEST['level'];
}
$page_path = $_SESSION['config']['businessappurl'].'index.php?page=admin_archi&admin=architecture';
$page_label = _ARCHITECTURE;
$page_id = "admin_archi";
$admin->manage_location_bar($page_path, $page_label, $page_id, $init, $level);
/***********************************************************/
unset($_SESSION['m_admin']);
?>
<h1><img src="<?php echo $_SESSION['config']['img'];?>/manage_architecture_b.gif" alt="" /> <?php echo _ADMIN_ARCHI;?></h1>
<div id="inner_content" class="clearfix">
<h2 class="admin_subtitle block" ><?php echo _ARCHITECTURE;?></h2>
<div class="admin_item" id="admin_structures" title="<?php echo _MANAGE_STRUCTURE_DESC;?>" onclick="window.top.location='index.php?page=structures';">
<div class="sum_margin">
<strong><?php echo _MANAGE_STRUCTURE;?></strong><!--<br/>
<em><?php echo _MANAGE_STRUCTURE_DESC;?></em>-->
</div>
</div>
<div class="admin_item" id="admin_subfolders" title="<?php echo _MANAGE_SUBFOLDER_DESC;?>" onclick="window.top.location='index.php?page=subfolders';">
<div class="sum_margin">
<strong><?php echo _MANAGE_SUBFOLDER;?></strong><!--<br/>
<em><?php echo _MANAGE_SUBFOLDER_DESC;?></em>-->
</div>
</div>
<div class="admin_item" id="admin_types" title="<?php echo _MANAGE_DOCTYPES_DESC;?>" onclick="window.top.location='index.php?page=types';">
<div class="sum_margin">
<strong><?php echo _MANAGE_DOCTYPES;?></strong><!--<br/>
<em><?php echo _MANAGE_DOCTYPES_DESC;?></em>-->
</div>
</div>
<div class="admin_item" id="view_tree_types" title="<?php echo _VIEW_TREE_DOCTYPES_DESC;?>" onclick="window.top.location='index.php?page=view_tree_types&admin=architecture';">
<div class="sum_margin">
<strong><?php echo _VIEW_TREE_DOCTYPES;?></strong><!--<br/>
<em><?php echo _VIEW_TREE_DOCTYPES_DESC;?></em>-->
</div>
</div>
</div>
\ 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 Frame to choose a foldertype
*
* @file
* @author Laurent Giovannoni <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup admin
*/
session_name('PeopleBox');
session_start();
require_once($_SESSION['pathtocoreclass']."class_functions.php");
require_once($_SESSION['pathtocoreclass']."class_db.php");
require_once($_SESSION['pathtocoreclass']."class_request.php");
require_once($_SESSION['pathtocoreclass']."class_core_tools.php");
$core_tools = new core_tools();
$core_tools->load_lang();
$func = new functions();
$core_tools->load_html();
$core_tools->load_header();
if(isset($_REQUEST['tree_id']) && !empty($_REQUEST['tree_id']))
{
$_SESSION['doctypes_chosen_tree'] = $_REQUEST['tree_id'];
?>
<script language="javascript" type="text/javascript">window.top.frames['show_trees'].location.href='<?php echo "show_trees.php";?>';</script>
<?php
}
else
{
$_SESSION['doctypes_chosen_tree'] = "";
}
?>
<body>
<form name="frm_choose_tree" id="frm_choose_tree" method="get" action="<?php echo "choose_tree.php";?>">
<p align="left">
<label><?php echo _FOLDERTYPE;?> :</label>
<select name="tree_id" id="tree_id" onchange="this.form.submit();">
<option value=""><?php echo _CHOOSE_FOLDERTYPE;?></option>
<?php
for($i=0;$i<count($_SESSION['tree_foldertypes']);$i++)
{
?>
<option value="<?php echo $_SESSION['tree_foldertypes'][$i]['ID'];?>" <?php if($_SESSION['doctypes_chosen_tree'] == $_SESSION['tree_foldertypes'][$i]['ID'] ){ echo 'selected="selected"';}?>><?php echo $_SESSION['tree_foldertypes'][$i]['LABEL'];?></option>
<?php
}
?>
</select>
</p>
</form>
</body>
</html>
<?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 to populate tree branches
*
* @file
* @author Laurent Giovannoni <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup admin
*/
session_name('PeopleBox');
session_start();
if(isset($_REQUEST['branch_id']) && !empty($_REQUEST['branch_id']) && isset($_REQUEST['IdTree']) && !empty($_REQUEST['IdTree']))
{
$string = $_REQUEST['branch'];
$search="'branch_level_id'";
$search="#branch_level_id\":(.*)\,#U";
preg_match($search,$string,$out);
$count=count($out[0]);
if($count == 1)
{
$find = true;
}
$branch_level_id = str_replace("branch_level_id\":", "", $out[0]);
$branch_level_id = str_replace(",", "", $branch_level_id);
$branch_level_id = str_replace("\"", "", $branch_level_id);
require_once($_SESSION['pathtocoreclass']."class_functions.php");
require_once($_SESSION['pathtocoreclass']."class_db.php");
require_once($_SESSION['pathtocoreclass']."class_core_tools.php");
$core_tools = new core_tools();
$core_tools->load_lang();
$func = new functions();
$tree_id = $_REQUEST['IdTree'];
$db = new dbquery();
$db->connect();
$where = "";
if($branch_level_id == "1")
{
$db->query("select * from ".$_SESSION['tablename']['doctypes_second_level']." where doctypes_first_level_id = '".$_REQUEST['branch_id']."' and enabled ='Y' order by doctypes_second_level_label asc");
$children = array();
while($res = $db->fetch_object())
{
array_push($children, array('id' => $res->doctypes_second_level_id, 'tree' => $_SESSION['doctypes_chosen_tree'], 'key_value' => $res->doctypes_second_level_id, 'label_value' => $db->show_string($res->doctypes_second_level_label), 'script' => "show_doctypes"));
}
if(count($children) > 0)
{
echo "[";
for($cpt_level2=0; $cpt_level2< count($children); $cpt_level2++)
{
echo "{'id':'".$children[$cpt_level2]['id']."', 'txt':'".trim(addslashes($children[$cpt_level2]['label_value']))."', 'canhavechildren' : true, '".$children[$cpt_level2]['script']."' : 'other', 'key_value' : '".trim(addslashes($children[$cpt_level2]['key_value']))."', 'onbeforeopen' : MyBeforeOpen}";
if(isset($children[$cpt_level2+1]['id']) && !empty($children[$cpt_level2+1]['id']))
{
echo ',';
}
}
echo "]";
}
}
if($branch_level_id == "2")
{
$db->query("select * from ".$_SESSION['tablename']['doctypes']." where doctypes_second_level_id = '".$_REQUEST['branch_id']."' and enabled ='Y' order by description");
$children = array();
while($res = $db->fetch_object())
{
array_push($children, array('id' => $res->type_id, 'tree' => $_SESSION['doctypes_chosen_tree'], 'key_value' => $res->type_id, 'label_value' => $db->show_string($res->description), 'script' => "other"));
}
if(count($children) > 0)
{
echo "[";
for($cpt_level3=0; $cpt_level3< count($children); $cpt_level3++)
{
echo "{'id':'".$children[$cpt_level3]['id']."', 'txt':'".trim(addslashes($children[$cpt_level3]['label_value']))."', 'canhavechildren' : false, '".$children[$cpt_level3]['script']."' : 'default', 'key_value' : '".trim(addslashes($children[$cpt_level3]['key_value']))."', 'img' : 'page.gif'}";
if(isset($children[$cpt_level3+1]['id']) && !empty($children[$cpt_level3+1]['id']))
{
echo ',';
}
}
echo "]";
}
}
}
?>
\ 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 Show the tree
*
* @file
* @author Laurent Giovannoni <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup admin
*/
session_name('PeopleBox');
session_start();
require_once($_SESSION['pathtocoreclass']."class_functions.php");
require_once($_SESSION['pathtocoreclass']."class_db.php");
require_once($_SESSION['pathtocoreclass']."class_request.php");
require_once($_SESSION['pathtocoreclass']."class_core_tools.php");
$core_tools = new core_tools();
$core_tools->load_lang();
$func = new functions();
$db = new dbquery();
$db->connect();
$db1 = new dbquery();
$db1->connect();
$db2 = new dbquery();
$db2->connect();
$db3 = new dbquery();
$db3->connect();
$db4 = new dbquery();
$db4->connect();
$nb_trees = count($_SESSION['doctypes_chosen_tree']);
$core_tools->load_html();
$core_tools->load_header();
$f_level = array();
?>
<body>
<?php
if($nb_trees < 1)
{
echo _NO_DEFINED_TREES;
}
else
{
if(isset($_SESSION['doctypes_chosen_tree']) && !empty($_SESSION['doctypes_chosen_tree']))
{
?>
<script type="text/javascript" src="<?php echo $_SESSION['config']['businessappurl'].'tools/tafelTree/';?>js/prototype.js"></script>
<script type="text/javascript" src="<?php echo $_SESSION['config']['businessappurl'].'tools/tafelTree/';?>js/scriptaculous.js"></script>
<script type="text/javascript" src="<?php echo $_SESSION['config']['businessappurl'].'tools/tafelTree/';?>Tree.js"></script>
<?php
$search_customer_results = array();
$f_level = array();
$db1->query("select d.doctypes_first_level_id, d.doctypes_first_level_label from ".$_SESSION['tablename']['fold_foldertypes_doctypes_level1']." g, ".$_SESSION['tablename']['doctypes_first_level']." d where g.foldertype_id = '".$_SESSION['doctypes_chosen_tree']."' and g.doctypes_first_level_id = d.doctypes_first_level_id and d.enabled = 'Y' order by d.doctypes_first_level_label");
while($res1 = $db1->fetch_object())
{
$s_level = array();
$db2->query("select doctypes_second_level_id, doctypes_second_level_label from ".$_SESSION['tablename']['doctypes_second_level']." where doctypes_first_level_id = ".$res1->doctypes_first_level_id." and enabled = 'Y'");
while($res2 = $db2->fetch_object())
{
$doctypes = array();
$db3->query("select type_id, description from ".$_SESSION['tablename']['doctypes']." where doctypes_first_level_id = ".$res1->doctypes_first_level_id." and doctypes_second_level_id = ".$res2->doctypes_second_level_id." and enabled = 'Y' ");
while($res3 = $db3->fetch_object())
{
$results = array();
array_push($doctypes, array('type_id' => $res3->type_id, 'description' => $func->show_string($res3->description), "results" => $results));
}
array_push($s_level, array('doctypes_second_level_id' => $res2->doctypes_second_level_id, 'doctypes_second_level_label' => $func->show_string($res2->doctypes_second_level_label), 'doctypes' => $doctypes));
}
array_push($f_level, array('doctypes_first_level_id' => $res1->doctypes_first_level_id, 'doctypes_first_level_label' => $func->show_string($res1->doctypes_first_level_label), 'second_level' => $s_level));
}
for($i=0;$i<count($_SESSION['tree_foldertypes']);$i++)
{
if($_SESSION['tree_foldertypes'][$i]['ID'] == $_SESSION['doctypes_chosen_tree'])
$fLabel = $_SESSION['tree_foldertypes'][$i]['LABEL'];
}
array_push($search_customer_results, array('folder_id' => $fLabel, 'content' => $f_level));
?>
<script type="text/javascript">
function funcOpen(branch, response) {
// Ici tu peux traiter le retour et retourner true si
// tu veux insrer les enfants, false si tu veux pas
//MyClick(branch);
return true;
}
function myClick(branch) {
//window.top.frames['view'].location.href='<?php echo $_SESSION['urltomodules']."indexing_searching/view_type_folder.php?id="; ?>'+branch.getId());;
//window.top.frames['view'].location.href='<?php echo $_SESSION['urltomodules']."indexing_searching/view_type_folder.php?id="; ?>'+branch.getId());
//window.top.frames['view'].location.href='<?php echo $_SESSION['config']['businessappurl'];?>indexing_searching/little_details_invoices.php?id='+branch.getId();
//alert(branch.getId());
//branch.setText('<b>'+branch.getText()+'</b>');
}
function MyOpen(branch)
{
if(branch.struct.script != '' && branch.struct.script != 'default')
{
var parents = [];
parents = branch.getParents();
var str = '';
for(var i=0; i < (parents.length -1) ;i++)
{
str = str + '&parent_id[]=' + parents[i].getId();
}
var str_children = '';
var children = branch.getChildren();
for(var i=0; i < (children.length -1) ;i++)
{
str_children = str_children + '&children_id[]=' + children[i].getId();
}
}
return true;
}
function MyClose(branch)
{
var parents = branch.getParents();
var branch_id = branch.getId();
if(current_branch_id != null)
{
var branch2 = tree.getBranchById(current_branch_id);
if(current_branch_id == branch_id )
{
current_branch_id = branch.getNextOpenedBranch;
}
else if(branch2 && branch2.isChild(branch_id))
{
current_branch_id = branch.getNextOpenedBranch;
}
}
branch.collapse();
branch.openIt(false);
}
function MyBeforeOpen(branch, opened)
{
if(opened == true)
{
MyClose(branch);
}
else
{
current_branch_id = branch.getId();
MyOpen(branch);
return true;
}
}
function myMouseOver (branch)
{
document.body.style.cursor='pointer';
}
function myMouseOut (branch)
{
document.body.style.cursor='auto';
}
var tree = null;
var current_branch_id = null;
function TafelTreeInit ()
{
var struct = [
<?php
for($i=0;$i<count($search_customer_results);$i++)
{
?>
{
'id':'<?php echo $search_customer_results[$i]['folder_id'];?>',
'txt':'<b><?php echo $search_customer_results[$i]['folder_id'];?></b>',
'items':[
<?php
for($j=0;$j<count($search_customer_results[$i]['content']);$j++)
{
?>
{
'id':'<?php echo addslashes($search_customer_results[$i]['content'][$j]['doctypes_first_level_id']);?>',
'txt':'<?php echo addslashes($search_customer_results[$i]['content'][$j]['doctypes_first_level_label']);?>',
'items':[
<?php
for($k=0;$k<count($search_customer_results[$i]['content'][$j]['second_level']);$k++)
{
?>
{
'id':'<?php echo addslashes($search_customer_results[$i]['content'][$j]['second_level'][$k]['doctypes_second_level_id']);?>',
'txt':'<?php echo addslashes($search_customer_results[$i]['content'][$j]['second_level'][$k]['doctypes_second_level_label']);?>',
'items':[
<?php
for($l=0;$l<count($search_customer_results[$i]['content'][$j]['second_level'][$k]['doctypes']);$l++)
{
?>
{
<?php
?>
'txt':'<span style="font-style:italic;"><small><small><?php echo addslashes($search_customer_results[$i]['content'][$j]['second_level'][$k]['doctypes'][$l]['description']);?></small></small></span>',
'img':'empty.gif'
}
<?php
if($l <> count($search_customer_results[$i]['content'][$j]['second_level'][$k]['doctypes']) - 1)
echo ',';
} ?>
]
}
<?php
if($k <> count($search_customer_results[$i]['content'][$j]['second_level']) - 1)
echo ',';
}
?>
]
}
<?php
if($j <> count($search_customer_results[$i]['content']) - 1)
echo ',';
}
?>
]
}
<?php
if ($i <> count($search_customer_results) - 1)
echo ',';
}
?>
];
tree = new TafelTree('trees_div', struct, {
'generate' : true,
'imgBase' : '<?php echo $_SESSION['config']['businessappurl'].'tools/tafelTree/';?>imgs/',
'defaultImg' : 'folder.gif',
//'defaultImg' : 'page.gif',
'defaultImgOpen' : 'folderopen.gif',
'defaultImgClose' : 'folder.gif',
'onOpenPopulate' : [funcOpen, 'get_tree_children.php?IdTree=<?php echo $_SESSION['chosen_tree'];?>']
});
//open all branches
tree.expend();
};
</script>
<div id="trees_div"></div>
<?php
}
}
?>
</body>
</html>
<?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 Show the tree
*
* @file
* @author Laurent Giovannoni <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup admin
*/
session_name('PeopleBox');
session_start();
require_once($_SESSION['pathtocoreclass']."class_functions.php");
require_once($_SESSION['pathtocoreclass']."class_db.php");
require_once($_SESSION['pathtocoreclass']."class_request.php");
require_once($_SESSION['pathtocoreclass']."class_core_tools.php");
$core_tools = new core_tools();
$core_tools->load_lang();
$func = new functions();
$db = new dbquery();
$db->connect();
$nb_trees = count($_SESSION['doctypes_chosen_tree']);
$core_tools->load_html();
$core_tools->load_header();
?>
<body>
<?php
if($nb_trees < 1)
{
echo _NO_DEFINED_TREES;
}
else
{
if(isset($_SESSION['doctypes_chosen_tree']) && !empty($_SESSION['doctypes_chosen_tree']))
{
?>
<script type="text/javascript" src="<?php echo $_SESSION['config']['businessappurl'].'tools/tafelTree/';?>js/prototype.js"></script>
<script type="text/javascript" src="<?php echo $_SESSION['config']['businessappurl'].'tools/tafelTree/';?>js/scriptaculous.js"></script>
<script type="text/javascript" src="<?php echo $_SESSION['config']['businessappurl'].'tools/tafelTree/';?>Tree.js"></script>
<?php
$where = "";
$db->query("select d.doctypes_first_level_id, d.doctypes_first_level_label from ".$_SESSION['tablename']['fold_foldertypes_doctypes_level1']." g, ".$_SESSION['tablename']['doctypes_first_level']." d where g.foldertype_id = '".$_SESSION['doctypes_chosen_tree']."' and g.doctypes_first_level_id = d.doctypes_first_level_id order by d.doctypes_first_level_label");
$level1 = array();
while($res = $db->fetch_object())
{
array_push($level1, array('id' => $res->doctypes_first_level_id, 'tree' => $_SESSION['doctypes_chosen_tree'], 'key_value' => $res->doctypes_first_level_id, 'label_value' => $db->show_string($res->doctypes_first_level_label), 'script' => ""));
}
for($i=0;$i<count($_SESSION['tree_foldertypes']);$i++)
{
if($_SESSION['tree_foldertypes'][$i]['ID'] == $_SESSION['doctypes_chosen_tree'])
{
$label = "<b>".$_SESSION['tree_foldertypes'][$i]['LABEL']."</b>";
}
}
?>
<script type="text/javascript">
function funcOpen (branch, response)
{
return true;
}
function MyOpen(branch)
{
if(branch.struct.script != '' && branch.struct.script != 'default')
{
var parents = [];
parents = branch.getParents();
var str = '';
for(var i=0; i < (parents.length -1) ;i++)
{
str = str + '&parent_id[]=' + parents[i].getId();
}
var str_children = '';
var children = branch.getChildren();
for(var i=0; i < (children.length -1) ;i++)
{
str_children = str_children + '&children_id[]=' + children[i].getId();
}
}
branch.struct.branch_level_id = GetBranchLevelId(branch);
return true;
}
function GetBranchLevelId(branch)
{
var branchlevel = tree.getBranchById(branch);
return branchlevel.getLevel();
}
function MyClose(branch)
{
var parents = branch.getParents();
var branch_id = branch.getId();
if(current_branch_id != null)
{
var branch2 = tree.getBranchById(current_branch_id);
if(current_branch_id == branch_id )
{
current_branch_id = branch.getNextOpenedBranch;
}
else if(branch2.isChild(branch_id))
{
current_branch_id = branch.getNextOpenedBranch;
}
}
branch.collapse();
branch.openIt(false);
}
function MyBeforeOpen(branch, opened)
{
if(opened == true)
{
MyClose(branch);
}
else
{
current_branch_id = branch.getId();
MyOpen(branch);
return true;
}
}
var tree = null;
var current_branch_id = null;
function TafelTreeInit () {
var struct = [
{
'id':'<?php echo $_SESSION['doctypes_chosen_tree'];?>',
'txt':'<?php echo $label;?>',
'items':[
<?php
for($cpt_level1=0; $cpt_level1 < count($level1);$cpt_level1++)
{
?>
{
'id':'<?php echo $level1[$cpt_level1]['id'];?>',
'txt':'<?php echo addslashes($level1[$cpt_level1]['label_value']);?>',
'canhavechildren' : true,
'onbeforeopen' : MyBeforeOpen,
<?php if(isset($level1[$cpt_level1]['script']) && !empty($level1[$cpt_level1]['script']))
{?>
'script' : '<?php echo $level1[$cpt_level1]['script'];?>',
<?php } ?>
'key_value' : '<?php echo addslashes($level1[$cpt_level1]['key_value']);?>',
'branch_level_id' : '1'
}
<?php
if(isset($level1[$cpt_level1+1]['id']) && !empty($level1[$cpt_level1+1]['id']))
{
echo ",";
}
}
?>
]
}
];
tree = new TafelTree('trees_div', struct, {
'generate' : true,
'imgBase' : '<?php echo $_SESSION['config']['businessappurl'].'tools/tafelTree/';?>imgs/',
//'defaultImg' : 'page.gif',
'defaultImg' : 'folder.gif',
'defaultImgOpen' : 'folderopen.gif',
'defaultImgClose' : 'folder.gif',
'onOpenPopulate' : [funcOpen, 'get_tree_children.php?IdTree=<?php echo $_SESSION['doctypes_chosen_tree'];?>']
});
}
</script>
<div id="trees_div"></div>
<?php
}
else
{
//echo "<div align='left'>&nbsp;&nbsp;&nbsp;"._CHOOSE_FOLDERTYPE."</div>";
}
}
?>
</body>
</html>
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