?>
<table class="table table-condensed table-hover table-striped">
  <thead>
    <tr>
      <th>№</th>
      <th>Дата</th>
      <th>Исполнитель</th>
      <th>Задача</th>
      <th>Результат</th>
      <th>Комментарий</th>
    </tr>
  </thead>  
 <tbody> 
<?php 
$bpid = _GET("bpid");
$bp = new Tbp();
$bp->GetById($bpid);
$sql = "SELECT * FROM bp_xml_userlist WHERE bpid='{$bpid}' order by id";
$result = $sqlcn->ExecuteSQL($sql);
if ($result != '') {
    while ($myrow = mysqli_fetch_array($result)) {
        $numid = $myrow['id'];
        $cm = $myrow['comment'];
        $uz = new Tusers();
        $uz->GetById($myrow['userid']);
        $uname = $uz->fio;
        $bpnode = $bp->GetTitleAndCommentNode($myrow['node']);
        $bpnodetitle = $bpnode['title'];
        $bpnodecomment = $bpnode['comment'];
        $rz = 'Пока не определено';
        if ($myrow['result'] == $myrow['accept']) {
Exemple #2
0
						location:0.1,
						id:"label"						
					}],
					["Arrow", {
						cssClass:"l1arrow",
						location:0.5, width:20,length:20
						
					}]
				]                                
			   				   
    
});';
}
echo '<div class="demo kitchensink-demo" id="kitchensink-demo">';
// читаем файл с БП и рисуем Ноды
$bp = new Tbp();
$bp->GetById($bpid);
$xml = simplexml_load_file("../../../../modules/bp/{$bp->xml}");
//var_dump($xml);
foreach ($xml->step as $step) {
    $post = GetPostOrgByid($step->user);
    $color = '';
    if ($bp->node == $step->node and $bp->status != 2) {
        $color = 'background-color: chartreuse;';
    }
    if ($step->node == "-1" and $bp->status == 2) {
        $color = 'background-color: chartreuse;';
    }
    echo '<div style="' . $color . 'height:' . $step->heigth . ';width:' . $step->width . ';top:' . $step->top . ';left:' . $step->left . ';" class="component window" id="window' . $step->node . '"><strong>' . $step->title . '(' . $step->node . ')</strong><br>' . $post . '<br><strong>' . $step->comment . '</strong></div>
                         ';
}
            $zxxx = new Tbp();
            $zxxx->GetLast();
            $zxxx->SetNodeToBase(1);
        }
    }
}
// ну или еслиредактируем, то обнавляем БП
if ($step == "edit") {
    if (count($err) == 0) {
        $id = $_GET["id"];
        $sql = "UPDATE bp_xml SET title='{$title}',bodytxt='{$bodytxt}',status='{$status}',xml='{$bpshema}' WHERE id='{$id}'";
        $result = $sqlcn->ExecuteSQL($sql, $cfg->base_id);
        if ($result == '') {
            die('Не смог изменить БП!: ' . mysqli_error($sqlcn->idsqlconnection));
        }
        // если стартуем процесс, то добавляем участников процесса
        if ($status == 1) {
            $zxxx = new Tbp();
            $zxxx->GetById($id);
            $zxxx->SetNodeToBase(1);
        }
    }
}
if (count($err) == 0) {
    echo "ok";
} else {
    echo '<script>$("#messenger").addClass("alert alert-error");</script>';
    for ($i = 0; $i <= count($err); $i++) {
        echo "{$err[$i]}<br>";
    }
}
Exemple #4
0
         $cnt_three++;
     }
     if ($row2['result'] == $row2['four']) {
         $cnt_four++;
     }
     $cancel = $row2['cancel'];
     $accept = $row2['accept'];
     $thinking = $row2['thinking'];
     $yes = $row2['yes'];
     $no = $row2['no'];
     $one = $row2['one'];
     $two = $row2['two'];
     $three = $row2['three'];
     $four = $row2['four'];
 }
 $bb = new Tbp();
 $bb->GetById($row['id']);
 // если в БП проголосовали все, то думаем "Чё делать"
 if ($cnt == $st1) {
     // если хоть ктото нажал "Отмена" то
     if ($cnt_cancel != 0) {
         // если в случае отмены завершаем БП, то завершаем...
         if ($cancel == -1) {
             $bb->SetStatus(3);
         } else {
             $bb->SetNodeToBase($cancel);
         }
     }
     // если хоть ктото нажал "Нет" то
     if ($cnt_no != 0) {
         // если в случае отмены завершаем БП, то завершаем...
Exemple #5
0
    $cn = count($fl);
    $rs = array();
    for ($i = 0; $i < count($fl); $i++) {
        $fname = $fl[$i];
        $xml = simplexml_load_file("../../../../modules/bp/{$fname}");
        $name = $xml->name;
        $rs[$i]['name'] = $name;
        $rs[$i]['file'] = $fl[$i];
    }
    return $rs;
}
$step = _GET('mode');
$randomid = GetRandomId(60);
$bpid = _GET('bpid');
if ($bpid != "") {
    $bp1 = new Tbp();
    $bp1->GetById($bpid);
    $dt = MySQLDateTimeToDateTime($bp1->dt);
    $title = $bp1->title;
    $bodytxt = $bp1->bodytxt;
    $status = $bp1->status;
    $bpshema = $bp1->xml;
} else {
    $dt = Date("d.m.Y H:i:s");
    $title = "";
    $bodytxt = "";
    $status = "0";
    $bpshema = "1";
}
?>
 
$mybpid = _GET('mybpid');
$result = $sqlcn->ExecuteSQL("SELECT * FROM bp_xml_userlist WHERE id='{$mybpid}'");
while ($myrow = mysqli_fetch_array($result)) {
    $bpid = $myrow['bpid'];
    $accept = $myrow['accept'];
    $cancel = $myrow['cancel'];
    $thinking = $myrow['thinking'];
    $yes = $myrow['yes'];
    $no = $myrow['no'];
    $one = $myrow['one'];
    $two = $myrow['two'];
    $three = $myrow['three'];
    $four = $myrow['four'];
}
if ($bpid != "") {
    $bp1 = new Tbp();
    $bp1->GetById($bpid);
    $title = $bp1->title;
    $bodytxt = $bp1->bodytxt;
    $status = $bp1->status;
    $bpshema = $bp1->xml;
    $tnode = $bp1->GetTitleNode($bp1->node);
}
?>
 
   <div class="row-fluid">
        <div class="span6">            
            <legend>Описание БП</legend>
            <?php 
echo "<h3>{$title}</h3>";
?>