Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SL-Craft-Website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SL-Projects
SL-Craft-Website
Commits
81ca3f5b
Commit
81ca3f5b
authored
3 years ago
by
Sofiane Lasri
Browse files
Options
Downloads
Patches
Plain Diff
ça y'est!
parent
525182a5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/classes/Item.php
+5
-5
5 additions, 5 deletions
core/classes/Item.php
core/classes/Shop.php
+0
-1
0 additions, 1 deletion
core/classes/Shop.php
pages/client/shops.php
+1
-1
1 addition, 1 deletion
pages/client/shops.php
with
6 additions
and
7 deletions
core/classes/Item.php
+
5
−
5
View file @
81ca3f5b
<?php
class
Item
{
private
$
name
;
private
$
label
;
private
$price
;
private
$css
;
private
$type
;
...
...
@@ -13,15 +13,15 @@ public function __construct($item){
}
else
{
$this
->
id
=
$item
;
}
$query
=
Connexion
::
pdo
()
->
prepare
(
"SELECT * FROM site_itemsAssoc WHERE
name
=?"
);
$query
=
Connexion
::
pdo
()
->
prepare
(
"SELECT * FROM site_itemsAssoc WHERE
label
=?"
);
$query
->
execute
(
array
(
$this
->
id
));
$result
=
$query
->
fetch
(
PDO
::
FETCH_ASSOC
);
$this
->
name
=
$result
[
'
name
'
];
$this
->
label
=
$result
[
'
label
'
];
$this
->
css
=
$result
[
'css'
];
}
public
function
get
Name
(){
return
$this
->
name
;
public
function
get
Label
(){
return
$this
->
label
;
}
public
function
getPrice
(){
...
...
This diff is collapsed.
Click to expand it.
core/classes/Shop.php
+
0
−
1
View file @
81ca3f5b
...
...
@@ -13,7 +13,6 @@ public static function getAllProducts(){
$return
=
array
();
foreach
(
$itemsConfig
as
$itemConfig
){
$item
=
yaml_parse
(
$itemConfig
[
'itemConfig'
]);
print_r
(
$items
);
$itemAleadyEntered
=
false
;
foreach
(
$return
as
$checkItem
){
...
...
This diff is collapsed.
Click to expand it.
pages/client/shops.php
+
1
−
1
View file @
81ca3f5b
...
...
@@ -35,7 +35,7 @@
<?php
$items
=
Shop
::
getAllProducts
();
foreach
(
$items
as
$item
)
{
echo
'<option value="'
.
$item
->
getId
()
.
'">'
.
$item
->
get
Name
()
.
'</option>'
;
echo
'<option value="'
.
$item
->
getId
()
.
'">'
.
$item
->
get
Label
()
.
'</option>'
;
}
?>
</select>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment