엑셀로다운받기

렛츠웹 + 게임/My Tip 2009. 1. 5. 16:52
<?
header( "Content-Type: application/x-msexcel" );
$db = mysql_connect("","","");


$status = mysql_select_db("PositiveNew");
if (!$status) {
   echo("DB_선택 못함");
      exit;
  }

$qur1="select Id, Money, No, Password from Premium_User where Domain = '$Domain'";

$Mem1=mysql_query($qur1);
print "\n";
print "이름\t아이디\t패스워드\t주민번호\t주소\t전화번호\t이메일\t적립금\t가입일\n";

while( $data1 = mysql_fetch_array($Mem1) )
{

$qur2="select * from Profile where No = '$data1[No]'";

$Mem2=mysql_query($qur2);

while( $data2 = mysql_fetch_array($Mem2) )
{
print "$data2[Name]\t$data1[Id]\t$data1[Password]\t$data2[Pn]\t$data2[Addr]\t$data2[Tel]\t$data2[Email]\t$data1[Money]\t$data2[Dates]\n";
}
usleep(2);
}

?>

------------------------------------
<?

include "/WWW/Root.set";
include _PREMIUM_INFO;
include _PREMIUM_DBINIT;

if ( !$Domain ) die( "<!-- domain required -->" );
if ( !$Pw ) die( "<!-- password required -->" );

if ( $Connect[Pw] != $Pw ) die( "<!-- password is not correct -->" );

header( "Content-Type: application/x-msexcel" );

$OfferMeta = $PremiumDB->Table( "OfferMeta" );
$OfferData = $PremiumDB->Table( "OfferData" );

$OfferMeta->Select( "*", "", "Order by No DESC" );

while( $data = $OfferMeta->Fetch() )
{
$Date = date( "Y-m-d H:i", $data[Date] );
print "주문번호\t총구매가\t배송료\t적립금\t구입시사용한적립금\t구매일시\t회원구매시 회원아이디\n";
print "$data[OfferId]\t$data[Price]\t$data[LogisticsFee]\t$data[Mileage]\t$data[MileageUse]\t$Date \t$data[Id]\n";
print "구매자\n";
print "이름\t이메일\t주소\t전화번호\n";
print "$data[Name1]\t$data[Email1]\t$data[Zip1] $data[Addr1]\t$data[Tel1]\n";
print "수취인\n";
print "이름\t이메일\t주소\t전화번호\t메모\n";
print "$data[Name2]\t$data[Email2]\t$data[Zip2] $data[Addr2]\t$data[Tel2]\t$data[Memo]\n";
print "주문한 물건\n";
print "물품이름&옵션\t가격\t주문수량\n";
$OfferData->Select( "*", "OfferId='$data[OfferId]'" );
while( $data1 = $OfferData->Fetch() )
{
print "$data1[ProductName] $data1[O1_1] $data1[O1_2] $data1[O1_3] $data1[O2] $data1[O3_1] $data1[O3_2] $data1[O3_3]\t$data1[Price]\t$data1[Quantity]\n";
}
print "\n\n";
usleep(2);
}

?>
--------------------------------------------------------------
<?
header( "Content-Type: application/x-msexcel" );
$db = mysql_connect("","","");

$status = mysql_select_db("Premium_english");
if (!$status) {
   echo("DB_선택 못함");
      exit;
  }

$qur1="select * from Shopping_category";

$Shopping_category=mysql_query($qur1);
if(!Shopping_category)
{
echo mysql_errno().":";
echo mysql_error();
exit;
}

while( $data = mysql_fetch_array($Shopping_category) )
{
$Catg=explode("/","$data[Catg]");

if(sizeof($Catg)==2) {
print "\n";
print "상위카테고리 : ";
print "$data[Title]\n";
print "\n";
print "상품명\t소매가\t판매가\t지은이\t출판사\t주제\t대상\t형태\t크기\n";
$qur2="select * from Shopping_product";

$Shopping_product=mysql_query($qur2);

while($data2 = mysql_fetch_array($Shopping_product))
{
$Catg2=explode("/","$data2[Catg]");

if($Catg[0]==$Catg2[0]){
$add=explode("|","$data2[Additional_info]");
print "$data2[Title]\t$data2[Price_customer]\t$data2[Price]\t$add[1]\t$add[5]\t$add[4]\t$add[2]\t$add[6]\t$add[3]\n";
print "\n";
}

}

}

usleep(2);
}

?>
-------------------------------------------------------------------
<?
header( "Content-Type: application/x-msexcel" );
$db = mysql_connect("","","");

$status = mysql_select_db("Premium_english");
if (!$status) die("DB_선택 못함");

$qur1="select a.Title,a.Catg,
  b.Additional_info, b.Title Title2, b.Price_customer, b.Price
         from Shopping_category a, Shopping_product b
        where substring(a.Catg,locate('/',a.Catg))='/'
          and a.Catg like concat(substring(b.Catg,1,locate('/',b.Catg)),'%')
        order by a.Catg";

$Shopping_category = mysql_query($qur1);

if(!$Shopping_category) {

echo mysql_errno().":";
echo mysql_error();
exit;
}

echo "상위카테고리\t상품명\t소매가\t판매가\t지은이\t출판사\t주제\t대상\t형태\t크기\n";

while( $data = mysql_fetch_array($Shopping_category) ) {

$add=explode("|","$data[Additional_info]");

echo "$data[Title]\t$data[Title2]\t$data[Price_customer]\t$data[Price]\t$add[1]\t$add[5]\t$add[4]\t$add[2]\t$add[6]\t$add[3]\n";
 
flush();
usleep(1);
}
?>
-------------------------------------------------------------------
<?
header( "Content-Type: application/x-msexcel" );
$db = mysql_connect("","","");

$status = mysql_select_db("Premium_english");
if (!$status) die("DB_선택 못함");

$qur1="select a.Title,a.Catg,
  b.Additional_info, b.Title Title2, b.Price_customer, b.Price
         from Shopping_category a, Shopping_product b
        where substring(a.Catg,locate('/',a.Catg))='/'
          and a.Catg like concat(substring(b.Catg,1,locate('/',b.Catg)),'%')
        order by a.Catg";

$Shopping_category = mysql_query($qur1);

if(!$Shopping_category) {

echo mysql_errno().":";
echo mysql_error();
exit;
}

echo "상위카테고리\t상품명\t소매가\t판매가\t지은이\t출판사\t주제\t대상\t형태\t크기\n";

while( $data = mysql_fetch_array($Shopping_category) ) {

$add=explode("|","$data[Additional_info]");

echo "$data[Title]\t$data[Title2]\t$data[Price_customer]\t$data[Price]\t$add[1]\t$add[5]\t$add[4]\t$add[2]\t$add[6]\t$add[3]\n";
 
flush();
usleep(1);
}
?>
----------------------------------------------------------------------------------------------------
<?
header( "Content-Type: application/x-msexcel" );
$db = mysql_connect("","","");

$status = mysql_select_db("Premium_testsite");
if (!$status) {
   echo("DB_선택 못함");
      exit;
  }

$qur1="select * from OfferMeta Order by No Desc";

$OfferMeta=mysql_query($qur1);
if(!$OfferMeta)
{
echo mysql_errno().":";
echo mysql_error();
exit;
}
while($data = mysql_fetch_array($OfferMeta))
{
$Date = date( "Y-m-d H:i", $data[Date] );
print "주문번호\t총구매가\t배송료\t적립금\t구입시사용한적립금\t구매일시\t회원구매시 회원아이디\n";
print "$data[OfferId]\t$data[Price]\t$data[LogisticsFee]\t$data[Mileage]\t$data[MileageUse]\t$Date \t$data[Id]\n";
print "구매자\n";
print "이름\t이메일\t주소\t전화번호\n";
print "$data[Name1]\t$data[Email1]\t$data[Zip1] $data[Addr1]\t$data[Tel1]\n";
print "수취인\n";
print "이름\t이메일\t주소\t전화번호\t메모\n";
print "$data[Name2]\t$data[Email2]\t$data[Zip2] $data[Addr2]\t$data[Tel2]\t$data[Memo]\n";
print "주문한 물건\n";
print "물품이름&옵션\t가격\t주문수량\n";
$qur2="select * from OfferData where OfferId='data[OfferId]'";
$OfferData=mysql_query($qur2);
while( $data1 = mysql_fetch_array($OfferData) )
{
print "$data1[ProductName] $data1[O1_1] $data1[O1_2] $data1[O1_3] $data1[O2] $data1[O3_1] $data1[O3_2] $data1[O3_3]\t$data1[Price]\t$data1[Quantity]\n";
}
print "\n\n";
usleep(2);
}

?>

'렛츠웹 + 게임 > My Tip' 카테고리의 다른 글

linux 파일 검색,치환등  (0) 2009.01.05
사운드제어  (0) 2009.01.05
소켓통신 프로토콜, xml 파싱  (0) 2009.01.05
키코드 만들기  (0) 2009.01.05
PHP, Ajax (prototype)을 이용한 XML 통신  (0) 2009.01.05
posted by 망차니

설정

트랙백

댓글