Exemplo n.º 1
0
function moveObject($db, $object_id, $old_father_id, $new_father_id)
{
    copyNode($db, $object_id, $new_father_id, 'type', 'node');
    deleteNode($db, $old_father_id, $object_id, 'type', 'node');
}
Exemplo n.º 2
0
function recursiveCopy($dragID, $dropID)
{
    if ($dragID != $dropID) {
        $result = copyNode($dragID, $dropID, false);
        $sql = "select * from " . __racinebd__ . "arbre where supprimer=0 and pere=" . $dragID . " order by ordre";
        $link = query($sql);
        while ($ligne = fetch($link)) {
            recursiveCopy($ligne["arbre_id"], $result[1]);
        }
    }
}
Exemplo n.º 3
0
     $msg = 'Tout est ok';
     log_phantom($dragID, "Déplacement du noeud");
 } else {
     if ($hitMode == "after") {
         $okDrop = moveBeforeNode($dropID, $dragID);
         $msg = 'Tout est ok';
         log_phantom($dragID, "Déplacement du noeud");
     } else {
         if ($copydrag == 1) {
             if ($recursive == 1) {
                 recursiveCopy($dragID, $dropID);
                 $okDrop = true;
                 $msg = 'Tout est ok';
             } else {
                 //copy du noeud
                 $result = copyNode($dragID, $dropID);
                 $okDrop = $result[0];
                 $msg = $result[1];
                 log_phantom($result[1], "Copie du noeud" . $dragID);
             }
         } else {
             if ($replace == 1) {
                 replaceNode($dropID, $dragID);
                 $okDrop = true;
                 $msg = 'Tout est ok';
             } else {
                 //déplacement standard
                 if ($hitMode == "over") {
                     $okDrop = moveNode($dragID, $dropID);
                 } else {
                     $okDrop = moveCrossNode($dragID, $dropID);