1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
<?php
function navigator($navigator) { // $i == 0; // foreach ($navigator as $num => $vals) { // $i++; // } $i = count($navigator);
$j = 0; echo "<table width='100%'><tr><td background='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[header_navigator]' height='$_SESSION[height_navigator]'><font color='000000'>"; foreach ($navigator as $key => $val) { $j++; if ($j < $i) { // คลิกลิงค์ได้ $_link = $key != '' ? "?mod=$key&path=$_SESSION[navigator_path]&id_sub=$_SESSION[id_sub]" : ""; echo " <img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[icon_navigator]' border='0'> <a href='index.php$_link'><b><font color='000000'>$val</font></b></a> "; } else { // คลิกลิงค์ไม่ได้ echo " <img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[icon_navigator]' border='0'> $val "; $_SESSION[bar_name] = $val; } } echo"</td></tr></table>"; }
function navigator2($navigator, $get_param) { $i == 0; foreach ($navigator as $num => $vals) { $i++; }
$j = 0; echo "<table width='100%'><tr><td background='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[header_navigator]' height='$_SESSION[height_navigator]'><font color='$_SESSION[bg_body1]'>"; foreach ($navigator as $key => $val) { $j++; if ($j < $i) { // คลิกลิงค์ได้ echo " <img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[icon_navigator]' border='0'> <a href='index.php?mod=$key&path=$_SESSION[navigator_path]&$get_param'><b><font color='$_SESSION[bg_body1]'>$val</font></b></a> "; } else { // คลิกลิงค์ไม่ได้ echo " <img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[icon_navigator]' border='0'> $val "; $_SESSION[bar_name] = $val; } } echo"</td></tr></table></font>"; }
function product_navig($id_product) {
echo "<table width='100%'><tr><td background='$_SESSION[web_name]/theme/$_SESSION[themes_]/navigator.jpg' height='$_SESSION[height_navigator]'><font color='$_SESSION[bg_body1]'>";
echo " <img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[icon_navigator]' border='0' > <a href='index.php'><b><font color='$_SESSION[bg_body1]'>หน้าแรก</font></b></a> ";
print_product_navig($id_product); echo"</td></tr></table></font>"; }
function print_product_navig($id_product) { $result_parent = select_result_query("*", "cms_product", "id_product", "$id_product");
while ($data_parent = mysql_fetch_array($result_parent)) { if ($data_parent[id_parent] != 0) { print_product_navig($data_parent[id_parent]); } if ($data_parent[has_child] == 1) {
echo "<font color='$_SESSION[bg_body1]'> <img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[icon_navigator]' border='0'> <a href='index.php?mod=product&path=product&id_product=$data_parent[id_product]'><b><font color='$_SESSION[bg_body1]'>$data_parent[name]</font></b></a> </font>"; } } }
// ข้อความ navagator ต่าง ๆ $navig[''] = 'หน้าแรก'; $msg_edit = "แก้ไขข้อมูล"; $msg_add = "เพิ่มข้อมูล"; ?>
|