当前位置: 首页>>代码示例>>PHP>>正文


PHP EmployeePeer::doSelectOne方法代码示例

本文整理汇总了PHP中EmployeePeer::doSelectOne方法的典型用法代码示例。如果您正苦于以下问题:PHP EmployeePeer::doSelectOne方法的具体用法?PHP EmployeePeer::doSelectOne怎么用?PHP EmployeePeer::doSelectOne使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EmployeePeer的用法示例。


在下文中一共展示了EmployeePeer::doSelectOne方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getSpecial

 public function getSpecial()
 {
     $c = new Criteria();
     $cton1 = $c->getNewCriterion(EmployeePeer::STAFF_TYPE_ID, 13);
     $cton2 = $c->getNewCriterion(EmployeePeer::STAFF_TYPE_ID, 14);
     $cton1->addOr($cton2);
     $c->add($cton1);
     $special = EmployeePeer::doSelectOne($c);
     return $special;
 }
开发者ID:taryono,项目名称:school,代码行数:10,代码来源:Employee.php

示例2: date

                                      <?php 
$tanggal = date('Y-m-d');
echo DateToIndo($tanggal);
?>
<br />Guru Mata Pelajaran
                            </td>
	</tr>
                   <tr><td colspan="25" height="70px"></td></tr>
                   <tr>
                            <td></td>
                            <td style="text-align: left; font-size: 12px; font-weight: bold;">
                                    <?php 
$c = new Criteria();
$c->add(EmployeePeer::DEPARTMENT_ID, $course_schedule->getAcademicCalendar()->getDepartmentId());
$c->add(EmployeePeer::STAFF_TYPE_ID, 14);
$employee = EmployeePeer::doSelectOne($c);
echo $employee->getName() ? $employee->getName() : '-';
?>
                            </td><td colspan="26"></td>
                            <td style="text-align: left; font-size: 12px; font-weight: bold;" colspan="8">
                                     <?php 
$tutors = array();
foreach ($course_schedule->getCourseScheduleTutors() as $cr) {
    $tutors[] = $cr->getEmployee() ? $cr->getEmployee()->getName() : '-';
}
echo join("&nbsp;dan&nbsp;", $tutors);
?>
                            </td>
                   </tr>
        </table>
</center>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listDescAsCSVSuccess.php

示例3: getEmployee

 /**
  * Get the associated Employee object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Employee The associated Employee object.
  * @throws     PropelException
  */
 public function getEmployee(PropelPDO $con = null)
 {
     if ($this->aEmployee === null && $this->employee_id !== null) {
         $c = new Criteria(EmployeePeer::DATABASE_NAME);
         $c->add(EmployeePeer::ID, $this->employee_id);
         $this->aEmployee = EmployeePeer::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->aEmployee->addUsers($this);
         		 */
     }
     return $this->aEmployee;
 }
开发者ID:lejacome,项目名称:hospital-mgt,代码行数:23,代码来源:BaseUser.php

示例4: __

    ?>
</label><br />
                            	<input type="password" name="password" id="password" value=""/><br />
                            	 <input type=submit name=update value=<?php 
    echo __('Simpan');
    ?>
 style='cursor:pointer; width: 50px; background-color: #FFCC00; color:#000; font-weight: bold; margin-top:5px;' >
                            	</form>							
							<?php 
} elseif ($this->getContext()->getUser()->getAttribute('usertype', '', 'bo') == 'lector') {
    ?>
								<?php 
    $username = $this->getContext()->getUser()->getAttribute('username', '', 'bo');
    $c = new Criteria();
    $c->add(EmployeePeer::EMP_NO, $this->getContext()->getUser()->getAttribute('username_long', '', 'bo'));
    $user = EmployeePeer::doSelectOne($c);
    ?>
                            	<?php 
    #echo form_tag('user/updateLector')
    ?>
                            	<!--input type="hidden" value="<?php 
    #echo $user->getId()
    ?>
" name="id" id="id" />
                          		<label style="color:#000; font-weight: bold; text-align:left;"><?php 
    echo __('Username');
    ?>
</label><br />
								<input type="text" name="login" id="login" value="<?php 
    #echo $username
    ?>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:_user_detail.php

示例5: executeDoLogin

 public function executeDoLogin()
 {
     if ($this->hasRequestParameter('login_user') && $this->hasRequestParameter('login_password')) {
         // check if the user exists
         $c = new Criteria();
         $c->add(UserPeer::LOGIN, $this->getRequestParameter('login_user'));
         $user = UserPeer::doSelectOne($c);
         if ($user) {
             // check if the password is correct
             $password = $this->getRequestParameter('login_password');
             $crypted = sha1(sfConfig::get('app_salt') . $password);
             if ($crypted == $user->getPassword()) {
                 // sign in
                 $this->getContext()->getUser()->signIn($user);
                 // proceed to home page
                 $this->setTemplate('index');
                 return;
             }
         } else {
             $c = new Criteria();
             $c->add(EmployeePeer::EMP_NO, $this->getRequestParameter('login_user'));
             $user = EmployeePeer::doSelectOne($c);
             if ($user) {
                 // check if the password is correct
                 $password = $this->getRequestParameter('login_password');
                 $crypted = sha1(sfConfig::get('app_salt') . $password);
                 if ($crypted == $user->getPassword()) {
                     // sign in
                     $this->getContext()->getUser()->signInLector($user);
                     // proceed to home page
                     $this->setTemplate('index');
                     return;
                 }
             } else {
                 $username = $this->getRequestParameter('login_user');
                 $dept_name = substr($username, 4, 3);
                 $c = new Criteria();
                 #$c->add(VStudentLoginPeer::DEPARTMENT_NAME, $dept_name);
                 $c->add(VStudentLoginPeer::LOGIN, $username);
                 $user = VStudentLoginPeer::doSelectOne($c);
                 if ($user) {
                     // check if the password is correct
                     $password = $this->getRequestParameter('login_password');
                     $crypted = sha1(sfConfig::get('app_salt') . $password);
                     if ($crypted == $user->getPassword()) {
                         // sign in
                         $this->getContext()->getUser()->signInStudent($user);
                         // proceed to home page
                         $this->setTemplate('index');
                         return;
                     }
                 }
             }
         }
         // an error was found
         $this->getRequest()->setError('login_error_title', 'Login failed');
         $this->getRequest()->setError('login_error_msg', 'Your username or password are not correct. Please try again.');
         $this->getRequest()->setParameter('login_submit', null);
         return $this->forward('default', 'login');
     } else {
         $this->forward('default', 'login');
     }
 }
开发者ID:taryono,项目名称:school,代码行数:63,代码来源:actions.class.php

示例6: getServiceCoord

 public function getServiceCoord(PropelPDO $con = null)
 {
     if ($this->aServiceCoord === null && $this->service_coord_id !== null) {
         $c = new Criteria(EmployeePeer::DATABASE_NAME);
         $c->add(EmployeePeer::ID, $this->service_coord_id);
         $this->aServiceCoord = EmployeePeer::doSelectOne($c, $con);
     }
     return $this->aServiceCoord;
 }
开发者ID:anvaya,项目名称:nckids,代码行数:9,代码来源:Client.php


注:本文中的EmployeePeer::doSelectOne方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。