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


PHP FileData::getDepartment方法代码示例

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


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

示例1: header

     header('Location:error.php?ec=14');
     exit;
     //non-unique error
 }
 $filedata = new FileData($data_id, $pdo);
 // error check
 if (!$filedata->exists()) {
     header('Location:error.php?ec=2');
     exit;
 } else {
     $category = $filedata->getCategory();
     $realname = $filedata->getName();
     $description = $filedata->getDescription();
     $comment = $filedata->getComment();
     $owner_id = $filedata->getOwner();
     $department = $filedata->getDepartment();
     //CHM
     $table_name_query = "SELECT table_name FROM {$GLOBALS['CONFIG']['db_prefix']}udf WHERE field_type = '4'";
     $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);
开发者ID:watsonad,项目名称:opendocman,代码行数:31,代码来源:edit.php

示例2: VALUES

 $query = "INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}log (id, modified_on, modified_by, note, revision) VALUES('{$id}', NOW(), '" . addslashes($username) . "', '" . addslashes($_POST['note']) . "', 'current')";
 $result = mysql_query($query, $GLOBALS['connection']) or die("Error in query: {$query}. " . mysql_error());
 // update file status
 $query = "UPDATE {$GLOBALS['CONFIG']['db_prefix']}data SET status = '0', publishable='{$lpublishable}', realname='{$filename}' WHERE id='{$id}'";
 $result = mysql_query($query, $GLOBALS['connection']) or die("Error in query: {$query}. " . mysql_error());
 // rename and save file
 $newFileName = $id . '.dat';
 copy($_FILES['file']['tmp_name'], $GLOBALS['CONFIG']['dataDir'] . $newFileName);
 AccessLog::addLogEntry($id, 'I');
 /**
  * Send out email notifications to reviewers
  */
 $file_obj = new FileData($id, $GLOBALS['connection'], DB_NAME);
 $get_full_name = $user_obj->getFullName();
 $full_name = $get_full_name[0] . ' ' . $get_full_name[1];
 $department = $file_obj->getDepartment();
 $reviewer_obj = new Reviewer($id, $GLOBALS['connection'], DB_NAME);
 $reviewer_list = $reviewer_obj->getReviewersForDepartment($department);
 $date = date('Y-m-d H:i:s T');
 // Build email for general notices
 $mail_subject = msg('checkinpage_file_was_checked_in');
 $mail_body2 = msg('checkinpage_file_was_checked_in') . "\n\n";
 $mail_body2 .= msg('label_filename') . ':  ' . $file_obj->getName() . "\n\n";
 $mail_body2 .= msg('label_status') . ': ' . msg('addpage_new') . "\n\n";
 $mail_body2 .= msg('date') . ': ' . $date . "\n\n";
 $mail_body2 .= msg('addpage_uploader') . ': ' . $full_name . "\n\n";
 $mail_body2 .= msg('email_thank_you') . ',' . "\n\n";
 $mail_body2 .= msg('email_automated_document_messenger') . "\n\n";
 $mail_body2 .= $GLOBALS['CONFIG']['base_url'] . "\n\n";
 $email_obj = new Email();
 $email_obj->setFullName($full_name);
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:31,代码来源:check-in.php

示例3: explode

 $mail_headers = "From: " . $mail_from . PHP_EOL . PHP_EOL;
 $mail_headers .= "Content-Type: text/plain; charset=UTF-8" . PHP_EOL . PHP_EOL;
 if ($user_obj->isAdmin()) {
     $id_array = $user_obj->getAllRevieweeIds();
 } else {
     $id_array = $user_obj->getRevieweeIds();
 }
 $id_field = explode(' ', trim($checkbox));
 foreach ($id_field as $key => $value) {
     // Check to make sure the current file_id is in their list of reviewable ID's
     if (in_array($value, $id_array)) {
         $fileid = $value;
         $file_obj = new FileData($fileid, $pdo);
         $user_obj = new User($file_obj->getOwner(), $pdo);
         $mail_to = $user_obj->getEmailAddress();
         $dept_id = $file_obj->getDepartment();
         // Build email for author notification
         if (isset($_POST['send_to_users'][0]) && in_array('owner', $_POST['send_to_users'])) {
             // Lets unset this now so the new array will just be user_id's
             $_POST['send_to_users'] = array_slice($_POST['send_to_users'], 1);
             $mail_body1 = $comments . PHP_EOL . PHP_EOL;
             $mail_body1 .= msg('email_your_file_has_been_authorized') . PHP_EOL . PHP_EOL;
             $mail_body1 .= msg('label_filename') . ':  ' . $file_obj->getName() . PHP_EOL . PHP_EOL;
             $mail_body1 .= msg('label_status') . ': ' . msg('message_authorized') . PHP_EOL . PHP_EOL;
             $mail_body1 .= msg('date') . ': ' . $date . PHP_EOL . PHP_EOL;
             $mail_body1 .= msg('label_reviewer') . ': ' . $full_name . PHP_EOL . PHP_EOL;
             $mail_body1 .= msg('email_thank_you') . ',' . PHP_EOL . PHP_EOL;
             $mail_body1 .= msg('email_automated_document_messenger') . PHP_EOL . PHP_EOL;
             $mail_body1 .= $GLOBALS['CONFIG']['base_url'] . PHP_EOL . PHP_EOL;
             if ($GLOBALS['CONFIG']['demo'] == 'False') {
                 mail($mail_to, $mail_subject . " " . $file_obj->getName(), $mail_body1, $mail_headers);
开发者ID:PramodhKG,项目名称:dms,代码行数:31,代码来源:toBePublished.php


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