Guest upatking Posted June 15, 2007 Share Posted June 15, 2007 I use skins\Killer, and i want create more categoriesmenu........ I had created /styleTemplates/boxes/categoriesmenu.tpl and includes\boxes\categoriesmenu.inc.php...... pls more attachment file <code> <!-- BEGIN: categoriesmenu --> <TABLE cellSpacing=0 cellPadding=0 width=260 align=left border=0 > <TBODY> <TR> <TD vAlign=top background=skins/{VAL_SKIN}/styleImages/backgrounds/left000-bg.jpg> <TABLE cellSpacing=0 cellPadding=0 width=260 align=left border=0 > <TBODY> <TR> <TD vAlign=top background=skins/{VAL_SKIN}/styleImages/backgrounds/left001-bg.jpg> <TABLE cellSpacing=0 cellPadding=0 width=260 align=left border=0> <TBODY> <TR> <TD> <TABLE cellSpacing=0 cellPadding=0 width=100 border=0> <TBODY> <TR> <TD><IMG height=18 src="skins/{VAL_SKIN}/styleImages/backgrounds/spacer.gif" width=169></TD></TR></TBODY></TABLE> <TABLE cellSpacing=2 cellPadding=0 width=204 align=center border=0> <TBODY> <TR> <TD background=skins/{VAL_SKIN}/styleImages/backgrounds/protype-bg-e.gif width=204 height=28><B> <a href="index.php" class="txtleft">{LANG_HOME}</a></B></TD></TR> <TR> <TD background=skins/{VAL_SKIN}/styleImages/backgrounds/protype-bg-e.gif width=204 height=28><B> <A href="http://www.adcomvn.com"class="txtleft">{LANG_HOME2}</a></B></TD></TR> <TR> <TD background=skins/{VAL_SKIN}/styleImages/backgrounds/protype-bg-e.gif width=204 height=28><B> <a href="index.php?act=viewCat&catId=saleItems" class="txtleft">{LANG_SALE_ITEMS}</a></B> </TD></TR> <TR> <TD background=skins/{VAL_SKIN}/styleImages/backgrounds/protype-bg-e.gif width=204 height=28><B> <a href="index.php?act=viewCat&catId={DATAMENU.cat_id}" class="txtleft">{DATAMENU.cat_name}</a></B> </TD></TR> </TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> <TR> <TD vAlign=top background=skins/{VAL_SKIN}/styleImages/backgrounds/left000-e.jpg height=215> <table border="0" width="100%" cellspacing="0" cellpadding="0" height="88"> <tr> <td width="38%" height="60"></td> <td width="62%" height="60"></td> </tr> <tr> <td width="38%" height="22"></td> <td width="62%" height="22"><font size="1" face="Arial">{LANG_ADD}</font></td> </tr> <tr> <td width="38%" height="1"></td> <td width="62%" height="1"></td> </tr> <tr> <td width="38%" height="41"></td> <td width="62%" height="41">{LANG_EMAIL}</td> </tr> <tr> <td width="38%" height="9"></td> <td width="62%" height="9"></td> </tr> <tr> <td width="38%" height="16"></td> <td width="62%" height="16">{LANG_Tel}</td> </tr> </table> </TD></TR></TBODY></TABLE> <!-- END: categoriesmenu --> ---------------------------------------------------- +-------------------------------------------------------------------------- | categoriesmenu.inc.php | ======================================== | Categoriesmenu Box +-------------------------------------------------------------------------- */ if (eregi(".inc.php",$HTTP_SERVER_VARS['PHP_SELF']) || eregi(".inc.php",$_SERVER['PHP_SELF'])) { echo "<html>\r\n<head>\r\n<title>Forbidden 403</title>\r\n</head>\r\n<body><h3>Forbidden 403</h3>\r\nThe document you are requesting is forbidden.\r\n</body>\r\n</html>"; exit; } // query database $results = $db->select("SELECT cat_name, cat_id FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0"); $resultsForeign = $db->select("SELECT cat_master_id as cat_id, cat_name FROM ".$glob['dbprefix']."CubeCart_cats_lang WHERE cat_lang = '".$lang_folder."'"); $box_content=new XTemplate ("skins/".$config['skinDir']."/styleTemplates/boxes/categoriesmenu.tpl"); $box_content->assign("LANG_CATEGORY_TITLE",$lang['front']['boxes']['shop_by_cat']); $box_content->assign("LANG_HOME",$lang['front']['boxes']['homepage']); $box_content->assign("LANG_HOME2",$lang['front']['boxes']['homepage2']); $box_content->assign("LANG_ADD",$lang['front']['boxes']['adadcom1']); $box_content->assign("LANG_EMAIL",$lang['front']['boxes']['emailadcom1']); $box_content->assign("LANG_Tel",$lang['front']['boxes']['Teladcom1']); // loop results if($results == TRUE){ for ($i=0; $i<count($results); $i++){ if(is_array($resultsForeign)){ for ($k=0; $k<count($resultsForeign); $k++){ if($resultsForeign[$k]['cat_id'] == $results[$i]['cat_id']){ $results[$i]['cat_name'] = validHTML($resultsForeign[$k]['cat_name']); } } } else { $results[$i]['cat_name'] = validHTML($results[$i]['cat_name']); } $box_content->assign("DATAMENU",$results[$i]); $box_content->parse("categoriesmenu.li"); } // end for loop } if($config['saleMode']>0){ $box_content->assign("LANG_SALE_ITEMS",$lang['front']['boxes']['sale_items']); $box_content->parse("categoriesmenu.sale"); } $box_content->parse("categoriesmenu"); $box_content = $box_content->text("categoriesmenu"); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.