當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。