예제 #1
0
    array_push($doctype_set, $doctype);
    $resultSet->moveNext();
}
//echo "<pre>doctype_set \n";print_r($doctype_set);echo "</pre>\n";
$pp = array();
pagehead2('Define types of deliverables students can upload.', file_get_contents('templates/simpledatepicker.html'));
$page_opening = "Define the types of deliverables students can upload per milestones in a project. " . "<font style='font-size:6pt'>prj_id={$prj_id} milestone={$milestone}</font>";
$page = new PageContainer();
$page->setTitle('Define types of deliverables students can upload.');
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
$page->addBodyComponent($nav);
$prjSel->setJoin('milestone_grp using (prj_id,milestone)');
$pp['prj_id_selector'] = $prjSel->getSelector();
$sql = "select  distinct udt.description as upload_description,udt.url,coalesce(version_limit,0) as version_limit," . "due, pd.publish_early,udt.doctype,pd.rights[0:2],warn_members,indiv_group\n" . "\tfrom uploaddocumenttypes udt left join " . "( select * from project_deliverables join prj_milestone using(prjm_id) where prjm_id={$prjm_id} ) pd \n" . "\tusing(prj_id,doctype)\n" . "\twhere prj_id={$prj_id} order by due,udt.doctype";
// echo "<pre>$sql</pre>\n";
$inputColumns = array('0' => array('type' => 'T', 'size' => '40'), '1' => array('type' => 'U', 'size' => '40'), '2' => array('type' => 'N', 'size' => '3'), '3' => array('type' => 'D', 'size' => '10'), '4' => array('type' => 'B', 'size' => '1', 'colname' => 'publish_early'), '5' => array('type' => 'H', 'size' => '0'), '6' => array('type' => 'R', 'size' => '2', 'rightsChars' => 'GPW'), '7' => array('type' => 'B', 'size' => '1', 'colname' => 'warn_members'), '8' => array('type' => 'Z', 'size' => 1, 'options' => array('Ind' => 'I', 'Grp' => 'G')));
$pp['checked'] = $warn_members == 'true' ? 'checked' : '';
$pp['prj_id'] = $prj_id;
$pp['milestone'] = $milestone;
$datePickers = array();
$page->addScriptResource('js/jquery-1.7.1.min.js');
$page->addScriptResource('js/jquery-ui-1.8.17.custom.min.js');
$pp['rtable'] = getQueryToTableChecked2($dbConn, $sql, true, -1, new RainBow(), 'doctype[]', $doctype_set, $inputColumns);
if (count($datePickers) > 0) {
    foreach ($datePickers as $dp) {
        $page->addJqueryFragment("\$('#" . $dp . "').datepicker(dpoptions);");
    }
}
$pp['prjSelectionDetails'] = $prjSel->getSelectionDetails();
$page->addHtmlFragment('templates/defuploadtype.html', $pp);
$page->show();
예제 #2
0
    //    "<pre>$sql</pre>";
    $resultSet = $dbConn->Execute($sql);
    if ($resultSet === false) {
        die("<br>Cannot set grop details with <pre>" . $sql . "</pre> reason " . $dbConn->ErrorMsg() . "<br>");
    }
}
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$pSel = $prjSel->getWidget();
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
$doctype_set = array();
$sql = "select pt.grp_num,ga.* from prj_tutor pt left join grp_alias ga using(prjtg_id) where prjm_id={$prjm_id} order by grp_num";
$inputColumns = array('1' => array('type' => 'T', 'size' => '40'), '2' => array('type' => 'T', 'size' => '15'), '3' => array('type' => 'T', 'size' => '64'), '4' => array('type' => 'N', 'size' => '64'), '5' => array('type' => 'H', 'size' => '0'), '6' => array('type' => 'T', 'size' => '64'), '7' => array('type' => 'T', 'size' => '64'));
$table = getQueryToTableChecked2($dbConn, $sql, false, -1, new RainBow(0x46b4b4, 64, 32, 0), 'document[]', $doctype_set, $inputColumns);
//$table = simpleTableString($dbConn, $sql, "<table id='myTable' class='tablesorter' summary='your requested data'"
//        . " style='empty-cells:show;border-collapse:collapse' border='1'>");
$scripts = '<script type="text/javascript" src="js/jquery.js"></script>
    <script src="js/jquery.tablesorter.js"></script>
    <script type="text/javascript">                                         
      $(document).ready(function() {
           $("#myTable").tablesorter({widgets: [\'zebra\']}); 
      });

    </script>
    <link rel=\'stylesheet\' type=\'text/css\' href=\'' . SITEROOT . '/style/tablesorterstyle.css\'/>
';
pagehead2('Get class list', $scripts);
$page_opening = "Group details for project ";
$nav = new Navigation(array(), basename($PHP_SELF), $page_opening);