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


PHP sapp_Global::_getHostBaseURL方法代码示例

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


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

示例1: login

 /**
  * Check if a username is a Ldap user
  *
  * @param string $username
  * @return boolean
  */
 public function login($postarray)
 {
     if (isset($postarray['employeeid']) && $postarray['employeeid'] != '' && isset($postarray['password']) && $postarray['password'] != '') {
         $result = array();
         $employeeid = $postarray['employeeid'];
         $password = md5($postarray['password']);
         $check = $this->isActiveUser($employeeid, $password);
         if (!empty($check) && $check[0]['count'] == 1) {
             $result = $this->getUserObject($employeeid, $password);
             //$uploadpath = array('imagepath' => USER_UPLOAD_PATH.'/'.$result[0]['profileimg']);
             $uploadpath = array('imagepath' => sapp_Global::_getHostBaseURL() . "public/uploads/profile/" . $result[0]['profileimg']);
             $resultarray = array_merge($result[0], $uploadpath);
             $data = array('status' => '1', 'message' => 'Success', 'result' => $resultarray);
         } else {
             $userStatusArr = $this->getActiveStatus($employeeid, $password);
             if (!empty($userStatusArr)) {
                 $userStatus = $userStatusArr[0]['status'];
                 $islockaccount = $userStatusArr[0]['isaccountlock'];
                 if ($userStatus == 0) {
                     $data = array('status' => '0', 'message' => 'Login failed. Employee has been inactivated from the organization.', 'result' => '');
                 } else {
                     if ($userStatus == 2) {
                         $data = array('status' => '0', 'message' => 'Login failed. Employee has resigned from the organization.', 'result' => '');
                     } else {
                         if ($userStatus == 3) {
                             $data = array('status' => '0', 'message' => 'Login failed. Employee has left the organization.', 'result' => '');
                         } else {
                             if ($userStatus == 4) {
                                 $data = array('status' => '0', 'message' => 'Login failed. Employee has been suspended from the organization.', 'result' => '');
                             } else {
                                 if ($userStatus == 5) {
                                     $data = array('message' => 'Login failed. Employee deleted.', 'result' => '');
                                 } else {
                                     if ($islockaccount == 1) {
                                         $data = array('status' => '0', 'message' => 'Login failed. Employee has been locked.', 'result' => '');
                                     }
                                 }
                             }
                         }
                     }
                 }
             } else {
                 $data = array('status' => '0', 'message' => 'Invalid credentials given', 'result' => '');
             }
         }
     } else {
         if ($postarray['employeeid'] == '') {
             $data = array('status' => '0', 'message' => 'Employee Id cannot be empty.', 'result' => $result);
         } else {
             if ($postarray['password'] == '') {
                 $data = array('status' => '0', 'message' => 'Password cannot be empty.', 'result' => $result);
             }
         }
     }
     //echo "<pre>";print_r($data);exit;
     return $data;
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:63,代码来源:Login.php

示例2: myteam

 public function myteam($params_arr)
 {
     $result = array();
     $status = 0;
     $message = "No data found.";
     $add_flag = 'No';
     $page_cnt = 1;
     if (isset($params_arr['role_id']) && $params_arr['role_id'] != '' && isset($params_arr['group_id']) && $params_arr['group_id'] != '') {
         $role_id = $params_arr['role_id'];
         $group_id = $params_arr['group_id'];
         $page_no = 1;
         $per_page = PERPAGE;
         if (isset($params_arr['page_no']) && $params_arr['page_no'] != '') {
             $page_no = $params_arr['page_no'];
         }
         if (isset($params_arr['per_page']) && $params_arr['per_page'] != '') {
             $per_page = $params_arr['per_page'];
         }
         $privilege_flag = sapp_Global::_check_menu_access(MYEMPLOYEES, $group_id, $role_id);
         if ($privilege_flag == 'Yes') {
             $emp_model = new Services_Model_Employee();
             $total_data = $emp_model->getmyemplist($page_no, $per_page, $params_arr['userid']);
             $emp_data = $total_data['rows'];
             if (!empty($emp_data) && count($emp_data) > 0) {
                 $page_cnt = $total_data['page_cnt'];
                 foreach ($emp_data as $edata) {
                     $edata['date_of_joining'] = sapp_Global::change_date($edata['date_of_joining'], "view");
                     $edata['profileimg'] = sapp_Global::_getHostBaseURL() . "public/uploads/profile/" . $edata['profileimg'];
                     $result[] = $edata;
                 }
                 $message = "success";
                 $status = 1;
             }
             //$add_flag = sapp_Global::_checkprivileges(EMPLOYEE,$group_id,$role_id,"add");
         }
     }
     //echo "<pre>";print_r($result);exit;
     return array('status' => $status, 'message' => $message, 'page_cnt' => $page_cnt, 'result' => $result);
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:39,代码来源:IndexController.php


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