You should have received a copy of the GNU Affero General Public License
  along with TimelineTicket plugin. If not, see <http://www.gnu.org/licenses/>.

  ------------------------------------------------------------------------

  @package   TimelineTicket plugin
  @copyright Copyright (c) 2013-2016 TimelineTicket team
  @license   AGPL License 3.0 or (at your option) any later version
             http://www.gnu.org/licenses/agpl-3.0-standalone.html
  @link      https://github.com/pluginsGLPI/timelineticket
  @since     2013

  ------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
Html::header(PluginTimelineticketDisplay::getTypeName(2), $_SERVER["PHP_SELF"], "plugins", "timelineticket");
if (Session::haveRight("config", READ) || Session::haveRight("plugin_timelineticket_ticket", UPDATE)) {
    $ptConfig = new PluginTimelineticketConfig();
    $grplevel = new PluginTimelineticketGroupLevel();
    if (isset($_POST["reconstructStates"])) {
        ini_set("max_execution_time", "0");
        ini_set("memory_limit", "-1");
        $ptState = new PluginTimelineticketState();
        $ptState->reconstructTimeline();
        Html::back();
    } else {
        if (isset($_POST["reconstructGroups"])) {
            ini_set("max_execution_time", "0");
            ini_set("memory_limit", "-1");
            $ptGroup = new PluginTimelineticketAssignGroup();
            $ptGroup->reconstrucTimeline();