/home/banprang/domains/plai.go.th/public_html/coremain/module/member/send_new.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?
$navig
['send_new']="ส่งข่าวให้สมาชิกทางเมลล์";
navigator($navig);
echo 
"<br>";
bar_header("ส่งข่าวให้สมาชิกทางเมลล์"); // Bar_Header

    
$date=date("d");
                    
$month=date("m");
                    
$year=date("Y");
                    
$yearthai=$year+543;
                    
$datenow=$yearthai.$month.$date;

$res_new select_result_query("*","cms_product","(is_new_product","1"," and (start_new<='$datenow' and end_new>='$datenow')) or (is_promotion = 1 and (start_promo<='$datenow' and end_promo>='$datenow'))  group by id_product");

echo 
"<form name='select_form' action='index.php?mod=send_new_output&path=product' method='POST'>";
echo
"<table width='100%' border='0' align='center' cellpadding='1' cellspacing='1' bgcolor='$_SESSION[tb_bgcolor]'>";
    echo
"<tr height='20' bgcolor='$_SESSION[tb_head_bgcolor]'>";
$count_new 1;


    echo 
"<td align='center'><b>ลำดับที่</b></td>";
    echo 
"<td align='center'><b>เลือก</b></td>";
    echo 
"<td align='center'><b>ชื่อผลิตภัณฑ์</b></td>";
    echo 
"<td align='center'><b>เป็นโปรโมชั่น</b></td>";
    echo 
"<td align='center'><b>เป็นสินค้าใหม่</b></td>";
echo 
"</tr>";
    while (
$data mysql_fetch_array($res_new)){
    
         if(
$count_new%2==0)
                    echo
"  <tr height='20' bgcolor='dddddd'>";
                else
                    echo
"  <tr height='20' bgcolor='eeeeee'>";
                    
            echo 
"<td align='center'>$count_new</td>";
            echo 
"<td align='center'><input type='checkbox' name='check_box[]' value = '$data[id_product]' id='check_box$count_new'></td>";
            echo 
"<td align='left'>&nbsp;&nbsp;$data[name]</td>";
            echo 
"<td align='center'>";
            if(
$data[is_promotion]==1){
                
print_correct();
            }
            else
                    
print_wrong();
            echo 
"</td>";
            
                echo 
"<td align='center'>";
            if(
$data[is_new_product]==1){
                    
print_correct();
            }
            else
                
print_wrong();
            echo 
"</td>";
            
        echo 
"</tr>";
        
$count_new++;
    }
echo 
"</table>";
echo 
"<br/><br/>";
echo 
"<div align='center'><input type='submit' name='btn_submit' value='ตกลง'></div>";
echo 
"</form>";
?>