diff --git a/wrenchboard/src/shared_tool/mobile.cc b/wrenchboard/src/shared_tool/mobile.cc index db1382f1..578bd5ae 100644 --- a/wrenchboard/src/shared_tool/mobile.cc +++ b/wrenchboard/src/shared_tool/mobile.cc @@ -248,7 +248,7 @@ long WrenchReturnJobOffersList(CVars in, CVars &out) { - res = pgsql_query("SELECT mj.id AS job_id, jo.id AS contract_id, jo.added::date,mj.title, jo.offer_code,jo.uid AS offer_uid,jo.expire, " + res = pgsql_query("SELECT jo.id AS offer_id, mj.id AS job_id, jo.id AS contract_id, jo.added::date,mj.title, jo.offer_code,jo.uid AS offer_uid,jo.expire, " " jo.public_view, mj.uid AS job_uid, jo.added AS offer_added, mj.description AS description, jo.job_description,mj.price, mj.timeline_days " "FROM members_jobs_offer jo LEFT JOIN members_jobs mj ON mj.id = jo.job_id " "WHERE jo.expire > now() AND jo.status = 1 " @@ -264,6 +264,9 @@ long WrenchReturnJobOffersList(CVars in, CVars &out) { CVars rec; map_to_cvars(f, rec); + snprintf(vname, sizeof (vname), "offer_id_%05d", i); + out[vname] = rec["id"]; + snprintf(vname, sizeof (vname), "title_%05d", i); out[vname] = rec["title"]; diff --git a/www-api/app/Config/Routes.php b/www-api/app/Config/Routes.php index de8f30b7..26fa3edb 100644 --- a/www-api/app/Config/Routes.php +++ b/www-api/app/Config/Routes.php @@ -137,6 +137,8 @@ $routes->post('/en/wrench/api/v1/assigntask', 'WrenchApi::apigate'); //$routes->post('/en/wrench/api/v1/blogdata', 'WrenchBlog::apigate'); //$routes->post('/en/wrench/api/v1/blogitem', 'WrenchBlog::apigate'); + +$routes->get('/en/wrench/api/v1/resources', 'WrenchResources::website'); $routes->get('/en/wrench/api/v1/blogdata/', 'WrenchBlog::website'); $routes->get('/en/wrench/api/v1/blogdata/(:any)', 'WrenchBlog::blogLimitedData/$1'); diff --git a/www-api/app/Controllers/WrenchApi.php b/www-api/app/Controllers/WrenchApi.php index 0aeaea38..46034866 100644 --- a/www-api/app/Controllers/WrenchApi.php +++ b/www-api/app/Controllers/WrenchApi.php @@ -100,6 +100,7 @@ class WrenchApi extends BaseController 'pendingjobsendtome' => ['POST'], 'pendingjobcancel' => ['POST'], 'assigntask' => ['POST'], + 'resources'=> ['POST'], ]; return $endpoints; } diff --git a/www-api/app/Controllers/WrenchResources.php b/www-api/app/Controllers/WrenchResources.php new file mode 100644 index 00000000..8ebfac5c --- /dev/null +++ b/www-api/app/Controllers/WrenchResources.php @@ -0,0 +1,359 @@ + " ); + + $res1['marketdata'] = $this->MarketData(); + $res1['productdata'] = $this->ProductData(); + $res1['collectiondata'] = $this->CollectionData(); + return $this->response->setJson($res1); + } + + public function index() + { + + } + + private function CollectionData(){ + + $arrayVar = [ + "data" => [ + [ + "id" => 0, + "uniqKey" => "627b4cb23264a7b4da238c4c", + "owner" => "profile.png", + "title" => "Seo Planes", + "NumberOfItem" => "324 Item", + "category" => "plan", + "images" => [ + "collection-plan-1.jpg", + "collection-plan-2.jpg", + "collection-plan-3.jpg", + ], + ], + [ + "id" => 1, + "uniqKey" => "627b4cb295315cc47b9f68bc", + "owner" => "profile.png", + "title" => "Amazing Game", + "NumberOfItem" => "324 Item", + "category" => "game", + "images" => [ + "collection-game-1.jpg", + "collection-game-2.jpg", + "collection-game-3.jpg", + ], + ], + [ + "id" => 2, + "uniqKey" => "627b4cb2f0da1da277df14a4", + "owner" => "profile.png", + "title" => "Arts", + "NumberOfItem" => "324 Item", + "category" => "arts", + "images" => [ + "collection-arts-1.jpg", + "collection-arts-2.jpg", + "collection-arts-3.jpg", + ], + ], + [ + "id" => 3, + "uniqKey" => "627b4cb20335c7c1d90557fb", + "owner" => "profile.png", + "title" => "Photography", + "NumberOfItem" => "324 Item", + "category" => "photography", + "images" => [ + "collection-photography-1.jpg", + "collection-photography-2.jpg", + "collection-photography-3.jpg", + ], + ], + [ + "id" => 4, + "uniqKey" => "627b4cb208149e95b9bcde87", + "owner" => "profile.png", + "title" => "Domin", + "NumberOfItem" => "324 Item", + "category" => "domain", + "images" => [ + "collection-domain-1.jpg", + "collection-domain-2.jpg", + "collection-domain-3.jpg", + ], + ], + [ + "id" => 5, + "uniqKey" => "627b4cb26b6ca42ddc5fa898", + "owner" => "profile.png", + "title" => "Sports", + "NumberOfItem" => "324 Item", + "category" => "sports", + "images" => [ + "collection-sports-1.jpg", + "collection-sports-2.jpg", + "collection-sports-3.jpg", + ], + ], + [ + "id" => 6, + "uniqKey" => "627b4cb20c73cb389f40b602", + "owner" => "profile.png", + "title" => "Cards", + "NumberOfItem" => "324 Item", + "category" => "cards", + "images" => [ + "collection-cards-1.jpg", + "collection-cards-2.jpg", + "collection-cards-3.jpg", + ], + ], + [ + "id" => 7, + "uniqKey" => "627b4cb264bf47d65f559e35", + "owner" => "profile.png", + "title" => "Uitily", + "NumberOfItem" => "324 Item", + "category" => "uitily", + "images" => [ + "collection-uitily-1.jpg", + "collection-uitily-2.jpg", + "collection-uitily-3.jpg", + ], + ], + [ + "id" => 8, + "uniqKey" => "627b4cb27db9314a4c802c4c", + "owner" => "profile.png", + "title" => "Virtural Worlds", + "NumberOfItem" => "324 Item", + "category" => "worlds", + "images" => [ + "collection-worlds-1.jpg", + "collection-worlds-2.jpg", + "collection-worlds-3.jpg", + ], + ], + ], + ]; +return $arrayVar; + } + private function ProductData(){ + + + $arrayVar = [ + "datas" => [ + [ + "id" => 0, + "username" => "Bilout", + "profile_img" => "profile.png", + "price" => "75,320 ETH", + "thumbnil" => "tranding-1.jpg", + "remaing" => "2023-03-04 4:00:00", + "title" => "laborum cupidatat sit", + ], + [ + "id" => 1, + "username" => "Bilout", + "profile_img" => "profile.png", + "price" => "75,320 ETH", + "thumbnil" => "tranding-2.jpg", + "remaing" => "2023-03-04 4:00:00", + "title" => "velit occaecat voluptate", + ], + [ + "id" => 2, + "username" => "Bilout", + "profile_img" => "profile.png", + "price" => "75,320 ETH", + "thumbnil" => "tranding-3.jpg", + "remaing" => "2023-03-04 4:00:00", + "title" => "est reprehenderit amet", + ], + [ + "id" => 3, + "username" => "Bilout", + "profile_img" => "profile.png", + "price" => "75,320 ETH", + "thumbnil" => "tranding-4.jpg", + "remaing" => "2023-03-04 4:00:00", + "title" => "velit tempor nostrud", + ], + [ + "id" => 4, + "username" => "Bilout", + "profile_img" => "profile.png", + "price" => "75,320 ETH", + "thumbnil" => "tranding-4.jpg", + "remaing" => "2023-03-04 4:00:00", + "title" => "adipisicing sit nostrud", + ], + [ + "id" => 5, + "username" => "Bilout", + "profile_img" => "profile.png", + "price" => "75,320 ETH", + "thumbnil" => "tranding-3.jpg", + "remaing" => "2023-03-04 4:00:00", + "title" => "occaecat veniam commodo", + ], + [ + "id" => 6, + "username" => "Bilout", + "profile_img" => "profile.png", + "price" => "75,320 ETH", + "thumbnil" => "tranding-2.jpg", + "remaing" => "2023-03-04 4:00:00", + "title" => "nostrud ex pariatur", + ], + [ + "id" => 7, + "username" => "Bilout", + "profile_img" => "profile.png", + "price" => "75,320 ETH", + "thumbnil" => "tranding-1.jpg", + "remaing" => "2023-03-04 4:00:00", + "title" => "culpa ad proident", + ], + ], + ]; + + return $arrayVar; + } + private function MarketData(){ + + $arrayVar = [ + "data" => [ + [ + "id" => 0, + "owner" => "Long", + "creator" => "Riddle", + "owner_img" => "owner.png", + "creator_img" => "creator.png", + "eth_price" => "75,320 ETH", + "usd_price" => "773.69 USD", + "whishlisted" => true, + "thumbnil" => "marketplace-product-1.jpg", + "title" => "fugiat labore cillum", + "isActive" => true, + ], + [ + "id" => 1, + "owner" => "Alford", + "creator" => "Reese", + "owner_img" => "owner.png", + "creator_img" => "creator.png", + "eth_price" => "75,320 ETH", + "usd_price" => "773.69 USD", + "whishlisted" => false, + "thumbnil" => "marketplace-product-2.jpg", + "title" => "veniam dolore dolore", + "isActive" => true, + ], + [ + "id" => 2, + "owner" => "Coffey", + "creator" => "Sheppard", + "owner_img" => "owner.png", + "creator_img" => "creator.png", + "eth_price" => "75,320 ETH", + "usd_price" => "773.69 USD", + "whishlisted" => false, + "thumbnil" => "marketplace-product-3.jpg", + "title" => "pariatur cillum et", + "isActive" => true, + ], + [ + "id" => 3, + "owner" => "Strickland", + "creator" => "Macias", + "owner_img" => "owner.png", + "creator_img" => "creator.png", + "eth_price" => "75,320 ETH", + "usd_price" => "773.69 USD", + "whishlisted" => false, + "thumbnil" => "marketplace-product-4.jpg", + "title" => "pariatur cillum dolore", + "isActive" => false, + ], + [ + "id" => 4, + "owner" => "Whitfield", + "creator" => "Buckley", + "owner_img" => "owner.png", + "creator_img" => "creator.png", + "eth_price" => "75,320 ETH", + "usd_price" => "773.69 USD", + "whishlisted" => false, + "thumbnil" => "marketplace-product-5.jpg", + "title" => "enim ad tempor", + "isActive" => true, + ], + [ + "id" => 5, + "owner" => "Casey", + "creator" => "Gaines", + "owner_img" => "owner.png", + "creator_img" => "creator.png", + "eth_price" => "75,320 ETH", + "usd_price" => "773.69 USD", + "whishlisted" => false, + "thumbnil" => "marketplace-product-6.jpg", + "title" => "enim Lorem fugiat", + "isActive" => false, + ], + [ + "id" => 6, + "owner" => "Tate", + "creator" => "Berry", + "owner_img" => "owner.png", + "creator_img" => "creator.png", + "eth_price" => "75,320 ETH", + "usd_price" => "773.69 USD", + "whishlisted" => false, + "thumbnil" => "marketplace-product-7.jpg", + "title" => "consectetur sit anim", + "isActive" => false, + ], + [ + "id" => 7, + "owner" => "Wells", + "creator" => "Golden", + "owner_img" => "owner.png", + "creator_img" => "creator.png", + "eth_price" => "75,320 ETH", + "usd_price" => "773.69 USD", + "whishlisted" => false, + "thumbnil" => "marketplace-product-8.jpg", + "title" => "consectetur sunt duis", + "isActive" => true, + ], + [ + "id" => 8, + "owner" => "Mcfadden", + "creator" => "Obrien", + "owner_img" => "owner.png", + "creator_img" => "creator.png", + "eth_price" => "75,320 ETH", + "usd_price" => "773.69 USD", + "whishlisted" => true, + "thumbnil" => "marketplace-product-9.jpg", + "title" => "officia ad reprehenderit", + "isActive" => true, + ], + ], + ]; + + return $arrayVar ; + + + } + +} \ No newline at end of file diff --git a/www-api/public/svs/user/userve.php b/www-api/public/svs/user/userve.php index 2566248c..7b71de30 100755 --- a/www-api/public/svs/user/userve.php +++ b/www-api/public/svs/user/userve.php @@ -79,6 +79,7 @@ $endpoints = array( 'pendingjobsendtome' => array('POST'), 'pendingjobcancel' => array('POST'), 'assigntask' => array('POST'), + 'resources'=> array('POST'), ); $call_backend = true; // sometimes we need to overwite the call to the extenstion API