Example #1
0
} else {
    $group = $_GET["group"];
    $rol = get_grouprol($_GET["group"]);
    ?>
    <div class="alert alert-success message" id="message_ok" role="alert"></div>
    <div class="alert alert-danger message" id="message_error" role="alert"></div>
    <input type="text" id="ajax_answer">

    <div class="panel panel-primary">
        <div class="panel-heading">
            <a href="#" id="expandgroupconfpanel" class="txt_white">ConfiguraciĆ³n del grupo</a>
        </div> 
        <div id="groupconfpanel" class="panel-body message">
            <?php 
    $structure = get_proyectstructure($group);
    $options = get_proyectstructure();
    //print_array($options);
    ?>


                    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
                        <?php 
    for ($i = 0; $i < sizeof($options); $i++) {
        ?>
                                <?php 
        $stepactive = array_contain($structure, $options[$i][0][0], 0);
        ?>
                                <div id="panel_<?php 
        echo $options[$i][0][0];
        ?>
" class="panel <?php 
Example #2
0
<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$estructure = get_proyectstructure($group, true);
$proyectdata = get_proyectdata($proyectid);
?>
<br>
<div class="well">
    <h3>
        <?php 
//out($proyectdata[1]);
?>
        <?php 
echo $proyectdata[1];
?>
    </h3>
    <div style="margin-left: 40px">
        <?php 
//out($proyectdata[2]);
?>
        <?php 
echo $proyectdata[2];
?>
    
    <h4>Industria</h4>
        <ul class="list-group">
          <?php 
Example #3
0
function setunsetstep($group, $step)
{
    include_once 'backend/backend.php';
    $backend = new backend();
    $retorno = array(FALSE, "Error no se pudo actualizar");
    $result = false;
    $groupoptions = get_proyectstructure($group);
    $alloptions = get_proyectstructure();
    $existe = array_contain($groupoptions, $step, 0);
    if ($existe) {
        ///Dar de baja al paso en el grupo
        $estructura = "";
        for ($i = 0; $i < sizeof($groupoptions); $i++) {
            if ($groupoptions[$i][0] != $step) {
                $estructura .= $estructura != "" ? "|" : "";
                $estructura .= $groupoptions[$i][0];
                for ($e = 0; $e < sizeof($groupoptions[$i][1]); $e++) {
                    $estructura .= "," . $groupoptions[$i][1][$e];
                }
            }
        }
        $result = $backend->update_groupstructure($group, $estructura);
    } else {
        ///Agregar el paso al grupo
        $newstep = "";
        $estructura = "";
        switch ($step) {
            case "2":
                $newstep = "2,1,2,3,35,4,5,6,7";
                break;
            case "3":
                $newstep = "3,8,9,11,15,29,30";
                break;
            case "4":
                $newstep = "4,16,17,18,19";
                break;
            case "5":
                $newstep = "5,20,36";
                break;
            case "6":
                $newstep = "6,22";
                break;
        }
        for ($i = 0; $i < sizeof($alloptions); $i++) {
            $existe = array_contain($groupoptions, $alloptions[$i][0][0], 0);
            if ($existe) {
                $estructura .= $estructura != "" ? "|" : "";
                $estructura .= $alloptions[$i][0][0];
                for ($e = 0; $e < sizeof($groupoptions[$existe - 1][1]); $e++) {
                    $estructura .= "," . $groupoptions[$existe - 1][1][$e];
                }
            } else {
                if ($step == $alloptions[$i][0][0]) {
                    $estructura .= $estructura != "" ? "|" : "";
                    $estructura .= $newstep;
                }
            }
        }
        $result = $backend->update_groupstructure($group, $estructura);
    }
    if ($result) {
        return array(true, "Grupo actualizado.");
    }
    return $retorno;
}