-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvw_idx_categories.php
More file actions
executable file
·127 lines (106 loc) · 3.5 KB
/
Copy pathvw_idx_categories.php
File metadata and controls
executable file
·127 lines (106 loc) · 3.5 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
global $m,$category_list,$brand_list, $a, $dPconfig;
error_reporting( E_ALL );
include_once("{$dPconfig['root_dir']}/modules/inventory/utility.php");
// check permissions for this module
$perms =& $AppUI->acl();
$canEdit = $perms->checkModule( $m, "edit" );
?>
<?php
if ( $canEdit )
{
?>
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
<!--
function renameWindow( _id, _name, _type )
{
window.name = "InventoryWindow";
rw = window.open("", 'RenameWin','width=400,height=100,scrollbar=no,resizable=no,status=no,toolbar=no' );
rw.document.clear();
rw.document.write( "<HTML>\n" );
rw.document.write( "<HEAD>Rename " + _type + ' "' + _name + '" </HEAD>\n' );
rw.document.write( "<BODY>\n" );
rw.document.write( "<FORM action='?m=inventory' METHOD='post' TARGET='" + window.name + "' onSubmit='self.close()'>\n" );
rw.document.write( "<INPUT TYPE='hidden' name='change_" + _type + "_id' value='" + _id + "' />\n" );
rw.document.write( "<INPUT TYPE='hidden' NAME='dosql' VALUE='do_inventory_aed' />\n" );
rw.document.write( "<INPUT TYPE='text' NAME='change_"+_type+"_name' value='"+_name+"'>\n" );
update_text = "<?php echo $AppUI->_('rename');?>";
cancel_text = "<?php echo $AppUI->_('cancel');?>";
rw.document.write( '<INPUT type="submit" name="btnFuseAction" value="'+update_text+'" />\n' );
rw.document.write( '<INPUT type="button" name="btnFuseCancel" value="'+cancel_text+'" onClick="self.close()" />\n' );
rw.document.write( "</FORM>\n" );
rw.document.write( "</BODY>\n" );
rw.document.write( "</HTML>\n" );
rw.document.close();
}
-->
</SCRIPT>
<?php
}
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" CLASS="tbl" >
<TBODY>
<TR>
<TD WIDTH="50%" STYLE="padding: 4px;" VALIGN="top" >
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="1" WIDTH="100%" CLASS="tbl" >
<THEAD>
<TR>
<TH></TH>
<TH><?php echo $AppUI->_( "Category Name" ); ?></TH>
<TH NOWRAP><?php echo $AppUI->_( "Mark" ); ?></TH>
</TR>
</THEAD>
<TBODY>
<?php
foreach ( $category_list as $category )
{
echo "<TR><TD>";
if ( $canEdit )
{
echo "<A HREF='javascript:renameWindow( ".$category[ 'inventory_category_id' ].",\"".$category[ 'inventory_category_name' ]."\",\"category\" );'>";
echo dPshowImage( "./images/icons/stock_edit-16.png", 16, 16, "" );
echo "</A>";
}
echo "</TD><TD WIDTH='100%'>";
echo $category[ 'inventory_category_name' ];
echo "</TD><TD ALIGN='center'>";
echo '<INPUT TYPE="CHECKBOX" NAME="category_'.$category['inventory_category_id'].'">';
echo "</TD></TR>";
}
?>
</TBODY>
</TABLE>
</TD>
<TD WIDTH="50%" STYLE="padding: 4px;" VALIGN="top">
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="1" WIDTH="100%" CLASS="tbl">
<THEAD>
<TR>
<TH></TH>
<TH><?php echo $AppUI->_( "Brand Name" ); ?></TH>
<TH NOWRAP><?php echo $AppUI->_( "Mark" ); ?></TH>
</TR>
</THEAD>
<TBODY>
<?php
foreach ( $brand_list as $brand )
{
echo "<TR><TD>";
if ( $canEdit )
{
echo "<A HREF='javascript:renameWindow( ".$brand[ 'inventory_brand_id' ].",\"".$brand[ 'inventory_brand_name' ]."\",\"brand\" );'>";
echo dPshowImage( "./images/icons/stock_edit-16.png", 16, 16, "" );
echo "</A>";
}
echo "</TD><TD WIDTH='100%'>";
echo $brand[ 'inventory_brand_name' ];
echo "</TD><TD ALIGN='center'>";
echo '<INPUT TYPE="CHECKBOX" NAME="brand_'.$brand['inventory_brand_id'].'">';
echo "</TD></TR>";
}
?>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>