本文整理汇总了PHP中Staff类的典型用法代码示例。如果您正苦于以下问题:PHP Staff类的具体用法?PHP Staff怎么用?PHP Staff使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Staff类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: accessCheck
public function accessCheck()
{
$da = $this->get("we_data_access");
$da_im = $this->get('we_data_access_im');
$request = $this->getRequest();
//访问权限校验
$api = new ApiController();
$api->setContainer($this->container);
$isWeFaFaDomain = $api->checkWWWDomain();
if (!$isWeFaFaDomain) {
$token = $api->checkAccessToken($request, $da);
if (!$token) {
$re = array("returncode" => "9999");
$re["code"] = "err0105";
$re["msg"] = "参数Appid或Openid或Access_token未指定或无效.";
return $re;
}
}
$openid = $request->get("openid");
$staffinfo = new Staff($da, $da_im, $openid, $this->get("logger"), $this->container);
$staffdata = $staffinfo->getInfo();
if (empty($staffdata)) {
return Utils::WrapResultError("无效操作帐号");
}
return Utils::WrapResultOk($staffinfo);
}
开发者ID:3116246,项目名称:haolinju,代码行数:26,代码来源:ApiConvInfoController.php
示例2: daftarPekerjaPost2
public function daftarPekerjaPost2()
{
if (Request::ajax()) {
$data = Input::all();
$noPekerja_ = 10000;
$noPekerja = DB::table('staff')->where('noPekerja', '>=', 10000)->orderBy('noPekerja', 'desc')->first();
// dd($noPekerja);
if (isset($noPekerja)) {
$noPekerja_ = $noPekerja->noPekerja + 1;
}
// dd($noPekerja_);
$staff = new Staff();
$staff->noPekerja = $noPekerja_;
$staff->nama = $data['nama'];
$staff->noKP = $data['noKP'];
$staff->jawatan = $data['jawatan'];
$staff->penempatan = $data['penempatan'];
$staff->bahagian = $data['bahagian'];
$staff->cawangan = $data['cawangan'];
$staff->noPhone = $data['noPhone'];
$staff->status = $data['status'];
$staff->catatan = $data['catatan'];
if ($staff->save()) {
return $noPekerja_;
} else {
return $noPekerja_;
}
}
}
开发者ID:suhairi,项目名称:e-direktori,代码行数:29,代码来源:DaftarController.php
示例3: testCreatePair
function testCreatePair()
{
$staff_1 = new Staff();
$staff_1->set(array('first_name' => 'First', 'last_name' => 'User'));
$staff_1->save();
$staff_2 = new Staff();
$staff_2->set(array('first_name' => 'Second', 'last_name' => 'User'));
$staff_2->save();
$h = new Hour();
$h->set(array('hours' => 6, 'staff_id' => $staff_1->id, 'pair_id' => $staff_2->id));
$h->updateOrCreateWithPair();
$this->assertTrue($h->id, 'should have an id');
$this->assertTrue($h->get('pair_hour_id'), 'should have a pair hour id');
$h2 = $h->getPairHour();
$this->assertIsA($h2, 'Hour');
$this->assertTrue($h2->id, 'should have an hour id');
$this->assertEqual($h2->get('hours'), 6);
$h->set(array('hours' => 7));
$h->updateOrCreateWithPair();
$h3 = $h->getPairHour();
$this->assertEqual($h2->id, $h3->id);
$this->assertEqual($h3->get('hours'), 7);
$this->assertEqual($h3->getPairName(), $staff_1->getName());
$this->assertEqual($h->getPairName(), $staff_2->getName());
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:25,代码来源:hour_tests.php
示例4: approve
function approve($id)
{
if ($_POST) {
$rs = new Staff($id);
$rs->from_array($_POST);
$rs->save();
}
}
开发者ID:unisexx,项目名称:imac,代码行数:8,代码来源:staffs.php
示例5: list_drop
function list_drop()
{
$staff = new Staff();
$staff->get();
foreach ($staff as $row) {
$data[''] = '[ Staffs ]';
$data[$row->staff_id] = $row->staff_name;
}
return $data;
}
开发者ID:anggadjava,项目名称:payroll,代码行数:10,代码来源:staff.php
示例6: index
public function index()
{
$staff = new Staff();
$data['q'] = $this->input->get('q');
$data['title'] = 'Payroll';
$data['results'] = $data['q'] == '' ? '' : 'Search result for "' . $this->input->get('q') . '"';
if ($data['q'] != '') {
$rs = $staff->or_like('staff_name', '%' . $data['q'] . '%')->or_like('staff_cabang', '%' . $data['q'] . '%')->or_like('staff_departement', '%' . $data['q'] . '%')->or_like('staff_jabatan', '%' . $data['q'] . '%');
}
$data['search_list'] = $staff->get();
$this->load->view('searches', $data);
}
开发者ID:anggadjava,项目名称:payroll,代码行数:12,代码来源:searches.php
示例7: find_by_page
function find_by_page($page = 1)
{
$limit = get_config('staffs.per_page');
$offset = ($page - 1) * $limit;
$staffs = Staff::find('all', array('order' => 'id desc', 'limit' => $limit, 'offset' => $offset));
return $staffs;
}
开发者ID:saintyk,项目名称:yndl_2,代码行数:7,代码来源:Staff.php
示例8: getTeamLead
function getTeamLead()
{
if (!$this->lead && $this->getLeadId()) {
$this->lead = Staff::lookup($this->getLeadId());
}
return $this->lead;
}
开发者ID:nicolap,项目名称:osTicket-1.7,代码行数:7,代码来源:class.team.php
示例9: kemaskiniStaff
public function kemaskiniStaff()
{
if (Request::ajax()) {
$data = Input::all();
$noPekerja = $data['noPekerja'];
$staff = Staff::find($noPekerja);
$staff->nama = $data['nama'];
$staff->noKP = $data['noKP'];
$staff->jawatan = $data['jawatan'];
$staff->penempatan = $data['penempatan'];
$staff->bahagian = $data['bahagian'];
$staff->cawangan = $data['cawangan'];
$staff->sambungan = $data['sambungan'];
$staff->faks = $data['faks'];
$staff->speedDial = $data['speedDial'];
$staff->status = $data['status'];
$staff->catatan = $data['catatan'];
if ($noPekerja == '3374') {
$staff->noPhone .= '.';
$staff->catatan = '';
$staff->jawatan = 'PENOLONG PEGAWAI TEKNOLOGI MAKLUMAT (F29)';
$staff->noKP = '**013002****';
$staff->speedDial = '000';
} else {
$staff->noPhone = $data['noTel'];
}
if ($staff->save()) {
return 'Save Succeeded';
} else {
return 'Failed to save';
}
}
}
开发者ID:suhairi,项目名称:e-direktori,代码行数:33,代码来源:KemaskiniController.php
示例10: GetStaff
public static function GetStaff()
{
if (!self::Is_Set("sid") || !self::Is_Set("secret")) {
return null;
}
return Staff::Load(self::GetStaffID());
}
开发者ID:omusico,项目名称:Xion,代码行数:7,代码来源:session.class.php
示例11: getStaff
function getStaff()
{
if (!isset($this->_staff) && $this->staff_id) {
$this->_staff = Staff::lookup($this->staff_id);
}
return $this->_staff;
}
开发者ID:ed00m,项目名称:osTicket-1.8,代码行数:7,代码来源:class.note.php
示例12: carian2
public function carian2($carian)
{
if (Request::ajax()) {
if ($carian != '') {
$users = Staff::where('nama', 'like', '%' . $carian . '%')->get();
$count = 1;
$output = '<table class="table table-striped table-bordered responsive">
<thead>
<tr>
<th>Bil</th>
<th>Nama</th>
<th>Sambungan</th>
<th>Speed Dial</th>
<th>Jawatan</th>
</tr>
</thead>
<tbody>';
foreach ($users as $user) {
$kemaskini = URL::route('staff-kemaskini') . '/' . $user->noPekerja;
$output .= '<tr>
<td>' . $count++ . '</td>
<td class="center"><b>' . $user->nama . '</b></td>
<td class="center"><b>' . $user->sambungan . '</b></td>';
$speedDial = '';
if (strlen($user->speedDial) < 4) {
$speedDial = '# ' . $user->speedDial;
} else {
$speedDial = $user->speedDial;
}
$output .= ' <td class="center"><b>' . $speedDial . '</b></td>
<td class="center"><b>' . $user->jawatan . '</b></td>
</tr>';
}
$output .= ' </tbody>
</table>';
if ($users->count() == 0) {
$output = '<table class="table table-striped table-bordered responsive">
<thead>
<tr>
<th>Bil</th>
<th>Nama</th>
<th>No Telefon</th>
<th>Speed Dial</th>
<th>No Faks</th>
<th>Alamat</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="6"><font color="red">Tiada Maklumat</font></td>
</tr>
</tbody>
</table>';
}
return $output;
} else {
return '';
}
}
}
开发者ID:suhairi,项目名称:e-direktori,代码行数:60,代码来源:HomeController.php
示例13: configure
public function configure()
{
$this->unsetTimestampable();
if (!$this->getCurrentUser()->isSuperAdmin()) {
$this->setDefault('staff_id', Staff::loggedIn());
}
}
开发者ID:nidhhoggr,项目名称:Shipment-Tracker,代码行数:7,代码来源:ShippingTransactionForm.class.php
示例14: getValidTimeLogTypes
public function getValidTimeLogTypes()
{
$staff_id = Staff::loggedInId();
$table = Doctrine_Core::getTable('TimeLogType');
$tlt = $this->getLastTimeLogTypeByStaffId($staff_id);
$ci = $table->getClockInById($tlt);
return $table->getByClockIn($ci);
}
开发者ID:nidhhoggr,项目名称:supra,代码行数:8,代码来源:TimeLogTable.class.php
示例15: AllStaff
public function AllStaff()
{
$params = $this->getRequest()->params();
$teamURL = $params['team'];
$teamURL = strtolower(str_replace('_', ' ', $teamURL));
$staff = Staff::get()->filter('Team.Title', $teamURL);
return $staff;
}
开发者ID:jakedaleweb,项目名称:AtomCodeChallenge,代码行数:8,代码来源:StaffHolderPage.php
示例16: configure
public function configure()
{
$params = $this->getOption('params');
$this->unsetTimeStampable();
$this->setWidget('staff_id', new sfWidgetFormInputHidden());
$this->setDefault('staff_id', Staff::loggedInId());
$this->setDefault('task_id', $params['task_id']);
}
开发者ID:nidhhoggr,项目名称:supra,代码行数:8,代码来源:TaskCommentForm.class.php
示例17: executeIndex
/**
* Executes index action
*
* @param sfRequest $request A request object
*/
public function executeIndex(sfWebRequest $request)
{
if ($this->getUser()->isStaff()) {
$this->staff = Staff::loggedIn();
} else {
$this->client = Client::loggedIn();
}
}
开发者ID:nidhhoggr,项目名称:supra,代码行数:13,代码来源:actions.class.php
示例18: sign_up
function sign_up()
{
// Staffs
$staff = new Staff();
$list_staff = $staff->list_drop();
$staff_selected = '';
$data['form_action'] = '';
$data['staff_id'] = form_dropdown('staff_id', $list_staff, $staff_selected);
// Role
$role = new Role();
$list_role = $role->list_drop();
$role_selected = '';
$data['role_id'] = form_dropdown('role_id', $list_role, $role_selected);
$data['username'] = array('name' => 'username', 'placeholder' => 'Username', 'class' => 'input-block-level');
$data['password'] = array('name' => 'password', 'placeholder' => 'password', 'class' => 'input-block-level');
$data['btn_sign_up'] = array('name' => 'btn_sign_up', 'value' => 'Sign Up', 'class' => 'btn btn-primary btn-large');
$this->load->view('users/sign_up', $data);
}
开发者ID:anggadjava,项目名称:payroll,代码行数:18,代码来源:users.php
示例19: actionIndex
public function actionIndex()
{
// $this->render('index', array(
// 'staff1' => $this->staff1,
// 'staff2' => $this->staff2,
// 'staff3' => $this->staff3
// ));
$staff_member = Staff::model()->find('id=:id', array(':id' => 1));
$this->render('index', array('staff member' => $staff_member));
}
开发者ID:rajat19,项目名称:yii,代码行数:10,代码来源:StaffController.php
示例20: staff
public function staff($id)
{
$staff = Staff::find($id);
if ($staff->delete()) {
Session::flash('success', 'Staff Berjaya dihapus.');
} else {
Session::flash('fail', 'Staff gagal dihapus');
}
// return Session::get('success');
return Redirect::to('admin/carian/staff');
}
开发者ID:suhairi,项目名称:e-direktori,代码行数:11,代码来源:DeleteController.php
注:本文中的Staff类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论