/home/mjc1/public_html/manage/pointProcess_old20150619.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
<?
    
@session_start();
    
//20130829 ¼öÁ¤
    
if (!isset($pg)) $pg "";
    if (!isset(
$mode)) $mode "";
    if (!isset(
$SearchMdiv)) $SearchMdiv "";
    if (!isset(
$SearchMup)) $SearchMup "";
    if (!isset(
$SearchMper)) $SearchMper "";
    if (!isset(
$searchCode)) $searchCode "";
    if (!isset(
$SearchMsw1)) $SearchMsw1 "";
    if (!isset(
$keyword)) $keyword "";
    if (!isset(
$SortCnt)) $SortCnt "";

    
$reg_date date('Y-m-d H:i:s',time());
    
        include(
"../manage/category/common.php");

        
$userQry " select Mid, Mcompany, companyNum, Mtel1, Mhp from member where Mid = '$pointid'";
        
$resultuser  =   mysql_query($userQry);
        
$rowuser   =    mysql_fetch_array($resultuser);

        
mysql_close();
        
$Mid $rowuser['Mid'];
        
$Mcompany $rowuser['Mcompany'];
        
$companyNum $rowuser['companyNum'];
        
$Mtel1 $rowuser['Mtel1'];
        
$Mhp $rowuser['Mhp'];

        if(
$rowuser['Mid'] == $pointid){    //À¥¾ÆÀ̵ð Ã¼Å©

            
include("../manage/category/pointcommon.php");
            
            
$idqry    "select * from customers where id = '$pointid'";

            
$resultid  =   mysql_query($idqry);
            
$rowid    =    mysql_fetch_array($resultid);
            
            
$companyNum2 str_replace("-","",$companyNum);
            
$point2 str_replace(",","",$point);

            
//Æ÷ÀÎÆ® ¾ÆÀ̵𰡠ÀÖÀ¸¸é ÃæÀü
                
if($rowid['id'] == $pointid){        
                
$pupdateQry  =   "INSERT INTO cash_fill values ('','$pointid','$reg_date','$point2','','$Mmoney','$bigopoint','$adminName','0')";    //±âÁ¸È¸¿ø Æ÷ÀÎÆ® ÃæÀü
                
mysql_query($pupdateQry);
        
                
?>

                <script>
                parent.Msg("ÃæÀüÀÌ ¿Ï·á µÇ¾ú½À´Ï´Ù.");
                parent.location.href = "point.php?pg=<?=$pg;?>&mode=<?=$mode;?>&SearchMdiv=<?=$SearchMdiv;?>&SearchMup=<?=$SearchMup;?>&SearchMper=<?=$SearchMper;?>&searchCode=<?=$searchCode;?>&keyword=<?=$keyword;?>&SearchMsw1=<?=$SearchMsw1;?>&SortCnt=<?=$SortCnt;?>&txtdate=<?=$txtdate;?>&txtdate2=<?=$txtdate2;?>";
                </script>

                <?
//Æ÷ÀÎÆ® ID°¡ ¾øÀ» °æ¿ì »ý¼ºÈÄ ÃæÀü    
                
} ELSE {        
        
                
$companyNum str_replace("-","",$companyNum);
                
$newinsertQry  =   "INSERT INTO customers values ('$pointid','$Mcompany','$companyNum2','$Mtel1','$Mhp','','$reg_date','$adminName','')";    //ȸ¿øµî·Ï
                
mysql_query($newinsertQry);
                

                
$newpupdateQry  =   "INSERT INTO cash_fill values ('','$pointid','$reg_date','$point2','','$Mmoney','$bigopoint','$adminName','0')";    //Æ÷ÀÎÆ®ÃæÀü
                
                
mysql_query($newpupdateQry);


                
mysql_close();
                
                
?>        
                <script>
                parent.Msg("Æ÷ÀÎÆ®È¸¿ø µî·Ï ÈÄ ÃæÀüÀÌ ¿Ï·á µÇ¾ú½À´Ï´Ù.");
                //parent.Msg("<?=$pointid?><?=$Mcompany?><?=$Mcompany?><?=$companyNum?><?=$Mtel1?><?=$Mhp?><?=$reg_date?><?=$adminName?>");
                parent.location.href = "point.php?pg=<?=$pg;?>&mode=<?=$mode;?>&SearchMdiv=<?=$SearchMdiv;?>&SearchMup=<?=$SearchMup;?>&SearchMper=<?=$SearchMper;?>&searchCode=<?=$searchCode;?>&keyword=<?=$keyword;?>&SearchMsw1=<?=$SearchMsw1;?>&SortCnt=<?=$SortCnt;?>&txtdate=<?=$txtdate;?>&txtdate2=<?=$txtdate2;?>";
                </script>        
        
<?        
    


        } ELSE {    
//À¥¾ÆÀ̵𰡠¾øÀ»°æ¿ì °æ°í ¸Þ½ÃÁö
?>
        <script>
        parent.Msg("¾ÆÀ̵𸦠´Ù½Ã È®ÀÎÇÏ¿© ÁֽʽÿÀ.");
        parent.location.href = "point.php?pg=<?=$pg;?>&mode=<?=$mode;?>&SearchMdiv=<?=$SearchMdiv;?>&SearchMup=<?=$SearchMup;?>&SearchMper=<?=$SearchMper;?>&searchCode=<?=$searchCode;?>&keyword=<?=$keyword;?>&SearchMsw1=<?=$SearchMsw1;?>&SortCnt=<?=$SortCnt;?>&txtdate=<?=$txtdate;?>&txtdate2=<?=$txtdate2;?>";
        </script>
<?
    
}
?>