<?php include 'apps/owngantt/codebase/connector/gantt_connector.php'; $db_host = OC::$server->getSystemConfig()->getValue('dbhost', false); $db_user = OC::$server->getSystemConfig()->getValue('dbuser', false); $db_password = OC::$server->getSystemConfig()->getValue('dbpassword', false); $db_name = OC::$server->getSystemConfig()->getValue('dbname', false); $res = mysql_connect($db_host, $db_user, $db_password); mysql_select_db($db_name); if ($db_name) { echo "verbunden"; } $path1 = get_include_path(); echo $path1; $gantt = new JSONGanttConnector($res); $gantt->render_links("oc_owngantt_links", "id", "source,target,type"); $gantt->render_table("oc_owngantt_tasks", "id", "start_date,duration,text,progress,sortorder,parent");
<?php include 'config.php'; $gantt = new JSONGanttConnector($res, $dbtype); $gantt->mix("open", 1); //$gantt->enable_order("sortorder"); $gantt->render_links("gantt_links", "id", "source,target,type"); $gantt->render_table("gantt_tasks", "id", "start_date,duration,text,progress,parent,deadline,planned_start,planned_end", "");
<?php include 'config.php'; $gantt = new JSONGanttConnector($res, $dbtype); $parent_id = isset($_GET["parent_id"]) ? $_GET["parent_id"] : 0; $gantt->mix("open", 0); $gantt->mix("deep", 1); function check_children($row) { global $gantt; $task_id = $row->get_value('id'); $sql = "SELECT COUNT(id) AS has_children FROM gantt_tasks WHERE parent='{$task_id}'"; $children = $gantt->sql->query($sql); $child = $gantt->sql->get_next($children); $children_qty = $child['has_children']; $row->set_userdata('$has_child', $children_qty); } $gantt->event->attach("beforeRender", "check_children"); $gantt->filter("parent={$parent_id}"); $gantt->render_links("gantt_links", "id", "source,target,type"); $gantt->render_table("gantt_tasks", "id", "start_date,duration,text,progress,parent", "", "parent");
<?php $oc_host = OC::$server->getSystemConfig()->getValue('dbhost', false); $oc_user = OC::$server->getSystemConfig()->getValue('dbuser', false); $oc_password = OC::$server->getSystemConfig()->getValue('dbpassword', false); $oc_name = OC::$server->getSystemConfig()->getValue('dbname', false); $link_table = OC::$server->getSystemConfig()->getValue('dbtableprefix', false) . 'owngantt_links'; $task_table = OC::$server->getSystemConfig()->getValue('dbtableprefix', false) . 'owngantt_tasks'; $res = mysql_connect($oc_host, $oc_user, $oc_password); mysql_select_db($oc_name); include 'lib/connector/gantt_connector.php'; $gantt = new JSONGanttConnector($res); $gantt->render_links($link_table, "id", "source,target,type"); $gantt->render_table($task_table, "id", "start_date,duration,text,progress,sortorder,parent");
<?php include 'config.php'; $gantt = new JSONGanttConnector($res, $dbtype); $gantt->mix("open", 1); //$gantt->enable_order("sortorder"); $gantt->render_links("gantt_links", "id", "source,target,type"); $gantt->render_table("gantt_tasks_enddate", "id", "start_date,end_date,text,progress,parent", "");