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


PHP Department::getAllDepartments方法代码示例

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


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

示例1: array_push

     }
     array_push($departments_array, $avail_department);
 }
 $avail_categories = Category::getAllCategories($pdo);
 $cats_array = array();
 foreach ($avail_categories as $avail_category) {
     array_push($cats_array, $avail_category);
 }
 //////Populate department perm list/////////////////
 $dept_perms_array = array();
 foreach ($departments_array as $dept) {
     $avail_dept_perms['name'] = $dept['name'];
     $avail_dept_perms['id'] = $dept['id'];
     array_push($dept_perms_array, $avail_dept_perms);
 }
 $allDepartments = Department::getAllDepartments($pdo);
 $GLOBALS['smarty']->assign('allDepartments', $allDepartments);
 $GLOBALS['smarty']->assign('current_user_dept', $current_user_dept);
 $GLOBALS['smarty']->assign('t_name', $t_name);
 $GLOBALS['smarty']->assign('is_admin', $user_obj->isAdmin());
 $GLOBALS['smarty']->assign('avail_users', $users_array);
 $GLOBALS['smarty']->assign('avail_depts', $departments_array);
 $GLOBALS['smarty']->assign('cats_array', $cats_array);
 $GLOBALS['smarty']->assign('dept_perms_array', $dept_perms_array);
 $GLOBALS['smarty']->assign('user_id', $_SESSION['uid']);
 $GLOBALS['smarty']->assign('db_prefix', $GLOBALS['CONFIG']['db_prefix']);
 display_smarty_template('add.tpl');
 udf_add_file_form();
 // Call the plugin API
 callPluginMethod('onBeforeAdd');
 display_smarty_template('_add_footer.tpl');
开发者ID:PramodhKG,项目名称:dms,代码行数:31,代码来源:add.php

示例2: mysql_query

 //CHM
 $query = "SELECT table_name FROM {$GLOBALS['CONFIG']['db_prefix']}udf WHERE field_type = '4'";
 $result = mysql_query($query) or die("Error in query163: {$query}. " . mysql_error());
 $num_rows = mysql_num_rows($result);
 $t_name = array();
 $i = 0;
 while ($data = mysql_fetch_array($result)) {
     $explode_v = explode('_', $data['table_name']);
     $t_name = $explode_v[2];
     $i++;
 }
 // For the User dropdown
 $avail_users = $user_perms_obj->user_obj->getAllUsers();
 // We need to set a form value for the current department so that
 // it can be pre-selected on the form
 $avail_departments = Department::getAllDepartments();
 $avail_categories = Category::getAllCategories();
 $cats_array = array();
 foreach ($avail_categories as $avail_category) {
     array_push($cats_array, $avail_category);
 }
 //////Populate department perm list/////////////////
 $dept_perms_array = array();
 foreach ($avail_departments as $dept) {
     $avail_dept_perms['name'] = $dept['name'];
     $avail_dept_perms['id'] = $dept['id'];
     $avail_dept_perms['rights'] = $filedata->getDeptRights($dept['id']);
     array_push($dept_perms_array, $avail_dept_perms);
 }
 //////Populate users perm list/////////////////
 $user_perms_array = array();
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:31,代码来源:edit.php

示例3: array

 $table_name_stmt = $pdo->prepare($table_name_query);
 $table_name_stmt->execute();
 $result = $table_name_stmt->fetchAll();
 $num_rows = $table_name_stmt->rowCount();
 $t_name = array();
 $i = 0;
 foreach ($result as $data) {
     $explode_v = explode('_', $data['table_name']);
     $t_name = $explode_v[2];
     $i++;
 }
 // For the User dropdown
 $avail_users = $user_perms_obj->user_obj->getAllUsers($pdo);
 // We need to set a form value for the current department so that
 // it can be pre-selected on the form
 $avail_departments = Department::getAllDepartments($pdo);
 $avail_categories = Category::getAllCategories($pdo);
 $cats_array = array();
 foreach ($avail_categories as $avail_category) {
     array_push($cats_array, $avail_category);
 }
 //////Populate department perm list/////////////////
 $dept_perms_array = array();
 foreach ($avail_departments as $dept) {
     $avail_dept_perms['name'] = $dept['name'];
     $avail_dept_perms['id'] = $dept['id'];
     $avail_dept_perms['rights'] = $filedata->getDeptRights($dept['id']);
     array_push($dept_perms_array, $avail_dept_perms);
 }
 //////Populate users perm list/////////////////
 $user_perms_array = array();
开发者ID:watsonad,项目名称:opendocman,代码行数:31,代码来源:edit.php

示例4: array_push

     }
     array_push($depts_array, $avail_department);
 }
 $avail_categories = Category::getAllCategories();
 $cats_array = array();
 foreach ($avail_categories as $avail_category) {
     array_push($cats_array, $avail_category);
 }
 //////Populate department perm list/////////////////
 $dept_perms_array = array();
 foreach ($depts_array as $dept) {
     $avail_dept_perms['name'] = $dept['name'];
     $avail_dept_perms['id'] = $dept['id'];
     array_push($dept_perms_array, $avail_dept_perms);
 }
 $allDepartments = Department::getAllDepartments();
 $GLOBALS['smarty']->assign('allDepartments', $allDepartments);
 $GLOBALS['smarty']->assign('current_user_dept', $current_user_dept);
 $GLOBALS['smarty']->assign('t_name', $t_name);
 $GLOBALS['smarty']->assign('is_admin', $user_obj->isAdmin());
 $GLOBALS['smarty']->assign('avail_users', $users_array);
 $GLOBALS['smarty']->assign('avail_depts', $depts_array);
 $GLOBALS['smarty']->assign('cats_array', $cats_array);
 $GLOBALS['smarty']->assign('dept_perms_array', $dept_perms_array);
 $GLOBALS['smarty']->assign('user_id', $_SESSION['uid']);
 $GLOBALS['smarty']->assign('db_prefix', $GLOBALS['CONFIG']['db_prefix']);
 display_smarty_template('add.tpl');
 // Call the plugin API
 callPluginMethod('onBeforeAdd');
 udf_add_file_form();
 display_smarty_template('_add_footer.tpl');
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:31,代码来源:add.php


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