如何使用PHP开发HR系统
本篇内容介绍了“如何使用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');?>">
<imgclass="lazy" data-src="<?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">
<imgclass="lazy" data-src="<?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-->
<!--<scriptclass="lazy" data-src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>-->
<scriptclass="lazy" data-src="<?phpechobase_url('assets/js/jquery-3.2.1.min.js')?>"></script>
<scripttype="text/javascript"class="lazy" data-src="<?phpechobase_url('assets/js/jquery.nicescroll.js')?>"></script>
<scripttype="text/javascript"class="lazy" data-src="<?phpechobase_url('assets/jquery-slimscroll/jquery-ui-1.9.2.custom.min.js')?>"></script>
<scripttype="text/javascript"class="lazy" data-src="<?phpechobase_url('assets/jquery-slimscroll/jquery.slimscroll.min.js')?>"></script>
<scriptclass="lazy" data-src="<?phpechobase_url('assets/fullcalendar/fullcalendar.min.js')?>"></script>
<scriptclass="lazy" data-src="<?phpechobase_url('assets/bootstrap/js/bootstrap.min.js')?>"></script>
<scriptclass="lazy" data-src="<?phpechobase_url('assets/js/jquery.blockui.js')?>"></script>
<scriptclass="lazy" data-src="<?phpechobase_url('assets/uniform/jquery.uniform.min.js')?>"></script>
<!--ie8fixes-->
<!--[ifltIE9]>
<scriptclass="lazy" data-src="js/excanvas.js"></script>
<scriptclass="lazy" data-src="js/respond.js"></script>
<![endif]-->
<scripttype="text/javascript"class="lazy" data-src="<?phpechobase_url('assets/jquery-easy-pie-chart/jquery.easy-pie-chart.js')?>"></script>
<scripttype="text/javascript"class="lazy" data-src="<?phpechobase_url('assets/js/jquery.sparkline.js')?>"></script>
<scriptclass="lazy" data-src="<?phpechobase_url('assets/chart-master/Chart.js')?>"></script>
<scriptclass="lazy" data-src="<?phpechobase_url('assets/js/jquery.scrollTo.min.js')?>"></script>
<!--commonscriptforallpages-->
<scriptclass="lazy" data-src="<?phpechobase_url('assets/js/common-scripts.js')?>"></script>
<!--scriptforthispageonly-->
<scriptclass="lazy" data-src="<?phpechobase_url('assets/js/easy-pie-chart.js')?>"></script>
<scriptclass="lazy" data-src="<?phpechobase_url('assets/js/sparkline-chart.js')?>"></script>
<scriptclass="lazy" data-src="<?phpechobase_url('assets/js/home-page-calender.js')?>"></script>
<scriptclass="lazy" data-src="<?phpechobase_url('assets/js/home-chartjs.js')?>"></script>
<?phpswitch($page){
case"users":?>
<divid="footer">
</div>
<!--editabletablescript-->
<scriptclass="lazy" data-src="<?phpechobase_url('assets/js/editable-table.js')?>"></script>
<scriptclass="lazy" data-src="<?phpechobase_url('assets/data-tables/jquery.dataTables.js')?>"></script>
<scriptclass="lazy" data-src="<?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系统”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注编程网网站,小编将为大家输出更多高质量的实用文章!
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341