您好,登錄后才能下訂單哦!
本篇內容介紹了“如何使用PHP開發HR系統”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠學有所成!
1添加文件
1)在HRMS工程下新建assets文件夾,把我們需要的文件分別添加進去
這里對不同類型的文件做了分門別類的放置,看起來更規整一些;
2、修改main_list.php文件
由上面的配置文件我們可以看出,我們需要名稱為main的控制器,打開application->controllers文件夾,看到目錄下
有一個Welcome.php的文件,這個就是系統默認調用的文件;
1)在application->controllers目錄下新建Main.php文件,輸入以下代碼:
<?php
defined('BASEPATH')ORexit('Nodirectscriptaccessallowed');
?><!DOCTYPEhtml>
<htmllang="en">
<head>
<metacharset="utf-8">
<title>HRManageSystem</title>
<metacontent="width=device-width,initial-scale=1.0"name="viewport"/>
<metacontent=""name="description"/>
<metacontent="Mosaddek"name="author"/>
<!--<linkrel="stylesheet"href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css"/>-->
<!--<linkhref="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css"rel="stylesheet">-->
<linkrel="stylesheet"href="<?phpechobase_url('assets/font-awesome/css/font-awesome.min')?>">
<linkrel="stylesheet"href="<?phpechobase_url('assets/bootstrap/css/bootstrap.min.css')?>">
<linkrel="stylesheet"href="<?phpechobase_url('assets/bootstrap/css/bootstrap-responsive.min.css')?>">
<linkrel="stylesheet"href="<?phpechobase_url('assets/bootstrap/css/bootstrap-fileupload.css')?>">
<linkrel="stylesheet"href="<?phpechobase_url('assets/css/style.css')?>">
<linkrel="stylesheet"href="<?phpechobase_url('assets/css/style-responsive.css')?>">
<linkrel="stylesheet"href="<?phpechobase_url('assets/css/style-default.css')?>">
<linkrel="stylesheet"type="text/css"href="<?phpechobase_url('assets/uniform/css/uniform.default.css')?>">
<linkrel="stylesheet"href="<?phpechobase_url('assets/data-tables/DT_bootstrap.css')?>">
</head>
<bodyclass="fixed-top">
<!--BEGINHEADER-->
<divid="header"class="navbarnavbar-inversenavbar-fixed-top">
<!--BEGINTOPNAVIGATIONBAR-->
<divclass="navbar-inner">
<divclass="sidebar-toggle-boxhidden-phone">
<divclass="fafa-reordertooltips"data-placement="right"data-original-title="ToggleNavigation"></div>
</div>
<!--ENDSIDEBARTOGGLE-->
<!--BEGINLOGO-->
<aclass="brand"href="<?phpechosite_url('Main/display/main');?>">
<imgsrc="<?phpechobase_url('assets/img/logo.png')?>"alt="MetroLab"/>
</a>
<!--BEGINRESPONSIVEMENUTOGGLER-->
<!--<aclass="btnbtn-navbarcollapsed"id="main_menu_trigger"data-toggle="collapse"data-target=".nav-collapse">
<spanclass="fafa-bar"></span>
<spanclass="fafa-bar"></span>
<spanclass="fafa-bar"></span>
<spanclass="arrow"></span>
</a>-->
<divid="top_menu"class="navnotify-row">
<!--BEGINNOTIFICATION-->
</div>
<divclass="top-nav">
<ulclass="navpull-righttop-menu">
<!--BEGINSUPPORT-->
<liclass="dropdownmtop5">
<aclass="dropdown-toggleelement"data-placement="bottom"data-toggle="tooltip"href="#"data-original-title="Chat">
<iclass="fafa-comments-o"></i>
</a>
</li>
<liclass="dropdownmtop5">
<aclass="dropdown-toggleelement"data-placement="bottom"data-toggle="tooltip"href="#"data-original-title="Help">
<iclass="fafa-headphones"></i>
</a>
</li>
<!--ENDSUPPORT-->
<!--BEGINUSERLOGINDROPDOWN-->
<liclass="dropdown">
<ahref="#"class="dropdown-toggle"data-toggle="dropdown">
<imgsrc="<?phpechobase_url('assets/img/avatar1_small.jpg')?>"alt="">
<spanclass="username">JhonDoe</span>
<bclass="caret"></b>
</a>
<ulclass="dropdown-menuextendedlogout">
<li>
<ahref="#">Swing</a></li>
<li>
<li><ahref="#"><iclass="fafa-user"></i>我的資料</a></li>
<li><ahref="#"><iclass="fafa-cog"></i>我的設置</a></li>
<li><ahref="login.html"><iclass="fafa-key"></i>退出</a></li>
</ul>
</li>
<!--ENDUSERLOGINDROPDOWN-->
</ul>
<!--ENDTOPNAVIGATIONMENU-->
</div>
</div>
</div>
<!--ENDHEADER-->
<!--BEGINCONTAINER-->
<divid="container"class="row-fluid">
<divclass="sidebar-scroll"style="overflow:hidden;"tabindex="5000">
<divid="sidebar"class="nav-collapsecollapse">
<!--BEGINRESPONSIVEQUICKSEARCHFORM-->
<divclass="navbar-inverse">
<formclass="navbar-searchvisible-phone">
<inputclass="search-query"placeholder="Search"type="text">
</form>
</div>
<!--ENDRESPONSIVEQUICKSEARCHFORM-->
<!--BEGINSIDEBARMENU-->
<ulclass="sidebar-menu">
<liclass="sub-menuactive">
<aclass=""href="index.php">
<iclass="fafa-dashboard"></i>
<span>控制臺</span>
</a>
</li>
<liclass="sub-menu">
<ahref="javascript:;"class="">
<iclass="fafa-book"></i>
<span>人力資源規劃</span>
<spanclass="arrow"></span>
</a>
<ulclass="sub">
<li><aclass=""href="general.html">人力資源規劃</a></li>
</ul>
</li>
<liclass="sub-menu">
<ahref="javascript:;"class="">
<iclass="fafa-cogs"></i>
<span>招聘與配置</span>
<spanclass="arrow"></span>
</a>
<ulclass="sub">
<li><aclass=""href="calendar.html">招聘</a></li>
</ul>
</li>
<liclass="sub-menu">
<ahref="javascript:;"class="">
<iclass="fafa-tasks"></i>
<span>培訓與開發</span>
<spanclass="arrow"></span>
</a>
</li>
<liclass="sub-menu">
<ahref="javascript:;"class="">
<iclass="fafa-th"></i>
<span>績效管理</span>
<spanclass="arrow"></span>
</a>
<ulclass="sub">
<li><aclass=""href="basic_table.html">簡單表格</a></li>
<li><aclass=""href="dynamic_table.html">動態表格</a></li>
<li><aclass=""href="editable_table.html">可編輯表格</a></li>
</ul>
</li>
<liclass="sub-menu">
<ahref="javascript:;"class="">
<iclass="fafa-fire"></i>
<span>薪酬福利管理</span>
<spanclass="arrow"></span>
</a>
<ulclass="sub">
<li><aclass=""href="font_awesome.html">FontAwesome圖標</a></li>
<li><aclass=""href="glyphfafas.html">Glyphicons圖標</a></li>
</ul>
</li>
<liclass="sub-menu">
<aclass=""href="javascript:;">
<iclass="fafa-trophy"></i>
<span>勞動關系管理</span>
<spanclass="arrow"></span>
</a>
</li>
<liclass="sub-menu">
<aclass=""href="javascript:;">
<iclass="fafa-map-marker"></i>
<span>系統設置</span>
<spanclass="arrow"></span>
</a>
<ulclass="sub">
<li><ahref="vector_map.html"class="">用戶管理</a></li>
<li><ahref="google_map.html"class="">角色管理</a></li>
</ul>
</li>
<liclass="sub-menu">
<ahref="javascript:;"class="">
<iclass="fafa-file-alt"></i>
<span>報表分析</span>
<spanclass="arrow"></span>
</a>
<ulclass="sub">
<li><aclass=""href="blank.html">空白頁面</a></li>
</ul>
</li>
<!--ENDSIDEBARMENU-->
</div>
</div>
<divid="main-content">
<!--BEGINPAGECONTAINER-->
<divclass="container-fluid">
<!--BEGINPAGEHEADER-->
<divclass="row-fluid">
<divclass="span12">
<!--BEGINPAGETITLE&BREADCRUMB-->
<h4class="page-title">
控制臺
</h4>
<ulclass="breadcrumb">
<li>
<ahref="home.php">首頁</a>
<spanclass="divider">/</span>
</li>
<liclass="active">
人力資源總覽
</li>
<liclass="pull-rightsearch-wrap">
<formaction="search_result.html"class="hidden-phone">
<divclass="input-appendsearch-input-area">
<inputclass=""id="appendedInputButton"type="text">
<buttonclass="btn"type="button"><iclass="fafa-search"></i></button>
</div>
</form>
</li>
</ul>
<!--ENDPAGETITLE&BREADCRUMB-->
</div>
</div>
<!--ENDPAGEHEADER-->
<!--BEGINPAGECONTENT-->
<divclass="row-fluid">
<!--BEGINMETROSTATES-->
<divclass="metro-nav">
<divclass="metro-nav-blocknav-block-orange">
<adata-original-title=""href="#">
<iclass="fafa-user"></i>
<divclass="info">7048</div>
<divclass="status">在職人員總數</div>
</a>
</div>
<divclass="metro-nav-blocknav-olive">
<adata-original-title=""href="#">
<iclass="fafa-tags"></i>
<divclass="info">1023</div>
<divclass="status">待招聘人數</div>
</a>
</div>
<divclass="metro-nav-blocknav-block-yellow">
<adata-original-title=""href="#">
<iclass="fafa-comments-alt"></i>
<divclass="info">490</div>
<divclass="status">本月入職人數</div>
</a>
</div>
<divclass="metro-nav-blocknav-block-greendouble">
<adata-original-title=""href="#">
<iclass="fafa-eye-open"></i>
<divclass="info">288</div>
<divclass="status">本月離職人數</div>
</a>
</div>
<divclass="metro-nav-blocknav-block-red">
<adata-original-title=""href="#">
<iclass="fafa-bar-chart"></i>
<divclass="info">255</div>
<divclass="status">本月待招聘人數</div>
</a>
</div>
</div>
<divclass="metro-nav">
<divclass="metro-nav-blocknav-light-purpledouble">
<adata-original-title=""href="#">
<iclass="fafa-shopping-cart"></i>
<divclass="info">$8979322442</div>
<divclass="status">本年薪酬福利</div>
</a>
</div>
<divclass="metro-nav-blocknav-light-bluedouble">
<adata-original-title=""href="#">
<iclass="fafa-tasks"></i>
<divclass="info">$37624</div>
<divclass="status">本月薪酬福利</div>
</a>
</div>
</div>
<divclass="space10"></div>
<!--ENDMETROSTATES-->
</div>
<!--ENDPAGECONTENT-->
</div>
<!--ENDPAGECONTAINER-->
</div>
</div>
<!--BEGINFOOTER-->
<divid="footer">
2018©MetroAdmin.
</div>
<!--BEGINJAVASCRIPTS-->
<!--Loadjavascriptsatbottom,thiswillreducepageloadtime-->
<!--<scriptsrc="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>-->
<scriptsrc="<?phpechobase_url('assets/js/jquery-3.2.1.min.js')?>"></script>
<scripttype="text/javascript"src="<?phpechobase_url('assets/js/jquery.nicescroll.js')?>"></script>
<scripttype="text/javascript"src="<?phpechobase_url('assets/jquery-slimscroll/jquery-ui-1.9.2.custom.min.js')?>"></script>
<scripttype="text/javascript"src="<?phpechobase_url('assets/jquery-slimscroll/jquery.slimscroll.min.js')?>"></script>
<scriptsrc="<?phpechobase_url('assets/fullcalendar/fullcalendar.min.js')?>"></script>
<scriptsrc="<?phpechobase_url('assets/bootstrap/js/bootstrap.min.js')?>"></script>
<scriptsrc="<?phpechobase_url('assets/js/jquery.blockui.js')?>"></script>
<scriptsrc="<?phpechobase_url('assets/uniform/jquery.uniform.min.js')?>"></script>
<!--ie8fixes-->
<!--[ifltIE9]>
<scriptsrc="js/excanvas.js"></script>
<scriptsrc="js/respond.js"></script>
<![endif]-->
<scripttype="text/javascript"src="<?phpechobase_url('assets/jquery-easy-pie-chart/jquery.easy-pie-chart.js')?>"></script>
<scripttype="text/javascript"src="<?phpechobase_url('assets/js/jquery.sparkline.js')?>"></script>
<scriptsrc="<?phpechobase_url('assets/chart-master/Chart.js')?>"></script>
<scriptsrc="<?phpechobase_url('assets/js/jquery.scrollTo.min.js')?>"></script>
<!--commonscriptforallpages-->
<scriptsrc="<?phpechobase_url('assets/js/common-scripts.js')?>"></script>
<!--scriptforthispageonly-->
<scriptsrc="<?phpechobase_url('assets/js/easy-pie-chart.js')?>"></script>
<scriptsrc="<?phpechobase_url('assets/js/sparkline-chart.js')?>"></script>
<scriptsrc="<?phpechobase_url('assets/js/home-page-calender.js')?>"></script>
<scriptsrc="<?phpechobase_url('assets/js/home-chartjs.js')?>"></script>
<?phpswitch($page){
case"users":?>
<divid="footer">
</div>
<!--editabletablescript-->
<scriptsrc="<?phpechobase_url('assets/js/editable-table.js')?>"></script>
<scriptsrc="<?phpechobase_url('assets/data-tables/jquery.dataTables.js')?>"></script>
<scriptsrc="<?phpechobase_url('assets/data-tables/DT_bootstrap.js')?>"></script>
<script>
jQuery(document).ready(function(){
EditableTable.init();
});
</script>
<?phpbreak;?>
<?php}?>
<!--ENDBODY-->
</body>
</html>
2)修改配置文件application->config->config.php文件
配置節
$config['base_url']='';
修改為:
$config['base_url']='http://localhost/HRMS/';
“如何使用PHP開發HR系統”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業相關的知識可以關注億速云網站,小編將為大家輸出更多高質量的實用文章!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。