git-svn-id: https://msi/svn/firstRepo/Service/branches/Manut_2.2.3@59 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
@@ -5,7 +5,7 @@ require_once "./include.php";
|
|||||||
require_once "./myDropBoxObj.php";
|
require_once "./myDropBoxObj.php";
|
||||||
//include "./SimpleImage.php";
|
//include "./SimpleImage.php";
|
||||||
|
|
||||||
$app->get('/photo/thumbnail/:imageID(/:createImgTag)', function ($imageID, $createImgTag = 0) use ($app, $dirRicetteDropBox) {
|
$app->get('/photo/thumbnail/:imageID(/:noRedirect)', function ($imageID, $noRedirect = 0) use ($app, $dirRicetteDropBox) {
|
||||||
$mysqlconnetion = new MysqlClass;
|
$mysqlconnetion = new MysqlClass;
|
||||||
|
|
||||||
$retObj = $mysqlconnetion->queryToObject("select type_format, id_ricette from immagini where id=" . $imageID, false);
|
$retObj = $mysqlconnetion->queryToObject("select type_format, id_ricette from immagini where id=" . $imageID, false);
|
||||||
@@ -24,17 +24,15 @@ $app->get('/photo/thumbnail/:imageID(/:createImgTag)', function ($imageID, $crea
|
|||||||
|
|
||||||
$dropBoxObj = new myDropBox();
|
$dropBoxObj = new myDropBox();
|
||||||
|
|
||||||
if ($createImgTag) {
|
if ($noRedirect) {
|
||||||
echo '<img src="';
|
|
||||||
echo $dropBoxObj->GetLink($folder . "/" . $imageFileName);
|
echo $dropBoxObj->GetLink($folder . "/" . $imageFileName);
|
||||||
echo '"/>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$app->response->redirect($dropBoxObj->GetLink($folder . "/" . $imageFileName), 303);
|
$app->response->redirect($dropBoxObj->GetLink($folder . "/" . $imageFileName), 303);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$app->get('/photo/medium/:imageID(/:createImgTag)', function ($imageID, $createImgTag = 0) use ($app, $dirRicetteDropBox) {
|
$app->get('/photo/medium/:imageID(/:noRedirect)', function ($imageID, $noRedirect = 0) use ($app, $dirRicetteDropBox) {
|
||||||
$mysqlconnetion = new MysqlClass;
|
$mysqlconnetion = new MysqlClass;
|
||||||
|
|
||||||
$retObj = $mysqlconnetion->queryToObject("select type_format, id_ricette from immagini where id=" . $imageID, false);
|
$retObj = $mysqlconnetion->queryToObject("select type_format, id_ricette from immagini where id=" . $imageID, false);
|
||||||
@@ -52,16 +50,14 @@ $app->get('/photo/medium/:imageID(/:createImgTag)', function ($imageID, $createI
|
|||||||
|
|
||||||
$dropBoxObj = new myDropBox();
|
$dropBoxObj = new myDropBox();
|
||||||
|
|
||||||
if ($createImgTag) {
|
if ($noRedirect) {
|
||||||
echo '<img src="';
|
|
||||||
echo $dropBoxObj->GetLink($folder . "/" . $imageFileName);
|
echo $dropBoxObj->GetLink($folder . "/" . $imageFileName);
|
||||||
echo '"/>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$app->response->redirect($dropBoxObj->GetLink($folder . "/" . $imageFileName), 303);
|
$app->response->redirect($dropBoxObj->GetLink($folder . "/" . $imageFileName), 303);
|
||||||
});
|
});
|
||||||
|
|
||||||
$app->get('/photo/:imageID(/:createImgTag)', function ($imageID, $createImgTag = 0) use ($app, $dirRicetteDropBox) {
|
$app->get('/photo/:imageID(/:noRedirect)', function ($imageID, $noRedirect = 0) use ($app, $dirRicetteDropBox) {
|
||||||
$mysqlconnetion = new MysqlClass;
|
$mysqlconnetion = new MysqlClass;
|
||||||
|
|
||||||
$retObj = $mysqlconnetion->queryToObject("select type_format, id_ricette from immagini where id=" . $imageID, false);
|
$retObj = $mysqlconnetion->queryToObject("select type_format, id_ricette from immagini where id=" . $imageID, false);
|
||||||
@@ -79,10 +75,8 @@ $app->get('/photo/:imageID(/:createImgTag)', function ($imageID, $createImgTag =
|
|||||||
|
|
||||||
$dropBoxObj = new myDropBox();
|
$dropBoxObj = new myDropBox();
|
||||||
|
|
||||||
if ($createImgTag) {
|
if ($noRedirect) {
|
||||||
echo '<img src="';
|
|
||||||
echo $dropBoxObj->GetLink($folder . "/" . $imageFileName);
|
echo $dropBoxObj->GetLink($folder . "/" . $imageFileName);
|
||||||
echo '"/>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$app->response->redirect($dropBoxObj->GetLink($folder . "/" . $imageFileName), 303);
|
$app->response->redirect($dropBoxObj->GetLink($folder . "/" . $imageFileName), 303);
|
||||||
|
|||||||
@@ -102,6 +102,10 @@ $app->post('/ricetta/body', function () use ($app) {
|
|||||||
$mysqlconnetion->executeQuery($query);
|
$mysqlconnetion->executeQuery($query);
|
||||||
$queryDelete = "DELETE FROM ingredienti where ID_RICETTE = " . $json_data_body->ricettaID;
|
$queryDelete = "DELETE FROM ingredienti where ID_RICETTE = " . $json_data_body->ricettaID;
|
||||||
$mysqlconnetion->executeQuery($queryDelete);
|
$mysqlconnetion->executeQuery($queryDelete);
|
||||||
|
|
||||||
|
$queryDelete = "UPDATE ricette SET data_modifica = NOW() where ID = " . $json_data_body->ricettaID;
|
||||||
|
$mysqlconnetion->executeQuery($queryDelete);
|
||||||
|
|
||||||
$retNewID = $json_data_body->ricettaID;
|
$retNewID = $json_data_body->ricettaID;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -7,9 +7,9 @@
|
|||||||
$app->get('/profile/statusCache', function () use ($app) {
|
$app->get('/profile/statusCache', function () use ($app) {
|
||||||
$callbackFn = $app->request()->get('callback');
|
$callbackFn = $app->request()->get('callback');
|
||||||
$mysqlconnetion = new MysqlClass;
|
$mysqlconnetion = new MysqlClass;
|
||||||
$query = "select 0 as ID_CATEGORIA, MAX(Data_creazione) as LastDateModified from categorie" .
|
$query = "select 0 as ID_CATEGORIA, MAX(data_creazione) as LastDateModified from categorie" .
|
||||||
" UNION" .
|
" UNION" .
|
||||||
" select ID_CATEGORIA, MAX(Data_creazione) as LastDateModified from ricette" .
|
" select ID_CATEGORIA, MAX(Data_modifica) as LastDateModified from ricette" .
|
||||||
" GROUP BY ID_CATEGORIA";
|
" GROUP BY ID_CATEGORIA";
|
||||||
$retObj = $mysqlconnetion->queryToObject($query);
|
$retObj = $mysqlconnetion->queryToObject($query);
|
||||||
$mysqlconnetion->disconnetti();
|
$mysqlconnetion->disconnetti();
|
||||||
|
|||||||
Reference in New Issue
Block a user