This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Following code will create a new product row | |
* All product details are read from HTTP Post Request | |
*/ | |
// array for JSON response | |
$response = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// array for JSON response | |
$response = array(); | |
// include db connect class | |
require_once __DIR__ . '/db_connect.php'; | |
// connecting to db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Following code will list all the categories | |
*/ | |
// array for JSON response | |
$response = array(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A class file to connect to database | |
*/ | |
class DB_CONNECT { | |
var $myconn; | |
/** | |
* Function to connect with database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Following code will list all the products | |
*/ | |
// array for JSON response | |
$response = array(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Following code will get single product details | |
* A product is identified by product id (id) | |
*/ | |
// array for JSON response | |
$response = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* All database connection variables | |
*/ | |
define('DB_USER', "root"); // db user | |
define('DB_PASSWORD', ""); // db password (mention your db password here) | |
define('DB_DATABASE', "foodapp_db"); // database name | |
define('DB_SERVER', "localhost"); // db server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `categories` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`name_cat` varchar(255) NOT NULL, | |
`image_cat` varchar(255) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; | |
-- | |
-- Contenu de la table `categories` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<uses-permission android:name="android.permission.VIBRATE" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private final void ajouterNotification() { | |
// Récupération du notification Manager | |
final NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); | |
// Récupération du titre et description de la notification | |
final String notificationTitle = "Ma notification"; | |
final String notificationDesc = "Cliquez ici , je suis une notification"; | |
// Création de la notification avec spécification de l'icône de la |
NewerOlder