Skip to content

Commit

Permalink
xieyoujiang
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavinxyj committed Jan 30, 2016
1 parent 7c35d88 commit 38a1a50
Show file tree
Hide file tree
Showing 15 changed files with 898 additions and 230 deletions.
35 changes: 35 additions & 0 deletions ajax.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
*
*@file ajax.php
*@author xieyoujiang
*@data 2016年1月30日
*@language PHP
*@e-mail xie_youjiang@163.com
*@copyright(c) 扬州格佳科技有限公司
*
*/
require_once './classpackage/Db.class.php';
if(isset($_GET['id']))
{

$strUserSql = "select f_username,f_password,f_fullname,f_phone,f_rank,f_head,f_head_phone,f_boss_phone,f_time,f_last_login,f_last_ip,f_last_time from t_users where f_id = ? order by f_id";

$strRankSql = "select f_id,f_title from t_rank where f_type=1";

$strBossSql = "select f_id,f_fullname from t_head where f_boss>0";

$rsUser = DbOperator::querySql($strUserSql,array($_GET['id']));

$rsRank = DbOperator::queryAll($strRankSql);

$rsBoss = DbOperator::queryAll($strBossSql);


$rsUser['rank'] = $rsRank;
$rsUser['boss'] = $rsBoss;


echo json_encode($rsUser, JSON_UNESCAPED_UNICODE);
}
?>
4 changes: 3 additions & 1 deletion area.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
*/
require_once 'init.php';
require_once './classpackage/Area.class.php';
if ( ! isset ( $_SESSION ['userId'] ) || empty ( $_SESSION ['userId'] ) )
{
echo "<script>alert('timeout or logout');parent.location.href='index.php'</script>";
Expand All @@ -18,7 +19,8 @@

if(isset ( $_GET ['active'] ) && $_GET ['active'] == "total")
{
$areaBean = Area::getBeanArray ();

$areaBean = Area::getAllAreaRecord();

$totalBean = array();

Expand Down
20 changes: 7 additions & 13 deletions classpackage/Area.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*@copyright(c) 扬州格佳科技有限公司
*
*/
require_once 'Db.class.php';
class Area
{

Expand All @@ -25,8 +25,6 @@ class Area

private $time = "";

private static $beanArray = array();

/**
*
* @return the $id
Expand Down Expand Up @@ -135,14 +133,6 @@ public function setTime ( $time )
$this->time = $time;
}

/**
* @return the $beanArry
*/
public static function getBeanArray ()
{
return self::$beanArray;
}

public static function getAllAreaRecord()
{
try
Expand All @@ -152,7 +142,9 @@ public static function getAllAreaRecord()
$rs = DbOperator::queryAll($strSql);

$count = 0;


$beanArray = array();

foreach ( $rs as $arrayIndex )
{
$area = new Area();
Expand All @@ -172,8 +164,10 @@ public static function getAllAreaRecord()
$area->phone = $arrayIndex['F_PHONE'];
$area->time = $arrayIndex['F_TIME'];

self::$beanArray[$count++]= $area;
$beanArray[$count++]= $area;
}

return $beanArray;

} catch (Exception $e)
{
Expand Down
4 changes: 2 additions & 2 deletions classpackage/Db.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static function querySql ( $strSql, $array )

$stms->execute ( $array );

$rs = $stms->fetch ();
$rs = $stms->fetch (PDO::FETCH_ASSOC);

return $rs;

Expand All @@ -132,7 +132,7 @@ public static function queryAll( $strSql )

$stms->execute ();

$rs = $stms->fetchAll ();
$rs = $stms->fetchAll (PDO::FETCH_ASSOC);

return $rs;

Expand Down
21 changes: 20 additions & 1 deletion classpackage/User.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

class User
{
private $id = "";

private $userName = "";

private $password = "";
Expand Down Expand Up @@ -213,6 +215,22 @@ public static function getBeanArray ()
return self::$beanArray;
}

/**
* @return the $id
*/
public function getId ()
{
return $this->id;
}

/**
* @param string $head
*/
public function setHead ( $head )
{
$this->head = $head;
}

public static function checkLogin($userName, $password)
{
try
Expand Down Expand Up @@ -267,7 +285,7 @@ public static function getAllRecord()
try
{

$strSql = "select f_username,f_password,f_fullname,f_phone,f_rank,f_head,f_head_phone,f_boss_phone,f_time,f_last_login,f_last_ip,f_last_time from t_users";
$strSql = "select f_id,f_username,f_password,f_fullname,f_phone,f_rank,f_head,f_head_phone,f_boss_phone,f_time,f_last_login,f_last_ip,f_last_time from t_users order by f_id";

$rs = DbOperator::queryAll($strSql);

Expand All @@ -278,6 +296,7 @@ public static function getAllRecord()

$user = new User();

$user->id = $arrayIndex['F_ID'];
$user->userName = $arrayIndex['F_USERNAME'];
$user->password = $arrayIndex['F_PASSWORD'];
$user->fullName = $arrayIndex['F_FULLNAME'];
Expand Down
2 changes: 2 additions & 0 deletions collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
*/
require_once './init.php';
require_once './classpackage/Collector.class.php';
if ( ! isset ( $_SESSION ['userId'] ) || empty ( $_SESSION ['userId'] ) )
{
echo "<script>alert('timeout or logout');parent.location.href='index.php'</script>";
Expand All @@ -18,6 +19,7 @@

if ( isset ( $_GET ['active'] ) && $_GET ['active'] == "total" )
{
Collector::getAllCollector();
$collectorBean = Collector::getBeanArray ();

$smarty->assign( "collectorBean", $collectorBean );
Expand Down
10 changes: 6 additions & 4 deletions css/planeui.css
Original file line number Diff line number Diff line change
Expand Up @@ -576,11 +576,11 @@ body {
position: relative;
background: #ffffff;
}

/*
div {
text-align: left;
}

*/
body, button, input, select, textarea, strong, p, span, small {
font-family: "Microsoft YaHei", "微软雅黑", "Hiragino Sans GB", STXihei, "华文细黑", STHeiti, "RobotoDraft", "Roboto", "Helvetica Neue", Helvetica, Tahoma, "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "宋体", Heiti, "黑体", sans-serif;
}
Expand Down Expand Up @@ -9450,7 +9450,7 @@ h1, h2, h3, h4, h5, h6, .pui-h1, .pui-h2, .pui-h3, .pui-h4, .pui-h5, .pui-h6 {

input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="number"], input[type="search"],
input[type="date"], input[type="datetime"], input[type="time"] {
width: 99.9%;
width: 60%;
padding: 10px;
height: 36px;
margin: 0 10px 7px 0;
Expand Down Expand Up @@ -9584,7 +9584,9 @@ fieldset.pui-fieldset-unbordered legend {
select {
font-size: 14px;
padding: 4px 6px;
width: 99.9%;
margin-top:2px;
margin-buttom:2px;
width: 60%;
height: 35px;
height: 34px\0;
background: none;
Expand Down
Loading

0 comments on commit 38a1a50

Please sign in to comment.