/home/mjc1/public_html/manage/asboard/ware_class.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?
$entry 
time();



$result_row mysql_query("select * from category where cat_large ='$w_larges' ");
$my_row mysql_fetch_array($result_row,MYSQL_ASSOC);



$w_names $my_row[cat_name];
$reg_date date("Y-m-d",$row[reg_date]);
$w_s_memo addslashes($w_s_memo);
$w_b_memo addslashes($w_b_memo);
$w_outline addslashes($w_outline);
$w_special addslashes($w_special);
$w_etc_menu addslashes($w_etc_menu);
$w_company addslashes($w_company);
$w_title addslashes($w_title);
$w_formation addslashes($w_formation);




$field_info = array("w_large","w_middle","w_small","w_name","w_view","w_s_img","w_b_img","w_download","w_doc","w_rent","w_buy","w_title_img","w_s_memo","w_b_memo","w_formation","w_outline","w_special","w_etc_menu","w_company","w_down_ch","w_doc_ch","w_info_ch","reg_date","w_title","chart_link");
$field_value = array("$w_larges","$w_middle","$w_small","$w_names","$w_view","$w_s_img_name","$w_b_img_name","$w_download","$w_doc","$w_rent","$w_buy","$w_title_img","$w_s_memo","$w_b_memo","$w_formation","$w_outline","$w_special","$w_etc_menu","$w_company","$w_down_ch","$w_doc_ch","$w_info_ch","$entry","$w_title","$chart_link");


$ware_field = array("¼±ÅÃ"=>"40","Á¦Ç°¸í"=>"100","ÀÓ´ë"=>"30","±¸¸Å"=>"30","´Ù¿îÆÄÀÏ"=>"60","¼³¸í¼­"=>"60","³»¿ë"=>"30","ÇÁ·Î±×·¥¸í"=>"100","»ç¿ë¼³¸í¼­"=>"130","µî·ÏÀÏ"=>"60");

//$ware_field_value = array("delete"=>"$row[uid]","w_large"=>"$row[w_large]","w_rent"=>"$row[w_rent]","w_buy"=>"$row[w_buy]","w_down_ch"=>"$row[w_down_ch]","w_doc_ch"=>"$row[w_doc_ch]","w_info_ch"=>"$row[w_info_ch]","w_download"=>"$row[w_download]","w_doc"=>"$row[w_doc]");




//Ãʰ¡ °ª -->
$w_rent_label = array("ÀÓ´ë");
$w_buy_label = array("±¸¸Å");
$w_download_label = array("´Ù¿î ¹Þ±â");
$w_doc_label = array("»ç¿ë ¼³¸í¼­");
$w_info_label = array("³»¿ë ÀÚ¼¼È÷º¸±â");
//$member_type = array("ÀϹÝ","¿ùÁ¤","ÀÓ´ë","Á¤Ç°"); //ȸ¿ø±¸ºÐ
//$member_type_value = array("1","2","3","4");
// <---- Ãʱ⠰ª ³¡




class ware_class extends DB_CLASS{

    function 
ware_class(){}
    function 
cat_list($table_name,$value){
        
        
$field = array("cat_middle","cat_small");
        
$field_value = array("0","0");

        
$result $this->select_info2($table_name,$field,$field_value,"Y","and");
        

        while(
$row mysql_fetch_array($result,MYSQL_ASSOC)){
            if(
$row[cat_large] == $value){
                echo(
"<option value='$row[cat_large]' selected>$row[cat_name]</option>");
            }else {echo(
"<option value='$row[cat_large]'>$row[cat_name]</option>");}
        }
        
    }
    
    function 
cat_name($table_name,$value){
        
        
$field = array("cat_middle","cat_small");
        
$field_value = array("0","0");

        
$result $this->select_info2($table_name,$field,$field_value,"Y","and");
        

        while(
$row mysql_fetch_array($result,MYSQL_ASSOC)){
            if(
$row[cat_large] == $value){
                
$cat_name $row[cat_name];
                
            }
        }
        return 
$cat_name;
    }
    
    function 
ware_info($uid){
        
$query "select * from ware where uid ='$uid'";
        
        
$info mysql_query($query);
        
$row mysql_fetch_array($info,MYSQL_ASSOC);

        return 
$row;
    }
    function 
chbox_info($field_name,$value,$label){
        if(
$value == "y" || $value == "Y"){
        echo(
"<INPUT TYPE='checkbox' NAME='$field_name' value='y' style='border-color:#DDDDDD' checked> &nbsp;$label");
        }else {
        echo(
"<INPUT TYPE='checkbox' NAME='$field_name' value='y' style='border-color:#DDDDDD'> &nbsp;$label");
        }
    }
    function 
count_num($table_name,$field_name,$value){
        
        
$query "select count(*) from $table_name where $field_name = '$value'";
        
$result mysql_query($query);
        
$total_record mysql_result($result,0,0);
        return 
$total_record;
    }
}

//$ware_class = new ware_class();


?>