コード例 #1
0
 public function executeShow()
 {
     $userid = $this->getUser()->getAttribute('userid');
     $user = UserPeer::retrieveByPK($userid);
     $c = new Criteria();
     $c->add(AddressPeer::USER_ID, $user->getId());
     $c->add(AddressPeer::TYPE, 0);
     $this->addressh = AddressPeer::doSelectOne($c);
     $c->clear();
     $c->add(AddressPeer::USER_ID, $user->getId());
     $c->add(AddressPeer::TYPE, 1);
     $this->addressw = AddressPeer::doSelectOne($c);
     $c->clear();
     $c->add(AddressPeer::USER_ID, $user->getId());
     $c->add(AddressPeer::TYPE, 2);
     $this->addressp = AddressPeer::doSelectOne($c);
     $this->userid = $userid;
     //$this->address = AddressPeer::retrieveByPk($this->getRequestParameter('id'));
     //$this->forward404Unless($this->address);
     $c->clear();
     $c->add(UserchapterregionPeer::USER_ID, $userid);
     $this->ucrs = UserchapterregionPeer::doSelect($c);
     $regions = RegionPeer::doSelect(new Criteria());
     $regionlist = array();
     $regionlist[] = "Select a Region";
     foreach ($regions as $region) {
         $regionlist[$region->getId()] = $region->getName();
     }
     $this->regionlist = $regionlist;
 }
コード例 #2
0
 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(UserchapterregionPeer::ID, $pks, Criteria::IN);
         $objs = UserchapterregionPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
コード例 #3
0
 public function executeList()
 {
     $this->userchapterregions = UserchapterregionPeer::doSelect(new Criteria());
 }
コード例 #4
0
 public function getUserchapterregions($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseUserchapterregionPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collUserchapterregions === null) {
         if ($this->isNew()) {
             $this->collUserchapterregions = array();
         } else {
             $criteria->add(UserchapterregionPeer::CHAPTERREGION_ID, $this->getId());
             UserchapterregionPeer::addSelectColumns($criteria);
             $this->collUserchapterregions = UserchapterregionPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(UserchapterregionPeer::CHAPTERREGION_ID, $this->getId());
             UserchapterregionPeer::addSelectColumns($criteria);
             if (!isset($this->lastUserchapterregionCriteria) || !$this->lastUserchapterregionCriteria->equals($criteria)) {
                 $this->collUserchapterregions = UserchapterregionPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastUserchapterregionCriteria = $criteria;
     return $this->collUserchapterregions;
 }
コード例 #5
0
					<div class="srcol4"><?php 
        echo $rs->getGraduationyear();
        ?>
</div>
					<div class="srcol5"><?php 
        echo $rs->getBranchcode();
        ?>
</div>
					<div class="srcol6"><?php 
        echo $rs->getDegree()->getName();
        ?>
</div>
					<div class="srcol7"><?php 
        $c = new Criteria();
        $c->add(UserchapterregionPeer::USER_ID, $rs->getId());
        $ucrs = UserchapterregionPeer::doSelect($c);
        $chapterlist = '';
        foreach ($ucrs as $ucr) {
            if (!$chapterlist) {
                $chapterlist = $ucr->getChapterregion()->getChapter()->getName();
            } else {
                $chapterlist .= ', ' . $ucr->getChapterregion()->getChapter()->getName();
            }
        }
        echo $chapterlist;
        ?>
</div>
					
					<div class="srcol10">
						<?php 
        if ($rs->getEmail()) {