Example #1
0
<?php

/**
 * $Id$
 *
 * @category EAI
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkEdit();
$route = new CEAIRoute();
$routes = array();
$senders = array();
foreach ($route->loadList(null, "sender_id ASC") as $_route) {
    /** @var CEAIRoute $_route */
    $sender = $_route->loadRefSender();
    $_route->loadRefReceiver();
    $senders[$sender->_guid] = $sender;
    $routes[$sender->_guid][] = $_route;
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("routes", $routes);
$smarty->assign("senders", $senders);
$smarty->display("inc_list_route.tpl");
<?php

/**
 * $Id$
 *
 * @category EAI
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkEdit();
$actor_guid = CValue::get("actor_guid");
/** @var CInteropSender $actor */
$sender = CMbObject::loadFromGuid($actor_guid);
$route = new CEAIRoute();
$route->sender_class = $sender->_class;
$route->sender_id = $sender->_id;
$routes = $route->loadMatchingList();
foreach ($routes as $_route) {
    /** @var CEAIRoute $_route */
    $_route->loadRefReceiver();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("sender", $sender);
$smarty->assign("routes", $routes);
$smarty->display("inc_list_actor_routes.tpl");
Example #3
0
/**
 * $Id$
 *  
 * @category EAI
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkEdit();
$route_id = CValue::get("route_id");
$actor_guid = CValue::get("actor_guid");
$list_receiver = CApp::getChildClasses("CInteropReceiver", true);
$list_sender = CApp::getChildClasses("CInteropSender", true);
if ($actor_guid) {
    $actor = CMbObject::loadFromGuid($actor_guid);
}
$route = new CEAIRoute();
$route->load($route_id);
if (!$route->_id && isset($actor)) {
    $route->sender_class = $actor->_class;
    $route->sender_id = $actor->_id;
}
$route->loadRefReceiver();
$route->loadRefSender();
$smarty = new CSmartyDP();
$smarty->assign("route", $route);
$smarty->assign("list_receiver", $list_receiver);
$smarty->assign("list_sender", $list_sender);
$smarty->display("inc_edit_route.tpl");