Q&A
- PHPÇÔ¼ö Q&A
| ¿µÄ«Æ® Áú¹® | |||||
| ±Û¾´ÀÌ | ³¯ Â¥ | 12-07-19 14:15 | Á¶ ȸ | 548 | |
|---|---|---|---|---|---|
| °£ÆíURL |
http://www.phpschool.com/link/qna_function/360282
|
´äº¯Ã¤ÅÃÀ² | 0 % | ||
|
http://horse79.com
»çÀÌÆ®º¸¸é ¸ÞÀÎÀ̳ª ¸ñ·Ï¿¡¼´Â °¡°ÝÀÌ Á¤»óÀûÀ¸·Î Ãâ·ÂÀ̵Ǵµ¥¿ä Àå¹Ù±¸´Ï·Î »óǰÀ» ³Ñ±â¸é °¡°ÝÀÌ 1,000,000¿ø ¿¡¼ 100¿øÀ¸·Î È® ¶³¾îÁö´Âµ¥ ÀÌÀ¯°¡¹º°¡¿ä..? ¾îµðºÎºÐÀ» ¸¸Àú¾ßÇÒÁö [ ¡å Áú¹®°ü·Ã Âü°í Source ] <?
//==============================================================================
// ¼îÇθô ÇÔ¼ö ¸ðÀ½ ½ÃÀÛ
//==============================================================================
// Àå¹Ù±¸´Ï °Ç¼ö °Ë»ç
function get_cart_count($on_uid)
{
global $g4;
$sql = " select count(ct_id) as cnt from $g4[yc4_cart_table] where on_uid = '$on_uid' ";
$row = sql_fetch($sql);
$cnt = (int)$row[cnt];
return $cnt;
}
// À̹ÌÁö¸¦ ¾ò´Â´Ù
function get_image($img, $width=0, $height=0)
{
global $g4, $default;
$full_img = "$g4[path]/data/item/$img";
if (file_exists($full_img) && $img)
{
if (!$width)
{
$size = getimagesize($full_img);
$width = $size[0];
$height = $size[1];
}
$str = "<img id='$img' src='$g4[url]/data/item/$img' width='$width' height='$height' border='0'>";
}
else
{
$str = "<img id='$img' src='$g4[shop_img_url]/no_image.gif' border='0' ";
if ($width)
$str .= "width='$width' height='$height'";
else
$str .= "width='$default[de_mimg_width]' height='$default[de_mimg_height]'";
$str .= ">";
}
return $str;
}
// »óǰ À̹ÌÁö¸¦ ¾ò´Â´Ù
function get_it_image($img, $width=0, $height=0, $id="")
{
global $g4;
$str = get_image($img, $width, $height);
if ($id) {
$str = "<a href='$g4[shop_url]/item.php?it_id=$id'>$str</a>";
}
return $str;
}
// »óǰÀÇ Àç°í (â°íÀç°í¼ö·® - ÁÖ¹®´ë±â¼ö·®)
function get_it_stock_qty($it_id)
{
global $g4;
$sql = " select it_stock_qty from $g4[yc4_item_table] where it_id = '$it_id' ";
$row = sql_fetch($sql);
$jaego = (int)$row['it_stock_qty'];
// Àç°í¿¡¼ »©Áö ¾Ê¾Ò°í ÁÖ¹®Àΰ͸¸
$sql = " select SUM(ct_qty) as sum_qty
from $g4[yc4_cart_table]
where it_id = '$it_id'
and ct_stock_use = 0
and ct_status in ('ÁÖ¹®', 'Áغñ') ";
$row = sql_fetch($sql);
$daegi = (int)$row['sum_qty'];
return $jaego - $daegi;
}
// Å« À̹ÌÁö
function get_large_image($img, $it_id, $btn_image=true)
{
global $g4;
if (file_exists("$g4[path]/data/item/$img") && $img != "")
{
$size = getimagesize("$g4[path]/data/item/$img");
$width = $size[0];
$height = $size[1];
$str = "<a href=\"javascript:popup_large_image('$it_id', '$img', $width, $height, '$g4[shop_path]')\">";
if ($btn_image)
$str .= "<img src='$g4[shop_img_path]/btn_zoom.gif' border='0'></a>";
}
else
$str = "";
return $str;
}
// ±Ý¾× Ç¥½Ã
function display_amount($amount, $tel_inq=false)
{
if ($tel_inq)
$amount = "Àüȹ®ÀÇ";
else
$amount = " ".number_format("$amount"); // ´Þ·¯È Ç¥±â
return $amount;
}
// ±Ý¾×Ç¥½Ã
// $it : »óǰ ¹è¿
function get_amount($it)
{
global $member;
if ($it['it_tel_inq']) return 'Àüȹ®ÀÇ';
if ($member[mb_level] > 2) // Ưº°È¸¿ø
$amount = $it[it_amount3];
if ($member[mb_level] == 2 || $amount == 0) // ȸ¿ø°¡°Ý
$amount = $it[it_amount2];
if ($member[mb_level] == 1 || $amount == 0) // ºñȸ¿ø°¡°Ý
$amount = $it[it_amount];
return (double)$amount;
}
// Æ÷ÀÎÆ® Ç¥½Ã
function display_point($point)
{
return number_format($point, 0) . "Á¡";
}
// Æ÷ÀÎÆ®¸¦ ±¸ÇÑ´Ù
function get_point($amount, $point)
{
return (int)($amount * $point / 1);
}
// HTML Ư¼ö¹®ÀÚ º¯È¯ htmlspecialchars
function htmlspecialchars2($str)
{
$trans = array("\"" => """, "'" => "'", "<"=>"<", ">"=>">");
$str = strtr($str, $trans);
return $str;
}
// ÆÄÀÏÀ» ¾÷·Îµå ÇÔ
function upload_file($srcfile, $destfile, $dir)
{
if ($destfile == "") return false;
// ¾÷·Îµå ÇÑÈÄ , ÆÛ¹Ì¼ÇÀ» º¯°æÇÔ
@move_uploaded_file($srcfile, "$dir/$destfile");
@chmod("$dir/$destfile", 0606);
return true;
}
// À¯ÀÏ۸¦ »ý¼º
function get_unique_id($len=32)
{
global $g4;
$result = @mysql_query(" LOCK TABLES $g4[yc4_on_uid_table] WRITE, $g4[yc4_cart_table] READ, $g4[yc4_order_table] READ ");
if (!$result) {
$sql = " CREATE TABLE `$g4[yc4_on_uid_table]` (
`on_id` int(11) NOT NULL auto_increment,
`on_uid` varchar(32) NOT NULL default '',
`on_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`session_id` varchar(32) NOT NULL default '',
PRIMARY KEY (`on_id`),
UNIQUE KEY `on_uid` (`on_uid`) ) ";
sql_query($sql, false);
}
// ÀÌÆ²Àü ÀÚ·á´Â ¸ðµÎ »èÁ¦ÇÔ
$ytime = date("Y-m-d", $g4['server_time'] - 86400 * 1);
$sql = " delete from $g4[yc4_on_uid_table] where on_datetime < '$ytime' ";
sql_query($sql);
$unique = false;
do {
sql_query(" INSERT INTO $g4[yc4_on_uid_table] set on_uid = NOW(), on_datetime = NOW(), session_id = '".session_id()."' ", false);
$id = @mysql_insert_id();
$uid = md5($id);
sql_query(" UPDATE $g4[yc4_on_uid_table] set on_uid = '$uid' where on_id = '$id' ");
// Àå¹Ù±¸´Ï¿¡µµ °ãÄ¡´Â°Ô ÀÖÀ» ¼ö ÀÖÀ¸¹Ç·Î ...
$sql = "select COUNT(*) as cnt from $g4[yc4_cart_table] where on_uid = '$uid' ";
$row = sql_fetch($sql);
if (!$row[cnt]) {
// ÁÖ¹®¼¿¡µµ °ãÄ¡´Â°Ô ÀÖÀ» ¼ö ÀÖÀ¸¹Ç·Î ...
$sql = "select COUNT(*) as cnt from $g4[yc4_order_table] where on_uid = '$uid' ";
$row = sql_fetch($sql);
if (!$row[cnt])
$unique = true;
}
} while (!$unique); // $unique °¡ °ÅÁþÀε¿¾È ½ÇÇà
@mysql_query(" UNLOCK TABLES ");
return $uid;
}
// ÁÖ¹®¼ ¹øÈ£¸¦ ¾ò´Â´Ù.
function get_new_od_id()
{
global $g4;
// ÁÖ¹®¼ Å×À̺í Lock °É°í
sql_query(" LOCK TABLES $g4[yc4_order_table] READ, $g4[yc4_order_table] WRITE ", FALSE);
// ÁÖ¹®¼ ¹øÈ£¸¦ ¸¸µç´Ù.
$date = date("ymd", time()); // 2002³â 3¿ù 7ÀÏ Àϰæ¿ì 020307
$sql = " select max(od_id) as max_od_id from $g4[yc4_order_table] where SUBSTRING(od_id, 1, 6) = '$date' ";
$row = sql_fetch($sql);
$od_id = $row[max_od_id];
if ($od_id == 0)
$od_id = 1;
else
{
$od_id = (int)substr($od_id, -4);
$od_id++;
}
$od_id = $date . substr("0000" . $od_id, -4);
// ÁÖ¹®¼ Å×À̺í Lock Ç®°í
sql_query(" UNLOCK TABLES ", FALSE);
return $od_id;
}
function message($subject, $content, $align="left", $width="450")
{
$str = "
<table width=$width cellpadding=4 align=center>
<tr><td class=line height=1></td></tr>
<tr>
<td align=center>$subject</td>
</tr>
<tr><td class=line height=1></td></tr>
<tr>
<td>
<table width=100% cellpadding=8 cellspacing=0>
<tr>
<td class=leading align=$align>$content</td>
</tr>
</table>
</td>
</tr>
<tr><td class=line height=1></td></tr>
</table>
<br>
";
return $str;
}
// ½Ã°£ÀÌ ºñ¾î ÀÖ´ÂÁö °Ë»ç
function is_null_time($datetime)
{
// °ø¶õ 0 : - Á¦°Å
$datetime = ereg_replace("[ 0:-]", "", $datetime);
if ($datetime == "")
return true;
else
return false;
}
// Ãâ·ÂÀ¯Çü, ½ºÅ²ÆÄÀÏ, 1¶óÀÎÀ̹ÌÁö¼ö, ÃѶóÀμö, À̹ÌÁöÆø, À̹ÌÁö³ôÀÌ
// 1.02.01 $ca_id Ãß°¡
function display_type($type, $skin_file, $list_mod, $list_row, $img_width, $img_height, $ca_id="")
{
global $member, $g4;
// »óǰÀÇ °¹¼ö
$items = $list_mod * $list_row;
// 1.02.00
// it_order Ãß°¡
$sql = " select *
from $g4[yc4_item_table]
where it_use = '1'
and it_type{$type} = '1' ";
if ($ca_id) $sql .= " and ca_id like '$ca_id%' ";
$sql .= " order by it_order, it_id desc
limit $items ";
$result = sql_query($sql);
if (!mysql_num_rows($result)) {
return false;
}
$file = "$g4[shop_path]/$skin_file";
if (!file_exists($file)) {
echo "<span class=point>{$file} ÆÄÀÏÀ» ãÀ» ¼ö ¾ø½À´Ï´Ù.</span>";
} else {
$td_width = (int)(100 / $list_mod);
include $file;
}
}
// ºÐ·ùº° Ãâ·Â
// ½ºÅ²ÆÄÀϹøÈ£, 1¶óÀÎÀ̹ÌÁö¼ö, ÃѶóÀμö, À̹ÌÁöÆø, À̹ÌÁö³ôÀÌ , ºÐ·ù¹øÈ£
function display_category($no, $list_mod, $list_row, $img_width, $img_height, $ca_id="")
{
global $member, $g4;
// »óǰÀÇ °¹¼ö
$items = $list_mod * $list_row;
$sql = " select * from $g4[yc4_item_table] where it_use = '1'";
if ($ca_id)
$sql .= " and ca_id LIKE '{$ca_id}%' ";
$sql .= " order by it_order, it_id desc limit $items ";
$result = sql_query($sql);
if (!mysql_num_rows($result)) {
return false;
}
$file = "$g4[shop_path]/maintype{$no}.inc.php";
if (!file_exists($file)) {
echo "<span class=point>{$file} ÆÄÀÏÀ» ãÀ» ¼ö ¾ø½À´Ï´Ù.</span>";
} else {
$td_width = (int)(100 / $list_mod);
include $file;
}
}
// º°
function get_star($score)
{
if ($score > 8) $star = "5";
else if ($score > 6) $star = "4";
else if ($score > 4) $star = "3";
else if ($score > 2) $star = "2";
else if ($score > 0) $star = "1";
else $star = "5";
return $star;
}
// º° À̹ÌÁö
function get_star_image($it_id)
{
global $g4;
$sql = "select (SUM(is_score) / COUNT(*)) as score from $g4[yc4_item_ps_table] where it_id = '$it_id' ";
$row = sql_fetch($sql);
return (int)get_star($row[score]);
}
// ¸ÞÀÏ º¸³»´Â ³»¿ëÀ» HTML Çü½ÄÀ¸·Î ¸¸µç´Ù.
function email_content($str)
{
global $g4;
$s = "";
$s .= "<html><head><meta http-equiv='content-type' content='text/html; charset={$g4['charset']}'><title>¸ÞÀÏ</title>\n";
$s .= "<body>\n";
$s .= $str;
$s .= "</body>\n";
$s .= "</html>";
return $s;
}
// ŸÀÓ½ºÅÆÇÁ Çü½ÄÀ¸·Î ³Ñ¾î¿Í¾ß ÇÑ´Ù.
// ½ÃÀ۽ð£, Á¾·á½Ã°£
function gap_time($begin_time, $end_time)
{
$gap = $end_time - $begin_time;
$time[days] = (int)($gap / 86400);
$time[hours] = (int)(($gap - ($time[days] * 86400)) / 3600);
$time[minutes] = (int)(($gap - ($time[days] * 86400 + $time[hours] * 3600)) / 60);
$time[seconds] = (int)($gap - ($time[days] * 86400 + $time[hours] * 3600 + $time[minutes] * 60));
return $time;
}
// °ø¶õ¾øÀÌ À̾îÁö´Â ¹®ÀÚ ÀÚ¸£±â (wayboard Âü°í (way.co.kr))
function continue_cut_str($str, $len=80)
{
$pattern = "[^ \n<>]{".$len."}";
return eregi_replace($pattern, "\\0\n", $str);
}
// Á¦¸ñº°·Î Ä÷³ Á¤·ÄÇÏ´Â QUERY STRING
// $type ÀÌ 1ÀÌ¸é ¹Ý´ë
function title_sort($col, $type=0)
{
global $sort1, $sort2;
global $_SERVER;
global $page;
global $doc;
$q1 = "sort1=$col";
if ($type) {
$q2 = "sort2=desc";
if ($sort1 == $col) {
if ($sort2 == "desc") {
$q2 = "sort2=asc";
}
}
} else {
$q2 = "sort2=asc";
if ($sort1 == $col) {
if ($sort2 == "asc") {
$q2 = "sort2=desc";
}
}
}
#return "$_SERVER[PHP_SELF]?$q1&$q2&page=$page";
return "$_SERVER[PHP_SELF]?$q1&$q2&page=$page";
}
// ¼¼¼Ç°ªÀ» üũÇÏ¿© ÀÌÂÊ¿¡¼ ¿Â°ÍÀÌ ¾Æ´Ï¸é ¸ÞÀÎÀ¸·Î
function session_check()
{
global $g4;
if (!trim(get_session('ss_on_uid')))
gotourl("$g4[path]/");
}
// »óǰ ¿É¼Ç
function get_item_options($subject, $option, $index)
{
$subject = trim($subject);
$option = trim($option);
if (!$subject || !$option) return "";
$str = "";
$arr = explode("\n", $option);
// ¿É¼ÇÀÌ ÇϳªÀÏ °æ¿ì
if (count($arr) == 1)
{
$str = $option;
}
else
{
$str = "<select name=it_opt{$index} onchange='amount_change()'>\n";
for ($k=0; $k<count($arr); $k++)
{
$arr[$k] = str_replace("\r", "", $arr[$k]);
$opt = explode(";", trim($arr[$k]));
$str .= "<option value='$arr[$k]'>{$opt[0]}";
// ¿É¼Ç¿¡ ±Ý¾×ÀÌ ÀÖ´Ù¸é
if ($opt[1] != 0)
{
$str .= " (";
// - ±Ý¾×ÀÌ ¾Æ´Ï¶ó¸é ¸ðµÎ + ±Ý¾×À¸·Î
if (!ereg("[-]", $opt[1]))
$str .= "+";
$str .= display_amount($opt[1]) . ")";
}
$str .= "</option>\n";
}
$str .= "</select>\n<input type=hidden name=it_opt{$index}_subject value='$subject'>\n";
}
return $str;
}
// Àμö´Â $it_id, $it_opt1, ..., $it_opt6 ±îÁö ³Ñ¾î¿È
function print_item_options()
{
global $g4;
$it_id = func_get_arg(0);
$sql = " select it_opt1_subject,
it_opt2_subject,
it_opt3_subject,
it_opt4_subject,
it_opt5_subject,
it_opt6_subject
from $g4[yc4_item_table]
where it_id = '$it_id' ";
$it = sql_fetch($sql);
$it_name = $str_split = "";
for ($i=1; $i<=6; $i++)
{
$it_opt = trim(func_get_arg($i));
// »óǰ¿É¼Ç¿¡¼ 0Àº Á¦¿ÜµÇ´Â Çö»óÀ» ¼öÁ¤
if ($it_opt==null) continue;
$it_name .= $str_split;
$it_opt_subject = $it["it_opt{$i}_subject"];
$opt = explode( ";", $it_opt );
$it_name .= " $it_opt_subject = $opt[0]";
if ($opt[1] != 0)
{
$it_name .= " (";
if (ereg("[+]", $opt[1]) == true)
$it_name .= "+";
$it_name .= display_amount($opt[1]) . ")";
}
$str_split = "<br>";
}
return $it_name;
}
function it_name_icon($it, $it_name="", $url=1)
{
global $g4;
$str = "";
if ($it_name)
$str = $it_name;
else
$str = stripslashes($it[it_name]);
if ($url)
$str = "<a href='$g4[shop_path]/item.php?it_id=$it[it_id]'>$str</a>";
if ($it[it_type1]) $str .= " <img src='$g4[shop_img_path]/icon_type1.gif' border=0 align=absmiddle>";
if ($it[it_type2]) $str .= " <img src='$g4[shop_img_path]/icon_type2.gif' border=0 align=absmiddle>";
if ($it[it_type3]) $str .= " <img src='$g4[shop_img_path]/icon_type3.gif' border=0 align=absmiddle>";
if ($it[it_type4]) $str .= " <img src='$g4[shop_img_path]/icon_type4.gif' border=0 align=absmiddle>";
if ($it[it_type5]) $str .= " <img src='$g4[shop_img_path]/icon_type5.gif' border=0 align=absmiddle>";
// ǰÀý
$stock = get_it_stock_qty($it[it_id]);
if ($stock <= 0)
$str .= " <img src='$g4[shop_img_path]/icon_pumjul.gif' border=0 align=absmiddle width=30 height=14> ";
return $str;
}
// ÀÏÀÚÇü½Äº¯È¯
function date_conv($date, $case=1)
{
if ($case == 1) { // ³â-¿ù-ÀÏ ·Î ¸¸µé¾îÁÜ
$date = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $date);
} else if ($case == 2) { // ³â¿ùÀÏ ·Î ¸¸µé¾îÁÜ
$date = preg_replace("/-/", "", $date);
}
return $date;
}
// ¹è³ÊÃâ·Â
function display_banner($position, $num="")
{
global $g4;
if (!$position) $position = "¿ÞÂÊ";
include "$g4[shop_path]/boxbanner{$num}.inc.php";
}
// 1.00.02
// ÆÄÀϹøÈ£, À̺¥Æ®¹øÈ£, 1¶óÀÎÀ̹ÌÁö¼ö, ÃѶóÀμö, À̹ÌÁöÆø, À̹ÌÁö³ôÀÌ
// 1.02.01 $ca_id Ãß°¡
function display_event($no, $event, $list_mod, $list_row, $img_width, $img_height, $ca_id="")
{
global $member, $g4;
// »óǰÀÇ °¹¼ö
$items = $list_mod * $list_row;
// 1.02.00
// b.it_order Ãß°¡
$sql = " select b.*
from $g4[yc4_event_item_table] a,
$g4[yc4_item_table] b
where a.it_id = b.it_id
and b.it_use = '1'
and a.ev_id = '$event' ";
if ($ca_id) $sql .= " and ca_id = '$ca_id' ";
$sql .= " order by b.it_order, a.it_id desc
limit $items ";
$result = sql_query($sql);
if (!mysql_num_rows($result)) {
return false;
}
$file = "$g4[shop_path]/maintype{$no}.inc.php";
if (!file_exists($file)) {
echo "<span class=point>{$file} ÆÄÀÏÀ» ãÀ» ¼ö ¾ø½À´Ï´Ù.</span>";
} else {
$td_width = (int)(100 / $list_mod);
include $file;
}
}
function get_yn($val, $case='')
{
switch ($case) {
case '1' : $result = ($val > 0) ? 'Y' : 'N'; break;
default : $result = ($val > 0) ? '¿¹' : '¾Æ´Ï¿À';
}
return $result;
}
// »óǰ¸í°ú °Ç¼ö¸¦ ¹Ýȯ
function get_goods($on_uid)
{
global $g4;
// »óǰ¸í¸¸µé±â
$row = sql_fetch(" select a.it_id, b.it_name from $g4[yc4_cart_table] a, $g4[yc4_item_table] b where a.it_id = b.it_id and a.on_uid = '$on_uid' order by ct_id limit 1 ");
// »óǰ¸í¿¡ "(½Öµû¿ÈÇ¥)°¡ µé¾î°¡¸é ¿À·ù ¹ß»ýÇÔ
$goods[it_id] = $row[it_id];
$goods[full_name]= $goods[name] = addslashes($row[it_name]);
// Ư¼ö¹®ÀÚÁ¦°Å
$goods[full_name] = preg_replace ("/[ #\&\+\-%@=\/\\\:;,\.'\"\^`~\_|\!\?\*$#<>()\[\]\{\}]/i", "", $goods[full_name]);
// »óǰ°Ç¼ö
$row = sql_fetch(" select count(*) as cnt from $g4[yc4_cart_table] where on_uid = '$on_uid' ");
$cnt = $row[cnt] - 1;
if ($cnt)
$goods[full_name] .= " ¿Ü {$cnt}°Ç";
$goods[count] = $row[cnt];
return $goods;
}
// ÆÐÅÏÀÇ ³»¿ë´ë·Î ÇØ´ç µð·ºÅ丮¿¡¼ Á¤·ÄÇÏ¿© <select> ű׿¡ Àû¿ëÇÒ ¼ö ÀÖ°Ô ¹Ýȯ
function get_list_skin_options($pattern, $dirname="./")
{
$str = "";
unset($arr);
$handle = opendir($dirname);
while ($file = readdir($handle)) {
if (preg_match("/$pattern/", $file, $matches)) {
$arr[] = $matches[0];
}
}
closedir($handle);
sort($arr);
foreach($arr as $key=>$value) {
$str .= "<option value='$arr[$key]'>$arr[$key]</option>\n";
}
return $str;
}
// ÀÏÀÚ ½Ã°£À» °Ë»çÇÑ´Ù.
function check_datetime($datetime)
{
if ($datetime == "0000-00-00 00:00:00")
return true;
$year = substr($datetime, 0, 4);
$month = substr($datetime, 5, 2);
$day = substr($datetime, 8, 2);
$hour = substr($datetime, 11, 2);
$minute = substr($datetime, 14, 2);
$second = substr($datetime, 17, 2);
$timestamp = mktime($hour, $minute, $second, $month, $day, $year);
$tmp_datetime = date("Y-m-d H:i:s", $timestamp);
if ($datetime == $tmp_datetime)
return true;
else
return false;
}
// Ä«Å×°í¸® µð½ºÇ÷¹ÀÌ Ãß°¡ - ½ºÅ²ÆÄÀϹøÈ£, ½ºÅ²ÆÄÀÏ, 1¶óÀÎÀ̹ÌÁö¼ö, ÃѶóÀμö, À̹ÌÁöÆø, À̹ÌÁö³ôÀÌ, ºÐ·ù¹øÈ£
function display_category2($no, $skin_file, $list_mod, $list_row, $img_width, $img_height, $ca_id="")
{
global $member, $g4;
// »óǰÀÇ °¹¼ö
$items = $list_mod * $list_row;
$sql = " select *
from $g4[yc4_item_table]
where it_use = '1'";
if ($ca_id) $sql .= " and ca_id like '{$ca_id}%' ";
$sql .= " order by RAND()
limit $items ";
$result = sql_query($sql);
if (!mysql_num_rows($result)) {
return false;
}
$file = "$g4[shop_path]/$skin_file";
if (!file_exists($file)) {
echo "<span class=point>{$file} ÆÄÀÏÀ» ãÀ» ¼ö ¾ø½À´Ï´Ù.</span>";
} else {
$td_width = (int)(100 / $list_mod);
include $file;
}
}
//==============================================================================
// ¼îÇθô ÇÔ¼ö ¸ðÀ½ ³¡
//==============================================================================
?>
|
|||||
Àüü´ñ±Û¼ö 3
-


°õÅ丮 12-07-19 15:31
¼Ò½ºº¸±â
-
´« ¾ÆÇÁ°Ô ¼Ò½º ´Ù Àоú½À´Ï´Ù.
Á¤ÀÛ ÇÊ¿äÇѰÇ
// ±Ý¾× Ç¥½Ã
100
function display_amount($amount, $tel_inq=false)
101
{
102
if ($tel_inq)
103
$amount = "Àüȹ®ÀÇ";
104
else
105
$amount = " ".number_format("$amount"); // ´Þ·¯È Ç¥±â
106
107
return $amount;
108
}
¿©±â »ÓÀÔ´Ï´Ù ;;
ÀÚ ÀÌÁ¦ ´Ù½Ã ¿ªÀ¸·Î
$amount °ªÀ» print_r() ·Î Âï¾úÀ»¶§ ¾ó¸¶·Î ³ª¿À³ª¿ä?
¼ÖÁ÷È÷ ÀÌÀü¿¡ ¹» ³Ñ°å´ÂÁö ¾Ë ¼ö ¾ø´ÂÁ¦ À̰ɷθ¸ À¯ÃßÇϴ°͵µ Á¶±Ý ´äÀº ³ª¿À±â ¾î·Æ½À´Ï´Ù :(
12345678910


