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


PHP role::get_selectable_roles方法代码示例

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


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

示例1: get_selectable_projects

 public static function get_selectable_projects($employee_id = 0, $date = '0000-00-00')
 {
     $project_array = array();
     $role_array = role::get_selectable_roles($employee_id, $date);
     // Receive array of available roles
     if (tep_not_null($role_array)) {
         $database = $_SESSION['database'];
         $project_query = 'select projects_id, projects_name, projects_description, projects_customers_contact_name, projects_customers_reference, projects_start_date, projects_end_date, projects_calculated_hours, customers_id from ' . TABLE_PROJECTS . ' where projects_id in (';
         // Walk through the array
         foreach ($role_array as $role) {
             if (substr($project_query, -1) != '(') {
                 $project_query .= ',';
             }
             $project_query .= $role['projects_id'];
         }
         $project_query .= ') order by projects_name';
         $project_query = $database->query($project_query);
         while ($project_result = $database->fetch_array($project_query)) {
             array_push($project_array, $project_result);
         }
     }
     return $project_array;
 }
开发者ID:BackupTheBerlios,项目名称:bitts-svn,代码行数:23,代码来源:project.php

示例2: tep_draw_form

}
?>
</form>
            </td>
          </tr>
          <tr>
            <td class="item_entry">
              <?php 
echo TEXT_ACTIVITY_ROLENAME;
?>
            </td>
            <td class="item_entry">
              <?php 
echo tep_draw_form('role_selection', tep_href_link(FILENAME_TIMEREGISTRATION)) . tep_create_parameters(array('action' => 'enter_data'), array('mPath', 'period', 'sort_order', 'selected_date', 'projects_id', 'activity_id'), 'hidden_field');
if ($_POST['action'] == 'select_role' || $_POST['action'] == 'enter_data' || $_POST['action'] == 'save_data') {
    echo tep_html_select('roles_id', tep_get_partial_array(role::get_selectable_roles($_SESSION['employee']->id, tep_strftime('%Y-%m-%d', $_POST['selected_date']), $_POST['projects_id']), 'roles_id', 'roles_name'), TRUE, $_POST['roles_id']);
} else {
    echo tep_html_select('roles_id', array(), FALSE);
}
?>
</form>
            </td>
          </tr>
          <?php 
if ($_POST['action'] == 'enter_data' || $_POST['action'] == 'save_data') {
    echo tep_draw_form('activity_entry', tep_href_link(FILENAME_TIMEREGISTRATION)) . tep_create_parameters(array('action' => 'save_data'), array('mPath', 'period', 'sort_order', 'selected_date', 'projects_id', 'roles_id', 'activity_id', 'error_level_history', 'previous_activity_amount', 'original_activity_amount'), 'hidden_field');
}
?>
          <tr>
            <td class="item_entry">
              <?php 
开发者ID:BackupTheBerlios,项目名称:bitts-svn,代码行数:31,代码来源:activity_entry.php


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