-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathallinonelink.php
195 lines (183 loc) · 10.9 KB
/
allinonelink.php
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<html ng-app="allinoneapp">
<head>
<?php
if ($_COOKIE['username'] == '') {
header("Location:index.php");
}
include './includefiles/header.php';
include './includefiles/nav_menu.php';
?>
<script src="allinonelink_ctrl.js" type="text/javascript"></script>
<br><br><br><br>
<style>
.table{
color:#fff;
}
.table thead>tr>th, .table tbody>tr>th, .table tfoot>tr>th, .table thead>tr>td, .table tbody>tr>td, .table tfoot>tr>td {
padding: 5px 10px!important;
}
td{
vertical-align: middle!important;
}
.table thead>tr>th, .table tbody>tr>th, .table tfoot>tr>th, .table thead>tr>td, .table tbody>tr>td, .table tfoot>tr>td {
padding: 5px 10px!important;
line-height: 0;
vertical-align: middle;
/* border-top: 1px solid #ddd; */
font-size: small;}
</style>
<title>All in One links</title>
</head>
<body ng-controller="allinonectrl">
<table class="table table-bordered col-md-12" >
<thead>
<tr>
<th colspan="6">Categorys</th>
<th>
<button type="button" title="Add" ng-click="addCategory()" class="btn btn-success btn-circle">
<i class="glyphicon glyphicon-plus"></i>
</button>
<button type="button" title="Save" ng-click="savecategory()" class="btn btn-warning btn-circle">
<i class="glyphicon glyphicon-floppy-disk"></i>
</button>
</th>
</tr>
<tr>
<th class="col-md-1">S.no</th>
<th class="col-md-2">Code</th>
<th class="col-md-2">Name</th>
<th class="col-md-1">Sequence</th>
<th class="col-md-3">Icon</th>
<th class="col-md-1">Active</th>
<th class="col-md-1">Actions</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in categoryData.data" ng-click="getLinks($index);" ng-init="row.isEdit = false;row.table = 'link_category';(row.category_key == '' || row.category_key == null) ? row.method = 'insert' : row.method = 'update'" >
</div>
<td ng-class="(row.isSelected==true)?'highlight':''" >
{{$index + 1}}
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<input type="text" class="form-control" ng-model="row.category_code" ng-show="row.isEdit">
<span ng-show="!row.isEdit">{{row.category_code}} </span>
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<input type="text" class="form-control" ng-model="row.category_name" ng-show="row.isEdit">
<span ng-show="!row.isEdit">{{row.category_name}} </span>
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<input type="text" class="form-control " ng-model="row.category_order" ng-show="row.isEdit">
<span ng-show="!row.isEdit">{{row.category_order}} </span>
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<img style="float:left;width:10%" class="grid-img-data" src="data:image/png;base64,{{row.category_icon}}" alt="Red dot" />
<input style="float:left;width:30%" type="file" accept="image/png" onchange="angular.element(this).scope().fileChoosed(this, 1)" class="form-control width-25" ng-show="row.isEdit">
<textarea style="float:left;width:60%;" type="text" class="form-control " ng-model="row.category_icon" ng-show="row.isEdit"></textarea>
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<input type="checkbox" class="form-control" ng-model="row.is_active" ng-init="row.is_active = (row.is_active > 0 || row.is_active == null)" ng-disabled="!row.isEdit">
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<button type="button" title="Add" ng-show="!row.isEdit" ng-click="row.isEdit = true" class="btn btn-danger btn-circle">
<i class="glyphicon glyphicon-pencil">
</i>
</button>
<button type="button" title="Add" ng-click="row.isEdit = false; savecategorySingle($index)" class="btn btn-danger btn-circle">
<i class="glyphicon glyphicon-floppy-disk">
</i>
</button>
</td>
</tr>
</tbody>
</table>
<table class="table table-bordered col-md-12" >
<thead>
<tr>
<th colspan="6">Categorys</th>
<th>
<button type="button" title="Add" ng-click="addCategory()" class="btn btn-success btn-circle">
<i class="glyphicon glyphicon-plus"></i>
</button>
<button type="button" title="Save" ng-click="savecategory()" class="btn btn-warning btn-circle">
<i class="glyphicon glyphicon-floppy-disk"></i>
</button>
</th>
</tr>
<tr>
<th class="col-md-1">S.no</th>
<th class="col-md-2">Code</th>
<th class="col-md-2">Name</th>
<th class="col-md-1">Sequence</th>
<th class="col-md-3">Icon</th>
<th class="col-md-1">Active</th>
<th class="col-md-1">Actions</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in categoryData.data" ng-init="row.isEdit = false;row.table = 'link_category';(row.category_key == '' || row.category_key == null) ? row.method = 'insert' : row.method = 'update'" >
</div>
<td >
{{$index + 1}}
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<input type="text" class="form-control" ng-model="row.category_code" ng-show="row.isEdit">
<span ng-show="!row.isEdit">{{row.category_code}} </span>
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<input type="text" class="form-control" ng-model="row.category_name" ng-show="row.isEdit">
<span ng-show="!row.isEdit">{{row.category_name}} </span>
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<input type="text" class="form-control " ng-model="row.category_order" ng-show="row.isEdit">
<span ng-show="!row.isEdit">{{row.category_order}} </span>
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<img style="float:left;width:10%" class="grid-img-data" src="data:image/png;base64,{{row.category_icon}}" alt="Red dot" />
<input style="float:left;width:30%" type="file" accept="image/png" onchange="angular.element(this).scope().fileChoosed(this, 1)" class="form-control width-25" ng-show="row.isEdit">
<textarea style="float:left;width:60%;" type="text" class="form-control " ng-model="row.category_icon" ng-show="row.isEdit"></textarea>
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<input type="checkbox" class="form-control" ng-model="row.is_active" ng-init="row.is_active = (row.is_active > 0 || row.is_active == null)" ng-disabled="!row.isEdit">
</td>
<td ng-class="(row.isSelected==true)?'highlight':''" >
<button type="button" title="Add" ng-show="!row.isEdit" ng-click="row.isEdit = true" class="btn btn-danger btn-circle">
<i class="glyphicon glyphicon-pencil">
</i>
</button>
<button type="button" title="Add" ng-click="row.isEdit = false; savecategorySingle($index)" class="btn btn-danger btn-circle">
<i class="glyphicon glyphicon-floppy-disk">
</i>
</button>
</td>
</tr>
</tbody>
</table>
</body>
</html>
{{result}}
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!--
<button type="button" class="btn btn-default btn-circle"><i class="glyphicon glyphicon-ok"></i></button>
<button type="button" class="btn btn-primary btn-circle"><i class="glyphicon glyphicon-list"></i></button>
<button type="button" class="btn btn-success btn-circle"><i class="glyphicon glyphicon-link"></i></button>
<button type="button" class="btn btn-info btn-circle"><i class="glyphicon glyphicon-ok"></i></button>
<button type="button" class="btn btn-warning btn-circle"><i class="glyphicon glyphicon-remove"></i></button>
<button type="button" class="btn btn-danger btn-circle"><i class="glyphicon glyphicon-heart"></i></button>
<h2>lg</h2>
<button type="button" class="btn btn-default btn-circle btn-lg"><i class="glyphicon glyphicon-ok"></i></button>
<button type="button" class="btn btn-primary btn-circle btn-lg"><i class="glyphicon glyphicon-list"></i></button>
<button type="button" class="btn btn-success btn-circle btn-lg"><i class="glyphicon glyphicon-link"></i></button>
<button type="button" class="btn btn-info btn-circle btn-lg"><i class="glyphicon glyphicon-ok"></i></button>
<button type="button" class="btn btn-warning btn-circle btn-lg"><i class="glyphicon glyphicon-remove"></i></button>
<button type="button" class="btn btn-danger btn-circle btn-lg"><i class="glyphicon glyphicon-heart"></i></button>
<h2>xl</h2>
<button type="button" class="btn btn-default btn-circle btn-xl"><i class="glyphicon glyphicon-ok"></i></button>
<button type="button" class="btn btn-primary btn-circle btn-xl"><i class="glyphicon glyphicon-list"></i></button>
<button type="button" class="btn btn-success btn-circle btn-xl"><i class="glyphicon glyphicon-link"></i></button>
<button type="button" class="btn btn-info btn-circle btn-xl"><i class="glyphicon glyphicon-ok"></i></button>
<button type="button" class="btn btn-warning btn-circle btn-xl"><i class="glyphicon glyphicon-remove"></i></button>
<button type="button" class="btn btn-danger btn-circle btn-xl"><i class="glyphicon glyphicon-heart"></i></button>-->