示例#1
0
                                if ($msg = $concept->store()) {
                                    CAppUI::setMsg("Ligne {$line_number} : {$msg}", UI_MSG_WARNING);
                                    continue;
                                } else {
                                    CAppUI::setMsg("{$concept->_class}-msg-modify", UI_MSG_OK);
                                }
                            }
                        }
                    }
                    // TAG BINDING
                    $tag_item = new CTagItem();
                    $tag_item->setObject($concept);
                    $tag_item->tag_id = $tag2->_id;
                    $tag_item->loadMatchingObject();
                    if (!$tag_item->_id) {
                        if ($msg = $tag_item->store()) {
                            CAppUI::setMsg("Ligne {$line_number} : {$msg}", UI_MSG_WARNING);
                        } else {
                            CAppUI::setMsg("{$tag_item->_class}-msg-create", UI_MSG_OK);
                        }
                    }
                }
                break;
        }
        fclose($fp);
        CAppUI::setMsg("Import terminé", UI_MSG_OK);
    }
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("message", CAppUI::getMsg());
示例#2
0
                if (!$tag->_id) {
                    $msg = $tag->store();
                    if ($msg) {
                        CAppUI::setMsg($msg, UI_MSG_ERROR);
                        $results[$i]["error"] = $msg;
                        $i++;
                        continue;
                    }
                }
                $tag_item = new CTagItem();
                $tag_item->tag_id = $tag->_id;
                $tag_item->object_id = $object->_id;
                $tag_item->object_class = $object->_class;
                $tag_item->loadMatchingObjectEsc();
                if (!$tag_item->_id) {
                    $msg = $tag_item->store();
                    if ($msg) {
                        CAppUI::setMsg($msg, UI_MSG_ERROR);
                        $results[$i]["error"] = $msg;
                        $i++;
                        continue;
                    }
                }
            }
        }
        $results[$i]["code"] = implode(" - ", $results[$i]["code"]);
        $i++;
    }
    fclose($fp);
}
CAppUI::callbackAjax('$("systemMsg").insert', CAppUI::getMsg());