logo-dohoalaptrinh

Trung tâm đào tạo đồ họa designtech

Chuyên lĩnh vực : đồ họa quảng cáo in ấn, thiết kế nội thất ngoại thất, phối cảnh, xây dựng, cơ khí

Trang chủ » Chưa được phân loại » Hướng dẫn làm web bán hàng bằng php từ a-z-phần 15
5/5 - (3 bình chọn)

Hướng dẫn làm web bán hàng bằng php từ a-z-phần 15

5/5 - (3 bình chọn)

Hướng dẫn làm web bán hàng bằng php từ a-z-phần 15

40. include_file(” cumchucnang/ quanly_dulieu/ bienluan_quanly_dulieu.php”);

[sourcecode language=”plain”]<?php chongphahoai(); ?>
<a href="?thamso=dieu_khien_quan_ly_san_pham" class="lienket_phanthan">Sản phẩm</a>

<a href="?thamso=quanly_tintuc" class="lienket_phanthan">Tin tức</a>

<a href="?thamso=quanly_dulieu_menu_ngang" class="lienket_phanthan">Bài viết</a>
<!–
<a href="?thamso=quan_ly_menu_help" class="lienket_phanthan">Bài viết menu help</a>–>
[/sourcecode]

41. include_file(” cumchucnang/ quanly_dulieu/ quanly_dulieu_left_menu.php”);

[sourcecode language=”plain”]<?php
chongphahoai();
//duoi day la 3 duong dan dc include lai o file php nay

//echo $duongdan_1."

<hr>

";
//echo $duongdan_2."

<hr>

";
//echo $duongdan_3."

<hr>

";
class class__quanly_dulieu_left_menu
{

<h4 style="font-size: 14pt;">function quanly_dulieu_left_menu($duongdan_1,$duongdan_2,$duongdan_3)</h4>

{
echo "

<table >";
echo "

<tr>";
echo "

<td >";
include_file("cumchucnang/quanly_dulieu/xuat_menu_option_quanly.php");
echo "</td>

";
echo "</tr>

";
echo "

<tr>";
echo "

<td valign=\"top\" align=\"left\">";
//include($duongdan_3);
include_file("cumchucnang/quanly_dulieu/xuat_quanly_dulieu_toanbo_menu.php");
echo "</td>

";
echo "</tr>

";
echo "</table>

";
}
}
$class__quanly_dulieu_left_menu=new class__quanly_dulieu_left_menu;
$class__quanly_dulieu_left_menu ->quanly_dulieu_left_menu($duongdan_1,$duongdan_2,$duongdan_3);
?>
[/sourcecode]

42. include_file(” cumchucnang/ quanly_dulieu/ sua_sanpham_left_menu.php”);

[sourcecode language=”plain”]<?php chongphahoai(); empty_forder("../hinhanh_flash/upload_tam/"); // ham empty_forder : lam rong thu muc ?>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%20%3E%0A%20function%20ddd5()%0A%20%7B%0A%20var%20id%3Ddocument.getElementById(%22ddd5%22)%3B%0A%20id.style.display%3D%22block%22%3B%0A%20%7D%0A%20function%20ham_jjj_3()%0A%20%7B%0A%20document.getElementById(%22sss2%22).style.display%3D%22block%22%3B%0A%20%7D%0A%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />

<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%20div.div_input_file__999%0A%20%7B%0A%20overflow%3Ahidden%3B%0A%20width%3A100px%3B%0A%0A%20%7D%0A%20input.input_file__fff___opera%0A%20%7B%0A%0A%20border%3A1px%20solid%20%23cccccc%3B%0A%20width%3A76px%0A%20%7D%0A%20input.input_file__fff___mac_dinh%0A%20%7B%0A%20margin-left%3A-170px%3B%0A%20%7D%0A%0A%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" />

<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%20%3E%0A%20%24(function()%7B%0A%20var%20btnUpload%3D%24(‘%23upload_button’)%3B%0A%20var%20status%3D%24(‘%23status_message’)%3B%0A%20new%20AjaxUpload(btnUpload%2C%20%7B%0A%20action%3A%20’jquerymultiplefileupload%2Fupload-file_1.php’%2C%0A%20name%3A%20’uploadfile’%2C%0A%20onSubmit%3A%20function(file%2C%20ext)%7B%0A%20if%20(!%20(ext%20%26%26%20%2F%5E(jpg%7Cpng%7Cjpeg%7Cgif%7Cbmp)%24%2F.test(ext)))%7B%0A%20%2F%2F%20extension%20is%20not%20allowed%0A%20status.text(‘Only%20JPG%2C%20PNG%20%2C%20GIF%20or%20BMP%20files%20are%20allowed’)%3B%0A%20return%20false%3B%0A%20%7D%0A%20status.text(‘Uploading…’)%3B%0A%20%7D%2C%0A%20onComplete%3A%20function(file%2C%20response)%7B%0A%20%2F%2FOn%20completion%20clear%20the%20status%0A%20%2F%2Falert(%22chao%22)%3B%0A%0A%20status.text(”)%3B%0A%20%2F%2FAdd%20uploaded%20file%20to%20list%0A%20if(response%3D%3D%3D%22success%22)%7B%0A%20%24(‘%0A%3Cli%3E%3C%2Fli%3E%0A%3Cp%3E’).appendTo(‘%23files_list’).html(‘%3Cimg%20src%3D%22..%2Fhinhanh_flash%2Fupload_tam%2F’%2Bfile%2B’%22%20alt%3D%22%22%20width%3D%22135px%22%20height%3D%22135px%22%2F%3E%3Cbr%20%2F%3E’).addClass(‘success’)%3B%0A%20%7D%20else%7B%0A%20%24(‘%0A%3Cli%3E%3C%2Fli%3E%0A%3Cp%3E’).appendTo(‘%23files_list’).text(file).addClass(‘error’)%3B%0A%20%7D%0A%20var%20id%3Ddocument.getElementById(%22files_list%22)%3B%0A%20var%20img%3Did.getElementsByTagName(%22img%22)%3B%0A%20%2F%2Falert(id.offsetHeight)%3B%0A%20if(img.length%3E8)%0A%20%7B%0A%20id.style.height%3D%22350px%22%3B%0A%20id.style.overflow%3D%22scroll%22%3B%0A%20%7D%0A%20%7D%0A%20%7D)%3B%0A%0A%20%7D)%3B%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />
<?php
function nut_tai($name="")
{

<h5 style="font-size: 14pt;">$trinh_duyet=phathien_trinhduyet();</h5>

switch($trinh_duyet)
{
case"abc":
$class="abc";
break;
case "opera":
$class="input_file__fff___opera";
break;
default:
$class="input_file__fff___mac_dinh";
}
echo "

<div class=\"div_input_file__999\">";
echo "<input type=\"file\" name=\"$name\" class=\"$class\">";
echo "</div>

";
}
?>

<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%20table.e_jjj%20img%0A%20%7B%0A%20width%3A150px%3B%0A%20height%3A150px%3B%0A%20margin%20%3A10px%2010px%2010px%2010px%3B%0A%20padding%20%3A5px%205px%205px%205px%3B%0A%20border%3A1px%20solid%20%23fc0884%3B%0A%20%7D%0A%20img.zzz453%0A%20%7B%0A%20width%3A150px%3B%0A%20height%3A150px%3B%0A%20margin%20%3A10px%2010px%2010px%2010px%3B%0A%20padding%20%3A5px%205px%205px%205px%3B%0A%20border%3A1px%20solid%20%23fc0884%3B%0A%20%7D%0A%20img.zzz453__hover%0A%20%7B%0A%20width%3A150px%3B%0A%20height%3A150px%3B%0A%20margin%20%3A10px%2010px%2010px%2010px%3B%0A%20padding%20%3A4px%204px%204px%204px%3B%0A%20border%3A2px%20solid%20%23fc0884%3B%0A%20%7D%0A%20div.e_jjj_1%0A%20%7B%0A%20height%3A320px%3B%0A%20overflow%3Ascroll%3B%0A%20%7D%0A%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" />

<?php

<h6 style="font-size: 14pt;">function xuat_td__jjj($hinh,$o_1)</h6>

{
$name_1="nhieu_hinh_abc__$o_1";
$name_2="hidden_nhieu_hinh_abc__$o_1";
$name_3="tuy_chon_abc__$o_1";
$link_hinh="../hinhanh_flash/sanpham/$_GET[id_sp]/$hinh";
echo "

<td>";
if($hinh!="")
{
echo "<center>";
echo "<img src=\"$link_hinh\" class=\"zzz453\" >
";

//nut_tai();
echo "<input type=\"file\" style=\"margin:0px 6px\" name=\"$name_1\">
";
echo "<input type=\"hidden\" name=\"$name_2\" value=\"$hinh\">";
echo "<select style=\"margin:6px 0px\" name=\"$name_3\">";
echo "<option value=\"\">Tùy chọn</option>";
echo "<option value=\"xoa\">Xóa</option>";
echo "</select>";

//echo "<input type=\"file\" style=\"width:10px;\">";
echo "</center>";
}
else
{
echo "&nbsp";
}
echo "</td>

";

}

<h6 style="font-size: 14pt;">function xuat_tr_td__jjj($mang_dkl)</h6>

{
$so_k=count($mang_dkl)-1;
//print_r($mang_dkl);echo "

<hr>

";
$o=0;
$k=3;
$r=1;
while(1>0)
{
$o_1=$o+1;
$hinh=$mang_dkl[$o];
//echo $i."

<hr>

";
if($r==1)
{
echo "

<tr>";
}
xuat_td__jjj($hinh,$o_1);

if($r==$k)
{
echo "</tr>

";
$r=1;
}
else
{
$r++;
}
$o++;
if($hinh=="")
{
break;
}
}
echo "<input type=\"hidden\" name=\"hd_dkl\" value=\"$o\">";
}

<h5 style="font-size: 14pt;">function echo_hinh_jjj($mang_dkl)</h5>

{
$so_k=count($mang_dkl)-1;
echo "<center>";
if($so_k<7)
{
echo "

<table class=\"e_jjj\" id=\"e_jjj\">";
xuat_tr_td__jjj($mang_dkl);
echo "</table>

";
}
else
{
echo "

<div class=\"e_jjj_1\">";
echo "

<table class=\"e_jjj\" id=\"e_jjj\">";
xuat_tr_td__jjj($mang_dkl);
echo "</table>

";
echo "</div>

";
}
echo "</center>";
}
class class__khung_sua_sanpham_menu_doc
{

<h4 style="font-size: 14pt;"> function xuly_kitu___khung_nhap_lieu___sua_sanpham_menu_doc($giatri)</h4>

{
$giatri=str_replace("\n","",$giatri);
$giatri=str_replace("\t","",$giatri);
$giatri=str_replace("\r","",$giatri);
$giatri=str_replace("’","\’",$giatri);
//$giatri=str_replace("\"","’",$giatri);
return $giatri;
}

<h3 style="font-size: 14pt;"> function khung_nhap_nhieu_sua_sanpham_menu_doc($ten,$giatri)</h3>

{
$giatri=$this->xuly_kitu___khung_nhap_lieu___sua_sanpham_menu_doc($giatri);
//echo $giatri." \$giatri
";
echo "
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%5C%22text%2Fjavascript%5C%22%3E%0A%20var%20giatri%3D%5C%22%24giatri%5C%22%3B%0A%20%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />
";
echo "
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%5C%22text%2Fjavascript%5C%22%3E%0A%0A%20var%20oFCKeditor%20%3D%20new%20FCKeditor(‘%24ten’)%3B%0A%20oFCKeditor.BasePath%20%3D%20%5C%22giaodien%2Ffckeditor%2F%5C%22%3B%0A%20oFCKeditor.Width%20%3D%20760%20%3B%0A%20oFCKeditor.Height%20%3D%20350%20%3B%22%3B%0A%20mau_fckeditor()%3B%0A%20echo%20%22oFCKeditor.Config%5B%5C%22EnterMode%5C%22%5D%20%3D%20%5C%22br%5C%22%20%3B%0A%20oFCKeditor.Value%3D’%24giatri’%3B%0A%20oFCKeditor.Create()%3B%0A%20%2F%2Fdocument.getElementById(‘xEnter’).value%20%3D%20%5C%22br%5C%22%20%3B%0A%0A%20%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />";

}

<h2 style="font-size: 14pt;">function khung_sua_sanpham_menu_doc()</h2>

{
$dulieu_sua = "select * from dulieu where id in (‘$_GET[id_sp]’)";
$query_dulieu_sua = mysql_query($dulieu_sua);
$row_dulieu_sua = mysql_fetch_array($query_dulieu_sua);
$id_ff = $row_dulieu_sua[‘id’];
$ten_hinh = $row_dulieu_sua[‘hinh_anh’];
$gia = $row_dulieu_sua[‘gia’];
$trang_thai = $row_dulieu_sua[‘trang_thai’];
$khuyen_mai = $row_dulieu_sua[‘khuyen_mai’];
$noi_dung = $row_dulieu_sua[‘noi_dung’];
$noi_dung__en = $row_dulieu_sua[‘noi_dung__en’];
$loai_gia = $row_dulieu_sua[‘loai_gia’];
$size = $row_dulieu_sua[‘size’];
$khoi_luong = $row_dulieu_sua[‘khoi_luong’];
$keywords = $row_dulieu_sua[‘keywords’];
$description = $row_dulieu_sua[‘description’];
$mo_ta_ngan = $row_dulieu_sua[‘mo_ta_ngan’];
$mo_ta_ngan = str_replace("
","",$mo_ta_ngan);
$mo_ta_ngan = str_replace("
","",$mo_ta_ngan);
$url_dep = "";
$m_r=explode("-",$row_dulieu_sua[‘url_dep’]);
for($r_1=0;$r_1<count($m_r)-1;$r_1++)
{

<h3 style="font-size: 14pt;"> $url_dep = $url_dep.$m_r[$r_1]."-";</h3>

}
//echo $url_dep."

<hr>

";
$url_dep=substr($url_dep,0,-1);
//echo $url_dep."

<hr>

";
if($loai_gia=="lien_he")
{
$gia="";
$ra2="selected";$ra1="";
}
else
{
$ra1="selected";$ra2="";
}
echo "

<table width=\"970px\" id=\"er\" style=\"margin:6px 0px\">";
echo "

<form action=\"\" style=\"margin:0\" method=\"post\" enctype=\"multipart/form-data\">";
echo "

<tr>";
echo "

<td colspan=\"2\">";
echo "<span style=\"float:left\">Sữa sản phẩm</span>";
//echo "<a href=\"?thamso=quanly_dulieu_left_menu&id_menu=$_GET[id_menu]&trang=$_GET[trang]\"
echo "<a href=\"?thamso=".$_GET[‘ts_cu’]."&id_menu=$_GET[id_menu]&trang=$_GET[trang]\" style=\"float:right;margin-right:5px;color:#0b55c4;text-decoration: none;\" >";
echo "Đóng";
echo "</a>";
echo "</td>

";
echo "</tr>

";
echo "

<tr>";
echo "

<td width=\"20%\" align=\"left\"><b>Tiêu đề : </b></td>

";
echo "

<td width=\"80%\" align=\"left\"><input name=\"tieude\" size=\"25\" value=\"$row_dulieu_sua[tieu_de]\"></td>

";
echo "</tr>

";
//xuat_tr("Tiêu đề :
(English)","<input name=\"tieude_en\" size=\"70\" value=\"$row_dulieu_sua[tieu_de__en]\">");
echo "

<tr>";
echo "

<td width=\"20%\" align=\"left\" valign=\"top\"><b>Hình ảnh : </b></td>

";
echo "

<td width=\"80%\" align=\"left\">";
echo "<input type=\"file\" name=\"uploadedfile\">
";
echo "<img src=\"../hinhanh_flash/sanpham/$ten_hinh\" style=’max-width:266px; max-height:266px’>";
echo "<input type=\"hidden\" name=\"ten_anh\" value=\"$ten_hinh\">";
echo "</td>

";
echo "</tr>

";
echo "

<tr>";
echo "

<td width=\"20%\" align=\"left\"><b>
<h4 style="font-size: 14pt;">Up nhiều hình : </h4>

</b></td>

";
echo "

<td width=\"80%\" align=\"left\">";
echo "<span style=’cursor:pointer;color:blue;font-size:14px’ onclick=’ham_jjj_3()’>Chỉnh sữa</span>";
echo "

<div style=’overflow:scroll;width:600px;height:400px;display:none’ id=’sss2′ >";
$mm_2=explode("____",$row_dulieu_sua[‘nhieu_hinh_anh’]);
$vvc=1;
//for($ew=0;$ew<count($mm_2);$ew++)
for($kk_1=1;$kk_1<=12;$kk_1++)
{
$ew=$kk_1;
$n_p="up_hinh_".$vvc;
$n_p_1="hd_up_hinh_".$vvc;
$n_p_2="xoa_anh_".$vvc;
if(trim($mm_2[$ew])!="")
{
$vl_hd=trim($mm_2[$ew]);
$ten_hinh_45=trim($mm_2[$ew]);
echo "<img src=\"../hinhanh_flash/sanpham/$id_ff/$ten_hinh_45\" style=’max-width:266px; max-height:266px’>";

}
echo "

";

<h5 style="font-size: 14pt;">echo "<input type=’file’ name=’$n_p’/>";</h5>

echo "<select name=’$n_p_2′ style=’margin-left:5px’ >";
echo "<option value=’khong’ >";
echo "Tùy chọn";
echo "</option>";
echo "<option value=’co’ >";
echo "Xóa ảnh";
echo "</option>";
echo "</select>";
echo "<input type=’hidden’ name=’$n_p_1′ value=’$vl_hd’/>";
echo "

<hr>

";
$vvc++;
$vl_hd="";
}
echo "</div>

";
echo "</td>

";
echo "</tr>

";

echo "

<tr>";
echo "

<td width=\"20%\" align=\"left\"><b>Giá bán : </b></td>

";
echo "

<td width=\"80%\" align=\"left\"><input name=\"giaban\" size=\"25\" value=\"$gia\">";

echo "</td>

";
echo "</tr>

";
/*echo "

<tr>";
echo "

<td width=\"20%\" align=\"left\"><b>Khối lượng : </b></td>

";
echo "

<td width=\"80%\" align=\"left\"><input name=\"khoi_luong\" size=\"25\" value=\"$khoi_luong\">";

echo "</td>

";
echo "</tr>

";
echo "

<tr>";
echo "

<td width=\"20%\" align=\"left\" valign=’top’><b>Size : </b></td>

";
echo "

<td width=\"80%\" align=\"left\"><input name=\"size\" size=\"25\" value=\"$size\">";
echo ‘<a href="javascript:voild(0)" style="margin-left:20px" onclick="ddd5()">Xem cách chọn size</a>’;
echo ‘

<div style="width:5px;height:3px;overflow:hidden"></div>

‘;
echo ‘

<div id="ddd5" style="margin-left:194px;display:none">Dùng dấu \’_\’ để phân cách size
Ví dụ : Nhập \’S_M_L_XL_XXL\’ thì sẽ được 5 size S,M,L,XL,XXL </div>

‘;
echo "</td>

";
echo "</tr>

";*/
echo "

<tr>";
echo "

<td width=\"20%\" align=\"left\"><b>Mô tả ngắn : </b></td>

";
echo "

<td width=\"80%\" align=\"left\"><textarea name=’mo_ta_ngan’ style=’width:300px;height:60px’>$mo_ta_ngan</textarea>";

echo "</td>

";
echo "</tr>

";
echo "

<tr>";
echo "

<td width=\"20%\" align=\"left\"><b>Keywords : </b></td>

";
echo "

<td width=\"80%\" align=\"left\"><input name=\"keywords\" size=\"25\" value=\"$keywords\">";

echo "</td>

";
echo "</tr>

";
echo "

<tr>";
echo "

<td width=\"20%\" align=\"left\"><b>Description : </b></td>

";
echo "

<td width=\"80%\" align=\"left\"><input name=\"description\" size=\"25\" value=\"$description\">";

echo "</td>

";
//xuat_tr("Trạng thái :
(English)","<input name=\"trang_thai__en\" size=\"70\" value=\"$row_dulieu_sua[trang_thai__en]\">");

//xuat_tr("Khuyến mãi :
(English)","<input name=\"khuyen_mai__en\" size=\"70\" value=\"$row_dulieu_sua[khuyen_mai__en]\">");

echo "</tr>

";
echo "

<tr>";
echo "

<td width=\"20%\" align=\"left\"><b>Url đẹp : </b></td>

";
echo "

<td width=\"80%\" align=\"left\"><input name=\"url_dep\" size=\"25\" value=\"$url_dep\">";

echo "</td>

";
echo "</tr>

";
echo "

<tr>";
echo "

<td width=\"20%\" valign=\"top\" align=\"left\"><b>Nội dung : <b></td>

";
echo "

<td width=\"80%\" valign=\"top\" align=\"left\">";
//xuat_select();
echo "

<div id=\"div_vn_afc\">";
//echo "tieng viet";
mau_fckeditor_2();
$this->khung_nhap_nhieu_sua_sanpham_menu_doc("noidung",$noi_dung);
echo "</div>

";

echo "</td>

";
echo "</tr>

";
echo "

<tr>";
echo "

<td >";
echo " ";
echo "</td >";
echo "

<td >";
echo "<input type=\"submit\" class=\"nut_chapnhan\" value=\"Chấp nhận\" name=\"sua_dulieu_menu_doc\">";
echo "</td>

";
echo "</tr>

";
echo "</form>

";
echo "</table>

";
}
}

$class__khung_sua_sanpham_menu_doc=new class__khung_sua_sanpham_menu_doc;
$class__khung_sua_sanpham_menu_doc->khung_sua_sanpham_menu_doc();

?>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20table_css_2(%22er%22)%3B%0A%20function%20yyy_ze()%0A%20%7B%0A%20var%20id%3Ddocument.getElementById(%22e_jjj%22)%3B%0A%20var%20id_td%3Did.getElementsByTagName(%22td%22)%3B%0A%20for(f%3D0%3Bf%3Cid_td.length%3Bf%2B%2B)%0A%20%7B%0A%20id_td%5Bf%5D.style.border%3D%220px%20solid%20red%22%3B%0A%20if(id_td%5Bf%5D.getElementsByTagName(%22img%22).length!%3D0)%0A%20%7B%0A%20var%20img_jem%3Did_td%5Bf%5D.getElementsByTagName(%22img%22)%5B0%5D%3B%0A%20img_jem.onmouseover%3Dfunction()%0A%20%7B%0A%20%2F%2Falert(%22vao%20day%22)%3B%0A%20this.style.border%3D%222px%20solid%20%23fc0884%22%3B%0A%20this.style.padding%3D%224px%22%3B%0A%20%2F%2Fthis.className%3D%22zzz453__hover%22%3B%0A%20%7D%0A%20img_jem.onmouseout%3Dfunction()%0A%20%7B%0A%20this.style.border%3D%221px%20solid%20%23fc0884%22%3B%0A%20this.style.padding%3D%225px%22%3B%0A%20%2F%2Fthis.className%3D%22zzz453%22%3B%0A%20%7D%0A%20%7D%0A%20%7D%0A%20id.style.border%3D%220px%20solid%20red%22%3B%0A%20%7D%0A%20yyy_ze()%3B%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20table_css_2(%22er%22)%3B%0A%20var%20ss_cap_do%3D%22%3C%3Fphp%20echo%20%24_SESSION%5B’capdo’%5D%3B%20%3F%3E%22%3B%0A%20var%20hop_chon_5%3Ddocument.getElementById(%22hop_chon_5%22)%3B%0A%20var%20option_55%3Dhop_chon_5.getElementsByTagName(%22option%22)%3B%0A%20%2F%2Falert(option_55%5B0%5D.value)%3B%0A%20%2F%2Falert(ss_cap_do)%3B%0A%20for(i%3D0%3Bi%3Coption_55.length%3Bi%2B%2B)%0A%20%7B%0A%20if(option_55%5Bi%5D.value%3D%3Dss_cap_do)%0A%20%7B%0A%20option_55%5Bi%5D.selected%3Dtrue%3B%0A%20%2F%2Falert(%22selected%22)%3B%0A%20%7D%0A%20%7D%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />[/sourcecode]

43. include_file(” cumchucnang/ quanly_dulieu__menu_ngang/ quanly_dulieu_menu_ngang.php”);

[sourcecode language=”plain”]<?php chongphahoai(); include("cumchucnang/quanly_dulieu__menu_ngang/xoa_dulieu_menu_ngang.php"); ?>

<table >

<tr>

<td >
<?php //include("cumchucnang/quanly_dulieu__menu_ngang/xuat_menu_option_quanly.php"); ?>
</td>

</tr>

<tr>

<td valign="top" align="left">
<?php include_file("cumchucnang/quanly_dulieu__menu_ngang/bienluan_xuat_quanly_dulieu.php"); ?>
</td>

</tr>

</table>

[/sourcecode]

44. include_file(” cumchucnang/ quanly_dulieu__menu_ngang/ sua_dulieu_menu_ngang.php”);

[sourcecode language=”plain”]<?php

chongphahoai();
//echo "sua san pham menu doc

<hr>

";

function xuly_kitu___khung_nhap_lieu___sua_sanpham_menu_ngang($giatri){
$giatri=str_replace("\n","",$giatri);
$giatri=str_replace("\t","",$giatri);
$giatri=str_replace("\r","",$giatri);
$giatri=str_replace("’","\’",$giatri);
//$giatri=str_replace("\"","’",$giatri);
return $giatri;
}

function khung_nhap_nhieu_sua_sanpham_menu_ngang($ten,$giatri)
{
$giatri=xuly_kitu___khung_nhap_lieu___sua_sanpham_menu_ngang($giatri);
//echo $giatri." \$giatri
";
echo "
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%5C%22text%2Fjavascript%5C%22%3E%0A%20var%20giatri%3D%5C%22%24giatri%5C%22%3B%0A%20%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />
";
echo "
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%5C%22text%2Fjavascript%5C%22%3E%0A%0A%20var%20oFCKeditor%20%3D%20new%20FCKeditor(‘%24ten’)%3B%0A%20oFCKeditor.BasePath%20%3D%20%5C%22giaodien%2Ffckeditor%2F%5C%22%3B%0A%20oFCKeditor.Width%20%3D%20770%20%3B%22%3B%0A%20mau_fckeditor()%3B%0A%20echo%20%22oFCKeditor.Config%5B%5C%22EnterMode%5C%22%5D%20%3D%20%5C%22br%5C%22%20%3B%0A%20oFCKeditor.Value%3D’%24giatri’%3B%0A%20oFCKeditor.Create()%3B%0A%20document.getElementById(‘xEnter’).value%20%3D%20%5C%22br%5C%22%20%3B%0A%0A%20%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />";

}
function khung_sua_sanpham_menu_ngang()
{

$dulieu_sua="select * from du_lieu_mot_tin where id in (‘$_GET[id_mnn]’)";
//echo $dulieu_sua." \$dulieu_sua

<hr>

";
$query_dulieu_sua=mysql_query($dulieu_sua);
$row_dulieu_sua=mysql_fetch_array($query_dulieu_sua);
$a1="$row_dulieu_sua[ten]";
$a10="$row_dulieu_sua[tieu_de__en]";
$a2="$row_dulieu_sua[hinh_anh]";
$a3="$row_dulieu_sua[noi_dung]";
$a30="$row_dulieu_sua[noi_dung]";
$duongdan_anh="../hinhanh_flash/tintuc/$row_dulieu_sua[hinh_anh]";
print ‘

<table width="970px" id="er" style="margin:6px 0px">

<form action="" border="1" method="post" enctype="multipart/form-data" style="margin:0">

<tr>

<td colspan="2">
<span style="float:left">
Sữa bài viết
</span>
<a href="?thamso=quanly_dulieu_menu_ngang&id_menu=’.$_GET[‘id_menu’].’&trang=’.$_GET[‘trang’].’" class="nut_dong_1">Đóng</a>
</td>

</tr>

<tr>

<td width="20%" align="left"><b>Id : </b></td>

<td width="80%" align="left">’.$row_dulieu_sua[‘id’].’</td>

</tr>

<tr>

<td width="20%" align="left"><b>Tiêu đề : </b></td>

<td width="80%" align="left"><input name="tieude" size="70" value="’.$a1.’"></td>

</tr>

<tr>

<td width="20%" align="left"><b>Keywords : </b></td>

<td width="80%" align="left"><input name="keywords" size="70" value="’.$row_dulieu_sua[‘keywords’].’"></td>

</tr>

<tr>

<td width="20%" align="left"><b>Description : </b></td>

<td width="80%" align="left"><input name="description" size="70" value="’.$row_dulieu_sua[‘description’].’"></td>

</tr>

<tr>

<td width="20%" valign="top" align="left"><b>Nội dung : </b></td>

<td width="80%" valign="top" align="left">’;
//xuat_select();
echo "

<div id=\"div_vn_afc\">";
mau_fckeditor_2();
khung_nhap_nhieu_sua_sanpham_menu_ngang("noidung",$a3);
echo "</div>

";
echo "

<div id=\"div_en_afc\" style=\"display:none\">";
//khung_nhap_nhieu_sua_sanpham_menu_ngang("noidung_en",$a30);
echo "</div>

";

print ‘</td>

</tr>

<tr>

<td> </td>

<td>
<input type="submit" class="nut_chapnhan" value="Chấp nhận" name="sua_dulieu_menu_ngang">
</td>

</tr>

</form>

</table>

‘;
}

?>
<?php khung_sua_sanpham_menu_ngang(); ?>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20table_css_2(%22er%22)%3B%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />
[/sourcecode]

45. include_file(” cumchucnang/ quanly_dulieu__menu_ngang/ quanly_tintuc.php”);

[sourcecode language=”plain”]<?php chongphahoai(); ?>
<?php
if($_POST[‘form_trang’]==’form_trang’)
{
//thongbao("vao day");
for($i=1;$i<=15;$i++) { $name_1="sx_".$i; $name_2="id_".$i; $sx=$_POST[$name_1]; $id=$_POST[$name_2]; $up="UPDATE `dulieu_1` SET `sap_xep` = ‘$sx’ WHERE `id` =’$id’;"; mysql_query($up); } trang_truoc(); exit(); } ?>

<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%20table.xqldltmn_khung%0A%20%7B%0A%20border%3A%201px%20%236B8E23%20solid%3B%0A%20border-collapse%3A%20collapse%3B%0A%20width%3A%20100%25%3B%0A%20%7D%0A%20table.xqldltmn_khung%20td%0A%20%7B%0A%20border%3A%201px%20%236B8E23%20solid%3B%0A%20border-collapse%3A%20collapse%3B%0A%20%7D%0A%0A%20tr.xqldltmn_hangdau%0A%20%7B%0A%20background%3A%23F0FFFF%3B%0A%20%7D%0A%20a.xqldltmn_hangdau%3Alink%20%7B%20text-decoration%3A%20none%3B%20color%3A%20%23000080%3B%20font-weight%3A%20bold%3B%7D%0A%20a.xqldltmn_hangdau%3Avisited%20%7B%20color%3A%20%23000080%3B%20text-decoration%3A%20none%3B%20font-weight%3A%20bold%3B%7D%0A%20a.xqldltmn_hangdau%3Ahover%20%7B%20text-decoration%3A%20none%3B%20color%3A%23000080%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%20%7D%0A%0A%20a.xqldltmn_tieude%3Alink%20%7B%20text-decoration%3A%20none%3B%20color%3A%20%23800080%3B%20font-weight%3A%20bold%3B%7D%0A%20a.xqldltmn_tieude%3Avisited%20%7B%20color%3A%20%23800080%3B%20text-decoration%3A%20none%3B%20font-weight%3A%20bold%3B%7D%0A%20a.xqldltmn_tieude%3Ahover%20%7B%20text-decoration%3A%20underline%3B%20color%3A%23800080%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%20%7D%0A%0A%0A%0A%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" />

<?php
function rem($id)
{
$v="select count(*) from dulieu_1 where thuoc_menu in (‘$id’)";
$v1=mysql_query($v);
$v2=mysql_fetch_row($v1);
return $v2[0];
}
function dulieu_sp()
{
if($_GET[‘id_menu’]!="")
{
$rem=rem($_GET[‘id_menu’]);
$c=$c." ( select * from dulieu_1 where thuoc_menu in (‘$_GET[id_menu]’) order by id desc limit $rem ) union ";
}
else
{
$c="";
}
$tv="select * from menu_ngang where thuoc_menu in (‘$_GET[id_menu]’) and loai not in (‘trang_chu’,’lien_he’,’toanbo_sanpham’)";
$tv_1=mysql_query($tv);
while($tv_2=mysql_fetch_array($tv_1))
{
$id_menu_cap_mot=$tv_2[‘id’];
$rem=rem($id_menu_cap_mot);
$c=$c." ( select * from dulieu_1 where thuoc_menu in (‘$id_menu_cap_mot’) order by id desc limit $rem ) union ";
$r="select count(*) from menu_ngang where thuoc_menu in (‘$id_menu_cap_mot’)";
$r_1=mysql_query($r);
$r_2=mysql_fetch_row($r_1);
if($r_2[0]!=0)
{
$b="select * from menu_ngang where thuoc_menu in (‘$id_menu_cap_mot’)";
$b1=mysql_query($b);
while($b2=mysql_fetch_array($b1))
{
$rem=rem($b2[‘id’]);
$c=$c." ( select * from dulieu_1 where thuoc_menu in (‘$b2[id]’) order by id desc limit $rem ) union ";
}
}
}
$c=substr($c,0,-6);
//echo $c."

<hr>

";
return $c;
}
class phantrang_xuatlink
{
function tu_khoa_get()
{
return "trang";
}
function link_url()
{
$tu_khoa_get=$this->tu_khoa_get();
return "?thamso=quanly_dulieu_menu_ngang&id_menu=$_GET[id_menu]&$tu_khoa_get=";
}
function trang_truoc()
{
$link_url=$this->link_url();
$tu_khoa_get=$this->tu_khoa_get();
if($_GET[$tu_khoa_get]=="" or $_GET[$tu_khoa_get]==1){$a=1;}else{$a=($_GET[$tu_khoa_get]-1);}
$link_url_1=$link_url."$a";
echo "<a href=\"$link_url_1\" class=\"phantrang\">";
echo "Trang trước ";
echo "</a>";
}
function trang_sau($st)
{
$link_url=$this->link_url();
$tu_khoa_get=$this->tu_khoa_get();

if($_GET[$tu_khoa_get]==$st){$a=$st;}else{$a=($_GET[$tu_khoa_get]+1);}
if($_GET[$tu_khoa_get]=="" or $_GET[$tu_khoa_get]==1){$a=2;}
$link_url_1=$link_url."$a";
echo "<a href=\"$link_url_1\" class=\"phantrang\">";
echo " Trang sau ";
echo "</a>";
}
function cham_cham_duoi($gioi_han_tren,$st)
{
$link_url=$this->link_url();
$tu_khoa_get=$this->tu_khoa_get();
$link_url_1=$link_url."$st";
if($gioi_han_tren<$st)
{
$a=$st-1;
if($a!=$gioi_han_tren)
{
echo " … ";
}
echo "<a href=\"$link_url_1\" class=\"phantrang\">";
echo "$st ";
echo "</a>";
}
}
function cham_cham_tren($gioi_han_duoi)
{
$link_url=$this->link_url();
$tu_khoa_get=$this->tu_khoa_get();
$link_url_1=$link_url."1";
if($gioi_han_duoi>2)
{
echo "<a href=\"$link_url_1\" class=\"phantrang\">";
echo "1 ";
echo "</a>";
echo " … ";
}
if($gioi_han_duoi==2)
{
echo "<a href=\"?$tu_khoa_get=1\" class=\"phantrang\">";
echo "1 ";
echo "</a>";
}
}
function gioi_han_tren($trang_hien_tai)
{
$link_url=$this->link_url();
$tu_khoa_get=$this->tu_khoa_get();
$gioi_han_tren=$trang_hien_tai+4;
if($gioi_han_tren>=5 and $gioi_han_tren<9) { $gioi_han_tren=9; } return $gioi_han_tren; } function gioi_han_duoi($trang_hien_tai,$st) { $link_url=$this->link_url();
$tu_khoa_get=$this->tu_khoa_get();
$cao_nhat=$st-8;
$gioi_han_duoi=$trang_hien_tai-4;
if($gioi_han_duoi>$cao_nhat)
{
$gioi_han_duoi=$cao_nhat;
}
return $gioi_han_duoi;
}
function xuat_link($st)
{
$link_url=$this->link_url();
$tu_khoa_get=$this->tu_khoa_get();
if($_GET[$tu_khoa_get]==""){$trang_hien_tai=1;}else{$trang_hien_tai=$_GET[$tu_khoa_get];}
$gioi_han_tren=$this->gioi_han_tren($trang_hien_tai);
$gioi_han_duoi=$this->gioi_han_duoi($trang_hien_tai,$st);
$this->trang_truoc();
$this->cham_cham_tren($gioi_han_duoi);

for($i=$gioi_han_duoi;$i<=$gioi_han_tren;$i++) { $link_url_1=$link_url."$i"; $link_phan_trang=$link_url_1; if($i>0 and $i<=$st)
{
echo "<a href=\"$link_phan_trang\" class=\"phantrang\">";
echo "$i ";
echo "</a>";
}
}

$this->cham_cham_duoi($gioi_han_tren,$st);
$this->trang_sau($st);
}
}
$phantrang_xuatlink=new phantrang_xuatlink;
?>
<?php
$sd=15;
function xuat_cac_link_phan_trang($st){
//echo $st;
for($i=1;$i<=$st;$i++)
{
$link="?thamso=quanly_dulieu_menu_ngang&id_menu=$_GET[id_menu]&page=$i";
echo "<a href=\"$link\" class=\"phantrang\">";
echo $i." ";
echo "</a>";
}
}
function dem_dulieu_menu_ngang(){
$dem="select count(*) from dulieu_1 ";
$query_dem=mysql_query($dem);
$row_dem=mysql_fetch_row($query_dem);
return $row_dem[0];
}
function tinh_so_trang_menu_ngang($sd){
$dem_dulieu_menu_ngang=dem_dulieu_menu_ngang();
$st=ceil($dem_dulieu_menu_ngang/$sd);
return $st;
}

if($_GET[‘trang’]=="")
{
$vtbd=0;
}
else
{
$vtbd=($_GET[‘trang’]-1)*$sd;
}

//$st=tinh_so_trang_menu_ngang($sd);
echo "

<form action=” method=’post’ style=\"margin:0\">";
echo "

<table id=\"er\">";
echo "

<tr >";

echo "

<td width=\"320px\" >";
echo "Tiêu đề";
echo "</td>

";
//echo "

<td width=\"320px\">";
//echo "Link liên kết";
//echo "</td>

";
echo "

<td width=\"330px\" align=\"center\">";
echo "Nội dung";
echo "</td>

";
echo "

<td width=\"100px\" align=\"center\">";
echo "Sắp xếp";
echo "</td>

";
echo "

<td width=\"100px\" align=\"center\">";
echo "Sữa";
echo "</td>

";
echo "

<td width=\"100px\" align=\"center\">";
echo "Xóa";
echo "</td>

";

echo "</tr>

";
//$dulieu_sp="select * from dulieu_1 order by id desc limit $vtbd,$sd";
//$dulieu_sp_1=dulieu_sp();

//$dulieu_sp=dulieu_sp();
$dulieu_sp="select * from dulieu_1 order by sap_xep desc limit $vtbd,$sd";
//$dulieu_sp=$dulieu_sp." limit $vtbd,$sd";
$row=mysql_fetch_row(mysql_query("select count(*) from dulieu_1"));
$st=ceil($row[0]/$sd);
//$st=5;
$query_dulieu_sp=mysql_query($dulieu_sp);
$r=1;
while($row_dulieu_sp=mysql_fetch_array($query_dulieu_sp))
{
$id=$row_dulieu_sp[‘id’];
$noi_dung=noi_dung_cat_ngan($row_dulieu_sp[‘noi_dung’],25);
$sap_xep=$row_dulieu_sp[‘sap_xep’];
$name_1="sx_".$r;
$name_2="id_".$r;

$id_tt=$row_dulieu_sp[‘id’];
$link_sua="?thamso=sua_tin_tuc&id=$id_tt&trang=$_GET[trang]";
$link_xoa="?thamso=quanly_dulieu_menu_ngang&xoa_dulieu_menu_ngang=co&id_menu=$_GET[id_menu]&id_mnn=$id_tt";
echo "

<tr>";
echo "

<td align=\"left\">";
echo "<a href=\"$link_sua\" class=\"thua__link_10\">";
echo "$row_dulieu_sp[tieu_de]";
echo "</a>";
echo "</td>

";
//echo "

<td align=\"left\" style=’font-size:14px’>";

//echo cat_chuoi_789($row_dulieu_sp[‘noi_dung’],0,150);
//echo $row_dulieu_sp[‘url_dep’]."-".$row_dulieu_sp[‘id’];

//echo "</td>

";
echo "

<td align=\"left\">
$noi_dung
</td>

";
echo "

<td align=\"center\">
<input size=’5′ style=’margin:3px’ value=’$sap_xep’ name=’$name_1′ >
<input type=’hidden’ value=’$id’ name=’$name_2′ >
</td>

";
echo "

<td align=\"center\">";
echo "<a href=\"$link_sua\" class=\"sua_xoa\">";
echo "Sữa";
echo "</a>";
echo "</td>

";
echo "

<td align=\"center\">";
echo "<a href=\"$link_xoa\" class=\"sua_xoa\">";
echo "Xóa";
echo "</a>";
echo "</td>

";

echo "</tr>

";
$r++;
}
echo "

<tr>";
echo "

<td width=\"50px\" align=\"center\" colspan=’2′ > </td>

";
echo "

<td width=\"50px\" align=\"center\" >
<input type=’hidden’ name=’form_trang’ value=’form_trang’ >
<input type=’submit’ value=’Thay đổi’ style=’margin:3px’ >
</td>

";
echo "

<td width=\"50px\" align=\"center\" colspan=’2′ > </td>

";

echo "</tr>

";
echo "

<tr>";
echo "

<td colspan=\"5\">";
xuat_link_dkl($st);
echo "</td>

";
echo "</tr>

";
echo "</table>

";
echo "</form>

";
//xuat_cac_link_phan_trang($st);
//$phantrang_xuatlink->xuat_link($st);
?>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20table_css_2(%22er%22)%3B%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />

[/sourcecode]

46. include_file(” cumchucnang/ quanly_dulieu__menu_ngang/ sua_tin_tuc.php”);

[sourcecode language=”plain”]<?php

chongphahoai();
//echo "sua san pham menu doc

<hr>

";

function xuly_kitu___khung_nhap_lieu___sua_sanpham_menu_ngang($giatri){
$giatri=str_replace("\n","",$giatri);
$giatri=str_replace("\t","",$giatri);
$giatri=str_replace("\r","",$giatri);
$giatri=str_replace("’","\’",$giatri);
//$giatri=str_replace("\"","’",$giatri);
return $giatri;
}
function khung_nhap_nhieu_sua_sanpham_menu_ngang($ten,$giatri)
{
$giatri=xuly_kitu___khung_nhap_lieu___sua_sanpham_menu_ngang($giatri);
//echo $giatri." \$giatri
";
echo "
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%5C%22text%2Fjavascript%5C%22%3E%0A%20var%20giatri%3D%5C%22%24giatri%5C%22%3B%0A%20%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />
";
echo "
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%5C%22text%2Fjavascript%5C%22%3E%0A%0A%20var%20oFCKeditor%20%3D%20new%20FCKeditor(‘%24ten’)%3B%0A%20oFCKeditor.BasePath%20%3D%20%5C%22giaodien%2Ffckeditor%2F%5C%22%3B%0A%20oFCKeditor.Width%20%3D%20770%20%3B%22%3B%0A%20mau_fckeditor()%3B%0A%20echo%20%22oFCKeditor.Config%5B%5C%22EnterMode%5C%22%5D%20%3D%20%5C%22br%5C%22%20%3B%0A%20oFCKeditor.Value%3D’%24giatri’%3B%0A%20oFCKeditor.Create()%3B%0A%20document.getElementById(‘xEnter’).value%20%3D%20%5C%22br%5C%22%20%3B%0A%0A%20%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />";

}
function khung_sua_sanpham_menu_ngang()
{

$dulieu_sua="select * from dulieu_1 where id in (‘$_GET[id]’)";
//echo $dulieu_sua." \$dulieu_sua

<hr>

";
$query_dulieu_sua=mysql_query($dulieu_sua);
$row_dulieu_sua=mysql_fetch_array($query_dulieu_sua);
$a1="$row_dulieu_sua[tieu_de]";
$a10="$row_dulieu_sua[tieu_de__en]";
$a2="$row_dulieu_sua[hinh_anh]";
$a3="$row_dulieu_sua[noi_dung]";
$a30="$row_dulieu_sua[noi_dung__en]";
$a111="$row_dulieu_sua[keywords]";
$a112="$row_dulieu_sua[description]";
$url_dep = "";
$m_r=explode("-",$row_dulieu_sua[‘url_dep’]);
for($r_1=0;$r_1<count($m_r)-1;$r_1++)
{
$url_dep = $url_dep.$m_r[$r_1]."-";
}
//echo $url_dep."

<hr>

";
$url_dep=substr($url_dep,0,-1);
$duongdan_anh="../hinhanh_flash/tintuc/$row_dulieu_sua[hinh_anh]";
print ‘

<table width="970px" id="er" style="margin:6px 0px">

<form action="" border="1" method="post" enctype="multipart/form-data" style="margin:0">

<tr>

<td colspan="2">
<span style="float:left">
Sữa tin tức
</span>
<a href="?thamso=quanly_tintuc&trang=’.$_GET[‘trang’].’" class="nut_dong_1">Đóng</a>
</td>

</tr>

<tr>

<td width="20%" align="left"><b>Tiêu đề : </b></td>

<td width="80%" align="left"><input name="tieude" size="70" value="’.$a1.’"></td>

</tr>

<tr>

<td width="20%" align="left" valign="top"><b>Hình ảnh : </b></td>

<td width="80%" align="left">
<input type="file" name="uploadedfile">
<img src="’.$duongdan_anh.’" width="130px" height="100px">
<input type="hidden" name="ten_anh" value="’.$a2.’">
</td>

</tr>

<tr>

<td width="20%" align="left"><b>Keywords : </b></td>

<td width="80%" align="left"><input name="keywords" size="70" value="’.$a111.’"></td>

</tr>

<tr>

<td width="20%" align="left"><b>Description : </b></td>

<td width="80%" align="left"><input name="description" size="70" value="’.$a112.’"></td>

</tr>

<tr>

<td width="20%" align="left"><b>Url đẹp : </b></td>

<td width="80%" align="left"><input name="url_dep" size="70" value="’.$url_dep.’"></td>

</tr>

<tr>

<td width="20%" valign="top" align="left"><b>Nội dung : </b></td>

<td width="80%" valign="top" align="left">’;
//xuat_select();
echo "

<div id=\"div_vn_afc\">";
mau_fckeditor_2();
khung_nhap_nhieu_sua_sanpham_menu_ngang("noidung",$a3);
echo "</div>

";
//echo "

<div id=\"div_en_afc\" style=\"display:none\">";
//khung_nhap_nhieu_sua_sanpham_menu_ngang("noidung_en",$a30);
//echo "</div>

";

print ‘</td>

</tr>

<tr>

<td> </td>

<td>
<input type="submit" class="nut_chapnhan" value="Chấp nhận" name="sua_tin_tuc">
</td>

</tr>

</form>

</table>

‘;
}

?>
<?php khung_sua_sanpham_menu_ngang(); ?>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20table_css_2(%22er%22)%3B%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />
[/sourcecode]

47. include_file(” cumchucnang/ quanly_dulieu__menu_ngang /them_dulieu_menu_ngang.php”);

[sourcecode language=”plain”]<?php chong_pha_hoai(); ?>
<?php
function option_khoangtrang_menu_ngang($capdo_menu,$cap)
{

$d="select count(*) from menu where id_menu in (‘$capdo_menu’) and loai not in (‘trangchu’,’lienhe’)";
//echo $d."

<hr>

";

$d1=mysql_query($d);
$d2=mysql_fetch_row($d1);

//echo $d2[0]."lllllllllllllll\n
";
if($d2[0]!=0)
{
$cap=$cap + 1;

$cd="select * from menu where id_menu in (‘$capdo_menu’) and loai not in (‘trangchu’,’lienhe’)";
//echo $cd."\$cd ttttttttttttttt
";
$cd1=mysql_query($cd);
$cd2=mysql_fetch_array($cd1);
$capdo_menu=$cd2[‘capdo’];
//echo $cd2[‘capdo_menu’]."vvvvvvvvvvvvvvvvv
";
option_khoangtrang_menu_ngang($capdo_menu,$cap);
}
else
{

for($i=1;$i<$cap;$i++)
{
if(!isset($khoang_trang))
{
$khoang_trang="  ";
}
else
{
$khoang_trang=$khoang_trang."  ";
}
echo $khoang_trang;
}
}
}

function option_cap_hai($id_cha)
{
$menu="select * from menu_ngang where thuoc_menu in (‘$id_cha’) and loai not in (‘trangchu’,’lienhe’,’toanbo_sanpham’) ";
$query_menu=mysql_query($menu);
while($row_menu=mysql_fetch_array($query_menu))
{
$row_menu[‘ten’]=stripslashes($row_menu[‘ten’]);
echo "<option value=\"$row_menu[id]\">";
//option_khoangtrang_menu_ngang($row_menu[‘capdo’],1);
echo "___";
echo $row_menu[‘ten’];
echo "</option>\n";
}
//dequy_menu();
}
function khung1()
{
print ‘

<table width="970px" id="er" style="margin:6px 0px">

<form action="" border="1" method="post" enctype="multipart/form-data" style="margin:0">

<tr>

<td colspan="2">Thêm tin tức</td>

</tr>

<tr style="display:none">

<td width="20%" align="left"><b>Cấp độ : </b></td>

<td width="80%" align="left">’;
echo "<select name=\"capdo\">";
$menu="select * from menu_ngang where thuoc_menu in (”) and loai not in (‘trangchu’,’lienhe’,’toanbo_sanpham’)";
$query_menu=mysql_query($menu);

while($row_menu=mysql_fetch_array($query_menu))
{
$row_menu[‘ten’]=stripslashes($row_menu[‘ten’]);
echo "<option value=\"$row_menu[id]\">";
echo $row_menu[‘ten’];
echo "</option>\n";
//echo "
";
$xacdinh_menu_con="select count(*) from menu_ngang where thuoc_menu in (‘$row_menu[id]’) and loai not in (‘trangchu’,’lienhe’,’toanbo_sanpham’)";
//echo $xacdinh_menu_con."
";
$query_xacdinh_menu_con=mysql_query($xacdinh_menu_con);
$row_xacdinh_menu_con=mysql_fetch_row($query_xacdinh_menu_con);
//echo $row_xacdinh_menu_con[0];
if($row_xacdinh_menu_con[0]==0)
{

}
else
{
option_cap_hai($row_menu[‘id’]);
}

}
echo "</select>";
print ‘

</td>

</tr>

<tr>

<td width="20%" align="left"><b>Tiêu đề :</b> </td>

<td width="80%" align="left"><input name="tieude" size="70"></td>

</tr>

‘;
//xuat_tr("Tiêu đề :
(English)","<input name=\"tieude_en\" size=\"70\">");
print ‘

<tr>

<td width="20%" align="left"><b>Hình ảnh :</b> </td>

<td width="80%" align="left"><input type="file" name="uploadedfile"></td>

</tr>

<tr>

<td width="20%" align="left"><b>Keywords :</b> </td>

<td width="80%" align="left"><input name="keywords" size="70"></td>

</tr>

<tr>

<td width="20%" align="left"><b>Description :</b> </td>

<td width="80%" align="left"><input name="description" size="70"></td>

</tr>

<tr>

<td width="20%" align="left"><b>Url đẹp :</b> </td>

<td width="80%" align="left"><input name="url_dep" size="70"></td>

</tr>

<tr>

<td width="20%" valign="top" align="left"><b>Nội dung :</b> </td>

<td width="80%" valign="top" align="left">’;
//xuat_select();
mau_fckeditor_2();
?>

<div id="div_vn_afc">

<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20var%20oFCKeditor%20%3D%20new%20FCKeditor(‘noidung’)%3B%0A%20%2F%2Ftao%20ta%20mot%20textarea%20co%20name%3D%22luan%22%20id%3D%22luan%22%0A%20oFCKeditor.BasePath%20%3D%20%22giaodien%2Ffckeditor%2F%22%3B%0A%20oFCKeditor.Width%20%3D%20770%20%3B%0A%20oFCKeditor.Height%20%3D%20350%20%3B%0A%20%3C%3Fphp%20mau_fckeditor()%3B%20%3F%3E%0A%20oFCKeditor.Config%5B%22EnterMode%22%5D%20%3D%20%22br%22%20%3B%0A%20oFCKeditor.Create()%3B%0A%20document.getElementById(‘xEnter’).value%20%3D%20%22br%22%20%3B%0A%20%2F%2Fdocument.getElementById(%22luan%22).value%3D%22%3Cimg%20src%3D’http%3A%2F%2Fwww.vnexpress.net%2FFiles%2FSubject%2F3B%2FA1%2F35%2F82%2F1.jpg’%20border%3D’0’%3E%22%3B%0A%20%2F%2Fvar%20k%3Ddocument.getElementById(%22luan%22).value%3B%0A%20%2F%2Falert(k)%3B%0A%20%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />
</div>

<!–

<div id="div_en_afc" style="display:none">
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20var%20oFCKeditor%20%3D%20new%20FCKeditor(‘noidung_en’)%3B%0A%20%2F%2Ftao%20ta%20mot%20textarea%20co%20name%3D%22luan%22%20id%3D%22luan%22%0A%20oFCKeditor.BasePath%20%3D%20%22giaodien%2Ffckeditor%2F%22%3B%0A%20oFCKeditor.Width%20%3D%20770%20%3B%0A%20oFCKeditor.Height%20%3D%20350%20%3B%0A%20oFCKeditor.Config%5B%22EnterMode%22%5D%20%3D%20%22br%22%20%3B%0A%20oFCKeditor.Create()%3B%0A%20document.getElementById(‘xEnter’).value%20%3D%20%22br%22%20%3B%0A%20%2F%2Fdocument.getElementById(%22luan%22).value%3D%22%3Cimg%20src%3D’http%3A%2F%2Fwww.vnexpress.net%2FFiles%2FSubject%2F3B%2FA1%2F35%2F82%2F1.jpg’%20border%3D’0’%3E%22%3B%0A%20%2F%2Fvar%20k%3Ddocument.getElementById(%22luan%22).value%3B%0A%20%2F%2Falert(k)%3B%0A%20%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />
</div>

–>
<?php
print ‘</td>

</tr>

<tr>

<td>
 
</td>

<td>
<input type="submit" class="nut_chapnhan" value="Chấp nhận" name="them_dulieu_menu_ngang">
</td>

</tr>

</form>

</table>

‘;
}

khung1();

?>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20table_css_2(%22er%22)%3B%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />[/sourcecode]

48. include_file(” cumchucnang /hoadon/ quan_ly.php”);

[sourcecode language=”plain”]<?php
chong_pha_hoai();
//echo "chao

<hr>

";
?>
<?php //test(defined(‘__DIR__’)); ?>

<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%20a.sua_xoa%3Alink%20%7B%20font-size%3A%2016px%3B%20text-decoration%3A%20none%3B%20color%3A%20%23FF00FF%3B%20font-weight%3A%20bold%7D%0A%20a.sua_xoa%3Avisited%20%7B%20font-size%3A%2016px%3B%20color%3A%20%23FF00FF%3B%20text-decoration%3A%20none%3B%20font-weight%3A%20bold%7D%0A%20a.sua_xoa%3Ahover%20%7B%20font-size%3A%2016px%3B%20text-decoration%3A%20underline%3B%20color%3A%20%23FF8C00%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%20%7D%0A%0A%20a.thua__link_1%3Alink%20%7B%20font-size%3A%2016px%3B%20text-decoration%3A%20none%3B%20color%3A%20%230b55c4%3B%20%7D%0A%20a.thua__link_1%3Avisited%20%7B%20font-size%3A%2016px%3B%20color%3A%20%230b55c4%3B%20text-decoration%3A%20none%3B%20%7D%0A%20a.thua__link_1%3Ahover%20%7B%20font-size%3A%2016px%3B%20text-decoration%3A%20none%3B%20color%3A%20%23084095%3B%20font-style%3A%20normal%3B%20%7D%0A%0A%0A%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" />

<?php function xuat_link($st) { //if($_GET[‘trang’]==""){$_GET[‘trang’]=1;} ?>

<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%3E%0A%20a.pt3%0A%20%7B%0A%20color%3Ablack%3B%0A%20text-decoration%3A%20none%3B%0A%20font-weight%3Abold%3B%0A%20%7D%0A%20a.pt3%3Ahover%0A%20%7B%0A%20color%3Ared%3B%0A%20text-decoration%3A%20none%3B%0A%20font-weight%3Abold%3B%0A%20%7D%0A%20%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" />

<?php
echo "<center>";
if($_GET[‘trang’]!="")
{
if(ereg("&trang=",$_SERVER[‘REQUEST_URI’]))
{
$_SERVER[‘REQUEST_URI’]=str_replace("&trang=","",$_SERVER[‘REQUEST_URI’]);
$_SERVER[‘REQUEST_URI’]=substr($_SERVER[‘REQUEST_URI’],0,-strlen($_GET[‘trang’]));
$lpt=$_SERVER[‘REQUEST_URI’]."&trang=";
}
else
{
$lpt=$_SERVER[‘REQUEST_URI’]."&trang=";
}
}
else
{
$_SERVER[‘REQUEST_URI’]=str_replace("&trang=","",$_SERVER[‘REQUEST_URI’]);
$lpt=$_SERVER[‘REQUEST_URI’]."&trang=";
}
if($_GET[‘trang’]!="" and $_GET[‘trang’]!="1")
{
if($_GET[‘trang’]=="" or $_GET[‘trang’]==1)
{
$k=1;
}
else
{
$k=$_GET[‘trang’]-1;
}
$link_t=$lpt.$k;
$link_d=$lpt."1";
echo ‘<a href="’.$link_d.’" style="margin-right:10px" class="pt3">Đầu</a>’;
echo ‘<a href="’.$link_t.’" style="margin-right:10px" class="pt3">Trước</a>’;
}
if($_GET[‘trang’]==""){$a=1;}else{$a=$_GET[‘trang’];}
$b_1=$_GET[‘trang’]-5;$n_1=$b_1;
if($b_1<1){$b_1=1;} $b_2=$_GET[‘trang’]+5; if($b_2>=$st){$n_2=$b_2;$b_2=$st;}
//echo $b_1."

<hr>

";
if($n_1<0){$v=(-1)*$n_1;$b_2=$b_2+$v;} if($n_2>=$st){$v_2=$n_2-$st;$b_1=$b_1-$v_2;}
if($b_1>1){echo ‘ … ‘;}
for($i=$b_1;$i<=$b_2;$i++) { $lpt_1=$lpt.$i; if($i>0 && $i<=$st) { if($i!=$a) { ?>
<a href="<?php echo $lpt_1; ?>" class="pt3"><?php echo $i;?> </a>
<?php
}
else
{
echo "<b style=\"color:red\">$i</b>";
}
}
}
if($b_2<$st){echo ‘ … ‘;}
if($_GET[‘trang’]!=$st && $st!=1)
{
if($_GET[‘trang’]==$st)
{
$k=$st;
}
else
{
$k=$_GET[‘trang’]+1;
if($_GET[‘trang’]==""){$k=2;}
}
$link_s=$lpt.$k;
$link_cuoi=$lpt.$st;
echo ‘<a href="’.$link_s.’" style="margin-left:10px" class="pt3">Sau</a>’;
echo ‘<a href="’.$link_cuoi.’" style="margin-left:10px" class="pt3">Cuối</a>’;
}
echo "</center>";
}
?>
<?php $sd=20; $b_tv="select count(*) from hoadon"; $b_tv_1=mysql_query($b_tv); $b_tv_2=mysql_fetch_row($b_tv_1); $st=ceil($b_tv_2[0]/$sd); if($_GET[‘trang’]==""){$vtbd=0;}else{$vtbd=($_GET[‘trang’]-1)*$sd;} $tv="select * from hoadon order by id desc limit $vtbd,$sd"; $tv_1=mysql_query($tv); ?>

<table width="913px" id="er" style="text-align:left;margin:6px 0px 6px 0px;font-size:16px;color:#666666">

<tr>

<td width="155px">Người gửi hóa đơn</td>

<!–

<td width="155px">Ký danh</td>

–>

<td width="250px">Email</td>

<td width="200px">Điện thoại</td>

<td width="100px" align="center">Xem</td>

<td width="100px" align="center">Xóa</td>

</tr>

<?php while($tv_2=mysql_fetch_array($tv_1)) { $link_xem="?thamso=xem_hoa_don&id=$tv_2[id]&trang=$_GET[trang]"; $link_xoa="?thamso=xoa_hoa_don&id=$tv_2[id]&trang=$_GET[trang]"; ?>

<tr>

<td ><a href="<?php echo $link_xem; ?>" class="thua__link_1"><?php echo $tv_2[‘ho_ten’]; ?></a></td>

<!–

<td ><a href="#" class="thua__link_1"><?php //echo $tv_2[‘ky_danh’]; ?></a></td>

–>

<td ><?php echo $tv_2[’email’]; ?></td>

<td ><?php echo $tv_2[‘dien_thoai’]; ?></td>

<td width="100px" align="center"><a href="<?php echo $link_xem; ?>" class="sua_xoa">Xem</a></td>

<td width="100px" align="center"><a href="<?php echo $link_xoa; ?>" class="sua_xoa">Xóa</a></td>

</tr>

<?php } ?>

<tr>

<td colspan="6">
<?php xuat_link($st); ?>
</td>

</tr>

</table>

<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20table_css_2(%22er%22)%3B%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />[/sourcecode]

49. include_file(“cumchucnang/ hoadon/ xem.php”);

[sourcecode language=”plain”]<?php
chong_pha_hoai();
//echo "chao

<hr>

";
$tv="select * from hoadon where id=’$_GET[id]’";
$tv_1=mysql_query($tv);
$tv_2=mysql_fetch_array($tv_1);
$tv_2[‘khach_mua’]=$tv_2[‘khach_mua’]."______";
$mang_don_hang=explode("______",$tv_2[‘khach_mua’]);
//print_r($mang_don_hang);echo "

<hr>

";
?>

<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%20a.sua_xoa%3Alink%20%7B%20font-size%3A%2016px%3B%20text-decoration%3A%20none%3B%20color%3A%20%23FF00FF%3B%20font-weight%3A%20bold%7D%0A%20a.sua_xoa%3Avisited%20%7B%20font-size%3A%2016px%3B%20color%3A%20%23FF00FF%3B%20text-decoration%3A%20none%3B%20font-weight%3A%20bold%7D%0A%20a.sua_xoa%3Ahover%20%7B%20font-size%3A%2016px%3B%20text-decoration%3A%20underline%3B%20color%3A%20%23FF8C00%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%20%7D%0A%0A%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" />

<center>

<div class="tbg">

<table width="968px" style="text-align:left;margin-top:6px" id="er" class="tbg">

<tr>

<td>
Chi tiết hóa đơn
<a href="?thamso=quanly_hoadon&trang=<?php echo $_GET[‘trang’]; ?>" style="margin-left:815px;color:#0b55c4;outline:0;text-decoration:none" hidefocus="true">Đóng</a>
</td>

</tr>

<tr>

<td>

<div class="bao_abc">

<table class="tbg" id="tb__1" style="margin:6px 6px 6px 6px">

<tr>

<td width="50px" align="center">Stt</td>

<td width="300px">Tên</td>

<td width="150px">Giá bán (VNĐ)</td>

<td width="100px">Số lượng</td>

<!–

<td width="100px">Size</td>

–>

<td width="200px">Tổng cộng (VNĐ)</td>

</tr>

<?php
$k=1;
$tc_1=0;
for($i=0;$i<count($mang_don_hang)-1;$i++) { $mang_hoa_don_1=explode("___",$mang_don_hang[$i]); $id=$mang_hoa_don_1[0]; $sl=$mang_hoa_don_1[1]; $size=$mang_hoa_don_1[2]; $a_tv="select * from dulieu where id=’$id’"; $a_tv_1=mysql_query($a_tv); $a_tv_2=mysql_fetch_array($a_tv_1); $gia=number_format($a_tv_2[‘gia’],0,".","."); $tc=$a_tv_2[‘gia’]*$sl; $tc_dd=number_format($tc,0,".","."); $tc_1=$tc_1+$tc; if($sl!=0 and $a_tv_2[‘tieu_de’]!="") { ?>

<tr>

<td align="center"><?php echo $k;?></td>

<td><?php echo $a_tv_2[‘tieu_de’];?></td>

<td><?php echo $gia; ?></td>

<td><?php echo $sl; ?></td>

<!–

<td><?php //echo $size; ?></td>

–>

<td><?php echo $tc_dd; ?></td>

</tr>

<?php $k++; } } $tc_1_dd=number_format($tc_1,0,".","."); ?>

<tr>

<td colspan="4"> </td>

<td><?php echo $tc_1_dd; ?></td>

</tr>

</table>

<table width="600px" id="tc__1" style="margin:0px 6px 6px 6px">

<tr>

<td colspan="2"><b style="padding:3px;display:block">Thông tin người mua :</b></td>

</tr>

<tr>

<td width="120px">Họ tên :</td>

<td><?php echo $tv_2[‘ho_ten’]; ?></td>

</tr>

<tr>

<td>Email :</td>

<td><?php echo $tv_2[’email’]; ?></td>

</tr>

<tr>

<td>Điện thoại : </td>

<td><?php echo $tv_2[‘dien_thoai’]; ?></td>

</tr>

<!–

<tr>

<td>Tỉnh :</td>

<td><?php //echo $tv_2[‘tinh’]; ?></td>

</tr>

<tr>

<td>Quận :</td>

<td><?php //echo $tv_2[‘quan’]; ?></td>

</tr>

–>

<tr>

<td>Địa chỉ :</td>

<td><?php echo $tv_2[‘dia_chi’]; ?></td>

</tr>

</table>

<!–

<table width="600px" id="tc__2" style="margin:0px 6px 6px 6px">

<tr>

<td colspan="2"><b style="padding:3px;display:block">Thông tin người nhận :</b></td>

</tr>

<tr>

<td width="120px">Họ tên :</td>

<td><?php //echo $tv_2[‘ho_ten_2′]; ?></td>

</tr>

<tr>

<td>Email :</td>

<td><?php //echo $tv_2[’email_2′]; ?></td>

</tr>

<tr>

<td>Điện thoại : </td>

<td><?php //echo $tv_2[‘dien_thoai_2’]; ?></td>

</tr>

<tr>

<td>Tỉnh :</td>

<td><?php //echo $tv_2[‘tinh_2’]; ?></td>

</tr>

<tr>

<td>Quận :</td>

<td><?php //echo $tv_2[‘quan_2’]; ?></td>

</tr>

<tr>

<td>Địa chỉ :</td>

<td><?php //echo $tv_2[‘dia_chi_2’]; ?></td>

</tr>

</table>

–>

<table width="600px" id="tc__3" style="margin:12px 12px 12px 6px">

<tr>

<td valign="top" width="120px">Ghi chú :</td>

<td>
<?php echo $tv_2[‘noi_dung’]; ?>
</td>

</tr>

</table>

<a href="?thamso=xoa_hoa_don_1&trang=<?php echo $_GET[‘trang’]; ?>&id=<?php echo $tv_2[‘id’]; ?>" class="sua_xoa" style="margin-left:132px">Xóa</a>

<div style="height:6px;width:5px;overflow:hidden"></div>

</div>

</td>

</tr>

</table>

</div>

</center>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20table_css_1(%22er%22)%3B%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20table_css_2(%22tb__1%22)%3B%0A%20table_css(%22tc__1%22)%3B%0A%20%2F%2Ftable_css(%22tc__2%22)%3B%0A%20table_css(%22tc__3%22)%3B%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />[/sourcecode]

50. include_file(” cumchucnang/ thongtin_quantri/ thongtin_quantri.php”);

[sourcecode language=”plain”]<?php chong_pha_hoai(); ?>
<?php
if(isset($_POST[‘thongtin_quantri’]))
{
if(trim($_POST[‘matkhau’])=="khong_thay_doi")
{
//,`mat_khau`=’$mk’
$chuoi_mk="";
}
else
{
$mk=ma_hoa($_POST[‘matkhau’]);
$chuoi_mk=",`mat_khau`=’$mk’";
}

$tv="UPDATE `thongtin_quantri` SET `ky_danh` = ‘$_POST[kydanh]’ $chuoi_mk WHERE `id` =1 LIMIT 1 ;";
mysql_query($tv);
$_SESSION[‘ky_danh__bcd’]=$_POST[‘kydanh’];
if(trim($_POST[‘matkhau’])!="khong_thay_doi")
{
$mk=ma_hoa($_POST[‘matkhau’]);
$_SESSION[‘mat_khau__bcd’]=$mk;
}

trangtruoc();
}

$thongtin_quantri_chuoi="select * from thongtin_quantri where id in (‘1’)";
$thongtin100=mysql_query($thongtin_quantri_chuoi);
$thongtin_quantri=mysql_fetch_array($thongtin100);
echo "

<table width=\"990px\">

<tr>

<td >";
echo "

<form action=\"\" method=\"post\">

<table border=\"0\" width=\"600px\">

<tr>

<td width=\"120px\">
<b>Ký danh : </b>
</td>

<td width=\"480px\">
<input name=\"kydanh\" value=\"$thongtin_quantri[ky_danh]\">
</td>

</tr>

<tr>

<td width=\"120px\" valign=’top’>
<b>Mật khẩu : </b>
</td>

<td width=\"480px\">
<input name=\"matkhau\" type=\"password\" value=\"khong_thay_doi\">

<div style=’height:6px;width:5px;overflow:hidden’></div>

<span style=’font-size:14px’>Nhập ‘khong_thay_doi’ nếu không muốn đổi pass</span>

<div style=’height:6px;width:5px;overflow:hidden’></div>

<span style=’font-size:14px’>Mặc định mật khẩu không thay đổi</span>
</td>

</tr>

<tr>

<td colspan=\"2\">
<span style=\"margin-left:20%\"><input type=\"submit\" value=\"Chấp nhận\" name=\"thongtin_quantri\"></span>
</td>

</tr>

</table>

</form>

";
echo"</td>

</tr>

</table>

";

?>[/sourcecode]

51. include_file(” cumchucnang/ quangcao_1/ quangcao_1.php”);

[sourcecode language=”plain”]<?php chongphahoai(); ?>
<?php function upload() { $ten_file_anh=$_FILES[‘uploadedfile’][‘name’]; $duongdan_upload="../hinhanh_flash/quangcao/$ten_file_anh"; //thongbao("$duongdan_upload"); move_uploaded_file($_FILES[‘uploadedfile’][‘tmp_name’],$duongdan_upload); } function xacdinh_upload_khong_trung_ten_anh() { $ten_file_anh=$_FILES[‘uploadedfile’][‘name’]; $mang_so_dem_so_anh=mysql_fetch_row(mysql_query("select count(*) from quangcao_1 where ten_file in (‘$ten_file_anh’)")); $soanh_demduoc=$mang_so_dem_so_anh[0]; if($soanh_demduoc==0) { return "co"; } else { if($ten_file_anh=="") { return "co"; } else { return "khong"; } } } ?>
<?php if(isset($_POST[‘them_quangcao_1’])) { //them quang cao $ten_file_anh=$_FILES[‘uploadedfile’][‘name’]; if($ten_file_anh!="") { $xacdinh_upload_khong_trung_ten_anh=xacdinh_upload_khong_trung_ten_anh(); if($xacdinh_upload_khong_trung_ten_anh=="co") { $them= " INSERT INTO `quangcao_1` ( `id` , `ten_file` , `link` , `rong` , `cao` ) VALUES ( NULL , ‘$ten_file_anh’, ‘$_POST[lienket_quangcao]’, ‘$_POST[rong]’, ‘$_POST[cao]’ ); "; mysql_query($them); upload(); } else { thongbao("Filenày trùng tên , bạn hãy đổi tên file "); } } else { thongbao("Upload thất bại do không có file upload !"); } trangtruoc(); } ?>
<center>

<h1 style="color:red">Thêm quãng cáo</h1>

</center>

<form action="" method="post" enctype="multipart/form-data">

<table>

<tr>

<td width="150px">
Tải lên tập tin :
</td>

<td>
<input type="file" name="uploadedfile">
</td>

</tr>

<tr>

<td>
Liên kết quãng cáo :
</td>

<td>
<input name="lienket_quangcao" style="width:200px">
</td>

</tr>

<tr>

<td>
Rộng :
</td>

<td>
<input name="rong" style="width:200px" value="165px">
</td>

</tr>

<tr>

<td>
Cao :
</td>

<td>
<input name="cao" style="width:200px" value="80px">
</td>

</tr>

<tr>

<td align="center" colspan="2">
<input type="submit" class="nut_chapnhan" name="them_quangcao_1" value="Thêm">
</td>

</tr>

</table>

</form>

<?php include_file("cumchucnang/quangcao_1/sua_xoa.php"); ?>
[/sourcecode]

52. include_file(” cumchucnang/ quangcao_1/ sua__quangcao_1.php”);

[sourcecode language=”plain”]<?php chongphahoai(); ?>
<?php function upload() { $ten_file_anh=$_FILES[‘uploadedfile’][‘name’]; $duongdan_upload="../hinhanh_flash/quangcao/$ten_file_anh"; //thongbao("$duongdan_upload"); move_uploaded_file($_FILES[‘uploadedfile’][‘tmp_name’],$duongdan_upload); } ?>
<?php if(isset($_POST[‘sua__quangcao_1’])) { $ten_file_anh=$_FILES[‘uploadedfile’][‘name’]; if($ten_file_anh=="") { $ten_file_anh=$_POST[‘ten_file’]; $xacdinh_up="co"; } else { $d="select count(*) from quangcao_1 where ten_file in (‘$ten_file_anh’)"; $d1=mysql_query($d); $d2=mysql_fetch_row($d1); if($d2[0]==0) { $xacdinh_up="co"; } else { $xacdinh_up="khong"; } } if($xacdinh_up=="co") { $up= " UPDATE `quangcao_1` SET `ten_file` = ‘$ten_file_anh’, `link` = ‘$_POST[link]’, `rong` = ‘$_POST[rong]’, `cao` = ‘$_POST[cao]’ WHERE `id` =’$_GET[id]’; "; mysql_query($up); upload(); } else { thongbao("Trùng tên ảnh !"); } trangtruoc(); } ?>
<?php $sql="select * from quangcao_1 where id in (‘$_GET[id]’)"; $q_sql=mysql_query($sql); $r_sql=mysql_fetch_array($q_sql); $link_1=$r_sql[‘link’]; $rong=$r_sql[‘rong’]; $cao=$r_sql[‘cao’]; ?>

<form action="" method="post" enctype="multipart/form-data">

<table>

<tr>

<td width="150px" valign="top">Hình ảnh hoặc flash</td>

<td>
<input type="file" name="uploadedfile">
<input type="hidden" name="ten_file" value="<?php echo $r_sql[‘ten_file’] ?>">
<?php
$ten_file=$r_sql[‘ten_file’];
$mang=explode(".",$ten_file);
$v=count($mang)-1;
$link="../hinhanh_flash/quangcao/$ten_file";
//echo "$link \$link

<hr>

";
switch($mang[$v])
{
case "swf":
echo "<embed menu=\"true\" loop=\"true\" play=\"true\" src=\"$link\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"$rong\" height=\"$cao\">";
break;
default:
echo "<img src=\"$link\" width=\"$rong\" height=\"$cao\" border=\"0\">";
}
?>
</td>

</tr>

<tr>

<td>Liên kết quãng cáo</td>

<td>
<?php
//echo $r_sql[‘link’];
echo "<input style=\"width:200px\" value=\"$r_sql[link]\" name=\"link\">";
?>
</td>

</tr>

<tr>

<td>Rộng</td>

<td>
<?php
//echo $r_sql[‘rong’];
echo "<input style=\"width:200px\" value=\"$r_sql[rong]\" name=\"rong\">";
?>
</td>

</tr>

<tr>

<td>Cao</td>

<td>
<?php
//echo $r_sql[‘cao’];
echo "<input style=\"width:200px\" value=\"$r_sql[cao]\" name=\"cao\">";
?>
</td>

</tr>

<tr>

<td align="center" colspan="2">
<input type="submit" value="Sữa" name="sua__quangcao_1" class="nut_chapnhan">
</td>

</tr>

</table>

</form>

[/sourcecode]

Chúc các bạn học tốt




    Khóa Học :
    Thời Gian Học : sángchiềutối

    Bình luận

    order

    Nguyễn Thị Thúy số điện thoại: 082.342.xxx
    tại c4/42 đường võ văn vân, ấp 3, xã vĩnh lộc b, huyện bình chánh vừa đăng ký tư vấn khóa học 8 phút trước

    order

    Nguyễn Thị Thúy số điện thoại: 082.342.xxx
    tại c4/42 đường võ văn vân, ấp 3, xã vĩnh lộc b, huyện bình chánh vừa đăng ký tư vấn khóa học 8 phút trước