Пример #1
0
 public function actionExport()
 {
     $checkids = EnvUtil::getRequest("checkids");
     $bgcheckArr = ResumeBgchecks::model()->fetchAll("FIND_IN_SET(checkid, '{$checkids}')");
     $fieldArr = array(Ibos::lang("Name"), Ibos::lang("Company name"), Ibos::lang("Position"), Ibos::lang("Entry time"), Ibos::lang("Departure time"), Ibos::lang("Details"));
     $str = implode(",", $fieldArr) . "\n";
     foreach ($bgcheckArr as $bgcheck) {
         $realname = ResumeDetail::model()->fetchRealnameByResumeid($bgcheck["resumeid"]);
         $company = $bgcheck["company"];
         $position = $bgcheck["position"];
         $entryTime = empty($bgcheck["entrytime"]) ? "" : date("Y-m-d", $bgcheck["entrytime"]);
         $quitTime = empty($bgcheck["quittime"]) ? "" : date("Y-m-d", $bgcheck["quittime"]);
         $detail = $bgcheck["detail"];
         $str .= $realname . "," . $company . "," . $position . "," . $entryTime . "," . $quitTime . "," . $detail . "\n";
     }
     $outputStr = iconv("utf-8", "gbk//ignore", $str);
     $filename = date("Y-m-d") . mt_rand(100, 999) . ".csv";
     FileUtil::exportCsv($filename, $outputStr);
 }
Пример #2
0
 public function actionExport()
 {
     $contactids = EnvUtil::getRequest("contactids");
     $contactArr = ResumeContact::model()->fetchAll("FIND_IN_SET(contactid, '{$contactids}')");
     $fieldArr = array(Ibos::lang("Name"), Ibos::lang("Contact date"), Ibos::lang("Contact staff"), Ibos::lang("Contact method"), Ibos::lang("Contact purpose"), Ibos::lang("Content"));
     $str = implode(",", $fieldArr) . "\n";
     foreach ($contactArr as $contact) {
         $realname = ResumeDetail::model()->fetchRealnameByResumeid($contact["resumeid"]);
         $input = User::model()->fetchRealnameByUid($contact["input"]);
         $inputtime = empty($contact["inputtime"]) ? "" : date("Y-m-d", $contact["inputtime"]);
         $method = $contact["contact"];
         $purpose = $contact["purpose"];
         $detail = $contact["detail"];
         $str .= $realname . "," . $inputtime . "," . $input . "," . $method . "," . $purpose . "," . $detail . "\n";
     }
     $outputStr = iconv("utf-8", "gbk//ignore", $str);
     $filename = date("Y-m-d") . mt_rand(100, 999) . ".csv";
     FileUtil::exportCsv($filename, $outputStr);
 }
Пример #3
0
 public function export()
 {
     $userDatas = $this->getUserData();
     $fieldArr = array(Ibos::lang("Real name"), Ibos::lang("Position"), Ibos::lang("Telephone"), Ibos::lang("Cell phone"), Ibos::lang("Email"), Ibos::lang("QQ"));
     $str = implode(",", $fieldArr) . "\n";
     foreach ($userDatas as $user) {
         $realname = $user["realname"];
         $posname = $user["posname"];
         $telephone = $user["telephone"];
         $mobile = $user["mobile"];
         $email = $user["email"];
         $qq = $user["qq"];
         $str .= $realname . "," . $posname . "," . $telephone . "," . $mobile . "," . $email . "," . $qq . "\n";
     }
     $outputStr = iconv("utf-8", "gbk//ignore", $str);
     $filename = date("Y-m-d") . mt_rand(100, 999) . ".csv";
     FileUtil::exportCsv($filename, $outputStr);
 }
Пример #4
0
 public function actionExport()
 {
     $interviews = EnvUtil::getRequest("interviews");
     $interviewArr = ResumeInterview::model()->fetchAll("FIND_IN_SET(interviewid, '{$interviews}')");
     $fieldArr = array(Ibos::lang("Name"), Ibos::lang("Interview time"), Ibos::lang("Interview people"), Ibos::lang("Interview types"), Ibos::lang("Interview process"));
     $str = implode(",", $fieldArr) . "\n";
     foreach ($interviewArr as $interview) {
         $realname = ResumeDetail::model()->fetchRealnameByResumeid($interview["resumeid"]);
         $time = empty($interview["interviewtime"]) ? "" : date("Y-m-d", $interview["interviewtime"]);
         $interviewer = User::model()->fetchRealnameByUid($interview["interviewer"]);
         $type = $interview["type"];
         $process = $interview["process"];
         $str .= $realname . "," . $time . "," . $interviewer . "," . $type . "," . $process . "\n";
     }
     $outputStr = iconv("utf-8", "gbk//ignore", $str);
     $filename = date("Y-m-d") . mt_rand(100, 999) . ".csv";
     FileUtil::exportCsv($filename, $outputStr);
 }