Beispiel #1
0
 public function createHTML($result = "")
 {
     $htmlNodeContent = "";
     $htmlNodeContent .= "<table class='ui-table ui-border' style='width: 1200px'>";
     $htmlNodeContent .= " <thead>\r\n                                <tr><th><p class='ui-txt-info'>活动id</p></th><th><p class='ui-txt-info'>活动标题</p></th><th><p class='ui-txt-info'>开始时间</p></th><th><p class='ui-txt-info'>截止时间</p></th><th><p class='ui-txt-info'>活动状态</p></th><th><p class='ui-txt-info'>操作</p></th></tr>\r\n                              </thead>";
     if (!empty($result)) {
         while ($row = mysql_fetch_assoc($result)) {
             $status = $row['task_status'];
             $taskStatus = $this->noToTaskStatus[$status];
             //语义化任务状态
             $taskId = $row['id'];
             //获取活动id
             $taskName = $row['task_name'];
             //获取活动名称
             $taskName_pingyin = $this->Pinyin($taskName, 1);
             //将任务名转化为拼音
             $htmlNodeContent .= "<tbody>\r\n                                        <tr><td>{$row['id']}</td><td>{$row['task_name']}</td><td>{$row['start_time']}</td><td>{$row['end_time']}</td><td>{$taskStatus}</td>\r\n                                        <td>\r\n                                        <div class='ui-row-flex ui-whitespace'>\r\n                                            <div class='ui-col ui-col'>\r\n                                                <button class='ui-btn-s'  id='task_regis_" . $taskId . "' name='" . $row['task_name'] . "' onclick='handleRegis(this.id,this.name)'>\r\n                                                    手工签到\r\n                                                </button>\r\n                                            </div>\r\n                                            <div class='ui-col ui-col'>\r\n                                                <button class='ui-btn-s' id='task_regis_" . $taskId . "' name='" . $row['task_name'] . "' onclick='seeDetails(this.id,this.name)'>\r\n                                                    查看详情\r\n                                                </button>\r\n                                            </div>\r\n                                            <div class='ui-col ui-col'>\r\n                                                <button class='ui-btn-s' id='task_regis_" . $taskId . "' name='" . $row['task_name'] . "' onclick='excelExport(this.id,this.name)'>\r\n                                                    导出\r\n                                                </button>\r\n                                            </div>\r\n                                            <div class='ui-col ui-col'>\r\n                                                <button class='ui-btn-s' id='task_regis_" . $taskId . "' onclick='dropTable(this.id)'>\r\n                                                    删除\r\n                                                </button>\r\n                                            </div>\r\n                                            <div class='ui-col ui-col'>\r\n                                                <button class='ui-btn-s' id='task_regis_" . $taskId . "' name='" . $row['task_name'] . "' onclick='showRegisStatus(this.id,this.name)'>\r\n                                                    实时状态\r\n                                                </button>\r\n                                            </div>\r\n                                            <div class='ui-col ui-col'>\r\n                                                <button class='ui-btn-s' id='task_regis_" . $taskId . "' name='" . $row['task_name'] . "' onclick='giftPicked(this.id,this.name)'>\r\n                                                    抽奖\r\n                                                </button>\r\n                                            </div>\r\n                                        </div>\r\n                                        </td></tr>\r\n                                     </tbody>";
         }
     }
     $htmlNodeContent .= "</table>";
     //释放结果,关闭链接
     if (!empty($result)) {
         parent::freeResult($result);
     }
     return $htmlNodeContent;
 }
Beispiel #2
0
 public function createHTML($result = "")
 {
     $htmlNodeContent = "";
     $htmlNodeContent .= "<table  class='ui-table ui-border' style='width: 1000px'>";
     // width='100%'  border=1 cellspacing=0 width='40%'
     $htmlNodeContent .= "<thead>\r\n                             <tr><th>姓名</th><th>工号</th><th>部门</th><th>性别</th>\r\n                             <th>状态</th></tr>\r\n                             </thead>";
     if (!empty($result)) {
         while ($row = mysql_fetch_assoc($result)) {
             $htmlNodeContent .= "<tr>";
             $htmlNodeContent .= "<td>\r\n                                         <div style='display: inline-block'>\r\n                                             <div class='ui-avatar'>\r\n                                             <span style=\"background-image:url({$row['avatar']})\"></span>\r\n                                             </div>\r\n                                             <div>\r\n                                             {$row['name']}\r\n                                             </div>\r\n                                         </div>\r\n                                     </td>";
             //$htmlNodeContent .= "<td>{$row['createTime']}</td>";
             $htmlNodeContent .= "<td>{$row['huaweiId']}</td>";
             $htmlNodeContent .= "<td>{$row['department1']}</td>";
             $htmlNodeContent .= "<td>{$row['gender']}</td>";
             $htmlNodeContent .= "<td>{$row['status']}</td>";
             //$htmlNodeContent .= "<td></td>";
             $htmlNodeContent .= "</tr>";
         }
     }
     $htmlNodeContent .= "</table>";
     //释放结果,关闭链接
     if (!empty($result)) {
         parent::freeResult($result);
     }
     return $htmlNodeContent;
 }
Beispiel #3
0
 public function createHTML($result = "")
 {
     $htmlNodeContent = "";
     $htmlNodeContent .= "<table class='ui-table ui-border' style='width: 1200px'>";
     $htmlNodeContent .= " <thead>\r\n                                <tr><th>姓名</th><th>工号</th><th>部门</th><th>性别</th>\r\n                                <th>状态</th><th>签到状态</th><th>签到时间</th><th>获奖情况</th></tr>\r\n                              </thead>";
     if (!empty($result)) {
         while ($row = mysql_fetch_assoc($result)) {
             $num = $row['regisStatus'];
             $zh_cn_Status = $this->noToRegisStatus[$num];
             $htmlNodeContent .= "<tr>";
             $htmlNodeContent .= "<td>\r\n                                         <div style='display: inline-block'>\r\n                                             <div class='ui-avatar'>\r\n                                             <span style=\"background-image:url({$row['avatar']})\"></span>\r\n                                             </div>\r\n                                             <div>\r\n                                             {$row['name']}\r\n                                             </div>\r\n                                         </div>\r\n                                     </td>";
             $htmlNodeContent .= "<td>{$row['huaweiId']}</td>";
             $htmlNodeContent .= "<td>{$row['department']}</td>";
             $htmlNodeContent .= "<td>{$row['gender']}</td>";
             $htmlNodeContent .= "<td>{$row['status']}</td>";
             $htmlNodeContent .= "<td>{$zh_cn_Status}</td>";
             $htmlNodeContent .= "<td>{$row['regisTime']}</td>";
             $htmlNodeContent .= "<td>{$row['lottery']}</td>";
             $htmlNodeContent .= "<td></td>";
             $htmlNodeContent .= "</tr>";
         }
     }
     $htmlNodeContent .= "</table>";
     //释放结果,关闭链接
     if (!empty($result)) {
         parent::freeResult($result);
     }
     return $htmlNodeContent;
 }