<?php 
$objPage = new Page();
$objProject = new Project();
if (!isset($data['params'])) {
    $project = $data['project'];
    $id = $project['id'];
} else {
    $id = $data['params']['id'];
    $project = $objProject->getProjectById($id);
}
$objPosition = new Position();
$allPositions = $objPosition->getAllPositionsInProject($project['project_type_id']);
?>
        
        <div class="sectionParams" data-params="id=<?php 
echo $id;
?>
">
        </div>


        <form id="addApplicationForm">
             <table cellpadding="0" cellspacing="0" border="0" style="margin-bottom:15px;">
                <tr>                    
                    <td>Position</td>
                    <td>
                        <input type="hidden" name="project_id" id="project_id" value="<?php 
echo $project['id'];
?>
" />
                        <select class="selectPosition" style="width:140px;" name="position_id" data-url="/sugarkms/mod/getTeamsForPosition.php">
Пример #2
0
    <?php 
if (!isset($data['params'])) {
    $positionsEXCO = $data['positionsEXCO'];
    $positionsProject = $data['positionsProject'];
} else {
    $objPosition = new Position();
    $positionsEXCO = $objPosition->getAllPositionsInProject(5);
    $positionsProject = $objPosition->getAllPositionsInProject(6);
}
?>
        
        
        
        <h2>Display Order</h2>
        
        <table cellpadding="0" cellspacing="0" border="0" class="tbl_repeat" style="margin-bottom:0px;display:inline;" >
            
            <tr>
                <th class=" borderRight">Name</th>
                <th class="">EXCO Order</th>                
            </tr>
            <tbody id="orderEXCO" data-type="exco" >
        <?php 
foreach ($positionsEXCO as $positionEXCO) {
    ?>
                <tr id="exco-<?php 
    echo $positionEXCO['id'];
    ?>
"> 
                    <td class=" borderRight" style="font-weight:bold;"><?php 
    echo $positionEXCO['name'];
<?php

require_once '../inc/config.php';
if (isset($_POST['type'])) {
    $type = $_POST['type'];
    $objPosition = new Position();
    $positions = $objPosition->getAllPositionsInProject($type);
    if (empty($group)) {
        echo Helper::json(array('success' => true, 'positions' => $positions));
    } else {
        echo Helper::json(array('success' => false));
    }
} else {
    echo Helper::json(array('success' => false));
}