assign("page", $page); $smarty->assign("page_code", "3"); /**------------------------------------------------------------------------------------------------- メイン処理 --------------------------------------------------------------------------------------------------*/ $arg_map = ""; $arg_map["recruitment_category_code"] = 20; $sql= getSqlSelectRecruitment($arg_map); $temp_recruitment_list = $dbFunctions->getListIncludeMap($sql); for($cnt = 0; $cnt < count($temp_recruitment_list); $cnt++) { $temp_map = $temp_recruitment_list[$cnt]; $check = $temp_map["text1"].$temp_map["text2"].$temp_map["text3"].$temp_map["text4"].$temp_map["text5"]. $temp_map["text6"].$temp_map["text7"].$temp_map["text8"].$temp_map["text9"].$temp_map["text10"]. $temp_map["text11"].$temp_map["text12"].$temp_map["text13"].$temp_map["text14"].$temp_map["text15"]. $temp_map["text16"].$temp_map["text17"].$temp_map["text18"].$temp_map["text19"].$temp_map["text20"]. $temp_map["text21"].$temp_map["text22"].$temp_map["text23"].$temp_map["text24"]; if (strlen($check)) { $recruitment_list[] = $temp_map; } } $smarty->assign("recruitment_list", $recruitment_list); $smarty->assign("count", count($recruitment_list)); $smarty->display(TEMPLATE_DIR."/career.tpl"); exit(); /**------------------------------------------------------------------------------------------------- SQL文 --------------------------------------------------------------------------------------------------*/ function getSqlSelectRecruitment($arg_map) { $sql = ""; $sql.= "SELECT "; $sql.= " recruitment_id, "; $sql.= " recruitment_category_code, "; $sql.= " title1, "; $sql.= " title2, "; $sql.= " title3, "; $sql.= " title4, "; $sql.= " title5, "; $sql.= " title6, "; $sql.= " title7, "; $sql.= " title8, "; $sql.= " title9, "; $sql.= " title10, "; $sql.= " title11, "; $sql.= " title12, "; $sql.= " title13, "; $sql.= " title14, "; $sql.= " title15, "; $sql.= " title16, "; $sql.= " title17, "; $sql.= " title18, "; $sql.= " title19, "; $sql.= " title20, "; $sql.= " title21, "; $sql.= " title22, "; $sql.= " title23, "; $sql.= " title24, "; $sql.= " text1, "; $sql.= " text2, "; $sql.= " text3, "; $sql.= " text4, "; $sql.= " text5, "; $sql.= " text6, "; $sql.= " text7, "; $sql.= " text8, "; $sql.= " text9, "; $sql.= " text10, "; $sql.= " text11, "; $sql.= " text12, "; $sql.= " text13, "; $sql.= " text14, "; $sql.= " text15, "; $sql.= " text16, "; $sql.= " text17, "; $sql.= " text18, "; $sql.= " text19, "; $sql.= " text20, "; $sql.= " text21, "; $sql.= " text22, "; $sql.= " text23, "; $sql.= " text24, "; $sql.= " stock_flag, "; $sql.= " display_flag, "; $sql.= " delete_flag, "; $sql.= " insert_datetime, "; $sql.= " update_datetime "; $sql.= "FROM "; $sql.= " recruitment "; $sql.= "WHERE "; $sql.= " recruitment_category_code = '".mysql_escape_string($arg_map["recruitment_category_code"])."' AND "; $sql.= " display_flag = '1' AND"; $sql.= " delete_flag = '0' "; $sql.= "ORDER BY recruitment_id "; return $sql; } ?>