コード例 #1
0
ファイル: addtoclass.php プロジェクト: homberghp/peerweb
        $dbConn->log($dbConn->ErrorMsg());
        $dbConn->Execute("abort");
    }
}
$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\'/>
';
$myClassSelector = new ClassSelectorClass($dbConn, $class_id);
$classSelectorWidget = $myClassSelector->setAutoSubmit(true)->setSelectorName('newclass_id')->getSelector();
$sql = "select distinct snummer,achternaam,roepnaam,voorvoegsel,lang \n" . " from student  \n" . "join student_class using(class_id)\n" . " where class_id={$class_id} " . "  order by achternaam,roepnaam";
$rainbow = new RainBow();
$memberTable = simpletableString($dbConn, $sql, "<table id='myTable' class='tablesorter' summary='your requested data'" . " style='empty-cells:show;border-collapse:collapse' border='1'>");
pagehead2('Add/move individual student to class.', $scripts);
$page_opening = "Add individual student to a class. <span style='font-size:6pt;'>class_id {$class_id}</span>";
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
$nav->setInterestMap($tabInterestCount);
$nav->show();
include_once 'templates/addtoclass.html';
?>
<!-- db_name=<?php 
echo $db_name;
?>
 -->
<!-- $Id: addtoclass.php 1853 2015-07-25 14:17:12Z hom $ -->
コード例 #2
0
ファイル: classphoto.php プロジェクト: homberghp/peerweb
$tutor = $tutor_code;
extract($_SESSION);
$year = date('Y');
# get actual course_year
$sql = "select value as year from peer_settings where key='course_year'";
$resultSet = $dbConn->Execute($sql);
if (!$resultSet->EOF) {
    extract($resultSet->fields);
}
if (isset($_REQUEST['class_id'])) {
    $_SESSION['class_id'] = $class_id = $_REQUEST['class_id'];
}
$style = file_get_contents('js/balloonscript.html');
pagehead2('class photos', $style);
$classSelectorClass = new ClassSelectorClass($dbConn, $class_id);
$oldClassSelector = $classSelectorClass->setAutoSubmit(true)->addConstraint('sort1 < 10 and student_count <>0')->getSelector();
$sql = "select * from hoofdgrp where hoofdgrp='{$class_id}'";
$sql = "select * from student_class natural join faculty where class_id='{$class_id}'";
$resultSet = $dbConn->Execute($sql);
if ($resultSet === false) {
    die("<br>Cannot get class data with " . $sql . " reason " . $dbConn->ErrorMsg() . "<br>");
}
if (!$resultSet->EOF) {
    extract($resultSet->fields);
}
$tablehead = "<h2><a href='photolist.php?class_id={$class_id}'>" . "Class photos for class {$faculty_short}.{$sclass} {$class_id}: {$year}-" . ($year + 1) . "<img src='images/pdf_icon.png' border='0'/></a></h2>\n";
$page_opening = "Class photos for class  {$faculty_short}.{$sclass} {$class_id} {$year}-" . ($year + 1);
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
$nav->setInterestMap($tabInterestCount);
$sql = "SELECT distinct st.snummer as number," . "st.roepnaam||' '||coalesce(regexp_replace(st.voorvoegsel,'''','&rsquo;')||' ','')||st.achternaam as name,\n" . "st.achternaam,st.roepnaam,st.voorvoegsel,cohort,cohort,st.opl as opl_code,pcn,lang,sex,gebdat,\n" . "straat,huisnr,pcode,plaats,nationaliteit,\n" . "td.roepnaam||coalesce(' '||td.voorvoegsel,'')||' '||td.achternaam as slb,coalesce(td.tutor,'---') as slb_ab,\n" . "st.hoofdgrp as sclass, st.snummer as participant, course_description as opleiding,gebdat as birthday,\n" . "'fotos/'||image as image\n" . " from student_email st \n" . "left join fontys_course fc on(st.opl=fc.course)\n" . "left join tutor_join_student td on (st.slb=td.snummer)\n" . "where class_id='{$class_id}'" . "order by achternaam,roepnaam";
//$dbConn->log($sql);