Resources data

This commit is contained in:
CHIEFSOFT\ameye
2023-06-28 11:48:19 -04:00
parent 4b525e6602
commit 4b5596a540
3 changed files with 44 additions and 4 deletions
-2
View File
@@ -408,7 +408,6 @@ long WrenchJobsOfferInterestList(CVars in, CVars &out) {
CVars rec;
map_to_cvars(f, rec);
snprintf(vname, sizeof (vname), "interest_uid_%05d", i);
out[vname] = rec["interest_uid"];
@@ -442,7 +441,6 @@ long WrenchJobsOfferInterestList(CVars in, CVars &out) {
snprintf(vname, sizeof (vname), "client_ratings_%05d", i);
out[vname] = "0";
snprintf(vname, sizeof (vname), "offer_code_%05d", i);
out[vname] = rec["offer_code"];
+2 -1
View File
@@ -393,7 +393,8 @@ long RecoPendingInterestCount( int itm_count, CVars in, CVars &out ){
int ic = itm_count;
long member_id = REQ_LONG(in, "member_id", 1, -1);
res = pgsql_query("SELECT moi.*,mjo.expire FROM members_offer_interest moi LEFT JOIN members_jobs_offer mjo ON mjo.id = moi.offer_id "
" WHERE moi.member_id = %lu AND mjo.expire > now()",member_id);
" LEFT JOIN members_jobs j ON j.id= mjo.job_id "
" WHERE moi.member_id = %lu AND mjo.expire > now() AND j.status= 1",member_id);
if (res != NULL && pgsql_num_rows(res) > 0) {
snprintf(vname, sizeof (vname), "title_%05d", ic);
+42 -1
View File
@@ -31,7 +31,7 @@ class WrenchResources extends BaseController
}
public function website(){
log_message('critical', "WrenchResources-> " );
$res1['tab_categories'] = $this->CategoryData();
$res1['marketdata'] = $this->MarketData();
$res1['productdata'] = $this->ProductData();
$res1['collectiondata'] = $this->CollectionData();
@@ -43,6 +43,47 @@ class WrenchResources extends BaseController
}
private function CategoryData(){
$arrayVar = [
"data" => [
[
"id" => "1",
"name" => "onsale",
"content" => "On Sale",
],
[
"id" => "2",
"name" => "owned",
"content" => "Owned",
],
[
"id" => "3",
"name" => "created",
"content" => "Created",
],
[
"id" => "4",
"name" => "hidden",
"content" => "Hidden",
],
[
"id" => "5",
"name" => "collection",
"content" => "Collection",
],
[
"id" => "6",
"name" => "activity",
"content" => "Activity",
],
]
];
return $arrayVar;
}
private function CollectionData(){
$arrayVar = [