您好,登录后才能下订单哦!
本篇内容介绍了“如何使用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进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。