/******************************************************
' System :「きゃららFactory」管理者用ページル
' Content:似顔絵情報管理|似顔絵受付リスト
'******************************************************/
$top = '../..';
$inc = "$top/inc";
include("$inc/login_check.php");
include("$inc/header.php");
$inc = "$top/../inc";
include("$inc/common.php");
include("$inc/define.php");
include("$inc/database.php");
include("$inc/select.php");
include("$inc/format.php");
include("$inc/list.php");
include("$inc/decode.php");
include("$inc/status.php");
include("inc.php");
// *表示
function check_aster($date) {
if ($date != '')
echo '*';
}
// 納期チェック
function check_nouki($nouki_date, $dl_mail_date) {
if ($nouki_date != '') {
if ($dl_mail_date == '') {
// 納期超過
if ($nouki_date < date("Y-m-d H:i:s"))
echo "" . format_date($nouki_date) . "";
// 納期まで24時間以内
elseif (add_datetime($nouki_date, 0 , 0, 0, -24, 0, 0) <= date("Y-m-d H:i:s"))
echo "" . format_date($nouki_date) . "";
// それ以外
else
echo format_date($nouki_date);
} else {
// 納品済み
echo "" . format_date($nouki_date) . "";
}
} else {
echo '未設定';
}
}
//メイン処理
set_global('nigaoe', '似顔絵情報管理', '似顔絵受付リスト', BACK_TOP);
// セッション登録
get_session_vars($pset, 'order_list', 'status', 'product', 'displine', 'sort_col', 'sort_dir', 'page', 'photo');
// where条件
if ($status != '') {
and_join($where, "nd_status=" . $status);
}
if ($product != '') {
and_join($where, "nd_product_cd LIKE '%$product%'");
} else {
and_join($where, "nd_product_cd='01'");
$product = '01';
}
if ($where != '')
$where = "WHERE $where";
// ソート条件
$order_by = order_by(9, 0, 'nd_random_id', 'nd_mail_addr', 'nd_sex_code', 'nd_status', 'as_server_id', 'nd_product_cd', 'st_name1_kana', 'nd_accept_date', 'nd_nouki_date');
// 表示行数条件
$limit = disp_limit();
$sql = "SELECT count(nd_nigaoe_id) AS count FROM t_nigaoe_data LEFT JOIN m_account_server ON nd_server_id=as_server_id $where";
$num = db_fetch1($sql);
$sql = "SELECT * FROM t_nigaoe_data LEFT JOIN m_account_server ON nd_server_id=as_server_id LEFT JOIN m_staff ON nd_staff_id=st_staff_id $where $order_by $limit";
$result = db_exec($sql);
$nrow = pg_numrows($result);
// 写真画像URL取得
$ur_photo = get_system_info('url_photo');
?>
=$g_title?>
page_header() ?>
if (!$photo) {
?>
width="100%" class="small2">
sort_header(1, '申込みID');
sort_header(2, 'メールアドレス');
sort_header(3, '性別');
sort_header(4, 'ステータス');
sort_header(5, '発注元');
sort_header(6, '商品');
sort_header(7, '担当');
sort_header(8, '受付日時');
sort_header(9, '納期');
sort_header(0, '割当');
sort_header(0, '開始');
sort_header(0, '完了');
sort_header(0, '通知');
sort_header(0, 'DL');
?>
for ($i = 0; $i < $nrow; $i++) {
$fetch = pg_fetch_object($result, $i);
$status = $fetch->st_status;
?>
=htmlspecialchars($fetch->nd_random_id)?> |
=htmlspecialchars($fetch->nd_mail_addr)?> |
=decode_sex($fetch->nd_sex_code)?> |
=$fetch->nd_status?> |
=decode_ac_server($fetch->as_server_id)?> |
=decode_product($fetch->nd_product_cd)?> |
=$fetch->st_name1?> |
=format_date($fetch->nd_accept_date)?> |
=check_nouki($fetch->nd_nouki_date, $fetch->nd_dl_mail_date)?> |
=check_aster($fetch->nd_assign_date)?> |
=check_aster($fetch->nd_creation_date)?> |
=check_aster($fetch->nd_completion_date)?> |
=check_aster($fetch->nd_dl_mail_date)?> |
=check_aster($fetch->nd_download_date)?> |
}
?>
(納期:緑=納品済み、赤=納期まで24時間以内、赤=納期超過、黒=それ以外) |
} else {
?>
width="100%">
for ($i = 0; $i < $nrow; ) {
?>
for ($j = 0; $j < 5; $j++) {
?>
if ($i < $nrow) {
$fetch = pg_fetch_object($result, $i);
$random_id = $fetch->nd_random_id;
?>
性別:=disp_sex($fetch->nd_sex_code)?> 年齢:=disp_age($fetch->nd_age)?> |
 |
=disp_status($fetch->nd_status)?> |
$i++;
}
?>
|
}
?>
}
?>
}
?>
page_footer() ?>