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


PHP Country::GetStuArrayByCountry方法代码示例

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


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

示例1: exportAllToFile


//.........这里部分代码省略.........
     $stu = Student::where('stu_type', '休学')->get();
     $data = array();
     $num = 1;
     foreach ($stu as $item) {
         $data[$num - 1][0] = $num;
         $data[$num - 1][1] = $item['type'];
         $data[$num - 1][2] = $item['nationality'];
         $data[$num - 1][3] = $item['id'];
         $data[$num - 1][4] = $item['name_cn'];
         $data[$num - 1][5] = $item['name_en'];
         $data[$num - 1][6] = $item['csc_no'];
         $data[$num - 1][7] = $item['passport_id'];
         $data[$num - 1][8] = $item['gender'];
         $data[$num - 1][9] = $item['birthday'];
         $data[$num - 1][10] = $item['school'];
         $data[$num - 1][11] = $item['major'];
         $data[$num - 1][12] = $item['admission_date'];
         $data[$num - 1][13] = $item['old_class'];
         $data[$num - 1][14] = $item['new_class'];
         $data[$num - 1][15] = $item['suspend_date'];
         $data[$num - 1][16] = $item['tutor'];
         $data[$num - 1][17] = $item['suspend_note'];
         $data[$num - 1][18] = $item['suspend_note1'];
         $num++;
     }
     $objPHPExcel->getActiveSheet()->fromArray($data, NULL, 'A2');
     //self::setMyStyle($objPHPExcel, 2, 18, $num);
     $myWorkSheet = new PHPExcel_Worksheet($objPHPExcel, $date . '国别统计');
     $objPHPExcel->addSheet($myWorkSheet);
     $objPHPExcel->setActiveSheetIndex(3);
     //self::setMyStyle($objPHPExcel, 3, 12, 0);
     $data = array('序号', '洲别', '国别', '本科', '硕研', '博研', '语言生', '普进', '高进', '人数小计', '男生', '女生');
     $objPHPExcel->getActiveSheet()->fromArray($data, NULL, 'A1');
     $data = Country::GetStuArrayByCountry();
     $objPHPExcel->getActiveSheet()->fromArray($data, NULL, 'A2');
     $myWorkSheet = new PHPExcel_Worksheet($objPHPExcel, $date . '毕业结业名单');
     $objPHPExcel->addSheet($myWorkSheet);
     $objPHPExcel->setActiveSheetIndex(4);
     $data = array('序号', '类别', '国籍', '学号', '中文姓名', '英文姓名', 'CSC登记号', '护照号码', '性别', '出生日期', '学院', '专业', '入学日期', '毕业日期', '发证日期', '所获证书', '毕业证书号码', '学位证书号码', '进修证书号码', '学习证书号码', '联系地址', '导师', '备注');
     $objPHPExcel->getActiveSheet()->fromArray($data, NULL, 'A1');
     $stu = Student::where('stu_type', '毕业结业')->get();
     $data = array();
     $num = 1;
     foreach ($stu as $item) {
         $data[$num - 1][0] = $num;
         $data[$num - 1][1] = $item['type'];
         $data[$num - 1][2] = $item['nationality'];
         $data[$num - 1][3] = $item['id'];
         $data[$num - 1][4] = $item['name_cn'];
         $data[$num - 1][5] = $item['name_en'];
         $data[$num - 1][6] = $item['csc_no'];
         $data[$num - 1][7] = $item['passport_id'];
         $data[$num - 1][8] = $item['gender'];
         $data[$num - 1][9] = $item['birthday'];
         $data[$num - 1][10] = $item['school'];
         $data[$num - 1][11] = $item['major'];
         $data[$num - 1][12] = $item['admission_date'];
         $data[$num - 1][13] = $item['graduate_date'];
         $data[$num - 1][14] = $item['certificate_date'];
         $data[$num - 1][15] = $item['certificate_type'];
         $data[$num - 1][16] = $item['graduation_certificate'];
         $data[$num - 1][17] = $item['degree_certificate'];
         $data[$num - 1][18] = $item['further_certificate'];
         $data[$num - 1][19] = $item['learn_certificate'];
         $data[$num - 1][20] = $item['graduated_address'];
         $data[$num - 1][21] = $item['tutor'];
开发者ID:ChenPeiyuan,项目名称:student-infomation-manager,代码行数:67,代码来源:PHPExcelController.php


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