Ejemplo n.º 1
0
</div></td></tr>
                                                                <?php 
} else {
    ?>
                                                                             <tr>
                                                                                        <th>
                                                                                               <?php 
    $i = 0;
    foreach ($pager->getResults() as $opac) {
        ?>
                                                                                                            <div class="box_digital_even">
                                                                                                                    <dt>
                                                                                                                              <?php 
        $cb = new Criteria();
        $cb->add(CatalogStudentPeer::CATALOG_ID, $opac->getId());
        $cat_stu = CatalogStudentPeer::doSelectOne($cb);
        if ($opac->getTitle()) {
            $x = $opac->getTitle();
        } else {
            $x = $cat_stu->getStudent()->getName();
        }
        echo link_to_remote(image_tag(url_for('student/getPhoto?id=' . $cat_stu->getStudentId() . '&rnd=' . rand(999, 9999999)), array('id' => 'thumbphoto', 'height' => '130', 'width' => '100', 'alt' => $cat_stu->getStudent()->getName())), array('url' => 'learning/showStudent?id=' . $opac->getId(), 'update' => 'content', 'script' => 'true', 'loading' => "showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('title' => $cat_stu->getStudent()->getName()));
        ?>
                                                                                                                    </dt>
                                                                                                                    <dd style="margin-left:  -0px;">
                                                                                                                                <span class='fo_cat_title'>
                                                                                                                                <?php 
        echo link_to_remote($x, array('url' => 'learning/showStudent?id=' . $opac->getId(), 'update' => 'content', 'script' => 'true', 'loading' => "showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue', 'title' => __('ColItem')));
        ?>
                                                                                                                                </span><br>
                                                                                                                                <span class="fo_cat_subtitle">
Ejemplo n.º 2
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = CatalogStudentPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setCatalogId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setStudentId($arr[$keys[2]]);
     }
 }
Ejemplo n.º 3
0
 public static function retrieveByPK($id, $catalog_id, $student_id, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $criteria = new Criteria();
     $criteria->add(CatalogStudentPeer::ID, $id);
     $criteria->add(CatalogStudentPeer::CATALOG_ID, $catalog_id);
     $criteria->add(CatalogStudentPeer::STUDENT_ID, $student_id);
     $v = CatalogStudentPeer::doSelect($criteria, $con);
     return !empty($v) ? $v[0] : null;
 }