コード例 #1
0
ファイル: edit.php プロジェクト: nhphong0104/thietkeweb360
$ff_redirect_fail 	= "";
$iAdm 					= getValue("iAdm");
$ff_table 				= "admin_user";

$fs_redirect			= base64_decode(getValue("returnurl","str","GET",base64_encode("listing.php")));
$record_id				= getValue("iAdm","int","GET");
$field_id				= "adm_id";
$errorMsg				= "";
$Action 					= getValue("Action","str","POST","");

$arelate_select  			= getValue("arelate_select","arr","POST",array());
$menuid 				= new menu();
$menuid->getArray("categories_multi","cat_id","cat_parent_id"," lang_id = " . $lang_id);
$adm_access_category 	= '';
foreach($arelate_select as $key=>$value){
	$adm_access_category .= '[' . str_replace(",","][",$menuid->getAllChildId($value)) . ']';
}


//Call Class generate_form();
$myform = new generate_form();
$myform->add("adm_email","adm_email",2,0,"",1," Email không chính xác !",0,"");
$myform->add("adm_name","adm_name",0,0,"",0,"",0,"");
$myform->add("adm_phone","adm_phone",0,0,"",0,"",0,"");
$myform->add("adm_all_category","adm_all_category",1,0,0,0,"",0,"");
$myform->add("adm_access_category","adm_access_category",0,1,"",0,"",0,"");
$myform->add("adm_edit_all","adm_edit_all",1,0,0,0,"",0,"");
$myform->add("admin_id","admin_id",1,1,0,0,"",0,"");

$myform->addTable($fs_table);
コード例 #2
0
 */
if($iCat != 0 || $sCat != ''){
	$sql = $iCat != 0 ? " AND cat_id = " . $iCat : " AND cat_name_rewrite = '" . $sCat . "'";
	$db_cat = new db_query("SELECT cat_id, cat_parent_id, cat_type, cat_name, cat_name_rewrite, cat_link
									FROM categories_multi
									WHERE cat_active = 1" . $sql . "
									");
	if($row = mysql_fetch_assoc($db_cat->result)){

		$module				= $module == '' ? $row["cat_type"] : $module;
		$iCat					= $iCat == 0 ? $row['cat_id'] : $iCat;

		$cat_cha				= $menuid->getCatcha($iCat);
		$cat_cha_level_2  = $menuid->getCatcha($iCat,2);
		$cat_cha_level_3  = $menuid->getCatcha($iCat,3);
		$sqlmenusub			= " AND cat_id IN(" .  $menuid->getAllChildId($cat_cha)  . ")";
		$listiCat			= $menuid->getAllChildId($iCat);
		$sqlcategory		= " AND cat_id IN(" . $listiCat  . ")";
		$cat_child			= count(explode(",",$listiCat)); // tinh so cap con
		
		// Thay doi 3 the meta
		if($iData == 0){
			$con_site_title 			= $row['cat_name'];
			$con_site_title 		  .= $page != '' ? ' - Trang ' . $page : '';
			$con_meta_description	= $row['cat_name'];
			$con_meta_keywords		= $row['cat_name'];
		} // End if($iData == 0)
		
		// Redirect neu ten bai viet khong dung
		if( ($iData == 0 || $sData == '') && $sCat != $row['cat_name_rewrite']){
			$link_redirect = createLink('cat', array('dat_id' => $row['cat_id'], 'dat_rewrite' => $row['cat_name_rewrite']) );