<?php /* * Script créant et vérifiant que les champs requis s'ajoutent bien */ if (!defined('INC_FROM_DOLIBARR')) { define('INC_FROM_CRON_SCRIPT', true); require '../config.php'; } dol_include_once('/checklist/class/checklist.class.php'); $PDOdb = new TPDOdb(); $o = new TChecklist($db); $o->init_db_by_vars($PDOdb);
<?php require 'config.php'; dol_include_once('/checklist/class/checklist.class.php'); $langs->load('checklist@checklist'); $type_object = GETPOST('type_object'); $fk_object = GETPOST('fk_object'); $action = GETPOST('action'); $PDOdb = new TPDOdb(); $c = new TChecklist(); $c->loadBy($PDOdb, $type_object, $fk_object); switch ($action) { case 'yesido': //$PDOdb->debug=true; $c->iDoIt(GETPOST('k')); $c->setCheck(); $c->save($PDOdb); break; default: break; } _fiche($c); function _fiche(&$c) { global $db, $conf, $langs, $user; llxHeader('', 'Checklist'); $PDOdb = new TPDOdb(); if ($c->type_object == 'project') { dol_include_once('/projet/class/project.class.php'); dol_include_once('/core/lib/project.lib.php'); $object = new Project($db);