DHS

DB

Auto Remove Old Data

Auto Backup

Code

Gmail Account

預設登入畫面: Login.php

確認有沒有cookie,如果有,直接去index.php

透過JavaScript Redirect到Index.php

如果沒有Cookie,產生表單讓user填寫帳號密碼然後到password.php去確認

登入功能: Password.php

如果Password是預設的(1大2小),導向到Login_Change.php
並且藉由Login.php所接收的帳號密碼(Post) Create Cookie

確認帳號密碼是否為空,然後整理接收到的POST帳號密碼以及加密

trim

md5

刪除左右空白

PHP to SQL

Command

mysql_num_rows()
mysql_num_fields()

返回結果集中行的數目(從上到下-幾筆資料)
返回结果集中字段的数(從左到右-多少預設欄位)

mysql_query()

用來判斷資料庫查詢是否成功

變數加上sql語法

SELECT * FROM TABLE

mysql_fetch_assoc()
mysql_fetch_array()
mysql_fetch_row()

从结果集中取得一行作为关联数组。
while($rs=mysql_fetch_array[陣列名稱]){
echo $rs[0] $rs[1] ...
}

用sql語法確認剛剛從login.php傳送過來的$user & $pass是否正確

$sql = "SELECT * FROM user WHERE username ='".$user."' AND password = '".$mdpass."' LIMIT 1";

$res: 用mysql_query去建立mysql連線
mysql_num_rows($res)去確認mysql_connect是否建立

$res = mysql_query($sql) or die(mysql_error());
if (mysql_num_rows($res) == 1)

設定Cookie

setcookie

!!Major!!
index.php

$result: sql語法

從customer_status裡抓取所有數據,然後依sn降序,方式為降序(DESC)

$result = mysql_query("select * from customer_status ORDER BY customer_status.sn DESC");

mysql_fetch_array($result)

把陣列資料倒到$row裡

$row=mysql_fetch_array($result)

HTML

Frameset

用Frameset去設定分割視窗

主要撈date.php & main.php

Date.php

for迴圈

抓取陣列資料,設定y變數遞增,當y變數小於目前資料庫的行數時,+1,目的在於將$row分段的將陣列取出

for ($y=0;$y<$num_rows;$y++)
{
$row=mysql_fetch_array($result);
$db_data[$y]=$row;
}

設定y變數m預設為0,當y小於21行時,持續抓取db的date跟shift並建立連結

a href attribute: target

設定完target: main後,正常開啟超連結會是開在當下的data.php的欄位,但是設定好target為main後,server便可以知道這超連結是要開在另一邊的main.php上

這裡塞了一個ticket_sync.php

ticket_sync.php #

倒01_grap_ticket的資料到$num

$result = mysql_query("select * from 01_grap_ticket");
$num=mysql_num_rows($result);

sequence!=99 ? in Ticket table

$sequence=$num_seq+1;

Main.php

如果customer_status的[internal]被標記為1那就會用review.php去呈現

目前的shift會用下列php去呈現

customer_status.php

notes.php

ticket.php

如何被標記

review.php