Exemplo n.º 1
0
 public static function doSelectByRegPeriod(Criteria $c = null, $rpi = null)
 {
     $tsi = null;
     if ($rpi == null) {
         $tsi = sfContext::getInstance()->getRequest()->getParameter('id');
     }
     if ($rpi == null && $tsi == null) {
         return array();
     }
     $ids = '';
     if ($rpi != null) {
         $c = new Criteria();
         $c->addJoin(RegPeriodPeer::CURRICULUM_ID, CurriculumPeer::ID);
         $c->addJoin(CurriculumPeer::DEPARTMENT_ID, DepartmentPeer::ID);
         $c->add(RegPeriodPeer::ID, $rpi);
         $dept = DepartmentPeer::doSelectOne($c);
         $ids = $dept->getIdRecurs();
     }
     if ($tsi != null) {
         $c = new Criteria();
         $c->addJoin(RegPeriodPeer::CURRICULUM_ID, CurriculumPeer::ID);
         $c->addJoin(CurriculumPeer::DEPARTMENT_ID, DepartmentPeer::ID);
         $c->addJoin(TestSchedulePeer::REG_TEST_PERIOD_ID, RegTestPeriodPeer::ID);
         $c->add(TestSchedulePeer::ID, $tsi);
         $dept = DepartmentPeer::doSelectOne($c);
         $ids = $dept->getIdRecurs();
     }
     $sql = "select * from test_subject where department_id in ({$ids})";
     $connection = Propel::getConnection();
     $statement = $connection->createStatement();
     $result = $statement->executeQuery($sql, ResultSet::FETCHMODE_NUM);
     $objs = TestSubjectPeer::populateObjects($result);
     return $objs;
 }
Exemplo n.º 2
0
 /**
  * Get the associated Department object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Department The associated Department object.
  * @throws     PropelException
  */
 public function getDepartment(PropelPDO $con = null)
 {
     if ($this->aDepartment === null && $this->department_id !== null) {
         $c = new Criteria(DepartmentPeer::DATABASE_NAME);
         $c->add(DepartmentPeer::ID, $this->department_id);
         $this->aDepartment = DepartmentPeer::doSelectOne($c, $con);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aDepartment->addEmployees($this);
         		 */
     }
     return $this->aDepartment;
 }
Exemplo n.º 3
0
    p.subheader { font-size: 10px; }
    table.list_content { border-collapse: collapse; width: auto; margin: auto; margin-top: 20px; }
    table.list_content td, table.list_content th { border: 1px solid black; padding: 2px 4px; vertical-align: top; }
    .list_content th { font-style: italic; background-color: #F7E859; text-align: left; }
    .even td { background-color: #F4F4F2; }
    center.title { font-weight: bold; font-size: 14px; }
    center.subtitle { font-weight: bold; font-size: 10px; margin-bottom: 0px; }
    .pager_top { width: 100%; text-align: left; }
    .pager_record, .pager_page { display: none; }
    td.list { text-align: center; }
</style>

<?php 
$c = new Criteria();
$c->add(DepartmentPeer::PARENT, 0, Criteria::EQUAL);
$dept = DepartmentPeer::doSelectOne($c);
$c = new Criteria();
$c->add(DepartmentDetailPeer::DEPARTMENT_ID, $dept->getId());
$department_detail = DepartmentDetailPeer::doSelectOne($c);
?>

<?php 
if (isset($note)) {
    ?>

	<table width="100%">
		<tr>
			<td width="50%" style="text-align: left; vertical-align: middle;">
				<img  src='<?php 
    echo image_path('logoBig_00.jpg', true);
    ?>